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
* Link to custom-elements-everywhere.com (vuejs#2039)
The site <https://custom-elements-everywhere.com> runs a suite of tests against a framework to
identify interoperability issues, and highlight potential fixes already implemented in other frameworks.
This is a great way to give more confidence while choosing Vue.
* Updated Nuxtent link (vuejs#2041)
* Fix wrong statement about arrow function and bound this (vuejs#2040)
* Fix wrong statement about arrow function and bound this
Stating that arrow functions are bound to it's parent `this` is wrong, arrow functions does not have a `this` at all. More: https://twitter.com/getify/status/1101521219243966466
* Update src/v2/guide/instance.md
Co-Authored-By: KadoBOT <ricardo.ambrogi@gmail.com>
* Update instance.md
Remove unnecessary `a`
* translate filters
* fix translate filters
* update translate filters
Copy file name to clipboardExpand all lines: src/v2/cookbook/serverless-blog.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -298,7 +298,7 @@ created() {
298
298
299
299
## Alternative Patterns
300
300
301
-
An alternative pattern to consider, especially if you prefer writing only in Markdown, is using something like [Nuxtent](https://nuxtent.now.sh/guide/writing#async-components). Nuxtent allows you to use `Vue Component` inside of Markdown files. This approach would be akin to a static site approach (i.e. Jekyll) where you compose your blog posts in Markdown files. Nuxtent adds a nice integration between Vue.js and Markdown allowing you to live in a 100% Vue.js world.
301
+
An alternative pattern to consider, especially if you prefer writing only in Markdown, is using something like [Nuxtent](https://nuxtent-module.netlify.com/guide/writing/#async-components). Nuxtent allows you to use `Vue Component` inside of Markdown files. This approach would be akin to a static site approach (i.e. Jekyll) where you compose your blog posts in Markdown files. Nuxtent adds a nice integration between Vue.js and Markdown allowing you to live in a 100% Vue.js world.
Copy file name to clipboardExpand all lines: src/v2/guide/filters.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
---
2
-
title: Filters
2
+
title: Filter
3
3
type: guide
4
4
order: 305
5
5
---
6
6
7
-
Vue.js allows you to define filters that can be used to apply common text formatting. Filters are usable in two places: **mustache interpolations and`v-bind` expressions** (the latter supported in 2.1.0+). Filters should be appended to the end of the JavaScript expression, denoted by the "pipe" symbol:
7
+
Vue.js memungkinkan Anda untuk menentukan filter yang dapat digunakan untuk memformat tulisan. Filter dapat digunakan di dua tempat: **interpolasi mustache dan ekspresi`v-bind`** (terakhir didukung di 2.1.0+). Filter harus ditambahkan di akhir ekspresi JavaScript dengan simbol "pipe" ( | ):
8
8
9
9
```html
10
-
<!--in mustaches -->
10
+
<!--di mustaches -->
11
11
{{ message | capitalize }}
12
12
13
-
<!--in v-bind -->
13
+
<!--di v-bind -->
14
14
<divv-bind:id="rawId | formatId"></div>
15
15
```
16
16
17
-
You can define local filters in a component's options:
17
+
Anda dapat menentukan filter lokal dalam opsi komponen:
18
18
19
19
```js
20
20
filters: {
@@ -26,7 +26,7 @@ filters: {
26
26
}
27
27
```
28
28
29
-
or define a filter globally before creating the Vue instance:
29
+
atau menentukan filter secara global sebelum membuat Vue instance:
30
30
31
31
```js
32
32
Vue.filter('capitalize', function (value) {
@@ -40,7 +40,7 @@ new Vue({
40
40
})
41
41
```
42
42
43
-
Below is an example of our `capitalize`filter being used:
43
+
Di bawah ini adalah contoh dari filter `capitalize`yang kami gunakan:
44
44
45
45
{% raw %}
46
46
<divid="example_1"class="demo">
@@ -66,20 +66,20 @@ Below is an example of our `capitalize` filter being used:
66
66
</script>
67
67
{% endraw %}
68
68
69
-
The filter's function always receives the expression's value (the result of the former chain) as its first argument. In the above example, the`capitalize`filter function will receive the value of `message`as its argument.
69
+
Filter selalu menerima nilai ekspresi (hasil dari rantai sebelumnya) sebagai argumen pertama. Dalam contoh di atas, filter`capitalize`akan menerima nilai `message`sebagai argumen.
70
70
71
-
Filters can be chained:
71
+
Filter bisa berantai:
72
72
73
73
```html
74
74
{{ message | filterA | filterB }}
75
75
```
76
76
77
-
In this case, `filterA`, defined with a single argument, will receive the value of `message`, and then the `filterB`function will be called with the result of `filterA`passed into `filterB`'s single argument.
77
+
Pasa kasus ini, `filterA`, didefinisikan dengan satu argumen, yang akan menerima nilai `message`, kemudian `filterB`akan dipanggil dengan hasil dari `filterA`yang akan dilanjutkan ke `filterB` sebagai satu argumen.
78
78
79
-
Filters are JavaScript functions, therefore they can take arguments:
79
+
Filter adalah fungsi JavaScript, oleh karena itu mereka dapat mengambil argumen:
80
80
81
81
```html
82
82
{{ message | filterA('arg1', arg2) }}
83
83
```
84
84
85
-
Here `filterA`is defined as a function taking three arguments. The value of `message`will be passed into the first argument. The plain string `'arg1'`will be passed into the`filterA`as its second argument, and the value of expression `arg2`will be evaluated and passed in as the third argument.
85
+
Di sini `filterA`didefinisikan sebagai fungsi yang mengambil tiga argumen. Nilai `message`yang akan dilanjutkan ke argumen pertama. String `'arg1'`yang akan di lanjutkan ke`filterA`sebagian argumen kedua, dan nilai dari ekspresi `arg2`akan dievaluasi dan diteruskan sebagai argumen ketiga.
Copy file name to clipboardExpand all lines: src/v2/guide/index.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -393,6 +393,8 @@ You may have noticed that Vue components are very similar to **Custom Elements**
393
393
394
394
2. Vue components provide important features that are not available in plain custom elements, most notably cross-component data flow, custom event communication and build tool integrations.
395
395
396
+
Although Vue doesn't use custom elements internally, it has [great interoperability](https://custom-elements-everywhere.com/#vue) when it comes to consuming or distributing as custom elements. Vue CLI also supports building Vue components that register themselves as native custom elements.
397
+
396
398
## Ready for More?
397
399
398
400
We've briefly introduced the most basic features of Vue.js core - the rest of this guide will cover them and other advanced features with much finer details, so make sure to read through it all!
0 commit comments