vue-devui 1.0.0-rc.0 → 1.0.0-rc.1

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 (115) hide show
  1. package/README.md +13 -0
  2. package/accordion/index.es.js +6 -3
  3. package/alert/index.es.js +28 -30
  4. package/alert/index.umd.js +1 -1
  5. package/auto-complete/index.es.js +13 -6
  6. package/auto-complete/index.umd.js +1 -1
  7. package/back-top/index.es.js +4 -2
  8. package/badge/index.es.js +1 -1
  9. package/badge/index.umd.js +1 -1
  10. package/badge/style.css +1 -1
  11. package/breadcrumb/index.es.js +2 -1
  12. package/button/index.es.js +39 -40
  13. package/button/index.umd.js +1 -1
  14. package/carousel/index.es.js +38 -53
  15. package/carousel/index.umd.js +1 -1
  16. package/cascader/index.es.js +16 -8
  17. package/cascader/style.css +1 -1
  18. package/color-picker/index.es.js +94 -85
  19. package/color-picker/index.umd.js +7 -7
  20. package/countdown/index.es.js +2 -1
  21. package/date-picker/index.es.js +40 -57
  22. package/date-picker/index.umd.js +1 -1
  23. package/dropdown/index.es.js +117 -62
  24. package/dropdown/index.umd.js +1 -1
  25. package/dropdown/style.css +1 -1
  26. package/editable-select/index.es.js +6 -3
  27. package/form/index.es.js +87 -76
  28. package/form/index.umd.js +11 -11
  29. package/form/style.css +1 -1
  30. package/fullscreen/index.es.js +13 -16
  31. package/fullscreen/index.umd.js +1 -1
  32. package/icon/index.es.js +39 -57
  33. package/icon/index.umd.js +1 -1
  34. package/image-preview/index.es.js +2 -1
  35. package/input-icon/index.es.js +38 -37
  36. package/input-icon/index.umd.js +1 -1
  37. package/input-number/index.es.js +46 -57
  38. package/input-number/index.umd.js +1 -1
  39. package/input-number/style.css +1 -1
  40. package/modal/index.es.js +81 -76
  41. package/modal/index.umd.js +1 -1
  42. package/modal/style.css +1 -1
  43. package/notification/index.es.js +38 -40
  44. package/notification/index.umd.js +1 -1
  45. package/nuxt/components/PanelBody.js +3 -0
  46. package/nuxt/components/PanelFooter.js +3 -0
  47. package/nuxt/components/PanelHeader.js +3 -0
  48. package/nuxt/components/Timeline.js +3 -0
  49. package/nuxt/components/TimelineItem.js +3 -0
  50. package/nuxt/components/alertProps.js +3 -0
  51. package/nuxt/components/fullscreenProps.js +3 -0
  52. package/nuxt/components/iconProps.js +2 -0
  53. package/nuxt/components/paginationProps.js +3 -0
  54. package/nuxt/components/panelProps.js +3 -0
  55. package/nuxt/components/searchProps.js +3 -0
  56. package/overlay/index.es.js +44 -37
  57. package/overlay/index.umd.js +1 -1
  58. package/overlay/style.css +1 -1
  59. package/package.json +8 -43
  60. package/pagination/index.es.js +10 -12
  61. package/pagination/index.umd.js +1 -1
  62. package/panel/index.es.js +45 -32
  63. package/panel/index.umd.js +1 -1
  64. package/popover/index.es.js +44 -37
  65. package/popover/index.umd.js +6 -6
  66. package/popover/style.css +1 -1
  67. package/radio/index.es.js +3 -9
  68. package/radio/index.umd.js +1 -1
  69. package/read-tip/index.es.js +6 -3
  70. package/result/index.es.js +38 -53
  71. package/result/index.umd.js +1 -1
  72. package/ripple/index.es.js +9 -5
  73. package/search/index.es.js +2 -5
  74. package/search/index.umd.js +4 -4
  75. package/select/index.es.js +42 -42
  76. package/select/index.umd.js +1 -1
  77. package/skeleton/index.es.js +17 -17
  78. package/skeleton/index.umd.js +1 -1
  79. package/slider/index.es.js +2 -1
  80. package/splitter/index.es.js +54 -42
  81. package/splitter/index.umd.js +6 -6
  82. package/splitter/style.css +1 -1
  83. package/status/index.es.js +1 -4
  84. package/status/index.umd.js +1 -1
  85. package/status/style.css +1 -1
  86. package/steps-guide/index.es.js +6 -3
  87. package/style.css +1 -1
  88. package/table/index.es.js +117 -62
  89. package/table/index.umd.js +1 -1
  90. package/table/style.css +1 -1
  91. package/tag/index.es.js +2 -1
  92. package/tag-input/index.es.js +4 -2
  93. package/time-picker/index.es.js +43 -42
  94. package/time-picker/index.umd.js +1 -1
  95. package/{time-axis → timeline}/index.d.ts +0 -0
  96. package/{time-axis → timeline}/index.es.js +65 -78
  97. package/timeline/index.umd.js +1 -0
  98. package/{time-axis → timeline}/package.json +1 -1
  99. package/timeline/style.css +1 -0
  100. package/tooltip/index.es.js +44 -37
  101. package/tooltip/index.umd.js +6 -6
  102. package/tooltip/style.css +1 -1
  103. package/transfer/index.es.js +84 -77
  104. package/transfer/index.umd.js +7 -7
  105. package/transfer/style.css +1 -1
  106. package/tree/index.es.js +10 -5
  107. package/tree-select/index.es.js +8 -4
  108. package/upload/index.es.js +38 -40
  109. package/upload/index.umd.js +1 -1
  110. package/vue-devui.es.js +771 -649
  111. package/vue-devui.umd.js +9 -9
  112. package/nuxt/components/TimeAxis.js +0 -3
  113. package/nuxt/components/TimeAxisItem.js +0 -3
  114. package/time-axis/index.umd.js +0 -1
  115. package/time-axis/style.css +0 -1
package/vue-devui.es.js CHANGED
@@ -33,9 +33,9 @@ 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, onUnmounted, unref, 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, reactive, onBeforeUnmount, Comment as Comment$1, toRef, onUpdated, onBeforeMount, readonly, Teleport, createApp, renderSlot, withModifiers, useSlots, shallowRef } from "vue";
37
37
  import { useRoute } from "vue-router";
38
- import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
38
+ import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
39
39
  import { onClickOutside } from "@vueuse/core";
40
40
  const accordionProps = {
41
41
  data: {
@@ -150,16 +150,18 @@ var DAccordionMenu = defineComponent({
150
150
  accordionCtx.menuToggleFn(itemEvent);
151
151
  };
152
152
  const hasActiveChildren = (item3) => {
153
- if (item3[activeKey.value] === true)
153
+ if (item3[activeKey.value] === true) {
154
154
  return true;
155
+ }
155
156
  if (item3[childrenKey.value]) {
156
157
  return hasChildActive(item3[childrenKey.value]);
157
158
  }
158
159
  };
159
160
  const hasChildActive = (arr) => {
160
161
  let flag = false;
161
- if (!arr.length)
162
+ if (!arr.length) {
162
163
  return false;
164
+ }
163
165
  for (let i = 0; i < arr.length; i++) {
164
166
  if (arr[i][activeKey.value] === true) {
165
167
  flag = true;
@@ -167,8 +169,9 @@ var DAccordionMenu = defineComponent({
167
169
  }
168
170
  if (arr[i][childrenKey.value]) {
169
171
  flag = hasChildActive(arr[i][childrenKey.value]);
170
- if (flag)
172
+ if (flag) {
171
173
  break;
174
+ }
172
175
  }
173
176
  }
174
177
  return flag;
@@ -750,7 +753,7 @@ const AlertCloseIcon = () => createVNode("svg", {
750
753
  "transform": "translate(-3.000000, -3.000000)",
751
754
  "fill-rule": "nonzero"
752
755
  }, [createVNode("path", {
753
- "d": "M11.6426,3.19816936 C11.9239974,2.91574512 12.4131626,2.93784891 12.7352108,3.24751057 C13.0571998,3.5572302 13.0901298,4.03723416 12.8087324,4.31965839 L9.14064666,7.99900183 L12.8087324,11.6803416 C13.0645482,11.9370909 13.0605893,12.3571292 12.8158402,12.6640749 L12.7352108,12.7524894 C12.4131626,13.0621511 11.9239974,13.0842548 11.6426,12.8018306 L8,9.14489021 L4.35740003,12.8018306 C4.10158422,13.05858 3.6740594,13.0636532 3.35648225,12.8298003 L3.26478919,12.7524894 C2.94280021,12.4427698 2.90987023,11.9627658 3.19126762,11.6803416 L6.8583349,7.99900183 L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057 C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z"
756
+ "d": "M11.6426,3.19816936 C11.9239974,2.91574512 12.4131626,2.93784891 12.7352108,3.24751057 C13.0571998,3.5572302 13.0901298,4.03723416 12.8087324,4.31965839 L9.14064666,7.99900183 L12.8087324,11.6803416 C13.0645482,11.9370909 13.0605893,12.3571292 12.8158402,12.6640749 L12.7352108,12.7524894 C12.4131626,13.0621511 11.9239974,13.0842548 11.6426,12.8018306 L8,9.14489021 L4.35740003,12.8018306 C4.10158422,13.05858 3.6740594,13.0636532 3.35648225,12.8298003 L3.26478919,12.7524894 C2.94280021,12.4427698 2.90987023,11.9627658 3.19126762,11.6803416 L6.8583349,7.99900183 L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057 C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z"
754
757
  }, null)])])]);
755
758
  const AlertTypeIcon = (props) => createVNode("svg", {
756
759
  "width": "16px",
@@ -783,12 +786,12 @@ const AlertTypeIcon = (props) => createVNode("svg", {
783
786
  "fill-rule": "evenodd"
784
787
  }, [createVNode("path", {
785
788
  "class": "devui-icon-warning-outer",
786
- "d": "M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z"
789
+ "d": "M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z"
787
790
  }, null), createVNode("path", {
788
791
  "class": "devui-icon-warning-inner",
789
792
  "stroke-width": "0.3",
790
793
  "fill-rule": "nonzero",
791
- "d": "M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105 L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z"
794
+ "d": "M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105 L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z"
792
795
  }, null)]);
793
796
  case "info":
794
797
  return createVNode("g", {
@@ -826,31 +829,32 @@ const AlertTypeIcon = (props) => createVNode("svg", {
826
829
  return null;
827
830
  }
828
831
  })()]);
832
+ const alertProps = {
833
+ type: {
834
+ type: String,
835
+ default: "info"
836
+ },
837
+ cssClass: {
838
+ type: String,
839
+ default: ""
840
+ },
841
+ closeable: {
842
+ type: Boolean,
843
+ default: true
844
+ },
845
+ showIcon: {
846
+ type: Boolean,
847
+ default: true
848
+ },
849
+ dismissTime: {
850
+ type: Number,
851
+ default: 0
852
+ }
853
+ };
829
854
  var alert$1 = "";
830
855
  var Alert = defineComponent({
831
856
  name: "DAlert",
832
- props: {
833
- type: {
834
- type: String,
835
- default: "info"
836
- },
837
- cssClass: {
838
- type: String,
839
- default: ""
840
- },
841
- closeable: {
842
- type: Boolean,
843
- default: true
844
- },
845
- showIcon: {
846
- type: Boolean,
847
- default: true
848
- },
849
- dismissTime: {
850
- type: Number,
851
- default: 0
852
- }
853
- },
857
+ props: alertProps,
854
858
  emits: ["close"],
855
859
  setup(props, ctx2) {
856
860
  const hide = ref(false);
@@ -897,15 +901,12 @@ var Alert = defineComponent({
897
901
  };
898
902
  }
899
903
  });
900
- Alert.install = function(app) {
901
- app.component(Alert.name, Alert);
902
- };
903
904
  var AlertInstall = {
904
905
  title: "Alert \u8B66\u544A",
905
906
  category: "\u53CD\u9988",
906
907
  status: "100%",
907
908
  install(app) {
908
- app.use(Alert);
909
+ app.component(Alert.name, Alert);
909
910
  }
910
911
  };
911
912
  var Anchor = defineComponent({
@@ -1432,8 +1433,9 @@ function useLazyHandle(props, ctx2, handleSearch) {
1432
1433
  const showLoading = ref(false);
1433
1434
  const dropDownRef = ref();
1434
1435
  const loadMore = () => {
1435
- if (!props.enableLazyLoad && showLoading)
1436
+ if (!props.enableLazyLoad && showLoading) {
1436
1437
  return;
1438
+ }
1437
1439
  const dropDownValue = dropDownRef.value;
1438
1440
  const height = dropDownValue.scrollHeight;
1439
1441
  const scrollTop = dropDownValue.clientHeight + dropDownValue.scrollTop;
@@ -1514,7 +1516,7 @@ class View {
1514
1516
  __publicField(this, "left", "50%");
1515
1517
  }
1516
1518
  }
1517
- const componentProps$1 = {
1519
+ const componentProps = {
1518
1520
  message: String,
1519
1521
  backdrop: Boolean,
1520
1522
  view: {
@@ -1542,7 +1544,7 @@ var loading$1 = "";
1542
1544
  var Loading = defineComponent({
1543
1545
  name: "DLoading",
1544
1546
  inheritAttrs: false,
1545
- props: componentProps$1,
1547
+ props: componentProps,
1546
1548
  setup(props) {
1547
1549
  const style2 = {
1548
1550
  top: props.view.top,
@@ -1839,40 +1841,6 @@ const clickoutsideDirective = {
1839
1841
  delete el[ctx];
1840
1842
  }
1841
1843
  };
1842
- const overlayProps = {
1843
- visible: {
1844
- type: Boolean
1845
- },
1846
- backgroundBlock: {
1847
- type: Boolean,
1848
- default: false
1849
- },
1850
- backgroundClass: {
1851
- type: String,
1852
- default: ""
1853
- },
1854
- backgroundStyle: {
1855
- type: [String, Object]
1856
- },
1857
- onBackdropClick: {
1858
- type: Function
1859
- },
1860
- backdropClose: {
1861
- type: Boolean,
1862
- default: true
1863
- },
1864
- hasBackdrop: {
1865
- type: Boolean,
1866
- default: true
1867
- }
1868
- };
1869
- const overlayEmits = ["update:visible", "backdropClick"];
1870
- const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
1871
- overlayStyle: {
1872
- type: [String, Object],
1873
- default: void 0
1874
- }
1875
- });
1876
1844
  const flexibleOverlayProps = {
1877
1845
  modelValue: {
1878
1846
  type: Boolean,
@@ -1956,6 +1924,7 @@ function useOverlay(props, emit) {
1956
1924
  const overlayEl = unref(overlayRef.value);
1957
1925
  const arrowEl = unref(arrowRef.value);
1958
1926
  const middleware = [
1927
+ shift(),
1959
1928
  offset(props.offset),
1960
1929
  autoPlacement({
1961
1930
  alignment: props.align,
@@ -1990,7 +1959,7 @@ function useOverlay(props, emit) {
1990
1959
  originParent !== window && window.removeEventListener("scroll", updatePosition);
1991
1960
  window.removeEventListener("resize", updatePosition);
1992
1961
  });
1993
- return { arrowRef, overlayRef };
1962
+ return { arrowRef, overlayRef, updatePosition };
1994
1963
  }
1995
1964
  var flexibleOverlay = "";
1996
1965
  const FlexibleOverlay = defineComponent({
@@ -2001,12 +1970,17 @@ const FlexibleOverlay = defineComponent({
2001
1970
  setup(props, {
2002
1971
  slots,
2003
1972
  attrs,
2004
- emit
1973
+ emit,
1974
+ expose
2005
1975
  }) {
2006
1976
  const {
2007
1977
  arrowRef,
2008
- overlayRef
1978
+ overlayRef,
1979
+ updatePosition
2009
1980
  } = useOverlay(props, emit);
1981
+ expose({
1982
+ updatePosition
1983
+ });
2010
1984
  return () => {
2011
1985
  var _a;
2012
1986
  return props.modelValue && createVNode("div", mergeProps({
@@ -2494,8 +2468,9 @@ function useTarget(props, backTopRef) {
2494
2468
  const target = props.target;
2495
2469
  const getTargetEl = () => {
2496
2470
  const targetEl = document.querySelector(target);
2497
- if (!targetEl)
2471
+ if (!targetEl) {
2498
2472
  throw new Error(`props ${target} is not existed`);
2473
+ }
2499
2474
  targetEl.parentElement.style.position = "relative";
2500
2475
  backTopRef.value.style.position = "absolute";
2501
2476
  return targetEl;
@@ -2518,8 +2493,9 @@ function useVisibility(props, backTopRef) {
2518
2493
  return isVisible;
2519
2494
  }
2520
2495
  function useEventListener(target, event, cb) {
2521
- if (target)
2496
+ if (target) {
2522
2497
  target.addEventListener(event, cb);
2498
+ }
2523
2499
  }
2524
2500
  function useThrottle(fn, delay) {
2525
2501
  let last = null;
@@ -2572,7 +2548,7 @@ var BackTopInstall = {
2572
2548
  app.use(BackTop);
2573
2549
  }
2574
2550
  };
2575
- const badgeStatusType = ["danger", "warning", "waiting", "success", "info"];
2551
+ const badgeStatusType = ["danger", "warning", "waiting", "success", "info", "common"];
2576
2552
  const badgePositionType = ["top-left", "top-right", "bottom-left", "bottom-right"];
2577
2553
  const badgeProps = {
2578
2554
  count: {
@@ -2702,8 +2678,9 @@ var BreadcrumbItem = defineComponent({
2702
2678
  const instance = getCurrentInstance();
2703
2679
  const router = instance.appContext.config.globalProperties.$router;
2704
2680
  const handleClickLink = () => {
2705
- if (!props.to || !router)
2681
+ if (!props.to || !router) {
2706
2682
  return;
2683
+ }
2707
2684
  props.replace ? router.replace(props.to) : router.push(props.to);
2708
2685
  };
2709
2686
  onMounted(() => {
@@ -2784,61 +2761,59 @@ var BreadcrumbInstall = {
2784
2761
  app.use(Breadcrumb);
2785
2762
  }
2786
2763
  };
2787
- var Icon = defineComponent({
2788
- name: "DIcon",
2789
- props: {
2790
- name: {
2791
- type: String,
2792
- required: true
2793
- },
2794
- size: {
2795
- type: String,
2796
- default: "inherit"
2797
- },
2798
- color: {
2799
- type: String,
2800
- default: "inherit"
2801
- },
2802
- classPrefix: {
2803
- type: String,
2804
- default: "icon"
2805
- }
2764
+ const iconProps = {
2765
+ name: {
2766
+ type: String,
2767
+ default: "",
2768
+ required: true
2806
2769
  },
2807
- setup(props) {
2808
- return __spreadValues({}, props);
2770
+ size: {
2771
+ type: String,
2772
+ default: "inherit"
2809
2773
  },
2810
- render() {
2774
+ color: {
2775
+ type: String,
2776
+ default: "inherit"
2777
+ },
2778
+ classPrefix: {
2779
+ type: String,
2780
+ default: "icon"
2781
+ }
2782
+ };
2783
+ var DIcon = defineComponent({
2784
+ name: "DIcon",
2785
+ props: iconProps,
2786
+ setup(props) {
2811
2787
  const {
2812
2788
  name,
2813
2789
  size,
2814
2790
  color: color2,
2815
2791
  classPrefix
2816
- } = this;
2817
- return /^((https?):)?\/\//.test(name) ? createVNode("img", {
2818
- "src": name,
2819
- "alt": name.split("/")[name.split("/").length - 1],
2820
- "style": {
2821
- width: size,
2822
- verticalAlign: "text-bottom"
2823
- }
2824
- }, null) : createVNode("i", {
2825
- "class": `${classPrefix} ${classPrefix}-${name}`,
2826
- "style": {
2827
- fontSize: size,
2828
- color: color2
2829
- }
2830
- }, null);
2792
+ } = toRefs(props);
2793
+ return () => {
2794
+ return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
2795
+ "src": name.value,
2796
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
2797
+ "style": {
2798
+ width: size.value,
2799
+ verticalAlign: "text-bottom"
2800
+ }
2801
+ }, null) : createVNode("i", {
2802
+ "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
2803
+ "style": {
2804
+ fontSize: size.value,
2805
+ color: color2.value
2806
+ }
2807
+ }, null);
2808
+ };
2831
2809
  }
2832
2810
  });
2833
- Icon.install = function(app) {
2834
- app.component(Icon.name, Icon);
2835
- };
2836
2811
  var IconInstall = {
2837
2812
  title: "Icon \u56FE\u6807",
2838
2813
  category: "\u901A\u7528",
2839
2814
  status: "100%",
2840
2815
  install(app) {
2841
- app.use(Icon);
2816
+ app.component(DIcon.name, DIcon);
2842
2817
  }
2843
2818
  };
2844
2819
  const buttonProps = {
@@ -2925,9 +2900,10 @@ var DButton = defineComponent({
2925
2900
  "class": classes.value,
2926
2901
  "disabled": disabled.value,
2927
2902
  "onClick": onClick
2928
- }, [icon.value && createVNode(Icon, {
2903
+ }, [icon.value && createVNode(DIcon, {
2929
2904
  "name": icon.value,
2930
2905
  "size": "12px",
2906
+ "color": "",
2931
2907
  "class": iconClass.value
2932
2908
  }, null), createVNode("span", {
2933
2909
  "class": "button-content"
@@ -3211,12 +3187,12 @@ var Carousel = defineComponent({
3211
3187
  }, [createVNode("button", {
3212
3188
  "class": "arrow-left",
3213
3189
  "onClick": () => prev()
3214
- }, [createVNode(Icon, {
3190
+ }, [createVNode(DIcon, {
3215
3191
  "name": "arrow-left"
3216
3192
  }, null)]), createVNode("button", {
3217
3193
  "class": "arrow-right",
3218
3194
  "onClick": () => next()
3219
- }, [createVNode(Icon, {
3195
+ }, [createVNode(DIcon, {
3220
3196
  "name": "arrow-right"
3221
3197
  }, null)])]) : null, createVNode("div", {
3222
3198
  "class": "devui-carousel-item-wrapper",
@@ -8847,8 +8823,9 @@ const updateCheckOptionStatus = (tagList) => {
8847
8823
  var _a;
8848
8824
  if (((_a = node == null ? void 0 : node.children) == null ? void 0 : _a.length) > 0) {
8849
8825
  node.children.forEach((item2) => {
8850
- if (item2.disabled)
8826
+ if (item2.disabled) {
8851
8827
  return;
8828
+ }
8852
8829
  if (type4 === "checked") {
8853
8830
  item2[type4] = status2;
8854
8831
  item2["halfChecked"] = false;
@@ -8884,8 +8861,9 @@ const findChildrenCheckedStatusToUpdateParent = (node) => {
8884
8861
  }
8885
8862
  };
8886
8863
  const updateParentNodeStatus = (node, options, ulIndex) => {
8887
- if (ulIndex < 0)
8864
+ if (ulIndex < 0) {
8888
8865
  return;
8866
+ }
8889
8867
  findChildrenCheckedStatusToUpdateParent(node);
8890
8868
  ulIndex -= 1;
8891
8869
  const parentNode = node == null ? void 0 : node.parent;
@@ -8939,8 +8917,9 @@ const DCascaderItem = (props) => {
8939
8917
  } = updateCheckOptionStatus(tagList);
8940
8918
  const disbaled = computed(() => cascaderItem == null ? void 0 : cascaderItem.disabled);
8941
8919
  const updateValues = () => {
8942
- if (stopDefault.value)
8920
+ if (stopDefault.value) {
8943
8921
  return;
8922
+ }
8944
8923
  activeIndexs.splice(ulIndex, activeIndexs.length - ulIndex);
8945
8924
  activeIndexs[ulIndex] = liIndex;
8946
8925
  if (!multiple) {
@@ -8948,8 +8927,9 @@ const DCascaderItem = (props) => {
8948
8927
  }
8949
8928
  };
8950
8929
  const mouseEnter = () => {
8951
- if (disbaled.value || multiple)
8930
+ if (disbaled.value || multiple) {
8952
8931
  return;
8932
+ }
8953
8933
  updateValues();
8954
8934
  };
8955
8935
  const mouseenter = {
@@ -8957,8 +8937,9 @@ const DCascaderItem = (props) => {
8957
8937
  };
8958
8938
  const mouseClick = () => {
8959
8939
  var _a2;
8960
- if (disbaled.value)
8940
+ if (disbaled.value) {
8961
8941
  return;
8942
+ }
8962
8943
  updateValues();
8963
8944
  if (!multiple && (!cascaderItem.children || ((_a2 = cascaderItem == null ? void 0 : cascaderItem.children) == null ? void 0 : _a2.length) === 0)) {
8964
8945
  confirmInputValueFlg.value = !confirmInputValueFlg.value;
@@ -9073,8 +9054,9 @@ const popupHandles = (props) => {
9073
9054
  stopDefault.value = !menuShow.value;
9074
9055
  };
9075
9056
  const openPopup = () => {
9076
- if (disabled.value)
9057
+ if (disabled.value) {
9077
9058
  return;
9059
+ }
9078
9060
  menuShow.value = !menuShow.value;
9079
9061
  updateStopDefaultType();
9080
9062
  };
@@ -9126,8 +9108,9 @@ var Cascader = defineComponent({
9126
9108
  }
9127
9109
  };
9128
9110
  const updateCascaderView = (value, currentOption, index2) => {
9129
- if (index2 === value.length)
9111
+ if (index2 === value.length) {
9130
9112
  return;
9113
+ }
9131
9114
  const i = value[index2];
9132
9115
  const current = currentOption[i];
9133
9116
  const children = current == null ? void 0 : current.children;
@@ -9140,8 +9123,9 @@ var Cascader = defineComponent({
9140
9123
  };
9141
9124
  const updateCascaderValue = (value, currentOption, index2) => {
9142
9125
  if (!multiple.value) {
9143
- if (index2 === value.length)
9126
+ if (index2 === value.length) {
9144
9127
  return;
9128
+ }
9145
9129
  const i = value[index2];
9146
9130
  const current = getCurrentOption(currentOption, i);
9147
9131
  const children = current == null ? void 0 : current.children;
@@ -9879,8 +9863,9 @@ class DOMUtils {
9879
9863
  };
9880
9864
  const downFn = (event) => {
9881
9865
  var _a;
9882
- if (isDragging)
9866
+ if (isDragging) {
9883
9867
  return;
9868
+ }
9884
9869
  document.onselectstart = () => false;
9885
9870
  document.ondragstart = () => false;
9886
9871
  DOMUtils.addEventListener(document, "mousemove", moveFn);
@@ -10001,16 +9986,16 @@ class DOMUtils {
10001
9986
  if (event.clientX > originX && event.clientY > originY) {
10002
9987
  angle = 180 - angle;
10003
9988
  }
10004
- if (event.clientX == originX && event.clientY > originY) {
9989
+ if (event.clientX === originX && event.clientY > originY) {
10005
9990
  angle = 180;
10006
9991
  }
10007
- if (event.clientX > originX && event.clientY == originY) {
9992
+ if (event.clientX > originX && event.clientY === originY) {
10008
9993
  angle = 90;
10009
9994
  }
10010
9995
  if (event.clientX < originX && event.clientY > originY) {
10011
9996
  angle = 180 + angle;
10012
9997
  }
10013
- if (event.clientX < originX && event.clientY == originY) {
9998
+ if (event.clientX < originX && event.clientY === originY) {
10014
9999
  angle = 270;
10015
10000
  }
10016
10001
  if (event.clientX < originX && event.clientY < originY) {
@@ -10057,8 +10042,9 @@ function HSVAtoRGBA(hsva) {
10057
10042
  return { r: rgb[0], g: rgb[1], b: rgb[2], a };
10058
10043
  }
10059
10044
  function RGBAtoHSVA(rgba) {
10060
- if (!rgba)
10045
+ if (!rgba) {
10061
10046
  return { h: 0, s: 1, v: 1, a: 1 };
10047
+ }
10062
10048
  const r = rgba.r / 255;
10063
10049
  const g = rgba.g / 255;
10064
10050
  const b = rgba.b / 255;
@@ -10074,8 +10060,9 @@ function RGBAtoHSVA(rgba) {
10074
10060
  h2 = 60 * (4 + (r - g) / (max - min));
10075
10061
  }
10076
10062
  }
10077
- if (h2 < 0)
10063
+ if (h2 < 0) {
10078
10064
  h2 = h2 + 360;
10065
+ }
10079
10066
  const s = max === 0 ? 0 : (max - min) / max;
10080
10067
  const hsv = [h2, s, max];
10081
10068
  return { h: Math.round(hsv[0]), s: hsv[1], v: hsv[2], a: rgba.a };
@@ -10201,8 +10188,9 @@ function fromHex(hex2) {
10201
10188
  return fromHexa(parseHex(hex2));
10202
10189
  }
10203
10190
  function parseColor(color2, oldColor) {
10204
- if (!color2)
10191
+ if (!color2) {
10205
10192
  return fromRGBA({ r: 0, g: 0, b: 0, a: 1 });
10193
+ }
10206
10194
  if (typeof color2 === "string") {
10207
10195
  if (color2.indexOf("#") !== -1)
10208
10196
  ;
@@ -10234,8 +10222,9 @@ function parseColor(color2, oldColor) {
10234
10222
  }
10235
10223
  return fromHSVA({ h: parts[0], s: parts[1], v: parts[2], a: alpha });
10236
10224
  }
10237
- if (color2 === "transparent")
10225
+ if (color2 === "transparent") {
10238
10226
  return fromHexa("#00000000");
10227
+ }
10239
10228
  const hex2 = parseHex(color2);
10240
10229
  if (oldColor && hex2 === oldColor.hexa) {
10241
10230
  return oldColor;
@@ -10244,24 +10233,28 @@ function parseColor(color2, oldColor) {
10244
10233
  }
10245
10234
  }
10246
10235
  if (typeof color2 === "object") {
10247
- if (color2.hasOwnProperty("alpha"))
10236
+ if (color2.hasOwnProperty("alpha")) {
10248
10237
  return color2;
10238
+ }
10249
10239
  const a = color2.hasOwnProperty("a") ? parseFloat(color2.a) : 1;
10250
10240
  if (has(color2, ["r", "g", "b"])) {
10251
- if (oldColor && color2 === oldColor.rgba)
10241
+ if (oldColor && color2 === oldColor.rgba) {
10252
10242
  return oldColor;
10253
- else
10243
+ } else {
10254
10244
  return fromRGBA(__spreadProps(__spreadValues({}, color2), { a }));
10245
+ }
10255
10246
  } else if (has(color2, ["h", "s", "l"])) {
10256
- if (oldColor && color2 === oldColor.hsla)
10247
+ if (oldColor && color2 === oldColor.hsla) {
10257
10248
  return oldColor;
10258
- else
10249
+ } else {
10259
10250
  return fromHSLA(__spreadProps(__spreadValues({}, color2), { a }));
10251
+ }
10260
10252
  } else if (has(color2, ["h", "s", "v"])) {
10261
- if (oldColor && color2 === oldColor.hsva)
10253
+ if (oldColor && color2 === oldColor.hsva) {
10262
10254
  return oldColor;
10263
- else
10255
+ } else {
10264
10256
  return fromHSVA(__spreadProps(__spreadValues({}, color2), { a }));
10257
+ }
10265
10258
  }
10266
10259
  }
10267
10260
  return fromRGBA({ r: 255, g: 0, b: 0, a: 1 });
@@ -10282,8 +10275,9 @@ function extractColor(color2, input2, mode, showAlpha) {
10282
10275
  const blue = keepDecimal(color2.rgba.b);
10283
10276
  const hsvSaturation = keepDecimal(color2.hsva.s, 2);
10284
10277
  const value = keepDecimal(color2.hsva.v, 2);
10285
- if (input2 == null)
10278
+ if (input2 == null) {
10286
10279
  return color2;
10280
+ }
10287
10281
  function isShowAlpha(mode2) {
10288
10282
  return showAlpha ? mode2 + "a" : mode2;
10289
10283
  }
@@ -10301,12 +10295,13 @@ function extractColor(color2, input2, mode, showAlpha) {
10301
10295
  }
10302
10296
  if (typeof input2 === "object") {
10303
10297
  const shouldStrip = typeof input2.a === "number" && input2.a === 0 ? !!input2.a : !input2.a;
10304
- if (has(input2, ["r", "g", "b"]))
10298
+ if (has(input2, ["r", "g", "b"])) {
10305
10299
  return stripAlpha(color2.rgba, shouldStrip);
10306
- else if (has(input2, ["h", "s", "l"]))
10300
+ } else if (has(input2, ["h", "s", "l"])) {
10307
10301
  return stripAlpha(color2.hsla, shouldStrip);
10308
- else if (has(input2, ["h", "s", "v"]))
10302
+ } else if (has(input2, ["h", "s", "v"])) {
10309
10303
  return stripAlpha(color2.hsva, shouldStrip);
10304
+ }
10310
10305
  }
10311
10306
  }
10312
10307
  const colorPickerPaletteProps = {
@@ -10365,20 +10360,6 @@ var colorPalette = defineComponent({
10365
10360
  canvas.fillStyle = valueGradient;
10366
10361
  canvas.fillRect(0, 0, parentWidth, props.height);
10367
10362
  }
10368
- function clickPalette(event) {
10369
- const target = event.target;
10370
- if (target !== paletteElement.value) {
10371
- handleDrag(event);
10372
- }
10373
- }
10374
- function updatePosition() {
10375
- var _a, _b;
10376
- if (paletteInstance) {
10377
- const parentWidth = paletteElement.value.offsetWidth;
10378
- cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
10379
- cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
10380
- }
10381
- }
10382
10363
  function handleDrag(event) {
10383
10364
  const parentWidth = paletteElement.value.offsetWidth;
10384
10365
  if (paletteInstance) {
@@ -10406,6 +10387,20 @@ var colorPalette = defineComponent({
10406
10387
  ctx2.emit("changeTextColor", isChangeTextColor.value);
10407
10388
  }
10408
10389
  }
10390
+ function clickPalette(event) {
10391
+ const target = event.target;
10392
+ if (target !== paletteElement.value) {
10393
+ handleDrag(event);
10394
+ }
10395
+ }
10396
+ function updatePosition() {
10397
+ var _a, _b;
10398
+ if (paletteInstance) {
10399
+ const parentWidth = paletteElement.value.offsetWidth;
10400
+ cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
10401
+ cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
10402
+ }
10403
+ }
10409
10404
  onMounted(() => {
10410
10405
  renderCanvas();
10411
10406
  if (paletteInstance && paletteInstance.vnode.el && handlerElement.value) {
@@ -10491,12 +10486,6 @@ var colorHueSlider = defineComponent({
10491
10486
  top: 0
10492
10487
  }, clickTransfrom.value);
10493
10488
  });
10494
- const onClickSider = (event) => {
10495
- const target = event.target;
10496
- if (target !== barElement.value) {
10497
- onMoveBar(event);
10498
- }
10499
- };
10500
10489
  const onMoveBar = (event) => {
10501
10490
  event.stopPropagation();
10502
10491
  if (barElement.value && cursorElement.value) {
@@ -10514,6 +10503,12 @@ var colorHueSlider = defineComponent({
10514
10503
  }));
10515
10504
  }
10516
10505
  };
10506
+ const onClickSider = (event) => {
10507
+ const target = event.target;
10508
+ if (target !== barElement.value) {
10509
+ onMoveBar(event);
10510
+ }
10511
+ };
10517
10512
  onMounted(() => {
10518
10513
  const dragConfig = {
10519
10514
  drag: (event) => {
@@ -10578,12 +10573,6 @@ var colorAlphaSlider = defineComponent({
10578
10573
  const clickTransfrom = ref(DEFAULT_TRANSITION);
10579
10574
  const barElement = ref(null);
10580
10575
  const cursorElement = ref(null);
10581
- const onClickSider = (event) => {
10582
- const target = event.target;
10583
- if (target !== barElement.value) {
10584
- onMoveBar(event);
10585
- }
10586
- };
10587
10576
  const onMoveBar = (event) => {
10588
10577
  event.stopPropagation();
10589
10578
  if (barElement.value && cursorElement.value) {
@@ -10598,6 +10587,12 @@ var colorAlphaSlider = defineComponent({
10598
10587
  })));
10599
10588
  }
10600
10589
  };
10590
+ const onClickSider = (event) => {
10591
+ const target = event.target;
10592
+ if (target !== barElement.value) {
10593
+ onMoveBar(event);
10594
+ }
10595
+ };
10601
10596
  const getBackgroundStyle = computed(() => {
10602
10597
  return {
10603
10598
  background: `linear-gradient(to right, transparent , ${RGBtoCSS(props.modelValue.rgba)})`
@@ -12030,7 +12025,7 @@ function useStore(v, {
12030
12025
  var colorHistory = defineComponent({
12031
12026
  name: "ColorEdit",
12032
12027
  components: {
12033
- Icon
12028
+ Icon: DIcon
12034
12029
  },
12035
12030
  props: colorPickerHistoryProps,
12036
12031
  emits: ["update:color"],
@@ -12500,8 +12495,9 @@ var Countdown = defineComponent({
12500
12495
  };
12501
12496
  const startTime = () => {
12502
12497
  getTime();
12503
- if (countdown2.value)
12498
+ if (countdown2.value) {
12504
12499
  return;
12500
+ }
12505
12501
  countdown2.value = setInterval(() => {
12506
12502
  const t = getTime();
12507
12503
  if (t === 0) {
@@ -13050,8 +13046,9 @@ const formatValue = (state, props) => {
13050
13046
  }
13051
13047
  };
13052
13048
  const formatPlaceholder = (props) => {
13053
- if (!props)
13049
+ if (!props) {
13054
13050
  return "";
13051
+ }
13055
13052
  const format2 = props.format || `y/MM/dd`;
13056
13053
  const sp = props.rangeSpliter || "-";
13057
13054
  return props.range ? `${format2} ${sp} ${format2}` : format2;
@@ -13615,7 +13612,7 @@ var DatePicker = defineComponent({
13615
13612
  "modelValue": state.value,
13616
13613
  "placeholder": state.placeholder,
13617
13614
  "onFocus": () => state.show = true
13618
- }, null), createVNode(Icon, {
13615
+ }, null), createVNode(DIcon, {
13619
13616
  "size": "small",
13620
13617
  "name": "calendar",
13621
13618
  "class": "datepicker-input-icon"
@@ -14127,6 +14124,18 @@ const dropdownProps = {
14127
14124
  closeOnMouseLeaveMenu: {
14128
14125
  type: Boolean,
14129
14126
  default: false
14127
+ },
14128
+ showAnimation: {
14129
+ type: Boolean,
14130
+ default: true
14131
+ },
14132
+ overlayClass: {
14133
+ type: String,
14134
+ default: ""
14135
+ },
14136
+ destroyOnHide: {
14137
+ type: Boolean,
14138
+ default: true
14130
14139
  }
14131
14140
  };
14132
14141
  function getElement(element) {
@@ -14153,12 +14162,12 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
14153
14162
  isOpen.value = status2;
14154
14163
  emit("toggle", isOpen.value);
14155
14164
  };
14156
- const handleLeave = async (elementType, e) => {
14165
+ const handleLeave = async (elementType, closeAll) => {
14157
14166
  await new Promise((resolve) => setTimeout(resolve, 50));
14158
14167
  if (elementType === "origin" && overlayEnter || elementType === "dropdown" && originEnter) {
14159
14168
  return;
14160
14169
  }
14161
- if (e) {
14170
+ if (closeAll) {
14162
14171
  [...dropdownMap.values()].reverse().forEach((item2) => {
14163
14172
  setTimeout(() => {
14164
14173
  var _a;
@@ -14198,7 +14207,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
14198
14207
  subscriptions.push(subscribeEvent(originEl, "click", () => toggle(!isOpen.value)), subscribeEvent(dropdownEl, "mouseleave", (e) => {
14199
14208
  var _a;
14200
14209
  if (closeOnMouseLeaveMenu.value && !((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget))) {
14201
- handleLeave("dropdown", e);
14210
+ handleLeave("dropdown", true);
14202
14211
  }
14203
14212
  }));
14204
14213
  } else if (triggerVal === "hover") {
@@ -14217,7 +14226,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
14217
14226
  if (e.relatedTarget && ((originEl == null ? void 0 : originEl.contains(e.relatedTarget)) || ((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget)))) {
14218
14227
  return;
14219
14228
  }
14220
- handleLeave("dropdown", e);
14229
+ handleLeave("dropdown", true);
14221
14230
  }));
14222
14231
  }
14223
14232
  onInvalidate(() => subscriptions.forEach((v) => v()));
@@ -14268,7 +14277,28 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
14268
14277
  dropdownMap.delete(id);
14269
14278
  });
14270
14279
  }
14271
- var overlay = "";
14280
+ function useOverlayProps(props, currentPosition, isOpen) {
14281
+ const { showAnimation, overlayClass, destroyOnHide } = toRefs(props);
14282
+ const overlayModelValue = ref(false);
14283
+ const overlayShowValue = ref(false);
14284
+ const styles = computed(() => ({
14285
+ transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
14286
+ }));
14287
+ const classes = computed(() => ({
14288
+ "fade-in-bottom": showAnimation.value && isOpen.value && currentPosition.value === "bottom",
14289
+ "fade-in-top": showAnimation.value && isOpen.value && currentPosition.value === "top",
14290
+ [`${overlayClass.value}`]: true
14291
+ }));
14292
+ const handlePositionChange = (pos) => {
14293
+ currentPosition.value = pos.includes("top") || pos.includes("end") ? "top" : "bottom";
14294
+ };
14295
+ watch(isOpen, (isOpenVal) => {
14296
+ overlayModelValue.value = destroyOnHide.value ? isOpenVal : true;
14297
+ overlayShowValue.value = isOpenVal;
14298
+ });
14299
+ return { overlayModelValue, overlayShowValue, styles, classes, handlePositionChange };
14300
+ }
14301
+ var baseOverlay = "";
14272
14302
  function _isSlot$4(s) {
14273
14303
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
14274
14304
  }
@@ -14288,39 +14318,73 @@ const CommonOverlay = defineComponent({
14288
14318
  };
14289
14319
  }
14290
14320
  });
14291
- function useOverlayLogic(props, ctx2) {
14292
- const backgroundClass = computed(() => {
14293
- return [
14294
- "devui-overlay-background",
14295
- props.backgroundClass,
14296
- !props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
14297
- ];
14298
- });
14299
- const overlayClass = computed(() => {
14300
- return "devui-overlay";
14301
- });
14302
- const handleBackdropClick = (event) => {
14303
- var _a;
14304
- event.preventDefault();
14305
- (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
14306
- if (props.backdropClose) {
14307
- ctx2.emit("update:visible", false);
14308
- }
14309
- };
14310
- const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
14311
- onMounted(() => {
14312
- const body2 = document.body;
14313
- const originOverflow = body2.style.overflow;
14314
- const originPosition = body2.style.position;
14315
- watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
14316
- if (backgroundBlock) {
14317
- const top = body2.getBoundingClientRect().y;
14318
- if (visible) {
14319
- body2.style.overflowY = "scroll";
14320
- body2.style.position = visible ? "fixed" : "";
14321
- body2.style.top = `${top}px`;
14322
- } else {
14323
- body2.style.overflowY = originOverflow;
14321
+ const overlayProps = {
14322
+ visible: {
14323
+ type: Boolean
14324
+ },
14325
+ backgroundBlock: {
14326
+ type: Boolean,
14327
+ default: false
14328
+ },
14329
+ backgroundClass: {
14330
+ type: String,
14331
+ default: ""
14332
+ },
14333
+ backgroundStyle: {
14334
+ type: [String, Object]
14335
+ },
14336
+ onBackdropClick: {
14337
+ type: Function
14338
+ },
14339
+ backdropClose: {
14340
+ type: Boolean,
14341
+ default: true
14342
+ },
14343
+ hasBackdrop: {
14344
+ type: Boolean,
14345
+ default: true
14346
+ }
14347
+ };
14348
+ const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
14349
+ overlayStyle: {
14350
+ type: [String, Object],
14351
+ default: void 0
14352
+ }
14353
+ });
14354
+ const overlayEmits = ["update:visible", "backdropClick"];
14355
+ function useOverlayLogic(props, ctx2) {
14356
+ const backgroundClass = computed(() => {
14357
+ return [
14358
+ "devui-overlay-background",
14359
+ props.backgroundClass,
14360
+ !props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
14361
+ ];
14362
+ });
14363
+ const overlayClass = computed(() => {
14364
+ return "devui-overlay";
14365
+ });
14366
+ const handleBackdropClick = (event) => {
14367
+ var _a;
14368
+ event.preventDefault();
14369
+ (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
14370
+ if (props.backdropClose) {
14371
+ ctx2.emit("update:visible", false);
14372
+ }
14373
+ };
14374
+ const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
14375
+ onMounted(() => {
14376
+ const body2 = document.body;
14377
+ const originOverflow = body2.style.overflow;
14378
+ const originPosition = body2.style.position;
14379
+ watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
14380
+ if (backgroundBlock) {
14381
+ const top = body2.getBoundingClientRect().y;
14382
+ if (visible) {
14383
+ body2.style.overflowY = "scroll";
14384
+ body2.style.position = visible ? "fixed" : "";
14385
+ body2.style.top = `${top}px`;
14386
+ } else {
14387
+ body2.style.overflowY = originOverflow;
14324
14388
  body2.style.position = originPosition;
14325
14389
  body2.style.top = "";
14326
14390
  window.scrollTo(0, -top);
@@ -14338,6 +14402,7 @@ function useOverlayLogic(props, ctx2) {
14338
14402
  handleOverlayBubbleCancel
14339
14403
  };
14340
14404
  }
14405
+ var fixedOverlay = "";
14341
14406
  const FixedOverlay = defineComponent({
14342
14407
  name: "DFixedOverlay",
14343
14408
  props: fixedOverlayProps,
@@ -14390,29 +14455,22 @@ var Dropdown = defineComponent({
14390
14455
  setup(props, {
14391
14456
  slots,
14392
14457
  attrs,
14393
- emit
14458
+ emit,
14459
+ expose
14394
14460
  }) {
14395
14461
  const {
14396
14462
  visible,
14397
14463
  position,
14398
14464
  align,
14399
- offset: offset2
14465
+ offset: offset2,
14466
+ showAnimation
14400
14467
  } = toRefs(props);
14401
14468
  const origin = ref();
14402
14469
  const dropdownRef = ref();
14470
+ const overlayRef = ref();
14403
14471
  const id = `dropdown_${dropdownId++}`;
14404
14472
  const isOpen = ref(false);
14405
14473
  const currentPosition = ref("bottom");
14406
- const handlePositionChange = (pos) => {
14407
- currentPosition.value = pos.includes("top") || pos.includes("end") ? "top" : "bottom";
14408
- };
14409
- const styles = computed(() => ({
14410
- transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
14411
- }));
14412
- const classes = computed(() => ({
14413
- "fade-in-bottom": isOpen.value && currentPosition.value === "bottom",
14414
- "fade-in-top": isOpen.value && currentPosition.value === "top"
14415
- }));
14416
14474
  useDropdownEvent({
14417
14475
  id,
14418
14476
  isOpen,
@@ -14422,6 +14480,16 @@ var Dropdown = defineComponent({
14422
14480
  emit
14423
14481
  });
14424
14482
  useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
14483
+ const {
14484
+ overlayModelValue,
14485
+ overlayShowValue,
14486
+ styles,
14487
+ classes,
14488
+ handlePositionChange
14489
+ } = useOverlayProps(props, currentPosition, isOpen);
14490
+ expose({
14491
+ updatePosition: () => overlayRef.value.updatePosition()
14492
+ });
14425
14493
  return () => {
14426
14494
  var _a;
14427
14495
  return createVNode(Fragment, null, [createVNode("div", {
@@ -14431,11 +14499,12 @@ var Dropdown = defineComponent({
14431
14499
  "to": "body"
14432
14500
  }, {
14433
14501
  default: () => [createVNode(Transition, {
14434
- "name": `devui-dropdown-fade-${currentPosition.value}`
14502
+ "name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
14435
14503
  }, {
14436
- default: () => [createVNode(FlexibleOverlay, {
14437
- "modelValue": isOpen.value,
14438
- "onUpdate:modelValue": ($event) => isOpen.value = $event,
14504
+ default: () => [withDirectives(createVNode(FlexibleOverlay, {
14505
+ "modelValue": overlayModelValue.value,
14506
+ "onUpdate:modelValue": ($event) => overlayModelValue.value = $event,
14507
+ "ref": overlayRef,
14439
14508
  "origin": origin.value,
14440
14509
  "position": position.value,
14441
14510
  "align": align.value,
@@ -14451,7 +14520,7 @@ var Dropdown = defineComponent({
14451
14520
  "class": "devui-dropdown-menu-wrap"
14452
14521
  }, attrs), [(_a2 = slots.menu) == null ? void 0 : _a2.call(slots)])];
14453
14522
  }
14454
- })]
14523
+ }), [[vShow, overlayShowValue.value]])]
14455
14524
  })]
14456
14525
  })]);
14457
14526
  };
@@ -14481,6 +14550,14 @@ const dropdownMenuProps = {
14481
14550
  clickOutside: {
14482
14551
  type: Function,
14483
14552
  default: () => true
14553
+ },
14554
+ showAnimation: {
14555
+ type: Boolean,
14556
+ default: true
14557
+ },
14558
+ overlayClass: {
14559
+ type: String,
14560
+ default: ""
14484
14561
  }
14485
14562
  };
14486
14563
  var DropdownMenu = defineComponent({
@@ -14499,12 +14576,14 @@ var DropdownMenu = defineComponent({
14499
14576
  position,
14500
14577
  align,
14501
14578
  offset: offset2,
14502
- clickOutside
14579
+ clickOutside,
14580
+ showAnimation,
14581
+ overlayClass
14503
14582
  } = toRefs(props);
14504
14583
  const dropdownMenuRef = ref(null);
14505
14584
  onClickOutside(dropdownMenuRef, (value) => {
14506
- var _a;
14507
- if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !origin.value.contains(value.target)) {
14585
+ var _a, _b;
14586
+ if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
14508
14587
  emit("update:modelValue", false);
14509
14588
  }
14510
14589
  });
@@ -14519,7 +14598,7 @@ var DropdownMenu = defineComponent({
14519
14598
  "to": "body"
14520
14599
  }, {
14521
14600
  default: () => [createVNode(Transition, {
14522
- "name": `devui-dropdown-fade-${currentPosition.value}`
14601
+ "name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
14523
14602
  }, {
14524
14603
  default: () => [createVNode(FlexibleOverlay, {
14525
14604
  "modelValue": modelValue.value,
@@ -14529,6 +14608,7 @@ var DropdownMenu = defineComponent({
14529
14608
  "align": align.value,
14530
14609
  "offset": offset2.value,
14531
14610
  "onPositionChange": handlePositionChange,
14611
+ "class": overlayClass.value,
14532
14612
  "style": styles.value
14533
14613
  }, {
14534
14614
  default: () => {
@@ -14629,8 +14709,9 @@ const useInput = (inputValue, ctx2) => {
14629
14709
  };
14630
14710
  const useLazyLoad = (dropdownRef, inputValue, filterOtion, load) => {
14631
14711
  const loadMore = () => {
14632
- if (filterOtion !== false)
14712
+ if (filterOtion !== false) {
14633
14713
  return;
14714
+ }
14634
14715
  if (dropdownRef.value.clientHeight + dropdownRef.value.scrollTop >= dropdownRef.value.scrollHeight) {
14635
14716
  load(inputValue.value);
14636
14717
  }
@@ -14660,8 +14741,9 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
14660
14741
  if (!newIndex) {
14661
14742
  newIndex = hoverIndex.value;
14662
14743
  }
14663
- if (!["ArrowDown", "ArrowUp"].includes(direction))
14744
+ if (!["ArrowDown", "ArrowUp"].includes(direction)) {
14664
14745
  return;
14746
+ }
14665
14747
  if (direction === "ArrowUp") {
14666
14748
  if (newIndex === 0) {
14667
14749
  newIndex = options.value.length - 1;
@@ -14688,8 +14770,9 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
14688
14770
  };
14689
14771
  const handleKeydown = (event) => {
14690
14772
  const keyCode = event.key || event.code;
14691
- if (options.value.length === 0)
14773
+ if (options.value.length === 0) {
14692
14774
  return;
14775
+ }
14693
14776
  if (!visible.value) {
14694
14777
  return toggleMenu();
14695
14778
  }
@@ -14924,8 +15007,9 @@ function isObject(obj) {
14924
15007
  return Object.prototype.toString.call(obj).slice(8, -1) === "Object";
14925
15008
  }
14926
15009
  function hasKey(obj, key) {
14927
- if (!isObject(obj))
15010
+ if (!isObject(obj)) {
14928
15011
  return false;
15012
+ }
14929
15013
  return Object.prototype.hasOwnProperty.call(obj, key);
14930
15014
  }
14931
15015
  function getElOffset(curEl) {
@@ -15310,7 +15394,7 @@ var FormLabel = defineComponent({
15310
15394
  }, {
15311
15395
  reference: () => createVNode("span", {
15312
15396
  "class": "devui-form-label-help"
15313
- }, [createVNode(Icon, {
15397
+ }, [createVNode(DIcon, {
15314
15398
  "name": "helping",
15315
15399
  "color": "#252b3a"
15316
15400
  }, null)])
@@ -15522,7 +15606,7 @@ var FormControl = defineComponent({
15522
15606
  "id": uid
15523
15607
  }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), (feedbackStatus || ((_d = (_c = ctx2.slots).suffixTemplate) == null ? void 0 : _d.call(_c))) && createVNode("span", {
15524
15608
  "class": "devui-feedback-status"
15525
- }, [((_f = (_e = ctx2.slots).suffixTemplate) == null ? void 0 : _f.call(_e)) ? (_h = (_g = ctx2.slots).suffixTemplate) == null ? void 0 : _h.call(_g) : createVNode(Icon, {
15609
+ }, [((_f = (_e = ctx2.slots).suffixTemplate) == null ? void 0 : _f.call(_e)) ? (_h = (_g = ctx2.slots).suffixTemplate) == null ? void 0 : _h.call(_g) : createVNode(DIcon, {
15526
15610
  "name": iconData.value.name,
15527
15611
  "color": iconData.value.color
15528
15612
  }, null)])]), extraInfo && createVNode("div", {
@@ -15677,8 +15761,9 @@ function handleErrorStrategyPass(el) {
15677
15761
  el.setAttribute("class", classList.join(" "));
15678
15762
  }
15679
15763
  function getFormControlUID(el) {
15680
- if (el.tagName.toLocaleLowerCase() === "body")
15764
+ if (el.tagName.toLocaleLowerCase() === "body") {
15681
15765
  return "";
15766
+ }
15682
15767
  if (el.parentElement.id.startsWith("dfc-")) {
15683
15768
  return el.parentElement.id;
15684
15769
  } else {
@@ -15721,8 +15806,9 @@ function validateFn({ validator, modelValue, el, tipEl, isFormTag, messageShowTy
15721
15806
  handleValidatePass(el, tipEl);
15722
15807
  }).catch((err) => {
15723
15808
  const { errors } = err;
15724
- if (!errors || errors.length === 0)
15809
+ if (!errors || errors.length === 0) {
15725
15810
  return;
15811
+ }
15726
15812
  let msg = "";
15727
15813
  if (typeof errors[0].message === "object") {
15728
15814
  msg = errors[0].message.default;
@@ -15914,7 +16000,7 @@ const launchNormalFullscreen = (targetElement, props) => {
15914
16000
  };
15915
16001
  const exitNormalFullscreen = (targetElement) => {
15916
16002
  targetElement.classList.remove("devui-fullscreen");
15917
- targetElement.style.zIndex = null;
16003
+ targetElement.style.zIndex = "";
15918
16004
  };
15919
16005
  const launchImmersiveFullScreen = async (docElement) => {
15920
16006
  let fullscreenLaunch = null;
@@ -15927,7 +16013,7 @@ const launchImmersiveFullScreen = async (docElement) => {
15927
16013
  } else if (docElement.msRequestFullscreen) {
15928
16014
  fullscreenLaunch = Promise.resolve(docElement.msRequestFullscreen());
15929
16015
  }
15930
- return await fullscreenLaunch.then(() => !!document.fullscreenElement);
16016
+ return await (fullscreenLaunch == null ? void 0 : fullscreenLaunch.then(() => !!document.fullscreenElement));
15931
16017
  };
15932
16018
  const exitImmersiveFullScreen = async (doc) => {
15933
16019
  let fullscreenExit = null;
@@ -15940,7 +16026,7 @@ const exitImmersiveFullScreen = async (doc) => {
15940
16026
  } else if (doc.msExitFullscreen) {
15941
16027
  fullscreenExit = Promise.resolve(doc.msExitFullscreen());
15942
16028
  }
15943
- return await fullscreenExit.then(() => !!document.fullscreenElement);
16029
+ return await (fullscreenExit == null ? void 0 : fullscreenExit.then(() => !!document.fullscreenElement));
15944
16030
  };
15945
16031
  const addFullScreenStyle = () => {
15946
16032
  document.getElementsByTagName("html")[0].classList.add("devui-fullscreen-html");
@@ -15951,14 +16037,6 @@ const removeFullScreenStyle = () => {
15951
16037
  function useFullscreen(props, slotElement, ctx2) {
15952
16038
  const { modelValue, mode } = toRefs(props);
15953
16039
  let exitByKeydown = false;
15954
- watch(modelValue, (newVal) => {
15955
- if (mode.value === "normal") {
15956
- handleNormalFullscreen(newVal);
15957
- }
15958
- if (mode.value === "immersive") {
15959
- handleImmersiveFullscreen(newVal);
15960
- }
15961
- });
15962
16040
  const handleNormalFullscreen = (isOpen) => {
15963
16041
  if (isOpen) {
15964
16042
  launchNormalFullscreen(slotElement.value, props);
@@ -15977,6 +16055,14 @@ function useFullscreen(props, slotElement, ctx2) {
15977
16055
  }
15978
16056
  }
15979
16057
  };
16058
+ watch(modelValue, (newVal) => {
16059
+ if (mode.value === "normal") {
16060
+ handleNormalFullscreen(newVal);
16061
+ }
16062
+ if (mode.value === "immersive") {
16063
+ handleImmersiveFullscreen(newVal);
16064
+ }
16065
+ });
15980
16066
  const handleFullscreenChange = () => {
15981
16067
  if (!document.fullscreenElement) {
15982
16068
  ctx2.emit("update:modelValue");
@@ -16009,15 +16095,12 @@ var Fullscreen = defineComponent({
16009
16095
  };
16010
16096
  }
16011
16097
  });
16012
- Fullscreen.install = function(app) {
16013
- app.component(Fullscreen.name, Fullscreen);
16014
- };
16015
16098
  var FullscreenInstall = {
16016
16099
  title: "Fullscreen \u5168\u5C4F",
16017
16100
  category: "\u901A\u7528",
16018
16101
  status: "100%",
16019
16102
  install(app) {
16020
- app.use(Fullscreen);
16103
+ app.component(Fullscreen.name, Fullscreen);
16021
16104
  }
16022
16105
  };
16023
16106
  var ganttScale = "";
@@ -16975,8 +17058,9 @@ var imagePreview = defineComponent({
16975
17058
  transform.setZoomOriginal();
16976
17059
  }
16977
17060
  function onKeyDown(event) {
16978
- if (event.defaultPrevented)
17061
+ if (event.defaultPrevented) {
16979
17062
  return;
17063
+ }
16980
17064
  if (event.code == "Escape") {
16981
17065
  onClose();
16982
17066
  } else if (event.code == "ArrowLeft") {
@@ -17339,7 +17423,7 @@ var InputIcon = defineComponent({
17339
17423
  "style": {
17340
17424
  backgroundColor: iconBgColor
17341
17425
  }
17342
- }, [createVNode(Icon, {
17426
+ }, [createVNode(DIcon, {
17343
17427
  "size": "small",
17344
17428
  "name": name,
17345
17429
  "color": iconColor
@@ -17423,20 +17507,24 @@ var InputNumber = defineComponent({
17423
17507
  return props.disabled;
17424
17508
  });
17425
17509
  const add = () => {
17426
- if (props.disabled)
17510
+ if (props.disabled) {
17427
17511
  return;
17428
- if (inputVal.value >= props.max)
17512
+ }
17513
+ if (inputVal.value >= props.max) {
17429
17514
  return;
17515
+ }
17430
17516
  inputVal.value += props.step != 0 ? props.step : 1;
17431
17517
  focusVal.value = "active";
17432
17518
  ctx2.emit("change", inputVal.value);
17433
17519
  ctx2.emit("update:modelValue", inputVal.value);
17434
17520
  };
17435
17521
  const subtract = () => {
17436
- if (props.disabled)
17522
+ if (props.disabled) {
17437
17523
  return;
17438
- if (inputVal.value <= props.min)
17524
+ }
17525
+ if (inputVal.value <= props.min) {
17439
17526
  return;
17527
+ }
17440
17528
  inputVal.value -= props.step != 0 ? props.step : 1;
17441
17529
  focusVal.value = "active";
17442
17530
  ctx2.emit("change", inputVal.value);
@@ -17499,12 +17587,12 @@ var InputNumber = defineComponent({
17499
17587
  "class": ["devui-control-buttons", focusVal.value]
17500
17588
  }, [createVNode("span", {
17501
17589
  "onClick": add
17502
- }, [createVNode(Icon, {
17590
+ }, [createVNode(DIcon, {
17503
17591
  "size": "12px",
17504
17592
  "name": "chevron-up"
17505
17593
  }, null)]), createVNode("span", {
17506
17594
  "onClick": subtract
17507
- }, [createVNode(Icon, {
17595
+ }, [createVNode(DIcon, {
17508
17596
  "size": "12px",
17509
17597
  "name": "chevron-down"
17510
17598
  }, null)])]), createVNode("div", {
@@ -17800,7 +17888,7 @@ var Modal = defineComponent({
17800
17888
  var _a;
17801
17889
  return [createVNode("div", mergeProps({
17802
17890
  "class": "devui-modal"
17803
- }, attrs), [createVNode(Icon, {
17891
+ }, attrs), [createVNode(DIcon, {
17804
17892
  "name": "close",
17805
17893
  "class": "btn-close",
17806
17894
  "size": "var(--devui-font-size-md,12px)",
@@ -18000,7 +18088,7 @@ var Close = defineComponent({
18000
18088
  return () => createVNode("div", {
18001
18089
  "class": "devui-notification-icon-close",
18002
18090
  "onClick": (e) => emit("click", e)
18003
- }, [createVNode(Icon, {
18091
+ }, [createVNode(DIcon, {
18004
18092
  "name": "close",
18005
18093
  "size": "14px"
18006
18094
  }, null)]);
@@ -18029,7 +18117,7 @@ var TypeIcon = defineComponent({
18029
18117
  };
18030
18118
  return () => createVNode("span", {
18031
18119
  "class": classes.value
18032
- }, [type4.value !== "normal" && createVNode(Icon, {
18120
+ }, [type4.value !== "normal" && createVNode(DIcon, {
18033
18121
  "name": severityIconMap[type4.value],
18034
18122
  "size": "16px"
18035
18123
  }, null)]);
@@ -18187,7 +18275,7 @@ var NotificationInstall = {
18187
18275
  app.config.globalProperties.$notificationService = NotificationService;
18188
18276
  }
18189
18277
  };
18190
- const componentProps = {
18278
+ const paginationProps = {
18191
18279
  pageSize: {
18192
18280
  type: Number,
18193
18281
  default: 10
@@ -18324,15 +18412,15 @@ var ConfigMenu = defineComponent({
18324
18412
  setup() {
18325
18413
  const paginationConfig = ref(null);
18326
18414
  const isShowConfig = ref(false);
18415
+ const closeConfigMenu = (e) => {
18416
+ isShowConfig.value = isShowConfig.value ? false : !!e;
18417
+ };
18327
18418
  onMounted(() => {
18328
18419
  on(paginationConfig.value, "click", closeConfigMenu);
18329
18420
  });
18330
18421
  onUnmounted(() => {
18331
18422
  off(paginationConfig.value, "click", closeConfigMenu);
18332
18423
  });
18333
- const closeConfigMenu = (e) => {
18334
- isShowConfig.value = isShowConfig.value ? false : !!e;
18335
- };
18336
18424
  return {
18337
18425
  paginationConfig,
18338
18426
  isShowConfig,
@@ -18482,8 +18570,9 @@ var PageNumBtn = defineComponent({
18482
18570
  }) {
18483
18571
  const showPageNum = computed(() => handlePages(props.cursor, props.maxItems, props.totalPages));
18484
18572
  const changeCursor = (pageSize) => {
18485
- if (isNaN(pageSize))
18573
+ if (isNaN(pageSize)) {
18486
18574
  return;
18575
+ }
18487
18576
  const page = pageSize < 1 ? 1 : pageSize > props.totalPages ? props.totalPages : pageSize | 0;
18488
18577
  emit("changeCursorEmit", page);
18489
18578
  };
@@ -18607,11 +18696,12 @@ var Pagination = defineComponent({
18607
18696
  JumpPage,
18608
18697
  PageNumBtn
18609
18698
  },
18610
- props: componentProps,
18699
+ props: paginationProps,
18611
18700
  emits: ["pageIndexChange", "pageSizeChange", "update:pageSize", "update:pageIndex"],
18612
18701
  setup(props, {
18613
18702
  emit
18614
18703
  }) {
18704
+ const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
18615
18705
  const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
18616
18706
  const cursor = computed({
18617
18707
  get() {
@@ -18633,7 +18723,6 @@ var Pagination = defineComponent({
18633
18723
  emit("update:pageSize", val);
18634
18724
  }
18635
18725
  });
18636
- const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
18637
18726
  const changeCursorEmit = (val) => {
18638
18727
  cursor.value = val;
18639
18728
  emit("pageIndexChange", val);
@@ -18750,19 +18839,15 @@ var Pagination = defineComponent({
18750
18839
  ]);
18751
18840
  }
18752
18841
  });
18753
- Pagination.install = (app) => {
18754
- app.component(Pagination.name, Pagination);
18755
- };
18756
18842
  var PaginationInstall = {
18757
18843
  title: "Pagination \u5206\u9875",
18758
18844
  category: "\u5BFC\u822A",
18759
18845
  status: "100%",
18760
18846
  install(app) {
18761
- app.use(Pagination);
18847
+ app.component(Pagination.name, Pagination);
18762
18848
  }
18763
18849
  };
18764
- var panel = "";
18765
- const PanelProps = {
18850
+ const panelProps = {
18766
18851
  type: {
18767
18852
  type: String,
18768
18853
  default: "default"
@@ -18779,10 +18864,6 @@ const PanelProps = {
18779
18864
  type: Function,
18780
18865
  default: null
18781
18866
  },
18782
- toggle: {
18783
- type: Function,
18784
- default: null
18785
- },
18786
18867
  showAnimation: {
18787
18868
  type: Boolean,
18788
18869
  default: true
@@ -18804,9 +18885,11 @@ class Store {
18804
18885
  option[key] = ref(value);
18805
18886
  }
18806
18887
  }
18888
+ var panel = "";
18807
18889
  var Panel = defineComponent({
18808
18890
  name: "DPanel",
18809
- props: PanelProps,
18891
+ props: panelProps,
18892
+ emits: ["toggle"],
18810
18893
  setup(props, ctx2) {
18811
18894
  provide("beforeToggle", props.beforeToggle);
18812
18895
  provide("showAnimation", computed(() => props.showAnimation));
@@ -18814,11 +18897,10 @@ var Panel = defineComponent({
18814
18897
  const isCollapsed = ref(props.isCollapsed);
18815
18898
  const type4 = computed(() => props.type);
18816
18899
  const cssClass = computed(() => props.cssClass);
18900
+ const timeStamp = new Date().getTime().toString() + Math.random();
18817
18901
  const onToggle = () => {
18818
- var _a;
18819
- (_a = props.toggle) == null ? void 0 : _a.call(props, Store.getByKey(`isCollapsed[${timeStamp}]`));
18902
+ ctx2.emit("toggle", Store.getByKey(`isCollapsed[${timeStamp}]`));
18820
18903
  };
18821
- const timeStamp = new Date().getTime().toString();
18822
18904
  Store.setData(`isCollapsed[${timeStamp}]`, isCollapsed.value);
18823
18905
  return () => {
18824
18906
  var _a, _b;
@@ -18831,7 +18913,8 @@ var Panel = defineComponent({
18831
18913
  });
18832
18914
  var PanelHeader = defineComponent({
18833
18915
  name: "DPanelHeader",
18834
- props: PanelProps,
18916
+ props: panelProps,
18917
+ emits: ["toggle"],
18835
18918
  setup(props, ctx2) {
18836
18919
  const beforeToggle = inject("beforeToggle");
18837
18920
  const keys = Object.keys(Store.state());
@@ -18839,16 +18922,35 @@ var PanelHeader = defineComponent({
18839
18922
  const isCollapsed = ref(Store.state()[key]);
18840
18923
  const changeFlag = ref();
18841
18924
  let header2 = null;
18842
- const canToggle = () => {
18843
- let changeResult = Promise.resolve(true);
18925
+ const res = ref(isCollapsed.value);
18926
+ let changeResult = true;
18927
+ const done = () => {
18928
+ res.value = !res.value;
18929
+ if (!changeFlag.value) {
18930
+ if (res.value) {
18931
+ Store.setData(`${key}`, res.value);
18932
+ isCollapsed.value = res.value;
18933
+ ctx2.emit("toggle", res.value);
18934
+ }
18935
+ return;
18936
+ }
18937
+ if (res.value !== void 0) {
18938
+ Store.setData(`${key}`, res.value);
18939
+ isCollapsed.value = res.value;
18940
+ ctx2.emit("toggle", res.value);
18941
+ }
18942
+ };
18943
+ const canToggle = async () => {
18844
18944
  if (beforeToggle) {
18845
- const result2 = beforeToggle(isCollapsed);
18846
- if (typeof result2 !== void 0) {
18847
- if (result2 instanceof Promise) {
18848
- changeResult = result2;
18945
+ const tmpRes = beforeToggle(isCollapsed, done);
18946
+ if (typeof tmpRes !== "undefined") {
18947
+ if (tmpRes instanceof Promise) {
18948
+ changeResult = await tmpRes;
18849
18949
  } else {
18850
- changeResult = Promise.resolve(result2);
18950
+ changeResult = tmpRes;
18851
18951
  }
18952
+ } else {
18953
+ changeResult = true;
18852
18954
  }
18853
18955
  }
18854
18956
  return changeResult;
@@ -18856,20 +18958,19 @@ var PanelHeader = defineComponent({
18856
18958
  canToggle().then((val) => changeFlag.value = val);
18857
18959
  const toggleBody = () => {
18858
18960
  canToggle().then((val) => {
18859
- var _a, _b;
18860
18961
  changeFlag.value = val;
18861
18962
  if (!val) {
18862
18963
  if (!isCollapsed.value) {
18863
18964
  Store.setData(`${key}`, !isCollapsed.value);
18864
18965
  isCollapsed.value = !isCollapsed.value;
18865
- (_a = props.toggle) == null ? void 0 : _a.call(props, isCollapsed.value);
18966
+ ctx2.emit("toggle", isCollapsed.value);
18866
18967
  }
18867
18968
  return;
18868
18969
  }
18869
18970
  if (isCollapsed.value !== void 0) {
18870
18971
  Store.setData(`${key}`, !isCollapsed.value);
18871
18972
  isCollapsed.value = !isCollapsed.value;
18872
- (_b = props.toggle) == null ? void 0 : _b.call(props, isCollapsed.value);
18973
+ ctx2.emit("toggle", isCollapsed.value);
18873
18974
  }
18874
18975
  });
18875
18976
  };
@@ -18880,7 +18981,7 @@ var PanelHeader = defineComponent({
18880
18981
  "class": "devui-panel-heading",
18881
18982
  "onClick": toggleBody,
18882
18983
  "style": {
18883
- "cursor": changeFlag.value ? "pointer" : "auto"
18984
+ cursor: changeFlag.value ? "pointer" : "auto"
18884
18985
  }
18885
18986
  }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]);
18886
18987
  }
@@ -18890,7 +18991,7 @@ var PanelHeader = defineComponent({
18890
18991
  });
18891
18992
  var PanelBody = defineComponent({
18892
18993
  name: "DPanelBody",
18893
- props: PanelProps,
18994
+ props: panelProps,
18894
18995
  setup(props, ctx2) {
18895
18996
  const animationName = inject("showAnimation");
18896
18997
  const hasLeftPadding = inject("hasLeftPadding");
@@ -18901,8 +19002,9 @@ var PanelBody = defineComponent({
18901
19002
  onMounted(() => {
18902
19003
  if (bodyEl.value) {
18903
19004
  const dom = bodyEl.value;
18904
- if (isCollapsed[key])
19005
+ if (isCollapsed[key]) {
18905
19006
  dom.style.height = `${dom.offsetHeight}px`;
19007
+ }
18906
19008
  }
18907
19009
  });
18908
19010
  const enter = (element) => {
@@ -18950,18 +19052,15 @@ var PanelFooter = defineComponent({
18950
19052
  };
18951
19053
  }
18952
19054
  });
18953
- Panel.install = function(app) {
18954
- app.component(Panel.name, Panel);
18955
- app.component(PanelHeader.name, PanelHeader);
18956
- app.component(PanelBody.name, PanelBody);
18957
- app.component(PanelFooter.name, PanelFooter);
18958
- };
18959
19055
  var PanelInstall = {
18960
19056
  title: "Panel \u9762\u677F",
18961
19057
  category: "\u901A\u7528",
18962
19058
  status: "100%",
18963
19059
  install(app) {
18964
- app.use(Panel);
19060
+ app.component(Panel.name, Panel);
19061
+ app.component(PanelHeader.name, PanelHeader);
19062
+ app.component(PanelBody.name, PanelBody);
19063
+ app.component(PanelFooter.name, PanelFooter);
18965
19064
  }
18966
19065
  };
18967
19066
  var PopoverInstall = {
@@ -19490,7 +19589,7 @@ var Radio = defineComponent({
19490
19589
  return props.value === _value;
19491
19590
  });
19492
19591
  const radioName = computed(() => {
19493
- return radioGroupConf ? radioGroupConf.name.value : props.name;
19592
+ return radioGroupConf ? radioGroupConf.name.value : props.name || void 0;
19494
19593
  });
19495
19594
  const judgeCanChange = (_value) => {
19496
19595
  const beforeChange = props.beforeChange || (radioGroupConf ? radioGroupConf.beforeChange : null);
@@ -19626,19 +19725,13 @@ var RadioGroup = defineComponent({
19626
19725
  }, [getContent()]);
19627
19726
  }
19628
19727
  });
19629
- Radio.install = function(app) {
19630
- app.component(Radio.name, Radio);
19631
- };
19632
- RadioGroup.install = function(app) {
19633
- app.component(RadioGroup.name, RadioGroup);
19634
- };
19635
19728
  var RadioInstall = {
19636
19729
  title: "Radio \u5355\u9009\u6846",
19637
19730
  category: "\u6570\u636E\u5F55\u5165",
19638
19731
  status: "100%",
19639
19732
  install(app) {
19640
- app.use(Radio);
19641
- app.use(RadioGroup);
19733
+ app.component(Radio.name, Radio);
19734
+ app.component(RadioGroup.name, RadioGroup);
19642
19735
  }
19643
19736
  };
19644
19737
  const rateProps = {
@@ -19995,12 +20088,14 @@ var ReadTip = defineComponent({
19995
20088
  rule.overlayClassName = rule.overlayClassName || options.overlayClassName;
19996
20089
  rule.position = rule.position || options.position;
19997
20090
  rule.contentTemplate = !!ctx2.slots.contentTemplate;
19998
- if (!("appendToBody" in rule))
20091
+ if (!("appendToBody" in rule)) {
19999
20092
  rule.appendToBody = options.appendToBody;
20093
+ }
20000
20094
  const doms = defaultSlot.value.querySelectorAll(rule.selector);
20001
20095
  [...doms].map((dom, index2) => {
20002
- if (rule.appendToBody === false)
20096
+ if (rule.appendToBody === false) {
20003
20097
  dom.style.position = "relative";
20098
+ }
20004
20099
  let newRule = reactive({
20005
20100
  id: null
20006
20101
  });
@@ -20023,8 +20118,9 @@ var ReadTip = defineComponent({
20023
20118
  rule.status = true;
20024
20119
  }
20025
20120
  const rules2 = (rules3) => {
20026
- if (rules3 === null)
20121
+ if (rules3 === null) {
20027
20122
  return;
20123
+ }
20028
20124
  if (typeof rules3 === "object" && !Array.isArray(rules3)) {
20029
20125
  rules3 = [rules3];
20030
20126
  }
@@ -20129,7 +20225,7 @@ var Result = defineComponent({
20129
20225
  var _a, _b, _c, _d;
20130
20226
  return createVNode("div", {
20131
20227
  "class": "devui-result"
20132
- }, [ctx2.slots.icon ? createVNode("div", null, [(_a = ctx2.slots) == null ? void 0 : _a.icon()]) : createVNode(Icon, {
20228
+ }, [ctx2.slots.icon ? createVNode("div", null, [(_a = ctx2.slots) == null ? void 0 : _a.icon()]) : createVNode(DIcon, {
20133
20229
  "name": IconEnum[props.icon] || "",
20134
20230
  "class": `devui-result__icon-${props.icon}`,
20135
20231
  "size": "64px"
@@ -20242,8 +20338,9 @@ const ripple = (event, el, options) => {
20242
20338
  incrementRippleCount(el);
20243
20339
  let originalPositionValue = "";
20244
20340
  if (computedStyles.position === "static") {
20245
- if (el.style.position)
20341
+ if (el.style.position) {
20246
20342
  originalPositionValue = el.style.position;
20343
+ }
20247
20344
  el.style.position = "relative";
20248
20345
  }
20249
20346
  rippleContainer.appendChild(rippleEl);
@@ -20254,10 +20351,11 @@ const ripple = (event, el, options) => {
20254
20351
  document.removeEventListener("pointerup", releaseripple);
20255
20352
  document.removeEventListener("pointercancel", releaseripple);
20256
20353
  }
20257
- if (shouldDissolveripple)
20354
+ if (shouldDissolveripple) {
20258
20355
  dissolveripple();
20259
- else
20356
+ } else {
20260
20357
  shouldDissolveripple = true;
20358
+ }
20261
20359
  };
20262
20360
  const dissolveripple = () => {
20263
20361
  rippleEl.style.transition = "opacity 150ms linear";
@@ -20298,10 +20396,12 @@ var RippleDirective = {
20298
20396
  optionMap.set(el, (_a = binding.value) != null ? _a : {});
20299
20397
  el.addEventListener("pointerdown", (event) => {
20300
20398
  const options = optionMap.get(el);
20301
- if (binding.value && binding.value.disabled)
20399
+ if (binding.value && binding.value.disabled) {
20302
20400
  return;
20303
- if (options === false)
20401
+ }
20402
+ if (options === false) {
20304
20403
  return;
20404
+ }
20305
20405
  ripple(event, el, __spreadValues(__spreadValues({}, globalOptions), options));
20306
20406
  });
20307
20407
  },
@@ -20491,15 +20591,12 @@ var DSearch = defineComponent({
20491
20591
  };
20492
20592
  }
20493
20593
  });
20494
- DSearch.install = function(app) {
20495
- app.component(DSearch.name, DSearch);
20496
- };
20497
20594
  var SearchInstall = {
20498
20595
  title: "Search \u641C\u7D22\u6846",
20499
20596
  category: "\u901A\u7528",
20500
20597
  status: "100%",
20501
20598
  install(app) {
20502
- app.use(DSearch);
20599
+ app.component(DSearch.name, DSearch);
20503
20600
  }
20504
20601
  };
20505
20602
  const selectProps = {
@@ -20601,8 +20698,9 @@ var Select = defineComponent({
20601
20698
  const dropdownRef = ref(null);
20602
20699
  const isOpen = ref(false);
20603
20700
  function toggleChange(bool) {
20604
- if (props.disabled)
20701
+ if (props.disabled) {
20605
20702
  return;
20703
+ }
20606
20704
  isOpen.value = bool;
20607
20705
  ctx2.emit("toggleChange", bool);
20608
20706
  }
@@ -20659,8 +20757,9 @@ var Select = defineComponent({
20659
20757
  let {
20660
20758
  modelValue
20661
20759
  } = props;
20662
- if (disabledKey && !!item2[disabledKey])
20760
+ if (disabledKey && !!item2[disabledKey]) {
20663
20761
  return;
20762
+ }
20664
20763
  if (multiple) {
20665
20764
  item2._checked = !item2._checked;
20666
20765
  modelValue = mergeOptions.value.filter((item3) => item3._checked).map((item3) => item3.value);
@@ -20750,11 +20849,11 @@ var Select = defineComponent({
20750
20849
  }, null), createVNode("span", {
20751
20850
  "onClick": handleClear,
20752
20851
  "class": "devui-select-clear"
20753
- }, [createVNode(Icon, {
20852
+ }, [createVNode(DIcon, {
20754
20853
  "name": "close"
20755
20854
  }, null)]), createVNode("span", {
20756
20855
  "class": "devui-select-arrow"
20757
- }, [createVNode(Icon, {
20856
+ }, [createVNode(DIcon, {
20758
20857
  "name": "select-arrow"
20759
20858
  }, null)])]), createVNode(Transition, {
20760
20859
  "name": "fade",
@@ -20902,32 +21001,32 @@ var Skeleton = defineComponent({
20902
21001
  })]), [[vShow, isShown]]);
20903
21002
  }
20904
21003
  function renderAvatarStyle(avatarSize, avatarShape) {
20905
- function renderAvatarShape(avatarShape2) {
20906
- return avatarShape2 === "square" ? "" : "border-radius:50%;";
21004
+ function renderAvatarShape() {
21005
+ return avatarShape === "square" ? "" : "border-radius:50%;";
20907
21006
  }
20908
- function renderAvatarSize(avatarSize2) {
20909
- switch (typeof avatarSize2) {
21007
+ function renderAvatarSize() {
21008
+ switch (typeof avatarSize) {
20910
21009
  case "string":
20911
- return `width:${avatarSize2};height:${avatarSize2};`;
21010
+ return `width:${avatarSize};height:${avatarSize};`;
20912
21011
  case "number":
20913
- return `width:${avatarSize2}px;height:${avatarSize2}px;`;
21012
+ return `width:${avatarSize}px;height:${avatarSize}px;`;
20914
21013
  }
20915
21014
  }
20916
- return renderAvatarSize(avatarSize) + renderAvatarShape(avatarShape);
21015
+ return renderAvatarSize() + renderAvatarShape();
20917
21016
  }
20918
21017
  function renderTitle(isVisible, titleWidth, isRound) {
20919
- function renderTitleWidth(titleWidth2) {
20920
- switch (typeof titleWidth2) {
21018
+ function renderTitleWidth() {
21019
+ switch (typeof titleWidth) {
20921
21020
  case "string":
20922
- return `width: ${titleWidth2};`;
21021
+ return `width: ${titleWidth};`;
20923
21022
  case "number":
20924
- return `width: ${titleWidth2}px;`;
21023
+ return `width: ${titleWidth}px;`;
20925
21024
  }
20926
21025
  }
20927
- function renderTitleVisibility(isVisible2) {
20928
- return isVisible2 ? null : "visibility: hidden;";
21026
+ function renderTitleVisibility() {
21027
+ return isVisible ? null : "visibility: hidden;";
20929
21028
  }
20930
- return renderTitleWidth(titleWidth) + renderBorderRadius(isRound) + renderTitleVisibility(isVisible);
21029
+ return renderTitleWidth() + renderBorderRadius(isRound) + renderTitleVisibility();
20931
21030
  }
20932
21031
  function renderDefaultSkeleton() {
20933
21032
  return createVNode(Fragment, null, [withDirectives(createVNode("div", {
@@ -21048,10 +21147,10 @@ var SkeletonItem = defineComponent({
21048
21147
  })]);
21049
21148
  }
21050
21149
  function renderAvatarStyle(avatarShape) {
21051
- function renderAvatarShape(avatarShape2) {
21052
- return avatarShape2 === "square" ? "" : "border-radius:50%;";
21150
+ function renderAvatarShape() {
21151
+ return avatarShape === "square" ? "" : "border-radius:50%;";
21053
21152
  }
21054
- return renderAvatarShape(avatarShape);
21153
+ return renderAvatarShape();
21055
21154
  }
21056
21155
  return () => {
21057
21156
  var _a;
@@ -21152,8 +21251,9 @@ var Slider = defineComponent({
21152
21251
  });
21153
21252
  function handleButtonMousedown(event) {
21154
21253
  popoverShow.value = true;
21155
- if (props.disabled)
21254
+ if (props.disabled) {
21156
21255
  return;
21256
+ }
21157
21257
  event.preventDefault();
21158
21258
  dragStart(event);
21159
21259
  window.addEventListener("mousemove", onDragging);
@@ -21472,8 +21572,9 @@ function unbind(el, event, callback) {
21472
21572
  function onMousedown(e) {
21473
21573
  var _a;
21474
21574
  const $value = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.$value;
21475
- if (!$value)
21575
+ if (!$value) {
21476
21576
  return;
21577
+ }
21477
21578
  bind(document, "mousemove", onMousemove);
21478
21579
  bind(document, "mouseup", onMouseup);
21479
21580
  $value.onPressEvent(normalizeEvent(e));
@@ -21565,8 +21666,9 @@ var DSplitterBar = defineComponent({
21565
21666
  originalEvent
21566
21667
  }) {
21567
21668
  originalEvent.stopPropagation();
21568
- if (!store.isResizable(props.index))
21669
+ if (!store.isResizable(props.index)) {
21569
21670
  return;
21671
+ }
21570
21672
  initState2 = store.dragState(props.index);
21571
21673
  coordinate.originalX = originalEvent.pageX;
21572
21674
  coordinate.originalY = originalEvent.pageY;
@@ -21575,8 +21677,9 @@ var DSplitterBar = defineComponent({
21575
21677
  originalEvent
21576
21678
  }) {
21577
21679
  originalEvent.stopPropagation();
21578
- if (!store.isResizable(props.index))
21680
+ if (!store.isResizable(props.index)) {
21579
21681
  return;
21682
+ }
21580
21683
  coordinate.pageX = originalEvent.pageX;
21581
21684
  coordinate.pageY = originalEvent.pageY;
21582
21685
  let distance;
@@ -21591,8 +21694,9 @@ var DSplitterBar = defineComponent({
21591
21694
  originalEvent
21592
21695
  }) {
21593
21696
  originalEvent.stopPropagation();
21594
- if (!store.isResizable(props.index))
21697
+ if (!store.isResizable(props.index)) {
21595
21698
  return;
21699
+ }
21596
21700
  coordinate.pageX = originalEvent.pageX;
21597
21701
  coordinate.pageY = originalEvent.pageY;
21598
21702
  let distance;
@@ -21836,8 +21940,9 @@ var Splitter = defineComponent({
21836
21940
  provide("splitterStore", store);
21837
21941
  const domRef = ref();
21838
21942
  const refreshSplitterContainerSize = () => {
21839
- if (!domRef.value)
21943
+ if (!domRef.value) {
21840
21944
  return;
21945
+ }
21841
21946
  let containerSize = 0;
21842
21947
  if (props.orientation === "vertical") {
21843
21948
  containerSize = domRef.value.clientHeight;
@@ -22327,15 +22432,12 @@ var Status = defineComponent({
22327
22432
  };
22328
22433
  }
22329
22434
  });
22330
- Status.install = function(app) {
22331
- app.component(Status.name, Status);
22332
- };
22333
22435
  var StatusInstall = {
22334
22436
  title: "Status \u72B6\u6001",
22335
22437
  category: "\u901A\u7528",
22336
22438
  status: "100%",
22337
22439
  install(app) {
22338
- app.use(Status);
22440
+ app.component(Status.name, Status);
22339
22441
  }
22340
22442
  };
22341
22443
  var stepsGuide = "";
@@ -22377,8 +22479,9 @@ function useStepsGuidePosition(props, currentStep) {
22377
22479
  zIndex: props.zIndex
22378
22480
  });
22379
22481
  const updateGuidePosition = () => {
22380
- if (!currentStep.value || !stepsRef.value)
22482
+ if (!currentStep.value || !stepsRef.value) {
22381
22483
  return;
22484
+ }
22382
22485
  const baseTop = window.pageYOffset - document.documentElement.clientTop;
22383
22486
  const baseLeft = window.pageXOffset - document.documentElement.clientLeft;
22384
22487
  const currentStepPosition = currentStep.value.position;
@@ -22461,8 +22564,9 @@ function useStepsGuideCtrl(props, ctx2, updateGuidePosition, stepIndex) {
22461
22564
  console.error(`stepIndex is not within the value range`);
22462
22565
  }
22463
22566
  }
22464
- if (index2 === -1)
22567
+ if (index2 === -1) {
22465
22568
  closeGuide();
22569
+ }
22466
22570
  };
22467
22571
  return {
22468
22572
  stepsCount,
@@ -22488,8 +22592,9 @@ var StepsGuide = defineComponent({
22488
22592
  });
22489
22593
  const currentStep = computed(() => {
22490
22594
  const _step = props.steps[stepIndex.value];
22491
- if (_step)
22595
+ if (_step) {
22492
22596
  _step.position = _step.position || "top";
22597
+ }
22493
22598
  return _step;
22494
22599
  });
22495
22600
  const {
@@ -23708,8 +23813,9 @@ function useColor(props) {
23708
23813
  "pink-w98": "#f3689a",
23709
23814
  "purple-w98": "#a97af8"
23710
23815
  };
23711
- if (!color2 && type4)
23816
+ if (!color2 && type4) {
23712
23817
  return typeMap[type4];
23818
+ }
23713
23819
  const themeColor = colorMap[color2] || color2;
23714
23820
  return themeColor;
23715
23821
  });
@@ -23926,8 +24032,9 @@ var TagInput = defineComponent({
23926
24032
  let res = {
23927
24033
  [props.displayProperty]: tagInputVal.value
23928
24034
  };
23929
- if (tagInputVal.value === "" && mergedSuggestions.value.length === 0)
24035
+ if (tagInputVal.value === "" && mergedSuggestions.value.length === 0) {
23930
24036
  return false;
24037
+ }
23931
24038
  if (props.tags.findIndex((item2) => item2[props.displayProperty] === tagInputVal.value) > -1) {
23932
24039
  tagInputVal.value = "";
23933
24040
  return false;
@@ -23951,8 +24058,9 @@ var TagInput = defineComponent({
23951
24058
  case KEYS_MAP.tab:
23952
24059
  case KEYS_MAP.enter:
23953
24060
  case KEYS_MAP.space:
23954
- if (!props.isAddBySpace && KEYS_MAP.space)
24061
+ if (!props.isAddBySpace && KEYS_MAP.space) {
23955
24062
  return;
24063
+ }
23956
24064
  handleEnter();
23957
24065
  break;
23958
24066
  case KEYS_MAP.down:
@@ -24230,277 +24338,42 @@ var TextareaInstall = {
24230
24338
  app.use(Textarea);
24231
24339
  }
24232
24340
  };
24233
- const timeAxisProps = {
24234
- direction: {
24341
+ const timePickerProps = {
24342
+ modelValue: {
24235
24343
  type: String,
24236
- default: "vertical"
24344
+ default: ""
24237
24345
  },
24238
- center: {
24346
+ placeholder: {
24347
+ type: String,
24348
+ default: "00:00:00"
24349
+ },
24350
+ disabled: {
24239
24351
  type: Boolean,
24240
24352
  default: false
24241
24353
  },
24242
- mode: {
24243
- type: String,
24244
- default: "normal"
24354
+ timePickerWidth: {
24355
+ type: Number,
24356
+ default: 212
24245
24357
  },
24246
- timePosition: {
24358
+ minTime: {
24247
24359
  type: String,
24248
- default: "left"
24249
- }
24250
- };
24251
- const timeAxisItemProps = {
24252
- time: {
24253
- type: String
24254
- },
24255
- dotColor: {
24256
- type: String
24360
+ default: "00:00:00"
24257
24361
  },
24258
- lineStyle: {
24362
+ maxTime: {
24259
24363
  type: String,
24260
- default: "solid"
24261
- },
24262
- lineColor: {
24263
- type: String
24264
- },
24265
- position: {
24266
- type: String
24364
+ default: "23:59:59"
24267
24365
  },
24268
- timePosition: {
24366
+ format: {
24269
24367
  type: String,
24270
- default: "left"
24368
+ default: "hh:mm:ss"
24271
24369
  },
24272
- type: {
24273
- type: String,
24274
- default: "primary"
24275
- }
24276
- };
24277
- var TimeAxisItem = defineComponent({
24278
- name: "DTimeAxisItem",
24279
- components: {
24280
- DIcon: Icon
24281
- },
24282
- props: timeAxisItemProps,
24283
- emits: [],
24284
- setup(props, ctx2) {
24285
- const timeAxis2 = inject("timeAxis");
24286
- const itemClass = "devui-time-axis-item";
24287
- const renderTime = () => {
24288
- var _a, _b;
24289
- return createVNode("div", {
24290
- "class": `${itemClass}-time`
24291
- }, [ctx2.slots.time ? (_b = (_a = ctx2.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
24292
- };
24293
- const renderContent = () => {
24294
- var _a, _b;
24295
- return createVNode("div", {
24296
- "class": `${itemClass}-content`
24297
- }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a, props)]);
24298
- };
24299
- const renderPosition = (types2) => {
24300
- if (types2.includes(props.position)) {
24301
- return renderContent();
24302
- } else {
24303
- if (timeAxis2.props.direction === "horizontal") {
24304
- return renderTime();
24305
- } else {
24306
- return props.timePosition === "left" ? renderTime() : "";
24307
- }
24308
- }
24309
- };
24310
- const setTypeIcon = (type4) => {
24311
- if (type4 === "primary") {
24312
- return "";
24313
- }
24314
- return createVNode("i", {
24315
- "class": `icon-${type4 === "success" ? "right" : type4}-o`
24316
- }, null);
24317
- };
24318
- const renderDot = () => {
24319
- var _a, _b;
24320
- if (ctx2.slots.dot) {
24321
- return createVNode("div", {
24322
- "style": {
24323
- color: props.dotColor
24324
- },
24325
- "class": `${itemClass}-dot`
24326
- }, [createTextVNode(" "), (_b = (_a = ctx2.slots).dot) == null ? void 0 : _b.call(_a)]);
24327
- } else {
24328
- return createVNode("div", {
24329
- "class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
24330
- "style": {
24331
- borderColor: props.dotColor
24332
- }
24333
- }, [setTypeIcon(props.type)]);
24334
- }
24335
- };
24336
- return () => {
24337
- return createVNode("div", {
24338
- "class": itemClass
24339
- }, [createVNode("div", {
24340
- "class": `${itemClass}-data-left ${itemClass}-data-top`
24341
- }, [renderPosition(["top", "left"])]), createVNode("div", {
24342
- "class": `${itemClass}-axis`
24343
- }, [renderDot(), timeAxis2.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
24344
- "class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
24345
- "style": {
24346
- borderColor: props.lineColor
24347
- }
24348
- }, [ctx2.slots.extra ? createVNode("div", {
24349
- "class": `${itemClass}-line-extra`
24350
- }, [ctx2.slots.extra()]) : ""])]), createVNode("div", {
24351
- "class": `${itemClass}-data-right ${itemClass}-data-bottom`
24352
- }, [renderPosition(["right", "bottom"])])]);
24353
- };
24354
- }
24355
- });
24356
- var timeAxis = "";
24357
- var TimeAxis = defineComponent({
24358
- name: "DTimeAxis",
24359
- components: {
24360
- TimeAxisItem
24361
- },
24362
- props: timeAxisProps,
24363
- emits: [],
24364
- setup(props, ctx2) {
24365
- provide("timeAxis", {
24366
- ctx: ctx2,
24367
- props
24368
- });
24369
- const timeAxis2 = ref();
24370
- const style2 = reactive({
24371
- marginLeft: "0px",
24372
- height: "auto"
24373
- });
24374
- const setStyle2 = () => {
24375
- style2.height = "auto";
24376
- style2.marginLeft = "0px";
24377
- if (props.direction === "horizontal") {
24378
- nextTick(() => {
24379
- var _a;
24380
- const el = timeAxis2.value;
24381
- if (props.center) {
24382
- style2.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
24383
- }
24384
- style2.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-axis")).map((el2) => el2.clientHeight)) + "px";
24385
- });
24386
- }
24387
- };
24388
- onMounted(() => {
24389
- setStyle2();
24390
- });
24391
- watch(toRef(props, "direction"), () => {
24392
- setStyle2();
24393
- });
24394
- return () => {
24395
- const renderItemPosition = (item2, position) => {
24396
- return position ? createVNode(item2, {
24397
- "position": position
24398
- }, null) : createVNode(item2, null, null);
24399
- };
24400
- const renderItem = () => {
24401
- var _a, _b, _c;
24402
- const slots = (_c = (_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
24403
- let children;
24404
- if (slots.length === 1 && slots[0].type === Fragment) {
24405
- children = slots[0].children || [];
24406
- } else {
24407
- children = slots;
24408
- }
24409
- return children.map((item2, index2) => {
24410
- var _a2, _b2, _c2, _d, _e, _f, _g, _h;
24411
- if (index2 + 1 === children.length) {
24412
- if (!((_a2 = item2.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item2.props) == null ? void 0 : _b2["line-style"])) {
24413
- item2 = createVNode(item2, {
24414
- "line-style": "none"
24415
- }, null);
24416
- }
24417
- }
24418
- if (!((_c2 = item2.props) == null ? void 0 : _c2.timePosition) && !((_d = item2.props) == null ? void 0 : _d["time-position"])) {
24419
- item2 = createVNode(item2, {
24420
- "time-position": props.timePosition ? props.timePosition : "left"
24421
- }, null);
24422
- }
24423
- if (props.direction === "horizontal") {
24424
- if (((_e = item2.props) == null ? void 0 : _e.position) === "top" || ((_f = item2.props) == null ? void 0 : _f.position) === "bottom")
24425
- return item2;
24426
- if (props.mode === "alternative") {
24427
- return renderItemPosition(item2, index2 % 2 == 0 ? "bottom" : "top");
24428
- } else {
24429
- return renderItemPosition(item2, "bottom");
24430
- }
24431
- } else {
24432
- if (((_g = item2.props) == null ? void 0 : _g.position) === "left" || ((_h = item2.props) == null ? void 0 : _h.position) === "right")
24433
- return item2;
24434
- if (props.mode === "alternative") {
24435
- return renderItemPosition(item2, index2 % 2 == 0 ? "left" : "right");
24436
- } else {
24437
- return renderItemPosition(item2, "right");
24438
- }
24439
- }
24440
- });
24441
- };
24442
- const getDirection = () => {
24443
- return props.direction === "horizontal" ? "horizontal" : "vertical";
24444
- };
24445
- return createVNode("div", {
24446
- "class": `devui-time-axis devui-time-axis-${getDirection()} ${props.center ? "devui-time-axis-" + getDirection() + "-center" : ""} `,
24447
- "ref": timeAxis2,
24448
- "style": style2
24449
- }, [renderItem()]);
24450
- };
24451
- }
24452
- });
24453
- TimeAxis.install = function(app) {
24454
- app.component(TimeAxis.name, TimeAxis);
24455
- };
24456
- TimeAxisItem.install = function(app) {
24457
- app.component(TimeAxisItem.name, TimeAxisItem);
24458
- };
24459
- var TimeAxisInstall = {
24460
- title: "TimeAxis \u65F6\u95F4\u8F74",
24461
- category: "\u6570\u636E\u5C55\u793A",
24462
- status: "100%",
24463
- install(app) {
24464
- app.use(TimeAxis);
24465
- app.use(TimeAxisItem);
24466
- }
24467
- };
24468
- const timePickerProps = {
24469
- modelValue: {
24470
- type: String,
24471
- default: ""
24472
- },
24473
- placeholder: {
24474
- type: String,
24475
- default: "00:00:00"
24476
- },
24477
- disabled: {
24478
- type: Boolean,
24479
- default: false
24480
- },
24481
- timePickerWidth: {
24482
- type: Number,
24483
- default: 212
24484
- },
24485
- minTime: {
24486
- type: String,
24487
- default: "00:00:00"
24488
- },
24489
- maxTime: {
24490
- type: String,
24491
- default: "23:59:59"
24492
- },
24493
- format: {
24494
- type: String,
24495
- default: "hh:mm:ss"
24496
- },
24497
- autoOpen: {
24498
- type: Boolean,
24499
- default: false
24500
- },
24501
- showAnimation: {
24502
- type: Boolean,
24503
- default: true
24370
+ autoOpen: {
24371
+ type: Boolean,
24372
+ default: false
24373
+ },
24374
+ showAnimation: {
24375
+ type: Boolean,
24376
+ default: true
24504
24377
  }
24505
24378
  };
24506
24379
  function getPositionFun(el, left, top) {
@@ -24581,8 +24454,9 @@ function useTimePicker(hh, mm, ss, minTime, maxTime, format2, autoOpen, disabled
24581
24454
  e.stopPropagation();
24582
24455
  isActive.value = false;
24583
24456
  showPopup.value = false;
24584
- if (disabled)
24457
+ if (disabled) {
24585
24458
  return;
24459
+ }
24586
24460
  const path = e.composedPath && e.composedPath() || e.path;
24587
24461
  const inInputDom = path.includes(devuiTimePicker.value);
24588
24462
  inInputDom && mouseInIputFun();
@@ -24933,8 +24807,9 @@ function useTimeScroll() {
24933
24807
  } else {
24934
24808
  scrollTrackDom.value.style.opacity = 0;
24935
24809
  }
24936
- if (!isDown.value)
24810
+ if (!isDown.value) {
24937
24811
  return;
24812
+ }
24938
24813
  clickTrackFun(e);
24939
24814
  };
24940
24815
  const getScrollWidth = () => {
@@ -25320,10 +25195,10 @@ var TimePicker = defineComponent({
25320
25195
  "class": "time-input-icon"
25321
25196
  }, [createVNode("div", {
25322
25197
  "onClick": clearAll
25323
- }, [showClearIcon.value ? createVNode(Icon, {
25198
+ }, [showClearIcon.value ? createVNode(DIcon, {
25324
25199
  "size": "small",
25325
25200
  "name": "close"
25326
- }, null) : ""]), createVNode("div", null, [createVNode(Icon, {
25201
+ }, null) : ""]), createVNode("div", null, [createVNode(DIcon, {
25327
25202
  "size": "small",
25328
25203
  "name": "time"
25329
25204
  }, null)])])])]);
@@ -25341,6 +25216,243 @@ var TimePickerInstall = {
25341
25216
  app.use(TimePicker);
25342
25217
  }
25343
25218
  };
25219
+ const timeAxisProps = {
25220
+ direction: {
25221
+ type: String,
25222
+ default: "vertical"
25223
+ },
25224
+ center: {
25225
+ type: Boolean,
25226
+ default: false
25227
+ },
25228
+ mode: {
25229
+ type: String,
25230
+ default: "normal"
25231
+ },
25232
+ timePosition: {
25233
+ type: String,
25234
+ default: "left"
25235
+ }
25236
+ };
25237
+ const timeAxisItemProps = {
25238
+ time: {
25239
+ type: String
25240
+ },
25241
+ dotColor: {
25242
+ type: String
25243
+ },
25244
+ lineStyle: {
25245
+ type: String,
25246
+ default: "solid"
25247
+ },
25248
+ lineColor: {
25249
+ type: String
25250
+ },
25251
+ position: {
25252
+ type: String
25253
+ },
25254
+ timePosition: {
25255
+ type: String,
25256
+ default: "left"
25257
+ },
25258
+ type: {
25259
+ type: String,
25260
+ default: "primary"
25261
+ }
25262
+ };
25263
+ var TimelineItem = defineComponent({
25264
+ name: "DTimelineItem",
25265
+ components: {
25266
+ DIcon
25267
+ },
25268
+ props: timeAxisItemProps,
25269
+ emits: [],
25270
+ setup(props, ctx2) {
25271
+ const timeAxis = inject("timeAxis");
25272
+ const itemClass = "devui-timeline-item";
25273
+ const renderTime = () => {
25274
+ var _a, _b;
25275
+ return createVNode("div", {
25276
+ "class": `${itemClass}-time`
25277
+ }, [ctx2.slots.time ? (_b = (_a = ctx2.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
25278
+ };
25279
+ const renderContent = () => {
25280
+ var _a, _b;
25281
+ return createVNode("div", {
25282
+ "class": `${itemClass}-content`
25283
+ }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a, props)]);
25284
+ };
25285
+ const renderPosition = (types2) => {
25286
+ if (types2.includes(props.position)) {
25287
+ return renderContent();
25288
+ } else {
25289
+ if (timeAxis.props.direction === "horizontal") {
25290
+ return renderTime();
25291
+ } else {
25292
+ return props.timePosition === "left" ? renderTime() : "";
25293
+ }
25294
+ }
25295
+ };
25296
+ const setTypeIcon = (type4) => {
25297
+ if (type4 === "primary") {
25298
+ return "";
25299
+ }
25300
+ return createVNode("i", {
25301
+ "class": `icon-${type4 === "success" ? "right" : type4}-o`
25302
+ }, null);
25303
+ };
25304
+ const renderDot = () => {
25305
+ var _a, _b;
25306
+ if (ctx2.slots.dot) {
25307
+ return createVNode("div", {
25308
+ "style": {
25309
+ color: props.dotColor
25310
+ },
25311
+ "class": `${itemClass}-dot`
25312
+ }, [createTextVNode(" "), (_b = (_a = ctx2.slots).dot) == null ? void 0 : _b.call(_a)]);
25313
+ } else {
25314
+ return createVNode("div", {
25315
+ "class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
25316
+ "style": {
25317
+ borderColor: props.dotColor
25318
+ }
25319
+ }, [setTypeIcon(props.type)]);
25320
+ }
25321
+ };
25322
+ return () => {
25323
+ return createVNode("div", {
25324
+ "class": itemClass
25325
+ }, [createVNode("div", {
25326
+ "class": `${itemClass}-data-left ${itemClass}-data-top`
25327
+ }, [renderPosition(["top", "left"])]), createVNode("div", {
25328
+ "class": `${itemClass}-axis`
25329
+ }, [renderDot(), timeAxis.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
25330
+ "class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
25331
+ "style": {
25332
+ borderColor: props.lineColor
25333
+ }
25334
+ }, [ctx2.slots.extra ? createVNode("div", {
25335
+ "class": `${itemClass}-line-extra`
25336
+ }, [ctx2.slots.extra()]) : ""])]), createVNode("div", {
25337
+ "class": `${itemClass}-data-right ${itemClass}-data-bottom`
25338
+ }, [renderPosition(["right", "bottom"])])]);
25339
+ };
25340
+ }
25341
+ });
25342
+ var timeline = "";
25343
+ var Timeline = defineComponent({
25344
+ name: "DTimeline",
25345
+ components: {
25346
+ TimelineItem
25347
+ },
25348
+ props: timeAxisProps,
25349
+ emits: [],
25350
+ setup(props, ctx2) {
25351
+ provide("timeAxis", {
25352
+ ctx: ctx2,
25353
+ props
25354
+ });
25355
+ const timeAxis = ref();
25356
+ const style2 = reactive({
25357
+ marginLeft: "0px",
25358
+ height: "auto"
25359
+ });
25360
+ const setStyle2 = () => {
25361
+ style2.height = "auto";
25362
+ style2.marginLeft = "0px";
25363
+ if (props.direction === "horizontal") {
25364
+ nextTick(() => {
25365
+ var _a;
25366
+ const el = timeAxis.value;
25367
+ if (props.center) {
25368
+ style2.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
25369
+ }
25370
+ style2.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-axis")).map((el2) => el2.clientHeight)) + "px";
25371
+ });
25372
+ }
25373
+ };
25374
+ onMounted(() => {
25375
+ setStyle2();
25376
+ });
25377
+ watch(toRef(props, "direction"), () => {
25378
+ setStyle2();
25379
+ });
25380
+ return () => {
25381
+ const renderItemPosition = (item2, position) => {
25382
+ return position ? createVNode(item2, {
25383
+ "position": position
25384
+ }, null) : createVNode(item2, null, null);
25385
+ };
25386
+ const renderItem = () => {
25387
+ var _a, _b, _c;
25388
+ const slots = (_c = (_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
25389
+ let children;
25390
+ if (slots.length === 1 && slots[0].type === Fragment) {
25391
+ children = slots[0].children || [];
25392
+ } else {
25393
+ children = slots;
25394
+ }
25395
+ return children.map((item2, index2) => {
25396
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h;
25397
+ if (index2 + 1 === children.length) {
25398
+ if (!((_a2 = item2.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item2.props) == null ? void 0 : _b2["line-style"])) {
25399
+ item2 = createVNode(item2, {
25400
+ "line-style": "none"
25401
+ }, null);
25402
+ }
25403
+ }
25404
+ if (!((_c2 = item2.props) == null ? void 0 : _c2.timePosition) && !((_d = item2.props) == null ? void 0 : _d["time-position"])) {
25405
+ item2 = createVNode(item2, {
25406
+ "time-position": props.timePosition ? props.timePosition : "left"
25407
+ }, null);
25408
+ }
25409
+ if (props.direction === "horizontal") {
25410
+ if (((_e = item2.props) == null ? void 0 : _e.position) === "top" || ((_f = item2.props) == null ? void 0 : _f.position) === "bottom") {
25411
+ return item2;
25412
+ }
25413
+ if (props.mode === "alternative") {
25414
+ return renderItemPosition(item2, index2 % 2 == 0 ? "bottom" : "top");
25415
+ } else {
25416
+ return renderItemPosition(item2, "bottom");
25417
+ }
25418
+ } else {
25419
+ if (((_g = item2.props) == null ? void 0 : _g.position) === "left" || ((_h = item2.props) == null ? void 0 : _h.position) === "right") {
25420
+ return item2;
25421
+ }
25422
+ if (props.mode === "alternative") {
25423
+ return renderItemPosition(item2, index2 % 2 == 0 ? "left" : "right");
25424
+ } else {
25425
+ return renderItemPosition(item2, "right");
25426
+ }
25427
+ }
25428
+ });
25429
+ };
25430
+ const getDirection = () => {
25431
+ return props.direction === "horizontal" ? "horizontal" : "vertical";
25432
+ };
25433
+ return createVNode("div", {
25434
+ "class": `devui-timeline devui-timeline-${getDirection()} ${props.center ? "devui-timeline-" + getDirection() + "-center" : ""} `,
25435
+ "ref": timeAxis,
25436
+ "style": style2
25437
+ }, [renderItem()]);
25438
+ };
25439
+ }
25440
+ });
25441
+ Timeline.install = function(app) {
25442
+ app.component(Timeline.name, Timeline);
25443
+ };
25444
+ TimelineItem.install = function(app) {
25445
+ app.component(TimelineItem.name, TimelineItem);
25446
+ };
25447
+ var TimelineInstall = {
25448
+ title: "Timeline \u65F6\u95F4\u8F74",
25449
+ category: "\u6570\u636E\u5C55\u793A",
25450
+ status: "100%",
25451
+ install(app) {
25452
+ app.use(Timeline);
25453
+ app.use(TimelineItem);
25454
+ }
25455
+ };
25344
25456
  var TooltipInstall = {
25345
25457
  title: "Tooltip\u63D0\u793A",
25346
25458
  category: "\u53CD\u9988",
@@ -25988,8 +26100,9 @@ var Transfer = defineComponent({
25988
26100
  isFunction("afterTransfer") && props.afterTransfer.call(null, target);
25989
26101
  };
25990
26102
  const changeAllSource = (source, value) => {
25991
- if (source.filterData.every((item2) => item2.disabled))
26103
+ if (source.filterData.every((item2) => item2.disabled)) {
25992
26104
  return;
26105
+ }
25993
26106
  source.allChecked = value;
25994
26107
  if (value) {
25995
26108
  source.checkedValues = source.filterData.filter((item2) => !item2.disabled).map((item2) => item2.value);
@@ -26186,8 +26299,9 @@ function useToggle$1(data) {
26186
26299
  watch(() => data.value, (d) => openedData.value = openedTree(d), { deep: true });
26187
26300
  const toggle = (target, item2) => {
26188
26301
  target.stopPropagation();
26189
- if (!item2.children)
26302
+ if (!item2.children) {
26190
26303
  return;
26304
+ }
26191
26305
  item2.open = !item2.open;
26192
26306
  openedData.value = openedTree(data.value);
26193
26307
  };
@@ -26241,12 +26355,15 @@ const useHighlightNode = () => {
26241
26355
  return key;
26242
26356
  };
26243
26357
  const handleClick = (key) => {
26244
- if (nodeClassNameReflectRef.value[key] === IS_DISABLED_FLAG)
26358
+ if (nodeClassNameReflectRef.value[key] === IS_DISABLED_FLAG) {
26245
26359
  return;
26246
- if (prevActiveNodeKey.value === key)
26360
+ }
26361
+ if (prevActiveNodeKey.value === key) {
26247
26362
  return;
26248
- if (prevActiveNodeKey.value)
26363
+ }
26364
+ if (prevActiveNodeKey.value) {
26249
26365
  nodeClassNameReflectRef.value[prevActiveNodeKey.value] = "";
26366
+ }
26250
26367
  nodeClassNameReflectRef.value[key] = HIGHLIGHT_CLASS;
26251
26368
  prevActiveNodeKey.value = key;
26252
26369
  };
@@ -26454,8 +26571,9 @@ function useDraggable(draggable, dropType, node, renderData, data) {
26454
26571
  let nowDragNode;
26455
26572
  let nowDropNode;
26456
26573
  const findDragAndDropNode = (curr) => {
26457
- if (!Array.isArray(curr))
26574
+ if (!Array.isArray(curr)) {
26458
26575
  return;
26576
+ }
26459
26577
  curr.every((item2, index2) => {
26460
26578
  if (nowDragNode && nowDropNode) {
26461
26579
  return false;
@@ -26892,8 +27010,9 @@ function className(classStr, classOpt) {
26892
27010
  function useToggle(props) {
26893
27011
  const visible = ref(false);
26894
27012
  const selectToggle = () => {
26895
- if (props.disabled)
27013
+ if (props.disabled) {
26896
27014
  return;
27015
+ }
26897
27016
  visible.value = !visible.value;
26898
27017
  };
26899
27018
  const treeToggle = (e, item2) => {
@@ -26915,8 +27034,9 @@ function useSelect(props) {
26915
27034
  inputValue.value = item2.label;
26916
27035
  } else {
26917
27036
  item2.checked = !item2.checked;
26918
- if (item2.halfchecked)
27037
+ if (item2.halfchecked) {
26919
27038
  item2.halfchecked = false;
27039
+ }
26920
27040
  useCache(item2);
26921
27041
  searchUp(item2);
26922
27042
  searchDown(item2);
@@ -26927,8 +27047,9 @@ function useSelect(props) {
26927
27047
  item2.checked === true ? selectedCache.add(item2.label) : selectedCache.has(item2.label) && selectedCache.delete(item2.label);
26928
27048
  };
26929
27049
  const searchUp = (item2) => {
26930
- if (!item2.parent)
27050
+ if (!item2.parent) {
26931
27051
  return;
27052
+ }
26932
27053
  let state = "";
26933
27054
  const checkedArr = item2.parent.children.filter((el) => el.checked === true);
26934
27055
  switch (checkedArr.length) {
@@ -26956,8 +27077,9 @@ function useSelect(props) {
26956
27077
  searchUp(item2.parent);
26957
27078
  };
26958
27079
  const searchDown = (item2) => {
26959
- if (!item2.children)
27080
+ if (!item2.children) {
26960
27081
  return;
27082
+ }
26961
27083
  item2.children.forEach((el) => {
26962
27084
  el.checked = item2.checked;
26963
27085
  useCache(el);
@@ -27857,8 +27979,8 @@ const installs = [
27857
27979
  TagInstall,
27858
27980
  TagInputInstall,
27859
27981
  TextareaInstall,
27860
- TimeAxisInstall,
27861
27982
  TimePickerInstall,
27983
+ TimelineInstall,
27862
27984
  TooltipInstall,
27863
27985
  TransferInstall,
27864
27986
  TreeInstall,
@@ -27866,9 +27988,9 @@ const installs = [
27866
27988
  UploadInstall
27867
27989
  ];
27868
27990
  var vueDevui = {
27869
- version: "0.0.1",
27991
+ version: "1.0.0-rc.0",
27870
27992
  install(app) {
27871
27993
  installs.forEach((p) => app.use(p));
27872
27994
  }
27873
27995
  };
27874
- export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, CarouselItem, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer$1 as Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header$1 as Header, Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Notification, NotificationService, Pagination, Panel, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea, TimeAxis, TimeAxisItem, TimePicker, DTooltip as Tooltip, Transfer, Tree, TreeSelect, Upload, vueDevui as default };
27996
+ export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, CarouselItem, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer$1 as Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header$1 as Header, DIcon as Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Notification, NotificationService, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea, TimePicker, Timeline, TimelineItem, DTooltip as Tooltip, Transfer, Tree, TreeSelect, Upload, vueDevui as default };