vue-devui 1.0.0-beta.18 → 1.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -187
- package/accordion/index.es.js +221 -6
- package/accordion/index.umd.js +1 -1
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +131 -269
- package/auto-complete/index.umd.js +1 -1
- package/auto-complete/style.css +1 -1
- package/back-top/index.es.js +4 -2
- package/badge/index.es.js +13 -19
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/breadcrumb/index.es.js +2 -1
- package/button/index.es.js +39 -40
- package/button/index.umd.js +1 -1
- package/carousel/index.es.js +38 -53
- package/carousel/index.umd.js +1 -1
- package/cascader/index.es.js +16 -8
- package/cascader/style.css +1 -1
- package/color-picker/index.es.js +97 -89
- package/color-picker/index.umd.js +7 -7
- package/countdown/index.es.js +2 -1
- package/date-picker/index.es.js +40 -57
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +162 -5741
- package/drawer/index.umd.js +1 -27
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +459 -301
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +6 -3
- package/form/index.es.js +1953 -1550
- package/form/index.umd.js +18 -18
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +112 -133
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/input/style.css +1 -1
- package/input-icon/index.es.js +38 -37
- package/input-icon/index.umd.js +1 -1
- package/input-icon/style.css +1 -1
- package/input-number/index.es.js +46 -57
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/{time-axis → list}/index.d.ts +0 -0
- package/list/index.es.js +39 -0
- package/list/index.umd.js +1 -0
- package/{toast → list}/package.json +1 -1
- package/list/style.css +1 -0
- package/modal/index.es.js +300 -934
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/{toast → notification}/index.d.ts +0 -0
- package/notification/index.es.js +284 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/List.js +3 -0
- package/nuxt/components/ListItem.js +3 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/overlayEmits.js +3 -0
- package/nuxt/components/overlayProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/popoverProps.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/overlay/index.es.js +152 -198
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +40 -87
- package/pagination/index.es.js +10 -12
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +5954 -201
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/read-tip/index.es.js +6 -3
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +9 -5
- package/search/index.es.js +19 -29
- package/search/index.umd.js +6 -6
- package/search/style.css +1 -1
- package/select/index.es.js +42 -42
- package/select/index.umd.js +1 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -1
- package/splitter/index.es.js +5814 -98
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps-guide/index.es.js +6 -3
- package/style.css +1 -1
- package/table/index.es.js +456 -299
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +3 -4
- package/tabs/index.umd.js +1 -1
- package/tag/index.es.js +2 -1
- package/tag-input/index.es.js +4 -2
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +43 -42
- package/time-picker/index.umd.js +1 -1
- package/timeline/index.d.ts +7 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{time-axis → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +5804 -94
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/transfer/index.es.js +440 -165
- package/transfer/index.umd.js +17 -17
- package/transfer/style.css +1 -1
- package/tree/index.es.js +12 -7
- package/tree/index.umd.js +10 -10
- package/tree-select/index.es.js +10 -6
- package/tree-select/index.umd.js +1 -1
- package/upload/index.es.js +335 -6068
- package/upload/index.umd.js +1 -27
- package/upload/style.css +1 -1
- package/vue-devui.es.js +2555 -2799
- package/vue-devui.umd.js +16 -16
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/Toast.js +0 -3
- package/nuxt/components/ToastService.js +0 -3
- package/time-axis/index.umd.js +0 -1
- package/time-axis/style.css +0 -1
- package/toast/index.es.js +0 -5918
- package/toast/index.umd.js +0 -27
- package/toast/style.css +0 -1
package/README.md
CHANGED
|
@@ -1,187 +1,200 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://devui.design/home" target="_blank" rel="noopener noreferrer">
|
|
3
|
-
<img alt="DevUI Logo" src="https://github.com/DevCloudFE/vue-devui/raw/dev/packages/devui-vue/public/logo.svg" width="180" style="max-width:100%;">
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
Vue DevUI 是 Vue3 版本的 DevUI 组件库,基于 [https://github.com/devcloudfe/ng-devui](https://github.com/devcloudfe/ng-devui),倡导`沉浸`、`灵活`、`至简`的设计价值观。
|
|
8
|
-
|
|
9
|
-
DevUI 官方网站:[https://devui.design](https://devui.design)
|
|
10
|
-
|
|
11
|
-
## 当前状态: Beta
|
|
12
|
-
|
|
13
|
-
该项目还处于孵化和演进阶段,欢迎大家参与到 Vue DevUI 项目的建设中来!🎉🎉
|
|
14
|
-
|
|
15
|
-
通过参与 Vue DevUI 项目,你可以:
|
|
16
|
-
- 🔥 学习最新的 `Vite`+`Vue3`+`TypeScript`+`JSX` 技术
|
|
17
|
-
- 🎁 学习如何设计和开发组件
|
|
18
|
-
- ⭐ 参与到开源社区中来
|
|
19
|
-
- 🎊 结识一群热爱学习、热爱开源的朋友
|
|
20
|
-
|
|
21
|
-
[贡献指南](https://github.com/DevCloudFE/vue-devui/wiki/%E8%B4%A1%E7%8C%AE%E6%8C%87%E5%8D%97)
|
|
22
|
-
|
|
23
|
-
## 快速开始
|
|
24
|
-
|
|
25
|
-
### 1 安装依赖
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
pnpm i
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 2 启动
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
pnpm dev
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 3 访问
|
|
38
|
-
|
|
39
|
-
[http://localhost:3000/](http://localhost:3000/)
|
|
40
|
-
|
|
41
|
-
### 4 生产打包
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
pnpm build
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## 使用 Vue DevUI
|
|
48
|
-
|
|
49
|
-
### 1. 安装
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
pnpm i vue-devui
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 2. 全量引入
|
|
56
|
-
|
|
57
|
-
在`main.ts`文件中编写以下代码:
|
|
58
|
-
```
|
|
59
|
-
import { createApp } from 'vue'
|
|
60
|
-
import App from './App.vue'
|
|
61
|
-
|
|
62
|
-
// Step 1: 引入 Vue DevUI 组件库
|
|
63
|
-
import DevUI from 'vue-devui'
|
|
64
|
-
// Step 2: 引入组件库样式
|
|
65
|
-
import 'vue-devui/style.css'
|
|
66
|
-
|
|
67
|
-
createApp(App)
|
|
68
|
-
.use(DevUI) // Step 3: 使用 Vue DevUI
|
|
69
|
-
.mount('#app')
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 3. 按需引入
|
|
73
|
-
|
|
74
|
-
除了全量引入,我们也支持单个组件按需引入。
|
|
75
|
-
|
|
76
|
-
在`main.ts`文件中编写以下代码:
|
|
77
|
-
```
|
|
78
|
-
import { createApp } from 'vue'
|
|
79
|
-
import App from './App.vue'
|
|
80
|
-
|
|
81
|
-
// Step 1: 引入单个组件
|
|
82
|
-
import { Button } from 'vue-devui'
|
|
83
|
-
// or import Button from 'vue-devui/button'
|
|
84
|
-
// Step 2: 引入组件样式
|
|
85
|
-
import 'vue-devui/button/style.css'
|
|
86
|
-
|
|
87
|
-
createApp(App)
|
|
88
|
-
.use(Button) // Step 3: 使用组件
|
|
89
|
-
.mount('#app')
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 4. 配置自动按需引入`unplugin-vue-components`(推荐)
|
|
93
|
-
|
|
94
|
-
配置`unplugin-vue-components`插件可以无需引入Vue DevUI就可以直接按需使用其中的组件,具体使用方式如下:
|
|
95
|
-
|
|
96
|
-
在`vite.config.ts`文件中添加以下代码:
|
|
97
|
-
```
|
|
98
|
-
import Components from 'unplugin-vue-components/vite'
|
|
99
|
-
import { DevUiResolver } from 'unplugin-vue-components/resolvers'
|
|
100
|
-
|
|
101
|
-
export default defineConfig({
|
|
102
|
-
plugins: [
|
|
103
|
-
vue(),
|
|
104
|
-
|
|
105
|
-
// 新增
|
|
106
|
-
Components({
|
|
107
|
-
resolvers: [
|
|
108
|
-
DevUiResolver()
|
|
109
|
-
]
|
|
110
|
-
})
|
|
111
|
-
]
|
|
112
|
-
})
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
配置了以上插件,就可以直接在代码中使用`Vue DevUI`的组件,而无需在`main.ts`文件中引入`Vue DevUI`。
|
|
116
|
-
|
|
117
|
-
### 5. 使用
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
<template>
|
|
121
|
-
<d-button>确定</d-button>
|
|
122
|
-
</template>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## 图标库
|
|
126
|
-
|
|
127
|
-
图标库推荐使用[DevUI图标库](https://devui.design/icon/ruleResource),也可以使用第三方图标库,比如:iconfont。
|
|
128
|
-
|
|
129
|
-
### 使用DevUI图标库
|
|
130
|
-
|
|
131
|
-
#### 安装
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
pnpm i @devui-design/icons
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
#### 引入
|
|
138
|
-
|
|
139
|
-
在`main.ts`文件中,编写以下代码:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
import '@devui-design/icons/icomoon/devui-icon.css'
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
#### 使用
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
<d-icon name="love" color="red"></d-icon>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Contributors ✨
|
|
152
|
-
|
|
153
|
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
154
|
-
|
|
155
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
156
|
-
<!-- prettier-ignore-start -->
|
|
157
|
-
<!-- markdownlint-disable -->
|
|
158
|
-
<table>
|
|
159
|
-
<tr>
|
|
160
|
-
<td align="center"><a href="https://juejin.cn/user/712139267650141"><img src="https://avatars.githubusercontent.com/u/9566362?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kagol</b></sub></a><br /><a href="#maintenance-kagol" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Code">💻</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Documentation">📖</a></td>
|
|
161
|
-
<td align="center"><a href="https://github.com/TinsFox"><img src="https://avatars.githubusercontent.com/u/33956589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>TinsFox</b></sub></a><br /><a href="#maintenance-TinsFox" title="Maintenance">🚧</a> <a href="#infra-TinsFox" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
|
162
|
-
<td align="center"><a href="https://github.com/lnzhangsong"><img src="https://avatars.githubusercontent.com/u/15092594?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nif</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=lnzhangsong" title="Code">💻</a></td>
|
|
163
|
-
<td align="center"><a href="https://github.com/Zcating"><img src="https://avatars.githubusercontent.com/u/13329558?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zcating</b></sub></a><br /><a href="#maintenance-Zcating" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=Zcating" title="Code">💻</a></td>
|
|
164
|
-
<td align="center"><a href="https://github.com/sufuwang"><img src="https://avatars.githubusercontent.com/u/46395105?v=4?s=100" width="100px;" alt=""/><br /><sub><b>王凯</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=sufuwang" title="Code">💻</a></td>
|
|
165
|
-
<td align="center"><a href="https://github.com/iel-h"><img src="https://avatars.githubusercontent.com/u/53589602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>iel</b></sub></a><br /><a href="#maintenance-iel-h" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=iel-h" title="Code">💻</a></td>
|
|
166
|
-
<td align="center"><a href="https://github.com/chenxi24"><img src="https://avatars.githubusercontent.com/u/40349890?v=4?s=100" width="100px;" alt=""/><br /><sub><b>chenxi24</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=chenxi24" title="Code">💻</a></td>
|
|
167
|
-
</tr>
|
|
168
|
-
<tr>
|
|
169
|
-
<td align="center"><a href="https://github.com/asdlml6"><img src="https://avatars.githubusercontent.com/u/61737780?v=4?s=100" width="100px;" alt=""/><br /><sub><b>小九九</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=asdlml6" title="Code">💻</a></td>
|
|
170
|
-
<td align="center"><a href="http://blog.alanlee.top"><img src="https://avatars.githubusercontent.com/u/42601044?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AlanLee</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=AlanLee97" title="Code">💻</a></td>
|
|
171
|
-
<td align="center"><a href="https://github.com/ForeseeBear"><img src="https://avatars.githubusercontent.com/u/15258339?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Echo</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=ForeseeBear" title="Code">💻</a></td>
|
|
172
|
-
<td align="center"><a href="https://github.com/GaoNeng-wWw"><img src="https://avatars.githubusercontent.com/u/31283122?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GaoNeng</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=GaoNeng-wWw" title="Code">💻</a></td>
|
|
173
|
-
<td align="center"><a href="https://github.com/xingyan95"><img src="https://avatars.githubusercontent.com/u/11143986?v=4?s=100" width="100px;" alt=""/><br /><sub><b>行言</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=xingyan95" title="Code">💻</a></td>
|
|
174
|
-
<td align="center"><a href="https://devin974.github.io/"><img src="https://avatars.githubusercontent.com/u/67035714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>devin</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=devin974" title="Code">💻</a></td>
|
|
175
|
-
|
|
176
|
-
</
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://devui.design/home" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<img alt="DevUI Logo" src="https://github.com/DevCloudFE/vue-devui/raw/dev/packages/devui-vue/public/logo.svg" width="180" style="max-width:100%;">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
Vue DevUI 是 Vue3 版本的 DevUI 组件库,基于 [https://github.com/devcloudfe/ng-devui](https://github.com/devcloudfe/ng-devui),倡导`沉浸`、`灵活`、`至简`的设计价值观。
|
|
8
|
+
|
|
9
|
+
DevUI 官方网站:[https://devui.design](https://devui.design)
|
|
10
|
+
|
|
11
|
+
## 当前状态: Beta
|
|
12
|
+
|
|
13
|
+
该项目还处于孵化和演进阶段,欢迎大家参与到 Vue DevUI 项目的建设中来!🎉🎉
|
|
14
|
+
|
|
15
|
+
通过参与 Vue DevUI 项目,你可以:
|
|
16
|
+
- 🔥 学习最新的 `Vite`+`Vue3`+`TypeScript`+`JSX` 技术
|
|
17
|
+
- 🎁 学习如何设计和开发组件
|
|
18
|
+
- ⭐ 参与到开源社区中来
|
|
19
|
+
- 🎊 结识一群热爱学习、热爱开源的朋友
|
|
20
|
+
|
|
21
|
+
[贡献指南](https://github.com/DevCloudFE/vue-devui/wiki/%E8%B4%A1%E7%8C%AE%E6%8C%87%E5%8D%97)
|
|
22
|
+
|
|
23
|
+
## 快速开始
|
|
24
|
+
|
|
25
|
+
### 1 安装依赖
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
pnpm i
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2 启动
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
pnpm dev
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 3 访问
|
|
38
|
+
|
|
39
|
+
[http://localhost:3000/](http://localhost:3000/)
|
|
40
|
+
|
|
41
|
+
### 4 生产打包
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
pnpm build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 使用 Vue DevUI
|
|
48
|
+
|
|
49
|
+
### 1. 安装
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
pnpm i vue-devui
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. 全量引入
|
|
56
|
+
|
|
57
|
+
在`main.ts`文件中编写以下代码:
|
|
58
|
+
```
|
|
59
|
+
import { createApp } from 'vue'
|
|
60
|
+
import App from './App.vue'
|
|
61
|
+
|
|
62
|
+
// Step 1: 引入 Vue DevUI 组件库
|
|
63
|
+
import DevUI from 'vue-devui'
|
|
64
|
+
// Step 2: 引入组件库样式
|
|
65
|
+
import 'vue-devui/style.css'
|
|
66
|
+
|
|
67
|
+
createApp(App)
|
|
68
|
+
.use(DevUI) // Step 3: 使用 Vue DevUI
|
|
69
|
+
.mount('#app')
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. 按需引入
|
|
73
|
+
|
|
74
|
+
除了全量引入,我们也支持单个组件按需引入。
|
|
75
|
+
|
|
76
|
+
在`main.ts`文件中编写以下代码:
|
|
77
|
+
```
|
|
78
|
+
import { createApp } from 'vue'
|
|
79
|
+
import App from './App.vue'
|
|
80
|
+
|
|
81
|
+
// Step 1: 引入单个组件
|
|
82
|
+
import { Button } from 'vue-devui'
|
|
83
|
+
// or import Button from 'vue-devui/button'
|
|
84
|
+
// Step 2: 引入组件样式
|
|
85
|
+
import 'vue-devui/button/style.css'
|
|
86
|
+
|
|
87
|
+
createApp(App)
|
|
88
|
+
.use(Button) // Step 3: 使用组件
|
|
89
|
+
.mount('#app')
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 4. 配置自动按需引入`unplugin-vue-components`(推荐)
|
|
93
|
+
|
|
94
|
+
配置`unplugin-vue-components`插件可以无需引入Vue DevUI就可以直接按需使用其中的组件,具体使用方式如下:
|
|
95
|
+
|
|
96
|
+
在`vite.config.ts`文件中添加以下代码:
|
|
97
|
+
```
|
|
98
|
+
import Components from 'unplugin-vue-components/vite'
|
|
99
|
+
import { DevUiResolver } from 'unplugin-vue-components/resolvers'
|
|
100
|
+
|
|
101
|
+
export default defineConfig({
|
|
102
|
+
plugins: [
|
|
103
|
+
vue(),
|
|
104
|
+
|
|
105
|
+
// 新增
|
|
106
|
+
Components({
|
|
107
|
+
resolvers: [
|
|
108
|
+
DevUiResolver()
|
|
109
|
+
]
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
配置了以上插件,就可以直接在代码中使用`Vue DevUI`的组件,而无需在`main.ts`文件中引入`Vue DevUI`。
|
|
116
|
+
|
|
117
|
+
### 5. 使用
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
<template>
|
|
121
|
+
<d-button>确定</d-button>
|
|
122
|
+
</template>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 图标库
|
|
126
|
+
|
|
127
|
+
图标库推荐使用[DevUI图标库](https://devui.design/icon/ruleResource),也可以使用第三方图标库,比如:iconfont。
|
|
128
|
+
|
|
129
|
+
### 使用DevUI图标库
|
|
130
|
+
|
|
131
|
+
#### 安装
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
pnpm i @devui-design/icons
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### 引入
|
|
138
|
+
|
|
139
|
+
在`main.ts`文件中,编写以下代码:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
import '@devui-design/icons/icomoon/devui-icon.css'
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### 使用
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
<d-icon name="love" color="red"></d-icon>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Contributors ✨
|
|
152
|
+
|
|
153
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
154
|
+
|
|
155
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
156
|
+
<!-- prettier-ignore-start -->
|
|
157
|
+
<!-- markdownlint-disable -->
|
|
158
|
+
<table>
|
|
159
|
+
<tr>
|
|
160
|
+
<td align="center"><a href="https://juejin.cn/user/712139267650141"><img src="https://avatars.githubusercontent.com/u/9566362?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kagol</b></sub></a><br /><a href="#maintenance-kagol" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Code">💻</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Documentation">📖</a></td>
|
|
161
|
+
<td align="center"><a href="https://github.com/TinsFox"><img src="https://avatars.githubusercontent.com/u/33956589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>TinsFox</b></sub></a><br /><a href="#maintenance-TinsFox" title="Maintenance">🚧</a> <a href="#infra-TinsFox" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
|
162
|
+
<td align="center"><a href="https://github.com/lnzhangsong"><img src="https://avatars.githubusercontent.com/u/15092594?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nif</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=lnzhangsong" title="Code">💻</a></td>
|
|
163
|
+
<td align="center"><a href="https://github.com/Zcating"><img src="https://avatars.githubusercontent.com/u/13329558?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zcating</b></sub></a><br /><a href="#maintenance-Zcating" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=Zcating" title="Code">💻</a></td>
|
|
164
|
+
<td align="center"><a href="https://github.com/sufuwang"><img src="https://avatars.githubusercontent.com/u/46395105?v=4?s=100" width="100px;" alt=""/><br /><sub><b>王凯</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=sufuwang" title="Code">💻</a></td>
|
|
165
|
+
<td align="center"><a href="https://github.com/iel-h"><img src="https://avatars.githubusercontent.com/u/53589602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>iel</b></sub></a><br /><a href="#maintenance-iel-h" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=iel-h" title="Code">💻</a></td>
|
|
166
|
+
<td align="center"><a href="https://github.com/chenxi24"><img src="https://avatars.githubusercontent.com/u/40349890?v=4?s=100" width="100px;" alt=""/><br /><sub><b>chenxi24</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=chenxi24" title="Code">💻</a></td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td align="center"><a href="https://github.com/asdlml6"><img src="https://avatars.githubusercontent.com/u/61737780?v=4?s=100" width="100px;" alt=""/><br /><sub><b>小九九</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=asdlml6" title="Code">💻</a></td>
|
|
170
|
+
<td align="center"><a href="http://blog.alanlee.top"><img src="https://avatars.githubusercontent.com/u/42601044?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AlanLee</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=AlanLee97" title="Code">💻</a></td>
|
|
171
|
+
<td align="center"><a href="https://github.com/ForeseeBear"><img src="https://avatars.githubusercontent.com/u/15258339?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Echo</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=ForeseeBear" title="Code">💻</a></td>
|
|
172
|
+
<td align="center"><a href="https://github.com/GaoNeng-wWw"><img src="https://avatars.githubusercontent.com/u/31283122?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GaoNeng</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=GaoNeng-wWw" title="Code">💻</a></td>
|
|
173
|
+
<td align="center"><a href="https://github.com/xingyan95"><img src="https://avatars.githubusercontent.com/u/11143986?v=4?s=100" width="100px;" alt=""/><br /><sub><b>行言</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=xingyan95" title="Code">💻</a></td>
|
|
174
|
+
<td align="center"><a href="https://devin974.github.io/"><img src="https://avatars.githubusercontent.com/u/67035714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>devin</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=devin974" title="Code">💻</a></td>
|
|
175
|
+
<td align="center"><a href="https://juejin.cn/user/1618116899507735/posts"><img src="https://avatars.githubusercontent.com/u/70649502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>无声</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=ivestszheng" title="Code">💻</a></td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td align="center"><a href="https://github.com/zxlfly"><img src="https://avatars.githubusercontent.com/u/26324442?v=4?s=100" width="100px;" alt=""/><br /><sub><b>sleep_fish</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=zxlfly" title="Code">💻</a></td>
|
|
179
|
+
<td align="center"><a href="https://github.com/whylost"><img src="https://avatars.githubusercontent.com/u/62528887?v=4?s=100" width="100px;" alt=""/><br /><sub><b>迷心whylost</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=whylost" title="Code">💻</a></td>
|
|
180
|
+
<td align="center"><a href="https://juejin.im/user/5c15d35fe51d4545ae495e43"><img src="https://avatars.githubusercontent.com/u/31237954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>X.Q. Chen</b></sub></a><br /><a href="#infra-brenner8023" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=brenner8023" title="Code">💻</a></td>
|
|
181
|
+
<td align="center"><a href="https://github.com/git-Where"><img src="https://avatars.githubusercontent.com/u/16344566?v=4?s=100" width="100px;" alt=""/><br /><sub><b>葉家男孩</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=git-Where" title="Code">💻</a></td>
|
|
182
|
+
<td align="center"><a href="https://github.com/CatsAndMice"><img src="https://avatars.githubusercontent.com/u/58327088?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lihai</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=CatsAndMice" title="Code">💻</a></td>
|
|
183
|
+
<td align="center"><a href="http://www.naluduo.vip"><img src="https://avatars.githubusercontent.com/u/28448589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>纳撸多</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=naluduo233" title="Code">💻</a></td>
|
|
184
|
+
<td align="center"><a href="https://github.com/ElsaOOo"><img src="https://avatars.githubusercontent.com/u/48074435?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ElsaOOo</b></sub></a><br /><a href="#maintenance-ElsaOOo" title="Maintenance">🚧</a> <a href="#infra-ElsaOOo" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=ElsaOOo" title="Code">💻</a></td>
|
|
185
|
+
</tr>
|
|
186
|
+
<tr>
|
|
187
|
+
<td align="center"><a href="https://github.com/liuxdi"><img src="https://avatars.githubusercontent.com/u/10958003?v=4?s=100" width="100px;" alt=""/><br /><sub><b>刘小迪</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=liuxdi" title="Code">💻</a></td>
|
|
188
|
+
</tr>
|
|
189
|
+
</table>
|
|
190
|
+
|
|
191
|
+
<!-- markdownlint-restore -->
|
|
192
|
+
<!-- prettier-ignore-end -->
|
|
193
|
+
|
|
194
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
195
|
+
|
|
196
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
197
|
+
|
|
198
|
+
## License
|
|
199
|
+
|
|
200
|
+
[MIT](https://github.com/DevCloudFE/vue-devui/blob/dev/LICENSE)
|