-
Notifications
You must be signed in to change notification settings - Fork 90
ID Translation of Conditional Rendering page #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/v2/guide/conditional.md
Outdated
|
||
The `v-else-if`, as the name suggests, serves as an "else if block" for `v-if`. It can also be chained multiple times: | ||
`v-else-if`, sesuai namanya, bertindak sebagai "blok else if" untuk `v-if`. Ia juga bisa dirangkai berkali kali: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
berkali-kali, pake dash
src/v2/guide/conditional.md
Outdated
|
||
Vue tries to render elements as efficiently as possible, often re-using them instead of rendering from scratch. Beyond helping make Vue very fast, this can have some useful advantages. For example, if you allow users to toggle between multiple login types: | ||
Vue mencoba me-*render* elemen se-efisien mungkin, Seringkali memakai mereka kembali daripada melakukan *rendering* dari awal. Itulah mengapa Vue sangat cepat, dimana hal ini memiliki banyak manfaat. Sebagai contoh, jika Anda mengizinkan pengguna untuk beralih antar jenis *login*: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seringkali memakai mereka kembali daripada -> lebih seringlah menggunakannya kembali dibandingkan.
Kata setelah koma tidak perlu capital
src/v2/guide/conditional.md
Outdated
</template> | ||
``` | ||
|
||
Then switching the `loginType` in the code above will not erase what the user has already entered. Since both templates use the same elements, the `<input>` is not replaced - just its `placeholder`. | ||
Jadi peralihan `loginType` pada kode di atas tidak akan menghapus apa yang pengguna telah ketikkan. Karena templat keduanya menggunakan elemen yang sama, `<input>` tidak akan ditimpa - hanya bagian `placeholder`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then -> Kemudian bukan Jadi
src/v2/guide/conditional.md
Outdated
|
||
## `v-if` vs `v-show` | ||
|
||
`v-if` is "real" conditional rendering because it ensures that event listeners and child components inside the conditional block are properly destroyed and re-created during toggles. | ||
`v-if` merupakan rendering bersyarat yang "real" sebab ia memastikan bahwa penyimak *event* dan komponen anak di dalam blok kondisional benar benar dihancurkan dan dibuat ulang selama peralihan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
real -> "nyata (real)"
src/v2/guide/conditional.md
Outdated
@@ -117,7 +117,7 @@ new Vue({ | |||
</script> | |||
{% endraw %} | |||
|
|||
This isn't always desirable though, so Vue offers a way for you to say, "These two elements are completely separate - don't re-use them." Add a `key` attribute with unique values: | |||
Hal ini kadang tidak diinginkan, sehingga Vue menawarkan cara bagi Anda yang bilang, "Dua elemen ini sepenuhnya terpisah - Jangan gunakan ulang mereka." Tambahkan sebuah atribut `key` dengan nilai yang unik: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jangan -> gak perlu capital
Done! |
No description provided.