1.0.0 • Published 3 years ago

gfee-ui v1.0.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

gfee-ui UI 组件库

基于 Element UI 的 UI 组件库。

安装

npm install gfee-ui -S or yarn add gfee-ui

建议使用 yarn 安装

文档

npm run docs

你可以在本地开发的同时,编写文档。

按需引入

  • npm install babel-plugin-import --save-dev
  • 配置 babel.config.js
module.exports = {
  plugins: [
    [
      'import',
      {
        libraryName: 'gfee-ui',
        style: true,
      },
    ],
  ],
};
  • 引入
import { Button } from "gfee-ui";
Vue.use(Button);

新组件添加

  • 在 src/packages 内新建文件夹,以组件名为文件夹名称
  • 将组件内部 css 抽离出来,放入 index.css(less/sass)中,index.css 放在文件夹根目录
  • 新建 src 目录,组件放入 src 目录中
  • 新建 index.js,引入 src 目录组件并导出
  • 新建 README.md 作为组件说明
  • 在 components.json 把组件添加进去
  • 执行 npm run build 构建