Skip to content

Commit a38c359

Browse files
authored
Merge pull request #508 from naokie/summary-update-aug-2nd
2 parents 2a74b6c + eb9dec1 commit a38c359

17 files changed

+46
-58
lines changed

src/.vuepress/public/images/sponsors/autocode.svg

Lines changed: 0 additions & 17 deletions
This file was deleted.
Loading

src/.vuepress/theme/data/patreon-sponsors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export default {
77
],
88
"special_sponsors": [
99
{
10-
"url": "https://autocode.com",
11-
"img": "autocode.svg",
12-
"name": "Autocode",
13-
"description": "Build app-to-app workflows and connect APIs"
10+
"url": "https://www.dcloud.io/hbuilderx.html?hmsr=vue-en&hmpl=&hmcu=&hmkw=&hmci=",
11+
"img": "hbuilder.png",
12+
"name": "HBuilder",
13+
"description": "An IDE for Vue"
1414
}
1515
],
1616
"platinum_sponsors": [

src/api/refs-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ count.value++
1616
console.log(count.value) // 1
1717
```
1818

19-
If an object is assigned as a ref's value, the object is made deeply reactive by the [reactive](./basic-reactivity.html#reactive) method.
19+
If an object is assigned as a ref's value, the object is made deeply reactive by the [reactive](./basic-reactivity.html#reactive) function.
2020

2121
**Typing:**
2222

src/api/sfc-script-setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Think of `MyComponent` as being referenced as a variable. If you have used JSX,
8989

9090
### Dynamic Components
9191

92-
Since components are referenced as variables instead of registered under string keys, we should use dynamic `:is` binding when using dynamic components inside `<script setup>`:
92+
Since components are referenced as variables instead of registered under string keys, you should use dynamic `:is` binding when using dynamic components inside `<script setup>`:
9393

9494
```vue
9595
<script setup>
@@ -133,7 +133,7 @@ import * as Form from './form-components'
133133

134134
## `defineProps` and `defineEmits`
135135

136-
To declare options like `props` and `emits` with full type inference support, we can use the `defineProps` and `defineEmits` APIs, which are automatically available inside `<script setup>`:
136+
To declare `props` and `emits` in `<script setup>`, you must use the `defineProps` and `defineEmits` APIs, which provide full type inference support and are automatically available inside `<script setup>`:
137137

138138
```vue
139139
<script setup>
@@ -148,7 +148,7 @@ const emit = defineEmits(['change', 'delete'])
148148

149149
- `defineProps` and `defineEmits` are **compiler macros** only usable inside `<script setup>`. They do not need to be imported, and are compiled away when `<script setup>` is processed.
150150

151-
- `defineProps` accepts the same value as the `props` option, while `defineEmits` accepts the same value as the `emits` option.
151+
- `defineProps` accepts the same value as the [`props` option](/api/options-data.html#props), while `defineEmits` accepts the same value as the [`emits` option](/api/options-data.html#emits).
152152

153153
- `defineProps` and `defineEmits` provide proper type inference based on the options passed.
154154

@@ -195,7 +195,7 @@ const attrs = useAttrs()
195195

196196
## Usage alongside normal `<script>`
197197

198-
`<script setup>` can be used alongside normal `<script>`. A normal `<script>` may be needed in cases where we need to:
198+
`<script setup>` can be used alongside normal `<script>`. A normal `<script>` may be needed in cases where you need to:
199199

200200
- Declare options that cannot be expressed in `<script setup>`, for example `inheritAttrs` or custom options enabled via plugins.
201201
- Declaring named exports.

src/api/sfc-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ A `<style module>` tag is compiled as [CSS Modules](https://github.com/css-modul
126126

127127
The resulting classes are hashed to avoid collision, achieving the same effect of scoping the CSS to the current component only.
128128

129-
Refer to the [CSS Modules spec](https://github.com/css-modules/css-modules) for mode details such as [global exceptions](https://github.com/css-modules/css-modules#exceptions) and [composition](https://github.com/css-modules/css-modules#composition).
129+
Refer to the [CSS Modules spec](https://github.com/css-modules/css-modules) for more details such as [global exceptions](https://github.com/css-modules/css-modules#exceptions) and [composition](https://github.com/css-modules/css-modules#composition).
130130

131131
### Custom Inject Name
132132

src/guide/component-registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ app.component('my-component-name', {
2727

2828
### 命名のケース (Name Casing)
2929

30-
コンポーネントを文字列テンプレートか単一ファイルコンポーネントで定義する際は、コンポーネント名に 2 つの命名規則があります:
30+
コンポーネントを文字列テンプレートか単一ファイルコンポーネントで定義する際は、名前の付け方に 2 つのオプションがあります:
3131

3232
#### ケバブケース
3333

src/guide/installation.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ vue upgrade --next
9797
npm の場合:
9898

9999
```bash
100-
$ npm init vite <プロジェクト名> -- --template vue
100+
# npm 6.x
101+
$ npm init vite@latest <プロジェクト名> --template vue
102+
103+
# npm 7+, extra double-dash is needed:
104+
$ npm init vite@latest <プロジェクト名> -- --template vue
105+
101106
$ cd <プロジェクト名>
102107
$ npm install
103108
$ npm run dev

src/guide/migration/attribute-coercion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ badges:
8585
| `draggable` | `draggable` &rarr; `false` |
8686
| `spellcheck` | `spellcheck` &rarr; `true` |
8787

88-
これまでの振る舞いを維持するために、また、`false``'false'` に強制するために、3.x Vue の開発者は `contenteditable` `spellcheck` に対して `v-bind` 式を `false` または `'false'` に解決する必要があります
88+
3.x では「列挙されたプロパティ」のために `null``'false'` に強制しなくなったため、`contenteditable` `spellcheck` のような場合、2.x と同じ振る舞いを維持するために、開発者は `null` に解決していた `v-bind` 式を `false` に解決するか、`'false'` に変更する必要があります
8989

9090
2.x では、列挙された属性に対して無効な値を `'true'` に強制的に設定していました。これは通常意図していなかったもので、大規模に利用される可能性は低いと思われます。3.x では、`true` または `'true'` を明示的に指定する必要があります。
9191

@@ -107,7 +107,7 @@ badges:
107107
<tbody>
108108
<tr>
109109
<td rowspan="3">2.x “列挙された属性”<br><small>つまり<code>contenteditable</code>、<code>draggable</code>、<code>spellcheck</code></small></td>
110-
<td><code>undefined</code>, <code>false</code></td>
110+
<td><code>undefined</code></td>
111111
<td><code>undefined</code>, <code>null</code></td>
112112
<td><i>削除されます</i></td>
113113
</tr>
@@ -120,7 +120,7 @@ badges:
120120
<td><code>"true"</code></td>
121121
</tr>
122122
<tr>
123-
<td><code>null</code>, <code>'false'</code></td>
123+
<td><code>null</code>, <code>false</code>, <code>'false'</code></td>
124124
<td><code>false</code>, <code>'false'</code></td>
125125
<td><code>"false"</code></td>
126126
</tr>

src/guide/migration/custom-directives.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ badges:
1515

1616
Vue 2 では、以下のフックを使用して要素のライフサイクルをターゲットにしたカスタムディレクティブが作成していました。これらはすべてオプションです。
1717

18-
- **bind** - ディレクティブが要素にバインドされると発生します。これは一度だけ発生します
19-
- **inserted** - 要素が親 DOM に挿入された後に発生します
18+
- **bind** - ディレクティブが要素にバインドされると呼び出されます。これは一度だけ呼び出されます
19+
- **inserted** - 要素が親 DOM に挿入された後に呼び出されます
2020
- **update** - 要素が更新されたときに呼び出されますが、子はまだ更新されていません。
2121
- **componentUpdated** - コンポーネントと子が更新されると呼び出されます。
2222
- **unbind** - ディレクティブが削除されると呼び出されます。 また、これは一度だけ呼び出されます。
@@ -45,7 +45,7 @@ Vue.directive('highlight', {
4545
- bind → **beforeMount**
4646
- inserted → **mounted**
4747
- **beforeUpdate**: 追加されました!これは、コンポーネントのライフサイクルフックのように、要素自体が更新される前に呼び出されます。
48-
- update → 削除されました!updated と似たようなものが多すぎて冗長です。代わりに updated を使ってください。
48+
- update → 削除されました! `updated` と似たようなものが多すぎて冗長です。代わりに `updated` を使ってください。
4949
- componentUpdated → **updated**
5050
- **beforeUnmount**: 追加されました!コンポーネントのライフサイクルフックと同様に、要素がマウント解除される直前に呼び出されます。
5151
- unbind -> **unmounted**

src/guide/migration/custom-elements-interop.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ badges:
88
## 概要
99

1010
- **破壊的変更:** タグをカスタム要素として扱うかのチェックは、テンプレートのコンパイル中に実行されるようになりました。そのためランタイム設定ではなくコンパイラオプションで設定する必要があります。
11-
- **破壊的変更:** 特別な `is` プロパティの使用は予約済みの `<component>` タグのみに制限されます。
11+
- **破壊的変更:** 特別な `is` 属性の使用は予約済みの `<component>` タグのみに制限されます。
1212
- **新規:** ネイティブ HTML のパース制限を回避するためにネイティブ要素で `is` が使用されていた 2.x のユースケースをサポートするため、値の前に `vue:` を付けて、Vue コンポーネントとして解決します。
1313

1414
## 自主的なカスタム要素
@@ -69,21 +69,21 @@ Vue.config.ignoredElements = ['plastic-button']
6969
<button is="plastic-button">Click Me!</button>
7070
```
7171

72-
Vue では、ブラウザで普遍的に利用できるようになる前のネイティブ属性の動作をシミュレートするために、特別なプロパティ `is` を使用していました。しかし、2.x では、`plastic-button` という名前の Vue コンポーネントをレンダリングしていると解釈されていました。これにより、上記のカスタマイズされたビルトイン要素のネイティブな使用がブロックされます。
72+
Vue では、ブラウザで普遍的に利用できるようになる前のネイティブ属性の動作をシミュレートするために、特別な属性 `is` を使用していました。しかし、2.x では、`plastic-button` という名前の Vue コンポーネントをレンダリングしていると解釈されていました。これにより、上記のカスタマイズされたビルトイン要素のネイティブな使用がブロックされます。
7373

74-
3.0 では、Vue の `is` プロパティの特別な扱いを `<component>` タグのみに制限しています。
74+
3.0 では、Vue の `is` 属性の特別な扱いを `<component>` タグのみに制限しています。
7575

7676
- 予約済みの `<component>` タグで使用された場合、2.x と全く同じ動作をします。
77-
- 通常のコンポーネントに使用すると、通常のプロパティのように動作します
77+
- 通常のコンポーネントに使用すると、通常の属性のように動作します
7878

7979
```html
8080
<foo is="bar" />
8181
```
8282

8383
- 2.x の動作: `bar` コンポーネントをレンダリングします。
84-
- 3.x の動作: `foo` コンポーネントをレンダリングし、`is` プロパティを渡します
84+
- 3.x の動作: `foo` コンポーネントをレンダリングし、`is` 属性を渡します
8585

86-
- 通常の要素で使用される場合、`is` プロパティとして `createElement` の呼び出しに渡され、ネイティブ属性としてもレンダリングされます。これはカスタマイズされたビルトイン要素の使用をサポートします。
86+
- 通常の要素で使用される場合、`is` 属性として `createElement` の呼び出しに渡され、ネイティブ属性としてもレンダリングされます。これはカスタマイズされたビルトイン要素の使用をサポートします。
8787

8888
```html
8989
<button is="plastic-button">Click Me!</button>
@@ -105,7 +105,7 @@ Vue では、ブラウザで普遍的に利用できるようになる前のネ
105105

106106
### 2.x での構文
107107

108-
Vue 2 では、ネイティブタグに `is` プロパティを使用してこれらの制限を回避することを推奨しています
108+
Vue 2 では、ネイティブタグに `is` 属性を使用してこれらの制限を回避することを推奨しています
109109

110110
```html
111111
<table>

0 commit comments

Comments
 (0)