@wya/vc
基于
Vue@2.x的组件库移步@wya/vc
TODO
- 文档建设
- 测试用例覆盖(目前测试用例来自Vue2.x未做修改)
- 适配TS,编译
- 主题建设
注意
getCurrentInstance()以下统一叫instance
defineComponent有助于IDE检查TS(包括Mixin也需要)instance.ctx.$xxx: Vue2类似相关this.$xxx, 如可以使用ctx.$forceUpdate()(vite build时,不存在了, 不明未细查?)instance.ctx.$el与instance.vnode.el相同(前者在vite build的时候undefined, 不明未细查?)instance.parent可以寻找到父层@click事件作为函数使用的两种方式instance.vnode.props: 其中含事件如onClick, 可以将事件转化为函数使用inheritAttrs: false:onClick可以在attrs中获取当函数使用css和style在vue3中需要自行绑定,不存在响应式- 其他值和样式转为响应式:使用
hooks/use-attrs
约定
语法检查
- ESLint检查无报错
- TS类型检查无报错
类型使用
import type { Ref } from 'vue'import type { xxx } from './types'
provide
provide('[组件名]', {
// 当前组件的props,
props,
// 其他需要传递的字段
[key: string]: https://github.com/wya-team/wya-vc.next/blob/HEAD/any
})
hooks 钩子相关
这里指单独未PC和Mobile组件提取hooks时,非公共hooks
- 使用
instance获取props和其他值(这个时候需要自行编写Props类型)
组件字段名统一
- TODO
Related Packages
@wya/assist-vc
1,511
0
Version History
| Version | Released | License |
|---|---|---|
| 2.1.1 | MIT | |
| 2.0.29 | MIT | |
| 2.0.28 | MIT | |
| 2.0.27 | MIT | |
| 2.0.26 | MIT | |
| 2.0.25 | MIT | |
| 2.0.24 | MIT | |
| 2.0.23 | MIT | |
| 2.0.22 | MIT | |
| 2.0.21 | MIT | |
| 2.0.20 | MIT | |
| 2.0.19 | MIT | |
| 2.0.18 | MIT | |
| 2.0.17 | MIT | |
| 2.0.16 | MIT | |
| 2.0.15 | MIT | |
| 2.0.14 | MIT | |
| 2.0.13 | MIT | |
| 2.0.12 | MIT | |
| 2.0.11 | MIT | |
| 2.0.10 | MIT | |
| 2.0.9 | MIT | |
| 2.0.8 | MIT | |
| 2.0.7 | MIT | |
| 2.0.6 | MIT | |
| 2.0.5 | MIT | |
| 2.0.4 | MIT | |
| 2.0.3 | MIT | |
| 2.0.2 | MIT | |
| 2.0.1 | MIT |
Showing the latest 30 of 326. See every release on npm
Pre-releases (250)
| Version | Released | License |
|---|---|---|
| 3.0.0-alpha.113 | MIT | |
| 3.0.0-alpha.112 | MIT | |
| 3.0.0-alpha.111 | MIT | |
| 3.0.0-alpha.110 | MIT | |
| 3.0.0-alpha.109 | MIT | |
| 3.0.0-alpha.108 | MIT | |
| 3.0.0-alpha.107 | MIT | |
| 3.0.0-alpha.106 | MIT | |
| 3.0.0-alpha.105 | MIT | |
| 3.0.0-alpha.104 | MIT | |
| 3.0.0-alpha.103 | MIT | |
| 3.0.0-alpha.102 | MIT | |
| 3.0.0-alpha.101 | MIT | |
| 3.0.0-alpha.100 | MIT | |
| 3.0.0-alpha.99 | MIT | |
| 3.0.0-alpha.98 | MIT | |
| 3.0.0-alpha.97 | MIT | |
| 3.0.0-alpha.96 | MIT | |
| 3.0.0-alpha.95 | MIT | |
| 3.0.0-alpha.94 | MIT | |
| 3.0.0-alpha.93 | MIT | |
| 3.0.0-alpha.92 | MIT | |
| 3.0.0-alpha.91 | MIT | |
| 3.0.0-alpha.90 | MIT | |
| 3.0.0-alpha.89 | MIT | |
| 3.0.0-alpha.88 | MIT | |
| 3.0.0-alpha.87 | MIT | |
| 3.0.0-alpha.86 | MIT | |
| 3.0.0-alpha.85 | MIT | |
| 3.0.0-alpha.84 | MIT |
Showing the latest 30 of 250. See every release on npm