1 | # yi-ui
|
2 |
|
3 | a lightweight ui component for vue2.x
|
4 |
|
5 | [![NPM Version][npm-img]][npm-url]
|
6 | [![Dependencies][david-img]][david-url]
|
7 | [![NPM Download][download-img]][download-url]
|
8 |
|
9 | [npm-img]: http://img.shields.io/npm/v/yi-ui.svg?style=flat-square
|
10 | [npm-url]: http://npmjs.org/package/yi-ui
|
11 | [david-img]: https://img.shields.io/github/repo-size/lq782655835/yi-ui.svg
|
12 | [david-url]: https://npmjs.org/package/yi-ui
|
13 | [download-img]: https://img.shields.io/npm/dm/yi-ui.svg?style=flat-square
|
14 | [download-url]: https://npmjs.org/package/yi-ui
|
15 |
|
16 | ## Setup
|
17 | ```
|
18 | npm install yi-ui
|
19 | ```
|
20 |
|
21 | ## Usage
|
22 |
|
23 | ``` js
|
24 | import YIUI from 'yi-ui'
|
25 | import 'yi-ui/dist/YIUI.css'
|
26 | Vue.use(YIUI)
|
27 | ```
|
28 |
|
29 | ``` html
|
30 | <u-link>click me</u-link>
|
31 | <u-button type="primary">click me</u-button>
|
32 | ```
|
33 |
|
34 | ## Components
|
35 |
|
36 | * 基础组件
|
37 | * [u-link](./packages/u-link.vue)
|
38 | * [u-button](./packages/u-button.vue)
|
39 | * [u-icon](./packages/u-icon.vue)
|
40 | * [u-layout](./packages/u-layout.vue)
|
41 | * 表单组件
|
42 | * [u-input/textarea](./packages/u-input.vue)
|
43 | * [u-select](./packages/u-select.vue)
|
44 | * [u-switch](./packages/u-switch.vue)
|
45 | * [u-radios/radio](./packages/u-radio/u-radios.vue)
|
46 | * [u-checkboxs/checkbox](./packages/u-checkbox/u-checkboxs.vue)
|
47 | * [u-form/u-form-item](./packages/u-form/u-form.vue)
|
48 | * 实用组件
|
49 | * [u-table/u-table-column](./packages/u-table/u-table.vue)
|
50 | * [u-pagination](./packages/u-pagination.vue)
|
51 | * [u-tabs/u-tab](./packages/u-tab/u-tabs.vue)
|
52 | * [u-crumb/u-crumb-item](./packages/u-crumb/u-crumb.vue)
|
53 | * 弹出框组件
|
54 | * [u-modal](./packages/u-modal.vue)
|
55 | * [u-toast](./packages/u-toast.vue)
|
56 | * [u-tooltip/u-popper](./packages/u-tooltip.vue)
|
57 |
|
58 | ## 本地开发组件库
|
59 |
|
60 | ``` sh
|
61 | npm install
|
62 | npm run dev
|
63 | ```
|
64 |
|
65 | ### 1. git commit msg 规范
|
66 |
|
67 | ``` sh
|
68 | git commit -m 'feat: add feature'
|
69 | ```
|
70 | * feat: 表示新增了一个功能
|
71 | * fix: 表示修复了一个 bug
|
72 | * docs: 表示只修改了文档
|
73 | * style: 表示修改格式、书写错误、空格等不影响代码逻辑的操作
|
74 | * refactor: 表示修改的代码不是新增功能也不是修改 bug,比如代码重构
|
75 | * perf: 表示修改了提升性能的代码
|
76 | * test: 表示修改了测试代码
|
77 | * build: 表示修改了编译配置文件
|
78 | * chore: 无 src 或 test 的操作
|
79 | * revert: 回滚操作
|
80 |
|
81 | ### 2. 使用npm run commit提交
|
82 |
|
83 | ``` sh
|
84 | npm run commit
|
85 | ```
|
86 |
|
87 | ### 3. 书写docs文档
|
88 |
|
89 | 在docs下直接书写markdown文档即可,并在docs/.vuepress/config.js下配置目录。详见[vuepress配置](https://vuepress.vuejs.org/zh/config/)。
|
90 |
|
91 | 发布到github可执行命令:
|
92 | ``` sh
|
93 | npm run release:docs
|
94 | ```
|
95 |
|
96 | ## 组件库打包及发布
|
97 |
|
98 | ``` sh
|
99 | npm publish
|
100 | ```
|
101 |
|
102 | ## Preview
|
103 |
|
104 | ![image](https://user-images.githubusercontent.com/6310131/56558066-fbe16880-65cf-11e9-9940-07c7be20834c.png)
|
105 |
|
106 | ## License
|
107 |
|
108 | The code is distributed under the [MIT](http://opensource.org/licenses/MIT) license |
\ | No newline at end of file |