Skip to content

Commit c32ac18

Browse files
committed
v-bind .camel modifier
NOTE: pick up from 5d853b421f416686fa18806819718eb564e70905
1 parent 40e1b71 commit c32ac18

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/v2/api/index.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,8 @@ type: api
14801480
- **引数:** `attrOrProp (任意)`
14811481

14821482
- **修飾子:**
1483-
- `.prop` - DOM 属性のバインディングに対して使用されます。
1483+
- `.prop` - 属性の代わりに DOM プロパティとして束縛します。([違いは何?](http://stackoverflow.com/questions/6003819/properties-and-attributes-in-html#answer-6004028))
1484+
- `.camel` - ケバブケースの属性名をキャメルケースにに変換します (2.1.0 からサポート)
14841485

14851486
- **使用方法:**
14861487

@@ -1523,6 +1524,14 @@ type: api
15231524
<svg><a :xlink:special="foo"></a></svg>
15241525
```
15251526

1527+
`.camel` 修飾子はDOM 内のテンプレートを使用するときに、`v-bind` 属性名をキャメル化することを可能にします。e.g. SVG の `viewBox` 属性:
1528+
1529+
``` html
1530+
<svg :view-box.camel="viewBox"></svg>
1531+
```
1532+
1533+
文字列テンプレートを使用している場合や、`vue-loader` / `vueify` でコンパイルしている場合は `.camel` は必要ありません。
1534+
15261535
- **参照:**
15271536
- [クラスとスタイルバインディング](../guide/class-and-style.html)
15281537
- [コンポーネント - プロパティ](../guide/components.html#プロパティ)

0 commit comments

Comments
 (0)