Skip to content

Commit 1c53ebe

Browse files
mfaridziamazipan
authored andcommitted
translate [API] Instance Methods / Data into Indonesian (vuejs#153)
1 parent 84d562e commit 1c53ebe

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vuejs.org",
33
"private": true,
44
"hexo": {
5-
"version": "3.8.0"
5+
"version": "3.9.0"
66
},
77
"scripts": {
88
"start": "hexo server",
@@ -29,4 +29,4 @@
2929
"hoek": "^6.1.2",
3030
"request": "^2.85.0"
3131
}
32-
}
32+
}

src/v2/api/index.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,102 +1509,102 @@ type: api
15091509
15101510
Berisi pemantau (*listeners*) *events* `v-on` yang berada di cakupan induk (parent) (tanpa pengubah (*modifiers*) `.native`). Properti ini dapat diteruskan kebawah ke komponen *inner* via `v-on="$listeners"` - berguna saat membuat komponen-komponen penyelubung (wrapper) yang bersifat transparan.
15111511
1512-
## Instance Methods / Data
1512+
## Metode Instance / Data
15131513
15141514
### vm.$watch( expOrFn, callback, [options] )
15151515
1516-
- **Arguments:**
1516+
- **Argumen:**
15171517
- `{string | Function} expOrFn`
15181518
- `{Function | Object} callback`
15191519
- `{Object} [options]`
15201520
- `{boolean} deep`
15211521
- `{boolean} immediate`
15221522
1523-
- **Returns:** `{Function} unwatch`
1523+
- **Mengembalikan:** `{Function} unwatch`
15241524
15251525
- **Penggunaan:**
15261526
1527-
Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression only accepts dot-delimited paths. For more complex expressions, use a function instead.
1527+
Mengawasi suatu ekspresi atau fungsi penghitung (*computed function*) pada *instance* Vue untuk perubahan. *Callback* dipanggil dengan nilai baru dan nilai lama. Ekspresi hanya menerima jalur *dot-delimited*. Untuk ekspresi yang lebih kompleks, gunakan fungsi.
15281528
1529-
<p class="tip">Note: when mutating (rather than replacing) an Object or an Array, the old value will be the same as new value because they reference the same Object/Array. Vue doesn't keep a copy of the pre-mutate value.</p>
1529+
<p class="tip">Catatan: ketika memutasi (alih-alih mengganti) suatu Objek atau Array, nilai lama akan sama dengan nilai baru karena mereka mereferensikan Objek/Array yang sama. Vue tidak menyimpan salinan dari nilai pra-mutasi.</p>
15301530
1531-
- **Example:**
1531+
- **Contoh:**
15321532
15331533
``` js
15341534
// keypath
15351535
vm.$watch('a.b.c', function (newVal, oldVal) {
1536-
// do something
1536+
// lakukan sesuatu
15371537
})
15381538

15391539
// function
15401540
vm.$watch(
15411541
function () {
1542-
// everytime the expression `this.a + this.b` yields a different result,
1543-
// the handler will be called. It's as if we were watching a computed
1544-
// property without defining the computed property itself
1542+
// setiap kali ekspresi `this.a + this.b` menghasilkan hasil yang berbeda,
1543+
// handler akan dipanggil. Seolah-olah kita sedang mengawasi properti
1544+
// penghitung (computed property) tanpa mendefinisikan properti penghitung itu sendiri
15451545
return this.a + this.b
15461546
},
15471547
function (newVal, oldVal) {
1548-
// do something
1548+
// lakukan sesuatu
15491549
}
15501550
)
15511551
```
15521552
1553-
`vm.$watch` returns an unwatch function that stops firing the callback:
1553+
`vm.$watch` mengembalikan fungsi yang tidak diamati yang berhenti menembakkan *callback*:
15541554
15551555
``` js
15561556
var unwatch = vm.$watch('a', cb)
1557-
// later, teardown the watcher
1557+
// nanti, runtuhkan pengamat
15581558
unwatch()
15591559
```
15601560
1561-
- **Option: deep**
1561+
- **Opsi: deep**
15621562
1563-
To also detect nested value changes inside Objects, you need to pass in `deep: true` in the options argument. Note that you don't need to do so to listen for Array mutations.
1563+
Untuk mendeteksi perubahan nilai bersarang (*nested value*) di dalam Objek, anda harus mengoper `deep: true` dalam argumen opsi. Perhatikan bahwa anda tidak perlu mendengarkan (*listen*) untuk mutasi Array.
15641564
15651565
``` js
15661566
vm.$watch('someObject', callback, {
15671567
deep: true
15681568
})
15691569
vm.someObject.nestedValue = 123
1570-
// callback is fired
1570+
// callback dieksekusi
15711571
```
15721572
1573-
- **Option: immediate**
1573+
- **Opsi: immediate**
15741574
1575-
Passing in `immediate: true` in the option will trigger the callback immediately with the current value of the expression:
1575+
Mengoper `immediate: true` dalam opsi akan segera memicu *callback* dengan nilai ekspresi saat ini:
15761576
15771577
``` js
15781578
vm.$watch('a', callback, {
15791579
immediate: true
15801580
})
1581-
// `callback` is fired immediately with current value of `a`
1581+
// `callback` segera dieksekusi dengan nilai `a` saat ini
15821582
```
15831583
15841584
### vm.$set( target, key, value )
15851585
1586-
- **Arguments:**
1586+
- **Argumen:**
15871587
- `{Object | Array} target`
15881588
- `{string | number} key`
15891589
- `{any} value`
15901590
1591-
- **Returns:** the set value.
1591+
- **Mengembalikan:** set nilai.
15921592
15931593
- **Penggunaan:**
15941594
1595-
This is the **alias** of the global `Vue.set`.
1595+
Ini adalah **alias** dari global `Vue.set`.
15961596
15971597
- **Lihat juga:** [Vue.set](#Vue-set)
15981598
15991599
### vm.$delete( target, key )
16001600
1601-
- **Arguments:**
1601+
- **Argumen:**
16021602
- `{Object | Array} target`
16031603
- `{string | number} key`
16041604
16051605
- **Penggunaan:**
16061606
1607-
This is the **alias** of the global `Vue.delete`.
1607+
Ini adalah **alias** dari global `Vue.delete`.
16081608
16091609
- **Lihat juga:** [Vue.delete](#Vue-delete)
16101610

0 commit comments

Comments
 (0)