mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
[Doc] add props name style guide (#366)
This commit is contained in:
@@ -58,3 +58,15 @@ Vue.use(Vant);
|
||||
<!-- import script -->
|
||||
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
||||
```
|
||||
|
||||
### Props Named Style
|
||||
HTML attributes are case-insensitive, so when using non-string templates, camelCased prop names need to use their kebab-case (hyphen-delimited) equivalents.
|
||||
|
||||
``` html
|
||||
<!-- camelCase in JavaScript -->
|
||||
<van-cell isLink />
|
||||
|
||||
<!-- kebab-case in HTML -->
|
||||
<van-cell is-link />
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user