You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/v2/api/index.md
+51-51Lines changed: 51 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ type: api
60
60
Vue.config.devtools=true
61
61
```
62
62
63
-
Konfigurasi untuk mengizinkan [vue-devtools](https://github.com/vuejs/vue-devtools) inspeksi. Nilai aggapan dari opsi ini adalah `true` dalam build pengembangan. Dan` false` di build produksi. Anda dapat mengaturnya ke `true` untuk mengaktifkan inspeksi untuk produksi.
63
+
Konfigurasi untuk mengizinkan [vue-devtools](https://github.com/vuejs/vue-devtools) inspeksi. Nilai anggapan dari opsi ini adalah `true` dalam build pengembangan. Dan` false` di build produksi. Anda dapat mengaturnya ke `true` untuk mengaktifkan inspeksi untuk produksi.
64
64
65
65
### errorHandler
66
66
@@ -166,7 +166,7 @@ type: api
166
166
167
167
-**Nilai Anggapan:**`false (from 2.2.3+)`
168
168
169
-
-**Usage**:
169
+
-**Penggunaan**:
170
170
171
171
Setel ini menjadi `true` untuk mengaktifkan pelacakan inisialisasi komponen, kompilasi, render, dan palacakan performa patch pada browser devtool panel performance/timeline. Hanya berfungsi dalam mode pengembangan dan di browser yang mendukung [performance.mark] (https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) API.
172
172
@@ -186,21 +186,21 @@ type: api
186
186
187
187
### Vue.extend( options )
188
188
189
-
-**Arguments:**
189
+
-**Argumen:**
190
190
-`{Object} options`
191
191
192
192
-**Penggunaan:**
193
193
194
-
Create a "subclass" of the base Vue constructor. The argument should be an object containing component options.
194
+
Membuat sebuah "subclass" dari konstruktor. Argumen harus berisi objek yang berisi opsi komponen.
195
195
196
-
The special case to note here is the `data`option - it must be a function when used with`Vue.extend()`.
196
+
Kasus spesial untuk dicatat disini adalah opsi `data`- ini harus berupa fungsi ketika digunakan dengan`Vue.extend()`.
//create an instance of Profile and mount it on an element
214
+
//buat sebuah instance dari profil dan pasang ke dalam elemen
215
215
newProfile().$mount('#mount-point')
216
216
```
217
217
218
-
Will result in:
218
+
Akan menghasilkan:
219
219
220
220
```html
221
221
<p>Walter White aka Heisenberg</p>
@@ -225,75 +225,75 @@ type: api
225
225
226
226
### Vue.nextTick( [callback, context] )
227
227
228
-
-**Arguments:**
228
+
-**Argumen:**
229
229
-`{Function} [callback]`
230
230
-`{Object} [context]`
231
231
232
232
-**Penggunaan:**
233
233
234
-
Defer the callback to be executed after the next DOM update cycle. Use it immediately after you've changed some data to wait for the DOM update.
234
+
Menangguhkan panggilan balik untuk dieksekusi setelah siklus pembaruan DOM selanjutnya. Gunakan ini segera setelah Anda mengubah beberapa data untuk menunggu untuk pembaruan DOM.
235
235
236
236
```js
237
-
//modify data
237
+
//modifikasi data
238
238
vm.msg='Hello'
239
-
// DOM not updated yet
239
+
// DOM belum diperbarui
240
240
Vue.nextTick(function () {
241
-
// DOM updated
241
+
// DOM telah diperbarui
242
242
})
243
243
244
-
//usage as a promise (2.1.0+, see note below)
244
+
//gunakan sebagai promise (2.1.0+, lihat catatan di bawah)
245
245
Vue.nextTick()
246
246
.then(function () {
247
-
// DOM updated
247
+
// DOM telah diperbarui
248
248
})
249
249
```
250
250
251
-
> New in 2.1.0+: returns a Promise if no callback is provided and Promise is supported in the execution environment. Please note that Vue does not come with a Promise polyfill, so if you target browsers that don't support Promises natively (looking at you, IE), you will have to provide a polyfill yourself.
251
+
> Baru di 2.1.0+: mengembalikan sebuah _Promise_ jika tidak tersedia panggilan balikdan _Promise_ didukung di lingkungan eksekusi. Tolong catat bahwa Vue tidak datang dengan _Promise__polyfill_, jadi jika Anda menargetkan peramban yang tidak mendukung _Promise_ secara bawaan (melihat Anda, IE). Anda harus menyediakan _polyfill_ Anda sendiri.
Adds a property to a reactive object, ensuring the new property is also reactive, so triggers view updates. This must be used to add new properties to reactive objects, as Vue cannot detect normal property additions (e.g.`this.myObject.newProperty = 'hi'`).
266
+
Menambahkan properti ke dalam objek reaktif, menjamin properti baru untuk reaktif juga, jadi memicu pembaruan _view_. Ini harus digunakan untuk menambah properti baru untuk objek reaktif, karena Vue tidak dapat mendeteksi penambahan properti normal (sebagai contoh`this.myObject.newProperty = 'hi'`).
267
267
268
-
<pclass="tip">The target object cannot be a Vue instance, or the root data object of a Vue instance.</p>
268
+
<pclass="tip">Objek target tidak dapat menjadi _instance_ Vue, atau objek data root dari _instance_ Vue.</p>
269
269
270
270
-**Lihat juga:**[Reactivity in Depth](../guide/reactivity.html)
271
271
272
272
### Vue.delete( target, key )
273
273
274
-
-**Arguments:**
274
+
-**Argumen:**
275
275
-`{Object | Array} target`
276
276
-`{string | number} key/index`
277
277
278
-
> Only in 2.2.0+: Also works with Array + index.
278
+
> Hanya di 2.2.0+: Juga bekerja dengan Array + index.
279
279
280
280
-**Penggunaan:**
281
281
282
-
Delete a property on an object. If the object is reactive, ensure the deletion triggers view updates. This is primarily used to get around the limitation that Vue cannot detect property deletions, but you should rarely need to use it.
282
+
Menghapus properti dalam objek. Jika objek reaktif, menjamin pembaruan pemicu penghapusan _view_. Ini terutama digunakan untuk mengatasi batasan dimana Vue tidak dapat mendeteksi penghapusan properti, tapi Anda jarang harus menggunakannya.
283
283
284
-
<pclass="tip">The target object cannot be a Vue instance, or the root data object of a Vue instance.</p>
284
+
<pclass="tip">Objek target tidak dapat menjadi _instance_ Vue, atau objek data root dari _instance_ Vue.</p>
285
285
286
286
-**Lihat juga:**[Reactivity in Depth](../guide/reactivity.html)
287
287
288
288
### Vue.directive( id, [definition] )
289
289
290
-
-**Arguments:**
290
+
-**Argumen:**
291
291
-`{string} id`
292
292
-`{Function | Object} [definition]`
293
293
294
294
-**Penggunaan:**
295
295
296
-
Register or retrieve a global directive.
296
+
Mendaftarkan atau mengambil directif global.
297
297
298
298
```js
299
299
// register
@@ -307,94 +307,94 @@ type: api
307
307
308
308
// register (function directive)
309
309
Vue.directive('my-directive', function () {
310
-
//this will be called as `bind` and `update`
310
+
//ini akan dipanggil sebagai `bind` dan `update`
311
311
})
312
312
313
-
// getter, return the directive definition if registered
313
+
// getter, mengembalikan definisi direktif jika terdaftar
Install a Vue.js plugin. If the plugin is an Object, it must expose an `install` method. If it is a function itself, it will be treated as the install method. The install method will be called with Vue as the argument.
371
+
Memasang plugin Vue.js. Jika plugin adalah sebuah objek, objek tersebut harus membuka metode `install`. Jika ini adalah fungsinya sendiri, ini akan diperlukan sebagai metode pemasangan. Metode pemasangan akan dipanggil dengan Vue sebagai argumen.
372
372
373
-
This method has to be called before calling`new Vue()`
373
+
Metode ini harus dipanggil sebelum memanggil`new Vue()`
374
374
375
-
When this method is called on the same plugin multiple times, the plugin will be installed only once.
375
+
Ketika metode ini dipanggil dalam plugin yang sama beberapa kali, plugin hanya akan dipasang sekali.
376
376
377
377
-**Lihat juga:**[Plugins](../guide/plugins.html)
378
378
379
379
### Vue.mixin( mixin )
380
380
381
-
-**Arguments:**
381
+
-**Argumen:**
382
382
-`{Object} mixin`
383
383
384
384
-**Penggunaan:**
385
385
386
-
Apply a mixin globally, which affects every Vue instance created afterwards. This can be used by plugin authors to inject custom behavior into components. **Not recommended in application code**.
386
+
Menerapkan _mixin_ secara global, akan berpengaruh ke setiap _instance_Vue yang tercipta setelah itu. Ini dapat digunakan oleh pembuat plugin untuk menginjeksi perilaku khusus ke dalam komponen. **Tidak direkomendasikan dalam kode aplikasi**.
Compiles a template string into a render function. **Only available in the full build.**
397
+
Menghimpun untai templat kedalam fungsi render. **Hanya tersedia dalam build penuh.**
398
398
399
399
```js
400
400
var res =Vue.compile('<div><span>{{ msg }}</span></div>')
@@ -412,16 +412,16 @@ type: api
412
412
413
413
### Vue.observable( object )
414
414
415
-
> New in 2.6.0+
415
+
> Baru di 2.6.0+
416
416
417
-
-**Arguments:**
417
+
-**Argumen:**
418
418
-`{Object} object`
419
419
420
420
-**Penggunaan:**
421
421
422
-
Make an object reactive. Internally, Vue uses this on the object returned by the`data` function.
422
+
Membuat sebuah reaktif objek. Secara internal, Vue menggunakan ini dalam objek yang dikembalikan oleh fungsi`data`.
423
423
424
-
The returned object can be used directly inside [render functions](../guide/render-function.html)and [computed properties](../guide/computed.html), and will trigger appropriate updates when mutated. It can also be used as a minimal, cross-component state store for simple scenarios:
424
+
Objek yang dikembalikan dapat digunakan secara langsung dalam [fungsi render](../guide/render-function.html)dan [properti computed](../guide/computed.html), dan akan memicu pembaruan yang sesuai ketika bermutasi. Ini juga dapat digunakan secara minimal, menyimpan _state_ lintas komponen untuk skenario sederhana:
425
425
426
426
```js
427
427
conststate=Vue.observable({ count:0 })
@@ -435,15 +435,15 @@ type: api
435
435
}
436
436
```
437
437
438
-
<pclass="tip">In Vue 2.x, `Vue.observable` directly mutates the object passed to it, so that it is equivalent to the object returned, as [demonstrated here](../guide/instance.html#Data-and-Methods). In Vue 3.x, a reactive proxy will be returned instead, leaving the original object non-reactive if mutated directly. Therefore, for future compatibility, we recommend always working with the object returned by `Vue.observable`, rather than the object originally passed to it.</p>
438
+
<pclass="tip">Dalam Vue 2.x, `Vue.observable` secara langsung memutasikan objek yang dioper ke dalamnya, jadi ini sama dengan pengembalian objek, [didemonstrasikan disini](../guide/instance.html#Data-and-Methods). Dalam Vue 3.x, proksi reaktif akan kembali sebagai gantinya, meninggalkan objek nonreaktif aslinya jika bermutasi secara langsung. Karena itu, untuk kompatibilitas di masa yang akan datang, kami selalu merekomendasikan bekerja dengan objek yang dikembalikan oleh `Vue.observable`, dari pada objek asli yang dioper ke dalamnya.</p>
439
439
440
440
-**Lihat juga:**[Reactivity in Depth](../guide/reactivity.html)
441
441
442
442
### Vue.version
443
443
444
-
-**Details**: Provides the installed version of Vue as a string. This is especially useful for community plugins and components, where you might use different strategies for different versions.
444
+
-**Detil**: Menyediakan versi yang terpasang dari Vue sebagai untai. Terutama beguna untuk plugin dan komponen dari komunitas, dimana Anda mungkin menggunakan stretegi berbeda untuk versi yang berbeda.
0 commit comments