Skip to content

Commit b9289be

Browse files
authored
Merge pull request vuejs#120 from vendywira/API-Instance-Methods-Lifecycle-#113
translate documentation for instance method lifecycle
2 parents 9d630c9 + fe6508a commit b9289be

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/v2/api/index.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,99 +1782,99 @@ type: api
17821782
</script>
17831783
{% endraw %}
17841784
1785-
## Instance Methods / Lifecycle
1785+
## Instance Methods / Siklus Hidup
17861786
17871787
### vm.$mount( [elementOrSelector] )
17881788
1789-
- **Arguments:**
1789+
- **Argumen:**
17901790
- `{Element | string} [elementOrSelector]`
17911791
- `{boolean} [hydrating]`
17921792
1793-
- **Returns:** `vm` - the instance itself
1793+
- **Mengembalikan:** `vm` - instansiasi dari dirinya sendiri
17941794
1795-
- **Usage:**
1795+
- **Penggunaan:**
17961796
1797-
If a Vue instance didn't receive the `el` option at instantiation, it will be in "unmounted" state, without an associated DOM element. `vm.$mount()` can be used to manually start the mounting of an unmounted Vue instance.
1797+
Jika *instance* vue tidak mencantumkan opsi `el` saat instansiasi, maka *instance* tersebut akan masuk kedalam keadaan "tidak terpasang/*unmounted*", tanpa terasosiasi dengan elemen *DOM* manapun. `vm.$mount()` dapat digunakan untuk menjalankan proses pemasangan/*mount* secara manual dari sebuah *instance* vue yang tak terpasang sebelumnya.
17981798
1799-
If `elementOrSelector` argument is not provided, the template will be rendered as an off-document element, and you will have to use native DOM API to insert it into the document yourself.
1799+
Jika argumen `elementOrSelector` tidak disediakan, maka templat akan di*render* sebagai dokumen mati atau *off-document element*, dan anda dapat menggunakan *native DOM API* untuk memasukannya elemen kedalam dokumen anda.
18001800
1801-
The method returns the instance itself so you can chain other instance methods after it.
1801+
*method* ini akan mengembalikan *instance*nya sendiri, oleh sebab itu anda dapat mengaitkannya ke method-method yang lain setelah pemanggilannya.
18021802
1803-
- **Example:**
1803+
- **Contoh:**
18041804
18051805
``` js
18061806
var MyComponent = Vue.extend({
18071807
template: '<div>Hello!</div>'
18081808
})
18091809

1810-
// create and mount to #app (will replace #app)
1810+
// instansiasi dan pemasangan kedalam elemen #app (akan menggantikan #app)
18111811
new MyComponent().$mount('#app')
18121812

1813-
// the above is the same as:
1813+
// kode diatas serupa dengan ini:
18141814
new MyComponent({ el: '#app' })
18151815

1816-
// or, render off-document and append afterwards:
1816+
// atau, me*render* dokumen mati dan menambahkan setelahnya:
18171817
var component = new MyComponent().$mount()
18181818
document.getElementById('app').appendChild(component.$el)
18191819
```
18201820
1821-
- **See also:**
1822-
- [Lifecycle Diagram](../guide/instance.html#Lifecycle-Diagram)
1823-
- [Server-Side Rendering](../guide/ssr.html)
1821+
- **Lihat juga:**
1822+
- [Siklus Hidup Diagram](../guide/instance.html#Lifecycle-Diagram)
1823+
- [Proses Render Pada Sisi Server](../guide/ssr.html)
18241824
18251825
### vm.$forceUpdate()
18261826
1827-
- **Usage:**
1827+
- **Penggunaan:**
18281828
1829-
Force the Vue instance to re-render. Note it does not affect all child components, only the instance itself and child components with inserted slot content.
1829+
Memaksa *instance* Vue untuk melakukan proses *render* ulang. Catatan hal ini tidak akan berpengaruh kepada semua anak dari komponen, hanya berpengaruh pada *instance*nya sendiri dan anak komponen yang disertai sisipan konten *slot*.
18301830
18311831
### vm.$nextTick( [callback] )
18321832
1833-
- **Arguments:**
1833+
- **Argumen:**
18341834
- `{Function} [callback]`
18351835
1836-
- **Usage:**
1836+
- **Penggunaan:**
18371837
1838-
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. This is the same as the global `Vue.nextTick`, except that the callback's `this` context is automatically bound to the instance calling this method.
1838+
Menunda eksekusi dari *callback* setelah siklus pembaharuan DOM berikutnya. Gunakan method ini sesegera mungkin setelah anda melakukan perubahan data untuk menunggu pembaharuan *DOM*. Ini sama halnya dengan global `Vue.nextTick`, kecuali dalam konteks `this` pada *callback* yang akan otomatis tertuju kepada *instance* vue pemanggil.
18391839
1840-
> 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.
1840+
> Baru di 2.1.0+: mengembalikan *Promise* jika tidak disediakan *callback* dan *Promise* ini telah mendukung eksekusi lingkungan/*environtment*. Mohon dicatat *promise* yang disediakan oleh *Vue* tidak menyertakan *polyfill*, oleh sebab itu jika target browser anda tidak mendukung *promise* (seperti IE), anda sendiri yang memiliki kewajiban untuk menyediakannya.
18411841
1842-
- **Example:**
1842+
- **Contoh:**
18431843
18441844
``` js
18451845
new Vue({
18461846
// ...
18471847
methods: {
18481848
// ...
18491849
example: function () {
1850-
// modify data
1850+
// mengubah data
18511851
this.message = 'changed'
1852-
// DOM is not updated yet
1852+
// DOM belum diperbaharui
18531853
this.$nextTick(function () {
1854-
// DOM is now updated
1855-
// `this` is bound to the current instance
1854+
// DOM telah diperbaharui
1855+
// `this` tertuju pada yang menginstansiasi
18561856
this.doSomethingElse()
18571857
})
18581858
}
18591859
}
18601860
})
18611861
```
18621862
1863-
- **See also:**
1863+
- **Lihat juga:**
18641864
- [Vue.nextTick](#Vue-nextTick)
1865-
- [Async Update Queue](../guide/reactivity.html#Async-Update-Queue)
1865+
- [Pembaharuan Antrian Async](../guide/reactivity.html#Async-Update-Queue)
18661866
18671867
### vm.$destroy()
18681868
1869-
- **Usage:**
1869+
- **Kegunaan:**
18701870
1871-
Completely destroy a vm. Clean up its connections with other existing vms, unbind all its directives, turn off all event listeners.
1871+
Menuntaskan pemusnahan sebuah vm. Membersihkan koneksi-koneksi terhadap vm-vm aktif yang lain, melepaskan keterikatan terhadap semua direktifnya, dan menonaktifkan semua *event listener*nya.
18721872
1873-
Triggers the `beforeDestroy` and `destroyed` hooks.
1873+
Memicu `beforeDestroy` dan `destroyed` *hooks*.
18741874
1875-
<p class="tip">In normal use cases you shouldn't have to call this method yourself. Prefer controlling the lifecycle of child components in a data-driven fashion using `v-if` and `v-for`.</p>
1875+
<p class="tip">Dalam situasi normal anda diharapkan tidak menggunakan method ini. Dalam pengontrolan siklus hidup komponen anak pada *data-driven*, Lebih disarankan untuk menggunakan `v-if` and `v-for`.</p>
18761876
1877-
- **See also:** [Lifecycle Diagram](../guide/instance.html#Lifecycle-Diagram)
1877+
- **Lihat juga:** [Siklus Hidup Diagram](../guide/instance.html#Lifecycle-Diagram)
18781878
18791879
## Direktif
18801880

0 commit comments

Comments
 (0)