vue-devui 1.0.0-rc.1 → 1.0.0-rc.2
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 +126 -200
- package/auto-complete/index.es.js +55 -77
- package/auto-complete/index.umd.js +3 -1
- package/auto-complete/style.css +1 -1
- package/editable-select/index.es.js +118 -162
- package/editable-select/index.umd.js +1 -1
- package/nuxt/components/tagProps.js +3 -0
- package/package.json +1 -1
- package/popover/index.es.js +2 -2
- package/popover/index.umd.js +4 -4
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +1 -1
- package/progress/style.css +1 -1
- package/radio/index.es.js +8 -2
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/ripple/index.es.js +43 -42
- package/ripple/index.umd.js +1 -1
- package/slider/index.es.js +58 -58
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +168 -125
- package/splitter/index.umd.js +11 -11
- package/style.css +1 -1
- package/tag/index.es.js +13 -17
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/vue-devui.es.js +765 -605
- package/vue-devui.umd.js +18 -16
- package/accordion/index.d.ts +0 -7
- package/accordion/index.es.js +0 -723
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.d.ts +0 -7
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/package.json +0 -7
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -130
- package/back-top/index.umd.js +0 -1
- package/back-top/package.json +0 -7
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -128
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -314
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5971
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8196
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/date-picker/index.d.ts +0 -7
- package/date-picker/index.es.js +0 -1154
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/drawer/index.d.ts +0 -7
- package/drawer/index.es.js +0 -234
- package/drawer/index.umd.js +0 -1
- package/drawer/package.json +0 -7
- package/drawer/style.css +0 -1
- package/dropdown/index.d.ts +0 -7
- package/dropdown/index.es.js +0 -693
- package/dropdown/index.umd.js +0 -1
- package/dropdown/package.json +0 -7
- package/dropdown/style.css +0 -1
- package/form/index.d.ts +0 -7
- package/form/index.es.js +0 -7876
- package/form/index.umd.js +0 -27
- package/form/package.json +0 -7
- package/form/style.css +0 -1
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -332
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/input-number/index.d.ts +0 -7
- package/input-number/index.es.js +0 -229
- package/input-number/index.umd.js +0 -1
- package/input-number/package.json +0 -7
- package/input-number/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Column.js +0 -3
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/Drawer.js +0 -3
- package/nuxt/components/DrawerService.js +0 -3
- package/nuxt/components/Dropdown.js +0 -3
- package/nuxt/components/DropdownMenu.js +0 -3
- package/nuxt/components/Form.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormItem.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/FormOperation.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/InputNumber.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/Select.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/Table.js +0 -3
- package/nuxt/components/Tabs.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Tooltip.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/Tree.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/dropdownMenuProps.js +0 -3
- package/nuxt/components/tooltipProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/select/index.d.ts +0 -7
- package/select/index.es.js +0 -706
- package/select/index.umd.js +0 -1
- package/select/package.json +0 -7
- package/select/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -242
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/table/index.d.ts +0 -7
- package/table/index.es.js +0 -2024
- package/table/index.umd.js +0 -1
- package/table/package.json +0 -7
- package/table/style.css +0 -1
- package/tabs/index.d.ts +0 -7
- package/tabs/index.es.js +0 -194
- package/tabs/index.umd.js +0 -1
- package/tabs/package.json +0 -7
- package/tabs/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1238
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/tooltip/index.d.ts +0 -7
- package/tooltip/index.es.js +0 -5835
- package/tooltip/index.umd.js +0 -27
- package/tooltip/package.json +0 -7
- package/tooltip/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7615
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree/index.d.ts +0 -7
- package/tree/index.es.js +0 -6495
- package/tree/index.umd.js +0 -27
- package/tree/package.json +0 -7
- package/tree/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -627
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/README.md
CHANGED
|
@@ -1,200 +1,126 @@
|
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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)
|
|
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
|
+
<h1 align="center">Vue DevUI</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">Vue3 component library based on <a href="https://devui.design/" target="_blank" rel="noopener noreferrer">DevUI Design</a></p>
|
|
10
|
+
|
|
11
|
+
English | [简体中文](README.zh-CN.md)
|
|
12
|
+
|
|
13
|
+
🌈 Features:
|
|
14
|
+
|
|
15
|
+
- 📦 40 high-quality components that are simple, easy to use, and flexible.
|
|
16
|
+
- 🔑 Support for TypeScript.
|
|
17
|
+
- ⛰️ Support for Nuxt3.
|
|
18
|
+
- ⚡ Support for on-demand import.
|
|
19
|
+
- 🌍 Support internationalization.
|
|
20
|
+
- 🎨 Support theme customization, and built-in seven beautiful themes such as `Galaxy`, `Sweet` and `Provence`.
|
|
21
|
+
|
|
22
|
+
## 🔧 Usage
|
|
23
|
+
|
|
24
|
+
The first step is to install vue devui:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
npm i vue-devui
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then import `DevUI` in the `main.ts` file:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { createApp } from 'vue'
|
|
34
|
+
import App from './App.vue'
|
|
35
|
+
|
|
36
|
+
// Import Vue DevUI component and style
|
|
37
|
+
import DevUI from 'vue-devui'
|
|
38
|
+
import 'vue-devui/style.css'
|
|
39
|
+
|
|
40
|
+
createApp(App).use(DevUI).mount('#app')
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then you can use the vue devui component(such as `<d-button>`) in the `App.vue` file:
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<template>
|
|
47
|
+
<d-button>Button</d-button>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 🖥️ Development
|
|
52
|
+
|
|
53
|
+
```shell
|
|
54
|
+
git clone git@github.com:DevCloudFE/vue-devui.git
|
|
55
|
+
cd vue-devui
|
|
56
|
+
pnpm i
|
|
57
|
+
pnpm dev
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Open your browser and visit: [http://localhost:3000/](http://localhost:3000/).
|
|
61
|
+
|
|
62
|
+
## 🤝 Contributing
|
|
63
|
+
|
|
64
|
+
Welcome to join our Vue DevUI open source project!🎉
|
|
65
|
+
|
|
66
|
+
By participating in the Vue DevUI project, we can together:
|
|
67
|
+
- 🔥 Learn the latest cool `Vite` + `Vue3` + `TypeScript` + `JSX` technology.
|
|
68
|
+
- 🎁 Learn how to design and develop UI components.
|
|
69
|
+
- ⭐ Hone programming skills and learn excellent programming practice.
|
|
70
|
+
- 🎊 Meet a group of friends who love learning and open source.
|
|
71
|
+
|
|
72
|
+
If you don't know how to start, please read our [contributing guide](https://vue-devui.github.io/contributing/)
|
|
73
|
+
|
|
74
|
+
## ✨ Contributors
|
|
75
|
+
|
|
76
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
77
|
+
|
|
78
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
79
|
+
<!-- prettier-ignore-start -->
|
|
80
|
+
<!-- markdownlint-disable -->
|
|
81
|
+
<table>
|
|
82
|
+
<tr>
|
|
83
|
+
<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>
|
|
84
|
+
<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>
|
|
85
|
+
<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>
|
|
86
|
+
<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>
|
|
87
|
+
<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>
|
|
88
|
+
<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>
|
|
89
|
+
<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>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<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>
|
|
93
|
+
<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>
|
|
94
|
+
<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>
|
|
95
|
+
<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>
|
|
96
|
+
<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>
|
|
97
|
+
<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>
|
|
98
|
+
<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>
|
|
99
|
+
</tr>
|
|
100
|
+
<tr>
|
|
101
|
+
<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>
|
|
102
|
+
<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>
|
|
103
|
+
<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>
|
|
104
|
+
<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>
|
|
105
|
+
<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>
|
|
106
|
+
<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>
|
|
107
|
+
<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>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<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>
|
|
111
|
+
<td align="center"><a href="https://github.com/unfound"><img src="https://avatars.githubusercontent.com/u/32935349?v=4?s=100" width="100px;" alt=""/><br /><sub><b>unfound</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=unfound" title="Code">💻</a></td>
|
|
112
|
+
<td align="center"><a href="https://github.com/Roading"><img src="https://avatars.githubusercontent.com/u/7751774?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Roading</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=Roading" title="Code">💻</a></td>
|
|
113
|
+
<td align="center"><a href="http://inreasons.cn"><img src="https://avatars.githubusercontent.com/u/47918504?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chestnut</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=banlify" title="Code">💻</a></td>
|
|
114
|
+
</tr>
|
|
115
|
+
</table>
|
|
116
|
+
|
|
117
|
+
<!-- markdownlint-restore -->
|
|
118
|
+
<!-- prettier-ignore-end -->
|
|
119
|
+
|
|
120
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
121
|
+
|
|
122
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
[MIT](https://github.com/DevCloudFE/vue-devui/blob/dev/LICENSE)
|
|
@@ -18,7 +18,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18
18
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
-
import { ref, nextTick, defineComponent, createVNode, h, render, inject, withDirectives, createTextVNode, resolveDirective, vShow, unref, watch, onUnmounted, mergeProps, toRefs, provide,
|
|
21
|
+
import { ref, nextTick, defineComponent, createVNode, h, render, inject, withDirectives, createTextVNode, resolveDirective, vShow, unref, watch, onUnmounted, mergeProps, toRefs, provide, Teleport, Transition, isVNode } from "vue";
|
|
22
22
|
import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
23
23
|
const defaultFormatter = (item) => item ? item.label || item.toString() : "";
|
|
24
24
|
const defaultValueParse = (item) => item;
|
|
@@ -35,18 +35,9 @@ const autoCompleteProps = {
|
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default: false
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
type:
|
|
40
|
-
default:
|
|
41
|
-
},
|
|
42
|
-
appendToBodyDirections: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: () => ({
|
|
45
|
-
originX: "left",
|
|
46
|
-
originY: "bottom",
|
|
47
|
-
overlayX: "left",
|
|
48
|
-
overlayY: "top"
|
|
49
|
-
})
|
|
38
|
+
position: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: ["bottom-end"]
|
|
50
41
|
},
|
|
51
42
|
disabled: {
|
|
52
43
|
type: Boolean,
|
|
@@ -92,9 +83,9 @@ const autoCompleteProps = {
|
|
|
92
83
|
type: Boolean,
|
|
93
84
|
default: false
|
|
94
85
|
},
|
|
95
|
-
|
|
86
|
+
width: {
|
|
96
87
|
type: Number,
|
|
97
|
-
default:
|
|
88
|
+
default: 400
|
|
98
89
|
},
|
|
99
90
|
showAnimation: {
|
|
100
91
|
type: Boolean,
|
|
@@ -121,32 +112,32 @@ const DropdownPropsKey = Symbol("DropdownPropsKey");
|
|
|
121
112
|
function useCustomTemplate(ctx2, modelValue) {
|
|
122
113
|
const itemTemplate = (item, index2) => {
|
|
123
114
|
const arr = { item, index: index2 };
|
|
124
|
-
if (ctx2.slots.
|
|
125
|
-
return ctx2.slots.
|
|
115
|
+
if (ctx2.slots.item) {
|
|
116
|
+
return ctx2.slots.item(arr);
|
|
126
117
|
}
|
|
127
118
|
return null;
|
|
128
119
|
};
|
|
129
120
|
const noResultItemTemplate = () => {
|
|
130
|
-
if (ctx2.slots.
|
|
131
|
-
return ctx2.slots.
|
|
121
|
+
if (ctx2.slots.nothing) {
|
|
122
|
+
return ctx2.slots.nothing(modelValue.value);
|
|
132
123
|
}
|
|
133
124
|
return null;
|
|
134
125
|
};
|
|
135
126
|
const searchingTemplate = () => {
|
|
136
|
-
if (ctx2.slots.
|
|
137
|
-
return ctx2.slots.
|
|
127
|
+
if (ctx2.slots.searching) {
|
|
128
|
+
return ctx2.slots.searching(modelValue.value);
|
|
138
129
|
}
|
|
139
130
|
return null;
|
|
140
131
|
};
|
|
141
132
|
const customRenderSolts = () => {
|
|
142
133
|
const slots = {};
|
|
143
|
-
if (ctx2.slots.
|
|
134
|
+
if (ctx2.slots.item) {
|
|
144
135
|
slots["itemTemplate"] = itemTemplate;
|
|
145
136
|
}
|
|
146
|
-
if (ctx2.slots.
|
|
137
|
+
if (ctx2.slots.nothing) {
|
|
147
138
|
slots["noResultItemTemplate"] = noResultItemTemplate;
|
|
148
139
|
}
|
|
149
|
-
if (ctx2.slots.
|
|
140
|
+
if (ctx2.slots.searching) {
|
|
150
141
|
slots["searchingTemplate"] = searchingTemplate;
|
|
151
142
|
}
|
|
152
143
|
return slots;
|
|
@@ -154,10 +145,10 @@ function useCustomTemplate(ctx2, modelValue) {
|
|
|
154
145
|
return { customRenderSolts };
|
|
155
146
|
}
|
|
156
147
|
function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
|
|
157
|
-
const searchList = ref(
|
|
148
|
+
const searchList = ref();
|
|
158
149
|
const showNoResultItemTemplate = ref(false);
|
|
159
150
|
const handleSearch = async (term, enableLazyLoad) => {
|
|
160
|
-
if (term
|
|
151
|
+
if (term === "" && !allowEmptyValueSearch.value) {
|
|
161
152
|
searchList.value = [];
|
|
162
153
|
showNoResultItemTemplate.value = false;
|
|
163
154
|
return;
|
|
@@ -178,7 +169,7 @@ function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
|
|
|
178
169
|
arr = await searchFn.value(term);
|
|
179
170
|
}
|
|
180
171
|
searchList.value = arr;
|
|
181
|
-
if (searchList.value.length
|
|
172
|
+
if (searchList.value.length === 0) {
|
|
182
173
|
showNoResultItemTemplate.value = true;
|
|
183
174
|
} else {
|
|
184
175
|
showNoResultItemTemplate.value = false;
|
|
@@ -241,7 +232,7 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
|
|
|
241
232
|
handleClose();
|
|
242
233
|
} else {
|
|
243
234
|
visible.value = true;
|
|
244
|
-
if (ctx2.slots.noResultItemTemplate && searchList.value.length
|
|
235
|
+
if (ctx2.slots.noResultItemTemplate && searchList.value.length === 0 && modelValue.value.trim() !== "") {
|
|
245
236
|
showNoResultItemTemplate.value = true;
|
|
246
237
|
}
|
|
247
238
|
}
|
|
@@ -260,11 +251,11 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
|
|
|
260
251
|
function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter, handleClose) {
|
|
261
252
|
const selectedIndex = ref(0);
|
|
262
253
|
const getListIndex = (item) => {
|
|
263
|
-
if (searchList.value.length
|
|
254
|
+
if (searchList.value.length === 0) {
|
|
264
255
|
return 0;
|
|
265
256
|
}
|
|
266
257
|
const ind = searchList.value.indexOf(item);
|
|
267
|
-
return ind
|
|
258
|
+
return ind === -1 ? 0 : ind;
|
|
268
259
|
};
|
|
269
260
|
const selectOptionClick = async (item) => {
|
|
270
261
|
const cur = formatter.value(item);
|
|
@@ -272,7 +263,7 @@ function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter,
|
|
|
272
263
|
handleClose();
|
|
273
264
|
await handleSearch(cur);
|
|
274
265
|
selectedIndex.value = getListIndex(cur);
|
|
275
|
-
selectValue.value && selectValue.value();
|
|
266
|
+
selectValue.value && selectValue.value(cur);
|
|
276
267
|
};
|
|
277
268
|
return {
|
|
278
269
|
selectedIndex,
|
|
@@ -580,7 +571,6 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
580
571
|
const {
|
|
581
572
|
disabled,
|
|
582
573
|
maxHeight,
|
|
583
|
-
appendToBody,
|
|
584
574
|
formatter,
|
|
585
575
|
disabledKey,
|
|
586
576
|
isSearching
|
|
@@ -593,7 +583,7 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
593
583
|
};
|
|
594
584
|
return () => {
|
|
595
585
|
return withDirectives(createVNode("div", {
|
|
596
|
-
"class": ["devui-dropdown-menu",
|
|
586
|
+
"class": ["devui-dropdown-menu", "devui-dropdown-menu-cdk", disabled && "disabled", latestSource.value && "devui-dropdown-latestSource"]
|
|
597
587
|
}, [createVNode("ul", {
|
|
598
588
|
"ref": dropDownRef,
|
|
599
589
|
"class": "devui-list-unstyled scroll-height",
|
|
@@ -601,28 +591,28 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
601
591
|
maxHeight: `${maxHeight}px`
|
|
602
592
|
},
|
|
603
593
|
"onScroll": loadMore
|
|
604
|
-
}, [isSearching && ctx2.slots.searchingTemplate && searchStatus.value && createVNode("li", {
|
|
594
|
+
}, [isSearching && ctx2.slots.searchingTemplate && (searchStatus == null ? void 0 : searchStatus.value) && createVNode("li", {
|
|
605
595
|
"class": "devui-is-searching-template"
|
|
606
596
|
}, [createVNode("div", {
|
|
607
597
|
"class": "devui-no-data-tip"
|
|
608
598
|
}, [ctx2.slots.searchingTemplate()])]), latestSource.value && !modelValue.value && createVNode("li", {
|
|
609
599
|
"class": "devui-popup-tips"
|
|
610
|
-
}, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !searchStatus.value && searchList != null && searchList.value.length > 0 && searchList.value.map((item, index2) => {
|
|
600
|
+
}, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !(searchStatus == null ? void 0 : searchStatus.value) && searchList != null && searchList.value.length > 0 && searchList.value.map((item, index2) => {
|
|
611
601
|
return createVNode("li", {
|
|
612
602
|
"onClick": () => onSelect(item),
|
|
613
|
-
"class": ["devui-dropdown-item", selectedIndex.value
|
|
603
|
+
"class": ["devui-dropdown-item", selectedIndex.value === index2 && "selected", {
|
|
614
604
|
"disabled": disabledKey && item[disabledKey]
|
|
615
605
|
}, {
|
|
616
|
-
"devui-dropdown-bg": hoverIndex.value
|
|
606
|
+
"devui-dropdown-bg": hoverIndex.value === index2
|
|
617
607
|
}],
|
|
618
608
|
"title": formatter(item),
|
|
619
609
|
"key": formatter(item)
|
|
620
610
|
}, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(item, index2) : formatter(item)]);
|
|
621
|
-
}), !searchStatus.value && searchList.value.length
|
|
611
|
+
}), !(searchStatus == null ? void 0 : searchStatus.value) && searchList.value.length === 0 && ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value && createVNode("li", {
|
|
622
612
|
"class": "devui-no-result-template"
|
|
623
613
|
}, [createVNode("div", {
|
|
624
614
|
"class": "devui-no-data-tip"
|
|
625
|
-
}, [ctx2.slots.noResultItemTemplate()])])])]), [[resolveDirective("dLoading"), showLoading.value], [vShow, visible.value && searchList.value.length > 0 || ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value || isSearching && ctx2.slots.searchingTemplate && searchStatus.value]]);
|
|
615
|
+
}, [ctx2.slots.noResultItemTemplate()])])])]), [[resolveDirective("dLoading"), showLoading.value], [vShow, visible.value && searchList.value.length > 0 || ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value || isSearching && ctx2.slots.searchingTemplate && (searchStatus == null ? void 0 : searchStatus.value)]]);
|
|
626
616
|
};
|
|
627
617
|
}
|
|
628
618
|
});
|
|
@@ -847,8 +837,7 @@ var AutoComplete = defineComponent({
|
|
|
847
837
|
const {
|
|
848
838
|
disabled,
|
|
849
839
|
modelValue,
|
|
850
|
-
|
|
851
|
-
dAutoCompleteWidth,
|
|
840
|
+
width,
|
|
852
841
|
delay,
|
|
853
842
|
allowEmptyValueSearch,
|
|
854
843
|
formatter,
|
|
@@ -856,7 +845,7 @@ var AutoComplete = defineComponent({
|
|
|
856
845
|
selectValue,
|
|
857
846
|
source,
|
|
858
847
|
searchFn,
|
|
859
|
-
|
|
848
|
+
position,
|
|
860
849
|
latestSource,
|
|
861
850
|
showAnimation
|
|
862
851
|
} = toRefs(props);
|
|
@@ -908,51 +897,40 @@ var AutoComplete = defineComponent({
|
|
|
908
897
|
hoverIndex
|
|
909
898
|
});
|
|
910
899
|
const origin = ref();
|
|
911
|
-
const position = reactive({
|
|
912
|
-
appendToBodyDirections: {}
|
|
913
|
-
});
|
|
914
|
-
position.appendToBodyDirections = appendToBodyDirections;
|
|
915
900
|
const renderDropdown = () => {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
"position": position.appendToBodyDirections,
|
|
922
|
-
"visible": visible.value,
|
|
923
|
-
"onUpdate:visible": ($event) => visible.value = $event
|
|
924
|
-
}, {
|
|
925
|
-
default: () => [createVNode("div", {
|
|
926
|
-
"class": "devui-dropdown devui-auto-complete-menu",
|
|
927
|
-
"style": {
|
|
928
|
-
width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
|
|
929
|
-
}
|
|
930
|
-
}, [createVNode(DAutoCompleteDropdown, null, _isSlot(_slot = customRenderSolts()) ? _slot : {
|
|
931
|
-
default: () => [_slot]
|
|
932
|
-
})])]
|
|
933
|
-
});
|
|
934
|
-
} else {
|
|
935
|
-
let _slot2;
|
|
936
|
-
return createVNode("div", {
|
|
937
|
-
"class": "devui-dropdown",
|
|
938
|
-
"style": {
|
|
939
|
-
width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
|
|
940
|
-
}
|
|
941
|
-
}, [createVNode(Transition, {
|
|
901
|
+
let _slot;
|
|
902
|
+
return createVNode(Teleport, {
|
|
903
|
+
"to": "body"
|
|
904
|
+
}, {
|
|
905
|
+
default: () => [createVNode(Transition, {
|
|
942
906
|
"name": showAnimation ? "fade" : ""
|
|
943
907
|
}, {
|
|
944
|
-
default: () => [createVNode(
|
|
945
|
-
|
|
908
|
+
default: () => [createVNode(FlexibleOverlay, {
|
|
909
|
+
"origin": origin.value,
|
|
910
|
+
"position": position.value,
|
|
911
|
+
"modelValue": visible.value,
|
|
912
|
+
"onUpdate:modelValue": ($event) => visible.value = $event
|
|
913
|
+
}, {
|
|
914
|
+
default: () => [createVNode("div", {
|
|
915
|
+
"class": "devui-auto-complete-menu",
|
|
916
|
+
"style": {
|
|
917
|
+
width: `
|
|
918
|
+
${width.value + "px"}
|
|
919
|
+
`
|
|
920
|
+
}
|
|
921
|
+
}, [createVNode(DAutoCompleteDropdown, null, _isSlot(_slot = customRenderSolts()) ? _slot : {
|
|
922
|
+
default: () => [_slot]
|
|
923
|
+
})])]
|
|
946
924
|
})]
|
|
947
|
-
})]
|
|
948
|
-
}
|
|
925
|
+
})]
|
|
926
|
+
});
|
|
949
927
|
};
|
|
950
928
|
return () => {
|
|
951
929
|
return withDirectives(createVNode("div", {
|
|
952
930
|
"class": ["devui-auto-complete", "devui-form-group", "devui-has-feedback", visible.value && "devui-select-open"],
|
|
953
931
|
"ref": origin,
|
|
954
932
|
"style": {
|
|
955
|
-
width:
|
|
933
|
+
width: `${width.value + "px"}`
|
|
956
934
|
}
|
|
957
935
|
}, [createVNode("input", {
|
|
958
936
|
"disabled": disabled.value,
|