vue-devui 1.0.0-beta.1 → 1.0.0-beta.10

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 (323) hide show
  1. package/accordion/index.d.ts +7 -0
  2. package/accordion/index.es.js +186 -139
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.d.ts +7 -0
  6. package/alert/index.es.js +2 -3
  7. package/alert/index.umd.js +1 -1
  8. package/alert/style.css +1 -1
  9. package/anchor/index.d.ts +7 -0
  10. package/avatar/index.d.ts +7 -0
  11. package/avatar/index.es.js +1 -1
  12. package/avatar/index.umd.js +1 -1
  13. package/back-top/index.d.ts +7 -0
  14. package/back-top/index.es.js +128 -0
  15. package/back-top/index.umd.js +1 -0
  16. package/back-top/package.json +7 -0
  17. package/back-top/style.css +1 -0
  18. package/badge/index.d.ts +7 -0
  19. package/badge/index.es.js +1 -1
  20. package/badge/index.umd.js +1 -1
  21. package/breadcrumb/index.d.ts +7 -0
  22. package/button/index.d.ts +7 -0
  23. package/button/index.es.js +9 -8
  24. package/button/index.umd.js +1 -1
  25. package/card/index.d.ts +7 -0
  26. package/card/index.es.js +1 -1
  27. package/card/index.umd.js +1 -1
  28. package/carousel/index.d.ts +7 -0
  29. package/carousel/index.es.js +5 -4
  30. package/carousel/index.umd.js +1 -1
  31. package/cascader/index.d.ts +7 -0
  32. package/cascader/index.es.js +1239 -83
  33. package/cascader/index.umd.js +1 -1
  34. package/cascader/style.css +1 -1
  35. package/checkbox/index.d.ts +7 -0
  36. package/checkbox/index.es.js +43 -8
  37. package/checkbox/index.umd.js +1 -1
  38. package/comment/index.d.ts +7 -0
  39. package/comment/index.es.js +85 -0
  40. package/comment/index.umd.js +1 -0
  41. package/comment/package.json +7 -0
  42. package/comment/style.css +1 -0
  43. package/countdown/index.d.ts +7 -0
  44. package/countdown/index.es.js +176 -0
  45. package/countdown/index.umd.js +1 -0
  46. package/countdown/package.json +7 -0
  47. package/countdown/style.css +1 -0
  48. package/date-picker/index.d.ts +7 -0
  49. package/date-picker/index.es.js +32 -21
  50. package/date-picker/index.umd.js +1 -1
  51. package/date-picker/style.css +1 -1
  52. package/dragdrop/index.d.ts +7 -0
  53. package/dragdrop/index.es.js +32 -0
  54. package/dragdrop/index.umd.js +1 -0
  55. package/dragdrop/package.json +7 -0
  56. package/drawer/index.d.ts +7 -0
  57. package/drawer/index.es.js +161 -41
  58. package/drawer/index.umd.js +1 -1
  59. package/drawer/style.css +1 -1
  60. package/dropdown/index.d.ts +7 -0
  61. package/dropdown/index.es.js +527 -0
  62. package/dropdown/index.umd.js +1 -0
  63. package/dropdown/package.json +7 -0
  64. package/dropdown/style.css +1 -0
  65. package/editable-select/index.d.ts +7 -0
  66. package/editable-select/index.es.js +5718 -469
  67. package/editable-select/index.umd.js +27 -1
  68. package/editable-select/style.css +1 -1
  69. package/form/index.d.ts +7 -0
  70. package/form/index.es.js +2244 -0
  71. package/form/index.umd.js +1 -0
  72. package/form/package.json +7 -0
  73. package/form/style.css +1 -0
  74. package/fullscreen/index.d.ts +7 -0
  75. package/fullscreen/index.es.js +14 -4
  76. package/fullscreen/index.umd.js +1 -1
  77. package/gantt/index.d.ts +7 -0
  78. package/gantt/index.es.js +535 -0
  79. package/gantt/index.umd.js +1 -0
  80. package/gantt/package.json +7 -0
  81. package/gantt/style.css +1 -0
  82. package/grid/index.d.ts +7 -0
  83. package/grid/index.es.js +269 -0
  84. package/grid/index.umd.js +1 -0
  85. package/grid/package.json +7 -0
  86. package/grid/style.css +1 -0
  87. package/icon/index.d.ts +7 -0
  88. package/icon/index.es.js +6 -5
  89. package/icon/index.umd.js +1 -1
  90. package/image-preview/index.d.ts +7 -0
  91. package/image-preview/index.es.js +72 -11
  92. package/image-preview/index.umd.js +1 -1
  93. package/image-preview/style.css +1 -1
  94. package/index.d.ts +7 -0
  95. package/input/index.d.ts +7 -0
  96. package/input/index.es.js +24 -13
  97. package/input/index.umd.js +1 -1
  98. package/input-icon/index.d.ts +7 -0
  99. package/input-icon/index.es.js +332 -0
  100. package/input-icon/index.umd.js +1 -0
  101. package/input-icon/package.json +7 -0
  102. package/input-icon/style.css +1 -0
  103. package/input-number/index.d.ts +7 -0
  104. package/input-number/index.es.js +5 -4
  105. package/input-number/index.umd.js +1 -1
  106. package/layout/index.d.ts +7 -0
  107. package/layout/index.es.js +1 -1
  108. package/layout/index.umd.js +1 -1
  109. package/loading/index.d.ts +7 -0
  110. package/loading/index.es.js +1 -1
  111. package/loading/index.umd.js +1 -1
  112. package/modal/index.d.ts +7 -0
  113. package/modal/index.es.js +117 -99
  114. package/modal/index.umd.js +1 -1
  115. package/modal/style.css +1 -1
  116. package/nav-sprite/index.d.ts +7 -0
  117. package/nuxt/components/Accordion.js +3 -0
  118. package/nuxt/components/Alert.js +3 -0
  119. package/nuxt/components/Anchor.js +3 -0
  120. package/nuxt/components/Aside.js +3 -0
  121. package/nuxt/components/Avatar.js +3 -0
  122. package/nuxt/components/BackTop.js +3 -0
  123. package/nuxt/components/Badge.js +3 -0
  124. package/nuxt/components/Breadcrumb.js +3 -0
  125. package/nuxt/components/Button.js +3 -0
  126. package/nuxt/components/Card.js +3 -0
  127. package/nuxt/components/Carousel.js +3 -0
  128. package/nuxt/components/Cascader.js +3 -0
  129. package/nuxt/components/Checkbox.js +3 -0
  130. package/nuxt/components/Col.js +3 -0
  131. package/nuxt/components/Column.js +3 -0
  132. package/nuxt/components/Comment.js +3 -0
  133. package/nuxt/components/Content.js +3 -0
  134. package/nuxt/components/Countdown.js +3 -0
  135. package/nuxt/components/DatePicker.js +3 -0
  136. package/nuxt/components/Drawer.js +3 -0
  137. package/nuxt/components/Dropdown.js +3 -0
  138. package/nuxt/components/EditableSelect.js +3 -0
  139. package/nuxt/components/FixedOverlay.js +3 -0
  140. package/nuxt/components/FlexibleOverlay.js +3 -0
  141. package/nuxt/components/Footer.js +3 -0
  142. package/nuxt/components/Form.js +3 -0
  143. package/nuxt/components/FormControl.js +3 -0
  144. package/nuxt/components/FormItem.js +3 -0
  145. package/nuxt/components/FormLabel.js +3 -0
  146. package/nuxt/components/FormOperation.js +3 -0
  147. package/nuxt/components/Fullscreen.js +3 -0
  148. package/nuxt/components/Gantt.js +3 -0
  149. package/nuxt/components/Header.js +3 -0
  150. package/nuxt/components/Icon.js +2 -0
  151. package/nuxt/components/ImagePreviewService.js +3 -0
  152. package/nuxt/components/Input.js +3 -0
  153. package/nuxt/components/InputIcon.js +3 -0
  154. package/nuxt/components/InputNumber.js +3 -0
  155. package/nuxt/components/Layout.js +3 -0
  156. package/nuxt/components/Loading.js +3 -0
  157. package/nuxt/components/LoadingService.js +3 -0
  158. package/nuxt/components/Modal.js +3 -0
  159. package/nuxt/components/MultiUpload.js +3 -0
  160. package/nuxt/components/NavSprite.js +2 -0
  161. package/nuxt/components/Pagination.js +3 -0
  162. package/nuxt/components/Panel.js +3 -0
  163. package/nuxt/components/Popover.js +3 -0
  164. package/nuxt/components/Progress.js +3 -0
  165. package/nuxt/components/QuadrantDiagram.js +3 -0
  166. package/nuxt/components/Radio.js +3 -0
  167. package/nuxt/components/RadioGroup.js +3 -0
  168. package/nuxt/components/Rate.js +3 -0
  169. package/nuxt/components/ReadTip.js +3 -0
  170. package/nuxt/components/Result.js +3 -0
  171. package/nuxt/components/Row.js +3 -0
  172. package/nuxt/components/Search.js +3 -0
  173. package/nuxt/components/Select.js +3 -0
  174. package/nuxt/components/Skeleton.js +3 -0
  175. package/nuxt/components/SkeletonItem.js +3 -0
  176. package/nuxt/components/Slider.js +3 -0
  177. package/nuxt/components/Splitter.js +3 -0
  178. package/nuxt/components/Statistic.js +3 -0
  179. package/nuxt/components/Status.js +3 -0
  180. package/nuxt/components/StepsGuide.js +3 -0
  181. package/nuxt/components/StickSlider.js +3 -0
  182. package/nuxt/components/Sticky.js +2 -0
  183. package/nuxt/components/Switch.js +3 -0
  184. package/nuxt/components/Table.js +3 -0
  185. package/nuxt/components/Tabs.js +3 -0
  186. package/nuxt/components/Tag.js +3 -0
  187. package/nuxt/components/TagInput.js +3 -0
  188. package/nuxt/components/Textarea.js +3 -0
  189. package/nuxt/components/TimeAxis.js +3 -0
  190. package/nuxt/components/TimeAxisItem.js +3 -0
  191. package/nuxt/components/TimePicker.js +3 -0
  192. package/nuxt/components/Toast.js +3 -0
  193. package/nuxt/components/ToastService.js +3 -0
  194. package/nuxt/components/Tooltip.js +3 -0
  195. package/nuxt/components/Transfer.js +3 -0
  196. package/nuxt/components/Tree.js +3 -0
  197. package/nuxt/components/TreeSelect.js +3 -0
  198. package/nuxt/components/Upload.js +3 -0
  199. package/nuxt/components/buttonProps.js +3 -0
  200. package/nuxt/index.js +13 -0
  201. package/overlay/index.d.ts +7 -0
  202. package/overlay/index.es.js +110 -93
  203. package/overlay/index.umd.js +1 -1
  204. package/overlay/style.css +1 -1
  205. package/package.json +6 -33
  206. package/pagination/index.d.ts +7 -0
  207. package/pagination/index.es.js +3 -3
  208. package/pagination/index.umd.js +1 -1
  209. package/panel/index.d.ts +7 -0
  210. package/panel/index.es.js +25 -22
  211. package/panel/index.umd.js +1 -1
  212. package/panel/style.css +1 -1
  213. package/popover/index.d.ts +7 -0
  214. package/popover/index.es.js +5 -2
  215. package/popover/index.umd.js +1 -1
  216. package/progress/index.d.ts +7 -0
  217. package/progress/index.es.js +1 -1
  218. package/progress/index.umd.js +2 -2
  219. package/quadrant-diagram/index.d.ts +7 -0
  220. package/radio/index.d.ts +7 -0
  221. package/radio/index.es.js +1 -1
  222. package/radio/index.umd.js +1 -1
  223. package/rate/index.d.ts +7 -0
  224. package/rate/index.es.js +1 -1
  225. package/rate/index.umd.js +1 -1
  226. package/read-tip/index.d.ts +7 -0
  227. package/read-tip/index.es.js +258 -0
  228. package/read-tip/index.umd.js +1 -0
  229. package/read-tip/package.json +7 -0
  230. package/read-tip/style.css +1 -0
  231. package/result/index.d.ts +7 -0
  232. package/result/index.es.js +119 -0
  233. package/result/index.umd.js +1 -0
  234. package/result/package.json +7 -0
  235. package/result/style.css +1 -0
  236. package/ripple/index.d.ts +7 -0
  237. package/ripple/index.es.js +5 -2
  238. package/ripple/index.umd.js +1 -1
  239. package/search/index.d.ts +7 -0
  240. package/search/index.es.js +35 -21
  241. package/search/index.umd.js +1 -1
  242. package/select/index.d.ts +7 -0
  243. package/select/index.es.js +47 -11
  244. package/select/index.umd.js +1 -1
  245. package/skeleton/index.d.ts +7 -0
  246. package/skeleton/index.es.js +148 -26
  247. package/skeleton/index.umd.js +1 -1
  248. package/skeleton/style.css +1 -1
  249. package/slider/index.d.ts +7 -0
  250. package/slider/index.es.js +30 -177
  251. package/slider/index.umd.js +1 -1
  252. package/slider/style.css +1 -1
  253. package/splitter/index.d.ts +7 -0
  254. package/splitter/index.es.js +107 -89
  255. package/splitter/index.umd.js +1 -1
  256. package/statistic/index.d.ts +7 -0
  257. package/statistic/index.es.js +280 -0
  258. package/statistic/index.umd.js +1 -0
  259. package/statistic/package.json +7 -0
  260. package/statistic/style.css +1 -0
  261. package/status/index.d.ts +7 -0
  262. package/status/index.es.js +2 -2
  263. package/status/index.umd.js +1 -1
  264. package/steps-guide/index.d.ts +7 -0
  265. package/steps-guide/index.es.js +101 -73
  266. package/steps-guide/index.umd.js +1 -1
  267. package/steps-guide/style.css +1 -1
  268. package/sticky/index.d.ts +7 -0
  269. package/style.css +1 -1
  270. package/switch/index.d.ts +7 -0
  271. package/switch/index.es.js +1 -1
  272. package/switch/index.umd.js +1 -1
  273. package/table/index.d.ts +7 -0
  274. package/table/index.es.js +1498 -156
  275. package/table/index.umd.js +1 -1
  276. package/table/style.css +1 -1
  277. package/tabs/index.d.ts +7 -0
  278. package/tabs/index.es.js +6 -3
  279. package/tabs/index.umd.js +1 -1
  280. package/tag/index.d.ts +7 -0
  281. package/tag/index.es.js +131 -0
  282. package/tag/index.umd.js +1 -0
  283. package/tag/package.json +7 -0
  284. package/tag/style.css +1 -0
  285. package/tag-input/index.d.ts +7 -0
  286. package/tag-input/index.es.js +1 -13
  287. package/tag-input/index.umd.js +1 -1
  288. package/textarea/index.d.ts +7 -0
  289. package/textarea/index.es.js +132 -0
  290. package/textarea/index.umd.js +1 -0
  291. package/textarea/package.json +7 -0
  292. package/textarea/style.css +1 -0
  293. package/time-axis/index.d.ts +7 -0
  294. package/time-axis/index.es.js +241 -21
  295. package/time-axis/index.umd.js +1 -1
  296. package/time-axis/style.css +1 -1
  297. package/time-picker/index.d.ts +7 -0
  298. package/time-picker/index.es.js +50 -26
  299. package/time-picker/index.umd.js +1 -1
  300. package/time-picker/style.css +1 -1
  301. package/toast/index.d.ts +7 -0
  302. package/toast/index.es.js +8 -7
  303. package/toast/index.umd.js +1 -1
  304. package/toast/style.css +1 -1
  305. package/tooltip/index.d.ts +7 -0
  306. package/transfer/index.d.ts +7 -0
  307. package/transfer/index.es.js +368 -79
  308. package/transfer/index.umd.js +1 -1
  309. package/transfer/style.css +1 -1
  310. package/tree/index.d.ts +7 -0
  311. package/tree/index.es.js +171 -35
  312. package/tree/index.umd.js +1 -1
  313. package/tree-select/index.d.ts +7 -0
  314. package/tree-select/index.es.js +528 -0
  315. package/tree-select/index.umd.js +1 -0
  316. package/tree-select/package.json +7 -0
  317. package/tree-select/style.css +1 -0
  318. package/upload/index.d.ts +7 -0
  319. package/upload/index.es.js +8 -7
  320. package/upload/index.umd.js +1 -1
  321. package/upload/style.css +1 -1
  322. package/vue-devui.es.js +19214 -7637
  323. package/vue-devui.umd.js +29 -3
@@ -0,0 +1,528 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { ref, computed, defineComponent, inject, createVNode, mergeProps, resolveComponent, Transition, withDirectives, Fragment, vShow } from "vue";
21
+ var treeSelect = "";
22
+ const treeSelectProps = {
23
+ modelValue: {
24
+ type: [String, Number, Array],
25
+ default: ""
26
+ },
27
+ treeData: {
28
+ type: Array,
29
+ default: () => []
30
+ },
31
+ placeholder: {
32
+ type: String,
33
+ default: "\u8BF7\u9009\u62E9"
34
+ },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: false
38
+ },
39
+ multiple: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ leafOnly: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ searchable: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ allowClear: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ onToggleChange: {
56
+ type: Function,
57
+ default: void 0
58
+ },
59
+ onValueChange: {
60
+ type: Function,
61
+ default: void 0
62
+ }
63
+ };
64
+ function attributeExtension(data) {
65
+ data.forEach((el) => {
66
+ let level = 1;
67
+ el.level = level;
68
+ const nodeQueue = [];
69
+ nodeQueue.push(el);
70
+ while (nodeQueue.length !== 0) {
71
+ const node = nodeQueue.shift();
72
+ if (node.children) {
73
+ node.children.forEach((el2) => {
74
+ el2.level = level + 1;
75
+ el2.parent = node;
76
+ nodeQueue.push(el2);
77
+ });
78
+ }
79
+ level += 1;
80
+ }
81
+ });
82
+ return data;
83
+ }
84
+ function className(classStr, classOpt) {
85
+ let classname = classStr;
86
+ if (typeof classOpt === "object") {
87
+ Object.keys(classOpt).forEach((key) => {
88
+ classOpt[key] && (classname += ` ${key}`);
89
+ });
90
+ }
91
+ return classname;
92
+ }
93
+ function useToggle(props) {
94
+ const visible = ref(false);
95
+ const selectToggle = () => {
96
+ if (props.disabled)
97
+ return;
98
+ visible.value = !visible.value;
99
+ };
100
+ const treeToggle = (e, item) => {
101
+ e.preventDefault();
102
+ e.stopPropagation();
103
+ item.opened = !item.opened;
104
+ };
105
+ return {
106
+ visible,
107
+ selectToggle,
108
+ treeToggle
109
+ };
110
+ }
111
+ function useSelect(props) {
112
+ const inputValue = ref("");
113
+ const selectedCache = new Set();
114
+ const selectValue = (item) => {
115
+ if (!props.multiple) {
116
+ inputValue.value = item.label;
117
+ } else {
118
+ item.checked = !item.checked;
119
+ if (item.halfchecked)
120
+ item.halfchecked = false;
121
+ useCache(item);
122
+ searchUp(item);
123
+ searchDown(item);
124
+ inputValue.value = [...selectedCache].toString();
125
+ }
126
+ };
127
+ const useCache = (item) => {
128
+ item.checked === true ? selectedCache.add(item.label) : selectedCache.has(item.label) && selectedCache.delete(item.label);
129
+ };
130
+ const searchUp = (item) => {
131
+ if (!item.parent)
132
+ return;
133
+ let state = "";
134
+ const checkedArr = item.parent.children.filter((el) => el.checked === true);
135
+ switch (checkedArr.length) {
136
+ case 0:
137
+ state = "none";
138
+ break;
139
+ case item.parent.children.length:
140
+ state = "checked";
141
+ break;
142
+ default:
143
+ state = "halfchecked";
144
+ break;
145
+ }
146
+ if (state === "checked") {
147
+ item.parent.checked = true;
148
+ item.parent.halfchecked = false;
149
+ } else if (state === "halfchecked") {
150
+ item.parent.halfchecked = true;
151
+ item.parent.checked = false;
152
+ } else {
153
+ item.parent.checked = false;
154
+ item.parent.halfchecked = false;
155
+ }
156
+ useCache(item.parent);
157
+ searchUp(item.parent);
158
+ };
159
+ const searchDown = (item) => {
160
+ if (!item.children)
161
+ return;
162
+ item.children.forEach((el) => {
163
+ el.checked = item.checked;
164
+ useCache(el);
165
+ searchDown(el);
166
+ });
167
+ };
168
+ return {
169
+ inputValue,
170
+ selectValue
171
+ };
172
+ }
173
+ function useClear(props, ctx, data) {
174
+ const isClearable = computed(() => {
175
+ return !props.disabled && props.allowClear && data.value.length > 0;
176
+ });
177
+ const handleClear = (e) => {
178
+ e.preventDefault();
179
+ e.stopPropagation();
180
+ if (props.multiple) {
181
+ ctx.emit("update:modelValue", []);
182
+ } else {
183
+ ctx.emit("update:modelValue", "");
184
+ data.value = "";
185
+ }
186
+ };
187
+ return {
188
+ isClearable,
189
+ handleClear
190
+ };
191
+ }
192
+ var IconOpen = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24gc3ZnLWljb24tY2xvc2UiCj4KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjNWU3Y2UwIj48L3JlY3Q+CiAgICA8cmVjdCB4PSI0IiB5PSI3IiB3aWR0aD0iOCIgaGVpZ2h0PSIyIiBmaWxsPSIjNWU3Y2UwIj48L3JlY3Q+CiAgPC9nPgo8L3N2Zz4=";
193
+ var IconClose = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24iCj4KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIyIiBzdHJva2U9IiMyNTJiM2EiPjwvcmVjdD4KICAgIDxwYXRoCiAgICAgIGZpbGw9IiMyNTJiM2EiCiAgICAgIGQ9Ik04Ljc1LDQgTDguNzUsNy4yNSBMMTIsNy4yNSBMMTIsOC43NSBMOC43NDksOC43NSBMOC43NSwxMiBMNy4yNSwxMiBMNy4yNDksOC43NSBMNCw4Ljc1IEw0LDcuMjUgTDcuMjUsNy4yNSBMNy4yNSw0IEw4Ljc1LDQgWiIKICAgID48L3BhdGg+CiAgPC9nPgo8L3N2Zz4K";
194
+ var checkbox = "";
195
+ const commonProps = {
196
+ name: {
197
+ type: String,
198
+ default: void 0
199
+ },
200
+ halfchecked: {
201
+ type: Boolean,
202
+ default: false
203
+ },
204
+ isShowTitle: {
205
+ type: Boolean,
206
+ default: true
207
+ },
208
+ title: {
209
+ type: String
210
+ },
211
+ color: {
212
+ type: String,
213
+ default: void 0
214
+ },
215
+ showAnimation: {
216
+ type: Boolean,
217
+ default: true
218
+ },
219
+ disabled: {
220
+ type: Boolean,
221
+ default: false
222
+ },
223
+ beforeChange: {
224
+ type: Function,
225
+ default: void 0
226
+ }
227
+ };
228
+ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
229
+ halfchecked: {
230
+ type: Boolean,
231
+ default: false
232
+ },
233
+ checked: {
234
+ type: Boolean,
235
+ default: false
236
+ },
237
+ value: {
238
+ type: String
239
+ },
240
+ label: {
241
+ type: String,
242
+ default: void 0
243
+ },
244
+ title: {
245
+ type: String,
246
+ default: void 0
247
+ },
248
+ "onUpdate:checked": {
249
+ type: Function,
250
+ default: void 0
251
+ },
252
+ onChange: {
253
+ type: Function,
254
+ default: void 0
255
+ },
256
+ modelValue: {
257
+ type: Boolean
258
+ },
259
+ "onUpdate:modelValue": {
260
+ type: Function
261
+ }
262
+ });
263
+ const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
264
+ var Checkbox = defineComponent({
265
+ name: "DCheckbox",
266
+ props: checkboxProps,
267
+ emits: ["change", "update:checked", "update:modelValue"],
268
+ setup(props, ctx) {
269
+ const checkboxGroupConf = inject(checkboxGroupInjectionKey, null);
270
+ const isChecked = computed(() => props.checked || props.modelValue);
271
+ const mergedDisabled = computed(() => {
272
+ return (checkboxGroupConf == null ? void 0 : checkboxGroupConf.disabled.value) || props.disabled;
273
+ });
274
+ const mergedChecked = computed(() => {
275
+ var _a, _b;
276
+ return (_b = (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.isItemChecked) == null ? void 0 : _a.call(checkboxGroupConf, props.value)) != null ? _b : isChecked.value;
277
+ });
278
+ const mergedIsShowTitle = computed(() => {
279
+ var _a;
280
+ return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.isShowTitle.value) != null ? _a : props.isShowTitle;
281
+ });
282
+ const mergedShowAnimation = computed(() => {
283
+ var _a;
284
+ return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.showAnimation.value) != null ? _a : props.showAnimation;
285
+ });
286
+ const mergedColor = computed(() => {
287
+ var _a;
288
+ return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.color.value) != null ? _a : props.color;
289
+ });
290
+ const itemWidth = checkboxGroupConf == null ? void 0 : checkboxGroupConf.itemWidth.value;
291
+ const direction = checkboxGroupConf == null ? void 0 : checkboxGroupConf.direction.value;
292
+ const canChange = (isChecked2, val) => {
293
+ var _a;
294
+ if (mergedDisabled.value) {
295
+ return Promise.resolve(false);
296
+ }
297
+ const beforeChange = (_a = props.beforeChange) != null ? _a : checkboxGroupConf == null ? void 0 : checkboxGroupConf.beforeChange;
298
+ if (beforeChange) {
299
+ const res = beforeChange(isChecked2, val);
300
+ if (typeof res === "boolean") {
301
+ return Promise.resolve(res);
302
+ }
303
+ return res;
304
+ }
305
+ return Promise.resolve(true);
306
+ };
307
+ const toggle = () => {
308
+ const current = !isChecked.value;
309
+ checkboxGroupConf == null ? void 0 : checkboxGroupConf.toggleGroupVal(props.value);
310
+ ctx.emit("update:checked", current);
311
+ ctx.emit("update:modelValue", current);
312
+ ctx.emit("change", current);
313
+ };
314
+ const handleClick = () => {
315
+ canChange(!isChecked.value, props.label).then((res) => res && toggle());
316
+ };
317
+ return {
318
+ itemWidth,
319
+ direction,
320
+ mergedColor,
321
+ mergedDisabled,
322
+ mergedIsShowTitle,
323
+ mergedChecked,
324
+ mergedShowAnimation,
325
+ handleClick
326
+ };
327
+ },
328
+ render() {
329
+ var _a;
330
+ const {
331
+ itemWidth,
332
+ direction,
333
+ mergedChecked,
334
+ mergedDisabled,
335
+ mergedIsShowTitle,
336
+ mergedShowAnimation,
337
+ halfchecked,
338
+ title,
339
+ label,
340
+ handleClick,
341
+ name,
342
+ value,
343
+ mergedColor,
344
+ $slots
345
+ } = this;
346
+ const wrapperCls = {
347
+ "devui-checkbox-column-margin": direction === "column",
348
+ "devui-checkbox-wrap": typeof itemWidth !== "undefined"
349
+ };
350
+ const wrapperStyle = itemWidth ? [`width: ${itemWidth}px`] : [];
351
+ const checkboxCls = {
352
+ "devui-checkbox": true,
353
+ active: mergedChecked,
354
+ halfchecked,
355
+ disabled: mergedDisabled,
356
+ unchecked: !mergedChecked
357
+ };
358
+ const labelTitle = mergedIsShowTitle ? title || label : "";
359
+ const bgImgStyle = mergedColor && halfchecked || mergedColor ? `linear-gradient(${mergedColor}, ${mergedColor})` : "";
360
+ const spanStyle = [`border-color:${(mergedChecked || halfchecked) && mergedColor ? mergedColor : ""}`, `background-image:${bgImgStyle}`, `background-color:${mergedColor && halfchecked ? mergedColor : ""}`];
361
+ const spanCls = {
362
+ "devui-checkbox-material": true,
363
+ "custom-color": mergedColor,
364
+ "devui-checkbox-no-label": !label && !$slots.default,
365
+ "devui-no-animation": !mergedShowAnimation,
366
+ "devui-checkbox-default-background": !halfchecked
367
+ };
368
+ const polygonCls = {
369
+ "devui-tick": true,
370
+ "devui-no-animation": !mergedShowAnimation
371
+ };
372
+ const stopPropagation = ($event) => $event.stopPropagation();
373
+ const inputProps = {
374
+ indeterminate: halfchecked
375
+ };
376
+ return createVNode("div", {
377
+ "class": wrapperCls,
378
+ "style": wrapperStyle
379
+ }, [createVNode("div", {
380
+ "class": checkboxCls
381
+ }, [createVNode("label", {
382
+ "title": labelTitle,
383
+ "onClick": handleClick
384
+ }, [createVNode("input", mergeProps({
385
+ "name": name || value,
386
+ "class": "devui-checkbox-input",
387
+ "type": "checkbox"
388
+ }, inputProps, {
389
+ "checked": mergedChecked,
390
+ "disabled": mergedDisabled,
391
+ "onClick": stopPropagation,
392
+ "onChange": stopPropagation
393
+ }), null), createVNode("span", {
394
+ "style": spanStyle,
395
+ "class": spanCls
396
+ }, [createVNode("span", {
397
+ "class": "devui-checkbox-halfchecked-bg"
398
+ }, null), createVNode("svg", {
399
+ "viewBox": "0 0 16 16",
400
+ "version": "1.1",
401
+ "xmlns": "http://www.w3.org/2000/svg",
402
+ "class": "devui-checkbox-tick"
403
+ }, [createVNode("g", {
404
+ "stroke": "none",
405
+ "stroke-width": "1",
406
+ "fill": "none",
407
+ "fill-rule": "evenodd"
408
+ }, [createVNode("polygon", {
409
+ "fill-rule": "nonzero",
410
+ "points": "5.17391304 6.56521739 7.7173913 9.10869565 11.826087 5 13 6.17391304 7.7173913 11.4565217 4 7.73913043",
411
+ "class": polygonCls
412
+ }, null)])])]), label || ((_a = $slots.default) == null ? void 0 : _a.call($slots))])])]);
413
+ }
414
+ });
415
+ var TreeSelect = defineComponent({
416
+ name: "DTreeSelect",
417
+ props: treeSelectProps,
418
+ emits: ["toggleChange", "valueChange", "update:modelValue"],
419
+ setup(props, ctx) {
420
+ const {
421
+ treeData,
422
+ placeholder,
423
+ disabled,
424
+ multiple,
425
+ leafOnly
426
+ } = props;
427
+ const {
428
+ visible,
429
+ selectToggle,
430
+ treeToggle
431
+ } = useToggle(props);
432
+ const {
433
+ inputValue,
434
+ selectValue
435
+ } = useSelect(props);
436
+ const {
437
+ isClearable,
438
+ handleClear
439
+ } = useClear(props, ctx, inputValue);
440
+ const clickNode = (item) => {
441
+ if (!leafOnly) {
442
+ selectValue(item);
443
+ !multiple && selectToggle(item);
444
+ } else {
445
+ if (!item.children) {
446
+ selectValue(item);
447
+ !multiple && selectToggle(item);
448
+ }
449
+ }
450
+ };
451
+ const treeSelectCls = className("devui-tree-select", {
452
+ "devui-tree-select-open": visible.value,
453
+ "devui-tree-select-disabled": disabled
454
+ });
455
+ const renderNode = (item) => createVNode("div", {
456
+ "class": "devui-tree-select-item",
457
+ "style": {
458
+ paddingLeft: `${20 * (item.level - 1)}px`
459
+ },
460
+ "onClick": () => clickNode(item)
461
+ }, [item.children ? item.opened ? createVNode(IconOpen, {
462
+ "class": "mr-xs",
463
+ "onClick": (e) => treeToggle(e, item)
464
+ }, null) : createVNode(IconClose, {
465
+ "class": "mr-xs",
466
+ "onClick": (e) => treeToggle(e, item)
467
+ }, null) : createVNode("span", null, ["\xA0\xA0\xA0"]), multiple ? item.halfchecked ? createVNode(Checkbox, {
468
+ "label": item.label,
469
+ "halfchecked": item.halfchecked
470
+ }, null) : createVNode(Checkbox, {
471
+ "label": item.label,
472
+ "checked": item.checked
473
+ }, null) : item.label]);
474
+ const renderTree = (treeData2) => {
475
+ return treeData2.map((item) => {
476
+ if (item.children) {
477
+ return createVNode(Fragment, null, [renderNode(item), item.opened && renderTree(item.children)]);
478
+ }
479
+ return renderNode(item);
480
+ });
481
+ };
482
+ return () => {
483
+ return createVNode("div", {
484
+ "class": treeSelectCls
485
+ }, [createVNode("div", {
486
+ "class": isClearable.value ? "devui-tree-select-clearable" : "devui-tree-select-notclearable",
487
+ "onClick": () => selectToggle()
488
+ }, [createVNode("input", {
489
+ "value": inputValue.value,
490
+ "type": "text",
491
+ "class": "devui-tree-select-input",
492
+ "placeholder": placeholder,
493
+ "readonly": true,
494
+ "disabled": disabled
495
+ }, null), createVNode("span", {
496
+ "onClick": (e) => handleClear(e),
497
+ "class": "devui-tree-select-clear"
498
+ }, [createVNode(resolveComponent("d-icon"), {
499
+ "name": "close"
500
+ }, null)]), createVNode("span", {
501
+ "class": "devui-tree-select-arrow"
502
+ }, [createVNode(resolveComponent("d-icon"), {
503
+ "name": "select-arrow"
504
+ }, null)])]), createVNode(Transition, {
505
+ "name": "fade",
506
+ "ref": "dropdownRef"
507
+ }, {
508
+ default: () => [withDirectives(createVNode("div", {
509
+ "class": "devui-tree-select-dropdown"
510
+ }, [createVNode("ul", {
511
+ "class": "devui-tree-select-dropdown-list"
512
+ }, [renderTree(attributeExtension(treeData))])]), [[vShow, visible.value]])]
513
+ })]);
514
+ };
515
+ }
516
+ });
517
+ TreeSelect.install = function(app) {
518
+ app.component(TreeSelect.name, TreeSelect);
519
+ };
520
+ var index = {
521
+ title: "TreeSelect \u6811\u5F62\u9009\u62E9\u6846",
522
+ category: "\u6570\u636E\u5F55\u5165",
523
+ status: "20%",
524
+ install(app) {
525
+ app.use(TreeSelect);
526
+ }
527
+ };
528
+ export { TreeSelect, index as default };
@@ -0,0 +1 @@
1
+ var J=Object.defineProperty,Y=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=(i,e,f)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[e]=f,M=(i,e)=>{for(var f in e||(e={}))$.call(e,f)&&T(i,f,e[f]);if(B)for(var f of B(e))G.call(e,f)&&T(i,f,e[f]);return i},j=(i,e)=>Y(i,Q(e));(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.index={},i.Vue))})(this,function(i,e){"use strict";var f="";const A={modelValue:{type:[String,Number,Array],default:""},treeData:{type:Array,default:()=>[]},placeholder:{type:String,default:"\u8BF7\u9009\u62E9"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},leafOnly:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!1},onToggleChange:{type:Function,default:void 0},onValueChange:{type:Function,default:void 0}};function D(t){return t.forEach(c=>{let l=1;c.level=l;const r=[];for(r.push(c);r.length!==0;){const s=r.shift();s.children&&s.children.forEach(o=>{o.level=l+1,o.parent=s,r.push(o)}),l+=1}}),t}function P(t,c){let l=t;return typeof c=="object"&&Object.keys(c).forEach(r=>{c[r]&&(l+=` ${r}`)}),l}function Z(t){const c=e.ref(!1);return{visible:c,selectToggle:()=>{t.disabled||(c.value=!c.value)},treeToggle:(s,o)=>{s.preventDefault(),s.stopPropagation(),o.opened=!o.opened}}}function L(t){const c=e.ref(""),l=new Set,r=a=>{t.multiple?(a.checked=!a.checked,a.halfchecked&&(a.halfchecked=!1),s(a),o(a),h(a),c.value=[...l].toString()):c.value=a.label},s=a=>{a.checked===!0?l.add(a.label):l.has(a.label)&&l.delete(a.label)},o=a=>{if(!a.parent)return;let u="";switch(a.parent.children.filter(I=>I.checked===!0).length){case 0:u="none";break;case a.parent.children.length:u="checked";break;default:u="halfchecked";break}u==="checked"?(a.parent.checked=!0,a.parent.halfchecked=!1):u==="halfchecked"?(a.parent.halfchecked=!0,a.parent.checked=!1):(a.parent.checked=!1,a.parent.halfchecked=!1),s(a.parent),o(a.parent)},h=a=>{!a.children||a.children.forEach(u=>{u.checked=a.checked,s(u),h(u)})};return{inputValue:c,selectValue:r}}function W(t,c,l){return{isClearable:e.computed(()=>!t.disabled&&t.allowClear&&l.value.length>0),handleClear:o=>{o.preventDefault(),o.stopPropagation(),t.multiple?c.emit("update:modelValue",[]):(c.emit("update:modelValue",""),l.value="")}}}var x="data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24gc3ZnLWljb24tY2xvc2UiCj4KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjNWU3Y2UwIj48L3JlY3Q+CiAgICA8cmVjdCB4PSI0IiB5PSI3IiB3aWR0aD0iOCIgaGVpZ2h0PSIyIiBmaWxsPSIjNWU3Y2UwIj48L3JlY3Q+CiAgPC9nPgo8L3N2Zz4=",H="data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24iCj4KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIyIiBzdHJva2U9IiMyNTJiM2EiPjwvcmVjdD4KICAgIDxwYXRoCiAgICAgIGZpbGw9IiMyNTJiM2EiCiAgICAgIGQ9Ik04Ljc1LDQgTDguNzUsNy4yNSBMMTIsNy4yNSBMMTIsOC43NSBMOC43NDksOC43NSBMOC43NSwxMiBMNy4yNSwxMiBMNy4yNDksOC43NSBMNCw4Ljc1IEw0LDcuMjUgTDcuMjUsNy4yNSBMNy4yNSw0IEw4Ljc1LDQgWiIKICAgID48L3BhdGg+CiAgPC9nPgo8L3N2Zz4K",X="";const z=j(M({},{name:{type:String,default:void 0},halfchecked:{type:Boolean,default:!1},isShowTitle:{type:Boolean,default:!0},title:{type:String},color:{type:String,default:void 0},showAnimation:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},beforeChange:{type:Function,default:void 0}}),{halfchecked:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},value:{type:String},label:{type:String,default:void 0},title:{type:String,default:void 0},"onUpdate:checked":{type:Function,default:void 0},onChange:{type:Function,default:void 0},modelValue:{type:Boolean},"onUpdate:modelValue":{type:Function}}),U=Symbol("d-checkbox-group");var S=e.defineComponent({name:"DCheckbox",props:z,emits:["change","update:checked","update:modelValue"],setup(t,c){const l=e.inject(U,null),r=e.computed(()=>t.checked||t.modelValue),s=e.computed(()=>(l==null?void 0:l.disabled.value)||t.disabled),o=e.computed(()=>{var d,y;return(y=(d=l==null?void 0:l.isItemChecked)==null?void 0:d.call(l,t.value))!=null?y:r.value}),h=e.computed(()=>{var d;return(d=l==null?void 0:l.isShowTitle.value)!=null?d:t.isShowTitle}),a=e.computed(()=>{var d;return(d=l==null?void 0:l.showAnimation.value)!=null?d:t.showAnimation}),u=e.computed(()=>{var d;return(d=l==null?void 0:l.color.value)!=null?d:t.color}),b=l==null?void 0:l.itemWidth.value,I=l==null?void 0:l.direction.value,k=(d,y)=>{var v;if(s.value)return Promise.resolve(!1);const C=(v=t.beforeChange)!=null?v:l==null?void 0:l.beforeChange;if(C){const n=C(d,y);return typeof n=="boolean"?Promise.resolve(n):n}return Promise.resolve(!0)},g=()=>{const d=!r.value;l==null||l.toggleGroupVal(t.value),c.emit("update:checked",d),c.emit("update:modelValue",d),c.emit("change",d)};return{itemWidth:b,direction:I,mergedColor:u,mergedDisabled:s,mergedIsShowTitle:h,mergedChecked:o,mergedShowAnimation:a,handleClick:()=>{k(!r.value,t.label).then(d=>d&&g())}}},render(){var V;const{itemWidth:t,direction:c,mergedChecked:l,mergedDisabled:r,mergedIsShowTitle:s,mergedShowAnimation:o,halfchecked:h,title:a,label:u,handleClick:b,name:I,value:k,mergedColor:g,$slots:m}=this,d={"devui-checkbox-column-margin":c==="column","devui-checkbox-wrap":typeof t!="undefined"},y=t?[`width: ${t}px`]:[],C={"devui-checkbox":!0,active:l,halfchecked:h,disabled:r,unchecked:!l},v=s?a||u:"",n=g&&h||g?`linear-gradient(${g}, ${g})`:"",p=[`border-color:${(l||h)&&g?g:""}`,`background-image:${n}`,`background-color:${g&&h?g:""}`],K={"devui-checkbox-material":!0,"custom-color":g,"devui-checkbox-no-label":!u&&!m.default,"devui-no-animation":!o,"devui-checkbox-default-background":!h},O={"devui-tick":!0,"devui-no-animation":!o},w=F=>F.stopPropagation(),R={indeterminate:h};return e.createVNode("div",{class:d,style:y},[e.createVNode("div",{class:C},[e.createVNode("label",{title:v,onClick:b},[e.createVNode("input",e.mergeProps({name:I||k,class:"devui-checkbox-input",type:"checkbox"},R,{checked:l,disabled:r,onClick:w,onChange:w}),null),e.createVNode("span",{style:p,class:K},[e.createVNode("span",{class:"devui-checkbox-halfchecked-bg"},null),e.createVNode("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:"devui-checkbox-tick"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{"fill-rule":"nonzero",points:"5.17391304 6.56521739 7.7173913 9.10869565 11.826087 5 13 6.17391304 7.7173913 11.4565217 4 7.73913043",class:O},null)])])]),u||((V=m.default)==null?void 0:V.call(m))])])])}}),N=e.defineComponent({name:"DTreeSelect",props:A,emits:["toggleChange","valueChange","update:modelValue"],setup(t,c){const{treeData:l,placeholder:r,disabled:s,multiple:o,leafOnly:h}=t,{visible:a,selectToggle:u,treeToggle:b}=Z(t),{inputValue:I,selectValue:k}=L(t),{isClearable:g,handleClear:m}=W(t,c,I),d=n=>{h&&n.children||(k(n),!o&&u(n))},y=P("devui-tree-select",{"devui-tree-select-open":a.value,"devui-tree-select-disabled":s}),C=n=>e.createVNode("div",{class:"devui-tree-select-item",style:{paddingLeft:`${20*(n.level-1)}px`},onClick:()=>d(n)},[n.children?n.opened?e.createVNode(x,{class:"mr-xs",onClick:p=>b(p,n)},null):e.createVNode(H,{class:"mr-xs",onClick:p=>b(p,n)},null):e.createVNode("span",null,["\xA0\xA0\xA0"]),o?n.halfchecked?e.createVNode(S,{label:n.label,halfchecked:n.halfchecked},null):e.createVNode(S,{label:n.label,checked:n.checked},null):n.label]),v=n=>n.map(p=>p.children?e.createVNode(e.Fragment,null,[C(p),p.opened&&v(p.children)]):C(p));return()=>e.createVNode("div",{class:y},[e.createVNode("div",{class:g.value?"devui-tree-select-clearable":"devui-tree-select-notclearable",onClick:()=>u()},[e.createVNode("input",{value:I.value,type:"text",class:"devui-tree-select-input",placeholder:r,readonly:!0,disabled:s},null),e.createVNode("span",{onClick:n=>m(n),class:"devui-tree-select-clear"},[e.createVNode(e.resolveComponent("d-icon"),{name:"close"},null)]),e.createVNode("span",{class:"devui-tree-select-arrow"},[e.createVNode(e.resolveComponent("d-icon"),{name:"select-arrow"},null)])]),e.createVNode(e.Transition,{name:"fade",ref:"dropdownRef"},{default:()=>[e.withDirectives(e.createVNode("div",{class:"devui-tree-select-dropdown"},[e.createVNode("ul",{class:"devui-tree-select-dropdown-list"},[v(D(l))])]),[[e.vShow,a.value]])]})])}});N.install=function(t){t.component(N.name,N)};var E={title:"TreeSelect \u6811\u5F62\u9009\u62E9\u6846",category:"\u6570\u636E\u5F55\u5165",status:"20%",install(t){t.use(N)}};i.TreeSelect=N,i.default=E,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "tree-select",
3
+ "version": "0.0.0",
4
+ "main": "index.umd.js",
5
+ "module": "index.es.js",
6
+ "style": "style.css"
7
+ }
@@ -0,0 +1 @@
1
+ .devui-tree-select{position:relative;width:100%}.devui-tree-select-disabled{cursor:not-allowed;background-color:var(--devui-disabled-bg, #f5f5f6);border-color:var(--devui-disabled-line, #dfe1e6);color:var(--devui-disabled-text, #adb0b8)}.devui-tree-select-disabled .devui-tree-select-input{cursor:not-allowed;background-color:var(--devui-disabled-bg, #f5f5f6);border-color:var(--devui-disabled-line, #dfe1e6);color:var(--devui-disabled-text, #adb0b8)}.devui-tree-select-disabled .devui-tree-select-arrow{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-tree-select-open .devui-tree-select-arrow{transform:rotate(180deg)}.devui-tree-select-input{cursor:pointer;width:100%;height:28px;padding:4px 28px 4px 10px;color:var(--devui-text, #252b3a);vertical-align:middle;border:1px solid var(--devui-form-control-line, #adb0b8);border-radius:var(--devui-border-radius, 2px);outline:none;background-color:var(--devui-base-bg, #ffffff)}.devui-tree-select-dropdown{border-radius:var(--devui-border-radius, 2px);background:var(--devui-base-bg, #ffffff);box-shadow:0 2px 5px 0 var(--devui-shadow, rgba(0, 0, 0, .2))}.devui-tree-select-dropdown-list{max-height:300px;overflow-y:auto;padding:0;margin:0}.devui-tree-select-item{font-size:16px;display:inline-flex;min-height:36px;line-height:1.5;width:100%;padding:10px;clear:both;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border:0;color:var(--devui-text, #252b3a);cursor:pointer;align-items:center}.devui-tree-select-item:hover:not(.active):not(.disabled){color:var(--devui-list-item-hover-text, #526ecc);background-color:var(--devui-list-item-hover-bg, #f2f5fc)}.devui-tree-select-clearable{position:relative}.devui-tree-select-clearable:hover .devui-tree-select-clear{display:inline-flex}.devui-tree-select-clearable:hover .devui-tree-select-arrow{display:none}.devui-tree-select-notclearable{position:relative}.devui-tree-select-clear,.devui-tree-select-arrow{position:absolute;right:0;height:100%;width:28px;display:inline-flex;justify-content:center;align-items:center}.devui-tree-select-clear{display:none}.devui-tree-select-clear:hover{cursor:pointer;color:var(--devui-icon-fill-active, #5e7ce0)}.devui-checkbox{position:relative;display:flex;display:-ms-flexbox;align-items:center;-ms-flex-align:center;height:100%;margin:0}.devui-checkbox .devui-checkbox-tick{position:absolute}.devui-checkbox .devui-checkbox-tick .devui-tick{fill:var(--devui-light-text, #ffffff);stroke-dashoffset:50;opacity:0;transform:scale(0);transform-origin:50% 50%;transition:stroke-dashoffset .2s ease-in-out,opacity .2s ease-in-out,transform .2s ease-in-out}.devui-checkbox.active:not(.halfchecked) .devui-tick{opacity:1;stroke-dashoffset:0;transform:scale(1);transition:stroke-dashoffset .3s cubic-bezier(.755,.05,.855,.06),opacity .2s cubic-bezier(.755,.05,.855,.06)}.devui-checkbox.active:not(.disabled) .devui-checkbox-material:not(.custom-color),.devui-checkbox.halfchecked:not(.disabled) .devui-checkbox-material:not(.custom-color){border-color:var(--devui-brand, #5e7ce0)}.devui-checkbox.active:not(.disabled) .devui-checkbox-material{background-size:100% 100%;transition:background-size .2s ease-in-out,border-color .2s ease-in-out}.devui-checkbox.unchecked:not(.disabled) .devui-checkbox-material:not(.custom-color){background-size:0% 0%;transition:background-size .2s ease-in-out,border-color .2s ease-in-out}.devui-checkbox.unchecked:not(.disabled) .devui-checkbox-material:not(.custom-color):hover{border-color:var(--devui-icon-fill-active, #5e7ce0)}.devui-checkbox.unchecked:not(.disabled) .devui-checkbox-material.custom-color{background-size:0% 0%;transition:background-size .2s ease-in-out,border-color .2s ease-in-out}.devui-checkbox.halfchecked .devui-checkbox-material:not(.custom-color){background-color:var(--devui-brand, #5e7ce0)}.devui-checkbox.halfchecked .devui-checkbox-material:not(.custom-color)>.devui-checkbox-halfchecked-bg{opacity:1;transform:scale(.4288);transition:transform .2s cubic-bezier(.755,.05,.855,.06);background-color:var(--devui-light-text, #ffffff)}.devui-checkbox.halfchecked .devui-checkbox-material.custom-color>.devui-checkbox-halfchecked-bg{opacity:1;transform:scale(.4288);transition:transform .2s cubic-bezier(.755,.05,.855,.06);background-color:var(--devui-light-text, #ffffff)}.devui-checkbox .devui-checkbox-material{text-align:initial;height:14px;width:14px;position:relative;user-select:none;border:1px solid var(--devui-line, #adb0b8);border-radius:var(--devui-border-radius, 2px);background:linear-gradient(var(--devui-brand, #5e7ce0),var(--devui-brand, #5e7ce0)) no-repeat center/0%;margin-right:8px;vertical-align:text-bottom}.devui-checkbox .devui-checkbox-material.devui-checkbox-default-background{background-color:var(--devui-base-bg, #ffffff)}.devui-checkbox .devui-checkbox-material.devui-checkbox-no-label{margin-right:0}.devui-checkbox .devui-checkbox-material>.devui-checkbox-halfchecked-bg{display:inline-block;position:absolute;content:"";background-color:var(--devui-light-text, #ffffff);top:0;left:0;height:100%;width:100%;transform:scale(1);opacity:0}.devui-checkbox .devui-checkbox-material>svg{width:14px;height:14px}.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):focus,.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):active,.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):hover{background-color:var(--devui-icon-fill-active, #5e7ce0)}.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):active,.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):focus,.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):hover:active,.devui-checkbox:not(.disabled).halfchecked .devui-checkbox-material:not(.custom-color):hover:focus{background-color:var(--devui-brand-active-focus, #344899)}.devui-checkbox-input{opacity:0;position:absolute;margin:0;z-index:-1;width:0;height:0;overflow:hidden;left:0;pointer-events:none}.devui-checkbox label{position:relative;font-weight:normal;height:16px;line-height:16px;cursor:pointer;color:var(--devui-text, #252b3a);margin:0;display:block}.devui-checkbox label>span{display:inline-block;box-sizing:content-box;vertical-align:top}.devui-checkbox.disabled label{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-checkbox.disabled .devui-checkbox-material{border-color:var(--devui-icon-fill-active-disabled, #beccfa);background-color:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-checkbox.disabled.unchecked .devui-checkbox-material{border-color:var(--devui-disabled-line, #dfe1e6);background-color:var(--devui-disabled-bg, #f5f5f6)}.devui-checkbox.disabled.halfchecked .devui-checkbox-material{background-color:var(--devui-disabled-bg, #f5f5f6)}.devui-checkbox.disabled.halfchecked .devui-checkbox-material .devui-checkbox-halfchecked-bg{transform:scale(.4288);background-color:var(--devui-disabled-text, #adb0b8);opacity:1}.devui-checkbox.disabled.active svg polygon{fill:var(--devui-light-text, #ffffff)}.devui-no-animation{transition:none!important}.devui-checkbox-column-margin{height:28px;line-height:28px}.devui-checkbox-wrap .devui-checkbox label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void
3
+ declare const _default: {
4
+ install: typeof install;
5
+ version: string;
6
+ };
7
+ export default _default;
@@ -21,7 +21,7 @@ var __publicField = (obj, key, value) => {
21
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
22
  return value;
23
23
  };
24
- import { defineComponent, createVNode, Fragment, getCurrentInstance, ref, computed, watch, nextTick, onUnmounted, mergeProps, createApp, toRefs, withDirectives, resolveComponent, createTextVNode, resolveDirective, isVNode } from "vue";
24
+ import { defineComponent, createVNode, getCurrentInstance, ref, computed, watch, nextTick, onUnmounted, mergeProps, createApp, toRefs, withDirectives, resolveComponent, createTextVNode, resolveDirective, Fragment, isVNode } from "vue";
25
25
  var toast = "";
26
26
  const toastProps = {
27
27
  value: {
@@ -85,11 +85,12 @@ var Icon = defineComponent({
85
85
  color,
86
86
  classPrefix
87
87
  } = this;
88
- return createVNode(Fragment, null, [/^((https?):)?\/\//.test(name) ? createVNode("img", {
88
+ return /^((https?):)?\/\//.test(name) ? createVNode("img", {
89
89
  "src": name,
90
90
  "alt": name.split("/")[name.split("/").length - 1],
91
91
  "style": {
92
- width: size
92
+ width: size,
93
+ verticalAlign: "text-bottom"
93
94
  }
94
95
  }, null) : createVNode("i", {
95
96
  "class": `${classPrefix} ${classPrefix}-${name}`,
@@ -97,7 +98,7 @@ var Icon = defineComponent({
97
98
  fontSize: size,
98
99
  color
99
100
  }
100
- }, null)]);
101
+ }, null);
101
102
  }
102
103
  });
103
104
  Icon.install = function(app) {
@@ -140,7 +141,7 @@ var ToastImage = defineComponent({
140
141
  const severityIconMap = {
141
142
  info: "info-o",
142
143
  success: "right-o",
143
- warn: "warning-o",
144
+ warning: "warning-o",
144
145
  error: "error-o"
145
146
  };
146
147
  const showIcon = () => severity !== "common";
@@ -1739,7 +1740,7 @@ function useToastEvent() {
1739
1740
  function useToastHelper() {
1740
1741
  function severityDelay(msg) {
1741
1742
  switch (msg.severity) {
1742
- case "warn":
1743
+ case "warning":
1743
1744
  case "error":
1744
1745
  return 1e4;
1745
1746
  default:
@@ -3170,7 +3171,7 @@ Upload.install = function(app) {
3170
3171
  var index = {
3171
3172
  title: "Upload \u4E0A\u4F20",
3172
3173
  category: "\u6570\u636E\u5F55\u5165",
3173
- status: "80%",
3174
+ status: "100%",
3174
3175
  install(app) {
3175
3176
  app.use(Upload);
3176
3177
  }