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

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 (352) hide show
  1. package/README.md +70 -121
  2. package/alert/index.es.js +46 -15
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8204 -296
  6. package/auto-complete/index.umd.js +29 -1
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +153 -146
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +36 -5
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5727 -111
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +63 -35
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8068 -255
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{accordion → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +213 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{anchor → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +59 -19
  29. package/countdown/index.umd.js +1 -1
  30. package/{anchor → date-picker-pro}/index.d.ts +0 -0
  31. package/date-picker-pro/index.es.js +10856 -0
  32. package/date-picker-pro/index.umd.js +27 -0
  33. package/{breadcrumb → date-picker-pro}/package.json +1 -1
  34. package/date-picker-pro/style.css +1 -0
  35. package/drawer/index.es.js +31 -4
  36. package/drawer/index.umd.js +1 -1
  37. package/drawer/style.css +1 -1
  38. package/dropdown/index.es.js +210 -149
  39. package/dropdown/index.umd.js +1 -1
  40. package/dropdown/style.css +1 -1
  41. package/editable-select/index.es.js +569 -159
  42. package/editable-select/index.umd.js +1 -1
  43. package/editable-select/style.css +1 -1
  44. package/form/index.es.js +1048 -1187
  45. package/form/index.umd.js +15 -15
  46. package/form/style.css +1 -1
  47. package/fullscreen/index.es.js +29 -5
  48. package/fullscreen/index.umd.js +1 -1
  49. package/fullscreen/style.css +1 -1
  50. package/grid/index.es.js +101 -86
  51. package/grid/index.umd.js +1 -1
  52. package/grid/style.css +1 -1
  53. package/icon/index.es.js +183 -23
  54. package/icon/index.umd.js +1 -1
  55. package/icon/style.css +1 -0
  56. package/image-preview/index.es.js +53 -30
  57. package/image-preview/index.umd.js +1 -1
  58. package/image-preview/style.css +1 -1
  59. package/input/index.es.js +8101 -144
  60. package/input/index.umd.js +27 -1
  61. package/input/style.css +1 -1
  62. package/input-number/index.es.js +274 -177
  63. package/input-number/index.umd.js +1 -1
  64. package/input-number/style.css +1 -1
  65. package/layout/index.es.js +40 -25
  66. package/layout/index.umd.js +1 -1
  67. package/layout/style.css +1 -1
  68. package/loading/index.es.js +74 -35
  69. package/loading/index.umd.js +1 -1
  70. package/loading/style.css +1 -1
  71. package/modal/index.es.js +375 -171
  72. package/modal/index.umd.js +1 -1
  73. package/modal/style.css +1 -1
  74. package/notification/index.es.js +293 -40
  75. package/notification/index.umd.js +1 -1
  76. package/notification/style.css +1 -1
  77. package/nuxt/components/ButtonGroup.js +3 -0
  78. package/nuxt/components/CheckboxButton.js +3 -0
  79. package/nuxt/components/CheckboxGroup.js +3 -0
  80. package/nuxt/components/Collapse.js +3 -0
  81. package/nuxt/components/CollapseItem.js +3 -0
  82. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  83. package/nuxt/components/DatePickerPro.js +3 -0
  84. package/nuxt/components/DropdownPropsKey.js +3 -0
  85. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  86. package/nuxt/components/FORM_TOKEN.js +3 -0
  87. package/nuxt/components/Icon.js +1 -0
  88. package/nuxt/components/IconGroup.js +3 -0
  89. package/nuxt/components/LABEL_DATA.js +3 -0
  90. package/nuxt/components/LoadingOptions.js +3 -0
  91. package/nuxt/components/Option.js +3 -0
  92. package/nuxt/components/OptionGroup.js +3 -0
  93. package/nuxt/components/RadioButton.js +3 -0
  94. package/nuxt/components/Step.js +3 -0
  95. package/nuxt/components/Steps.js +3 -0
  96. package/nuxt/components/TABLE_TOKEN.js +3 -0
  97. package/nuxt/components/Tab.js +3 -0
  98. package/nuxt/components/TimeSelect.js +3 -0
  99. package/nuxt/components/autoCompleteProps.js +3 -0
  100. package/nuxt/components/avatarProps.js +3 -0
  101. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  102. package/nuxt/components/buttonGroupProps.js +3 -0
  103. package/nuxt/components/cardProps.js +3 -0
  104. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  105. package/nuxt/components/checkboxGroupProps.js +3 -0
  106. package/nuxt/components/checkboxProps.js +3 -0
  107. package/nuxt/components/colProps.js +3 -0
  108. package/nuxt/components/colPropsBaseClass.js +3 -0
  109. package/nuxt/components/colPropsBaseStyle.js +3 -0
  110. package/nuxt/components/collapseItemProps.js +3 -0
  111. package/nuxt/components/collapseProps.js +3 -0
  112. package/nuxt/components/countdownProps.js +3 -0
  113. package/nuxt/components/datePickerProCommonProps.js +3 -0
  114. package/nuxt/components/datePickerProPanelProps.js +3 -0
  115. package/nuxt/components/datePickerProProps.js +3 -0
  116. package/nuxt/components/editableSelectProps.js +3 -0
  117. package/nuxt/components/formItemProps.js +3 -0
  118. package/nuxt/components/formProps.js +3 -0
  119. package/nuxt/components/iconProps.js +1 -0
  120. package/nuxt/components/imagePreviewProps.js +3 -0
  121. package/nuxt/components/inputProps.js +3 -0
  122. package/nuxt/components/loadingProps.js +3 -0
  123. package/nuxt/components/modalProps.js +3 -0
  124. package/nuxt/components/progressProps.js +3 -0
  125. package/nuxt/components/rateProps.js +3 -0
  126. package/nuxt/components/resultProps.js +3 -0
  127. package/nuxt/components/rowProps.js +3 -0
  128. package/nuxt/components/screenSizes.js +3 -0
  129. package/nuxt/components/skeletonProps.js +3 -0
  130. package/nuxt/components/sliderProps.js +3 -0
  131. package/nuxt/components/splitterProps.js +3 -0
  132. package/nuxt/components/statisticProps.js +3 -0
  133. package/nuxt/components/stepProps.js +3 -0
  134. package/nuxt/components/stepsProps.js +3 -0
  135. package/nuxt/components/svgIconProps.js +3 -0
  136. package/nuxt/components/switchProps.js +3 -0
  137. package/nuxt/components/tableProps.js +3 -0
  138. package/nuxt/components/tabsProps.js +3 -0
  139. package/nuxt/components/tagProps.js +3 -0
  140. package/nuxt/components/textareaProps.js +3 -0
  141. package/nuxt/components/timeAxisProps.js +3 -0
  142. package/nuxt/components/timerPickerPanelProps.js +3 -0
  143. package/nuxt/components/treeProps.js +3 -0
  144. package/overlay/index.es.js +104 -133
  145. package/overlay/index.umd.js +1 -1
  146. package/overlay/style.css +1 -1
  147. package/package.json +4 -2
  148. package/pagination/index.es.js +171 -141
  149. package/pagination/index.umd.js +1 -1
  150. package/pagination/style.css +1 -1
  151. package/panel/style.css +1 -1
  152. package/popover/index.es.js +294 -230
  153. package/popover/index.umd.js +15 -15
  154. package/popover/style.css +1 -1
  155. package/progress/index.es.js +110 -56
  156. package/progress/index.umd.js +3 -3
  157. package/progress/style.css +1 -1
  158. package/radio/index.es.js +7967 -146
  159. package/radio/index.umd.js +27 -1
  160. package/radio/style.css +1 -1
  161. package/rate/index.es.js +77 -55
  162. package/rate/index.umd.js +1 -1
  163. package/rate/style.css +1 -1
  164. package/result/index.es.js +170 -27
  165. package/result/index.umd.js +1 -1
  166. package/result/style.css +1 -1
  167. package/ripple/index.es.js +43 -42
  168. package/ripple/index.umd.js +1 -1
  169. package/search/index.es.js +3660 -1097
  170. package/search/index.umd.js +18 -18
  171. package/search/style.css +1 -1
  172. package/select/index.es.js +8998 -487
  173. package/select/index.umd.js +27 -1
  174. package/select/style.css +1 -1
  175. package/skeleton/index.es.js +46 -24
  176. package/skeleton/index.umd.js +1 -1
  177. package/skeleton/style.css +1 -1
  178. package/slider/index.es.js +144 -138
  179. package/slider/index.umd.js +1 -1
  180. package/slider/style.css +1 -1
  181. package/splitter/index.es.js +468 -340
  182. package/splitter/index.umd.js +16 -16
  183. package/splitter/style.css +1 -1
  184. package/statistic/index.es.js +41 -34
  185. package/statistic/index.umd.js +1 -1
  186. package/statistic/style.css +1 -1
  187. package/status/index.es.js +26 -2
  188. package/status/index.umd.js +1 -1
  189. package/status/style.css +1 -1
  190. package/{back-top → steps}/index.d.ts +0 -0
  191. package/steps/index.es.js +385 -0
  192. package/steps/index.umd.js +1 -0
  193. package/{gantt → steps}/package.json +1 -1
  194. package/steps/style.css +1 -0
  195. package/style.css +1 -1
  196. package/switch/index.es.js +7802 -64
  197. package/switch/index.umd.js +27 -1
  198. package/switch/style.css +1 -1
  199. package/table/index.es.js +10315 -1147
  200. package/table/index.umd.js +27 -1
  201. package/table/style.css +1 -1
  202. package/tabs/index.es.js +345 -142
  203. package/tabs/index.umd.js +1 -1
  204. package/tabs/style.css +1 -1
  205. package/tag/index.es.js +47 -23
  206. package/tag/index.umd.js +1 -1
  207. package/tag/style.css +1 -1
  208. package/textarea/index.es.js +7921 -83
  209. package/textarea/index.umd.js +35 -1
  210. package/textarea/style.css +1 -1
  211. package/time-picker/index.es.js +8704 -559
  212. package/time-picker/index.umd.js +27 -1
  213. package/time-picker/style.css +1 -1
  214. package/{breadcrumb → time-select}/index.d.ts +0 -0
  215. package/{color-picker → time-select}/index.es.js +4116 -2914
  216. package/time-select/index.umd.js +27 -0
  217. package/{back-top → time-select}/package.json +1 -1
  218. package/time-select/style.css +1 -0
  219. package/timeline/index.es.js +177 -37
  220. package/timeline/index.umd.js +1 -1
  221. package/timeline/style.css +1 -1
  222. package/tooltip/index.es.js +286 -221
  223. package/tooltip/index.umd.js +15 -15
  224. package/tooltip/style.css +1 -1
  225. package/tree/index.es.js +5325 -1855
  226. package/tree/index.umd.js +18 -18
  227. package/tree/style.css +1 -1
  228. package/upload/index.es.js +456 -133
  229. package/upload/index.umd.js +1 -1
  230. package/upload/style.css +1 -1
  231. package/vue-devui.es.js +14986 -16343
  232. package/vue-devui.umd.js +30 -20
  233. package/accordion/index.es.js +0 -723
  234. package/accordion/index.umd.js +0 -1
  235. package/accordion/package.json +0 -7
  236. package/accordion/style.css +0 -1
  237. package/anchor/index.es.js +0 -263
  238. package/anchor/index.umd.js +0 -1
  239. package/anchor/style.css +0 -1
  240. package/back-top/index.es.js +0 -130
  241. package/back-top/index.umd.js +0 -1
  242. package/back-top/style.css +0 -1
  243. package/breadcrumb/index.es.js +0 -128
  244. package/breadcrumb/index.umd.js +0 -1
  245. package/breadcrumb/style.css +0 -1
  246. package/carousel/index.d.ts +0 -7
  247. package/carousel/index.es.js +0 -314
  248. package/carousel/index.umd.js +0 -1
  249. package/carousel/package.json +0 -7
  250. package/carousel/style.css +0 -1
  251. package/cascader/index.d.ts +0 -7
  252. package/cascader/index.es.js +0 -5971
  253. package/cascader/index.umd.js +0 -27
  254. package/cascader/package.json +0 -7
  255. package/cascader/style.css +0 -1
  256. package/color-picker/index.d.ts +0 -7
  257. package/color-picker/index.umd.js +0 -27
  258. package/color-picker/package.json +0 -7
  259. package/color-picker/style.css +0 -1
  260. package/comment/index.d.ts +0 -7
  261. package/comment/index.es.js +0 -86
  262. package/comment/index.umd.js +0 -1
  263. package/comment/package.json +0 -7
  264. package/comment/style.css +0 -1
  265. package/date-picker/index.d.ts +0 -7
  266. package/date-picker/index.es.js +0 -1154
  267. package/date-picker/index.umd.js +0 -1
  268. package/date-picker/package.json +0 -7
  269. package/date-picker/style.css +0 -1
  270. package/dragdrop/index.d.ts +0 -7
  271. package/dragdrop/index.es.js +0 -157
  272. package/dragdrop/index.umd.js +0 -1
  273. package/dragdrop/package.json +0 -7
  274. package/gantt/index.d.ts +0 -7
  275. package/gantt/index.es.js +0 -523
  276. package/gantt/index.umd.js +0 -1
  277. package/gantt/style.css +0 -1
  278. package/input-icon/index.d.ts +0 -7
  279. package/input-icon/index.es.js +0 -332
  280. package/input-icon/index.umd.js +0 -1
  281. package/input-icon/package.json +0 -7
  282. package/input-icon/style.css +0 -1
  283. package/list/index.d.ts +0 -7
  284. package/list/index.es.js +0 -39
  285. package/list/index.umd.js +0 -1
  286. package/list/package.json +0 -7
  287. package/list/style.css +0 -1
  288. package/nav-sprite/index.d.ts +0 -7
  289. package/nav-sprite/index.es.js +0 -68
  290. package/nav-sprite/index.umd.js +0 -1
  291. package/nav-sprite/package.json +0 -7
  292. package/nuxt/components/Accordion.js +0 -3
  293. package/nuxt/components/Anchor.js +0 -3
  294. package/nuxt/components/BackTop.js +0 -3
  295. package/nuxt/components/Breadcrumb.js +0 -3
  296. package/nuxt/components/Carousel.js +0 -3
  297. package/nuxt/components/CarouselItem.js +0 -3
  298. package/nuxt/components/Cascader.js +0 -3
  299. package/nuxt/components/ColorPicker.js +0 -3
  300. package/nuxt/components/Comment.js +0 -3
  301. package/nuxt/components/DatePicker.js +0 -3
  302. package/nuxt/components/FormControl.js +0 -3
  303. package/nuxt/components/FormLabel.js +0 -3
  304. package/nuxt/components/Gantt.js +0 -3
  305. package/nuxt/components/InputIcon.js +0 -3
  306. package/nuxt/components/List.js +0 -3
  307. package/nuxt/components/ListItem.js +0 -3
  308. package/nuxt/components/NavSprite.js +0 -2
  309. package/nuxt/components/QuadrantDiagram.js +0 -3
  310. package/nuxt/components/ReadTip.js +0 -3
  311. package/nuxt/components/StepsGuide.js +0 -3
  312. package/nuxt/components/StickSlider.js +0 -3
  313. package/nuxt/components/Sticky.js +0 -2
  314. package/nuxt/components/TagInput.js +0 -3
  315. package/nuxt/components/Transfer.js +0 -3
  316. package/nuxt/components/TreeSelect.js +0 -3
  317. package/nuxt/components/overlayEmits.js +0 -3
  318. package/nuxt/components/overlayProps.js +0 -3
  319. package/quadrant-diagram/index.d.ts +0 -7
  320. package/quadrant-diagram/index.es.js +0 -5728
  321. package/quadrant-diagram/index.umd.js +0 -27
  322. package/quadrant-diagram/package.json +0 -7
  323. package/quadrant-diagram/style.css +0 -1
  324. package/read-tip/index.d.ts +0 -7
  325. package/read-tip/index.es.js +0 -261
  326. package/read-tip/index.umd.js +0 -1
  327. package/read-tip/package.json +0 -7
  328. package/read-tip/style.css +0 -1
  329. package/steps-guide/index.d.ts +0 -7
  330. package/steps-guide/index.es.js +0 -242
  331. package/steps-guide/index.umd.js +0 -1
  332. package/steps-guide/package.json +0 -7
  333. package/steps-guide/style.css +0 -1
  334. package/sticky/index.d.ts +0 -7
  335. package/sticky/index.es.js +0 -197
  336. package/sticky/index.umd.js +0 -1
  337. package/sticky/package.json +0 -7
  338. package/tag-input/index.d.ts +0 -7
  339. package/tag-input/index.es.js +0 -331
  340. package/tag-input/index.umd.js +0 -1
  341. package/tag-input/package.json +0 -7
  342. package/tag-input/style.css +0 -1
  343. package/transfer/index.d.ts +0 -7
  344. package/transfer/index.es.js +0 -7615
  345. package/transfer/index.umd.js +0 -27
  346. package/transfer/package.json +0 -7
  347. package/transfer/style.css +0 -1
  348. package/tree-select/index.d.ts +0 -7
  349. package/tree-select/index.es.js +0 -627
  350. package/tree-select/index.umd.js +0 -1
  351. package/tree-select/package.json +0 -7
  352. package/tree-select/style.css +0 -1
@@ -0,0 +1,213 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, provide, reactive, toRefs, createVNode, shallowRef, inject, computed, onMounted, Transition } from "vue";
21
+ const SELECT_TOKEN = Symbol("dCollapse");
22
+ const collapseProps = {
23
+ modelValue: {
24
+ type: [String, Number, Array],
25
+ default: "",
26
+ required: true
27
+ },
28
+ accordion: {
29
+ type: Boolean,
30
+ default: false
31
+ }
32
+ };
33
+ const collapseItemProps = {
34
+ name: {
35
+ type: [String, Number],
36
+ default: "",
37
+ required: true
38
+ },
39
+ title: {
40
+ type: String,
41
+ default: ""
42
+ },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: false
46
+ }
47
+ };
48
+ function createBem(namespace, element, modifier) {
49
+ let cls = namespace;
50
+ if (element) {
51
+ cls += `__${element}`;
52
+ }
53
+ if (modifier) {
54
+ cls += `--${modifier}`;
55
+ }
56
+ return cls;
57
+ }
58
+ function useNamespace(block, needDot = false) {
59
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
60
+ const b = () => createBem(namespace);
61
+ const e = (element) => element ? createBem(namespace, element) : "";
62
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
63
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
64
+ return {
65
+ b,
66
+ e,
67
+ m,
68
+ em
69
+ };
70
+ }
71
+ var collapse = "";
72
+ var Collapse = defineComponent({
73
+ name: "DCollapse",
74
+ props: collapseProps,
75
+ emits: ["change", "update:modelValue"],
76
+ setup(props, ctx) {
77
+ const ns = useNamespace("collapse");
78
+ const scrollbarNs = useNamespace("scrollbar");
79
+ const getLists = (data) => {
80
+ if (!data && data !== 0) {
81
+ return [];
82
+ }
83
+ return Array.isArray(data) ? data : [data];
84
+ };
85
+ const collapseItemClick = (name) => {
86
+ const activeLists = [...getLists(props.modelValue)];
87
+ const itemIndex = activeLists.indexOf(name);
88
+ if (props.accordion) {
89
+ let activeName = name;
90
+ if ((activeLists[0] || activeLists[0] === 0) && activeLists[0] === name) {
91
+ activeName = "";
92
+ }
93
+ ctx.emit("update:modelValue", activeName);
94
+ ctx.emit("change", activeName);
95
+ } else {
96
+ if (itemIndex > -1) {
97
+ activeLists.splice(itemIndex, 1);
98
+ } else {
99
+ activeLists.push(name);
100
+ }
101
+ ctx.emit("update:modelValue", activeLists);
102
+ ctx.emit("change", activeLists);
103
+ }
104
+ };
105
+ provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
106
+ collapseItemClick
107
+ })));
108
+ return () => {
109
+ var _a, _b;
110
+ return createVNode("div", {
111
+ "class": [ns.b(), scrollbarNs.b()]
112
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
113
+ };
114
+ }
115
+ });
116
+ const OpenIcon = () => {
117
+ const svgProps = {
118
+ width: "1em",
119
+ height: "1em",
120
+ viewBox: "0 0 16 16",
121
+ version: "1.1",
122
+ xmlns: "http://www.w3.org/2000/svg",
123
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
124
+ };
125
+ return createVNode("svg", svgProps, [createVNode("g", {
126
+ "stroke": "none",
127
+ "stroke-width": "1",
128
+ "fill": "none",
129
+ "fill-rule": "evenodd"
130
+ }, [createVNode("path", {
131
+ "d": "M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z",
132
+ "fill-rule": "nonzero"
133
+ }, null)])]);
134
+ };
135
+ var CollapseItem = defineComponent({
136
+ name: "DCollapseItem",
137
+ props: collapseItemProps,
138
+ setup(props, ctx) {
139
+ const ns = useNamespace("collapse");
140
+ const transitionNs = useNamespace("collapse-transition");
141
+ const collapseContent = shallowRef();
142
+ const collapse2 = inject(SELECT_TOKEN, null);
143
+ const isOpen = computed(() => {
144
+ if (props.disabled) {
145
+ return false;
146
+ }
147
+ if (Array.isArray(collapse2 == null ? void 0 : collapse2.modelValue)) {
148
+ return Boolean(collapse2 == null ? void 0 : collapse2.modelValue.length) && (collapse2 == null ? void 0 : collapse2.modelValue.includes(props.name));
149
+ } else {
150
+ return Boolean(collapse2 == null ? void 0 : collapse2.modelValue) && (collapse2 == null ? void 0 : collapse2.modelValue) === props.name;
151
+ }
152
+ });
153
+ const handlerTitleClick = (e) => {
154
+ e.preventDefault();
155
+ e.stopPropagation();
156
+ if (!props.disabled) {
157
+ collapse2 == null ? void 0 : collapse2.collapseItemClick(props.name);
158
+ }
159
+ };
160
+ onMounted(() => {
161
+ if (collapseContent.value) {
162
+ const dom = collapseContent.value;
163
+ if (isOpen.value) {
164
+ dom.style.height = `${dom.offsetHeight}px`;
165
+ }
166
+ }
167
+ });
168
+ const enter = (element) => {
169
+ const el = element;
170
+ el.style.height = "";
171
+ const height = el.offsetHeight;
172
+ el.style.height = "0px";
173
+ el.offsetHeight;
174
+ el.style.height = `${height}px`;
175
+ };
176
+ const leave = (element) => {
177
+ const el = element;
178
+ el.style.height = "0px";
179
+ };
180
+ return () => {
181
+ return createVNode("div", {
182
+ "class": ns.e("item")
183
+ }, [createVNode("div", {
184
+ "class": [ns.e("item-title"), ns.m("overflow-ellipsis"), isOpen.value && ns.m("open"), props.disabled && ns.em("item", "disabled")],
185
+ "onClick": handlerTitleClick
186
+ }, [ctx.slots.title ? ctx.slots.title() : props.title, createVNode("span", {
187
+ "class": ns.e("open-icon")
188
+ }, [createVNode(OpenIcon, null, null)])]), createVNode(Transition, {
189
+ "name": transitionNs.b(),
190
+ "onEnter": enter,
191
+ "onLeave": leave
192
+ }, {
193
+ default: () => {
194
+ var _a, _b;
195
+ return [isOpen.value && createVNode("div", {
196
+ "ref": collapseContent,
197
+ "class": ns.e("item-content")
198
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
199
+ }
200
+ })]);
201
+ };
202
+ }
203
+ });
204
+ var index = {
205
+ title: "Collapse \u6298\u53E0\u9762\u677F",
206
+ category: "\u6570\u636E\u5C55\u793A",
207
+ status: "100%",
208
+ install(app) {
209
+ app.component(Collapse.name, Collapse);
210
+ app.component(CollapseItem.name, CollapseItem);
211
+ }
212
+ };
213
+ export { Collapse, CollapseItem, collapseItemProps, collapseProps, index as default };
@@ -0,0 +1 @@
1
+ var S=Object.defineProperty,T=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,e,r)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))B.call(e,r)&&v(t,r,e[r]);if(b)for(var r of b(e))E.call(e,r)&&v(t,r,e[r]);return t},I=(t,e)=>T(t,A(e));(function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t.index={},t.Vue))})(this,function(t,e){"use strict";const r=Symbol("dCollapse"),V={modelValue:{type:[String,Number,Array],default:"",required:!0},accordion:{type:Boolean,default:!1}},N={name:{type:[String,Number],default:"",required:!0},title:{type:String,default:""},disabled:{type:Boolean,default:!1}};function h(l,a,i){let u=l;return a&&(u+=`__${a}`),i&&(u+=`--${i}`),u}function g(l,a=!1){const i=a?`.devui-${l}`:`devui-${l}`;return{b:()=>h(i),e:n=>n?h(i,n):"",m:n=>n?h(i,"",n):"",em:(n,m)=>n&&m?h(i,n,m):""}}var $="",C=e.defineComponent({name:"DCollapse",props:V,emits:["change","update:modelValue"],setup(l,a){const i=g("collapse"),u=g("scrollbar"),f=s=>!s&&s!==0?[]:Array.isArray(s)?s:[s],o=s=>{const n=[...f(l.modelValue)],m=n.indexOf(s);if(l.accordion){let p=s;(n[0]||n[0]===0)&&n[0]===s&&(p=""),a.emit("update:modelValue",p),a.emit("change",p)}else m>-1?n.splice(m,1):n.push(s),a.emit("update:modelValue",n),a.emit("change",n)};return e.provide(r,e.reactive(I(w({},e.toRefs(l)),{collapseItemClick:o}))),()=>{var s,n;return e.createVNode("div",{class:[i.b(),u.b()]},[(n=(s=a.slots).default)==null?void 0:n.call(s)])}}});const k=()=>{const l={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};return e.createVNode("svg",l,[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])};var y=e.defineComponent({name:"DCollapseItem",props:N,setup(l,a){const i=g("collapse"),u=g("collapse-transition"),f=e.shallowRef(),o=e.inject(r,null),s=e.computed(()=>l.disabled?!1:Array.isArray(o==null?void 0:o.modelValue)?Boolean(o==null?void 0:o.modelValue.length)&&(o==null?void 0:o.modelValue.includes(l.name)):Boolean(o==null?void 0:o.modelValue)&&(o==null?void 0:o.modelValue)===l.name),n=d=>{d.preventDefault(),d.stopPropagation(),l.disabled||o==null||o.collapseItemClick(l.name)};e.onMounted(()=>{if(f.value){const d=f.value;s.value&&(d.style.height=`${d.offsetHeight}px`)}});const m=d=>{const c=d;c.style.height="";const P=c.offsetHeight;c.style.height="0px",c.offsetHeight,c.style.height=`${P}px`},p=d=>{const c=d;c.style.height="0px"};return()=>e.createVNode("div",{class:i.e("item")},[e.createVNode("div",{class:[i.e("item-title"),i.m("overflow-ellipsis"),s.value&&i.m("open"),l.disabled&&i.em("item","disabled")],onClick:n},[a.slots.title?a.slots.title():l.title,e.createVNode("span",{class:i.e("open-icon")},[e.createVNode(k,null,null)])]),e.createVNode(e.Transition,{name:u.b(),onEnter:m,onLeave:p},{default:()=>{var d,c;return[s.value&&e.createVNode("div",{ref:f,class:i.e("item-content")},[(c=(d=a.slots).default)==null?void 0:c.call(d)])]}})])}}),L={title:"Collapse \u6298\u53E0\u9762\u677F",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(l){l.component(C.name,C),l.component(y.name,y)}};t.Collapse=C,t.CollapseItem=y,t.collapseItemProps=N,t.collapseProps=V,t.default=L,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "anchor",
2
+ "name": "collapse",
3
3
  "version": "0.0.0",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.es.js",
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.devui-collapse{font-size:var(--devui-font-size, 14px);background:var(--devui-base-bg, #ffffff);width:100%;overflow-y:auto;box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-shadow, rgba(37, 43, 58, .2))}:host{display:block}.devui-collapse__item .devui-collapse--overflow-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.devui-collapse__item-title{display:block;height:45px;width:100%;padding:0 28px 0 20px;font-weight:400;line-height:45px;color:var(--devui-text, #252b3a);background-color:var(--devui-base-bg, #ffffff);cursor:pointer}.devui-collapse__item-title.devui-collapse__item--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-collapse__item-title:not(.devui-collapse__item--disabled):hover{background:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-collapse__item>.devui-collapse__item-title{position:relative}.devui-collapse__item>.devui-collapse__item-title>.devui-collapse__open-icon{display:inline-block;text-indent:0;pointer-events:none;position:absolute;right:10px;top:14px;width:16px;height:16px;line-height:16px;transition:transform ease-out .4s}.devui-collapse__item>.devui-collapse__item-title>.devui-collapse__open-icon svg{width:16px;height:16px}.devui-collapse__item>.devui-collapse__item-title>.devui-collapse__open-icon svg path{fill:var(--devui-text-weak, #575d6c)}.devui-collapse__item>.devui-collapse__item-title.devui-collapse--open>.devui-collapse__open-icon{transform:rotate(180deg);transform-origin:center}.devui-collapse__item-content{padding:0 12px 0 20px;line-height:1.5;color:var(--devui-text-weak, #575d6c)}.devui-collapse-transition-leave-active{transition:all .4s ease-in-out;animation:panelUpOut .4s ease-in-out;animation-fill-mode:both}.devui-collapse-transition-enter-active{transition:all .4s ease-in-out;animation:panelUpIn .4s ease-in-out;animation-fill-mode:both}@keyframes panelUpOut{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(0);transform-origin:0% 0%;opacity:0}}@keyframes panelUpIn{0%{transform:scaleY(0);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}
@@ -23,9 +23,16 @@ const countdownProps = {
23
23
  }
24
24
  }
25
25
  };
26
- var countdown = "";
27
26
  const getFormatTime = (leftTime) => {
28
- const timeformat = /* @__PURE__ */ new Map([["Y", 0], ["M", 0], ["D", 0], ["H", 0], ["m", 0], ["s", 0], ["S", 0]]);
27
+ const timeformat = /* @__PURE__ */ new Map([
28
+ ["Y", 0],
29
+ ["M", 0],
30
+ ["D", 0],
31
+ ["H", 0],
32
+ ["m", 0],
33
+ ["s", 0],
34
+ ["S", 0]
35
+ ]);
29
36
  const year = Math.floor(leftTime / (365 * 24 * 60 * 60 * 1e3));
30
37
  const month = Math.floor(leftTime / (30 * 24 * 60 * 60 * 1e3) % 12);
31
38
  const day = Math.floor(leftTime / (24 * 60 * 60 * 1e3) % 30);
@@ -43,19 +50,35 @@ const getFormatTime = (leftTime) => {
43
50
  return timeformat;
44
51
  };
45
52
  const getLegalTime = (s, timeformat) => {
46
- const dateValue = /* @__PURE__ */ new Map([["Y", 0], ["M", 0], ["D", 0], ["H", 0], ["m", 0], ["s", 0], ["S", 0]]);
47
- const m = /* @__PURE__ */ new Map([["Y", 12], ["M", 30], ["D", 24], ["H", 60], ["m", 60], ["s", 1e3], ["S", 1]]);
53
+ const dateValue = /* @__PURE__ */ new Map([
54
+ ["Y", 0],
55
+ ["M", 0],
56
+ ["D", 0],
57
+ ["H", 0],
58
+ ["m", 0],
59
+ ["s", 0],
60
+ ["S", 0]
61
+ ]);
62
+ const m = /* @__PURE__ */ new Map([
63
+ ["Y", 12],
64
+ ["M", 30],
65
+ ["D", 24],
66
+ ["H", 60],
67
+ ["m", 60],
68
+ ["s", 1e3],
69
+ ["S", 1]
70
+ ]);
48
71
  let storage = 0;
49
72
  for (const k of dateValue.keys()) {
50
73
  if (s.has(k)) {
51
- dateValue.set(k, timeformat.get(k) + storage);
74
+ dateValue.set(k, (timeformat.get(k) || 0) + storage);
52
75
  storage = 0;
53
76
  } else {
54
- storage += timeformat.get(k) * m.get(k);
77
+ storage += (timeformat.get(k) || 0) * (m.get(k) || 0);
55
78
  }
56
79
  }
57
- if (!s.has("S") && timeformat.get("S") > 500) {
58
- dateValue.set("s", dateValue.get("s") + 1);
80
+ if (!s.has("S") && (timeformat.get("S") || 0) > 500) {
81
+ dateValue.set("s", (dateValue.get("s") || 0) + 1);
59
82
  }
60
83
  return dateValue;
61
84
  };
@@ -96,12 +119,29 @@ const numFormat = (n, len) => {
96
119
  return str + n;
97
120
  }
98
121
  };
122
+ const intervalTimer = (callback, interval = 0) => {
123
+ let counter = 1;
124
+ let timeoutId;
125
+ const startTime = Date.now();
126
+ function main() {
127
+ const nowTime = Date.now();
128
+ const nextTime = startTime + counter * interval;
129
+ timeoutId = setTimeout(main, interval - (nowTime - nextTime));
130
+ counter += 1;
131
+ callback();
132
+ }
133
+ timeoutId = setTimeout(main, interval);
134
+ return () => {
135
+ clearTimeout(timeoutId);
136
+ };
137
+ };
138
+ var countdown = "";
99
139
  var Countdown = defineComponent({
100
140
  name: "DCountdown",
101
141
  props: countdownProps,
102
142
  emits: ["onChange", "onFinish"],
103
143
  setup(props, ctx) {
104
- const countdown2 = ref();
144
+ const timerCleaner = ref();
105
145
  const s = getDeduplication(props.format);
106
146
  const timeFormat = getTimeSplit(props.format);
107
147
  const timeStr = ref("");
@@ -109,7 +149,7 @@ var Countdown = defineComponent({
109
149
  const fomatMap = /* @__PURE__ */ new Set(["Y", "M", "D", "H", "m", "s", "S"]);
110
150
  const t = timeFormat.reduce((pre, cur) => {
111
151
  if (fomatMap.has(cur.k)) {
112
- return pre + numFormat(legalTime.get(cur.k), cur.n);
152
+ return pre + numFormat(legalTime.get(cur.k) || 0, cur.n);
113
153
  }
114
154
  return pre + cur.k;
115
155
  }, "");
@@ -130,14 +170,16 @@ var Countdown = defineComponent({
130
170
  };
131
171
  const startTime = () => {
132
172
  getTime();
133
- if (countdown2.value) {
173
+ if (timerCleaner.value) {
134
174
  return;
135
175
  }
136
- countdown2.value = setInterval(() => {
176
+ timerCleaner.value = intervalTimer(() => {
177
+ var _a;
137
178
  const t = getTime();
138
179
  if (t === 0) {
139
180
  ctx.emit("onFinish");
140
- clearInterval(countdown2.value);
181
+ (_a = timerCleaner.value) == null ? void 0 : _a.call(timerCleaner);
182
+ timerCleaner.value = null;
141
183
  }
142
184
  }, s.has("S") ? 100 : 1e3);
143
185
  };
@@ -145,7 +187,8 @@ var Countdown = defineComponent({
145
187
  startTime();
146
188
  });
147
189
  onUnmounted(() => {
148
- clearInterval(countdown2.value);
190
+ var _a;
191
+ (_a = timerCleaner.value) == null ? void 0 : _a.call(timerCleaner);
149
192
  });
150
193
  return () => {
151
194
  return createVNode("div", {
@@ -163,15 +206,12 @@ var Countdown = defineComponent({
163
206
  };
164
207
  }
165
208
  });
166
- Countdown.install = function(app) {
167
- app.component(Countdown.name, Countdown);
168
- };
169
209
  var index = {
170
210
  title: "Countdown \u5012\u8BA1\u65F6",
171
211
  category: "\u6570\u636E\u5C55\u793A",
172
212
  status: "100%",
173
213
  install(app) {
174
- app.use(Countdown);
214
+ app.component(Countdown.name, Countdown);
175
215
  }
176
216
  };
177
- export { Countdown, index as default };
217
+ export { Countdown, countdownProps, index as default };
@@ -1 +1 @@
1
- (function(r,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(r=typeof globalThis!="undefined"?globalThis:r||self,a(r.index={},r.Vue))})(this,function(r,a){"use strict";const w={value:{type:Number,required:!0},format:{type:String,default:"HH:mm:ss"},prefix:{type:String,default:""},suffix:{type:String,default:""},valueStyle:{type:Object,default:()=>({})}};var T="";const M=e=>{const t=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),n=Math.floor(e/(365*24*60*60*1e3)),s=Math.floor(e/(30*24*60*60*1e3)%12),o=Math.floor(e/(24*60*60*1e3)%30),u=Math.floor(e/(60*60*1e3)%24),h=Math.floor(e/(60*1e3)%60),f=Math.floor(e/1e3%60),S=e%1e3;return t.set("Y",n),t.set("M",s),t.set("D",o),t.set("H",u),t.set("m",h),t.set("s",f),t.set("S",S),t},p=(e,t)=>{const n=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),s=new Map([["Y",12],["M",30],["D",24],["H",60],["m",60],["s",1e3],["S",1]]);let o=0;for(const u of n.keys())e.has(u)?(n.set(u,t.get(u)+o),o=0):o+=t.get(u)*s.get(u);return!e.has("S")&&t.get("S")>500&&n.set("s",n.get("s")+1),n},y=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=[];for(let s=0;s<e.length;s++){const o=e[s];n.length===0||n[n.length-1].k!==o||!t.has(o)?n.push({k:o,n:1}):n[n.length-1].n++}return n},v=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=new Set;for(let s=0;s<e.length;s++){const o=e[s];t.has(o)&&n.add(o)}return n},D=(e,t)=>{const n=10**t-1;if(e>=n)return e;{const s=t-e.toString().length;let o="";for(let u=0;u<s;u++)o+="0";return o+e}};var l=a.defineComponent({name:"DCountdown",props:w,emits:["onChange","onFinish"],setup(e,t){const n=a.ref(),s=v(e.format),o=y(e.format),u=a.ref(""),h=c=>{const i=new Set(["Y","M","D","H","m","s","S"]),m=o.reduce((d,g)=>i.has(g.k)?d+D(c.get(g.k),g.n):d+g.k,"");u.value=m},f=()=>{const c=new Date(e.value).getTime(),i=c>new Date().getTime()?c-new Date().getTime():0,m=M(i),d=p(s,m);return!t.slots.default&&h(d),t.emit("onChange",{leftTime:i,formatTime:m,legalTime:d}),i},S=()=>{f(),!n.value&&(n.value=setInterval(()=>{f()===0&&(t.emit("onFinish"),clearInterval(n.value))},s.has("S")?100:1e3))};return a.onMounted(()=>{S()}),a.onUnmounted(()=>{clearInterval(n.value)}),()=>a.createVNode("div",{class:"devui-countdown"},[t.slots.default?t.slots.default():a.createVNode("div",{class:"countdown-content",style:e.valueStyle},[a.createVNode("span",{class:"countdown-prefix"},[e.prefix]),a.createVNode("span",{class:"countdown-value"},[u.value]),a.createVNode("span",{class:"countdown-suffix"},[e.suffix])])])}});l.install=function(e){e.component(l.name,l)};var H={title:"Countdown \u5012\u8BA1\u65F6",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.use(l)}};r.Countdown=l,r.default=H,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
1
+ (function(c,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(c=typeof globalThis!="undefined"?globalThis:c||self,u(c.index={},c.Vue))})(this,function(c,u){"use strict";const S={value:{type:Number,required:!0},format:{type:String,default:"HH:mm:ss"},prefix:{type:String,default:""},suffix:{type:String,default:""},valueStyle:{type:Object,default:()=>({})}},M=e=>{const n=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),t=Math.floor(e/(365*24*60*60*1e3)),o=Math.floor(e/(30*24*60*60*1e3)%12),s=Math.floor(e/(24*60*60*1e3)%30),a=Math.floor(e/(60*60*1e3)%24),d=Math.floor(e/(60*1e3)%60),l=Math.floor(e/1e3%60),w=e%1e3;return n.set("Y",t),n.set("M",o),n.set("D",s),n.set("H",a),n.set("m",d),n.set("s",l),n.set("S",w),n},p=(e,n)=>{const t=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),o=new Map([["Y",12],["M",30],["D",24],["H",60],["m",60],["s",1e3],["S",1]]);let s=0;for(const a of t.keys())e.has(a)?(t.set(a,(n.get(a)||0)+s),s=0):s+=(n.get(a)||0)*(o.get(a)||0);return!e.has("S")&&(n.get("S")||0)>500&&t.set("s",(t.get("s")||0)+1),t},y=e=>{const n=new Set(["Y","M","D","H","m","s","S"]),t=[];for(let o=0;o<e.length;o++){const s=e[o];t.length===0||t[t.length-1].k!==s||!n.has(s)?t.push({k:s,n:1}):t[t.length-1].n++}return t},T=e=>{const n=new Set(["Y","M","D","H","m","s","S"]),t=new Set;for(let o=0;o<e.length;o++){const s=e[o];n.has(s)&&t.add(s)}return t},D=(e,n)=>{const t=10**n-1;if(e>=t)return e;{const o=n-e.toString().length;let s="";for(let a=0;a<o;a++)s+="0";return s+e}},v=(e,n=0)=>{let t=1,o;const s=Date.now();function a(){const d=Date.now(),l=s+t*n;o=setTimeout(a,n-(d-l)),t+=1,e()}return o=setTimeout(a,n),()=>{clearTimeout(o)}};var k="",h=u.defineComponent({name:"DCountdown",props:S,emits:["onChange","onFinish"],setup(e,n){const t=u.ref(),o=T(e.format),s=y(e.format),a=u.ref(""),d=i=>{const r=new Set(["Y","M","D","H","m","s","S"]),m=s.reduce((f,g)=>r.has(g.k)?f+D(i.get(g.k)||0,g.n):f+g.k,"");a.value=m},l=()=>{const i=new Date(e.value).getTime(),r=i>new Date().getTime()?i-new Date().getTime():0,m=M(r),f=p(o,m);return!n.slots.default&&d(f),n.emit("onChange",{leftTime:r,formatTime:m,legalTime:f}),r},w=()=>{l(),!t.value&&(t.value=v(()=>{var r;l()===0&&(n.emit("onFinish"),(r=t.value)==null||r.call(t),t.value=null)},o.has("S")?100:1e3))};return u.onMounted(()=>{w()}),u.onUnmounted(()=>{var i;(i=t.value)==null||i.call(t)}),()=>u.createVNode("div",{class:"devui-countdown"},[n.slots.default?n.slots.default():u.createVNode("div",{class:"countdown-content",style:e.valueStyle},[u.createVNode("span",{class:"countdown-prefix"},[e.prefix]),u.createVNode("span",{class:"countdown-value"},[a.value]),u.createVNode("span",{class:"countdown-suffix"},[e.suffix])])])}}),H={title:"Countdown \u5012\u8BA1\u65F6",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.component(h.name,h)}};c.Countdown=h,c.countdownProps=S,c.default=H,Object.defineProperty(c,"__esModule",{value:!0}),c[Symbol.toStringTag]="Module"});
File without changes