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
Support for the [inline-template feature](https://vuejs.org/v2/guide/components-edge-cases.html#Inline-Templates)has been removed.
10
+
Dukungan untuk [fitur inline-template](https://vuejs.org/v2/guide/components-edge-cases.html#Inline-Templates)telah dihapuskan.
11
11
12
-
## 2.x Syntax
12
+
## 2.x Sintaksis
13
13
14
-
In 2.x, Vue provided the`inline-template`attribute on child components to use its inner content as its template instead of treating it as distributed content.
14
+
Di 2.x, Vue menyediakan atribut`inline-template`pada komponen anak/turunan. Komponen turunan ini menggunakan konten didalamnya sebagai templat komponen daripada memperlakukannya sebagai konten terdistribusi.
15
15
16
16
```html
17
17
<my-componentinline-template>
@@ -22,27 +22,27 @@ In 2.x, Vue provided the `inline-template` attribute on child components to use
22
22
</my-component>
23
23
```
24
24
25
-
## 3.x Syntax
25
+
## 3.x Sintaksis
26
26
27
-
This feature will no longer be supported.
27
+
Fitur ini tidak lagi didukung
28
28
29
-
## Migration Strategy
29
+
## Strategi dalam Migrasi
30
30
31
-
Most of the use cases for `inline-template`assumes a no-build-tool setup, where all templates are written directly inside the HTML page.
31
+
Banyak penggunaan `inline-template`diasumsikan menggunakan sebuah no-build-tool, dimana semua templat ditulis langsung ke dalam halaman HTML.
The most straightforward workaround in such cases is using`<script>`with an alternative type:
37
+
Cara paling mudah adalah dalam kasus ini adalah menggunakan`<script>`dengan tipe alternatif:
38
38
39
39
```html
40
40
<scripttype="text/html"id="my-comp-template">
41
41
<div>{{ hello }}</div>
42
42
</script>
43
43
```
44
44
45
-
And in the component, target the template using a selector:
45
+
Dan dalam komponen, target templat tersebut menggunakan sebuah selector:
46
46
47
47
```js
48
48
constMyComp= {
@@ -51,11 +51,11 @@ const MyComp = {
51
51
}
52
52
```
53
53
54
-
This doesn't require any build setup, works in all browsers, is not subject to any in-DOM HTML parsing caveats (e.g. you can use camelCase prop names), and provides proper syntax highlighting in most IDEs. In traditional server-side frameworks, these templates can be split out into server template partials (included into the main HTML template) for better maintainability.
54
+
Opsi ini tidak memerlukan suatu build setup, bekerja di semua peramban, bukan subjek dari suatu in-DOM HTML parsing caveats (contoh Anda dapat menggunakan camelCase pada penamaan prop), dan memberikan sorotan sintaksis yang benar pada kebanyakan IDEs. Pada kerangka kerja sisi-peladen tradisional, template ini dapat dipisah menjadi partisi templat peladen (termasuk templat HTML utama) agar mempermudah dalam pemeliharaan.
55
55
56
-
### Option#2: Default Slot
56
+
### Pilihan#2: Default Slot
57
57
58
-
A component previously using`inline-template`can also be refactored using the default slot - which makes the data scoping more explicit while preserving the convenience of writing child content inline:
58
+
Komponen yang sebelumnya menggunakan`inline-template`juga dapat direfaktor menggunakan default slot - Yang mana membuat jangkauan data menjadi lebih jelas sementara menjaga kemudahanan dalam menulis konten anak secara inline:
59
59
60
60
```html
61
61
<!-- 2.x Syntax -->
@@ -69,7 +69,7 @@ A component previously using `inline-template` can also be refactored using the
69
69
</my-comp>
70
70
```
71
71
72
-
The child, instead of providing no template, should now render the default slot\*:
72
+
Anak tersebut, daripada menyediakan templat kosong, sekarang seharusnya menampilkan default slot\*:
73
73
74
74
```html
75
75
<!--
@@ -81,4 +81,4 @@ The child, instead of providing no template, should now render the default slot\
81
81
</template>
82
82
```
83
83
84
-
> -Note: In 3.x, slots can be rendered as the root with native [fragments](/guide/migration/fragments) support!
84
+
> -Catatan: di 3.x, slots juga dapat ditampilkan sebagai root bersamaan dengan dukungan native [fragments](/guide/migration/fragments)!
0 commit comments