@darkchest/wck 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
- ✅ 支持mounted/onMounted, destroyed/unmounted/onUnmounted生命周期
|
|
39
39
|
|
|
40
40
|
### 关于props大小写问题
|
|
41
|
-
由于vue中定义props是允许大小写字母的.而web组件的attributes只允许小写字母(包含中划线), 所以当我们在vue组件中定义一个带有大写字母的属性时(例如appTitle),
|
|
41
|
+
由于vue中定义props是允许大小写字母的.而web组件的attributes只允许小写字母(包含中划线), 所以当我们在vue组件中定义一个带有大写字母的属性时(例如appTitle), 在@darkchest/wck插件将它转成web组件后, 插件会自动在web组件中声明apptitle, app-title两种形式(纯小写形式和小写中划线形式)的属性来映射appTitle这个vue组件属性, 所以当我们在使用web组件时, 可以直接在html上使用全小写的属性名来设置组件的默认属性值:
|
|
42
42
|
```html
|
|
43
43
|
<todo-list id="demo1" apptitle="*我的清单*"></todo-list>
|
|
44
44
|
<todo-list id="demo2" app-title="*我的清单*"></todo-list>
|