Skip to content

Commit 4054771

Browse files
isatriomazipan
authored andcommitted
Merge someone contribution (vuejs#49)
* Translate to ID * Index page vuejs * translate to Indonesian * Add new line to explain how to do pull request * Add files via upload * memperbaiki beberapa typo di readme.md * Terjemah ke Indonesia * Translated menu,sponsor and half installation page * Just for testing * Merge stash * Change Request
1 parent e4b87a3 commit 4054771

20 files changed

+267
-265
lines changed

CONTRIBUTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Beberapa panduan yang harus diikuti bila ingin ikut berkontribusi pada proses pe
1515
+ Setiap halaman akan memiliki *issue* tersendiri, jika *issue* tersebut belum di *assign* ke seseorang berarti belum ada yang mengerjakan halaman tersebut.
1616
+ Silakan tambahkan komentar pada *issue* dari halaman yang ingin Anda kerjakan. Pastikan mention salah satu pengurus. Mas [@mul14](https://github.com/mul14), [@nusendra](https://github.com/nusendra) atau [@mazipan](https://github.com/mazipan) untuk *assign* *issue* tersebut.
1717
+ Branch yang menjadi panduan adalah branch `master`, tapi mungkin akan terjadi ketertinggalan dari branch `master` yang ada di repositori [vuejs/vuejs.org](https://github.com/vuejs/vuejs.org) karenanya kami lebih menyarankan untuk mengambil base dari branch `english-version`.
18-
+ Buat branch dari base branch dengan nama halaman yang kalian terjemahkan, misalkan `introduction`. Bila belum mengerti bagaimana membuat branch silakan baca artikel https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
18+
+ Buat branch dari base branch dengan nama halaman yang kalian terjemahkan, misalkan `introduction`. Bila belum mengerti bagaimana membuat branch silakan baca artikel [https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/)
1919
+ Setelah selesai menerjemahkan, silakan buat Pull Request ke branch `master` pada repositori ini.
2020
+ Para pengurus dan teman-teman lain akan membantu melakukan review pada Pull Request kalian, bila semuanya sudah bagus maka dengan segera bisa di `merge` ke branch `master`.
2121

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
# 🇮🇩 Dokumentasi resmi Vue.js dalam Bahasa Indonesia
22

3-
Halaman ini dibuat menggunakan [hexo](http://hexo.io/). Konten ditulis menggunakan Markdown dan diletakkan pada direktori `src`. *Pull requests* Anda sangat kami tunggu!
3+
Halaman ini dibuat menggunakan [hexo](http://hexo.io/). Konten ditulis menggunakan _Markdown_ dan diletakkan pada direktori `src`. _*Pull requests*_ Anda sangat kami tunggu!
44

55
## Website
66

7-
Dokumentasi bisa diakses di halaman website [http://docs.vuejs.id](http://docs.vuejs.id)
7+
Dokumentasi bisa diakses di halaman web situs [http://docs.vuejs.id](http://docs.vuejs.id)
88

99
## Proses Development
1010

1111
Jika anda menggunakan NPM
1212
``` bash
13+
# npm
1314
$ npm install
14-
$ npm start # dev server at http://localhost:4000
15+
$ npm start # dev server di http://localhost:4000
16+
17+
# yarn
18+
$ yarn
19+
$ yarn start # dev server di http:://localhost:4000
1520
```
1621

1722
Jika anda menggunakan Yarn
@@ -22,11 +27,11 @@ $ yarn start # dev server at http://localhost:4000
2227

2328
## Kontribusi
2429

25-
Silahkan lihat di halaman [Panduan Berkontribusi](CONTRIBUTION.md)
30+
Silakan lihat di halaman [Panduan Berkontribusi](CONTRIBUTION.md)
2631

2732
## Progres
2833

29-
Silahkan lihat di halaman [Milestone](https://github.com/vuejs-id/docs/milestones) dan [Issues](https://github.com/vuejs-id/docs/issues).
34+
Silakan lihat di halaman [Milestone](https://github.com/vuejs-id/docs/milestones) dan [Issues](https://github.com/vuejs-id/docs/issues).
3035

3136
----
3237

src/_posts/011-component.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
---
2-
title: 0.11 Component Tips
3-
date: 2014-12-08 15:02:14
4-
tags:
5-
---
6-
7-
<p class="tip">Note: this post contains information for the outdated 0.11 version. Please refer to the [0.12 release notes](https://github.com/yyx990803/vue/releases) for the changes in the API.</p>
8-
9-
The release of 0.11 introduced [many changes](https://github.com/yyx990803/vue/blob/master/changes.md), but the most important one is how the new component scope works. Previously in 0.10.x, components have inherited scope by default. That means in a child component template you can reference parent scope properties. This often leads to tightly-coupled components, where a child component assumes knowledge of what properties are present in the parent scope. It is also possible to accidentally refer to a parent scope property in a child component.
10-
11-
<!-- more -->
12-
13-
### Isolated Scope and Data Passing
14-
15-
Starting in 0.11, all child components have isolated scope by default, and the recommended way to control component data access is via [Explicit Data Passing](/guide/components.html#Explicit_Data_Passing) using [`v-with`](/api/directives.html#v-with) or [`paramAttributes`](/api/options.html#paramAttributes).
16-
17-
`paramAttributes` enables us to write Web Component style templates:
18-
19-
``` js
20-
Vue.component('my-component', {
21-
paramAttributes: ['params'],
22-
compiled: function () {
23-
console.log(this.params) // passed from parent
24-
}
25-
})
26-
```
27-
28-
``` html
29-
<my-component params="{{params}}"></my-component>
30-
```
31-
32-
### Where Does It Belong?
33-
34-
Previously in 0.10, all directives on a component's container element are compiled in the child component's scope. Because it inherited parent scope, this worked in most situations. Starting in 0.11.1, we want to provide a cleaner separation between component scopes. The rule of thumbs is: if something appears in the parent template, it will be compiled in parent scope; if it appears in child template, it will be compiled in child scope. For example:
35-
36-
``` html
37-
<!-- parent template -->
38-
<div v-component="child" v-on="click:onParentClick">
39-
<p>{{parentMessage}}</p>
40-
</div>
41-
```
42-
43-
``` html
44-
<!-- child template, with replace: true -->
45-
<div v-on="click:onChildClick">
46-
<h1>{{childMessage}}</h1>
47-
<content></content>
48-
</div>
49-
```
50-
51-
Everything in the parent template will be compiled in the parent's scope, including the content that's going to be inserted into the child component.
52-
53-
The only exception to the rule is `v-with` (and `paramAttributes` which compiles down to `v-with`), which works in both places - so you don't need to worry about it too much.
54-
55-
### Cleaner Event Communication
56-
57-
Previously the standard way for a child component to communicate to its parent is via dispatching events. However, with this approach, the event listeners on the parent component are not guaranteed to be listening on the desired child component only. It's also possible to trigger undesired listeners further up the chain if we do not cancel the event.
58-
59-
The most common use case is for a parent to react to the events from a specific, direct child component. So in 0.11.4, [a new directive `v-events`](/api/directives.html#v-events) has been introduced to enable exactly this behavior.
60-
61-
0.11.4 has already been released, go try it out!
1+
---
2+
title: 0.11 Component Tips
3+
date: 2014-12-08 15:02:14
4+
tags:
5+
---
6+
7+
<p class="tip">Note: post ini berisi informasi untuk versi lama 0.11. Silahkan lihat [0.12 release notes](https://github.com/yyx990803/vue/releases) untuk melihat perubahan pada API.</p>
8+
9+
Perilisan dari 0.11 memperkenalkan [banyak perubahan](https://github.com/yyx990803/vue/blob/master/changes.md), tapi yang paling penting adalah bagaimana cara ruang lingkup komponen baru bekerja. Sebelumnya di 0.10.x, komponen mempunyai ruang linkup yang diwariskan sebagai settingan awal. Itu berarti di sebuah template child komponen kalian bisa menghubungkan properti ruang lingkup parent. Ini biasanya berakhir pada komponen dengan hubungan erat, dimana child komponen mengira-ngira pengetahuan dari properti apa yang ada di ruang lingkup parent. Ada juga kemungkinan untuk properti ruang lingkup parent tidak sengaja merujuk di komponen child.
10+
11+
<!-- lebih banyak -->
12+
13+
### Isolasi Ruang Lingkup dan Pengiriman Data
14+
15+
Dimulai di 0.11, semua komponen child punya ruang lingkup terisolasi sebagai settingan awal, dan cara yang disarankan untuk mengendalikan kompenen akses data adalah lewat [Pengiriman Data Jelas](/guide/components.html#Explicit_Data_Passing) menggunakan [`v-with`](/api/directives.html#v-with) atau [`paramAttributes`](/api/options.html#paramAttributes).
16+
17+
`paramAttributes` memperbolehkan kita untuk menulis template komponen tampilan web:
18+
19+
``` js
20+
Vue.component('my-component', {
21+
paramAttributes: ['params'],
22+
compiled: function () {
23+
console.log(this.params) // diwariskan dari parent
24+
}
25+
})
26+
```
27+
28+
``` html
29+
<my-component params="{{params}}"></my-component>
30+
```
31+
32+
### Darimana Asalnya?
33+
34+
Sebelumnya di 0.10, semua arahan pada elemen wadah komponen dikompilasi di komponen ruang lingkup child. Karena mewariskan ruang lingkup parent, hal ini sering bekerja di beberapa situasi. Dimulai di 0.11.1, kita ingin menyediakan pemisahan yang lebih rapi antara komponen ruang lingkup. Peraturan thumbs adalah: jika sesuatu muncul di template parent, itu akan dikompilasi di ruang lingkup parent; jika itu muncul di template child, itu akan dikompilasi di ruang lingkup child. Sebagai contoh:
35+
36+
``` html
37+
<!-- template parent -->
38+
<div v-component="child" v-on="click:onParentClick">
39+
<p>{{Pesanparent}}</p>
40+
</div>
41+
```
42+
43+
``` html
44+
<!-- template child, dengan pergantian: true -->
45+
<div v-on="click:onChildClick">
46+
<h1>{{Pesanchild}}</h1>
47+
<content></content>
48+
</div>
49+
```
50+
51+
Segala hal yang ada di template parent akan dikompilasi di ruang lingkup parent, termasuk konten yang akan dimasukkan ke dalam komponen child.
52+
53+
Satu-satunya pengecualian pada peraturannya adalah `v-with` (dan `paramAttributes` yang dikompilasi menjadi `v-with`), dimana bekerja di kedua tempat - jadi kalian tidak perlu terlalu mencemaskannya.
54+
55+
### Komunikasi Event yang Lebih Rapi
56+
57+
Sebelumnya cara standar untuk sebuah komponen child untuk berkomunikasi dengan parent adalah lewat event pelepasan. Namun, dengan cara ini, pendengar event di komponen parent tidak terjamin untuk hanya mendengarkan komponen child yang diinginkan. Dan juga berkemungkinan untuk memicu pendengar yang tidak diinginkan masuk lebih dalam jika kita tidak membatalkan the event.
58+
59+
Kasus penggunaan yang paling umum adalah untuk parent bereaksi ke events dari sebuah spesifik, komponen child langsung. Jadi di 0.11.4, [arahan baru `v-events`](/api/directives.html#v-events) telah diperkenalkan untuk mengaktifkan perilaku ini.
60+
61+
0.11.4 sudah rilis, cobalah!

0 commit comments

Comments
 (0)