2.0.0 • Published 10 months ago

yygongzilib-components v2.0.0

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

Components

公用组件模块

该模块存储的是各模块需要使用的基础组件或者公用组件,要求组件内不包含单一业务逻辑, 所有props要求设置default

组件开发要求

组件位置

/lib/

文件结构要求

  1. 组件必须包含在组件文件夹内, 例如customButton组件位于/lib/custom-button/
  2. 组件入口统一为 index.vue
  3. 组件目录下暂时手动创建style.css空文件

vue组件

  1. 组件必须填写正确name
  2. 组件内props必须设置default值

组件引用

按需引用

  1. 需要引入基础组件的模块首先需要加载按需处理插件
pnpm install babel-plugin-component -r --filter packages-name
  1. 引入注册
import {customButton} from 'yygongzilib-components';

export default {
    components: {
        customButton,
    },
}