yygongzilib-components
v2.0.0
Published
## 公用组件模块
Downloads
2
Readme
Components
公用组件模块
该模块存储的是各模块需要使用的基础组件或者公用组件,要求组件内不包含单一业务逻辑, 所有props要求设置default
组件开发要求
组件位置
/lib/
文件结构要求
- 组件必须包含在组件文件夹内, 例如customButton组件位于
/lib/custom-button/
- 组件入口统一为
index.vue
- 组件目录下暂时手动创建style.css空文件
vue组件
- 组件必须填写正确name
- 组件内props必须设置default值
组件引用
按需引用
- 需要引入基础组件的模块首先需要加载按需处理插件
pnpm install babel-plugin-component -r --filter packages-name
- 引入注册
import {customButton} from 'yygongzilib-components';
export default {
components: {
customButton,
},
}