Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d853b4

Browse files
v-bind .camel modifier
1 parent 9191673 commit 5d853b4

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
@@ -1493,7 +1493,8 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
14931493
- **Argument:** `attrOrProp (optional)`
14941494

14951495
- **Modifiers:**
1496-
- `.prop` - Used for binding DOM attributes.
1496+
- `.prop` - Bind as a DOM property instead of an attribute. ([what's the difference?](http://stackoverflow.com/questions/6003819/properties-and-attributes-in-html#answer-6004028))
1497+
- `.camel` - transform the kebab-case attribute name into camelCase. (supported since 2.1.0)
14971498

14981499
- **Usage:**
14991500

@@ -1536,6 +1537,14 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
15361537
<svg><a :xlink:special="foo"></a></svg>
15371538
```
15381539

1540+
The `.camel` modifier allows camelizing a `v-bind` attribute name when using in-DOM templates, e.g. the SVG `viewBox` attribute:
1541+
1542+
``` html
1543+
<svg :view-box.camel="viewBox"></svg>
1544+
```
1545+
1546+
`.camel` is not needed if you are using string templates, or compiling with `vue-loader`/`vueify`.
1547+
15391548
- **See also:**
15401549
- [Class and Style Bindings](../guide/class-and-style.html)
15411550
- [Components - Component Props](../guide/components.html#Props)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /