vue-devui 1.0.0-rc.3 → 1.0.0-rc.4
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 +132 -129
- package/auto-complete/index.es.js +19 -12
- package/auto-complete/index.umd.js +2 -2
- package/auto-complete/style.css +1 -1
- package/button/index.es.js +19 -12
- package/button/index.umd.js +1 -1
- package/button/style.css +1 -1
- package/comment/index.es.js +2 -1
- package/comment/index.umd.js +1 -1
- package/layout/index.es.js +3 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +20 -13
- package/loading/index.umd.js +1 -1
- package/modal/index.es.js +1 -1
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +100 -10
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/package.json +1 -1
- package/read-tip/index.es.js +32 -29
- package/read-tip/index.umd.js +1 -1
- package/read-tip/style.css +1 -1
- package/skeleton/index.es.js +6 -6
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +1 -4
- package/slider/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +1 -1
- package/switch/index.umd.js +1 -1
- package/switch/style.css +1 -1
- package/timeline/index.es.js +2 -2
- package/timeline/index.umd.js +1 -1
- package/upload/index.es.js +100 -10
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +230 -130
- package/vue-devui.umd.js +15 -15
package/README.md
CHANGED
|
@@ -1,129 +1,132 @@
|
|
|
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
|
-
<td align="center"><a href="https://github.com/c0dedance"><img src="https://avatars.githubusercontent.com/u/38075730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>c0dedance</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=c0dedance" title="Code">💻</a></td>
|
|
115
|
-
<td align="center"><a href="https://github.com/duqingyu"><img src="https://avatars.githubusercontent.com/u/30541930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>杜庆愉</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=duqingyu" title="Code">💻</a></td>
|
|
116
|
-
<td align="center"><a href="https://github.com/linxiang07"><img src="https://avatars.githubusercontent.com/u/40119767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>linxiang</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=linxiang07" title="Code">💻</a></td>
|
|
117
|
-
</tr>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<!--
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
+
<td align="center"><a href="https://github.com/c0dedance"><img src="https://avatars.githubusercontent.com/u/38075730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>c0dedance</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=c0dedance" title="Code">💻</a></td>
|
|
115
|
+
<td align="center"><a href="https://github.com/duqingyu"><img src="https://avatars.githubusercontent.com/u/30541930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>杜庆愉</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=duqingyu" title="Code">💻</a></td>
|
|
116
|
+
<td align="center"><a href="https://github.com/linxiang07"><img src="https://avatars.githubusercontent.com/u/40119767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>linxiang</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=linxiang07" title="Code">💻</a></td>
|
|
117
|
+
</tr>
|
|
118
|
+
<tr>
|
|
119
|
+
<td align="center"><a href="https://github.com/nextniko"><img src="https://avatars.githubusercontent.com/u/40553790?v=4?s=100" width="100px;" alt=""/><br /><sub><b>掘墓忍者</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=nextniko" title="Code">💻</a></td>
|
|
120
|
+
</tr>
|
|
121
|
+
</table>
|
|
122
|
+
|
|
123
|
+
<!-- markdownlint-restore -->
|
|
124
|
+
<!-- prettier-ignore-end -->
|
|
125
|
+
|
|
126
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
127
|
+
|
|
128
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
[MIT](https://github.com/DevCloudFE/vue-devui/blob/dev/LICENSE)
|
|
@@ -375,14 +375,13 @@ function useKeyBoardHandle(dropDownRef, visible, searchList, selectedIndex, sear
|
|
|
375
375
|
handlekeyDown
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
|
-
var autoComplete = "";
|
|
379
378
|
class View {
|
|
380
379
|
constructor() {
|
|
381
380
|
__publicField(this, "top", "50%");
|
|
382
381
|
__publicField(this, "left", "50%");
|
|
383
382
|
}
|
|
384
383
|
}
|
|
385
|
-
const
|
|
384
|
+
const loadingProps = {
|
|
386
385
|
message: String,
|
|
387
386
|
backdrop: Boolean,
|
|
388
387
|
view: {
|
|
@@ -395,7 +394,7 @@ const componentProps = {
|
|
|
395
394
|
default: false
|
|
396
395
|
}
|
|
397
396
|
};
|
|
398
|
-
class
|
|
397
|
+
class LoadingOptions {
|
|
399
398
|
constructor() {
|
|
400
399
|
__publicField(this, "target");
|
|
401
400
|
__publicField(this, "message");
|
|
@@ -410,7 +409,7 @@ var loading = "";
|
|
|
410
409
|
var Loading = defineComponent({
|
|
411
410
|
name: "DLoading",
|
|
412
411
|
inheritAttrs: false,
|
|
413
|
-
props:
|
|
412
|
+
props: loadingProps,
|
|
414
413
|
setup(props) {
|
|
415
414
|
const style = {
|
|
416
415
|
top: props.view.top,
|
|
@@ -482,14 +481,18 @@ function unmountComponent(ComponnetInstance) {
|
|
|
482
481
|
const loadingConstructor = defineComponent(Loading);
|
|
483
482
|
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
484
483
|
const isEmpty = (val) => {
|
|
485
|
-
if (!val)
|
|
484
|
+
if (!val) {
|
|
486
485
|
return true;
|
|
487
|
-
|
|
486
|
+
}
|
|
487
|
+
if (Array.isArray(val)) {
|
|
488
488
|
return val.length === 0;
|
|
489
|
-
|
|
489
|
+
}
|
|
490
|
+
if (val instanceof Set || val instanceof Map) {
|
|
490
491
|
return val.size === 0;
|
|
491
|
-
|
|
492
|
+
}
|
|
493
|
+
if (val instanceof Promise) {
|
|
492
494
|
return false;
|
|
495
|
+
}
|
|
493
496
|
if (typeof val === "object") {
|
|
494
497
|
try {
|
|
495
498
|
return Object.keys(val).length === 0;
|
|
@@ -523,11 +526,13 @@ const unmount = (el) => {
|
|
|
523
526
|
unmountComponent(el.instance);
|
|
524
527
|
};
|
|
525
528
|
const toggleLoading = (el, binding) => {
|
|
529
|
+
var _a, _b, _c;
|
|
526
530
|
if (binding.value) {
|
|
527
531
|
const vals = isPromise(binding.value);
|
|
528
|
-
if (vals === "error")
|
|
532
|
+
if (vals === "error") {
|
|
529
533
|
return;
|
|
530
|
-
|
|
534
|
+
}
|
|
535
|
+
(_c = (_b = (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.proxy) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b);
|
|
531
536
|
el.appendChild(el.mask);
|
|
532
537
|
cacheInstance.add(el);
|
|
533
538
|
if (vals) {
|
|
@@ -551,7 +556,7 @@ const removeAttribute = (el) => {
|
|
|
551
556
|
};
|
|
552
557
|
const handleProps = (el, vprops) => {
|
|
553
558
|
var _a;
|
|
554
|
-
const props = __spreadValues(__spreadValues({}, new
|
|
559
|
+
const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
|
|
555
560
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
556
561
|
const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
557
562
|
el.style.position = props.positionType;
|
|
@@ -566,8 +571,9 @@ const loadingDirective = {
|
|
|
566
571
|
!isEmpty(binding.value) && toggleLoading(el, binding);
|
|
567
572
|
},
|
|
568
573
|
updated: function(el, binding, vnode) {
|
|
569
|
-
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el))
|
|
574
|
+
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el)) {
|
|
570
575
|
return;
|
|
576
|
+
}
|
|
571
577
|
!cacheInstance.has(el) && handleProps(el, vnode.props);
|
|
572
578
|
removeAttribute(el);
|
|
573
579
|
toggleLoading(el, binding);
|
|
@@ -851,6 +857,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
851
857
|
};
|
|
852
858
|
}
|
|
853
859
|
});
|
|
860
|
+
var autoComplete = "";
|
|
854
861
|
function _isSlot(s) {
|
|
855
862
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
856
863
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Oe=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable;var z=(v,t,y)=>t in v?Oe(v,t,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[t]=y,I=(v,t)=>{for(var y in t||(t={}))Be.call(t,y)&&z(v,y,t[y]);if(ie)for(var y of ie(t))je.call(t,y)&&z(v,y,t[y]);return v};var T=(v,t,y)=>(z(v,typeof t!="symbol"?t+"":t,y),y);(function(v,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],t):(v=typeof globalThis!="undefined"?globalThis:v||self,t(v.index={},v.Vue,v.dom))})(this,function(v,t,y){"use strict";const _={modelValue:{type:String,default:""},source:{type:Array,default:null},allowEmptyValueSearch:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},position:{type:Array,default:["bottom-end"]},disabled:{type:Boolean,default:!1},delay:{type:Number,default:300},disabledKey:{type:String,default:null},formatter:{type:Function,default:e=>typeof e=="string"?e:e!==null?e.label||e.toString():""},isSearching:{type:Boolean,default:!1},sceneType:{type:String,default:null},searchFn:{type:Function,default:null},tipsText:{type:String,default:"\u6700\u8FD1\u8F93\u5165"},latestSource:{type:Array,default:null},valueParser:{type:Function,default:e=>e},enableLazyLoad:{type:Boolean,default:!1},width:{type:Number,default:400},showAnimation:{type:Boolean,default:!0},maxHeight:{type:Number,default:300},transInputFocusEmit:{type:Function,default:null},selectValue:{type:Function,default:null},loadMore:{type:Function,default:null}},R=Symbol("DropdownPropsKey");function ue(e,n){const o=(r,u)=>{const i={item:r,index:u};return e.slots.item?e.slots.item(i):null},a=()=>e.slots.nothing?e.slots.nothing(n.value):null,l=()=>e.slots.searching?e.slots.searching(n.value):null;return{customRenderSolts:()=>{const r={};return e.slots.item&&(r.itemTemplate=o),e.slots.nothing&&(r.noResultItemTemplate=a),e.slots.searching&&(r.searchingTemplate=l),r}}}function de(e,n,o,a,l){const s=t.ref([]),r=t.ref(!1),u=d=>{const p=[];return o.value.forEach(c=>{let m=l.value(c);m=m.toLowerCase(),m.startsWith(d)&&p.push(c)}),p};return{handleSearch:async(d,p=!1)=>{if(d===""&&!n.value){s.value=[],r.value=!1;return}let c=[];d=d.toLowerCase(),p?c=o.value:a.value?c=await a.value(d):c=u(d),s.value=c,s.value.length===0?r.value=!0:r.value=!1},recentlyFocus:d=>{d&&(s.value=d)},searchList:s,showNoResultItemTemplate:r}}function ce(e,n,o,a,l,s,r,u,i,f){const d=t.ref(!1),p=t.ref(),c=t.ref(!1),h=((V,F)=>{let g;return E=>{g&&clearTimeout(g),g=setTimeout(async()=>{c.value=!0,await V(E),c.value=!1},F)}})(async V=>{await r(V),d.value=!0},s.value),C=V=>{const F=V.target;c.value=!1,o.value=!1,e.emit("update:modelValue",F.value),h(F.value)},S=()=>{r(a.value),i(f==null?void 0:f.value),u.value&&u.value()},b=()=>{d.value=!1,c.value=!1,o.value=!1};return{handleClose:b,toggleMenu:()=>{l.value||(d.value?b():(d.value=!0,e.slots.noResultItemTemplate&&n.value.length===0&&a.value.trim()!==""&&(o.value=!0)))},onInput:C,onFocus:S,inputRef:p,visible:d,searchStatus:c}}function fe(e,n,o,a,l,s){const r=t.ref(0),u=f=>{if(n.value.length===0)return 0;let d=0;return n.value.forEach((p,c)=>{typeof p=="string"?p===f&&(d=c):String(p.label)===f&&(d=c)}),d===-1?0:d};return{selectedIndex:r,selectOptionClick:async f=>{const d=l.value(f);e.emit("update:modelValue",d),s(),await a(d),r.value=u(d),o.value&&o.value(d)}}}function pe(e,n,o){const a=t.ref(!1),l=t.ref(),s=()=>{if(!e.enableLazyLoad&&a)return;const u=l.value,i=u.scrollHeight,f=u.clientHeight+u.scrollTop;f>=i&&f>=e.maxHeight&&(e.loadMore(),a.value=!0)};async function r(){await o(e.modelValue,e.enableLazyLoad),a.value=!1}return n.expose({loadFinish:r}),{showLoading:a,dropDownRef:l,loadMore:s}}function ve(e,n,o,a,l,s,r,u){var p;const i=t.ref((p=a.value)!=null?p:0),f=c=>{const m=e.value,w=m.children[c];t.nextTick(()=>{if(w.scrollIntoViewIfNeeded)w.scrollIntoViewIfNeeded(!1);else{const h=m.getBoundingClientRect(),C=w.getBoundingClientRect();(C.bottom>h.bottom||C.top<h.top)&&w.scrollIntoView(!1)}})};return{hoverIndex:i,handlekeyDown:c=>{var h;const m=c.key||c.code;if(m==="Escape"&&(n.value&&o.value.length||l.value||s.value)){u();return}const w=n.value&&o.value.length&&!l.value&&!s.value;if(m==="ArrowDown"&&w){if(i.value===o.value.length-1){i.value=0,f(i.value);return}i.value=i.value+1,f(i.value)}else if(m==="ArrowUp"&&w){if(i.value===0){i.value=o.value.length-1,f(i.value);return}i.value=i.value-1,f(i.value)}if(m==="Enter"&&w){r(o.value[i.value]),i.value=(h=a.value)!=null?h:0;return}}}}var ze="";class ${constructor(){T(this,"top","50%");T(this,"left","50%")}}const me={message:String,backdrop:Boolean,view:{type:Object,default:()=>new $},zIndex:Number,isFull:{type:Boolean,default:!1}};class ye{constructor(){T(this,"target");T(this,"message");T(this,"loadingTemplateRef");T(this,"backdrop",!0);T(this,"positionType","relative");T(this,"view",new $);T(this,"zIndex")}}var _e="",ge=t.defineComponent({name:"DLoading",inheritAttrs:!1,props:me,setup(e){const n={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(n.background="none");const o=t.ref(!1);return{style:n,isShow:o,open:()=>{o.value=!0},close:()=>{o.value=!1}}},render(){var r;const{isShow:e,isFull:n,backdrop:o,style:a,message:l,$slots:s}=this;return e&&t.createVNode("div",{class:["devui-loading-contanier",n?"devui-loading--full":""]},[((r=s.default)==null?void 0:r.call(s))||t.createVNode("div",{class:"devui-loading-wrapper"},[o?t.createVNode("div",{class:"devui-loading-mask"},null):null,t.createVNode("div",{style:a,class:"devui-loading-area"},[t.createVNode("div",{class:"devui-busy-default-spinner"},[t.createVNode("div",{class:"devui-loading-bar1"},null),t.createVNode("div",{class:"devui-loading-bar2"},null),t.createVNode("div",{class:"devui-loading-bar3"},null),t.createVNode("div",{class:"devui-loading-bar4"},null)]),l?t.createVNode("span",{class:"devui-loading-text"},[l]):null])])])}});const K=Symbol("dev_component_container");function we(e,n,o=null){const a=t.h(e,I({},n),o),l=document.createElement("div");return a[K]=l,t.render(a,l),a.component}function he(e){t.render(null,e==null?void 0:e.vnode[K])}const be=t.defineComponent(ge),D=new WeakSet,x=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},U=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),Ve=e=>{switch(U(e)){case"promise":return[e];case"array":return e.some(o=>U(o)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},q=e=>{D.delete(e),e.instance.proxy.close(),he(e.instance)},W=(e,n)=>{if(n.value){const o=Ve(n.value);if(o==="error")return;e.instance.proxy.open(),e.appendChild(e.mask),D.add(e),o&&Promise.all(o).catch(a=>{console.error(new Error("Promise handling errors"),a)}).finally(()=>{q(e)})}else q(e)},Y=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},X=(e,n)=>{var s;const o=I(I({},new ye),n),a=o.loadingTemplateRef,l=we(be,I({},o),a?()=>a:null);e.style.position=o.positionType,e.options=o,e.instance=l,e.mask=(s=l==null?void 0:l.proxy)==null?void 0:s.$el},Te={mounted:function(e,n,o){X(e,o.props),Y(e),!x(n.value)&&W(e,n)},updated:function(e,n,o){!x(n.value)&&D.has(e)||x(n.value)&&!D.has(e)||(!D.has(e)&&X(e,o.props),Y(e),W(e,n))}};var G=t.defineComponent({name:"DAutoCompleteDropdown",directives:{dLoading:Te},setup(e,n){const o=t.inject(R),{visible:a,selectedIndex:l,selectOptionClick:s,searchList:r,searchStatus:u,dropDownRef:i,loadMore:f,showLoading:d,showNoResultItemTemplate:p,latestSource:c,modelValue:m,hoverIndex:w,valueParser:h}=o,{disabled:C,maxHeight:S,formatter:b,disabledKey:A,isSearching:V}=o.props,F=g=>{g=h.value(g),!(typeof g=="object"&&g[A])&&s(g)};return()=>t.withDirectives(t.createVNode("div",{class:["devui-dropdown-menu","devui-dropdown-menu-cdk",C&&"disabled",c.value&&"devui-dropdown-latestSource"]},[t.createVNode("ul",{ref:i,class:"devui-list-unstyled scroll-height",style:{maxHeight:`${S}px`},onScroll:f},[V&&n.slots.searchingTemplate&&(u==null?void 0:u.value)&&t.createVNode("li",{class:"devui-is-searching-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.searchingTemplate()])]),c.value&&!m.value&&t.createVNode("li",{class:"devui-popup-tips"},[t.createTextVNode("\u6700\u8FD1\u8F93\u5165")]),!p.value&&!(u==null?void 0:u.value)&&r!=null&&r.value.length>0&&r.value.map((g,E)=>t.createVNode("li",{onClick:()=>F(g),class:["devui-dropdown-item",l.value===E&&"selected",{disabled:A&&typeof g=="object"&&g[A]},{"devui-dropdown-bg":w.value===E}],title:b(g),key:b(g)},[n.slots.itemTemplate?n.slots.itemTemplate(g,E):b(g)])),!(u==null?void 0:u.value)&&r.value.length===0&&n.slots.noResultItemTemplate&&p.value&&t.createVNode("li",{class:"devui-no-result-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.noResultItemTemplate()])])])]),[[t.resolveDirective("dLoading"),d.value],[t.vShow,a.value&&r.value.length>0||n.slots.noResultItemTemplate&&p.value||V&&n.slots.searchingTemplate&&(u==null?void 0:u.value)]])}});const Ne=typeof window!="undefined";function J(e,n,o){document.addEventListener?e&&n&&o&&e.addEventListener(n,o,!1):e&&n&&o&&e.attachEvent("on"+n,o)}const N=Symbol("@@clickoutside"),P=new Map;let Q,O=0,Z=!0;function ee(e,n,o){return Ne&&Z&&(Z=!1,J(document,"mousedown",a=>{Q=a}),J(document,"mouseup",a=>{for(const[l,s]of P)s[N].documentHandler(a,Q)})),function(a,l){!o||!n.instance||!a.target||!l.target||e.contains(a.target)||e.contains(l.target)||e===a.target||e[N].bindingFn&&e[N].bindingFn()}}const Ce={beforeMount:function(e,n,o){O++,P.set(O,e),e[N]={nid:O,documentHandler:ee(e,n,o),bindingFn:n.value}},updated:function(e,n,o){e[N].documentHandler=ee(e,n,o),e[N].bindingFn=n.value},unmounted:function(e){P.delete(e[N].nid),delete e[N]}},Ae={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function Fe(e){const n=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const a=window.getComputedStyle(o);if(n.test(a.overflow+a.overflowX+a.overflowY))return o}return window}function Se(e,n,o,a){let{x:l,y:s}=n;if(!e){const{width:r,height:u}=a;l&&o.includes("start")&&(l=12),l&&o.includes("end")&&(l=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=u-14)}return{x:l,y:s}}function Ee(e,n){const o=t.ref(),a=t.ref();let l=null;const s=(u,i,f,d)=>{const{x:p,y:c}=Se(e.isArrowCenter,f,i,d.getBoundingClientRect()),m={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(u.style,{left:p?`${p}px`:"",top:c?`${c}px`:"",right:"",bottom:"",[m]:"-4px"})},r=async()=>{const u=e.origin,i=t.unref(o.value),f=t.unref(a.value),d=[y.shift(),y.offset(e.offset),y.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&d.push(y.arrow({element:f}));const{x:p,y:c,placement:m,middlewareData:w}=await y.computePosition(u,i,{strategy:"fixed",middleware:d});n("positionChange",m),Object.assign(i.style,{top:`${c}px`,left:`${p}px`}),e.showArrow&&s(f,m,w.arrow,i)};return t.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(l=Fe(e.origin),t.nextTick(r),l==null||l.addEventListener("scroll",r),l!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),t.onUnmounted(()=>{l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:a,overlayRef:o,updatePosition:r}}var $e="";const te=t.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:Ae,emits:["update:modelValue","positionChange"],setup(e,{slots:n,attrs:o,emit:a,expose:l}){const{arrowRef:s,overlayRef:r,updatePosition:u}=Ee(e,a);return l({updatePosition:u}),()=>{var i;return e.modelValue&&t.createVNode("div",t.mergeProps({ref:r,class:"devui-flexible-overlay"},o),[(i=n.default)==null?void 0:i.call(n),e.showArrow&&t.createVNode("div",{ref:s,class:"devui-flexible-overlay-arrow"},null)])}}});function oe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}var B=t.defineComponent({name:"DAutoComplete",directives:{ClickOutside:Ce},props:_,emits:["update:modelValue"],setup(e,n){const{disabled:o,modelValue:a,width:l,delay:s,allowEmptyValueSearch:r,appendToBody:u,formatter:i,transInputFocusEmit:f,selectValue:d,source:p,searchFn:c,position:m,latestSource:w,showAnimation:h,valueParser:C}=t.toRefs(e),{handleSearch:S,searchList:b,showNoResultItemTemplate:A,recentlyFocus:V}=de(n,r,p,c,i),{onInput:F,onFocus:g,inputRef:E,visible:L,searchStatus:ne,handleClose:j,toggleMenu:ke}=ce(n,b,A,a,o,s,S,f,V,w),{selectedIndex:le,selectOptionClick:ae}=fe(n,b,d,S,i,j),{showLoading:De,dropDownRef:re,loadMore:Ie}=pe(e,n,S),{customRenderSolts:se}=ue(n,a),{hoverIndex:Re,handlekeyDown:xe}=ve(re,L,b,le,ne,A,ae,j);t.provide(R,{props:e,visible:L,term:"",searchList:b,selectedIndex:le,searchStatus:ne,selectOptionClick:ae,dropDownRef:re,showLoading:De,loadMore:Ie,latestSource:w,modelValue:a,showNoResultItemTemplate:A,hoverIndex:Re,valueParser:C});const M=t.ref(),Pe=()=>{if(u.value){let k;return t.createVNode(t.Teleport,{to:"body"},{default:()=>[t.createVNode(t.Transition,{name:h?"fade":""},{default:()=>[t.createVNode(te,{"show-arrow":!0,origin:M.value,position:m.value,modelValue:L.value,"onUpdate:modelValue":H=>L.value=H},{default:()=>[t.createVNode("div",{class:"devui-auto-complete-menu",style:{width:`
|
|
1
|
+
var Pe=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable;var z=(v,t,y)=>t in v?Pe(v,t,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[t]=y,I=(v,t)=>{for(var y in t||(t={}))Be.call(t,y)&&z(v,y,t[y]);if(ie)for(var y of ie(t))je.call(t,y)&&z(v,y,t[y]);return v};var T=(v,t,y)=>(z(v,typeof t!="symbol"?t+"":t,y),y);(function(v,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],t):(v=typeof globalThis!="undefined"?globalThis:v||self,t(v.index={},v.Vue,v.dom))})(this,function(v,t,y){"use strict";const _={modelValue:{type:String,default:""},source:{type:Array,default:null},allowEmptyValueSearch:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},position:{type:Array,default:["bottom-end"]},disabled:{type:Boolean,default:!1},delay:{type:Number,default:300},disabledKey:{type:String,default:null},formatter:{type:Function,default:e=>typeof e=="string"?e:e!==null?e.label||e.toString():""},isSearching:{type:Boolean,default:!1},sceneType:{type:String,default:null},searchFn:{type:Function,default:null},tipsText:{type:String,default:"\u6700\u8FD1\u8F93\u5165"},latestSource:{type:Array,default:null},valueParser:{type:Function,default:e=>e},enableLazyLoad:{type:Boolean,default:!1},width:{type:Number,default:400},showAnimation:{type:Boolean,default:!0},maxHeight:{type:Number,default:300},transInputFocusEmit:{type:Function,default:null},selectValue:{type:Function,default:null},loadMore:{type:Function,default:null}},R=Symbol("DropdownPropsKey");function ue(e,n){const o=(r,u)=>{const i={item:r,index:u};return e.slots.item?e.slots.item(i):null},a=()=>e.slots.nothing?e.slots.nothing(n.value):null,l=()=>e.slots.searching?e.slots.searching(n.value):null;return{customRenderSolts:()=>{const r={};return e.slots.item&&(r.itemTemplate=o),e.slots.nothing&&(r.noResultItemTemplate=a),e.slots.searching&&(r.searchingTemplate=l),r}}}function de(e,n,o,a,l){const s=t.ref([]),r=t.ref(!1),u=d=>{const p=[];return o.value.forEach(c=>{let m=l.value(c);m=m.toLowerCase(),m.startsWith(d)&&p.push(c)}),p};return{handleSearch:async(d,p=!1)=>{if(d===""&&!n.value){s.value=[],r.value=!1;return}let c=[];d=d.toLowerCase(),p?c=o.value:a.value?c=await a.value(d):c=u(d),s.value=c,s.value.length===0?r.value=!0:r.value=!1},recentlyFocus:d=>{d&&(s.value=d)},searchList:s,showNoResultItemTemplate:r}}function ce(e,n,o,a,l,s,r,u,i,f){const d=t.ref(!1),p=t.ref(),c=t.ref(!1),h=((V,F)=>{let g;return E=>{g&&clearTimeout(g),g=setTimeout(async()=>{c.value=!0,await V(E),c.value=!1},F)}})(async V=>{await r(V),d.value=!0},s.value),C=V=>{const F=V.target;c.value=!1,o.value=!1,e.emit("update:modelValue",F.value),h(F.value)},S=()=>{r(a.value),i(f==null?void 0:f.value),u.value&&u.value()},b=()=>{d.value=!1,c.value=!1,o.value=!1};return{handleClose:b,toggleMenu:()=>{l.value||(d.value?b():(d.value=!0,e.slots.noResultItemTemplate&&n.value.length===0&&a.value.trim()!==""&&(o.value=!0)))},onInput:C,onFocus:S,inputRef:p,visible:d,searchStatus:c}}function fe(e,n,o,a,l,s){const r=t.ref(0),u=f=>{if(n.value.length===0)return 0;let d=0;return n.value.forEach((p,c)=>{typeof p=="string"?p===f&&(d=c):String(p.label)===f&&(d=c)}),d===-1?0:d};return{selectedIndex:r,selectOptionClick:async f=>{const d=l.value(f);e.emit("update:modelValue",d),s(),await a(d),r.value=u(d),o.value&&o.value(d)}}}function pe(e,n,o){const a=t.ref(!1),l=t.ref(),s=()=>{if(!e.enableLazyLoad&&a)return;const u=l.value,i=u.scrollHeight,f=u.clientHeight+u.scrollTop;f>=i&&f>=e.maxHeight&&(e.loadMore(),a.value=!0)};async function r(){await o(e.modelValue,e.enableLazyLoad),a.value=!1}return n.expose({loadFinish:r}),{showLoading:a,dropDownRef:l,loadMore:s}}function ve(e,n,o,a,l,s,r,u){var p;const i=t.ref((p=a.value)!=null?p:0),f=c=>{const m=e.value,w=m.children[c];t.nextTick(()=>{if(w.scrollIntoViewIfNeeded)w.scrollIntoViewIfNeeded(!1);else{const h=m.getBoundingClientRect(),C=w.getBoundingClientRect();(C.bottom>h.bottom||C.top<h.top)&&w.scrollIntoView(!1)}})};return{hoverIndex:i,handlekeyDown:c=>{var h;const m=c.key||c.code;if(m==="Escape"&&(n.value&&o.value.length||l.value||s.value)){u();return}const w=n.value&&o.value.length&&!l.value&&!s.value;if(m==="ArrowDown"&&w){if(i.value===o.value.length-1){i.value=0,f(i.value);return}i.value=i.value+1,f(i.value)}else if(m==="ArrowUp"&&w){if(i.value===0){i.value=o.value.length-1,f(i.value);return}i.value=i.value-1,f(i.value)}if(m==="Enter"&&w){r(o.value[i.value]),i.value=(h=a.value)!=null?h:0;return}}}}class ${constructor(){T(this,"top","50%");T(this,"left","50%")}}const me={message:String,backdrop:Boolean,view:{type:Object,default:()=>new $},zIndex:Number,isFull:{type:Boolean,default:!1}};class ye{constructor(){T(this,"target");T(this,"message");T(this,"loadingTemplateRef");T(this,"backdrop",!0);T(this,"positionType","relative");T(this,"view",new $);T(this,"zIndex")}}var ze="",ge=t.defineComponent({name:"DLoading",inheritAttrs:!1,props:me,setup(e){const n={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(n.background="none");const o=t.ref(!1);return{style:n,isShow:o,open:()=>{o.value=!0},close:()=>{o.value=!1}}},render(){var r;const{isShow:e,isFull:n,backdrop:o,style:a,message:l,$slots:s}=this;return e&&t.createVNode("div",{class:["devui-loading-contanier",n?"devui-loading--full":""]},[((r=s.default)==null?void 0:r.call(s))||t.createVNode("div",{class:"devui-loading-wrapper"},[o?t.createVNode("div",{class:"devui-loading-mask"},null):null,t.createVNode("div",{style:a,class:"devui-loading-area"},[t.createVNode("div",{class:"devui-busy-default-spinner"},[t.createVNode("div",{class:"devui-loading-bar1"},null),t.createVNode("div",{class:"devui-loading-bar2"},null),t.createVNode("div",{class:"devui-loading-bar3"},null),t.createVNode("div",{class:"devui-loading-bar4"},null)]),l?t.createVNode("span",{class:"devui-loading-text"},[l]):null])])])}});const K=Symbol("dev_component_container");function we(e,n,o=null){const a=t.h(e,I({},n),o),l=document.createElement("div");return a[K]=l,t.render(a,l),a.component}function he(e){t.render(null,e==null?void 0:e.vnode[K])}const be=t.defineComponent(ge),D=new WeakSet,x=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},U=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),Ve=e=>{switch(U(e)){case"promise":return[e];case"array":return e.some(o=>U(o)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},q=e=>{D.delete(e),e.instance.proxy.close(),he(e.instance)},W=(e,n)=>{var o,a,l;if(n.value){const s=Ve(n.value);if(s==="error")return;(l=(a=(o=e==null?void 0:e.instance)==null?void 0:o.proxy)==null?void 0:a.open)==null||l.call(a),e.appendChild(e.mask),D.add(e),s&&Promise.all(s).catch(r=>{console.error(new Error("Promise handling errors"),r)}).finally(()=>{q(e)})}else q(e)},Y=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},X=(e,n)=>{var s;const o=I(I({},new ye),n),a=o.loadingTemplateRef,l=we(be,I({},o),a?()=>a:null);e.style.position=o.positionType,e.options=o,e.instance=l,e.mask=(s=l==null?void 0:l.proxy)==null?void 0:s.$el},Te={mounted:function(e,n,o){X(e,o.props),Y(e),!x(n.value)&&W(e,n)},updated:function(e,n,o){!x(n.value)&&D.has(e)||x(n.value)&&!D.has(e)||(!D.has(e)&&X(e,o.props),Y(e),W(e,n))}};var G=t.defineComponent({name:"DAutoCompleteDropdown",directives:{dLoading:Te},setup(e,n){const o=t.inject(R),{visible:a,selectedIndex:l,selectOptionClick:s,searchList:r,searchStatus:u,dropDownRef:i,loadMore:f,showLoading:d,showNoResultItemTemplate:p,latestSource:c,modelValue:m,hoverIndex:w,valueParser:h}=o,{disabled:C,maxHeight:S,formatter:b,disabledKey:A,isSearching:V}=o.props,F=g=>{g=h.value(g),!(typeof g=="object"&&g[A])&&s(g)};return()=>t.withDirectives(t.createVNode("div",{class:["devui-dropdown-menu","devui-dropdown-menu-cdk",C&&"disabled",c.value&&"devui-dropdown-latestSource"]},[t.createVNode("ul",{ref:i,class:"devui-list-unstyled scroll-height",style:{maxHeight:`${S}px`},onScroll:f},[V&&n.slots.searchingTemplate&&(u==null?void 0:u.value)&&t.createVNode("li",{class:"devui-is-searching-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.searchingTemplate()])]),c.value&&!m.value&&t.createVNode("li",{class:"devui-popup-tips"},[t.createTextVNode("\u6700\u8FD1\u8F93\u5165")]),!p.value&&!(u==null?void 0:u.value)&&r!=null&&r.value.length>0&&r.value.map((g,E)=>t.createVNode("li",{onClick:()=>F(g),class:["devui-dropdown-item",l.value===E&&"selected",{disabled:A&&typeof g=="object"&&g[A]},{"devui-dropdown-bg":w.value===E}],title:b(g),key:b(g)},[n.slots.itemTemplate?n.slots.itemTemplate(g,E):b(g)])),!(u==null?void 0:u.value)&&r.value.length===0&&n.slots.noResultItemTemplate&&p.value&&t.createVNode("li",{class:"devui-no-result-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.noResultItemTemplate()])])])]),[[t.resolveDirective("dLoading"),d.value],[t.vShow,a.value&&r.value.length>0||n.slots.noResultItemTemplate&&p.value||V&&n.slots.searchingTemplate&&(u==null?void 0:u.value)]])}});const Ne=typeof window!="undefined";function J(e,n,o){document.addEventListener?e&&n&&o&&e.addEventListener(n,o,!1):e&&n&&o&&e.attachEvent("on"+n,o)}const N=Symbol("@@clickoutside"),O=new Map;let Q,P=0,Z=!0;function ee(e,n,o){return Ne&&Z&&(Z=!1,J(document,"mousedown",a=>{Q=a}),J(document,"mouseup",a=>{for(const[l,s]of O)s[N].documentHandler(a,Q)})),function(a,l){!o||!n.instance||!a.target||!l.target||e.contains(a.target)||e.contains(l.target)||e===a.target||e[N].bindingFn&&e[N].bindingFn()}}const Ce={beforeMount:function(e,n,o){P++,O.set(P,e),e[N]={nid:P,documentHandler:ee(e,n,o),bindingFn:n.value}},updated:function(e,n,o){e[N].documentHandler=ee(e,n,o),e[N].bindingFn=n.value},unmounted:function(e){O.delete(e[N].nid),delete e[N]}},Ae={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function Fe(e){const n=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const a=window.getComputedStyle(o);if(n.test(a.overflow+a.overflowX+a.overflowY))return o}return window}function Se(e,n,o,a){let{x:l,y:s}=n;if(!e){const{width:r,height:u}=a;l&&o.includes("start")&&(l=12),l&&o.includes("end")&&(l=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=u-14)}return{x:l,y:s}}function Ee(e,n){const o=t.ref(),a=t.ref();let l=null;const s=(u,i,f,d)=>{const{x:p,y:c}=Se(e.isArrowCenter,f,i,d.getBoundingClientRect()),m={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(u.style,{left:p?`${p}px`:"",top:c?`${c}px`:"",right:"",bottom:"",[m]:"-4px"})},r=async()=>{const u=e.origin,i=t.unref(o.value),f=t.unref(a.value),d=[y.shift(),y.offset(e.offset),y.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&d.push(y.arrow({element:f}));const{x:p,y:c,placement:m,middlewareData:w}=await y.computePosition(u,i,{strategy:"fixed",middleware:d});n("positionChange",m),Object.assign(i.style,{top:`${c}px`,left:`${p}px`}),e.showArrow&&s(f,m,w.arrow,i)};return t.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(l=Fe(e.origin),t.nextTick(r),l==null||l.addEventListener("scroll",r),l!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),t.onUnmounted(()=>{l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:a,overlayRef:o,updatePosition:r}}var _e="";const te=t.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:Ae,emits:["update:modelValue","positionChange"],setup(e,{slots:n,attrs:o,emit:a,expose:l}){const{arrowRef:s,overlayRef:r,updatePosition:u}=Ee(e,a);return l({updatePosition:u}),()=>{var i;return e.modelValue&&t.createVNode("div",t.mergeProps({ref:r,class:"devui-flexible-overlay"},o),[(i=n.default)==null?void 0:i.call(n),e.showArrow&&t.createVNode("div",{ref:s,class:"devui-flexible-overlay-arrow"},null)])}}});var $e="";function oe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}var B=t.defineComponent({name:"DAutoComplete",directives:{ClickOutside:Ce},props:_,emits:["update:modelValue"],setup(e,n){const{disabled:o,modelValue:a,width:l,delay:s,allowEmptyValueSearch:r,appendToBody:u,formatter:i,transInputFocusEmit:f,selectValue:d,source:p,searchFn:c,position:m,latestSource:w,showAnimation:h,valueParser:C}=t.toRefs(e),{handleSearch:S,searchList:b,showNoResultItemTemplate:A,recentlyFocus:V}=de(n,r,p,c,i),{onInput:F,onFocus:g,inputRef:E,visible:L,searchStatus:ne,handleClose:j,toggleMenu:ke}=ce(n,b,A,a,o,s,S,f,V,w),{selectedIndex:le,selectOptionClick:ae}=fe(n,b,d,S,i,j),{showLoading:De,dropDownRef:re,loadMore:Ie}=pe(e,n,S),{customRenderSolts:se}=ue(n,a),{hoverIndex:Re,handlekeyDown:xe}=ve(re,L,b,le,ne,A,ae,j);t.provide(R,{props:e,visible:L,term:"",searchList:b,selectedIndex:le,searchStatus:ne,selectOptionClick:ae,dropDownRef:re,showLoading:De,loadMore:Ie,latestSource:w,modelValue:a,showNoResultItemTemplate:A,hoverIndex:Re,valueParser:C});const M=t.ref(),Oe=()=>{if(u.value){let k;return t.createVNode(t.Teleport,{to:"body"},{default:()=>[t.createVNode(t.Transition,{name:h?"fade":""},{default:()=>[t.createVNode(te,{"show-arrow":!0,origin:M.value,position:m.value,modelValue:L.value,"onUpdate:modelValue":H=>L.value=H},{default:()=>[t.createVNode("div",{class:"devui-auto-complete-menu",style:{width:`
|
|
2
2
|
${l.value+"px"}
|
|
3
3
|
`}},[t.createVNode(G,null,oe(k=se())?k:{default:()=>[k]})])]})]})]})}else{let k;return t.createVNode(t.Transition,{name:h?"fade":""},{default:()=>[t.createVNode(te,{"show-arrow":!0,origin:M.value,position:m.value,modelValue:L.value,"onUpdate:modelValue":H=>L.value=H},{default:()=>[t.createVNode("div",{class:"devui-auto-complete-menu",style:{width:`
|
|
4
4
|
${l.value+"px"}
|
|
5
|
-
`}},[t.createVNode(G,null,oe(k=se())?k:{default:()=>[k]})])]})]})}};return()=>t.withDirectives(t.createVNode("div",{class:["devui-auto-complete","devui-form-group","devui-has-feedback",L.value&&"devui-select-open"],ref:M,style:{width:`${l.value+"px"}`}},[t.createVNode("input",{disabled:o.value,type:"text",onClick:ke,class:["devui-form-control","devui-dropdown-origin","devui-dropdown-origin-open",o.value&&"disabled"],placeholder:"Search",onInput:F,onFocus:g,value:a.value,ref:E,onKeydown:xe},null),
|
|
5
|
+
`}},[t.createVNode(G,null,oe(k=se())?k:{default:()=>[k]})])]})]})}};return()=>t.withDirectives(t.createVNode("div",{class:["devui-auto-complete","devui-form-group","devui-has-feedback",L.value&&"devui-select-open"],ref:M,style:{width:`${l.value+"px"}`}},[t.createVNode("input",{disabled:o.value,type:"text",onClick:ke,class:["devui-form-control","devui-dropdown-origin","devui-dropdown-origin-open",o.value&&"disabled"],placeholder:"Search",onInput:F,onFocus:g,value:a.value,ref:E,onKeydown:xe},null),Oe()]),[[t.resolveDirective("click-outside"),j]])}}),Le={title:"AutoComplete \u81EA\u52A8\u8865\u5168",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.component(B.name,B)}};v.AutoComplete=B,v.DropdownPropsKey=R,v.autoCompleteProps=_,v.default=Le,Object.defineProperty(v,"__esModule",{value:!0}),v[Symbol.toStringTag]="Module"});
|
package/auto-complete/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.devui-auto-complete .devui-dropdown-menu,.devui-auto-complete-menu .devui-dropdown-menu{width:100%;left:0!important;top:0!important;margin:0!important}.devui-auto-complete .devui-dropdown-menu ul,.devui-auto-complete-menu .devui-dropdown-menu ul{width:100%;padding:0}.devui-auto-complete .devui-form-control{padding:4px 8px}.devui-auto-complete .active,.devui-auto-complete-menu .active{background:var(--devui-list-item-hover-bg, #f2f5fc)}.devui-auto-complete .devui-dropdown-menu,.devui-auto-complete-menu .devui-dropdown-menu{width:100%;display:block}.devui-auto-complete .devui-dropdown-menu-cdk,.devui-auto-complete-menu .devui-dropdown-menu-cdk{position:static}.devui-auto-complete .devui-dropdown-item,.devui-auto-complete-menu .devui-dropdown-item{cursor:pointer;display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:14px}.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected,.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected,.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover{color:var(--devui-list-item-active-text, #ffffff)!important;background-color:var(--devui-list-item-active-bg, #5e7ce0)!important}.devui-auto-complete .devui-no-result-template,.devui-auto-complete .devui-is-searching-template,.devui-auto-complete-menu .devui-no-result-template,.devui-auto-complete-menu .devui-is-searching-template{display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:not-allowed;background-color:var(--devui-disabled-bg, #f5f5f6);color:var(--devui-disabled-text, #adb0b8);line-height:14px}.devui-auto-complete .devui-no-result-template:hover,.devui-auto-complete .devui-no-result-template:active,.devui-auto-complete .devui-no-result-template:hover:active,.devui-auto-complete .devui-is-searching-template:hover,.devui-auto-complete .devui-is-searching-template:active,.devui-auto-complete .devui-is-searching-template:hover:active,.devui-auto-complete-menu .devui-no-result-template:hover,.devui-auto-complete-menu .devui-no-result-template:active,.devui-auto-complete-menu .devui-no-result-template:hover:active,.devui-auto-complete-menu .devui-is-searching-template:hover,.devui-auto-complete-menu .devui-is-searching-template:active,.devui-auto-complete-menu .devui-is-searching-template:hover:active{background-color:var(--devui-unavailable, #f5f5f6)}.devui-auto-complete .devui-dropdown-item.disabled,.devui-auto-complete .devui-dropdown-item.disabled:hover,.devui-auto-complete-menu .devui-dropdown-item.disabled,.devui-auto-complete-menu .devui-dropdown-item.disabled:hover{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-auto-complete ul.devui-list-unstyled,.devui-auto-complete-menu ul.devui-list-unstyled{margin:0;overflow-y:auto}.devui-auto-complete .devui-dropdown-bg,.devui-auto-complete-menu .devui-dropdown-bg{background:var(--devui-list-item-hover-bg, #f2f5fc);color:var(--devui-list-item-hover-text, #526ecc)}.devui-auto-complete .devui-popup-tips,.devui-auto-complete-menu .devui-popup-tips{color:var(--devui-text-weak, #575d6c);padding:4px 12px}.devui-auto-complete .devui-dropdown-latestSource ul,.devui-auto-complete-menu .devui-dropdown-latestSource ul{line-height:initial!important}
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(135deg) scale(1.5)}to{transform:rotate(270deg) scale(1)}}.devui-loading-mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #adb0b8);opacity:.3}.devui-loading-wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:9999}.devui-loading--hidden{overflow:hidden}.devui-loading-text{margin-left:10px}.devui-loading-area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-busy-default-spinner .devui-loading-bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-busy-default-spinner .devui-loading-bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-busy-default-spinner .devui-loading-bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-busy-default-spinner .devui-loading-bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-connected-overlay, 0 2px 8px 0) var(--devui-shadow, rgba(0, 0, 0, .2));z-index:1000}.devui-flexible-overlay-arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}@charset "UTF-8";.devui-auto-complete .devui-dropdown-menu,.devui-auto-complete-menu .devui-dropdown-menu{width:100%;left:0!important;top:0!important;margin:0!important}.devui-auto-complete .devui-dropdown-menu ul,.devui-auto-complete-menu .devui-dropdown-menu ul{width:100%;padding:0}.devui-auto-complete .devui-form-control{padding:4px 8px}.devui-auto-complete .active,.devui-auto-complete-menu .active{background:var(--devui-list-item-hover-bg, #f2f5fc)}.devui-auto-complete .devui-dropdown-menu,.devui-auto-complete-menu .devui-dropdown-menu{width:100%;display:block}.devui-auto-complete .devui-dropdown-menu-cdk,.devui-auto-complete-menu .devui-dropdown-menu-cdk{position:static}.devui-auto-complete .devui-dropdown-item,.devui-auto-complete-menu .devui-dropdown-item{cursor:pointer;display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:14px}.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected,.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected,.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover,.devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected .devui-auto-complete-menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover{color:var(--devui-list-item-active-text, #ffffff)!important;background-color:var(--devui-list-item-active-bg, #5e7ce0)!important}.devui-auto-complete .devui-no-result-template,.devui-auto-complete .devui-is-searching-template,.devui-auto-complete-menu .devui-no-result-template,.devui-auto-complete-menu .devui-is-searching-template{display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:not-allowed;background-color:var(--devui-disabled-bg, #f5f5f6);color:var(--devui-disabled-text, #adb0b8);line-height:14px}.devui-auto-complete .devui-no-result-template:hover,.devui-auto-complete .devui-no-result-template:active,.devui-auto-complete .devui-no-result-template:hover:active,.devui-auto-complete .devui-is-searching-template:hover,.devui-auto-complete .devui-is-searching-template:active,.devui-auto-complete .devui-is-searching-template:hover:active,.devui-auto-complete-menu .devui-no-result-template:hover,.devui-auto-complete-menu .devui-no-result-template:active,.devui-auto-complete-menu .devui-no-result-template:hover:active,.devui-auto-complete-menu .devui-is-searching-template:hover,.devui-auto-complete-menu .devui-is-searching-template:active,.devui-auto-complete-menu .devui-is-searching-template:hover:active{background-color:var(--devui-unavailable, #f5f5f6)}.devui-auto-complete .devui-dropdown-item.disabled,.devui-auto-complete .devui-dropdown-item.disabled:hover,.devui-auto-complete-menu .devui-dropdown-item.disabled,.devui-auto-complete-menu .devui-dropdown-item.disabled:hover{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-auto-complete ul.devui-list-unstyled,.devui-auto-complete-menu ul.devui-list-unstyled{margin:0;overflow-y:auto}.devui-auto-complete .devui-dropdown-bg,.devui-auto-complete-menu .devui-dropdown-bg{background:var(--devui-list-item-hover-bg, #f2f5fc);color:var(--devui-list-item-hover-text, #526ecc)}.devui-auto-complete .devui-popup-tips,.devui-auto-complete-menu .devui-popup-tips{color:var(--devui-text-weak, #575d6c);padding:4px 12px}.devui-auto-complete .devui-dropdown-latestSource ul,.devui-auto-complete-menu .devui-dropdown-latestSource ul{line-height:initial!important}
|
package/button/index.es.js
CHANGED
|
@@ -72,7 +72,7 @@ class View {
|
|
|
72
72
|
__publicField(this, "left", "50%");
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const loadingProps = {
|
|
76
76
|
message: String,
|
|
77
77
|
backdrop: Boolean,
|
|
78
78
|
view: {
|
|
@@ -85,7 +85,7 @@ const componentProps = {
|
|
|
85
85
|
default: false
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
class
|
|
88
|
+
class LoadingOptions {
|
|
89
89
|
constructor() {
|
|
90
90
|
__publicField(this, "target");
|
|
91
91
|
__publicField(this, "message");
|
|
@@ -100,7 +100,7 @@ var loading = "";
|
|
|
100
100
|
var Loading = defineComponent({
|
|
101
101
|
name: "DLoading",
|
|
102
102
|
inheritAttrs: false,
|
|
103
|
-
props:
|
|
103
|
+
props: loadingProps,
|
|
104
104
|
setup(props) {
|
|
105
105
|
const style = {
|
|
106
106
|
top: props.view.top,
|
|
@@ -172,14 +172,18 @@ function unmountComponent(ComponnetInstance) {
|
|
|
172
172
|
const loadingConstructor = defineComponent(Loading);
|
|
173
173
|
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
174
174
|
const isEmpty = (val) => {
|
|
175
|
-
if (!val)
|
|
175
|
+
if (!val) {
|
|
176
176
|
return true;
|
|
177
|
-
|
|
177
|
+
}
|
|
178
|
+
if (Array.isArray(val)) {
|
|
178
179
|
return val.length === 0;
|
|
179
|
-
|
|
180
|
+
}
|
|
181
|
+
if (val instanceof Set || val instanceof Map) {
|
|
180
182
|
return val.size === 0;
|
|
181
|
-
|
|
183
|
+
}
|
|
184
|
+
if (val instanceof Promise) {
|
|
182
185
|
return false;
|
|
186
|
+
}
|
|
183
187
|
if (typeof val === "object") {
|
|
184
188
|
try {
|
|
185
189
|
return Object.keys(val).length === 0;
|
|
@@ -213,11 +217,13 @@ const unmount = (el) => {
|
|
|
213
217
|
unmountComponent(el.instance);
|
|
214
218
|
};
|
|
215
219
|
const toggleLoading = (el, binding) => {
|
|
220
|
+
var _a, _b, _c;
|
|
216
221
|
if (binding.value) {
|
|
217
222
|
const vals = isPromise(binding.value);
|
|
218
|
-
if (vals === "error")
|
|
223
|
+
if (vals === "error") {
|
|
219
224
|
return;
|
|
220
|
-
|
|
225
|
+
}
|
|
226
|
+
(_c = (_b = (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.proxy) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b);
|
|
221
227
|
el.appendChild(el.mask);
|
|
222
228
|
cacheInstance.add(el);
|
|
223
229
|
if (vals) {
|
|
@@ -241,7 +247,7 @@ const removeAttribute = (el) => {
|
|
|
241
247
|
};
|
|
242
248
|
const handleProps = (el, vprops) => {
|
|
243
249
|
var _a;
|
|
244
|
-
const props = __spreadValues(__spreadValues({}, new
|
|
250
|
+
const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
|
|
245
251
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
246
252
|
const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
247
253
|
el.style.position = props.positionType;
|
|
@@ -256,8 +262,9 @@ const loadingDirective = {
|
|
|
256
262
|
!isEmpty(binding.value) && toggleLoading(el, binding);
|
|
257
263
|
},
|
|
258
264
|
updated: function(el, binding, vnode) {
|
|
259
|
-
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el))
|
|
265
|
+
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el)) {
|
|
260
266
|
return;
|
|
267
|
+
}
|
|
261
268
|
!cacheInstance.has(el) && handleProps(el, vnode.props);
|
|
262
269
|
removeAttribute(el);
|
|
263
270
|
toggleLoading(el, binding);
|
|
@@ -321,7 +328,7 @@ var button = "";
|
|
|
321
328
|
var Button = defineComponent({
|
|
322
329
|
name: "DButton",
|
|
323
330
|
directives: {
|
|
324
|
-
|
|
331
|
+
dLoading: loadingDirective
|
|
325
332
|
},
|
|
326
333
|
props: buttonProps,
|
|
327
334
|
emits: ["click"],
|