Skip to content

Commit 9fb90c2

Browse files
alfattamazipan
authored andcommitted
Translate Options/DOM (vuejs#152)
1 parent 1c53ebe commit 9fb90c2

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/v2/api/index.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -709,25 +709,25 @@ type: api
709709

710710
- **Lihat juga:** [Instance Methods / Data - vm.$watch](#vm-watch)
711711

712-
## Options / DOM
712+
## Opsi / DOM
713713

714714
### el
715715

716716
- **Tipe:** `string | Element`
717717

718-
- **Batasan:** only respected in instance creation via `new`.
718+
- **Batasan:** hanya berlaku pada pembuatan _instance_ melalui `new`.
719719

720720
- **Detail:**
721721

722-
Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector string or an actual HTMLElement.
722+
Berikan _instance_ Vue sebuah elemen DOM yang sudah ada untuk dipasangkan. Ini bisa berupa kata pemilih CSS atau sebuah HTMLElement sesungguhnya.
723723

724-
After the instance is mounted, the resolved element will be accessible as `vm.$el`.
724+
Setelah _instance_ sudah dipasangkan, elemen akan dapat diakses sebagai `vm.$el`.
725725

726-
If this option is available at instantiation, the instance will immediately enter compilation; otherwise, the user will have to explicitly call `vm.$mount()` to manually start the compilation.
726+
Jika opsi ini ada saat pembuatan _instance_, _instance_ akan langsung menjalankan kompilasi; jika tidak, pengguna harus memanggil `vm.$mount()` secara eksplisit untuk menjalankan kompilasi secara manual.
727727

728-
<p class="tip">The provided element merely serves as a mounting point. Unlike in Vue 1.x, the mounted element will be replaced with Vue-generated DOM in all cases. It is therefore not recommended to mount the root instance to `<html>` or `<body>`.</p>
728+
<p class="tip">Elemen yang diberikan hanya menjadi titik pemasangan. Tidak seperti Vue 1.x, elemen yang dipasangkan akan digantikan dengan DOM yang dihasilkan oleh Vue dalam semua kasus. Karena itu tidak disarankan untuk memasangkan instance akar ke `<html>` atau `<body>`.</p>
729729

730-
<p class="tip">If neither `render` function nor `template` option is present, the in-DOM HTML of the mounting DOM element will be extracted as the template. In this case, Runtime + Compiler build of Vue should be used.</p>
730+
<p class="tip">Jika fungsi `render` maupun opsi `template` tidak diberikan, DOM HTML yang di dalam dari elemen DOM yang dipasangkan akan diekstrak sebagai template. Dalam kasus ini, Runtime + Compiler build Vue harus digunakan.</p>
731731

732732
- **Lihat juga:**
733733
- [Lifecycle Diagram](../guide/instance.html#Lifecycle-Diagram)
@@ -739,13 +739,13 @@ type: api
739739

740740
- **Detail:**
741741

742-
A string template to be used as the markup for the Vue instance. The template will **replace** the mounted element. Any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template.
742+
Templat string yang akan digunakan sebagai markup untuk _instance_ Vue. Template akan **menggantikan** elemen yang dipasang. Markup apa pun yang ada di dalam elemen yang dipasang akan diabaikan, kecuali jika slot distribusi konten ada dalam template.
743743

744-
If the string starts with `#` it will be used as a querySelector and use the selected element's innerHTML as the template string. This allows the use of the common `<script type="x-template">` trick to include templates.
744+
Jika kata dimulai dengan `#` itu akan digunakan sebagai querySelector dan menggunakan innerHTML elemen yang dipilih sebagai string template. Ini memungkinkan penggunaan trik umum `<script type =" x-template ">` untuk menyertakan templat.
745745

746-
<p class="tip">From a security perspective, you should only use Vue templates that you can trust. Never use user-generated content as your template.</p>
746+
<p class="tip">Dari perspektif keamanan, Anda hanya boleh menggunakan templat Vue yang dapat Anda percayai. Jangan pernah menggunakan konten yang dibuat pengguna sebagai templat Anda.</p>
747747

748-
<p class="tip">If render function is present in the Vue option, the template will be ignored.</p>
748+
<p class="tip">Jika fungsi _render_ ada dalam opsi Vue, _template_ akan diabaikan.</p>
749749

750750
- **Lihat juga:**
751751
- [Lifecycle Diagram](../guide/instance.html#Lifecycle-Diagram)
@@ -757,27 +757,27 @@ type: api
757757

758758
- **Detail:**
759759

760-
An alternative to string templates allowing you to leverage the full programmatic power of JavaScript. The render function receives a `createElement` method as it's first argument used to create `VNode`s.
760+
Alternatif untuk templat string yang memungkinkan Anda memanfaatkan kekuatan penuh program JavaScript. Fungsi render menerima sebuah metode `createElement` sebagai argumen pertama yang digunakan untuk membuat `VNode`.
761761

762-
If the component is a functional component, the render function also receives an extra argument `context`, which provides access to contextual data since functional components are instance-less.
762+
Jika komponen merupakan sebuah komponen fungsional, fungsi render juga menerima ekstra argumen `context`, yang memberikan aksesk pada data kontekstual karena komponen fungsional tidak memiliki _instance_.
763763

764-
<p class="tip">The `render` function has priority over the render function compiled from `template` option or in-DOM HTML template of the mounting element which is specified by the `el` option.</p>
764+
<p class="tip">Fungsi `render` memiliki prioritas di atas fungsi render yang dikompilasi dari opsi `template` atau templat HTML dalam DOM dari elemen pemasangan yang ditentukan oleh opsi` el`..</p>
765765

766766
- **Lihat juga:** [Render Functions](../guide/render-function.html)
767767

768768
### renderError
769769

770-
> New in 2.2.0+
770+
> Baru di 2.2.0+
771771
772772
- **Tipe:** `(createElement: () => VNode, error: Error) => VNode`
773773

774774
- **Detail:**
775775

776-
**Only works in development mode.**
776+
**Hanya bekerja pada mode pengembangan.**
777777

778-
Provide an alternative render output when the default `render` function encounters an error. The error will be passed to `renderError` as the second argument. This is particularly useful when used together with hot-reload.
778+
Memberikan sebuah keluaran _render_ alternatif ketika fungsi `render` standar menemukan kesalahan. Kesalahan akan diteruskan ke `renderError` sebagai argumen kedua. Ini sangat berguna saat digunakan bersama dengan _hot-reload_.
779779

780-
- **Example:**
780+
- **Contoh:**
781781

782782
``` js
783783
new Vue({

0 commit comments

Comments
 (0)