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
+32-32Lines changed: 32 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -1782,99 +1782,99 @@ type: api
1782
1782
</script>
1783
1783
{% endraw %}
1784
1784
1785
-
## Instance Methods / Lifecycle
1785
+
## Instance Methods / Siklus Hidup
1786
1786
1787
1787
### vm.$mount( [elementOrSelector] )
1788
1788
1789
-
- **Arguments:**
1789
+
- **Argumen:**
1790
1790
- `{Element| string} [elementOrSelector]`
1791
1791
- `{boolean} [hydrating]`
1792
1792
1793
-
- **Returns:** `vm` - the instance itself
1793
+
- **Mengembalikan:** `vm` - instansiasi dari dirinya sendiri
1794
1794
1795
-
- **Usage:**
1795
+
- **Penggunaan:**
1796
1796
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.
1798
1798
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.
1800
1800
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.
1802
1802
1803
-
- **Example:**
1803
+
- **Contoh:**
1804
1804
1805
1805
``` js
1806
1806
var MyComponent =Vue.extend({
1807
1807
template:'<div>Hello!</div>'
1808
1808
})
1809
1809
1810
-
//create and mount to #app (will replace #app)
1810
+
//instansiasi dan pemasangan kedalam elemen #app (akan menggantikan #app)
1811
1811
newMyComponent().$mount('#app')
1812
1812
1813
-
//the above is the same as:
1813
+
//kode diatas serupa dengan ini:
1814
1814
newMyComponent({ el:'#app' })
1815
1815
1816
-
//or, render off-document and append afterwards:
1816
+
//atau, me*render* dokumen mati dan menambahkan setelahnya:
- [Siklus Hidup Diagram](../guide/instance.html#Lifecycle-Diagram)
1823
+
- [Proses Render Pada Sisi Server](../guide/ssr.html)
1824
1824
1825
1825
### vm.$forceUpdate()
1826
1826
1827
-
- **Usage:**
1827
+
- **Penggunaan:**
1828
1828
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*.
1830
1830
1831
1831
### vm.$nextTick( [callback] )
1832
1832
1833
-
- **Arguments:**
1833
+
- **Argumen:**
1834
1834
- `{Function} [callback]`
1835
1835
1836
-
- **Usage:**
1836
+
- **Penggunaan:**
1837
1837
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.
1839
1839
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.
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.
1872
1872
1873
-
Triggers the `beforeDestroy`and`destroyed` hooks.
1873
+
Memicu `beforeDestroy`dan`destroyed`*hooks*.
1874
1874
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>
0 commit comments