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/vue-devui.es.js CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
33
33
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
34
  return value;
35
35
  };
36
- import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, createTextVNode, provide, onMounted, watch, ref, Transition, withDirectives, vShow, nextTick, h, render, resolveDirective, unref, onUnmounted, reactive, onBeforeUnmount, Comment as Comment$1, toRef, onUpdated, onBeforeMount, readonly, Teleport, createApp, renderSlot, withModifiers, useSlots, shallowRef } from "vue";
36
+ import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, createTextVNode, provide, onMounted, watch, ref, Transition, withDirectives, vShow, nextTick, h, render, resolveDirective, unref, onUnmounted, Teleport, onBeforeUnmount, Comment as Comment$1, reactive, toRef, onUpdated, onBeforeMount, readonly, createApp, renderSlot, withModifiers, useSlots, shallowRef } from "vue";
37
37
  import { useRoute } from "vue-router";
38
38
  import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
39
39
  import { onClickOutside } from "@vueuse/core";
@@ -1185,18 +1185,9 @@ const autoCompleteProps = {
1185
1185
  type: Boolean,
1186
1186
  default: false
1187
1187
  },
1188
- appendToBody: {
1189
- type: Boolean,
1190
- default: false
1191
- },
1192
- appendToBodyDirections: {
1193
- type: Object,
1194
- default: () => ({
1195
- originX: "left",
1196
- originY: "bottom",
1197
- overlayX: "left",
1198
- overlayY: "top"
1199
- })
1188
+ position: {
1189
+ type: Array,
1190
+ default: ["bottom-end"]
1200
1191
  },
1201
1192
  disabled: {
1202
1193
  type: Boolean,
@@ -1242,9 +1233,9 @@ const autoCompleteProps = {
1242
1233
  type: Boolean,
1243
1234
  default: false
1244
1235
  },
1245
- dAutoCompleteWidth: {
1236
+ width: {
1246
1237
  type: Number,
1247
- default: null
1238
+ default: 400
1248
1239
  },
1249
1240
  showAnimation: {
1250
1241
  type: Boolean,
@@ -1271,32 +1262,32 @@ const DropdownPropsKey = Symbol("DropdownPropsKey");
1271
1262
  function useCustomTemplate(ctx2, modelValue) {
1272
1263
  const itemTemplate = (item2, index2) => {
1273
1264
  const arr = { item: item2, index: index2 };
1274
- if (ctx2.slots.itemTemplate) {
1275
- return ctx2.slots.itemTemplate(arr);
1265
+ if (ctx2.slots.item) {
1266
+ return ctx2.slots.item(arr);
1276
1267
  }
1277
1268
  return null;
1278
1269
  };
1279
1270
  const noResultItemTemplate = () => {
1280
- if (ctx2.slots.noResultItemTemplate) {
1281
- return ctx2.slots.noResultItemTemplate(modelValue.value);
1271
+ if (ctx2.slots.nothing) {
1272
+ return ctx2.slots.nothing(modelValue.value);
1282
1273
  }
1283
1274
  return null;
1284
1275
  };
1285
1276
  const searchingTemplate = () => {
1286
- if (ctx2.slots.searchingTemplate) {
1287
- return ctx2.slots.searchingTemplate(modelValue.value);
1277
+ if (ctx2.slots.searching) {
1278
+ return ctx2.slots.searching(modelValue.value);
1288
1279
  }
1289
1280
  return null;
1290
1281
  };
1291
1282
  const customRenderSolts = () => {
1292
1283
  const slots = {};
1293
- if (ctx2.slots.itemTemplate) {
1284
+ if (ctx2.slots.item) {
1294
1285
  slots["itemTemplate"] = itemTemplate;
1295
1286
  }
1296
- if (ctx2.slots.noResultItemTemplate) {
1287
+ if (ctx2.slots.nothing) {
1297
1288
  slots["noResultItemTemplate"] = noResultItemTemplate;
1298
1289
  }
1299
- if (ctx2.slots.searchingTemplate) {
1290
+ if (ctx2.slots.searching) {
1300
1291
  slots["searchingTemplate"] = searchingTemplate;
1301
1292
  }
1302
1293
  return slots;
@@ -1304,10 +1295,10 @@ function useCustomTemplate(ctx2, modelValue) {
1304
1295
  return { customRenderSolts };
1305
1296
  }
1306
1297
  function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
1307
- const searchList = ref([]);
1298
+ const searchList = ref();
1308
1299
  const showNoResultItemTemplate = ref(false);
1309
1300
  const handleSearch = async (term, enableLazyLoad) => {
1310
- if (term == "" && !allowEmptyValueSearch.value) {
1301
+ if (term === "" && !allowEmptyValueSearch.value) {
1311
1302
  searchList.value = [];
1312
1303
  showNoResultItemTemplate.value = false;
1313
1304
  return;
@@ -1328,7 +1319,7 @@ function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
1328
1319
  arr = await searchFn.value(term);
1329
1320
  }
1330
1321
  searchList.value = arr;
1331
- if (searchList.value.length == 0) {
1322
+ if (searchList.value.length === 0) {
1332
1323
  showNoResultItemTemplate.value = true;
1333
1324
  } else {
1334
1325
  showNoResultItemTemplate.value = false;
@@ -1391,7 +1382,7 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
1391
1382
  handleClose();
1392
1383
  } else {
1393
1384
  visible.value = true;
1394
- if (ctx2.slots.noResultItemTemplate && searchList.value.length == 0 && modelValue.value.trim() != "") {
1385
+ if (ctx2.slots.noResultItemTemplate && searchList.value.length === 0 && modelValue.value.trim() !== "") {
1395
1386
  showNoResultItemTemplate.value = true;
1396
1387
  }
1397
1388
  }
@@ -1410,11 +1401,11 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
1410
1401
  function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter, handleClose) {
1411
1402
  const selectedIndex = ref(0);
1412
1403
  const getListIndex = (item2) => {
1413
- if (searchList.value.length == 0) {
1404
+ if (searchList.value.length === 0) {
1414
1405
  return 0;
1415
1406
  }
1416
1407
  const ind = searchList.value.indexOf(item2);
1417
- return ind == -1 ? 0 : ind;
1408
+ return ind === -1 ? 0 : ind;
1418
1409
  };
1419
1410
  const selectOptionClick = async (item2) => {
1420
1411
  const cur = formatter.value(item2);
@@ -1422,7 +1413,7 @@ function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter,
1422
1413
  handleClose();
1423
1414
  await handleSearch(cur);
1424
1415
  selectedIndex.value = getListIndex(cur);
1425
- selectValue.value && selectValue.value();
1416
+ selectValue.value && selectValue.value(cur);
1426
1417
  };
1427
1418
  return {
1428
1419
  selectedIndex,
@@ -1730,7 +1721,6 @@ var DAutoCompleteDropdown = defineComponent({
1730
1721
  const {
1731
1722
  disabled,
1732
1723
  maxHeight,
1733
- appendToBody,
1734
1724
  formatter,
1735
1725
  disabledKey,
1736
1726
  isSearching
@@ -1743,7 +1733,7 @@ var DAutoCompleteDropdown = defineComponent({
1743
1733
  };
1744
1734
  return () => {
1745
1735
  return withDirectives(createVNode("div", {
1746
- "class": ["devui-dropdown-menu", appendToBody && "devui-dropdown-menu-cdk", disabled && "disabled", latestSource.value && "devui-dropdown-latestSource"]
1736
+ "class": ["devui-dropdown-menu", "devui-dropdown-menu-cdk", disabled && "disabled", latestSource.value && "devui-dropdown-latestSource"]
1747
1737
  }, [createVNode("ul", {
1748
1738
  "ref": dropDownRef,
1749
1739
  "class": "devui-list-unstyled scroll-height",
@@ -1751,28 +1741,28 @@ var DAutoCompleteDropdown = defineComponent({
1751
1741
  maxHeight: `${maxHeight}px`
1752
1742
  },
1753
1743
  "onScroll": loadMore
1754
- }, [isSearching && ctx2.slots.searchingTemplate && searchStatus.value && createVNode("li", {
1744
+ }, [isSearching && ctx2.slots.searchingTemplate && (searchStatus == null ? void 0 : searchStatus.value) && createVNode("li", {
1755
1745
  "class": "devui-is-searching-template"
1756
1746
  }, [createVNode("div", {
1757
1747
  "class": "devui-no-data-tip"
1758
1748
  }, [ctx2.slots.searchingTemplate()])]), latestSource.value && !modelValue.value && createVNode("li", {
1759
1749
  "class": "devui-popup-tips"
1760
- }, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !searchStatus.value && searchList != null && searchList.value.length > 0 && searchList.value.map((item2, index2) => {
1750
+ }, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !(searchStatus == null ? void 0 : searchStatus.value) && searchList != null && searchList.value.length > 0 && searchList.value.map((item2, index2) => {
1761
1751
  return createVNode("li", {
1762
1752
  "onClick": () => onSelect(item2),
1763
- "class": ["devui-dropdown-item", selectedIndex.value == index2 && "selected", {
1753
+ "class": ["devui-dropdown-item", selectedIndex.value === index2 && "selected", {
1764
1754
  "disabled": disabledKey && item2[disabledKey]
1765
1755
  }, {
1766
- "devui-dropdown-bg": hoverIndex.value == index2
1756
+ "devui-dropdown-bg": hoverIndex.value === index2
1767
1757
  }],
1768
1758
  "title": formatter(item2),
1769
1759
  "key": formatter(item2)
1770
1760
  }, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(item2, index2) : formatter(item2)]);
1771
- }), !searchStatus.value && searchList.value.length == 0 && ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value && createVNode("li", {
1761
+ }), !(searchStatus == null ? void 0 : searchStatus.value) && searchList.value.length === 0 && ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value && createVNode("li", {
1772
1762
  "class": "devui-no-result-template"
1773
1763
  }, [createVNode("div", {
1774
1764
  "class": "devui-no-data-tip"
1775
- }, [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]]);
1765
+ }, [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)]]);
1776
1766
  };
1777
1767
  }
1778
1768
  });
@@ -2007,8 +1997,7 @@ var AutoComplete = defineComponent({
2007
1997
  const {
2008
1998
  disabled,
2009
1999
  modelValue,
2010
- appendToBody,
2011
- dAutoCompleteWidth,
2000
+ width,
2012
2001
  delay,
2013
2002
  allowEmptyValueSearch,
2014
2003
  formatter,
@@ -2016,7 +2005,7 @@ var AutoComplete = defineComponent({
2016
2005
  selectValue,
2017
2006
  source,
2018
2007
  searchFn,
2019
- appendToBodyDirections,
2008
+ position,
2020
2009
  latestSource,
2021
2010
  showAnimation
2022
2011
  } = toRefs(props);
@@ -2068,51 +2057,40 @@ var AutoComplete = defineComponent({
2068
2057
  hoverIndex
2069
2058
  });
2070
2059
  const origin = ref();
2071
- const position = reactive({
2072
- appendToBodyDirections: {}
2073
- });
2074
- position.appendToBodyDirections = appendToBodyDirections;
2075
2060
  const renderDropdown = () => {
2076
- if (appendToBody.value) {
2077
- let _slot;
2078
- return createVNode(FlexibleOverlay, {
2079
- "hasBackdrop": false,
2080
- "origin": origin,
2081
- "position": position.appendToBodyDirections,
2082
- "visible": visible.value,
2083
- "onUpdate:visible": ($event) => visible.value = $event
2084
- }, {
2085
- default: () => [createVNode("div", {
2086
- "class": "devui-dropdown devui-auto-complete-menu",
2087
- "style": {
2088
- width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
2089
- }
2090
- }, [createVNode(DAutoCompleteDropdown, null, _isSlot$6(_slot = customRenderSolts()) ? _slot : {
2091
- default: () => [_slot]
2092
- })])]
2093
- });
2094
- } else {
2095
- let _slot2;
2096
- return createVNode("div", {
2097
- "class": "devui-dropdown",
2098
- "style": {
2099
- width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
2100
- }
2101
- }, [createVNode(Transition, {
2061
+ let _slot;
2062
+ return createVNode(Teleport, {
2063
+ "to": "body"
2064
+ }, {
2065
+ default: () => [createVNode(Transition, {
2102
2066
  "name": showAnimation ? "fade" : ""
2103
2067
  }, {
2104
- default: () => [createVNode(DAutoCompleteDropdown, null, _isSlot$6(_slot2 = customRenderSolts()) ? _slot2 : {
2105
- default: () => [_slot2]
2068
+ default: () => [createVNode(FlexibleOverlay, {
2069
+ "origin": origin.value,
2070
+ "position": position.value,
2071
+ "modelValue": visible.value,
2072
+ "onUpdate:modelValue": ($event) => visible.value = $event
2073
+ }, {
2074
+ default: () => [createVNode("div", {
2075
+ "class": "devui-auto-complete-menu",
2076
+ "style": {
2077
+ width: `
2078
+ ${width.value + "px"}
2079
+ `
2080
+ }
2081
+ }, [createVNode(DAutoCompleteDropdown, null, _isSlot$6(_slot = customRenderSolts()) ? _slot : {
2082
+ default: () => [_slot]
2083
+ })])]
2106
2084
  })]
2107
- })]);
2108
- }
2085
+ })]
2086
+ });
2109
2087
  };
2110
2088
  return () => {
2111
2089
  return withDirectives(createVNode("div", {
2112
2090
  "class": ["devui-auto-complete", "devui-form-group", "devui-has-feedback", visible.value && "devui-select-open"],
2113
2091
  "ref": origin,
2114
2092
  "style": {
2115
- width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
2093
+ width: `${width.value + "px"}`
2116
2094
  }
2117
2095
  }, [createVNode("input", {
2118
2096
  "disabled": disabled.value,
@@ -14633,9 +14611,6 @@ var DropdownInstall = {
14633
14611
  }
14634
14612
  };
14635
14613
  const editableSelectProps = {
14636
- appendToBody: {
14637
- type: Boolean
14638
- },
14639
14614
  options: {
14640
14615
  type: Array,
14641
14616
  default: () => []
@@ -14665,9 +14640,6 @@ const editableSelectProps = {
14665
14640
  },
14666
14641
  filterOption: {
14667
14642
  type: [Function, Boolean]
14668
- },
14669
- loadMore: {
14670
- type: Function
14671
14643
  }
14672
14644
  };
14673
14645
  function className$2(classStr, classOpt) {
@@ -14707,18 +14679,21 @@ const useInput = (inputValue, ctx2) => {
14707
14679
  handleInput
14708
14680
  };
14709
14681
  };
14710
- const useLazyLoad = (dropdownRef, inputValue, filterOtion, load) => {
14682
+ const useLazyLoad = (dropdownRef, inputValue, filterOtion, ctx2) => {
14711
14683
  const loadMore = () => {
14684
+ const dropdownVal = dropdownRef.value;
14712
14685
  if (filterOtion !== false) {
14713
14686
  return;
14714
14687
  }
14715
- if (dropdownRef.value.clientHeight + dropdownRef.value.scrollTop >= dropdownRef.value.scrollHeight) {
14716
- load(inputValue.value);
14688
+ if (dropdownVal.clientHeight + dropdownVal.scrollTop >= dropdownVal.scrollHeight) {
14689
+ ctx2.emit("loadMore", inputValue.value);
14717
14690
  }
14718
14691
  };
14719
14692
  return { loadMore };
14720
14693
  };
14721
- const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedIndex, options, toggleMenu, closeMenu, handleClick) => {
14694
+ const useKeyboardSelect = (dropdownRef, visible, inputValue, filteredOptions, optionDisabledKey, filterOption, loading2, handleClick, closeMenu, toggleMenu) => {
14695
+ const hoverIndex = ref(0);
14696
+ const selectedIndex = ref(0);
14722
14697
  const updateHoveringIndex = (index2) => {
14723
14698
  hoverIndex.value = index2;
14724
14699
  };
@@ -14737,66 +14712,71 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
14737
14712
  }
14738
14713
  });
14739
14714
  };
14740
- const onKeyboardNavigation = (direction, newIndex) => {
14741
- if (!newIndex) {
14742
- newIndex = hoverIndex.value;
14715
+ const handleEscape = () => {
14716
+ if (inputValue.value) {
14717
+ inputValue.value = "";
14718
+ } else {
14719
+ closeMenu();
14720
+ }
14721
+ };
14722
+ const handleEnter = () => {
14723
+ const len = filteredOptions.value.length;
14724
+ if (!visible.value) {
14725
+ toggleMenu();
14726
+ } else if (!len || len === 1) {
14727
+ closeMenu();
14728
+ } else if (len && len !== 1) {
14729
+ handleClick(filteredOptions.value[hoverIndex.value]);
14730
+ closeMenu();
14731
+ }
14732
+ };
14733
+ const handleKeyboardNavigation = (direction) => {
14734
+ const len = filteredOptions.value.length;
14735
+ if (!len || len === 1) {
14736
+ return;
14743
14737
  }
14744
14738
  if (!["ArrowDown", "ArrowUp"].includes(direction)) {
14745
14739
  return;
14746
14740
  }
14741
+ if (filterOption === false && loading2.value) {
14742
+ return;
14743
+ }
14744
+ let newIndex = 0;
14745
+ newIndex = hoverIndex.value;
14747
14746
  if (direction === "ArrowUp") {
14748
- if (newIndex === 0) {
14749
- newIndex = options.value.length - 1;
14750
- scrollToItem(newIndex);
14751
- updateHoveringIndex(newIndex);
14752
- return;
14747
+ newIndex -= 1;
14748
+ if (newIndex === -1) {
14749
+ newIndex = len - 1;
14753
14750
  }
14754
- newIndex = newIndex - 1;
14755
14751
  } else if (direction === "ArrowDown") {
14756
- if (newIndex === options.value.length - 1) {
14752
+ newIndex += 1;
14753
+ if (newIndex === len) {
14757
14754
  newIndex = 0;
14758
- scrollToItem(newIndex);
14759
- updateHoveringIndex(newIndex);
14760
- return;
14761
14755
  }
14762
- newIndex = newIndex + 1;
14763
14756
  }
14764
- const option2 = options.value[newIndex];
14765
- if (option2[disabled]) {
14766
- return onKeyboardNavigation(direction, newIndex);
14757
+ hoverIndex.value = newIndex;
14758
+ const option2 = filteredOptions.value[newIndex];
14759
+ if (option2[optionDisabledKey]) {
14760
+ return handleKeyboardNavigation(direction);
14767
14761
  }
14768
- scrollToItem(newIndex);
14769
14762
  updateHoveringIndex(newIndex);
14763
+ scrollToItem(newIndex);
14770
14764
  };
14771
14765
  const handleKeydown = (event) => {
14772
14766
  const keyCode = event.key || event.code;
14773
- if (options.value.length === 0) {
14774
- return;
14775
- }
14776
- if (!visible.value) {
14777
- return toggleMenu();
14778
- }
14779
- const onKeydownEnter = () => {
14780
- handleClick(options.value[hoverIndex.value]);
14781
- closeMenu();
14782
- };
14783
- const onKeydownEsc = () => {
14784
- closeMenu();
14785
- };
14786
14767
  switch (keyCode) {
14787
- case "Enter":
14788
- onKeydownEnter();
14789
- break;
14790
14768
  case "Escape":
14791
- onKeydownEsc();
14769
+ event.preventDefault();
14770
+ handleEscape();
14771
+ break;
14772
+ case "Enter":
14773
+ handleEnter();
14792
14774
  break;
14793
14775
  default:
14794
- onKeyboardNavigation(keyCode);
14776
+ handleKeyboardNavigation(keyCode);
14795
14777
  }
14796
14778
  };
14797
- return {
14798
- handleKeydown
14799
- };
14779
+ return { handleKeydown, hoverIndex, selectedIndex };
14800
14780
  };
14801
14781
  var EditableSelect = defineComponent({
14802
14782
  name: "DEditableSelect",
@@ -14806,101 +14786,19 @@ var EditableSelect = defineComponent({
14806
14786
  props: editableSelectProps,
14807
14787
  emits: ["update:modelValue", "search", "loadMore"],
14808
14788
  setup(props, ctx2) {
14809
- const getItemCls = (option2, index2) => {
14810
- const {
14811
- optionDisabledKey: disabledKey
14812
- } = props;
14813
- return className$2("devui-dropdown-item", {
14814
- disabled: disabledKey ? !!option2[disabledKey] : false,
14815
- selected: index2 === selectIndex.value,
14816
- "devui-dropdown-bg": index2 === hoverIndex.value
14817
- });
14818
- };
14819
- const renderDropdown = () => {
14820
- if (props.appendToBody) {
14821
- return createVNode(resolveComponent("d-flexible-overlay"), {
14822
- "origin": origin,
14823
- "visible": visible.value,
14824
- "onUpdate:visible": ($event) => visible.value = $event,
14825
- "position": position,
14826
- "hasBackdrop": false
14827
- }, {
14828
- default: () => [createVNode("div", {
14829
- "class": "devui-editable-select-dropdown",
14830
- "style": {
14831
- width: props.width + "px"
14832
- }
14833
- }, [withDirectives(createVNode("div", {
14834
- "class": "devui-dropdown-menu"
14835
- }, [createVNode("ul", {
14836
- "ref": dopdownRef,
14837
- "class": "devui-list-unstyled scroll-height",
14838
- "style": {
14839
- maxHeight: props.maxHeight + "px"
14840
- },
14841
- "onScroll": loadMore
14842
- }, [filteredOptions.value.map((option2, index2) => {
14843
- return createVNode("li", {
14844
- "class": getItemCls(option2, index2),
14845
- "onClick": (e) => {
14846
- e.stopPropagation();
14847
- handleClick(option2);
14848
- }
14849
- }, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(option2) : option2.label]);
14850
- }), withDirectives(createVNode("li", {
14851
- "class": "devui-no-result-template"
14852
- }, [createVNode("div", {
14853
- "class": "devui-no-data-tip"
14854
- }, [emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[resolveDirective("dLoading"), props.loading], [vShow, visible.value]])])]
14855
- });
14856
- } else {
14857
- return createVNode(Transition, {
14858
- "name": "fade"
14859
- }, {
14860
- default: () => [withDirectives(createVNode("div", {
14861
- "class": "devui-dropdown-menu"
14862
- }, [createVNode("ul", {
14863
- "ref": dopdownRef,
14864
- "class": "devui-list-unstyled scroll-height",
14865
- "style": {
14866
- maxHeight: props.maxHeight + "px"
14867
- },
14868
- "onScroll": loadMore
14869
- }, [filteredOptions.value.map((option2, index2) => {
14870
- return createVNode("li", {
14871
- "class": getItemCls(option2, index2),
14872
- "onClick": (e) => {
14873
- e.stopPropagation();
14874
- handleClick(option2);
14875
- }
14876
- }, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(option2) : option2.label]);
14877
- }), withDirectives(createVNode("li", {
14878
- "class": "devui-no-result-template"
14879
- }, [createVNode("div", {
14880
- "class": "devui-no-data-tip"
14881
- }, [emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[vShow, visible.value]])]
14882
- });
14883
- }
14884
- };
14885
- const dopdownRef = ref();
14789
+ const dropdownRef = ref();
14886
14790
  const origin = ref();
14887
- const position = reactive({
14888
- originX: "left",
14889
- originY: "bottom",
14890
- overlayX: "left",
14891
- overlayY: "top"
14892
- });
14791
+ const position = ref(["bottom", "left"]);
14893
14792
  const visible = ref(false);
14894
- const inputValue = ref(props.modelValue);
14895
- const hoverIndex = ref(0);
14896
- const selectIndex = ref(0);
14793
+ const inputValue = ref(props.modelValue || "");
14794
+ const loading2 = ref(props.loading);
14897
14795
  const normalizeOptions = computed(() => {
14898
14796
  return props.options.map((option2) => {
14899
14797
  if (typeof option2 === "object") {
14900
- return __spreadValues({
14798
+ return Object.assign({}, option2, {
14901
14799
  label: option2.label ? option2.label : option2.value,
14902
14800
  value: option2.value
14903
- }, option2);
14801
+ });
14904
14802
  }
14905
14803
  return {
14906
14804
  label: option2 + "",
@@ -14910,13 +14808,16 @@ var EditableSelect = defineComponent({
14910
14808
  });
14911
14809
  const filteredOptions = userFilterOptions(normalizeOptions, inputValue, props.filterOption);
14912
14810
  const emptyText = computed(() => {
14913
- let text;
14811
+ let text = "";
14914
14812
  if (props.filterOption !== false && !filteredOptions.value.length) {
14915
14813
  text = "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55";
14916
14814
  } else if (props.filterOption === false && !filteredOptions.value.length) {
14917
14815
  text = "\u6CA1\u6709\u6570\u636E";
14918
14816
  }
14919
- return ctx2.slots.noResultItemTemplate ? ctx2.slots.noResultItemTemplate() : text;
14817
+ return text;
14818
+ });
14819
+ watch(() => props.loading, (newVal) => {
14820
+ loading2.value = newVal;
14920
14821
  });
14921
14822
  const toggleMenu = () => {
14922
14823
  visible.value = !visible.value;
@@ -14926,7 +14827,7 @@ var EditableSelect = defineComponent({
14926
14827
  };
14927
14828
  const {
14928
14829
  loadMore
14929
- } = useLazyLoad(dopdownRef, inputValue, props.filterOption, props.loadMore);
14830
+ } = useLazyLoad(dropdownRef, inputValue, props.filterOption, ctx2);
14930
14831
  const {
14931
14832
  handleInput
14932
14833
  } = useInput(inputValue, ctx2);
@@ -14934,17 +14835,32 @@ var EditableSelect = defineComponent({
14934
14835
  const {
14935
14836
  optionDisabledKey: disabledKey
14936
14837
  } = props;
14937
- if (disabledKey && !!option2[disabledKey])
14838
+ if (disabledKey && !!option2[disabledKey]) {
14938
14839
  return;
14840
+ }
14939
14841
  ctx2.emit("update:modelValue", option2.label);
14940
14842
  closeMenu();
14941
14843
  };
14942
14844
  const {
14943
- handleKeydown
14944
- } = useKeyboardSelect(dopdownRef, props.optionDisabledKey, visible, hoverIndex, selectIndex, filteredOptions, toggleMenu, closeMenu, handleClick);
14845
+ handleKeydown,
14846
+ hoverIndex,
14847
+ selectedIndex
14848
+ } = useKeyboardSelect(dropdownRef, visible, inputValue, filteredOptions, props.optionDisabledKey, props.filterOption, loading2, handleClick, closeMenu, toggleMenu);
14945
14849
  watch(() => props.modelValue, (newVal) => {
14946
- inputValue.value = newVal;
14850
+ if (newVal) {
14851
+ inputValue.value = newVal;
14852
+ }
14947
14853
  });
14854
+ const getItemCls = (option2, index2) => {
14855
+ const {
14856
+ optionDisabledKey: disabledKey
14857
+ } = props;
14858
+ return className$2("devui-dropdown-item", {
14859
+ disabled: disabledKey ? !!option2[disabledKey] : false,
14860
+ selected: index2 === selectedIndex.value,
14861
+ "devui-dropdown-bg": index2 === hoverIndex.value
14862
+ });
14863
+ };
14948
14864
  return () => {
14949
14865
  const selectCls = className$2("devui-editable-select devui-form-group devui-has-feedback", {
14950
14866
  "devui-select-open": visible.value === true
@@ -14970,7 +14886,41 @@ var EditableSelect = defineComponent({
14970
14886
  "class": "devui-select-chevron-icon"
14971
14887
  }, [createVNode(resolveComponent("d-icon"), {
14972
14888
  "name": "select-arrow"
14973
- }, null)])]), renderDropdown()]), [[resolveDirective("click-outside"), closeMenu]]);
14889
+ }, null)])]), createVNode(resolveComponent("d-flexible-overlay"), {
14890
+ "origin": origin.value,
14891
+ "modelValue": visible.value,
14892
+ "onUpdate:modelValue": ($event) => visible.value = $event,
14893
+ "position": position.value,
14894
+ "hasBackdrop": false
14895
+ }, {
14896
+ default: () => [createVNode("div", {
14897
+ "class": "devui-editable-select-dropdown",
14898
+ "style": {
14899
+ width: props.width + "px"
14900
+ }
14901
+ }, [withDirectives(createVNode("div", {
14902
+ "class": "devui-dropdown-menu"
14903
+ }, [createVNode("ul", {
14904
+ "ref": dropdownRef,
14905
+ "class": "devui-list-unstyled scroll-height",
14906
+ "style": {
14907
+ maxHeight: props.maxHeight + "px"
14908
+ },
14909
+ "onScroll": loadMore
14910
+ }, [filteredOptions.value.map((option2, index2) => {
14911
+ return createVNode("li", {
14912
+ "class": getItemCls(option2, index2),
14913
+ "onClick": (e) => {
14914
+ e.stopPropagation();
14915
+ handleClick(option2);
14916
+ }
14917
+ }, [ctx2.slots.item ? ctx2.slots.item(option2) : option2.label]);
14918
+ }), withDirectives(createVNode("li", {
14919
+ "class": "devui-no-result-template"
14920
+ }, [createVNode("div", {
14921
+ "class": "devui-no-data-tip"
14922
+ }, [ctx2.slots.noResultItem ? ctx2.slots.noResultItem() : emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[resolveDirective("dLoading"), props.loading], [vShow, visible.value]])])]
14923
+ })]), [[resolveDirective("click-outside"), closeMenu]]);
14974
14924
  };
14975
14925
  }
14976
14926
  });
@@ -15142,8 +15092,8 @@ function usePopover(props, visible, placement, origin, popoverRef) {
15142
15092
  transformOrigin: TransformOriginMap$1[placement.value]
15143
15093
  }));
15144
15094
  const onDocumentClick = (e) => {
15145
- var _a;
15146
- if (!origin.value.contains(e.target) && !((_a = popoverRef.value.$el) == null ? void 0 : _a.contains(e.target))) {
15095
+ var _a, _b;
15096
+ if (!((_a = origin.value) == null ? void 0 : _a.contains(e.target)) && !((_b = popoverRef.value.$el) == null ? void 0 : _b.contains(e.target))) {
15147
15097
  visible.value = false;
15148
15098
  }
15149
15099
  };
@@ -19131,7 +19081,7 @@ var Progress = defineComponent({
19131
19081
  a ${radius},${radius} 0 1 1 0,${endPositionY}`;
19132
19082
  const len = Math.PI * 2 * radius;
19133
19083
  data.trailPath = {
19134
- stroke: "#dfe1e6",
19084
+ stroke: "var(--devui-dividing-line, #dfe1e6)",
19135
19085
  strokeDasharray: `${len}px ${len}px`,
19136
19086
  strokeDashoffset: `0`,
19137
19087
  transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"
@@ -19656,13 +19606,19 @@ var Radio = defineComponent({
19656
19606
  "viewBox": "0 0 1024 1024",
19657
19607
  "xmlns": "http://www.w3.org/2000/svg"
19658
19608
  }, [createVNode("circle", {
19659
- "class": "devui-radio-material-outer",
19609
+ "class": {
19610
+ "devui-radio-material-outer": true,
19611
+ disabled
19612
+ },
19660
19613
  "cx": "512",
19661
19614
  "cy": "512",
19662
19615
  "r": "486.5",
19663
19616
  "stroke-width": "51"
19664
19617
  }, null), createVNode("circle", {
19665
- "class": "devui-radio-material-inner",
19618
+ "class": {
19619
+ "devui-radio-material-inner": true,
19620
+ disabled
19621
+ },
19666
19622
  "cx": "512",
19667
19623
  "fill-rule": "nonzero",
19668
19624
  "cy": "512",
@@ -20255,9 +20211,9 @@ const DEFAULT_PLUGIN_OPTIONS = {
20255
20211
  color: "currentColor",
20256
20212
  initialOpacity: 0.2,
20257
20213
  finalOpacity: 0.1,
20258
- duration: 0.8,
20214
+ duration: 400,
20259
20215
  easing: "ease-out",
20260
- delayTime: 75,
20216
+ delay: 75,
20261
20217
  disabled: false
20262
20218
  };
20263
20219
  const createContainer = ({
@@ -20289,7 +20245,7 @@ const createrippleElement = (x, y, size, options) => {
20289
20245
  rippleElement.style.borderRadius = "50%";
20290
20246
  rippleElement.style.opacity = `${options.initialOpacity}`;
20291
20247
  rippleElement.style.transform = `translate(-50%,-50%) scale(0)`;
20292
- rippleElement.style.transition = `transform ${options.duration}s ${options.easing}, opacity ${options.duration}s ${options.easing}`;
20248
+ rippleElement.style.transition = `transform ${options.duration / 1e3}s ${options.easing}, opacity ${options.duration / 1e3}s ${options.easing}`;
20293
20249
  return rippleElement;
20294
20250
  };
20295
20251
  function magnitude(x1, y1, x2, y2) {
@@ -20309,6 +20265,13 @@ const getRelativePointer = ({ x, y }, { top, left }) => ({
20309
20265
  y: y - top
20310
20266
  });
20311
20267
  const RIPPLE_COUNT = "vRippleCountInternal";
20268
+ function setRippleCount(el, count) {
20269
+ el.dataset[RIPPLE_COUNT] = count.toString();
20270
+ }
20271
+ function getRippleCount(el) {
20272
+ var _a;
20273
+ return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
20274
+ }
20312
20275
  function incrementRippleCount(el) {
20313
20276
  const count = getRippleCount(el);
20314
20277
  setRippleCount(el, count + 1);
@@ -20317,13 +20280,6 @@ function decrementRippleCount(el) {
20317
20280
  const count = getRippleCount(el);
20318
20281
  setRippleCount(el, count - 1);
20319
20282
  }
20320
- function setRippleCount(el, count) {
20321
- el.dataset[RIPPLE_COUNT] = count.toString();
20322
- }
20323
- function getRippleCount(el) {
20324
- var _a;
20325
- return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
20326
- }
20327
20283
  function deleteRippleCount(el) {
20328
20284
  delete el.dataset[RIPPLE_COUNT];
20329
20285
  }
@@ -20335,29 +20291,10 @@ const ripple = (event, el, options) => {
20335
20291
  const size = MULTIPLE_NUMBER * getDistanceToFurthestCorner(x, y, rect);
20336
20292
  const rippleContainer = createContainer(computedStyles);
20337
20293
  const rippleEl = createrippleElement(x, y, size, options);
20338
- incrementRippleCount(el);
20339
20294
  let originalPositionValue = "";
20340
- if (computedStyles.position === "static") {
20341
- if (el.style.position) {
20342
- originalPositionValue = el.style.position;
20343
- }
20344
- el.style.position = "relative";
20345
- }
20346
- rippleContainer.appendChild(rippleEl);
20347
- el.appendChild(rippleContainer);
20348
20295
  let shouldDissolveripple = false;
20349
- const releaseripple = (e) => {
20350
- if (typeof e !== "undefined") {
20351
- document.removeEventListener("pointerup", releaseripple);
20352
- document.removeEventListener("pointercancel", releaseripple);
20353
- }
20354
- if (shouldDissolveripple) {
20355
- dissolveripple();
20356
- } else {
20357
- shouldDissolveripple = true;
20358
- }
20359
- };
20360
- const dissolveripple = () => {
20296
+ let token = null;
20297
+ function dissolveripple() {
20361
20298
  rippleEl.style.transition = "opacity 150ms linear";
20362
20299
  rippleEl.style.opacity = "0";
20363
20300
  setTimeout(() => {
@@ -20368,24 +20305,44 @@ const ripple = (event, el, options) => {
20368
20305
  el.style.position = originalPositionValue;
20369
20306
  }
20370
20307
  }, 150);
20371
- };
20308
+ }
20309
+ function releaseripple(e) {
20310
+ if (typeof e !== "undefined") {
20311
+ document.removeEventListener("pointerup", releaseripple);
20312
+ document.removeEventListener("pointercancel", releaseripple);
20313
+ }
20314
+ if (shouldDissolveripple) {
20315
+ dissolveripple();
20316
+ } else {
20317
+ shouldDissolveripple = true;
20318
+ }
20319
+ }
20320
+ function cancelripple() {
20321
+ clearTimeout(token);
20322
+ rippleContainer.remove();
20323
+ document.removeEventListener("pointerup", releaseripple);
20324
+ document.removeEventListener("pointercancel", releaseripple);
20325
+ document.removeEventListener("pointercancel", cancelripple);
20326
+ }
20327
+ incrementRippleCount(el);
20328
+ if (computedStyles.position === "static") {
20329
+ if (el.style.position) {
20330
+ originalPositionValue = el.style.position;
20331
+ }
20332
+ el.style.position = "relative";
20333
+ }
20334
+ rippleContainer.appendChild(rippleEl);
20335
+ el.appendChild(rippleContainer);
20372
20336
  document.addEventListener("pointerup", releaseripple);
20373
20337
  document.addEventListener("pointercancel", releaseripple);
20374
- const token = setTimeout(() => {
20338
+ token = setTimeout(() => {
20375
20339
  document.removeEventListener("pointercancel", cancelripple);
20376
20340
  requestAnimationFrame(() => {
20377
20341
  rippleEl.style.transform = `translate(-50%,-50%) scale(1)`;
20378
20342
  rippleEl.style.opacity = `${options.finalOpacity}`;
20379
- setTimeout(() => releaseripple(), options.duration * 1e3);
20343
+ setTimeout(() => releaseripple(), options.duration);
20380
20344
  });
20381
- }, options.delayTime);
20382
- const cancelripple = () => {
20383
- clearTimeout(token);
20384
- rippleContainer.remove();
20385
- document.removeEventListener("pointerup", releaseripple);
20386
- document.removeEventListener("pointercancel", releaseripple);
20387
- document.removeEventListener("pointercancel", cancelripple);
20388
- };
20345
+ }, options.delay);
20389
20346
  document.addEventListener("pointercancel", cancelripple);
20390
20347
  };
20391
20348
  const optionMap = /* @__PURE__ */ new WeakMap();
@@ -20715,7 +20672,6 @@ var Select = defineComponent({
20715
20672
  if (typeof item2 === "object") {
20716
20673
  option2 = __spreadValues({
20717
20674
  name: item2.name ? item2.name : item2.value + "",
20718
- value: item2.value,
20719
20675
  _checked: false
20720
20676
  }, item2);
20721
20677
  } else {
@@ -20740,7 +20696,7 @@ var Select = defineComponent({
20740
20696
  var _a;
20741
20697
  if (props.multiple && Array.isArray(props.modelValue)) {
20742
20698
  const selectedOptions = getValuesOption(props.modelValue);
20743
- return selectedOptions.map((item2) => item2.name).join(",");
20699
+ return selectedOptions.map((item2) => (item2 == null ? void 0 : item2.name) || "").join(",");
20744
20700
  } else if (!Array.isArray(props.modelValue)) {
20745
20701
  return ((_a = getValuesOption([props.modelValue])[0]) == null ? void 0 : _a.name) || "";
20746
20702
  }
@@ -20762,7 +20718,7 @@ var Select = defineComponent({
20762
20718
  }
20763
20719
  if (multiple) {
20764
20720
  item2._checked = !item2._checked;
20765
- modelValue = mergeOptions.value.filter((item3) => item3._checked).map((item3) => item3.value);
20721
+ modelValue = mergeOptions.value.filter((item1) => item1._checked).map((item22) => item22.value);
20766
20722
  ctx2.emit("update:modelValue", modelValue);
20767
20723
  } else {
20768
20724
  ctx2.emit("update:modelValue", item2.value);
@@ -20879,15 +20835,12 @@ var Select = defineComponent({
20879
20835
  })]);
20880
20836
  }
20881
20837
  });
20882
- Select.install = function(app) {
20883
- app.component(Select.name, Select);
20884
- };
20885
20838
  var SelectInstall = {
20886
20839
  title: "Select \u4E0B\u62C9\u6846",
20887
20840
  category: "\u6570\u636E\u5F55\u5165",
20888
20841
  status: "10%",
20889
20842
  install(app) {
20890
- app.use(Select);
20843
+ app.component(Select.name, Select);
20891
20844
  }
20892
20845
  };
20893
20846
  var skeleton = "";
@@ -21230,34 +21183,41 @@ var Slider = defineComponent({
21230
21183
  const currentPosition = ref(0);
21231
21184
  const newPostion = ref(0);
21232
21185
  const percentDispaly = ref("");
21233
- const renderShowInput = () => {
21234
- return props.showInput ? createVNode("div", {
21235
- "class": "devui-input__out-wrap"
21236
- }, [createVNode("input", {
21237
- "onInput": handleOnInput,
21238
- "value": inputValue.value + ""
21239
- }, null)]) : "";
21240
- };
21241
- if (props.modelValue > props.max) {
21242
- percentDispaly.value = "100%";
21243
- } else if (props.modelValue < props.min) {
21244
- percentDispaly.value = "0%";
21245
- } else {
21246
- percentDispaly.value = (props.modelValue - props.min) * 100 / (props.max - props.min) + "%";
21186
+ function handleOnInput(event) {
21187
+ inputValue.value = parseInt(event.target.value);
21188
+ if (!inputValue.value) {
21189
+ inputValue.value = props.min;
21190
+ percentDispaly.value = "0%";
21191
+ } else {
21192
+ if (inputValue.value < props.min || inputValue.value > props.max) {
21193
+ return;
21194
+ }
21195
+ const re = /^(?:[1-9]?\d|100)$/;
21196
+ if (re.test(`${inputValue.value}`)) {
21197
+ percentDispaly.value = (inputValue.value - props.min) * 100 / (props.max - props.min) + "%";
21198
+ ctx2.emit("update:modelValue", inputValue.value);
21199
+ }
21200
+ }
21247
21201
  }
21248
- onMounted(() => {
21249
- const sliderWidth = sliderRunway.value.clientWidth;
21250
- currentPosition.value = sliderWidth * (inputValue.value - props.min) / (props.max - props.min);
21251
- });
21252
- function handleButtonMousedown(event) {
21253
- popoverShow.value = true;
21254
- if (props.disabled) {
21202
+ function setPostion(newPosition) {
21203
+ const sliderWidth = Math.round(sliderRunway.value.clientWidth);
21204
+ if (newPosition < 0) {
21205
+ newPosition = 0;
21206
+ }
21207
+ const LengthPerStep = sliderWidth / ((props.max - props.min) / props.step);
21208
+ const steps = Math.round(newPosition / LengthPerStep);
21209
+ const value = steps * LengthPerStep;
21210
+ if (Math.round(value) >= sliderWidth) {
21211
+ currentPosition.value = sliderWidth;
21212
+ inputValue.value = props.max;
21213
+ percentDispaly.value = "100%";
21214
+ ctx2.emit("update:modelValue", props.max);
21255
21215
  return;
21256
21216
  }
21257
- event.preventDefault();
21258
- dragStart(event);
21259
- window.addEventListener("mousemove", onDragging);
21260
- window.addEventListener("mouseup", onDragEnd);
21217
+ percentDispaly.value = Math.round(value * 100 / sliderWidth) + "%";
21218
+ inputValue.value = Math.round(value * (props.max - props.min) / sliderWidth) + props.min;
21219
+ currentPosition.value = newPosition;
21220
+ ctx2.emit("update:modelValue", inputValue.value);
21261
21221
  }
21262
21222
  function dragStart(event) {
21263
21223
  isClick = false;
@@ -21280,25 +21240,34 @@ var Slider = defineComponent({
21280
21240
  window.removeEventListener("mousemove", onDragging);
21281
21241
  window.removeEventListener("mouseup", onDragEnd);
21282
21242
  }
21283
- function setPostion(newPosition) {
21284
- const sliderWidth = Math.round(sliderRunway.value.clientWidth);
21285
- if (newPosition < 0) {
21286
- newPosition = 0;
21287
- }
21288
- const LengthPerStep = sliderWidth / ((props.max - props.min) / props.step);
21289
- const steps = Math.round(newPosition / LengthPerStep);
21290
- const value = steps * LengthPerStep;
21291
- if (Math.round(value) >= sliderWidth) {
21292
- currentPosition.value = sliderWidth;
21293
- inputValue.value = props.max;
21294
- percentDispaly.value = "100%";
21295
- ctx2.emit("update:modelValue", props.max);
21243
+ const renderShowInput = () => {
21244
+ return props.showInput ? createVNode("div", {
21245
+ "class": "devui-input__out-wrap"
21246
+ }, [createVNode("input", {
21247
+ "onInput": handleOnInput,
21248
+ "value": inputValue.value + ""
21249
+ }, null)]) : "";
21250
+ };
21251
+ if (props.modelValue > props.max) {
21252
+ percentDispaly.value = "100%";
21253
+ } else if (props.modelValue < props.min) {
21254
+ percentDispaly.value = "0%";
21255
+ } else {
21256
+ percentDispaly.value = (props.modelValue - props.min) * 100 / (props.max - props.min) + "%";
21257
+ }
21258
+ onMounted(() => {
21259
+ const sliderWidth = sliderRunway.value.clientWidth;
21260
+ currentPosition.value = sliderWidth * (inputValue.value - props.min) / (props.max - props.min);
21261
+ });
21262
+ function handleButtonMousedown(event) {
21263
+ popoverShow.value = true;
21264
+ if (props.disabled) {
21296
21265
  return;
21297
21266
  }
21298
- percentDispaly.value = Math.round(value * 100 / sliderWidth) + "%";
21299
- inputValue.value = Math.round(value * (props.max - props.min) / sliderWidth) + props.min;
21300
- currentPosition.value = newPosition;
21301
- ctx2.emit("update:modelValue", inputValue.value);
21267
+ event.preventDefault();
21268
+ dragStart(event);
21269
+ window.addEventListener("mousemove", onDragging);
21270
+ window.addEventListener("mouseup", onDragEnd);
21302
21271
  }
21303
21272
  function handleRunwayMousedown(event) {
21304
21273
  if (!props.disabled && isClick) {
@@ -21310,22 +21279,6 @@ var Slider = defineComponent({
21310
21279
  return;
21311
21280
  }
21312
21281
  }
21313
- function handleOnInput(event) {
21314
- inputValue.value = parseInt(event.target.value);
21315
- if (!inputValue.value) {
21316
- inputValue.value = props.min;
21317
- percentDispaly.value = "0%";
21318
- } else {
21319
- if (inputValue.value < props.min || inputValue.value > props.max) {
21320
- return;
21321
- }
21322
- const re = /^(?:[1-9]?\d|100)$/;
21323
- if (re.test(`${inputValue.value}`)) {
21324
- percentDispaly.value = (inputValue.value - props.min) * 100 / (props.max - props.min) + "%";
21325
- ctx2.emit("update:modelValue", inputValue.value);
21326
- }
21327
- }
21328
- }
21329
21282
  const disableClass = computed(() => {
21330
21283
  return props.disabled ? " disabled" : "";
21331
21284
  });
@@ -21377,25 +21330,7 @@ var SliderInstall = {
21377
21330
  category: "\u6570\u636E\u5F55\u5165",
21378
21331
  status: "100%",
21379
21332
  install(app) {
21380
- app.use(Slider);
21381
- }
21382
- };
21383
- const splitterProps = {
21384
- orientation: {
21385
- type: String,
21386
- default: "horizontal"
21387
- },
21388
- splitBarSize: {
21389
- type: String,
21390
- default: "2px"
21391
- },
21392
- disabledBarSize: {
21393
- type: String,
21394
- default: "1px"
21395
- },
21396
- showCollapseButton: {
21397
- type: Boolean,
21398
- default: true
21333
+ app.component(Slider.name, Slider);
21399
21334
  }
21400
21335
  };
21401
21336
  const tooltipProps = {
@@ -21547,58 +21482,58 @@ function removeClass(el, className2) {
21547
21482
  }
21548
21483
  }
21549
21484
  }
21550
- const resize = {
21551
- mounted(el, { value }) {
21552
- el.$value = value;
21553
- if (value.enableResize) {
21554
- bindEvent(el);
21555
- }
21556
- },
21557
- unmounted(el, { value }) {
21558
- if (value.enableResize) {
21559
- unbind(el, "mousedown", onMousedown);
21560
- }
21561
- }
21562
- };
21563
- function bindEvent(el) {
21564
- bind(el, "mousedown", onMousedown);
21485
+ function normalizeEvent(evt) {
21486
+ return {
21487
+ pageX: evt.pageX,
21488
+ pageY: evt.pageY,
21489
+ clientX: evt.clientX,
21490
+ clientY: evt.clientY,
21491
+ offsetX: evt.offsetX,
21492
+ offsetY: evt.offsetY,
21493
+ type: evt.type,
21494
+ originalEvent: evt
21495
+ };
21565
21496
  }
21566
- function bind(el, event, callback) {
21567
- el.addEventListener && el.addEventListener(event, callback);
21497
+ function bind(el, eventName, callback) {
21498
+ el.addEventListener && el.addEventListener(eventName, callback);
21568
21499
  }
21569
- function unbind(el, event, callback) {
21570
- el.removeEventListener && el.removeEventListener(event, callback);
21500
+ function unbind(el, eventName, callback) {
21501
+ el.removeEventListener && el.removeEventListener(eventName, callback);
21571
21502
  }
21572
21503
  function onMousedown(e) {
21573
21504
  var _a;
21574
- const $value = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.$value;
21575
- if (!$value) {
21505
+ const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
21506
+ if (!resizeProps) {
21576
21507
  return;
21577
21508
  }
21578
- bind(document, "mousemove", onMousemove);
21579
- bind(document, "mouseup", onMouseup);
21580
- $value.onPressEvent(normalizeEvent(e));
21581
- function onMousemove(e2) {
21582
- $value.onDragEvent(normalizeEvent(e2));
21509
+ function onMousemove(evt) {
21510
+ resizeProps.onDragEvent(normalizeEvent(evt));
21583
21511
  }
21584
- function onMouseup(e2) {
21512
+ function onMouseup(evt) {
21585
21513
  unbind(document, "mousemove", onMousemove);
21586
21514
  unbind(document, "mouseup", onMouseup);
21587
- $value.onReleaseEvent(normalizeEvent(e2));
21515
+ resizeProps.onReleaseEvent(normalizeEvent(evt));
21588
21516
  }
21517
+ bind(document, "mousemove", onMousemove);
21518
+ bind(document, "mouseup", onMouseup);
21519
+ resizeProps.onPressEvent(normalizeEvent(e));
21589
21520
  }
21590
- function normalizeEvent(e) {
21591
- return {
21592
- pageX: e.pageX,
21593
- pageY: e.pageY,
21594
- clientX: e.clientX,
21595
- clientY: e.clientY,
21596
- offsetX: e.offsetX,
21597
- offsetY: e.offsetY,
21598
- type: e.type,
21599
- originalEvent: e
21600
- };
21521
+ function bindEvent(el) {
21522
+ bind(el, "mousedown", onMousedown);
21601
21523
  }
21524
+ const resize = {
21525
+ mounted(el, { value }) {
21526
+ el.resizeProps = value;
21527
+ if (value.enableResize) {
21528
+ bindEvent(el);
21529
+ }
21530
+ },
21531
+ unmounted(el, { value }) {
21532
+ if (value.enableResize) {
21533
+ unbind(el, "mousedown", onMousedown);
21534
+ }
21535
+ }
21536
+ };
21602
21537
  const splitterBarProps = {
21603
21538
  index: {
21604
21539
  type: Number
@@ -21642,10 +21577,13 @@ var DSplitterBar = defineComponent({
21642
21577
  }, {
21643
21578
  immediate: true
21644
21579
  });
21645
- watch([() => store.state.panes, domRef], ([panes, ele]) => {
21580
+ watch([() => store == null ? void 0 : store.state.panes, domRef], ([, ele]) => {
21581
+ if (!store || !props || props.index === void 0) {
21582
+ return;
21583
+ }
21646
21584
  if (!store.isStaticBar(props.index)) {
21647
21585
  state.wrapperClass += " resizable";
21648
- } else {
21586
+ } else if (ele) {
21649
21587
  setStyle(ele, {
21650
21588
  flexBasis: props.disabledBarSize
21651
21589
  });
@@ -21653,62 +21591,10 @@ var DSplitterBar = defineComponent({
21653
21591
  }, {
21654
21592
  deep: true
21655
21593
  });
21656
- const coordinate = {
21657
- pageX: 0,
21658
- pageY: 0,
21659
- originalX: 0,
21660
- originalY: 0
21661
- };
21662
- let initState2;
21663
- const resizeProp = {
21664
- enableResize: true,
21665
- onPressEvent: function({
21666
- originalEvent
21667
- }) {
21668
- originalEvent.stopPropagation();
21669
- if (!store.isResizable(props.index)) {
21670
- return;
21671
- }
21672
- initState2 = store.dragState(props.index);
21673
- coordinate.originalX = originalEvent.pageX;
21674
- coordinate.originalY = originalEvent.pageY;
21675
- },
21676
- onDragEvent: function({
21677
- originalEvent
21678
- }) {
21679
- originalEvent.stopPropagation();
21680
- if (!store.isResizable(props.index)) {
21681
- return;
21682
- }
21683
- coordinate.pageX = originalEvent.pageX;
21684
- coordinate.pageY = originalEvent.pageY;
21685
- let distance;
21686
- if (props.orientation === "vertical") {
21687
- distance = coordinate.pageY - coordinate.originalY;
21688
- } else {
21689
- distance = coordinate.pageX - coordinate.originalX;
21690
- }
21691
- store.setSize(initState2, distance);
21692
- },
21693
- onReleaseEvent: function({
21694
- originalEvent
21695
- }) {
21696
- originalEvent.stopPropagation();
21697
- if (!store.isResizable(props.index)) {
21698
- return;
21699
- }
21700
- coordinate.pageX = originalEvent.pageX;
21701
- coordinate.pageY = originalEvent.pageY;
21702
- let distance;
21703
- if (props.orientation === "vertical") {
21704
- distance = coordinate.pageY - coordinate.originalY;
21705
- } else {
21706
- distance = coordinate.pageX - coordinate.originalX;
21707
- }
21708
- store.setSize(initState2, distance);
21709
- }
21710
- };
21711
21594
  const queryPanes = (index2, nearIndex) => {
21595
+ if (!store) {
21596
+ return {};
21597
+ }
21712
21598
  const pane = store.getPane(index2);
21713
21599
  const nearPane = store.getPane(nearIndex);
21714
21600
  return {
@@ -21720,7 +21606,7 @@ var DSplitterBar = defineComponent({
21720
21606
  var _a, _b, _c, _d;
21721
21607
  const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
21722
21608
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
21723
- const isNearPaneCollapsed = nearPane.collapsed;
21609
+ const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
21724
21610
  return {
21725
21611
  "devui-collapse": isCollapsible,
21726
21612
  collapsed: isCollapsed,
@@ -21729,6 +21615,9 @@ var DSplitterBar = defineComponent({
21729
21615
  };
21730
21616
  const prevClass = computed(() => {
21731
21617
  var _a, _b;
21618
+ if (!props || props.index === void 0) {
21619
+ return {};
21620
+ }
21732
21621
  const {
21733
21622
  pane,
21734
21623
  nearPane
@@ -21738,6 +21627,9 @@ var DSplitterBar = defineComponent({
21738
21627
  });
21739
21628
  const nextClass = computed(() => {
21740
21629
  var _a, _b;
21630
+ if (!store || !props || props.index === void 0) {
21631
+ return {};
21632
+ }
21741
21633
  const {
21742
21634
  pane,
21743
21635
  nearPane
@@ -21747,6 +21639,9 @@ var DSplitterBar = defineComponent({
21747
21639
  });
21748
21640
  const toggleResize = () => {
21749
21641
  var _a, _b, _c, _d;
21642
+ if (!domRef.value || !props || props.index === void 0) {
21643
+ return;
21644
+ }
21750
21645
  const {
21751
21646
  pane,
21752
21647
  nearPane
@@ -21759,10 +21654,16 @@ var DSplitterBar = defineComponent({
21759
21654
  }
21760
21655
  };
21761
21656
  const handleCollapsePrePane = (lockStatus) => {
21657
+ if (!store || !props || props.index === void 0) {
21658
+ return;
21659
+ }
21762
21660
  store.tooglePane(props.index, props.index + 1, lockStatus);
21763
21661
  toggleResize();
21764
21662
  };
21765
21663
  const handleCollapseNextPane = (lockStatus) => {
21664
+ if (!store || !props || props.index === void 0) {
21665
+ return;
21666
+ }
21766
21667
  store.tooglePane(props.index + 1, props.index, lockStatus);
21767
21668
  toggleResize();
21768
21669
  };
@@ -21770,11 +21671,78 @@ var DSplitterBar = defineComponent({
21770
21671
  handleCollapsePrePane(true);
21771
21672
  handleCollapseNextPane(true);
21772
21673
  };
21674
+ const coordinate = {
21675
+ pageX: 0,
21676
+ pageY: 0,
21677
+ originalX: 0,
21678
+ originalY: 0
21679
+ };
21680
+ let initState2;
21681
+ const resizeProp = {
21682
+ enableResize: true,
21683
+ onPressEvent: function({
21684
+ originalEvent
21685
+ }) {
21686
+ originalEvent.stopPropagation();
21687
+ if (!store || !props || props.index === void 0) {
21688
+ return;
21689
+ }
21690
+ if (!store.isResizable(props.index)) {
21691
+ return;
21692
+ }
21693
+ initState2 = store.dragState(props.index);
21694
+ coordinate.originalX = originalEvent.pageX;
21695
+ coordinate.originalY = originalEvent.pageY;
21696
+ },
21697
+ onDragEvent: function({
21698
+ originalEvent
21699
+ }) {
21700
+ originalEvent.stopPropagation();
21701
+ if (!store || !props || props.index === void 0) {
21702
+ return;
21703
+ }
21704
+ if (!store.isResizable(props.index)) {
21705
+ return;
21706
+ }
21707
+ coordinate.pageX = originalEvent.pageX;
21708
+ coordinate.pageY = originalEvent.pageY;
21709
+ let distance;
21710
+ if (props.orientation === "vertical") {
21711
+ distance = coordinate.pageY - coordinate.originalY;
21712
+ } else {
21713
+ distance = coordinate.pageX - coordinate.originalX;
21714
+ }
21715
+ store.setSize(initState2, distance);
21716
+ },
21717
+ onReleaseEvent: function({
21718
+ originalEvent
21719
+ }) {
21720
+ originalEvent.stopPropagation();
21721
+ if (!store || !props || props.index === void 0) {
21722
+ return;
21723
+ }
21724
+ if (!store.isResizable(props.index)) {
21725
+ return;
21726
+ }
21727
+ coordinate.pageX = originalEvent.pageX;
21728
+ coordinate.pageY = originalEvent.pageY;
21729
+ let distance;
21730
+ if (props.orientation === "vertical") {
21731
+ distance = coordinate.pageY - coordinate.originalY;
21732
+ } else {
21733
+ distance = coordinate.pageX - coordinate.originalX;
21734
+ }
21735
+ store.setSize(initState2, distance);
21736
+ }
21737
+ };
21773
21738
  onMounted(() => {
21774
21739
  initialCollapseStatus();
21775
21740
  });
21776
21741
  const renderCollapsedTip = () => {
21777
21742
  var _a, _b, _c, _d;
21743
+ if (!props || props.index === void 0) {
21744
+ return "\u6536\u8D77";
21745
+ }
21778
21746
  const {
21779
21747
  pane,
21780
21748
  nearPane
@@ -21918,6 +21886,24 @@ class SplitterStore {
21918
21886
  }
21919
21887
  }
21920
21888
  }
21889
+ const splitterProps = {
21890
+ orientation: {
21891
+ type: String,
21892
+ default: "horizontal"
21893
+ },
21894
+ splitBarSize: {
21895
+ type: String,
21896
+ default: "2px"
21897
+ },
21898
+ disabledBarSize: {
21899
+ type: String,
21900
+ default: "1px"
21901
+ },
21902
+ showCollapseButton: {
21903
+ type: Boolean,
21904
+ default: true
21905
+ }
21906
+ };
21921
21907
  var splitter = "";
21922
21908
  var Splitter = defineComponent({
21923
21909
  name: "DSplitter",
@@ -21959,7 +21945,9 @@ var Splitter = defineComponent({
21959
21945
  return;
21960
21946
  }
21961
21947
  refreshSplitterContainerSize();
21962
- observer.observe(domRef.value);
21948
+ if (domRef.value) {
21949
+ observer.observe(domRef.value);
21950
+ }
21963
21951
  });
21964
21952
  onUnmounted(() => {
21965
21953
  observer.disconnect();
@@ -22055,27 +22043,35 @@ var SplitterPane = defineComponent({
22055
22043
  }
22056
22044
  };
22057
22045
  watch([() => props.size, domRef], ([size, ele]) => {
22058
- setSizeStyle(size, ele);
22046
+ if (size && ele) {
22047
+ setSizeStyle(size, ele);
22048
+ }
22059
22049
  }, {
22060
22050
  immediate: true
22061
22051
  });
22062
22052
  const orientation = inject("orientation");
22063
22053
  let initialSize = "";
22064
22054
  onMounted(() => {
22065
- initialSize = props.size;
22066
- store.setPanes({
22067
- panes: store.state.panes
22068
- });
22055
+ if (props.size) {
22056
+ initialSize = props.size;
22057
+ }
22058
+ if (store) {
22059
+ store.setPanes({
22060
+ panes: store.state.panes
22061
+ });
22062
+ }
22069
22063
  });
22070
22064
  onUpdated(() => {
22071
- store.setPanes({
22072
- panes: store.state.panes
22073
- });
22065
+ if (store) {
22066
+ store.setPanes({
22067
+ panes: store.state.panes
22068
+ });
22069
+ }
22074
22070
  });
22075
22071
  const getPaneSize = () => {
22076
22072
  const ele = domRef.value;
22077
22073
  if (!ele) {
22078
- return;
22074
+ return 0;
22079
22075
  }
22080
22076
  if (orientation === "vertical") {
22081
22077
  return ele.offsetHeight;
@@ -23002,7 +22998,8 @@ const TableProps = {
23002
22998
  type: String,
23003
22999
  validator(value) {
23004
23000
  return value === "sm" || value === "md" || value === "lg";
23005
- }
23001
+ },
23002
+ default: "sm"
23006
23003
  },
23007
23004
  rowHoveredHighlight: {
23008
23005
  type: Boolean,
@@ -23014,7 +23011,7 @@ const TableProps = {
23014
23011
  },
23015
23012
  checkable: {
23016
23013
  type: Boolean,
23017
- default: true
23014
+ default: false
23018
23015
  },
23019
23016
  tableLayout: {
23020
23017
  type: String,
@@ -23030,15 +23027,48 @@ const TableProps = {
23030
23027
  headerBg: {
23031
23028
  type: Boolean,
23032
23029
  default: false
23030
+ },
23031
+ spanMethod: {
23032
+ type: Function
23033
+ },
23034
+ borderType: {
23035
+ type: String,
23036
+ default: ""
23033
23037
  }
23034
23038
  };
23035
23039
  const TABLE_TOKEN = Symbol();
23040
+ function createBem(namespace, element, modifier) {
23041
+ let cls = namespace;
23042
+ if (element) {
23043
+ cls += `__${element}`;
23044
+ }
23045
+ if (modifier) {
23046
+ cls += `--${modifier}`;
23047
+ }
23048
+ return cls;
23049
+ }
23050
+ function useNamespace(block) {
23051
+ const namespace = `devui-${block}`;
23052
+ const b = () => createBem(namespace);
23053
+ const e = (element) => element ? createBem(namespace, element) : "";
23054
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
23055
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
23056
+ return {
23057
+ b,
23058
+ e,
23059
+ m,
23060
+ em
23061
+ };
23062
+ }
23036
23063
  function useTable(props) {
23064
+ const ns = useNamespace("table");
23037
23065
  const classes = computed(() => ({
23038
- "devui-table": true,
23039
- "devui-table-striped": props.striped,
23040
- "header-bg": props.headerBg,
23041
- "table-layout-auto": props.tableLayout === "auto"
23066
+ [ns.e("view")]: true,
23067
+ [ns.m("striped")]: props.striped,
23068
+ [ns.m("header-bg")]: props.headerBg,
23069
+ [ns.m("layout-auto")]: props.tableLayout === "auto",
23070
+ [ns.m(`${props.size}`)]: true,
23071
+ [ns.m(`${props.borderType}`)]: props.borderType
23042
23072
  }));
23043
23073
  const style2 = computed(() => ({
23044
23074
  maxHeight: props.maxHeight,
@@ -23049,13 +23079,14 @@ function useTable(props) {
23049
23079
  return { classes, style: style2 };
23050
23080
  }
23051
23081
  const useFixedColumn = (column) => {
23082
+ const ns = useNamespace("table");
23052
23083
  const stickyCell = computed(() => {
23053
23084
  const col2 = column.value;
23054
23085
  if (col2.fixedLeft) {
23055
- return `devui-sticky-cell left`;
23086
+ return `${ns.m("sticky-cell")} left`;
23056
23087
  }
23057
23088
  if (col2.fixedRight) {
23058
- return `devui-sticky-cell right`;
23089
+ return `${ns.m("sticky-cell")} right`;
23059
23090
  }
23060
23091
  return void 0;
23061
23092
  });
@@ -23198,10 +23229,10 @@ var ColGroup = defineComponent({
23198
23229
  name: "DColGroup",
23199
23230
  setup() {
23200
23231
  const parent = inject(TABLE_TOKEN);
23201
- const columns = parent.store.states._columns;
23202
- return () => parent.props.tableLayout === "fixed" ? createVNode("colgroup", null, [parent.props.checkable ? createVNode("col", {
23232
+ const columns = parent == null ? void 0 : parent.store.states._columns;
23233
+ return () => (parent == null ? void 0 : parent.props.tableLayout) === "fixed" ? createVNode("colgroup", null, [parent.props.checkable ? createVNode("col", {
23203
23234
  "width": 36
23204
- }, null) : null, columns.value.map((column, index2) => {
23235
+ }, null) : null, columns == null ? void 0 : columns.value.map((column, index2) => {
23205
23236
  return createVNode("col", {
23206
23237
  "key": index2,
23207
23238
  "width": column.realWidth
@@ -23381,8 +23412,6 @@ const Filter = defineComponent({
23381
23412
  })]);
23382
23413
  }
23383
23414
  });
23384
- var header = "";
23385
- var body = "";
23386
23415
  const useSort = (store, column) => {
23387
23416
  const directionRef = ref("DESC");
23388
23417
  watch([directionRef, column], ([direction, column2]) => {
@@ -23392,13 +23421,53 @@ const useSort = (store, column) => {
23392
23421
  }, { immediate: true });
23393
23422
  return directionRef;
23394
23423
  };
23395
- const useFliter = (store, column) => {
23424
+ const useFilter = (store, column) => {
23396
23425
  const filteredRef = shallowRef();
23397
23426
  watch(filteredRef, (results2) => {
23398
23427
  store.filterData(column.value.field, results2);
23399
23428
  });
23400
23429
  return filteredRef;
23401
23430
  };
23431
+ var TH = defineComponent({
23432
+ name: "DTableHeaderTh",
23433
+ props: {
23434
+ column: {
23435
+ type: Object,
23436
+ required: true
23437
+ }
23438
+ },
23439
+ setup(props) {
23440
+ const table2 = inject(TABLE_TOKEN);
23441
+ const {
23442
+ column
23443
+ } = toRefs(props);
23444
+ const directionRef = useSort(table2.store, column);
23445
+ const filteredRef = useFilter(table2.store, column);
23446
+ const {
23447
+ stickyCell,
23448
+ offsetStyle
23449
+ } = useFixedColumn(column);
23450
+ return () => {
23451
+ var _a, _b;
23452
+ return createVNode("th", {
23453
+ "class": stickyCell.value,
23454
+ "style": offsetStyle.value
23455
+ }, [createVNode("div", {
23456
+ "class": "header-container"
23457
+ }, [(_b = (_a = props.column).renderHeader) == null ? void 0 : _b.call(_a), props.column.filterable && createVNode(Filter, {
23458
+ "modelValue": filteredRef.value,
23459
+ "onUpdate:modelValue": ($event) => filteredRef.value = $event,
23460
+ "filterList": props.column.filterList,
23461
+ "customTemplate": props.column.customFilterTemplate
23462
+ }, null)]), props.column.sortable && createVNode(Sort, {
23463
+ "modelValue": directionRef.value,
23464
+ "onUpdate:modelValue": ($event) => directionRef.value = $event
23465
+ }, null)]);
23466
+ };
23467
+ }
23468
+ });
23469
+ var header = "";
23470
+ var body = "";
23402
23471
  var TableHeader = defineComponent({
23403
23472
  name: "DTableHeader",
23404
23473
  setup() {
@@ -23409,60 +23478,111 @@ var TableHeader = defineComponent({
23409
23478
  _columns: columns,
23410
23479
  isFixedLeft
23411
23480
  } = table2.store.states;
23481
+ const ns = useNamespace("table");
23412
23482
  const thAttrs = computed(() => isFixedLeft.value ? {
23413
- class: "devui-sticky-cell left",
23483
+ class: `${ns.m("sticky-cell")} left`,
23414
23484
  style: "left:0;"
23415
23485
  } : null);
23416
- const checkbox2 = computed(() => table2.props.checkable ? createVNode("th", thAttrs.value, [createVNode(Checkbox, {
23417
- "style": "padding:10px;",
23486
+ const checkbox2 = computed(() => table2.props.checkable ? createVNode("th", mergeProps({
23487
+ "class": ns.e("checkable-cell")
23488
+ }, thAttrs.value), [createVNode(Checkbox, {
23418
23489
  "modelValue": checkAll.value,
23419
23490
  "onUpdate:modelValue": ($event) => checkAll.value = $event,
23420
23491
  "halfchecked": halfChecked.value
23421
23492
  }, null)]) : null);
23422
23493
  return () => {
23423
23494
  return createVNode("thead", {
23424
- "class": "devui-thead"
23425
- }, [createVNode("tr", null, [checkbox2.value, columns.value.map((column, index2) => createVNode(Th, {
23495
+ "class": ns.e("thead")
23496
+ }, [createVNode("tr", null, [checkbox2.value, columns.value.map((column, index2) => createVNode(TH, {
23426
23497
  "key": index2,
23427
23498
  "column": column
23428
23499
  }, null))])]);
23429
23500
  };
23430
23501
  }
23431
23502
  });
23432
- const Th = defineComponent({
23503
+ var TD = defineComponent({
23504
+ name: "DTableBodyTd",
23433
23505
  props: {
23434
23506
  column: {
23435
23507
  type: Object,
23436
- required: true
23508
+ default: () => ({})
23509
+ },
23510
+ row: {
23511
+ type: Object,
23512
+ default: () => ({})
23513
+ },
23514
+ index: {
23515
+ type: Number,
23516
+ default: 0
23437
23517
  }
23438
23518
  },
23439
23519
  setup(props) {
23440
- const table2 = inject(TABLE_TOKEN);
23441
- const {
23442
- column
23443
- } = toRefs(props);
23444
- const directionRef = useSort(table2.store, column);
23445
- const filteredRef = useFliter(table2.store, column);
23520
+ const column = toRef(props, "column");
23446
23521
  const {
23447
23522
  stickyCell,
23448
23523
  offsetStyle
23449
23524
  } = useFixedColumn(column);
23450
- return () => createVNode("th", {
23451
- "class": stickyCell.value,
23452
- "style": offsetStyle.value
23453
- }, [createVNode("div", {
23454
- "class": "header-container"
23455
- }, [props.column.renderHeader(), props.column.filterable && createVNode(Filter, {
23456
- "modelValue": filteredRef.value,
23457
- "onUpdate:modelValue": ($event) => filteredRef.value = $event,
23458
- "filterList": props.column.filterList,
23459
- "customTemplate": props.column.customFilterTemplate
23460
- }, null)]), props.column.sortable && createVNode(Sort, {
23461
- "modelValue": directionRef.value,
23462
- "onUpdate:modelValue": ($event) => directionRef.value = $event
23463
- }, null)]);
23525
+ return () => {
23526
+ var _a, _b;
23527
+ return createVNode("td", {
23528
+ "class": stickyCell.value,
23529
+ "style": offsetStyle.value
23530
+ }, [(_b = (_a = column.value).renderCell) == null ? void 0 : _b.call(_a, props.row, props.index)]);
23531
+ };
23464
23532
  }
23465
23533
  });
23534
+ function useMergeCell() {
23535
+ const table2 = inject(TABLE_TOKEN);
23536
+ const { _data: data, _columns: columns } = table2.store.states;
23537
+ const getSpan = (row2, column, rowIndex, columnIndex) => {
23538
+ const fn = table2 == null ? void 0 : table2.props.spanMethod;
23539
+ let rowspan = 1;
23540
+ let colspan = 1;
23541
+ if (typeof fn === "function") {
23542
+ const result2 = fn({ row: row2, column, rowIndex, columnIndex });
23543
+ if (Array.isArray(result2)) {
23544
+ rowspan = result2[0];
23545
+ colspan = result2[1];
23546
+ } else if (typeof result2 === "object") {
23547
+ rowspan = result2.rowspan;
23548
+ colspan = result2.colspan;
23549
+ }
23550
+ }
23551
+ return { rowspan, colspan };
23552
+ };
23553
+ const tableSpans = computed(() => {
23554
+ const result2 = {};
23555
+ if (table2 == null ? void 0 : table2.props.spanMethod) {
23556
+ data.value.forEach((row2, rowIndex) => {
23557
+ columns.value.forEach((column, columnIndex) => {
23558
+ const { rowspan, colspan } = getSpan(row2, column, rowIndex, columnIndex);
23559
+ if (rowspan > 1 || colspan > 1) {
23560
+ result2[`${rowIndex}-${columnIndex}`] = [rowspan, colspan];
23561
+ }
23562
+ });
23563
+ });
23564
+ }
23565
+ return result2;
23566
+ });
23567
+ const removeCells = computed(() => {
23568
+ const result2 = [];
23569
+ for (const indexKey of Object.keys(tableSpans.value)) {
23570
+ const indexArray = indexKey.split("-").map((item2) => Number(item2));
23571
+ const spans = tableSpans.value[indexKey];
23572
+ for (let i = 1; i < spans[0]; i++) {
23573
+ result2.push(`${indexArray[0] + i}-${indexArray[1]}`);
23574
+ for (let j = 1; j < spans[1]; j++) {
23575
+ result2.push(`${indexArray[0] + i}-${indexArray[1] + j}`);
23576
+ }
23577
+ }
23578
+ for (let i = 1; i < spans[1]; i++) {
23579
+ result2.push(`${indexArray[0]}-${indexArray[1] + i}`);
23580
+ }
23581
+ }
23582
+ return result2;
23583
+ });
23584
+ return { tableSpans, removeCells };
23585
+ }
23466
23586
  var TableBody = defineComponent({
23467
23587
  name: "DTableBody",
23468
23588
  setup() {
@@ -23473,55 +23593,48 @@ var TableBody = defineComponent({
23473
23593
  _checkList: checkList,
23474
23594
  isFixedLeft
23475
23595
  } = table2.store.states;
23596
+ const ns = useNamespace("table");
23476
23597
  const hoverEnabled = computed(() => table2.props.rowHoveredHighlight);
23598
+ const {
23599
+ tableSpans,
23600
+ removeCells
23601
+ } = useMergeCell();
23477
23602
  const tdAttrs = computed(() => isFixedLeft.value ? {
23478
- class: "devui-sticky-cell left",
23603
+ class: `${ns.m("sticky-cell")} left`,
23479
23604
  style: "left:0;"
23480
23605
  } : null);
23481
- const renderCheckbox = (index2) => table2.props.checkable ? createVNode("td", tdAttrs.value, [createVNode(Checkbox, {
23606
+ const renderCheckbox = (index2) => table2.props.checkable ? createVNode("td", mergeProps({
23607
+ "class": ns.e("checkable-cell")
23608
+ }, tdAttrs.value), [createVNode(Checkbox, {
23482
23609
  "modelValue": checkList.value[index2],
23483
23610
  "onUpdate:modelValue": ($event) => checkList.value[index2] = $event
23484
23611
  }, null)]) : null;
23485
23612
  return () => createVNode("tbody", {
23486
- "class": "devui-tbody"
23613
+ "class": ns.e("tbody")
23487
23614
  }, [data.value.map((row2, rowIndex) => {
23488
23615
  return createVNode("tr", {
23489
23616
  "key": rowIndex,
23490
23617
  "class": {
23491
23618
  "hover-enabled": hoverEnabled.value
23492
23619
  }
23493
- }, [renderCheckbox(rowIndex), columns.value.map((column, index2) => createVNode(TD, {
23494
- "column": column,
23495
- "index": index2,
23496
- "row": row2
23497
- }, null))]);
23620
+ }, [renderCheckbox(rowIndex), columns.value.map((column, columnIndex) => {
23621
+ var _a;
23622
+ const cellId = `${rowIndex}-${columnIndex}`;
23623
+ const [rowspan, colspan] = (_a = tableSpans.value[cellId]) != null ? _a : [1, 1];
23624
+ if (removeCells.value.includes(cellId)) {
23625
+ return null;
23626
+ }
23627
+ return createVNode(TD, {
23628
+ "column": column,
23629
+ "index": columnIndex,
23630
+ "row": row2,
23631
+ "rowspan": rowspan,
23632
+ "colspan": colspan
23633
+ }, null);
23634
+ })]);
23498
23635
  })]);
23499
23636
  }
23500
23637
  });
23501
- const TD = defineComponent({
23502
- props: {
23503
- column: {
23504
- type: Object
23505
- },
23506
- row: {
23507
- type: Object
23508
- },
23509
- index: {
23510
- type: Number
23511
- }
23512
- },
23513
- setup(props) {
23514
- const column = toRef(props, "column");
23515
- const {
23516
- stickyCell,
23517
- offsetStyle
23518
- } = useFixedColumn(column);
23519
- return () => createVNode("td", {
23520
- "class": stickyCell.value,
23521
- "style": offsetStyle.value
23522
- }, [column.value.renderCell(props.row, props.index)]);
23523
- }
23524
- });
23525
23638
  var FixHeader = defineComponent({
23526
23639
  props: {
23527
23640
  classes: {
@@ -23533,9 +23646,10 @@ var FixHeader = defineComponent({
23533
23646
  }
23534
23647
  },
23535
23648
  setup(props) {
23649
+ const ns = useNamespace("table");
23536
23650
  return () => {
23537
23651
  return createVNode("div", {
23538
- "class": "devui-table-view"
23652
+ "class": ns.e("fix-header")
23539
23653
  }, [createVNode("div", {
23540
23654
  "style": "overflow:hidden scroll;"
23541
23655
  }, [createVNode("table", {
@@ -23543,7 +23657,7 @@ var FixHeader = defineComponent({
23543
23657
  "cellpadding": "0",
23544
23658
  "cellspacing": "0"
23545
23659
  }, [createVNode(ColGroup, null, null), createVNode(TableHeader, null, null)])]), createVNode("div", {
23546
- "class": "scroll-view"
23660
+ "class": ns.e("scroll-view")
23547
23661
  }, [createVNode("table", {
23548
23662
  "class": props.classes,
23549
23663
  "cellpadding": "0",
@@ -23579,6 +23693,9 @@ var NormalHeader = defineComponent({
23579
23693
  var table = "";
23580
23694
  var Table = defineComponent({
23581
23695
  name: "DTable",
23696
+ directives: {
23697
+ dLoading: loadingDirective
23698
+ },
23582
23699
  props: TableProps,
23583
23700
  setup(props, ctx2) {
23584
23701
  const table2 = getCurrentInstance();
@@ -23590,23 +23707,27 @@ var Table = defineComponent({
23590
23707
  style: style2
23591
23708
  } = useTable(props);
23592
23709
  const isEmpty2 = computed(() => props.data.length === 0);
23710
+ const ns = useNamespace("table");
23593
23711
  ctx2.expose({
23594
23712
  getCheckedRows() {
23595
23713
  return store.getCheckedRows();
23596
23714
  }
23597
23715
  });
23598
- return () => withDirectives(createVNode("div", {
23599
- "class": "devui-table-wrapper",
23600
- "style": style2.value
23601
- }, [ctx2.slots.default(), props.fixHeader ? createVNode(FixHeader, {
23602
- "classes": classes.value,
23603
- "is-empty": isEmpty2.value
23604
- }, null) : createVNode(NormalHeader, {
23605
- "classes": classes.value,
23606
- "is-empty": isEmpty2.value
23607
- }, null), isEmpty2.value && createVNode("div", {
23608
- "class": "devui-table-empty"
23609
- }, [createTextVNode("No Data")])]), [[resolveDirective("dLoading"), props.showLoading]]);
23716
+ return () => {
23717
+ var _a, _b;
23718
+ return withDirectives(createVNode("div", {
23719
+ "class": ns.b(),
23720
+ "style": style2.value
23721
+ }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a), props.fixHeader ? createVNode(FixHeader, {
23722
+ "classes": classes.value,
23723
+ "is-empty": isEmpty2.value
23724
+ }, null) : createVNode(NormalHeader, {
23725
+ "classes": classes.value,
23726
+ "is-empty": isEmpty2.value
23727
+ }, null), isEmpty2.value && createVNode("div", {
23728
+ "class": ns.e("empty")
23729
+ }, [createTextVNode("No Data")])]), [[resolveDirective("dLoading"), props.showLoading]]);
23730
+ };
23610
23731
  }
23611
23732
  });
23612
23733
  const TableColumnProps = {
@@ -23739,30 +23860,26 @@ var Column = defineComponent({
23739
23860
  const column = createColumn(toRefs(props), ctx2.slots);
23740
23861
  const parent = inject(TABLE_TOKEN);
23741
23862
  onMounted(() => {
23742
- parent.store.insertColumn(column);
23863
+ parent == null ? void 0 : parent.store.insertColumn(column);
23743
23864
  watch(() => column.order, () => {
23744
- parent.store.sortColumn();
23865
+ parent == null ? void 0 : parent.store.sortColumn();
23745
23866
  });
23746
23867
  });
23747
23868
  onBeforeUnmount(() => {
23748
- parent.store.removeColumn(column);
23869
+ parent == null ? void 0 : parent.store.removeColumn(column);
23749
23870
  });
23750
23871
  },
23751
23872
  render() {
23752
23873
  return null;
23753
23874
  }
23754
23875
  });
23755
- Table.install = function(app) {
23756
- app.directive("dLoading", loadingDirective);
23757
- app.component(Table.name, Table);
23758
- app.component(Column.name, Column);
23759
- };
23760
23876
  var TableInstall = {
23761
23877
  title: "Table \u8868\u683C",
23762
23878
  category: "\u6570\u636E\u5C55\u793A",
23763
23879
  status: "10%",
23764
23880
  install(app) {
23765
- app.use(Table);
23881
+ app.component(Table.name, Table);
23882
+ app.component(Column.name, Column);
23766
23883
  }
23767
23884
  };
23768
23885
  const tagProps = {
@@ -23790,17 +23907,17 @@ const tagProps = {
23790
23907
  function useClass(props) {
23791
23908
  return computed(() => {
23792
23909
  const { type: type4, color: color2, deletable } = props;
23793
- return `devui-tag devui-tag-${type4 || (color2 ? "colorful" : "") || "default"} ${deletable ? "devui-tag-deletable" : ""}`;
23910
+ return `devui-tag-item devui-tag-${type4 || (color2 ? "colorful" : "") || "default"}${deletable ? " devui-tag-deletable" : ""}`;
23794
23911
  });
23795
23912
  }
23796
23913
  function useColor(props) {
23797
23914
  return computed(() => {
23798
23915
  const { color: color2, type: type4 } = props;
23799
23916
  const typeMap = {
23800
- primary: "#5e7ce0",
23801
- success: "#50d4ab",
23802
- warning: "#fac20a",
23803
- danger: "#f66f6a"
23917
+ primary: "var(--devui-primary, #5e7ce0)",
23918
+ success: "var(--devui-success, #50d4ab)",
23919
+ warning: "var(--devui-warning, #fac20a)",
23920
+ danger: "var(--devui-danger, #f66f6a)"
23804
23921
  };
23805
23922
  const colorMap = {
23806
23923
  "blue-w98": "#3383ff",
@@ -23841,12 +23958,12 @@ var Tag = defineComponent({
23841
23958
  const tagTitle = titleContent.value || "";
23842
23959
  const isDefaultTag = () => !type4.value && !color2.value;
23843
23960
  const isShow = ref(true);
23844
- const handleClick = () => {
23845
- emit("click");
23961
+ const handleClick = (e) => {
23962
+ emit("click", e);
23846
23963
  };
23847
- const handleDelete = () => {
23964
+ const handleDelete = (e) => {
23848
23965
  isShow.value = false;
23849
- emit("tagDelete");
23966
+ emit("tagDelete", e);
23850
23967
  };
23851
23968
  const closeIconEl = () => {
23852
23969
  return deletable.value ? createVNode("a", {
@@ -23863,7 +23980,6 @@ var Tag = defineComponent({
23863
23980
  }, null)]) : null;
23864
23981
  };
23865
23982
  const unWatch = watch(checked, (newVal) => {
23866
- console.log("checkedChange");
23867
23983
  emit("checkedChange", newVal);
23868
23984
  });
23869
23985
  onUnmounted(() => unWatch());
@@ -23877,22 +23993,19 @@ var Tag = defineComponent({
23877
23993
  "style": {
23878
23994
  display: "block",
23879
23995
  color: checked.value ? "#fff" : themeColor.value,
23880
- backgroundColor: checked.value ? themeColor.value : !color2.value ? "" : "#fff"
23996
+ backgroundColor: checked.value ? themeColor.value : !color2.value ? "" : "var(--devui-base-bg, #ffffff)"
23881
23997
  },
23882
23998
  "title": tagTitle
23883
23999
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots), closeIconEl()])]), [[vShow, isShow.value]]);
23884
24000
  };
23885
24001
  }
23886
24002
  });
23887
- Tag.install = function(app) {
23888
- app.component(Tag.name, Tag);
23889
- };
23890
24003
  var TagInstall = {
23891
24004
  title: "Tag \u6807\u7B7E",
23892
24005
  category: "\u6570\u636E\u5C55\u793A",
23893
- status: "70%",
24006
+ status: "100%",
23894
24007
  install(app) {
23895
- app.use(Tag);
24008
+ app.component(Tag.name, Tag);
23896
24009
  }
23897
24010
  };
23898
24011
  var removeBtnSvg = createVNode("svg", mergeProps({
@@ -26293,7 +26406,7 @@ const deleteNode = (id, data) => {
26293
26406
  };
26294
26407
  function useToggle$1(data) {
26295
26408
  const openedTree = (tree2) => {
26296
- return tree2.reduce((acc, item2) => item2.open ? acc.concat(item2, openedTree(item2.children)) : acc.concat(item2), []);
26409
+ return tree2.reduce((acc, item2) => item2.open ? acc.concat(item2, item2.children ? openedTree(item2.children) : []) : acc.concat(item2), []);
26297
26410
  };
26298
26411
  const openedData = ref(openedTree(data.value));
26299
26412
  watch(() => data.value, (d) => openedData.value = openedTree(d), { deep: true });
@@ -26315,7 +26428,7 @@ function useMergeNode(data) {
26315
26428
  const { [childName]: children, [labelName]: label } = treeItem;
26316
26429
  if (Array.isArray(children) && children.length === 1 && children[0][childName] && children[0][childName].length === 1) {
26317
26430
  return mergeObject(Object.assign({}, children[0], {
26318
- [labelName]: `${label} \\ ${children[0][labelName]}`
26431
+ [labelName]: `${label} / ${children[0][labelName]}`
26319
26432
  }));
26320
26433
  }
26321
26434
  return treeItem;
@@ -26462,7 +26575,7 @@ function useChecked(cbr, ctx2, data) {
26462
26575
  currentSelected = Object.assign(currentSelected, Object.fromEntries(childLevel.map((key) => [key, isSelected ? "select" : "none"])), { [id]: isSelected ? "select" : "none" });
26463
26576
  }
26464
26577
  selected.value = currentSelected;
26465
- const currentSelectedItem = flatData.filter(({ id: id2 }) => currentSelected[id2] && currentSelected[id2] !== "none");
26578
+ const currentSelectedItem = flatData.filter(({ id: itemId }) => currentSelected[itemId] && currentSelected[itemId] !== "none");
26466
26579
  ctx2.emit("nodeSelected", currentSelectedItem);
26467
26580
  };
26468
26581
  return {
@@ -26507,9 +26620,9 @@ const useLazy = () => {
26507
26620
  };
26508
26621
  };
26509
26622
  const reflectIconWithHandle = (data, operator) => {
26510
- const handleAdd = (payload) => operator.handleAdd();
26511
- const handleEdit = (payload) => operator.handleEdit();
26512
- const handleDelete = (payload) => operator.handleDelete();
26623
+ const handleAdd = () => operator.handleAdd();
26624
+ const handleEdit = () => operator.handleEdit();
26625
+ const handleDelete = () => operator.handleDelete();
26513
26626
  return createVNode(Fragment, null, [operator.addable && createVNode("span", {
26514
26627
  "class": "op-icons icon icon-add",
26515
26628
  "onClick": handleAdd
@@ -26521,13 +26634,13 @@ const reflectIconWithHandle = (data, operator) => {
26521
26634
  "onClick": handleDelete
26522
26635
  }, null)]);
26523
26636
  };
26524
- const useOperate = (treeData) => {
26637
+ const useOperate = () => {
26525
26638
  const operateIconReflect = ref([]);
26526
26639
  const editStatusReflect = ref({});
26527
26640
  const handleReflectIdToIcon = (id, operator) => {
26528
26641
  const isNotExistedReflectItem = operateIconReflect.value.every(({
26529
26642
  id: d
26530
- }) => d != id);
26643
+ }) => d !== id);
26531
26644
  if (isNotExistedReflectItem) {
26532
26645
  editStatusReflect.value[id] = false;
26533
26646
  operateIconReflect.value.push({
@@ -26545,7 +26658,7 @@ const useOperate = (treeData) => {
26545
26658
  const ACTIVE_NODE = "devui-tree-node__content--value-wrapper";
26546
26659
  function useDraggable(draggable, dropType, node, renderData, data) {
26547
26660
  const dragState = reactive({
26548
- dropType: null,
26661
+ dropType: void 0,
26549
26662
  draggingNode: null
26550
26663
  });
26551
26664
  const treeIdMapValue = ref({});
@@ -26554,7 +26667,7 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26554
26667
  }, { deep: true, immediate: true });
26555
26668
  const removeDraggingStyle = (target) => {
26556
26669
  var _a;
26557
- (_a = target.querySelector(`.${ACTIVE_NODE}`)) == null ? void 0 : _a.classList.remove(...["prev", "next", "inner"].map((item2) => `devui-drop-${item2}`));
26670
+ (_a = target == null ? void 0 : target.querySelector(`.${ACTIVE_NODE}`)) == null ? void 0 : _a.classList.remove(...["prev", "next", "inner"].map((item2) => `devui-drop-${item2}`));
26558
26671
  };
26559
26672
  const checkIsParent = (childNodeId, parentNodeId) => {
26560
26673
  const realParentId = treeIdMapValue.value[childNodeId].parentId;
@@ -26566,7 +26679,7 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26566
26679
  return false;
26567
26680
  }
26568
26681
  };
26569
- const handlerDropData = (dragNodeId, dropNodeId, dropType2) => {
26682
+ const handlerDropData = (dragNodeId, dropNodeId, currentDropType) => {
26570
26683
  const cloneData = lodash.exports.cloneDeep(data.value);
26571
26684
  let nowDragNode;
26572
26685
  let nowDropNode;
@@ -26590,13 +26703,13 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26590
26703
  });
26591
26704
  };
26592
26705
  findDragAndDropNode(cloneData);
26593
- if (nowDragNode && nowDropNode && dropType2) {
26706
+ if (nowDragNode && nowDropNode && currentDropType) {
26594
26707
  const cloneDrapNode = lodash.exports.cloneDeep(nowDragNode.target[nowDragNode.index]);
26595
- if (dropType2 === "prev") {
26708
+ if (currentDropType === "prev") {
26596
26709
  nowDropNode.target.splice(nowDropNode.index, 0, cloneDrapNode);
26597
- } else if (dropType2 === "next") {
26710
+ } else if (currentDropType === "next") {
26598
26711
  nowDropNode.target.splice(nowDropNode.index + 1, 0, cloneDrapNode);
26599
- } else if (dropType2 === "inner") {
26712
+ } else if (currentDropType === "inner") {
26600
26713
  const children = nowDropNode.target[nowDropNode.index].children;
26601
26714
  if (Array.isArray(children)) {
26602
26715
  children.unshift(cloneDrapNode);
@@ -26612,18 +26725,21 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26612
26725
  return cloneData;
26613
26726
  };
26614
26727
  const onDragstart = (event, treeNode) => {
26728
+ var _a;
26615
26729
  dragState.draggingNode = event.target;
26616
- const data2 = {
26730
+ const treeInfo = {
26617
26731
  type: "tree-node",
26618
26732
  nodeId: treeNode.id
26619
26733
  };
26620
- event.dataTransfer.setData("Text", JSON.stringify(data2));
26734
+ (_a = event.dataTransfer) == null ? void 0 : _a.setData("Text", JSON.stringify(treeInfo));
26621
26735
  };
26622
26736
  const onDragover = (event) => {
26623
26737
  var _a;
26624
26738
  if (draggable) {
26625
26739
  event.preventDefault();
26626
- event.dataTransfer.dropEffect = "move";
26740
+ if (event.dataTransfer) {
26741
+ event.dataTransfer.dropEffect = "move";
26742
+ }
26627
26743
  if (!node) {
26628
26744
  return;
26629
26745
  }
@@ -26656,12 +26772,13 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26656
26772
  removeDraggingStyle(event.currentTarget);
26657
26773
  };
26658
26774
  const onDrop2 = (event, dropNode) => {
26775
+ var _a;
26659
26776
  removeDraggingStyle(event.currentTarget);
26660
26777
  if (!draggable) {
26661
26778
  return;
26662
26779
  }
26663
26780
  event.preventDefault();
26664
- const transferDataStr = event.dataTransfer.getData("Text");
26781
+ const transferDataStr = (_a = event.dataTransfer) == null ? void 0 : _a.getData("Text");
26665
26782
  if (transferDataStr) {
26666
26783
  try {
26667
26784
  const transferData = JSON.parse(transferDataStr);
@@ -26690,8 +26807,54 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26690
26807
  dragState
26691
26808
  };
26692
26809
  }
26693
- var IconOpen$1 = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24gc3ZnLWljb24tY2xvc2UiCj4KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjNWU3Y2UwIj48L3JlY3Q+CiAgICA8cmVjdCB4PSI0IiB5PSI3IiB3aWR0aD0iOCIgaGVpZ2h0PSIyIiBmaWxsPSIjNWU3Y2UwIj48L3JlY3Q+CiAgPC9nPgo8L3N2Zz4=";
26694
- var IconClose$1 = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24iCj4KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIyIiBzdHJva2U9IiMyNTJiM2EiPjwvcmVjdD4KICAgIDxwYXRoCiAgICAgIGZpbGw9IiMyNTJiM2EiCiAgICAgIGQ9Ik04Ljc1LDQgTDguNzUsNy4yNSBMMTIsNy4yNSBMMTIsOC43NSBMOC43NDksOC43NSBMOC43NSwxMiBMNy4yNSwxMiBMNy4yNDksOC43NSBMNCw4Ljc1IEw0LDcuMjUgTDcuMjUsNy4yNSBMNy4yNSw0IEw4Ljc1LDQgWiIKICAgID48L3BhdGg+CiAgPC9nPgo8L3N2Zz4K";
26810
+ const IconOpen$1 = () => createVNode("svg", {
26811
+ "width": "16px",
26812
+ "height": "16px",
26813
+ "viewBox": "0 0 16 16",
26814
+ "version": "1.1",
26815
+ "xmlns": "http://www.w3.org/2000/svg",
26816
+ "class": "svg-icon svg-icon-close"
26817
+ }, [createVNode("g", {
26818
+ "stroke-width": "1",
26819
+ "fill": "none",
26820
+ "fill-rule": "evenodd"
26821
+ }, [createVNode("rect", {
26822
+ "x": "0.5",
26823
+ "y": "0.5",
26824
+ "width": "15",
26825
+ "height": "15",
26826
+ "rx": "2",
26827
+ "stroke": "#5e7ce0"
26828
+ }, null), createVNode("rect", {
26829
+ "x": "4",
26830
+ "y": "7",
26831
+ "width": "8",
26832
+ "height": "2",
26833
+ "fill": "#5e7ce0"
26834
+ }, null)])]);
26835
+ const IconClose$1 = () => createVNode("svg", {
26836
+ "width": "16px",
26837
+ "height": "16px",
26838
+ "viewBox": "0 0 16 16",
26839
+ "version": "1.1",
26840
+ "xmlns": "http://www.w3.org/2000/svg",
26841
+ "class": "svg-icon"
26842
+ }, [createVNode("g", {
26843
+ "stroke": "none",
26844
+ "stroke-width": "1",
26845
+ "fill": "none",
26846
+ "fill-rule": "evenodd"
26847
+ }, [createVNode("rect", {
26848
+ "x": "0.5",
26849
+ "y": "0.5",
26850
+ "width": "15",
26851
+ "height": "15",
26852
+ "rx": "2",
26853
+ "stroke": "#252b3a"
26854
+ }, null), createVNode("path", {
26855
+ "fill": "#252b3a",
26856
+ "d": "M8.75,4 L8.75,7.25 L12,7.25 L12,8.75 L8.749,8.75 L8.75,12 L7.25,12 L7.249,8.75 L4,8.75 L4,7.25 L7.25,7.25 L7.25,4 L8.75,4 Z"
26857
+ }, null)])]);
26695
26858
  var NodeContent = defineComponent({
26696
26859
  name: "DTreeNodeContent",
26697
26860
  props: {
@@ -26853,21 +27016,21 @@ var Tree = defineComponent({
26853
27016
  }, 4e3);
26854
27017
  });
26855
27018
  },
26856
- renderLoading: (id2) => {
27019
+ renderLoading: (elementId) => {
26857
27020
  return loading.open({
26858
- target: document.getElementById(id2),
27021
+ target: document.getElementById(elementId),
26859
27022
  message: "\u52A0\u8F7D\u4E2D...",
26860
27023
  positionType: "relative",
26861
27024
  zIndex: 1
26862
27025
  });
26863
27026
  }
26864
27027
  });
26865
- const renderFoldIcon = (item3) => {
27028
+ const renderFoldIcon = (treeItem) => {
26866
27029
  const handleClick = async (target) => {
26867
- if (item3.isParent) {
26868
- item3.children = await getLazyData(id);
27030
+ if (treeItem.isParent) {
27031
+ treeItem.children = await getLazyData(id);
26869
27032
  }
26870
- return toggle(target, item3);
27033
+ return toggle(target, treeItem);
26871
27034
  };
26872
27035
  return createVNode("div", {
26873
27036
  "class": "devui-tree-node__folder",
@@ -26917,15 +27080,12 @@ var Tree = defineComponent({
26917
27080
  };
26918
27081
  }
26919
27082
  });
26920
- Tree.install = function(app) {
26921
- app.component(Tree.name, Tree);
26922
- };
26923
27083
  var TreeInstall = {
26924
27084
  title: "Tree \u6811",
26925
27085
  category: "\u6570\u636E\u5C55\u793A",
26926
27086
  status: "20%",
26927
27087
  install(app) {
26928
- app.use(Tree);
27088
+ app.component(Tree.name, Tree);
26929
27089
  }
26930
27090
  };
26931
27091
  var treeSelect = "";
@@ -27123,8 +27283,8 @@ function useClear(props, ctx2, data) {
27123
27283
  handleClearItem
27124
27284
  };
27125
27285
  }
27126
- var IconOpen = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24gc3ZnLWljb24tY2xvc2UiCj4KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjNWU3Y2UwIj48L3JlY3Q+CiAgICA8cmVjdCB4PSI0IiB5PSI3IiB3aWR0aD0iOCIgaGVpZ2h0PSIyIiBmaWxsPSIjNWU3Y2UwIj48L3JlY3Q+CiAgPC9nPgo8L3N2Zz4=";
27127
- var IconClose = "data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNnB4IgogIGhlaWdodD0iMTZweCIKICB2aWV3Qm94PSIwIDAgMTYgMTYiCiAgdmVyc2lvbj0iMS4xIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICBjbGFzcz0ic3ZnLWljb24iCj4KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIyIiBzdHJva2U9IiMyNTJiM2EiPjwvcmVjdD4KICAgIDxwYXRoCiAgICAgIGZpbGw9IiMyNTJiM2EiCiAgICAgIGQ9Ik04Ljc1LDQgTDguNzUsNy4yNSBMMTIsNy4yNSBMMTIsOC43NSBMOC43NDksOC43NSBMOC43NSwxMiBMNy4yNSwxMiBMNy4yNDksOC43NSBMNCw4Ljc1IEw0LDcuMjUgTDcuMjUsNy4yNSBMNy4yNSw0IEw4Ljc1LDQgWiIKICAgID48L3BhdGg+CiAgPC9nPgo8L3N2Zz4K";
27286
+ var IconOpen = "data:image/svg+xml;base64,PHN2Zw0KICB3aWR0aD0iMTZweCINCiAgaGVpZ2h0PSIxNnB4Ig0KICB2aWV3Qm94PSIwIDAgMTYgMTYiDQogIHZlcnNpb249IjEuMSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayINCiAgY2xhc3M9InN2Zy1pY29uIHN2Zy1pY29uLWNsb3NlIg0KPg0KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgcng9IjIiIHN0cm9rZT0iIzVlN2NlMCI+PC9yZWN0Pg0KICAgIDxyZWN0IHg9IjQiIHk9IjciIHdpZHRoPSI4IiBoZWlnaHQ9IjIiIGZpbGw9IiM1ZTdjZTAiPjwvcmVjdD4NCiAgPC9nPg0KPC9zdmc+";
27287
+ var IconClose = "data:image/svg+xml;base64,PHN2Zw0KICB3aWR0aD0iMTZweCINCiAgaGVpZ2h0PSIxNnB4Ig0KICB2aWV3Qm94PSIwIDAgMTYgMTYiDQogIHZlcnNpb249IjEuMSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayINCiAgY2xhc3M9InN2Zy1pY29uIg0KPg0KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4NCiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjMjUyYjNhIj48L3JlY3Q+DQogICAgPHBhdGgNCiAgICAgIGZpbGw9IiMyNTJiM2EiDQogICAgICBkPSJNOC43NSw0IEw4Ljc1LDcuMjUgTDEyLDcuMjUgTDEyLDguNzUgTDguNzQ5LDguNzUgTDguNzUsMTIgTDcuMjUsMTIgTDcuMjQ5LDguNzUgTDQsOC43NSBMNCw3LjI1IEw3LjI1LDcuMjUgTDcuMjUsNCBMOC43NSw0IFoiDQogICAgPjwvcGF0aD4NCiAgPC9nPg0KPC9zdmc+DQo=";
27128
27288
  var TreeSelect = defineComponent({
27129
27289
  name: "DTreeSelect",
27130
27290
  directives: {