GithubHelp home page GithubHelp logo

lemonadeccc / seven-bit-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aiai0603/seven-bit-ui

0.0 0.0 0.0 489 KB

Shell 0.06% JavaScript 6.41% TypeScript 25.31% CSS 16.75% Vue 25.17% Less 26.30%

seven-bit-ui's Introduction

SEVEN-BIT-UI

基于seven-bit-ui的综合 Vue UI 组件库

安装使用

可以用 npm 安装seven-bit-ui

// 使用 npm
npm install [email protected]

// 使用 pnpm
pnpm install [email protected]

运行项目

  1. 安装依赖
pnpm install
  1. 运行预览界面查看已经有的组件
pnpm run exm:dev
  1. 运行测试
pnpm run test       //运行所有测试文件
pnpm run coverage   //覆盖率测试

开发

目录结构

.
|--.husky
|--examples
|    |--components
|    |--app.vue        //组件测试
|    ..
|--packages
|    |--components
|    |    |--src       //组件
|    |    |    |--sbAlert
|    |    |    |    |--__alert__             //测试文件
|    |    |    |    |--style/.less           //css
|    |    |    |    |--index
|    |    |    |    |--sbAlert.vue            //组件
|    |    |    |    |--types.ts               //interface及相关const定义
|    |    |    |--index.ts                    //暴露
|    |    |    ...
|    |    ...
|    |--eslint-config
|    |--utils
|    ...
...

新建自己的组件

  1. 在 packages / components / src 目录下新建文件夹
  2. 命名为 sbXxx (例如 sbLink)
  3. 按照 sbButton 目录的结构新建内容
  4. 样式放在 styles 文件夹、内容请放在 sbXxx.vue 、传值请放在 types.ts
  5. 新建 index.ts 导出所编写的组件,install 部分同其他
  6. 在 src/index.ts 全局导出组件,在 components 数组和 export { } 都加入所写组件
  7. 编写一个 __xxx__ 文件夹,将测试代码编写在其中
  8. 可以在 examples/app.vue 里直接添加所写组件进行测试(已自动同步)

开发规范

  1. 命名所写组件为 sbXxx (例如 sbLink)
  2. 所有样式以 sb-xxx-后缀 的形式或者 is-xxx 来命名
  3. 可以使用以下的方式来检查代码规范
pnpm run lint:eslint //eslint 检查
pnpm run lint:fix    //eslint 自动修复,注意只能修复部分内容
pnpm run lint:prettier   //prettier 检查
pnpm run lint:css    //样式文件检查

贡献代码

  1. Fork 源仓库到本地
  2. 完成代码编写
  3. 暂存所编写所有代码
  4. 使用 pnpm commit 提交代码,请按照要求填写 (类型,简要说明,详细说明等等)
  5. 给源仓库提交 PR

seven-bit-ui's People

Contributors

aiai0603 avatar lemonadeccc avatar ox4f5da2 avatar wkif avatar bhdgogogo avatar liuqin-gentle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.