vue-devui 1.0.0-rc.8 → 1.0.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 (228) hide show
  1. package/README.md +188 -149
  2. package/alert/index.es.js +14 -9
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8392 -418
  6. package/auto-complete/index.umd.js +29 -5
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +59 -74
  9. package/avatar/index.umd.js +1 -1
  10. package/badge/index.es.js +10 -4
  11. package/badge/index.umd.js +1 -1
  12. package/badge/style.css +1 -1
  13. package/button/index.es.js +191 -53
  14. package/button/index.umd.js +17 -17
  15. package/button/style.css +1 -1
  16. package/card/index.es.js +7 -3
  17. package/card/index.umd.js +1 -1
  18. package/card/style.css +1 -1
  19. package/checkbox/index.es.js +8050 -241
  20. package/checkbox/index.umd.js +27 -1
  21. package/checkbox/style.css +1 -1
  22. package/{date-picker → collapse}/index.d.ts +0 -0
  23. package/collapse/index.es.js +213 -0
  24. package/collapse/index.umd.js +1 -0
  25. package/{date-picker → collapse}/package.json +1 -1
  26. package/collapse/style.css +1 -0
  27. package/countdown/index.es.js +56 -13
  28. package/countdown/index.umd.js +1 -1
  29. package/date-picker-pro/index.d.ts +7 -0
  30. package/date-picker-pro/index.es.js +12022 -0
  31. package/date-picker-pro/index.umd.js +27 -0
  32. package/date-picker-pro/package.json +7 -0
  33. package/date-picker-pro/style.css +1 -0
  34. package/drawer/index.es.js +24 -7
  35. package/drawer/index.umd.js +1 -1
  36. package/drawer/style.css +1 -1
  37. package/dropdown/index.es.js +190 -165
  38. package/dropdown/index.umd.js +1 -1
  39. package/dropdown/style.css +1 -1
  40. package/editable-select/index.es.js +785 -145
  41. package/editable-select/index.umd.js +1 -1
  42. package/editable-select/style.css +1 -1
  43. package/form/index.es.js +399 -300
  44. package/form/index.umd.js +16 -16
  45. package/form/style.css +1 -1
  46. package/fullscreen/index.es.js +2 -2
  47. package/fullscreen/index.umd.js +1 -1
  48. package/grid/index.es.js +8 -6
  49. package/grid/index.umd.js +1 -1
  50. package/icon/index.es.js +185 -23
  51. package/icon/index.umd.js +1 -1
  52. package/icon/style.css +1 -0
  53. package/image-preview/index.es.js +2 -2
  54. package/image-preview/index.umd.js +1 -1
  55. package/image-preview/style.css +1 -1
  56. package/input/index.es.js +8220 -45
  57. package/input/index.umd.js +27 -1
  58. package/input/style.css +1 -1
  59. package/input-number/index.es.js +279 -204
  60. package/input-number/index.umd.js +1 -1
  61. package/input-number/style.css +1 -1
  62. package/layout/index.es.js +3 -3
  63. package/layout/index.umd.js +1 -1
  64. package/loading/index.es.js +53 -53
  65. package/loading/index.umd.js +1 -1
  66. package/loading/style.css +1 -1
  67. package/mention/index.d.ts +7 -0
  68. package/mention/index.es.js +8319 -0
  69. package/mention/index.umd.js +36 -0
  70. package/mention/package.json +7 -0
  71. package/mention/style.css +1 -0
  72. package/menu/index.d.ts +7 -0
  73. package/menu/index.es.js +921 -0
  74. package/menu/index.umd.js +1 -0
  75. package/menu/package.json +7 -0
  76. package/menu/style.css +1 -0
  77. package/message/index.d.ts +7 -0
  78. package/message/index.es.js +539 -0
  79. package/message/index.umd.js +1 -0
  80. package/message/package.json +7 -0
  81. package/message/style.css +1 -0
  82. package/modal/index.es.js +451 -173
  83. package/modal/index.umd.js +1 -1
  84. package/modal/style.css +1 -1
  85. package/notification/index.es.js +212 -70
  86. package/notification/index.umd.js +1 -1
  87. package/notification/style.css +1 -1
  88. package/nuxt/components/CheckboxButton.js +3 -0
  89. package/nuxt/components/Collapse.js +3 -0
  90. package/nuxt/components/CollapseItem.js +3 -0
  91. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  92. package/nuxt/components/DatePickerPro.js +3 -0
  93. package/nuxt/components/Icon.js +1 -0
  94. package/nuxt/components/IconGroup.js +3 -0
  95. package/nuxt/components/LABEL_DATA.js +3 -0
  96. package/nuxt/components/Mention.js +3 -0
  97. package/nuxt/components/Menu.js +3 -0
  98. package/nuxt/components/MenuItem.js +3 -0
  99. package/nuxt/components/Message.js +3 -0
  100. package/nuxt/components/Option.js +3 -0
  101. package/nuxt/components/OptionGroup.js +3 -0
  102. package/nuxt/components/RadioButton.js +3 -0
  103. package/nuxt/components/Step.js +3 -0
  104. package/nuxt/components/Steps.js +3 -0
  105. package/nuxt/components/SubMenu.js +3 -0
  106. package/nuxt/components/TABLE_TOKEN.js +3 -0
  107. package/nuxt/components/TimePicker.js +3 -0
  108. package/nuxt/components/TimeSelect.js +3 -0
  109. package/nuxt/components/animationInjectionKey.js +3 -0
  110. package/nuxt/components/collapseItemProps.js +3 -0
  111. package/nuxt/components/collapseProps.js +3 -0
  112. package/nuxt/components/datePickerProCommonProps.js +3 -0
  113. package/nuxt/components/datePickerProPanelProps.js +3 -0
  114. package/nuxt/components/datePickerProProps.js +3 -0
  115. package/nuxt/components/iconProps.js +1 -0
  116. package/nuxt/components/mentionProps.js +3 -0
  117. package/nuxt/components/messageProps.js +3 -0
  118. package/nuxt/components/paginationInjectionKey.js +3 -0
  119. package/nuxt/components/roundInjectionKey.js +3 -0
  120. package/nuxt/components/skeletonItemProps.js +3 -0
  121. package/nuxt/components/stepProps.js +3 -0
  122. package/nuxt/components/stepsProps.js +3 -0
  123. package/nuxt/components/svgIconProps.js +3 -0
  124. package/nuxt/components/tableProps.js +3 -0
  125. package/nuxt/components/timerPickerPanelProps.js +3 -0
  126. package/nuxt/components/treeNodeProps.js +3 -0
  127. package/overlay/index.es.js +89 -142
  128. package/overlay/index.umd.js +1 -1
  129. package/overlay/style.css +1 -1
  130. package/package.json +8 -4
  131. package/pagination/index.es.js +10180 -129
  132. package/pagination/index.umd.js +27 -1
  133. package/pagination/style.css +1 -1
  134. package/panel/index.es.js +4 -0
  135. package/panel/index.umd.js +1 -1
  136. package/panel/style.css +1 -1
  137. package/popover/index.es.js +262 -229
  138. package/popover/index.umd.js +15 -15
  139. package/popover/style.css +1 -1
  140. package/progress/index.es.js +2 -2
  141. package/progress/index.umd.js +2 -2
  142. package/progress/style.css +1 -1
  143. package/radio/index.es.js +7954 -156
  144. package/radio/index.umd.js +27 -1
  145. package/radio/style.css +1 -1
  146. package/rate/index.es.js +16 -8
  147. package/rate/index.umd.js +1 -1
  148. package/rate/style.css +1 -1
  149. package/result/index.es.js +170 -22
  150. package/result/index.umd.js +1 -1
  151. package/result/style.css +1 -1
  152. package/search/index.es.js +3829 -1042
  153. package/search/index.umd.js +18 -18
  154. package/search/style.css +1 -1
  155. package/select/index.es.js +9202 -495
  156. package/select/index.umd.js +27 -1
  157. package/select/style.css +1 -1
  158. package/skeleton/index.es.js +89 -263
  159. package/skeleton/index.umd.js +1 -1
  160. package/skeleton/style.css +1 -1
  161. package/slider/index.es.js +118 -145
  162. package/slider/index.umd.js +1 -1
  163. package/slider/style.css +1 -1
  164. package/splitter/index.es.js +454 -233
  165. package/splitter/index.umd.js +13 -13
  166. package/splitter/style.css +1 -1
  167. package/statistic/index.es.js +34 -16
  168. package/statistic/index.umd.js +1 -1
  169. package/statistic/style.css +1 -1
  170. package/status/index.es.js +6 -2
  171. package/status/index.umd.js +1 -1
  172. package/status/style.css +1 -1
  173. package/steps/index.d.ts +7 -0
  174. package/steps/index.es.js +387 -0
  175. package/steps/index.umd.js +1 -0
  176. package/steps/package.json +7 -0
  177. package/steps/style.css +1 -0
  178. package/style.css +1 -1
  179. package/switch/index.es.js +7787 -62
  180. package/switch/index.umd.js +27 -1
  181. package/switch/style.css +1 -1
  182. package/table/index.es.js +5225 -1726
  183. package/table/index.umd.js +18 -18
  184. package/table/style.css +1 -1
  185. package/tabs/index.es.js +303 -102
  186. package/tabs/index.umd.js +1 -1
  187. package/tabs/style.css +1 -1
  188. package/tag/index.es.js +11 -8
  189. package/tag/index.umd.js +1 -1
  190. package/tag/style.css +1 -1
  191. package/textarea/index.es.js +7876 -41
  192. package/textarea/index.umd.js +35 -1
  193. package/textarea/style.css +1 -1
  194. package/time-picker/index.d.ts +7 -0
  195. package/time-picker/index.es.js +9549 -0
  196. package/time-picker/index.umd.js +27 -0
  197. package/time-picker/package.json +7 -0
  198. package/time-picker/style.css +1 -0
  199. package/time-select/index.d.ts +7 -0
  200. package/time-select/index.es.js +9607 -0
  201. package/time-select/index.umd.js +27 -0
  202. package/time-select/package.json +7 -0
  203. package/time-select/style.css +1 -0
  204. package/timeline/index.es.js +170 -22
  205. package/timeline/index.umd.js +1 -1
  206. package/timeline/style.css +1 -1
  207. package/tooltip/index.es.js +286 -238
  208. package/tooltip/index.umd.js +14 -14
  209. package/tooltip/style.css +1 -1
  210. package/tree/index.es.js +11342 -793
  211. package/tree/index.umd.js +27 -1
  212. package/tree/style.css +1 -1
  213. package/upload/index.es.js +458 -102
  214. package/upload/index.umd.js +1 -1
  215. package/upload/style.css +1 -1
  216. package/vue-devui.es.js +20475 -11072
  217. package/vue-devui.umd.js +31 -24
  218. package/date-picker/index.es.js +0 -1097
  219. package/date-picker/index.umd.js +0 -1
  220. package/date-picker/style.css +0 -1
  221. package/nuxt/components/DatePicker.js +0 -3
  222. package/nuxt/components/FormControl.js +0 -3
  223. package/nuxt/components/FormLabel.js +0 -3
  224. package/nuxt/components/Loading.js +0 -3
  225. package/nuxt/components/StickSlider.js +0 -3
  226. package/nuxt/components/formControlProps.js +0 -3
  227. package/nuxt/components/overlayEmits.js +0 -3
  228. package/nuxt/components/overlayProps.js +0 -3
@@ -1,28 +1,66 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
3
  var __publicField = (obj, key, value) => {
21
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
5
  return value;
23
6
  };
24
- import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, toRefs, Fragment, inject, reactive, withDirectives, provide, resolveComponent, onUpdated } from "vue";
7
+ import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, provide, Teleport, reactive, getCurrentInstance, resolveComponent, onUpdated } from "vue";
25
8
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
9
+ const fixedOverlayProps = {
10
+ modelValue: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ lockScroll: {
15
+ type: Boolean,
16
+ default: true
17
+ },
18
+ closeOnClickOverlay: {
19
+ type: Boolean,
20
+ default: true
21
+ }
22
+ };
23
+ function lockScroll() {
24
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
25
+ const scrollTop = document.documentElement.scrollTop;
26
+ const style = document.documentElement.getAttribute("style");
27
+ document.documentElement.style.position = "fixed";
28
+ document.documentElement.style.top = `-${scrollTop}px`;
29
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
30
+ document.documentElement.style.overflowY = "scroll";
31
+ return () => {
32
+ if (style) {
33
+ document.documentElement.setAttribute("style", style);
34
+ } else {
35
+ document.documentElement.removeAttribute("style");
36
+ }
37
+ document.documentElement.scrollTop = scrollTop;
38
+ };
39
+ }
40
+ return;
41
+ }
42
+ function useFixedOverlay(props, ctx) {
43
+ let lockScrollCb;
44
+ const onClick = (event) => {
45
+ event.preventDefault();
46
+ ctx.emit("click", event);
47
+ if (props.closeOnClickOverlay) {
48
+ ctx.emit("update:modelValue", false);
49
+ }
50
+ };
51
+ const removeBodyAdditions = () => {
52
+ lockScrollCb == null ? void 0 : lockScrollCb();
53
+ };
54
+ watch(() => props.modelValue, (val) => {
55
+ if (val) {
56
+ props.lockScroll && (lockScrollCb = lockScroll());
57
+ } else {
58
+ removeBodyAdditions();
59
+ }
60
+ });
61
+ onUnmounted(removeBodyAdditions);
62
+ return { onClick };
63
+ }
26
64
  function createBem(namespace, element, modifier) {
27
65
  let cls = namespace;
28
66
  if (element) {
@@ -33,8 +71,8 @@ function createBem(namespace, element, modifier) {
33
71
  }
34
72
  return cls;
35
73
  }
36
- function useNamespace(block) {
37
- const namespace = `devui-${block}`;
74
+ function useNamespace(block, needDot = false) {
75
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
38
76
  const b = () => createBem(namespace);
39
77
  const e = (element) => element ? createBem(namespace, element) : "";
40
78
  const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
@@ -46,130 +84,31 @@ function useNamespace(block) {
46
84
  em
47
85
  };
48
86
  }
49
- var baseOverlay = "";
50
- function _isSlot(s) {
51
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
52
- }
53
- const CommonOverlay = defineComponent({
54
- setup(props, ctx) {
55
- const ns = useNamespace("overlay");
56
- return () => {
57
- let _slot;
58
- return createVNode(Teleport, {
59
- "to": "#d-overlay-anchor"
60
- }, {
61
- default: () => [createVNode(Transition, {
62
- "name": ns.e("fade")
63
- }, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
64
- default: () => [_slot]
65
- })]
66
- });
67
- };
68
- }
69
- });
70
- const overlayProps = {
71
- visible: {
72
- type: Boolean
73
- },
74
- backgroundBlock: {
75
- type: Boolean,
76
- default: false
77
- },
78
- backgroundClass: {
79
- type: String,
80
- default: ""
81
- },
82
- backgroundStyle: {
83
- type: [String, Object]
84
- },
85
- onBackdropClick: {
86
- type: Function
87
- },
88
- backdropClose: {
89
- type: Boolean,
90
- default: true
91
- },
92
- hasBackdrop: {
93
- type: Boolean,
94
- default: true
95
- }
96
- };
97
- const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
98
- overlayStyle: {
99
- type: [String, Object],
100
- default: void 0
101
- }
102
- });
103
- const overlayEmits = ["update:visible", "backdropClick"];
104
- function useOverlayLogic(props, ctx) {
105
- const ns = useNamespace("overlay");
106
- const backgroundClass = computed(() => {
107
- return [ns.e("background"), props.backgroundClass, !props.hasBackdrop ? ns.em("background", "disabled") : ns.em("background", "color")];
108
- });
109
- const overlayClass = computed(() => {
110
- return ns.b();
111
- });
112
- const handleBackdropClick = (event) => {
113
- var _a;
114
- event.preventDefault();
115
- (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
116
- if (props.backdropClose) {
117
- ctx.emit("update:visible", false);
118
- }
119
- };
120
- const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
121
- onMounted(() => {
122
- const body = document.body;
123
- const originOverflow = body.style.overflow;
124
- const originPosition = body.style.position;
125
- watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
126
- if (backgroundBlock) {
127
- const top = body.getBoundingClientRect().y;
128
- if (visible) {
129
- body.style.overflowY = "scroll";
130
- body.style.position = visible ? "fixed" : "";
131
- body.style.top = `${top}px`;
132
- } else {
133
- body.style.overflowY = originOverflow;
134
- body.style.position = originPosition;
135
- body.style.top = "";
136
- window.scrollTo(0, -top);
137
- }
138
- }
139
- });
140
- onUnmounted(() => {
141
- document.body.style.overflow = originOverflow;
142
- });
143
- });
144
- return {
145
- backgroundClass,
146
- overlayClass,
147
- handleBackdropClick,
148
- handleOverlayBubbleCancel
149
- };
150
- }
151
87
  var fixedOverlay = "";
152
88
  defineComponent({
153
89
  name: "DFixedOverlay",
90
+ inheritAttrs: false,
154
91
  props: fixedOverlayProps,
155
- emits: overlayEmits,
92
+ emits: ["update:modelValue", "click"],
156
93
  setup(props, ctx) {
157
94
  const {
158
- backgroundClass,
159
- overlayClass,
160
- handleBackdropClick,
161
- handleOverlayBubbleCancel
162
- } = useOverlayLogic(props, ctx);
163
- return () => createVNode(CommonOverlay, null, {
164
- default: () => [props.visible && createVNode("div", {
165
- "class": backgroundClass.value,
166
- "style": props.backgroundStyle,
167
- "onClick": handleBackdropClick
168
- }, [createVNode("div", {
169
- "class": overlayClass.value,
170
- "style": props.overlayStyle,
171
- "onClick": handleOverlayBubbleCancel
172
- }, [renderSlot(ctx.slots, "default")])])]
95
+ modelValue
96
+ } = toRefs(props);
97
+ const ns2 = useNamespace("fixed-overlay");
98
+ const {
99
+ onClick
100
+ } = useFixedOverlay(props, ctx);
101
+ return () => createVNode(Transition, {
102
+ "name": ns2.m("fade")
103
+ }, {
104
+ default: () => {
105
+ var _a, _b;
106
+ return [modelValue.value && createVNode("div", mergeProps({
107
+ "class": ns2.b()
108
+ }, ctx.attrs, {
109
+ "onClick": onClick
110
+ }), [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
111
+ }
173
112
  });
174
113
  }
175
114
  });
@@ -204,6 +143,10 @@ const flexibleOverlayProps = {
204
143
  isArrowCenter: {
205
144
  type: Boolean,
206
145
  default: true
146
+ },
147
+ clickEventBubble: {
148
+ type: Boolean,
149
+ default: false
207
150
  }
208
151
  };
209
152
  function getScrollParent(element) {
@@ -317,7 +260,10 @@ const FlexibleOverlay = defineComponent({
317
260
  emit,
318
261
  expose
319
262
  }) {
320
- const ns = useNamespace("flexible-overlay");
263
+ const ns2 = useNamespace("flexible-overlay");
264
+ const {
265
+ clickEventBubble
266
+ } = toRefs(props);
321
267
  const {
322
268
  arrowRef,
323
269
  overlayRef,
@@ -330,14 +276,73 @@ const FlexibleOverlay = defineComponent({
330
276
  var _a;
331
277
  return props.modelValue && createVNode("div", mergeProps({
332
278
  "ref": overlayRef,
333
- "class": ns.b()
334
- }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
279
+ "class": ns2.b()
280
+ }, attrs, {
281
+ "onClick": withModifiers(() => ({}), [clickEventBubble.value ? "" : "stop"]),
282
+ "onPointerup": withModifiers(() => ({}), ["stop"])
283
+ }), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
335
284
  "ref": arrowRef,
336
- "class": ns.e("arrow")
285
+ "class": ns2.e("arrow")
337
286
  }, null)]);
338
287
  };
339
288
  }
340
289
  });
290
+ const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
291
+ const isObject = (val) => val !== null && typeof val === "object";
292
+ const ns = useNamespace("popper-trigger");
293
+ function wrapContent(content) {
294
+ return h("span", { class: ns.b() }, content);
295
+ }
296
+ function getFirstValidChild(nodes) {
297
+ for (const child of nodes) {
298
+ if (isObject(child)) {
299
+ if (child.type === Comment) {
300
+ continue;
301
+ }
302
+ if (child.type === "svg" || child.type === Text) {
303
+ return wrapContent(child);
304
+ }
305
+ if (child.type === Fragment) {
306
+ return getFirstValidChild(child.children);
307
+ }
308
+ return child;
309
+ }
310
+ return wrapContent(child);
311
+ }
312
+ return null;
313
+ }
314
+ var PopperTrigger = defineComponent({
315
+ name: "DPopperTrigger",
316
+ setup(_, ctx) {
317
+ const {
318
+ slots,
319
+ attrs
320
+ } = ctx;
321
+ return () => {
322
+ var _a;
323
+ const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
324
+ const triggerRef = inject(POPPER_TRIGGER_TOKEN);
325
+ if (!defaultSlot) {
326
+ return null;
327
+ }
328
+ const firstValidChild = getFirstValidChild(defaultSlot);
329
+ if (!firstValidChild) {
330
+ return null;
331
+ }
332
+ return withDirectives(cloneVNode(firstValidChild, attrs), [[{
333
+ mounted(el) {
334
+ triggerRef.value = el;
335
+ },
336
+ updated(el) {
337
+ triggerRef.value = el;
338
+ },
339
+ unmounted() {
340
+ triggerRef.value = null;
341
+ }
342
+ }]]);
343
+ };
344
+ }
345
+ });
341
346
  const tooltipProps = {
342
347
  content: {
343
348
  type: String,
@@ -358,6 +363,18 @@ const tooltipProps = {
358
363
  mouseLeaveDelay: {
359
364
  type: Number,
360
365
  default: 100
366
+ },
367
+ enterable: {
368
+ type: Boolean,
369
+ default: true
370
+ },
371
+ disabled: {
372
+ type: Boolean,
373
+ default: false
374
+ },
375
+ hideAfter: {
376
+ type: Number,
377
+ default: 0
361
378
  }
362
379
  };
363
380
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -1071,7 +1088,7 @@ var lodash = { exports: {} };
1071
1088
  var objectCtorString = funcToString.call(Object2);
1072
1089
  var oldDash = root._;
1073
1090
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1074
- var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined$1, symIterator = Symbol ? Symbol.iterator : undefined$1, symToStringTag = Symbol ? Symbol.toStringTag : undefined$1;
1091
+ var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
1075
1092
  var defineProperty = function() {
1076
1093
  try {
1077
1094
  var func = getNative(Object2, "defineProperty");
@@ -1082,11 +1099,11 @@ var lodash = { exports: {} };
1082
1099
  }();
1083
1100
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1084
1101
  var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
1085
- var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1102
+ var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1086
1103
  var metaMap = WeakMap2 && new WeakMap2();
1087
1104
  var realNames = {};
1088
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
1089
- var symbolProto = Symbol ? Symbol.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1105
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1106
+ var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1090
1107
  function lodash2(value) {
1091
1108
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
1092
1109
  if (value instanceof LodashWrapper) {
@@ -1102,7 +1119,7 @@ var lodash = { exports: {} };
1102
1119
  function object() {
1103
1120
  }
1104
1121
  return function(proto) {
1105
- if (!isObject(proto)) {
1122
+ if (!isObject2(proto)) {
1106
1123
  return {};
1107
1124
  }
1108
1125
  if (objectCreate) {
@@ -1441,7 +1458,7 @@ var lodash = { exports: {} };
1441
1458
  function baseAt(object, paths) {
1442
1459
  var index2 = -1, length = paths.length, result2 = Array2(length), skip = object == null;
1443
1460
  while (++index2 < length) {
1444
- result2[index2] = skip ? undefined$1 : get(object, paths[index2]);
1461
+ result2[index2] = skip ? undefined$1 : get2(object, paths[index2]);
1445
1462
  }
1446
1463
  return result2;
1447
1464
  }
@@ -1464,7 +1481,7 @@ var lodash = { exports: {} };
1464
1481
  if (result2 !== undefined$1) {
1465
1482
  return result2;
1466
1483
  }
1467
- if (!isObject(value)) {
1484
+ if (!isObject2(value)) {
1468
1485
  return value;
1469
1486
  }
1470
1487
  var isArr = isArray(value);
@@ -1540,7 +1557,7 @@ var lodash = { exports: {} };
1540
1557
  if (typeof func != "function") {
1541
1558
  throw new TypeError2(FUNC_ERROR_TEXT);
1542
1559
  }
1543
- return setTimeout(function() {
1560
+ return setTimeout2(function() {
1544
1561
  func.apply(undefined$1, args);
1545
1562
  }, wait);
1546
1563
  }
@@ -1811,7 +1828,7 @@ var lodash = { exports: {} };
1811
1828
  return true;
1812
1829
  }
1813
1830
  function baseIsNative(value) {
1814
- if (!isObject(value) || isMasked(value)) {
1831
+ if (!isObject2(value) || isMasked(value)) {
1815
1832
  return false;
1816
1833
  }
1817
1834
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
@@ -1851,7 +1868,7 @@ var lodash = { exports: {} };
1851
1868
  return result2;
1852
1869
  }
1853
1870
  function baseKeysIn(object) {
1854
- if (!isObject(object)) {
1871
+ if (!isObject2(object)) {
1855
1872
  return nativeKeysIn(object);
1856
1873
  }
1857
1874
  var isProto = isPrototype(object), result2 = [];
@@ -1886,7 +1903,7 @@ var lodash = { exports: {} };
1886
1903
  return matchesStrictComparable(toKey(path), srcValue);
1887
1904
  }
1888
1905
  return function(object) {
1889
- var objValue = get(object, path);
1906
+ var objValue = get2(object, path);
1890
1907
  return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1891
1908
  };
1892
1909
  }
@@ -1896,7 +1913,7 @@ var lodash = { exports: {} };
1896
1913
  }
1897
1914
  baseFor(source, function(srcValue, key) {
1898
1915
  stack || (stack = new Stack());
1899
- if (isObject(srcValue)) {
1916
+ if (isObject2(srcValue)) {
1900
1917
  baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
1901
1918
  } else {
1902
1919
  var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
@@ -1936,7 +1953,7 @@ var lodash = { exports: {} };
1936
1953
  newValue = objValue;
1937
1954
  if (isArguments(objValue)) {
1938
1955
  newValue = toPlainObject(objValue);
1939
- } else if (!isObject(objValue) || isFunction(objValue)) {
1956
+ } else if (!isObject2(objValue) || isFunction(objValue)) {
1940
1957
  newValue = initCloneObject(srcValue);
1941
1958
  }
1942
1959
  } else {
@@ -2075,7 +2092,7 @@ var lodash = { exports: {} };
2075
2092
  return shuffleSelf(array, baseClamp(n, 0, array.length));
2076
2093
  }
2077
2094
  function baseSet(object, path, value, customizer) {
2078
- if (!isObject(object)) {
2095
+ if (!isObject2(object)) {
2079
2096
  return object;
2080
2097
  }
2081
2098
  path = castPath(path, object);
@@ -2089,7 +2106,7 @@ var lodash = { exports: {} };
2089
2106
  var objValue = nested[key];
2090
2107
  newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
2091
2108
  if (newValue === undefined$1) {
2092
- newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2109
+ newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2093
2110
  }
2094
2111
  }
2095
2112
  assignValue(nested, key, newValue);
@@ -2320,7 +2337,7 @@ var lodash = { exports: {} };
2320
2337
  end = end === undefined$1 ? length : end;
2321
2338
  return !start && end >= length ? array : baseSlice(array, start, end);
2322
2339
  }
2323
- var clearTimeout = ctxClearTimeout || function(id) {
2340
+ var clearTimeout2 = ctxClearTimeout || function(id) {
2324
2341
  return root.clearTimeout(id);
2325
2342
  };
2326
2343
  function cloneBuffer(buffer, isDeep) {
@@ -2539,7 +2556,7 @@ var lodash = { exports: {} };
2539
2556
  return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
2540
2557
  }
2541
2558
  var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
2542
- return isObject(result2) ? result2 : thisBinding;
2559
+ return isObject2(result2) ? result2 : thisBinding;
2543
2560
  };
2544
2561
  }
2545
2562
  function createCurry(func, bitmask, arity) {
@@ -2777,8 +2794,8 @@ var lodash = { exports: {} };
2777
2794
  return func(number);
2778
2795
  };
2779
2796
  }
2780
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2781
- return new Set(values2);
2797
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2798
+ return new Set2(values2);
2782
2799
  };
2783
2800
  function createToPairs(keysFunc) {
2784
2801
  return function(object) {
@@ -2853,7 +2870,7 @@ var lodash = { exports: {} };
2853
2870
  return objValue;
2854
2871
  }
2855
2872
  function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
2856
- if (isObject(objValue) && isObject(srcValue)) {
2873
+ if (isObject2(objValue) && isObject2(srcValue)) {
2857
2874
  stack.set(srcValue, objValue);
2858
2875
  baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
2859
2876
  stack["delete"](srcValue);
@@ -3077,7 +3094,7 @@ var lodash = { exports: {} };
3077
3094
  return result2;
3078
3095
  };
3079
3096
  var getTag = baseGetTag;
3080
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3097
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3081
3098
  getTag = function(value) {
3082
3099
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3083
3100
  if (ctorString) {
@@ -3201,7 +3218,7 @@ var lodash = { exports: {} };
3201
3218
  return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3202
3219
  }
3203
3220
  function isIterateeCall(value, index2, object) {
3204
- if (!isObject(object)) {
3221
+ if (!isObject2(object)) {
3205
3222
  return false;
3206
3223
  }
3207
3224
  var type = typeof index2;
@@ -3244,7 +3261,7 @@ var lodash = { exports: {} };
3244
3261
  return value === proto;
3245
3262
  }
3246
3263
  function isStrictComparable(value) {
3247
- return value === value && !isObject(value);
3264
+ return value === value && !isObject2(value);
3248
3265
  }
3249
3266
  function matchesStrictComparable(key, srcValue) {
3250
3267
  return function(object) {
@@ -3349,7 +3366,7 @@ var lodash = { exports: {} };
3349
3366
  return object[key];
3350
3367
  }
3351
3368
  var setData = shortOut(baseSetData);
3352
- var setTimeout = ctxSetTimeout || function(func, wait) {
3369
+ var setTimeout2 = ctxSetTimeout || function(func, wait) {
3353
3370
  return root.setTimeout(func, wait);
3354
3371
  };
3355
3372
  var setToString = shortOut(baseSetToString);
@@ -4126,7 +4143,7 @@ var lodash = { exports: {} };
4126
4143
  throw new TypeError2(FUNC_ERROR_TEXT);
4127
4144
  }
4128
4145
  wait = toNumber(wait) || 0;
4129
- if (isObject(options)) {
4146
+ if (isObject2(options)) {
4130
4147
  leading = !!options.leading;
4131
4148
  maxing = "maxWait" in options;
4132
4149
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -4141,7 +4158,7 @@ var lodash = { exports: {} };
4141
4158
  }
4142
4159
  function leadingEdge(time) {
4143
4160
  lastInvokeTime = time;
4144
- timerId = setTimeout(timerExpired, wait);
4161
+ timerId = setTimeout2(timerExpired, wait);
4145
4162
  return leading ? invokeFunc(time) : result2;
4146
4163
  }
4147
4164
  function remainingWait(time) {
@@ -4157,7 +4174,7 @@ var lodash = { exports: {} };
4157
4174
  if (shouldInvoke(time)) {
4158
4175
  return trailingEdge(time);
4159
4176
  }
4160
- timerId = setTimeout(timerExpired, remainingWait(time));
4177
+ timerId = setTimeout2(timerExpired, remainingWait(time));
4161
4178
  }
4162
4179
  function trailingEdge(time) {
4163
4180
  timerId = undefined$1;
@@ -4169,7 +4186,7 @@ var lodash = { exports: {} };
4169
4186
  }
4170
4187
  function cancel() {
4171
4188
  if (timerId !== undefined$1) {
4172
- clearTimeout(timerId);
4189
+ clearTimeout2(timerId);
4173
4190
  }
4174
4191
  lastInvokeTime = 0;
4175
4192
  lastArgs = lastCallTime = lastThis = timerId = undefined$1;
@@ -4187,13 +4204,13 @@ var lodash = { exports: {} };
4187
4204
  return leadingEdge(lastCallTime);
4188
4205
  }
4189
4206
  if (maxing) {
4190
- clearTimeout(timerId);
4191
- timerId = setTimeout(timerExpired, wait);
4207
+ clearTimeout2(timerId);
4208
+ timerId = setTimeout2(timerExpired, wait);
4192
4209
  return invokeFunc(lastCallTime);
4193
4210
  }
4194
4211
  }
4195
4212
  if (timerId === undefined$1) {
4196
- timerId = setTimeout(timerExpired, wait);
4213
+ timerId = setTimeout2(timerExpired, wait);
4197
4214
  }
4198
4215
  return result2;
4199
4216
  }
@@ -4296,7 +4313,7 @@ var lodash = { exports: {} };
4296
4313
  if (typeof func != "function") {
4297
4314
  throw new TypeError2(FUNC_ERROR_TEXT);
4298
4315
  }
4299
- if (isObject(options)) {
4316
+ if (isObject2(options)) {
4300
4317
  leading = "leading" in options ? !!options.leading : leading;
4301
4318
  trailing = "trailing" in options ? !!options.trailing : trailing;
4302
4319
  }
@@ -4404,7 +4421,7 @@ var lodash = { exports: {} };
4404
4421
  return typeof value == "number" && nativeIsFinite(value);
4405
4422
  }
4406
4423
  function isFunction(value) {
4407
- if (!isObject(value)) {
4424
+ if (!isObject2(value)) {
4408
4425
  return false;
4409
4426
  }
4410
4427
  var tag = baseGetTag(value);
@@ -4416,7 +4433,7 @@ var lodash = { exports: {} };
4416
4433
  function isLength(value) {
4417
4434
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4418
4435
  }
4419
- function isObject(value) {
4436
+ function isObject2(value) {
4420
4437
  var type = typeof value;
4421
4438
  return value != null && (type == "object" || type == "function");
4422
4439
  }
@@ -4523,9 +4540,9 @@ var lodash = { exports: {} };
4523
4540
  if (isSymbol(value)) {
4524
4541
  return NAN;
4525
4542
  }
4526
- if (isObject(value)) {
4543
+ if (isObject2(value)) {
4527
4544
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
4528
- value = isObject(other) ? other + "" : other;
4545
+ value = isObject2(other) ? other + "" : other;
4529
4546
  }
4530
4547
  if (typeof value != "string") {
4531
4548
  return value === 0 ? value : +value;
@@ -4619,7 +4636,7 @@ var lodash = { exports: {} };
4619
4636
  function functionsIn(object) {
4620
4637
  return object == null ? [] : baseFunctions(object, keysIn(object));
4621
4638
  }
4622
- function get(object, path, defaultValue) {
4639
+ function get2(object, path, defaultValue) {
4623
4640
  var result2 = object == null ? undefined$1 : baseGet(object, path);
4624
4641
  return result2 === undefined$1 ? defaultValue : result2;
4625
4642
  }
@@ -4746,7 +4763,7 @@ var lodash = { exports: {} };
4746
4763
  var Ctor = object && object.constructor;
4747
4764
  if (isArrLike) {
4748
4765
  accumulator = isArr ? new Ctor() : [];
4749
- } else if (isObject(object)) {
4766
+ } else if (isObject2(object)) {
4750
4767
  accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
4751
4768
  } else {
4752
4769
  accumulator = {};
@@ -5028,7 +5045,7 @@ var lodash = { exports: {} };
5028
5045
  }
5029
5046
  function truncate(string, options) {
5030
5047
  var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
5031
- if (isObject(options)) {
5048
+ if (isObject2(options)) {
5032
5049
  var separator = "separator" in options ? options.separator : separator;
5033
5050
  length = "length" in options ? toInteger(options.length) : length;
5034
5051
  omission = "omission" in options ? baseToString(options.omission) : omission;
@@ -5158,13 +5175,13 @@ var lodash = { exports: {} };
5158
5175
  });
5159
5176
  function mixin(object, source, options) {
5160
5177
  var props = keys(source), methodNames = baseFunctions(source, props);
5161
- if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
5178
+ if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
5162
5179
  options = source;
5163
5180
  source = object;
5164
5181
  object = this;
5165
5182
  methodNames = baseFunctions(source, keys(source));
5166
5183
  }
5167
- var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
5184
+ var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
5168
5185
  arrayEach(methodNames, function(methodName) {
5169
5186
  var func = source[methodName];
5170
5187
  object[methodName] = func;
@@ -5474,7 +5491,7 @@ var lodash = { exports: {} };
5474
5491
  lodash2.forInRight = forInRight;
5475
5492
  lodash2.forOwn = forOwn;
5476
5493
  lodash2.forOwnRight = forOwnRight;
5477
- lodash2.get = get;
5494
+ lodash2.get = get2;
5478
5495
  lodash2.gt = gt;
5479
5496
  lodash2.gte = gte;
5480
5497
  lodash2.has = has;
@@ -5510,7 +5527,7 @@ var lodash = { exports: {} };
5510
5527
  lodash2.isNil = isNil;
5511
5528
  lodash2.isNull = isNull;
5512
5529
  lodash2.isNumber = isNumber;
5513
- lodash2.isObject = isObject;
5530
+ lodash2.isObject = isObject2;
5514
5531
  lodash2.isObjectLike = isObjectLike;
5515
5532
  lodash2.isPlainObject = isPlainObject;
5516
5533
  lodash2.isRegExp = isRegExp;
@@ -5772,20 +5789,20 @@ var lodash = { exports: {} };
5772
5789
  }
5773
5790
  }).call(commonjsGlobal);
5774
5791
  })(lodash, lodash.exports);
5775
- const TransformOriginMap = {
5792
+ const transformOriginMap = {
5776
5793
  top: "50% calc(100% + 8px)",
5777
5794
  bottom: "50% -8px",
5778
5795
  left: "calc(100% + 8px)",
5779
5796
  right: "-8px 50%"
5780
5797
  };
5781
5798
  function useTooltip(origin, props) {
5782
- const { position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
5799
+ const { position, mouseEnterDelay, mouseLeaveDelay, enterable, disabled, hideAfter } = toRefs(props);
5783
5800
  const visible = ref(false);
5784
5801
  const isEnter = ref(false);
5785
5802
  const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
5786
5803
  const placement = ref(positionArr.value[0]);
5787
5804
  const overlayStyles = computed(() => ({
5788
- transformOrigin: TransformOriginMap[placement.value]
5805
+ transformOrigin: transformOriginMap[placement.value]
5789
5806
  }));
5790
5807
  const enter = lodash.exports.debounce(() => {
5791
5808
  isEnter.value && (visible.value = true);
@@ -5794,6 +5811,9 @@ function useTooltip(origin, props) {
5794
5811
  !isEnter.value && (visible.value = false);
5795
5812
  }, mouseLeaveDelay.value);
5796
5813
  const onMouseenter = () => {
5814
+ if (disabled.value) {
5815
+ return;
5816
+ }
5797
5817
  isEnter.value = true;
5798
5818
  enter();
5799
5819
  };
@@ -5804,11 +5824,38 @@ function useTooltip(origin, props) {
5804
5824
  const onPositionChange = (pos) => {
5805
5825
  placement.value = pos;
5806
5826
  };
5827
+ const quickLeave = () => {
5828
+ isEnter.value = false;
5829
+ visible.value = false;
5830
+ };
5831
+ const onMouseenterOverlay = () => {
5832
+ if (!enterable.value) {
5833
+ quickLeave();
5834
+ } else {
5835
+ onMouseenter();
5836
+ }
5837
+ };
5807
5838
  onMounted(() => {
5808
5839
  origin.value.addEventListener("mouseenter", onMouseenter);
5809
5840
  origin.value.addEventListener("mouseleave", onMouseleave);
5810
5841
  });
5811
- return { visible, placement, positionArr, overlayStyles, onPositionChange, onMouseenter, onMouseleave };
5842
+ let timer;
5843
+ watch(visible, (newVal) => {
5844
+ if (newVal && hideAfter.value) {
5845
+ timer && clearTimeout(timer);
5846
+ timer = setTimeout(quickLeave, hideAfter.value);
5847
+ }
5848
+ });
5849
+ return {
5850
+ visible,
5851
+ placement,
5852
+ positionArr,
5853
+ overlayStyles,
5854
+ onPositionChange,
5855
+ onMouseenter,
5856
+ onMouseleave,
5857
+ onMouseenterOverlay
5858
+ };
5812
5859
  }
5813
5860
  var tooltip = "";
5814
5861
  var DToolTip = defineComponent({
@@ -5829,42 +5876,45 @@ var DToolTip = defineComponent({
5829
5876
  positionArr,
5830
5877
  overlayStyles,
5831
5878
  onPositionChange,
5832
- onMouseenter,
5833
- onMouseleave
5879
+ onMouseleave,
5880
+ onMouseenterOverlay
5834
5881
  } = useTooltip(origin, props);
5835
- const ns = useNamespace("tooltip");
5836
- return () => {
5837
- var _a;
5838
- return createVNode(Fragment, null, [createVNode("div", {
5839
- "ref": origin,
5840
- "class": ns.e("reference")
5841
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode(Teleport, {
5842
- "to": "body"
5882
+ const ns2 = useNamespace("tooltip");
5883
+ const className = computed(() => {
5884
+ return [ns2.b(), ns2.m(placement.value)].join(" ");
5885
+ });
5886
+ provide(POPPER_TRIGGER_TOKEN, origin);
5887
+ return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
5888
+ default: () => {
5889
+ var _a;
5890
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
5891
+ }
5892
+ }), createVNode(Teleport, {
5893
+ "to": "body"
5894
+ }, {
5895
+ default: () => [createVNode(Transition, {
5896
+ "name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
5843
5897
  }, {
5844
- default: () => [createVNode(Transition, {
5845
- "name": showAnimation.value ? `devui-tooltip-fade-${placement.value}` : ""
5898
+ default: () => [createVNode(FlexibleOverlay, {
5899
+ "modelValue": visible.value,
5900
+ "onUpdate:modelValue": ($event) => visible.value = $event,
5901
+ "ref": tooltipRef,
5902
+ "class": className.value,
5903
+ "origin": origin.value,
5904
+ "position": positionArr.value,
5905
+ "offset": 6,
5906
+ "show-arrow": true,
5907
+ "style": overlayStyles.value,
5908
+ "onPositionChange": onPositionChange,
5909
+ "onMouseenter": onMouseenterOverlay,
5910
+ "onMouseleave": onMouseleave
5846
5911
  }, {
5847
- default: () => [createVNode(FlexibleOverlay, {
5848
- "modelValue": visible.value,
5849
- "onUpdate:modelValue": ($event) => visible.value = $event,
5850
- "ref": tooltipRef,
5851
- "class": ns.b(),
5852
- "origin": origin.value,
5853
- "position": positionArr.value,
5854
- "offset": 6,
5855
- "show-arrow": true,
5856
- "style": overlayStyles.value,
5857
- "onPositionChange": onPositionChange,
5858
- "onMouseenter": onMouseenter,
5859
- "onMouseleave": onMouseleave
5860
- }, {
5861
- default: () => [createVNode("span", {
5862
- "innerHTML": content.value
5863
- }, null)]
5864
- })]
5912
+ default: () => [createVNode("span", {
5913
+ "innerHTML": content.value
5914
+ }, null)]
5865
5915
  })]
5866
- })]);
5867
- };
5916
+ })]
5917
+ })]);
5868
5918
  }
5869
5919
  });
5870
5920
  function setStyle(element, style) {
@@ -5977,6 +6027,175 @@ const splitterBarProps = {
5977
6027
  }
5978
6028
  };
5979
6029
  var splitterBar = "";
6030
+ function deepAssign(...objects) {
6031
+ const isObject2 = (obj) => obj && typeof obj === "object";
6032
+ return objects.reduce((prev, from) => {
6033
+ Object.keys(from).forEach((key) => {
6034
+ const pVal = prev[key];
6035
+ const oVal = from[key];
6036
+ if (Array.isArray(pVal) && Array.isArray(oVal)) {
6037
+ prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
6038
+ } else if (isObject2(pVal) && isObject2(oVal)) {
6039
+ prev[key] = deepAssign(pVal, oVal);
6040
+ } else {
6041
+ prev[key] = oVal;
6042
+ }
6043
+ });
6044
+ return prev;
6045
+ }, {});
6046
+ }
6047
+ var zhCN = {
6048
+ pagination: {
6049
+ totalItemText: "\u6240\u6709\u6761\u76EE",
6050
+ goToText: "\u8DF3\u81F3",
6051
+ perPage: "\u6761/\u9875"
6052
+ },
6053
+ accordion: {
6054
+ loading: "\u52A0\u8F7D\u4E2D",
6055
+ noData: "\u6CA1\u6709\u6570\u636E"
6056
+ },
6057
+ autoCompleteDropdown: {
6058
+ latestInput: "\u6700\u8FD1\u8F93\u5165"
6059
+ },
6060
+ cascaderList: {
6061
+ noData: "\u6CA1\u6709\u6570\u636E"
6062
+ },
6063
+ colorPicker: {
6064
+ foundationPanel: "\u57FA\u7840\u9762\u677F",
6065
+ advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
6066
+ },
6067
+ datePickerPro: {
6068
+ ok: "\u786E\u5B9A",
6069
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
6070
+ month1: "1\u6708",
6071
+ month2: "2\u6708",
6072
+ month3: "3\u6708",
6073
+ month4: "4\u6708",
6074
+ month5: "5\u6708",
6075
+ month6: "6\u6708",
6076
+ month7: "7\u6708",
6077
+ month8: "8\u6708",
6078
+ month9: "9\u6708",
6079
+ month10: "10\u6708",
6080
+ month11: "11\u6708",
6081
+ month12: "12\u6708",
6082
+ year: "\u5E74",
6083
+ startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
6084
+ endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
6085
+ getWeekDays() {
6086
+ return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
6087
+ },
6088
+ getTimeArr() {
6089
+ return ["\u65F6", "\u5206", "\u79D2"];
6090
+ },
6091
+ getYearMonthStr(year, month) {
6092
+ return `${year}\u5E74${month}\u6708`;
6093
+ }
6094
+ },
6095
+ editableSelect: {
6096
+ noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
6097
+ noData: "\u6CA1\u6709\u6570\u636E"
6098
+ },
6099
+ input: {
6100
+ placeholder: "\u8BF7\u8F93\u5165"
6101
+ },
6102
+ splitterBar: {
6103
+ collapse: "\u6536\u8D77",
6104
+ expand: "\u5C55\u5F00"
6105
+ },
6106
+ stepsGuide: {
6107
+ previous: "\u4E0A\u4E00\u6B65",
6108
+ continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
6109
+ ok: "\u6211\u77E5\u9053\u5566"
6110
+ },
6111
+ table: {
6112
+ selectAll: "\u5168\u9009",
6113
+ ok: "\u786E\u5B9A"
6114
+ },
6115
+ timePopup: {
6116
+ ok: "\u786E\u5B9A"
6117
+ },
6118
+ transfer: {
6119
+ unit: "\u9879",
6120
+ panelUnit: "\u9879",
6121
+ headerUnit: "\u9879",
6122
+ noData: "\u6682\u65E0\u6570\u636E",
6123
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
6124
+ },
6125
+ tree: {
6126
+ loading: "\u52A0\u8F7D\u4E2D",
6127
+ newNode: "\u65B0\u8282\u70B9",
6128
+ selectPlaceholder: "\u8BF7\u9009\u62E9"
6129
+ },
6130
+ upload: {
6131
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
6132
+ getExistSameNameFilesMsg(sameNames) {
6133
+ return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
6134
+ },
6135
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
6136
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
6137
+ },
6138
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
6139
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
6140
+ },
6141
+ getNotAllowedFileTypeMsg(filename, scope) {
6142
+ return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
6143
+ }
6144
+ },
6145
+ search: {
6146
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
6147
+ },
6148
+ select: {
6149
+ placeholder: "\u8BF7\u9009\u62E9",
6150
+ noDataText: "\u65E0\u6570\u636E",
6151
+ noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
6152
+ loadingText: "\u52A0\u8F7D\u4E2D..."
6153
+ },
6154
+ tagInput: {
6155
+ maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
6156
+ },
6157
+ timeSelect: {
6158
+ placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
6159
+ }
6160
+ };
6161
+ const lang = ref("zh-CN");
6162
+ let langMessages = reactive({
6163
+ [lang.value]: zhCN
6164
+ });
6165
+ const Locale = {
6166
+ messages() {
6167
+ return langMessages[lang.value];
6168
+ },
6169
+ lang() {
6170
+ return lang.value;
6171
+ },
6172
+ use(newLang, newMessages) {
6173
+ lang.value = newLang;
6174
+ this.add({ [newLang]: newMessages });
6175
+ },
6176
+ add(newMessages = {}) {
6177
+ langMessages = deepAssign(langMessages, newMessages);
6178
+ }
6179
+ };
6180
+ const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
6181
+ function get(object, path) {
6182
+ const keys = path.split(".");
6183
+ let result = object;
6184
+ keys.forEach((key) => {
6185
+ var _a;
6186
+ result = (_a = result[key]) != null ? _a : "";
6187
+ });
6188
+ return result;
6189
+ }
6190
+ function createI18nTranslate(name, app, newPrefix) {
6191
+ const prefix = newPrefix || camelize(name) + ".";
6192
+ return (path) => {
6193
+ var _a;
6194
+ const messages = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
6195
+ const message = get(messages, prefix + path) || get(messages, path);
6196
+ return message;
6197
+ };
6198
+ }
5980
6199
  var DSplitterBar = defineComponent({
5981
6200
  name: "DSplitterBar",
5982
6201
  components: {
@@ -5984,10 +6203,12 @@ var DSplitterBar = defineComponent({
5984
6203
  },
5985
6204
  props: splitterBarProps,
5986
6205
  setup(props) {
5987
- const ns = useNamespace("splitter");
6206
+ const app = getCurrentInstance();
6207
+ const t = createI18nTranslate("DSplitterBar", app);
6208
+ const ns2 = useNamespace("splitter");
5988
6209
  const store = inject("splitterStore");
5989
6210
  const state = reactive({
5990
- wrapperClass: `${ns.e("bar")} ${ns.em("bar", props.orientation)} `
6211
+ wrapperClass: `${ns2.e("bar")} ${ns2.em("bar", props.orientation)} `
5991
6212
  });
5992
6213
  const domRef = ref();
5993
6214
  watch([() => props.splitBarSize, domRef], ([curSplitBarSize, ele]) => {
@@ -6031,7 +6252,7 @@ var DSplitterBar = defineComponent({
6031
6252
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
6032
6253
  const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
6033
6254
  return {
6034
- [ns.e("collapse")]: isCollapsible,
6255
+ [ns2.e("collapse")]: isCollapsible,
6035
6256
  collapsed: isCollapsed,
6036
6257
  hidden: isNearPaneCollapsed
6037
6258
  };
@@ -6164,14 +6385,14 @@ var DSplitterBar = defineComponent({
6164
6385
  const renderCollapsedTip = () => {
6165
6386
  var _a, _b, _c, _d;
6166
6387
  if (!props || props.index === void 0) {
6167
- return "\u6536\u8D77";
6388
+ return t("collapse");
6168
6389
  }
6169
6390
  const {
6170
6391
  pane,
6171
6392
  nearPane
6172
6393
  } = queryPanes(props.index, props.index + 1);
6173
6394
  const isCollapsed = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsed) || ((_d = (_c = nearPane == null ? void 0 : nearPane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed);
6174
- return isCollapsed ? "\u5C55\u5F00" : "\u6536\u8D77";
6395
+ return isCollapsed ? t("expand") : t("collapse");
6175
6396
  };
6176
6397
  return () => {
6177
6398
  return withDirectives(createVNode("div", {
@@ -6339,7 +6560,7 @@ var Splitter = defineComponent({
6339
6560
  const state = reactive({
6340
6561
  panes: []
6341
6562
  });
6342
- const ns = useNamespace("splitter");
6563
+ const ns2 = useNamespace("splitter");
6343
6564
  state.panes = ((_b = (_a = ctx.slots).DSplitterPane) == null ? void 0 : _b.call(_a)) || [];
6344
6565
  store.setPanes({
6345
6566
  panes: state.panes
@@ -6380,7 +6601,7 @@ var Splitter = defineComponent({
6380
6601
  orientation,
6381
6602
  showCollapseButton
6382
6603
  } = props;
6383
- const wrapperClass = [ns.b(), ns.m(orientation)];
6604
+ const wrapperClass = [ns2.b(), ns2.m(orientation)];
6384
6605
  return createVNode("div", {
6385
6606
  "class": wrapperClass,
6386
6607
  "ref": domRef
@@ -6444,7 +6665,7 @@ var SplitterPane = defineComponent({
6444
6665
  const store = inject("splitterStore");
6445
6666
  const domRef = ref();
6446
6667
  const orderRef = ref();
6447
- const ns = useNamespace("splitter");
6668
+ const ns2 = useNamespace("splitter");
6448
6669
  watch([orderRef, domRef], ([order, ele]) => {
6449
6670
  if (!ele) {
6450
6671
  return;
@@ -6458,7 +6679,7 @@ var SplitterPane = defineComponent({
6458
6679
  return;
6459
6680
  }
6460
6681
  ele.style.flexBasis = curSize;
6461
- const paneFixedClass = ns.em("pane", "fixed");
6682
+ const paneFixedClass = ns2.em("pane", "fixed");
6462
6683
  if (curSize) {
6463
6684
  addClass(ele, paneFixedClass);
6464
6685
  } else {
@@ -6506,7 +6727,7 @@ var SplitterPane = defineComponent({
6506
6727
  if (!ele) {
6507
6728
  return;
6508
6729
  }
6509
- const paneHiddenClass = ns.em("pane", "hidden");
6730
+ const paneHiddenClass = ns2.em("pane", "hidden");
6510
6731
  if (!collapsed) {
6511
6732
  removeClass(ele, paneHiddenClass);
6512
6733
  } else {
@@ -6530,7 +6751,7 @@ var SplitterPane = defineComponent({
6530
6751
  if (!(ele instanceof HTMLElement)) {
6531
6752
  return;
6532
6753
  }
6533
- const flexGrowClass = ns.em("pane", "grow");
6754
+ const flexGrowClass = ns2.em("pane", "grow");
6534
6755
  if (hasClass(ele, flexGrowClass)) {
6535
6756
  removeClass(ele, flexGrowClass);
6536
6757
  } else if (collapsed) {
@@ -6545,7 +6766,7 @@ var SplitterPane = defineComponent({
6545
6766
  return () => {
6546
6767
  var _a;
6547
6768
  return createVNode("div", {
6548
- "class": ns.e("pane"),
6769
+ "class": ns2.e("pane"),
6549
6770
  "ref": domRef
6550
6771
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
6551
6772
  };