sda-lib-demo
v0.1.14
Published
## 安装启动
Downloads
122
Readme
SDA2.0 组件库
安装启动
安装依赖
$ yarn
启动项目
$ yarn dev
发布版本
登录 NPM 仓库
$ npm login
修改版本 每次发布前需要更改 package.json version 字段, 提高版本号
发布依赖
发布正式版本
$ npm publish
添加 tag 发布测试版本
$ npm publish --tag=beta
安装测试包
$ npm i <packageName>@beta
组件定义示例
严禁使用 var 定义变量, require 引入文件
import { defineComponent, h, toRef } from 'vue'
export default defineComponent({
name: 'MLabel',
props: {
value: {
type: String,
required: true
}
},
setup(props) {
const label = toRef(props, 'value')
return {
label
}
},
render() {
return h('span', [`${this.label}`])
}
})