We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3e8252 commit 7666a54Copy full SHA for 7666a54
src/v2/guide/filters.md
@@ -1,6 +1,6 @@
1
---
2
title: フィルター
3
-updated: 2017-12-03
+updated: 2018-01-30
4
type: guide
5
order: 305
6
@@ -27,14 +27,18 @@ filters: {
27
}
28
```
29
30
-もしくはグローバルでフィルタを定義することもできます:
+もしくは Vue インスタンスを作成する前にグローバルでフィルタを定義することもできます:
31
32
``` js
33
Vue.filter('capitalize', function (value) {
34
if (!value) return ''
35
value = value.toString()
36
return value.charAt(0).toUpperCase() + value.slice(1)
37
})
38
+
39
+new Vue({
40
+ // ...
41
+})
42
43
44
以下は `capitalize` フィルタの使用例です。
0 commit comments