0.1.17 • Published 10 months ago

@crh-fe/ygd-components v0.1.17

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

快速上手

注意事项

1、组件名需为[组件库标识]-组件名称
例如你开发了一个login-form表单组件,你的项目组件库标识为cui,那么你的组件名称应该为cui-login-form
2、开发组件的css样式必须创建一个index.less来放置。
3、如果组件内部下props已经有默认值,index.jsonattrs下的 value 可以不设置,否则这个默认值不会生效。

组件:
props: {
    value: {
        type: String,
        default: "默认文案"
    }
}

json配置文件:
attrs: [
    {
        "type": "input",
        "title": "标题",
        "key": "title"
    },
]

4、组件样式的两种写法:
第一种:单独写在index.less文件下。
第二种:写在index.vue内,但是必须加上scoped属性。

如何开发

1. npm 安装 @crh-fe/codease-cli 脚手架

npm install @crh-fe/codease-cli -g

2. 使用 codease init 命令初始化项目,绑定资源库

codease init

2. 安装依赖

<!-- npm方式 -->
npm i
<!-- yarn方式 -->
yarn
<!-- pnpm方式 -->
pnpm i

3. 运行项目

npm run dev

4. 开发项目

5. 使用命令进行打包上传

codease publish

组件库文档站点打包

npm run build-site
0.1.17

10 months ago

0.1.10

10 months ago

0.1.11

10 months ago

0.1.12

10 months ago

0.1.13

10 months ago

0.1.14

10 months ago

0.1.15

10 months ago

0.1.16

10 months ago

0.1.9

12 months ago

0.1.8

12 months ago

0.1.7

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago