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.
Files changed (204) hide show
  1. package/README.md +126 -200
  2. package/auto-complete/index.es.js +55 -77
  3. package/auto-complete/index.umd.js +3 -1
  4. package/auto-complete/style.css +1 -1
  5. package/editable-select/index.es.js +118 -162
  6. package/editable-select/index.umd.js +1 -1
  7. package/nuxt/components/tagProps.js +3 -0
  8. package/package.json +1 -1
  9. package/popover/index.es.js +2 -2
  10. package/popover/index.umd.js +4 -4
  11. package/progress/index.es.js +1 -1
  12. package/progress/index.umd.js +1 -1
  13. package/progress/style.css +1 -1
  14. package/radio/index.es.js +8 -2
  15. package/radio/index.umd.js +1 -1
  16. package/radio/style.css +1 -1
  17. package/ripple/index.es.js +43 -42
  18. package/ripple/index.umd.js +1 -1
  19. package/slider/index.es.js +58 -58
  20. package/slider/index.umd.js +1 -1
  21. package/splitter/index.es.js +168 -125
  22. package/splitter/index.umd.js +11 -11
  23. package/style.css +1 -1
  24. package/tag/index.es.js +13 -17
  25. package/tag/index.umd.js +1 -1
  26. package/tag/style.css +1 -1
  27. package/vue-devui.es.js +765 -605
  28. package/vue-devui.umd.js +18 -16
  29. package/accordion/index.d.ts +0 -7
  30. package/accordion/index.es.js +0 -723
  31. package/accordion/index.umd.js +0 -1
  32. package/accordion/package.json +0 -7
  33. package/accordion/style.css +0 -1
  34. package/anchor/index.d.ts +0 -7
  35. package/anchor/index.es.js +0 -263
  36. package/anchor/index.umd.js +0 -1
  37. package/anchor/package.json +0 -7
  38. package/anchor/style.css +0 -1
  39. package/back-top/index.d.ts +0 -7
  40. package/back-top/index.es.js +0 -130
  41. package/back-top/index.umd.js +0 -1
  42. package/back-top/package.json +0 -7
  43. package/back-top/style.css +0 -1
  44. package/breadcrumb/index.d.ts +0 -7
  45. package/breadcrumb/index.es.js +0 -128
  46. package/breadcrumb/index.umd.js +0 -1
  47. package/breadcrumb/package.json +0 -7
  48. package/breadcrumb/style.css +0 -1
  49. package/carousel/index.d.ts +0 -7
  50. package/carousel/index.es.js +0 -314
  51. package/carousel/index.umd.js +0 -1
  52. package/carousel/package.json +0 -7
  53. package/carousel/style.css +0 -1
  54. package/cascader/index.d.ts +0 -7
  55. package/cascader/index.es.js +0 -5971
  56. package/cascader/index.umd.js +0 -27
  57. package/cascader/package.json +0 -7
  58. package/cascader/style.css +0 -1
  59. package/color-picker/index.d.ts +0 -7
  60. package/color-picker/index.es.js +0 -8196
  61. package/color-picker/index.umd.js +0 -27
  62. package/color-picker/package.json +0 -7
  63. package/color-picker/style.css +0 -1
  64. package/date-picker/index.d.ts +0 -7
  65. package/date-picker/index.es.js +0 -1154
  66. package/date-picker/index.umd.js +0 -1
  67. package/date-picker/package.json +0 -7
  68. package/date-picker/style.css +0 -1
  69. package/dragdrop/index.d.ts +0 -7
  70. package/dragdrop/index.es.js +0 -157
  71. package/dragdrop/index.umd.js +0 -1
  72. package/dragdrop/package.json +0 -7
  73. package/drawer/index.d.ts +0 -7
  74. package/drawer/index.es.js +0 -234
  75. package/drawer/index.umd.js +0 -1
  76. package/drawer/package.json +0 -7
  77. package/drawer/style.css +0 -1
  78. package/dropdown/index.d.ts +0 -7
  79. package/dropdown/index.es.js +0 -693
  80. package/dropdown/index.umd.js +0 -1
  81. package/dropdown/package.json +0 -7
  82. package/dropdown/style.css +0 -1
  83. package/form/index.d.ts +0 -7
  84. package/form/index.es.js +0 -7876
  85. package/form/index.umd.js +0 -27
  86. package/form/package.json +0 -7
  87. package/form/style.css +0 -1
  88. package/gantt/index.d.ts +0 -7
  89. package/gantt/index.es.js +0 -523
  90. package/gantt/index.umd.js +0 -1
  91. package/gantt/package.json +0 -7
  92. package/gantt/style.css +0 -1
  93. package/input-icon/index.d.ts +0 -7
  94. package/input-icon/index.es.js +0 -332
  95. package/input-icon/index.umd.js +0 -1
  96. package/input-icon/package.json +0 -7
  97. package/input-icon/style.css +0 -1
  98. package/input-number/index.d.ts +0 -7
  99. package/input-number/index.es.js +0 -229
  100. package/input-number/index.umd.js +0 -1
  101. package/input-number/package.json +0 -7
  102. package/input-number/style.css +0 -1
  103. package/list/index.d.ts +0 -7
  104. package/list/index.es.js +0 -39
  105. package/list/index.umd.js +0 -1
  106. package/list/package.json +0 -7
  107. package/list/style.css +0 -1
  108. package/nav-sprite/index.d.ts +0 -7
  109. package/nav-sprite/index.es.js +0 -68
  110. package/nav-sprite/index.umd.js +0 -1
  111. package/nav-sprite/package.json +0 -7
  112. package/nuxt/components/Accordion.js +0 -3
  113. package/nuxt/components/Anchor.js +0 -3
  114. package/nuxt/components/BackTop.js +0 -3
  115. package/nuxt/components/Breadcrumb.js +0 -3
  116. package/nuxt/components/Carousel.js +0 -3
  117. package/nuxt/components/CarouselItem.js +0 -3
  118. package/nuxt/components/Cascader.js +0 -3
  119. package/nuxt/components/ColorPicker.js +0 -3
  120. package/nuxt/components/Column.js +0 -3
  121. package/nuxt/components/DatePicker.js +0 -3
  122. package/nuxt/components/Drawer.js +0 -3
  123. package/nuxt/components/DrawerService.js +0 -3
  124. package/nuxt/components/Dropdown.js +0 -3
  125. package/nuxt/components/DropdownMenu.js +0 -3
  126. package/nuxt/components/Form.js +0 -3
  127. package/nuxt/components/FormControl.js +0 -3
  128. package/nuxt/components/FormItem.js +0 -3
  129. package/nuxt/components/FormLabel.js +0 -3
  130. package/nuxt/components/FormOperation.js +0 -3
  131. package/nuxt/components/Gantt.js +0 -3
  132. package/nuxt/components/InputIcon.js +0 -3
  133. package/nuxt/components/InputNumber.js +0 -3
  134. package/nuxt/components/List.js +0 -3
  135. package/nuxt/components/ListItem.js +0 -3
  136. package/nuxt/components/NavSprite.js +0 -2
  137. package/nuxt/components/QuadrantDiagram.js +0 -3
  138. package/nuxt/components/Select.js +0 -3
  139. package/nuxt/components/StepsGuide.js +0 -3
  140. package/nuxt/components/StickSlider.js +0 -3
  141. package/nuxt/components/Sticky.js +0 -2
  142. package/nuxt/components/Table.js +0 -3
  143. package/nuxt/components/Tabs.js +0 -3
  144. package/nuxt/components/TimePicker.js +0 -3
  145. package/nuxt/components/Tooltip.js +0 -3
  146. package/nuxt/components/Transfer.js +0 -3
  147. package/nuxt/components/Tree.js +0 -3
  148. package/nuxt/components/TreeSelect.js +0 -3
  149. package/nuxt/components/dropdownMenuProps.js +0 -3
  150. package/nuxt/components/tooltipProps.js +0 -3
  151. package/quadrant-diagram/index.d.ts +0 -7
  152. package/quadrant-diagram/index.es.js +0 -5728
  153. package/quadrant-diagram/index.umd.js +0 -27
  154. package/quadrant-diagram/package.json +0 -7
  155. package/quadrant-diagram/style.css +0 -1
  156. package/select/index.d.ts +0 -7
  157. package/select/index.es.js +0 -706
  158. package/select/index.umd.js +0 -1
  159. package/select/package.json +0 -7
  160. package/select/style.css +0 -1
  161. package/steps-guide/index.d.ts +0 -7
  162. package/steps-guide/index.es.js +0 -242
  163. package/steps-guide/index.umd.js +0 -1
  164. package/steps-guide/package.json +0 -7
  165. package/steps-guide/style.css +0 -1
  166. package/sticky/index.d.ts +0 -7
  167. package/sticky/index.es.js +0 -197
  168. package/sticky/index.umd.js +0 -1
  169. package/sticky/package.json +0 -7
  170. package/table/index.d.ts +0 -7
  171. package/table/index.es.js +0 -2024
  172. package/table/index.umd.js +0 -1
  173. package/table/package.json +0 -7
  174. package/table/style.css +0 -1
  175. package/tabs/index.d.ts +0 -7
  176. package/tabs/index.es.js +0 -194
  177. package/tabs/index.umd.js +0 -1
  178. package/tabs/package.json +0 -7
  179. package/tabs/style.css +0 -1
  180. package/time-picker/index.d.ts +0 -7
  181. package/time-picker/index.es.js +0 -1238
  182. package/time-picker/index.umd.js +0 -1
  183. package/time-picker/package.json +0 -7
  184. package/time-picker/style.css +0 -1
  185. package/tooltip/index.d.ts +0 -7
  186. package/tooltip/index.es.js +0 -5835
  187. package/tooltip/index.umd.js +0 -27
  188. package/tooltip/package.json +0 -7
  189. package/tooltip/style.css +0 -1
  190. package/transfer/index.d.ts +0 -7
  191. package/transfer/index.es.js +0 -7615
  192. package/transfer/index.umd.js +0 -27
  193. package/transfer/package.json +0 -7
  194. package/transfer/style.css +0 -1
  195. package/tree/index.d.ts +0 -7
  196. package/tree/index.es.js +0 -6495
  197. package/tree/index.umd.js +0 -27
  198. package/tree/package.json +0 -7
  199. package/tree/style.css +0 -1
  200. package/tree-select/index.d.ts +0 -7
  201. package/tree-select/index.es.js +0 -627
  202. package/tree-select/index.umd.js +0 -1
  203. package/tree-select/package.json +0 -7
  204. 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 是 Vue3 版本的 DevUI 组件库,基于 [https://github.com/devcloudfe/ng-devui](https://github.com/devcloudfe/ng-devui),倡导`沉浸`、`灵活`、`至简`的设计价值观。
8
-
9
- DevUI 官方网站:[https://devui.design](https://devui.design)
10
-
11
- ## 当前状态: Beta
12
-
13
- 该项目还处于孵化和演进阶段,欢迎大家参与到 Vue DevUI 项目的建设中来!🎉🎉
14
-
15
- 通过参与 Vue DevUI 项目,你可以:
16
- - 🔥 学习最新的 `Vite`+`Vue3`+`TypeScript`+`JSX` 技术
17
- - 🎁 学习如何设计和开发组件
18
- - 参与到开源社区中来
19
- - 🎊 结识一群热爱学习、热爱开源的朋友
20
-
21
- [贡献指南](https://github.com/DevCloudFE/vue-devui/wiki/%E8%B4%A1%E7%8C%AE%E6%8C%87%E5%8D%97)
22
-
23
- ## 快速开始
24
-
25
- ### 1 安装依赖
26
-
27
- ```
28
- pnpm i
29
- ```
30
-
31
- ### 2 启动
32
-
33
- ```
34
- pnpm dev
35
- ```
36
-
37
- ### 3 访问
38
-
39
- [http://localhost:3000/](http://localhost:3000/)
40
-
41
- ### 4 生产打包
42
-
43
- ```
44
- pnpm build
45
- ```
46
-
47
- ## 使用 Vue DevUI
48
-
49
- ### 1. 安装
50
-
51
- ```
52
- pnpm i vue-devui
53
- ```
54
-
55
- ### 2. 全量引入
56
-
57
- 在`main.ts`文件中编写以下代码:
58
- ```
59
- import { createApp } from 'vue'
60
- import App from './App.vue'
61
-
62
- // Step 1: 引入 Vue DevUI 组件库
63
- import DevUI from 'vue-devui'
64
- // Step 2: 引入组件库样式
65
- import 'vue-devui/style.css'
66
-
67
- createApp(App)
68
- .use(DevUI) // Step 3: 使用 Vue DevUI
69
- .mount('#app')
70
- ```
71
-
72
- ### 3. 按需引入
73
-
74
- 除了全量引入,我们也支持单个组件按需引入。
75
-
76
- 在`main.ts`文件中编写以下代码:
77
- ```
78
- import { createApp } from 'vue'
79
- import App from './App.vue'
80
-
81
- // Step 1: 引入单个组件
82
- import { Button } from 'vue-devui'
83
- // or import Button from 'vue-devui/button'
84
- // Step 2: 引入组件样式
85
- import 'vue-devui/button/style.css'
86
-
87
- createApp(App)
88
- .use(Button) // Step 3: 使用组件
89
- .mount('#app')
90
- ```
91
-
92
- ### 4. 配置自动按需引入`unplugin-vue-components`(推荐)
93
-
94
- 配置`unplugin-vue-components`插件可以无需引入Vue DevUI就可以直接按需使用其中的组件,具体使用方式如下:
95
-
96
- 在`vite.config.ts`文件中添加以下代码:
97
- ```
98
- import Components from 'unplugin-vue-components/vite'
99
- import { DevUiResolver } from 'unplugin-vue-components/resolvers'
100
-
101
- export default defineConfig({
102
- plugins: [
103
- vue(),
104
-
105
- // 新增
106
- Components({
107
- resolvers: [
108
- DevUiResolver()
109
- ]
110
- })
111
- ]
112
- })
113
- ```
114
-
115
- 配置了以上插件,就可以直接在代码中使用`Vue DevUI`的组件,而无需在`main.ts`文件中引入`Vue DevUI`。
116
-
117
- ### 5. 使用
118
-
119
- ```
120
- <template>
121
- <d-button>确定</d-button>
122
- </template>
123
- ```
124
-
125
- ## 图标库
126
-
127
- 图标库推荐使用[DevUI图标库](https://devui.design/icon/ruleResource),也可以使用第三方图标库,比如:iconfont。
128
-
129
- ### 使用DevUI图标库
130
-
131
- #### 安装
132
-
133
- ```
134
- pnpm i @devui-design/icons
135
- ```
136
-
137
- #### 引入
138
-
139
- 在`main.ts`文件中,编写以下代码:
140
-
141
- ```
142
- import '@devui-design/icons/icomoon/devui-icon.css'
143
- ```
144
-
145
- #### 使用
146
-
147
- ```
148
- <d-icon name="love" color="red"></d-icon>
149
- ```
150
-
151
- ## Contributors ✨
152
-
153
- Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
154
-
155
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
156
- <!-- prettier-ignore-start -->
157
- <!-- markdownlint-disable -->
158
- <table>
159
- <tr>
160
- <td align="center"><a href="https://juejin.cn/user/712139267650141"><img src="https://avatars.githubusercontent.com/u/9566362?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kagol</b></sub></a><br /><a href="#maintenance-kagol" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Code">💻</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=kagol" title="Documentation">📖</a></td>
161
- <td align="center"><a href="https://github.com/TinsFox"><img src="https://avatars.githubusercontent.com/u/33956589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>TinsFox</b></sub></a><br /><a href="#maintenance-TinsFox" title="Maintenance">🚧</a> <a href="#infra-TinsFox" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
162
- <td align="center"><a href="https://github.com/lnzhangsong"><img src="https://avatars.githubusercontent.com/u/15092594?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nif</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=lnzhangsong" title="Code">💻</a></td>
163
- <td align="center"><a href="https://github.com/Zcating"><img src="https://avatars.githubusercontent.com/u/13329558?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zcating</b></sub></a><br /><a href="#maintenance-Zcating" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=Zcating" title="Code">💻</a></td>
164
- <td align="center"><a href="https://github.com/sufuwang"><img src="https://avatars.githubusercontent.com/u/46395105?v=4?s=100" width="100px;" alt=""/><br /><sub><b>王凯</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=sufuwang" title="Code">💻</a></td>
165
- <td align="center"><a href="https://github.com/iel-h"><img src="https://avatars.githubusercontent.com/u/53589602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>iel</b></sub></a><br /><a href="#maintenance-iel-h" title="Maintenance">🚧</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=iel-h" title="Code">💻</a></td>
166
- <td align="center"><a href="https://github.com/chenxi24"><img src="https://avatars.githubusercontent.com/u/40349890?v=4?s=100" width="100px;" alt=""/><br /><sub><b>chenxi24</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=chenxi24" title="Code">💻</a></td>
167
- </tr>
168
- <tr>
169
- <td align="center"><a href="https://github.com/asdlml6"><img src="https://avatars.githubusercontent.com/u/61737780?v=4?s=100" width="100px;" alt=""/><br /><sub><b>小九九</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=asdlml6" title="Code">💻</a></td>
170
- <td align="center"><a href="http://blog.alanlee.top"><img src="https://avatars.githubusercontent.com/u/42601044?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AlanLee</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=AlanLee97" title="Code">💻</a></td>
171
- <td align="center"><a href="https://github.com/ForeseeBear"><img src="https://avatars.githubusercontent.com/u/15258339?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Echo</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=ForeseeBear" title="Code">💻</a></td>
172
- <td align="center"><a href="https://github.com/GaoNeng-wWw"><img src="https://avatars.githubusercontent.com/u/31283122?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GaoNeng</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=GaoNeng-wWw" title="Code">💻</a></td>
173
- <td align="center"><a href="https://github.com/xingyan95"><img src="https://avatars.githubusercontent.com/u/11143986?v=4?s=100" width="100px;" alt=""/><br /><sub><b>行言</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=xingyan95" title="Code">💻</a></td>
174
- <td align="center"><a href="https://devin974.github.io/"><img src="https://avatars.githubusercontent.com/u/67035714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>devin</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=devin974" title="Code">💻</a></td>
175
- <td align="center"><a href="https://juejin.cn/user/1618116899507735/posts"><img src="https://avatars.githubusercontent.com/u/70649502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>无声</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=ivestszheng" title="Code">💻</a></td>
176
- </tr>
177
- <tr>
178
- <td align="center"><a href="https://github.com/zxlfly"><img src="https://avatars.githubusercontent.com/u/26324442?v=4?s=100" width="100px;" alt=""/><br /><sub><b>sleep_fish</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=zxlfly" title="Code">💻</a></td>
179
- <td align="center"><a href="https://github.com/whylost"><img src="https://avatars.githubusercontent.com/u/62528887?v=4?s=100" width="100px;" alt=""/><br /><sub><b>迷心whylost</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=whylost" title="Code">💻</a></td>
180
- <td align="center"><a href="https://juejin.im/user/5c15d35fe51d4545ae495e43"><img src="https://avatars.githubusercontent.com/u/31237954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>X.Q. Chen</b></sub></a><br /><a href="#infra-brenner8023" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=brenner8023" title="Code">💻</a></td>
181
- <td align="center"><a href="https://github.com/git-Where"><img src="https://avatars.githubusercontent.com/u/16344566?v=4?s=100" width="100px;" alt=""/><br /><sub><b>葉家男孩</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=git-Where" title="Code">💻</a></td>
182
- <td align="center"><a href="https://github.com/CatsAndMice"><img src="https://avatars.githubusercontent.com/u/58327088?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lihai</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=CatsAndMice" title="Code">💻</a></td>
183
- <td align="center"><a href="http://www.naluduo.vip"><img src="https://avatars.githubusercontent.com/u/28448589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>纳撸多</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=naluduo233" title="Code">💻</a></td>
184
- <td align="center"><a href="https://github.com/ElsaOOo"><img src="https://avatars.githubusercontent.com/u/48074435?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ElsaOOo</b></sub></a><br /><a href="#maintenance-ElsaOOo" title="Maintenance">🚧</a> <a href="#infra-ElsaOOo" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/DevCloudFE/vue-devui/commits?author=ElsaOOo" title="Code">💻</a></td>
185
- </tr>
186
- <tr>
187
- <td align="center"><a href="https://github.com/liuxdi"><img src="https://avatars.githubusercontent.com/u/10958003?v=4?s=100" width="100px;" alt=""/><br /><sub><b>刘小迪</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=liuxdi" title="Code">💻</a></td>
188
- </tr>
189
- </table>
190
-
191
- <!-- markdownlint-restore -->
192
- <!-- prettier-ignore-end -->
193
-
194
- <!-- ALL-CONTRIBUTORS-LIST:END -->
195
-
196
- This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
197
-
198
- ## License
199
-
200
- [MIT](https://github.com/DevCloudFE/vue-devui/blob/dev/LICENSE)
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, reactive, isVNode, Transition } from "vue";
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
- appendToBody: {
39
- type: Boolean,
40
- default: false
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
- dAutoCompleteWidth: {
86
+ width: {
96
87
  type: Number,
97
- default: null
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.itemTemplate) {
125
- return ctx2.slots.itemTemplate(arr);
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.noResultItemTemplate) {
131
- return ctx2.slots.noResultItemTemplate(modelValue.value);
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.searchingTemplate) {
137
- return ctx2.slots.searchingTemplate(modelValue.value);
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.itemTemplate) {
134
+ if (ctx2.slots.item) {
144
135
  slots["itemTemplate"] = itemTemplate;
145
136
  }
146
- if (ctx2.slots.noResultItemTemplate) {
137
+ if (ctx2.slots.nothing) {
147
138
  slots["noResultItemTemplate"] = noResultItemTemplate;
148
139
  }
149
- if (ctx2.slots.searchingTemplate) {
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 == "" && !allowEmptyValueSearch.value) {
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 == 0) {
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 == 0 && modelValue.value.trim() != "") {
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 == 0) {
254
+ if (searchList.value.length === 0) {
264
255
  return 0;
265
256
  }
266
257
  const ind = searchList.value.indexOf(item);
267
- return ind == -1 ? 0 : 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", appendToBody && "devui-dropdown-menu-cdk", disabled && "disabled", latestSource.value && "devui-dropdown-latestSource"]
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 == index2 && "selected", {
603
+ "class": ["devui-dropdown-item", selectedIndex.value === index2 && "selected", {
614
604
  "disabled": disabledKey && item[disabledKey]
615
605
  }, {
616
- "devui-dropdown-bg": hoverIndex.value == index2
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 == 0 && ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value && createVNode("li", {
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
- appendToBody,
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
- appendToBodyDirections,
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
- if (appendToBody.value) {
917
- let _slot;
918
- return createVNode(FlexibleOverlay, {
919
- "hasBackdrop": false,
920
- "origin": origin,
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(DAutoCompleteDropdown, null, _isSlot(_slot2 = customRenderSolts()) ? _slot2 : {
945
- default: () => [_slot2]
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: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
933
+ width: `${width.value + "px"}`
956
934
  }
957
935
  }, [createVNode("input", {
958
936
  "disabled": disabled.value,