Skip to content

Commit 72c92d5

Browse files
authored
Merge pull request #257 from vuejs-id/master
[pull] indonesian from master
2 parents b08e866 + 790ebb5 commit 72c92d5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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/guide/migration/attribute-coercion.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Penghapusan konsep atribut yang dapat dienumerasi dan `attr="false"` dapat mengh
8585
| `draggable` | `draggable` &rarr; `false` |
8686
| `spellcheck` | `spellcheck` &rarr; `true` |
8787

88-
Supaya perilaku lama tetap dapat dijalankan, dan karena Anda akan menngubah nilai `false` menjadi `'false'`, pada Vue versi 3.x pengembang harus membuat ekspresi `v-bind` pada atribut `contenteditable` dan `spellcheck` agar menghasilkan nilai `false` atau `'false'`.
88+
Since we no longer coerce `null` to `'false'` for “enumerated properties” in 3.x, in the case of `contenteditable` and `spellcheck`, developers will need to change those `v-bind` expressions that used to resolve to `null` to resolve to `false` or `'false'` in order to maintain the same behavior as 2.x.
8989

9090
Pada Vue versi 2.x, nilai yang tidak valid diubah menjadi `'true'` untuk atribut yang dapat dienumerasi. Perilaku tersebut biasanya tidak diharapkan dan tidak diinginkan pada kasus skala besar. Pada Vue versi 3.x `true` atau `'true'` harus dinyatakan secara eksplisit.
9191

@@ -106,8 +106,8 @@ Pada Vue versi 3.x, penghapusan atribut harus dinyatakan secara eksplisit dengan
106106
</thead>
107107
<tbody>
108108
<tr>
109-
<td rowspan="3">2.x, atribut yang dapat dienumerasi<br><small>seperti <code>contenteditable</code>, <code>draggable</code> dan <code>spellcheck</code>.</small></td>
110-
<td><code>undefined</code>, <code>false</code></td>
109+
<td rowspan="3">2.x “Enumerated attrs”<br><small>i.e. <code>contenteditable</code>, <code>draggable</code> and <code>spellcheck</code>.</small></td>
110+
<td><code>undefined</code></td>
111111
<td><code>undefined</code>, <code>null</code></td>
112112
<td><i>dihapus</i></td>
113113
</tr>
@@ -120,7 +120,7 @@ Pada Vue versi 3.x, penghapusan atribut harus dinyatakan secara eksplisit dengan
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/web-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = {
4444
.rule('vue')
4545
.use('vue-loader')
4646
.tap(options => ({
47-
...options
47+
...options,
4848
compilerOptions: {
4949
// treat any tag that starts with ion- as custom elements
5050
isCustomElement: tag => tag.startsWith('ion-')
@@ -200,7 +200,7 @@ It is recommended to export the individual element constructors to give your use
200200
```js
201201
import { defineCustomElement } from 'vue'
202202
import Foo from './MyFoo.ce.vue'
203-
import Bar from './MyBar.ce.bar'
203+
import Bar from './MyBar.ce.vue'
204204

205205
const MyFoo = defineCustomElement(Foo)
206206
const MyBar = defineCustomElement(Bar)

0 commit comments

Comments
 (0)