@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.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. 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), 当使用@darkchest/wck插件将它转成web组件后, 插件会自动在web组件中声明apptitle, app-title两种形式(纯小写形式和小写中划线形式)的属性, 所以当我们在使用组件时, 可以直接在html上设置组件的默认属性值:
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkchest/wck",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "@darkchest/wck是一个通过将 Vue 单文件组件 (SFC) 转换为通用的web-component组件的解决方案。",
5
5
  "private": false,
6
6
  "main": "src/index.js",