vue-devui 1.0.0-rc.7 → 1.0.0

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 (231) hide show
  1. package/README.md +163 -146
  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 +8230 -231
  6. package/auto-complete/index.umd.js +29 -5
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +81 -70
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +34 -4
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5706 -98
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +38 -13
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8066 -245
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{date-picker → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +213 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{date-picker → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +56 -13
  29. package/countdown/index.umd.js +1 -1
  30. package/date-picker-pro/index.d.ts +7 -0
  31. package/date-picker-pro/index.es.js +12020 -0
  32. package/date-picker-pro/index.umd.js +27 -0
  33. package/date-picker-pro/package.json +7 -0
  34. package/date-picker-pro/style.css +1 -0
  35. package/drawer/index.es.js +29 -4
  36. package/drawer/index.umd.js +1 -1
  37. package/drawer/style.css +1 -1
  38. package/dropdown/index.es.js +178 -142
  39. package/dropdown/index.umd.js +1 -1
  40. package/dropdown/style.css +1 -1
  41. package/editable-select/index.es.js +742 -107
  42. package/editable-select/index.umd.js +1 -1
  43. package/editable-select/style.css +1 -1
  44. package/form/index.es.js +544 -316
  45. package/form/index.umd.js +17 -17
  46. package/form/style.css +1 -1
  47. package/fullscreen/index.es.js +28 -4
  48. package/fullscreen/index.umd.js +1 -1
  49. package/fullscreen/style.css +1 -1
  50. package/grid/index.es.js +71 -50
  51. package/grid/index.umd.js +1 -1
  52. package/grid/style.css +1 -1
  53. package/icon/index.es.js +184 -23
  54. package/icon/index.umd.js +1 -1
  55. package/icon/style.css +1 -0
  56. package/image-preview/index.es.js +34 -11
  57. package/image-preview/index.umd.js +1 -1
  58. package/image-preview/style.css +1 -1
  59. package/input/index.es.js +8250 -131
  60. package/input/index.umd.js +27 -1
  61. package/input/style.css +1 -1
  62. package/input-number/index.es.js +275 -203
  63. package/input-number/index.umd.js +1 -1
  64. package/input-number/style.css +1 -1
  65. package/layout/index.es.js +34 -6
  66. package/layout/index.umd.js +1 -1
  67. package/layout/style.css +1 -1
  68. package/loading/index.es.js +34 -10
  69. package/loading/index.umd.js +1 -1
  70. package/loading/style.css +1 -1
  71. package/mention/index.d.ts +7 -0
  72. package/mention/index.es.js +8310 -0
  73. package/mention/index.umd.js +36 -0
  74. package/mention/package.json +7 -0
  75. package/mention/style.css +1 -0
  76. package/menu/index.d.ts +7 -0
  77. package/menu/index.es.js +934 -0
  78. package/menu/index.umd.js +1 -0
  79. package/menu/package.json +7 -0
  80. package/menu/style.css +1 -0
  81. package/message/index.d.ts +7 -0
  82. package/message/index.es.js +538 -0
  83. package/message/index.umd.js +1 -0
  84. package/message/package.json +7 -0
  85. package/message/style.css +1 -0
  86. package/modal/index.es.js +359 -170
  87. package/modal/index.umd.js +1 -1
  88. package/modal/style.css +1 -1
  89. package/notification/index.es.js +236 -65
  90. package/notification/index.umd.js +1 -1
  91. package/notification/style.css +1 -1
  92. package/nuxt/components/ButtonGroup.js +3 -0
  93. package/nuxt/components/CheckboxButton.js +3 -0
  94. package/nuxt/components/Collapse.js +3 -0
  95. package/nuxt/components/CollapseItem.js +3 -0
  96. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  97. package/nuxt/components/DatePickerPro.js +3 -0
  98. package/nuxt/components/Icon.js +1 -0
  99. package/nuxt/components/IconGroup.js +3 -0
  100. package/nuxt/components/LABEL_DATA.js +3 -0
  101. package/nuxt/components/Mention.js +3 -0
  102. package/nuxt/components/Menu.js +3 -0
  103. package/nuxt/components/MenuItem.js +3 -0
  104. package/nuxt/components/Message.js +3 -0
  105. package/nuxt/components/Option.js +3 -0
  106. package/nuxt/components/OptionGroup.js +3 -0
  107. package/nuxt/components/RadioButton.js +3 -0
  108. package/nuxt/components/Step.js +3 -0
  109. package/nuxt/components/Steps.js +3 -0
  110. package/nuxt/components/SubMenu.js +3 -0
  111. package/nuxt/components/TABLE_TOKEN.js +3 -0
  112. package/nuxt/components/TimePicker.js +3 -0
  113. package/nuxt/components/TimeSelect.js +3 -0
  114. package/nuxt/components/animationInjectionKey.js +3 -0
  115. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  116. package/nuxt/components/buttonGroupProps.js +3 -0
  117. package/nuxt/components/collapseItemProps.js +3 -0
  118. package/nuxt/components/collapseProps.js +3 -0
  119. package/nuxt/components/datePickerProCommonProps.js +3 -0
  120. package/nuxt/components/datePickerProPanelProps.js +3 -0
  121. package/nuxt/components/datePickerProProps.js +3 -0
  122. package/nuxt/components/iconProps.js +1 -0
  123. package/nuxt/components/mentionProps.js +3 -0
  124. package/nuxt/components/messageProps.js +3 -0
  125. package/nuxt/components/roundInjectionKey.js +3 -0
  126. package/nuxt/components/skeletonItemProps.js +3 -0
  127. package/nuxt/components/stepProps.js +3 -0
  128. package/nuxt/components/stepsProps.js +3 -0
  129. package/nuxt/components/svgIconProps.js +3 -0
  130. package/nuxt/components/tableProps.js +3 -0
  131. package/nuxt/components/timerPickerPanelProps.js +3 -0
  132. package/nuxt/components/treeNodeProps.js +3 -0
  133. package/overlay/index.es.js +84 -125
  134. package/overlay/index.umd.js +1 -1
  135. package/overlay/style.css +1 -1
  136. package/package.json +7 -3
  137. package/pagination/index.es.js +234 -39
  138. package/pagination/index.umd.js +1 -1
  139. package/pagination/style.css +1 -1
  140. package/panel/style.css +1 -1
  141. package/popover/index.es.js +274 -220
  142. package/popover/index.umd.js +13 -13
  143. package/popover/style.css +1 -1
  144. package/progress/index.es.js +31 -9
  145. package/progress/index.umd.js +3 -3
  146. package/progress/style.css +1 -1
  147. package/radio/index.es.js +7969 -152
  148. package/radio/index.umd.js +27 -1
  149. package/radio/style.css +1 -1
  150. package/rate/index.es.js +46 -14
  151. package/rate/index.umd.js +1 -1
  152. package/rate/style.css +1 -1
  153. package/result/index.es.js +169 -22
  154. package/result/index.umd.js +1 -1
  155. package/result/style.css +1 -1
  156. package/search/index.es.js +3823 -1090
  157. package/search/index.umd.js +18 -18
  158. package/search/style.css +1 -1
  159. package/select/index.es.js +9186 -478
  160. package/select/index.umd.js +27 -1
  161. package/select/style.css +1 -1
  162. package/skeleton/index.es.js +110 -259
  163. package/skeleton/index.umd.js +1 -1
  164. package/skeleton/style.css +1 -1
  165. package/slider/index.es.js +143 -146
  166. package/slider/index.umd.js +1 -1
  167. package/slider/style.css +1 -1
  168. package/splitter/index.es.js +433 -207
  169. package/splitter/index.umd.js +17 -17
  170. package/splitter/style.css +1 -1
  171. package/statistic/index.es.js +34 -16
  172. package/statistic/index.umd.js +1 -1
  173. package/statistic/style.css +1 -1
  174. package/status/index.es.js +26 -2
  175. package/status/index.umd.js +1 -1
  176. package/status/style.css +1 -1
  177. package/steps/index.d.ts +7 -0
  178. package/steps/index.es.js +386 -0
  179. package/steps/index.umd.js +1 -0
  180. package/steps/package.json +7 -0
  181. package/steps/style.css +1 -0
  182. package/style.css +1 -1
  183. package/switch/index.es.js +7802 -59
  184. package/switch/index.umd.js +27 -1
  185. package/switch/style.css +1 -1
  186. package/table/index.es.js +9769 -919
  187. package/table/index.umd.js +27 -1
  188. package/table/style.css +1 -1
  189. package/tabs/index.es.js +309 -96
  190. package/tabs/index.umd.js +1 -1
  191. package/tabs/style.css +1 -1
  192. package/tag/index.es.js +35 -7
  193. package/tag/index.umd.js +1 -1
  194. package/tag/style.css +1 -1
  195. package/textarea/index.es.js +7922 -78
  196. package/textarea/index.umd.js +35 -1
  197. package/textarea/style.css +1 -1
  198. package/time-picker/index.d.ts +7 -0
  199. package/time-picker/index.es.js +9549 -0
  200. package/time-picker/index.umd.js +27 -0
  201. package/time-picker/package.json +7 -0
  202. package/time-picker/style.css +1 -0
  203. package/time-select/index.d.ts +7 -0
  204. package/time-select/index.es.js +9585 -0
  205. package/time-select/index.umd.js +27 -0
  206. package/time-select/package.json +7 -0
  207. package/time-select/style.css +1 -0
  208. package/timeline/index.es.js +169 -22
  209. package/timeline/index.umd.js +1 -1
  210. package/timeline/style.css +1 -1
  211. package/tooltip/index.es.js +265 -212
  212. package/tooltip/index.umd.js +15 -15
  213. package/tooltip/style.css +1 -1
  214. package/tree/index.es.js +11343 -795
  215. package/tree/index.umd.js +27 -1
  216. package/tree/style.css +1 -1
  217. package/upload/index.es.js +494 -106
  218. package/upload/index.umd.js +1 -1
  219. package/upload/style.css +1 -1
  220. package/vue-devui.es.js +22849 -13614
  221. package/vue-devui.umd.js +30 -23
  222. package/date-picker/index.es.js +0 -1145
  223. package/date-picker/index.umd.js +0 -1
  224. package/date-picker/style.css +0 -1
  225. package/nuxt/components/DatePicker.js +0 -3
  226. package/nuxt/components/FormControl.js +0 -3
  227. package/nuxt/components/FormLabel.js +0 -3
  228. package/nuxt/components/StickSlider.js +0 -3
  229. package/nuxt/components/formControlProps.js +0 -3
  230. package/nuxt/components/overlayEmits.js +0 -3
  231. package/nuxt/components/overlayProps.js +0 -3
@@ -1,1145 +0,0 @@
1
- import { defineComponent, inject, computed, ref, watch, createVNode, withDirectives, mergeProps, resolveDirective, resolveComponent, toRefs, createTextVNode, reactive, onMounted, onUnmounted } from "vue";
2
- const getDateTime = (d) => {
3
- const year = d.getFullYear();
4
- const month = d.getMonth() + 1;
5
- const date = d.getDate();
6
- const day = d.getDay();
7
- const hour = d.getHours();
8
- const minute = d.getMinutes();
9
- const second = d.getSeconds();
10
- const ms = d.getMilliseconds();
11
- return [year, month, date, day, hour, minute, second, ms];
12
- };
13
- const fixStart = (n, m, max = 2, ch = "0") => {
14
- return (n + "").padStart(Math.min(m.length, max), ch);
15
- };
16
- const formatDate = (fmt, d) => {
17
- const usage = getDateTime(d);
18
- let res = fmt;
19
- res = res.replace(/y+/g, (m) => {
20
- const year = usage[0] + "";
21
- if (m.length === 2) {
22
- return year.substring(2);
23
- }
24
- return year;
25
- });
26
- res = res.replace(/M+/g, (m) => fixStart(usage[1], m));
27
- res = res.replace(/d+/g, (m) => fixStart(usage[2], m));
28
- res = res.replace(/h+/g, (m) => fixStart(usage[4], m));
29
- res = res.replace(/m+/g, (m) => fixStart(usage[5], m));
30
- res = res.replace(/s+/g, (m) => fixStart(usage[6], m));
31
- return res;
32
- };
33
- const formatRange$1 = (fmt, a, b, conn = "-") => {
34
- const ab = [a, b];
35
- if (a.getTime() > b.getTime()) {
36
- ab.reverse();
37
- }
38
- return `${formatDate(fmt, ab[0])} ${conn} ${formatDate(fmt, ab[1])}`;
39
- };
40
- const isIn = (a, b) => {
41
- if (!b) {
42
- return false;
43
- }
44
- while (a) {
45
- if (a === b) {
46
- return true;
47
- }
48
- a = a.parentNode;
49
- }
50
- return false;
51
- };
52
- const invokeFunction = (fn, ...args) => {
53
- if (typeof fn === "function") {
54
- fn(...args);
55
- }
56
- };
57
- const getHumanDate = (d) => {
58
- const year = d.getFullYear();
59
- const month = d.getMonth() + 1;
60
- const date = d.getDate();
61
- const day = d.getDay();
62
- const hour = d.getHours();
63
- const minute = d.getMinutes();
64
- const second = d.getSeconds();
65
- const ms = d.getMilliseconds();
66
- return {
67
- year,
68
- y: year,
69
- month,
70
- M: month,
71
- date,
72
- d: date,
73
- day,
74
- hour,
75
- H: hour,
76
- h: hour,
77
- minute,
78
- m: minute,
79
- second,
80
- s: second,
81
- ms
82
- };
83
- };
84
- const getMonthDays = (year, month) => {
85
- const first = new Date(year, month - 1, 1);
86
- const last = new Date(year, month, 0);
87
- const dates = [];
88
- let day = first.getDay();
89
- while (day > 0) {
90
- day -= 1;
91
- dates.push({ date: new Date(year, month - 1, -day), current: -1 });
92
- }
93
- day = last.getDate() - first.getDate();
94
- for (let i = 0; i <= day; i++) {
95
- const date = new Date(first);
96
- date.setDate(i + 1);
97
- dates.push({ date, current: 0 });
98
- }
99
- day = last.getDay();
100
- let tail = last;
101
- for (let i = day; i < 6; i++) {
102
- tail = new Date(year, month, i - day + 1);
103
- dates.push({ date: tail, current: 1 });
104
- }
105
- if (dates.length < 42) {
106
- day = tail.getDate();
107
- for (let i = 1; i <= 7; i++) {
108
- tail = new Date(year, month, day + i);
109
- dates.push({ date: tail, current: 1 });
110
- }
111
- }
112
- return dates;
113
- };
114
- const getMonthWeeklyDays = (date = new Date()) => {
115
- if (!(date instanceof Date)) {
116
- date = new Date();
117
- }
118
- const { year, month } = getHumanDate(date);
119
- const days = getMonthDays(year, month);
120
- const dayRows = [];
121
- while (days.length > 0) {
122
- dayRows.push(days.splice(0, 7));
123
- }
124
- return dayRows;
125
- };
126
- const WEEK_DAYS = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
127
- const invokeCallback = (cb, ...args) => {
128
- typeof cb === "function" && cb(...args);
129
- };
130
- const subDateMonth = (a, b) => {
131
- const am = a.getFullYear() * 12 + a.getMonth();
132
- const bm = b.getFullYear() * 12 + b.getMonth();
133
- return am - bm;
134
- };
135
- const ONE_DAY = 1e3 * 60 * 60 * 24;
136
- const subDateDay = (a, b) => {
137
- const ad = new Date(a.getFullYear(), a.getMonth(), a.getDate()).getTime();
138
- const bd = new Date(b.getFullYear(), b.getMonth(), b.getDate()).getTime();
139
- return (ad - bd) / ONE_DAY;
140
- };
141
- const compareDate = (small, big, mode, min) => {
142
- if (!small || !big) {
143
- return true;
144
- }
145
- if (mode === "year") {
146
- return big.getFullYear() - small.getFullYear() > min;
147
- } else {
148
- return subDateMonth(big, small) > min;
149
- }
150
- };
151
- const parseDate = (str) => {
152
- if (!str || typeof str !== "string") {
153
- return null;
154
- }
155
- const [dateStr = "", timeStr = ""] = str.split(/([ ]|T)+/);
156
- if (!dateStr) {
157
- return null;
158
- }
159
- const [y, m, d] = dateStr.split(/[^\d]+/);
160
- const year = _parseInt(y), month = _parseInt(m), date = _parseInt(d) || 1;
161
- if (!year || !month) {
162
- return null;
163
- }
164
- const time = parseTime(timeStr);
165
- return new Date(year, month - 1, date, ...time);
166
- };
167
- const _parseInt = (str, dftVal) => {
168
- if (!str || typeof str !== "string") {
169
- return dftVal;
170
- }
171
- const n = parseInt(str);
172
- if (isNaN(n)) {
173
- return dftVal;
174
- }
175
- return n;
176
- };
177
- const parseTime = (str) => {
178
- const [h, m, s, ms] = str.split(/[\:\.]+/);
179
- return [_parseInt(h, 0), _parseInt(m, 0), _parseInt(s, 0), _parseInt(ms, 0)];
180
- };
181
- const compareDateSort = (d1, d2, type = "d") => {
182
- const t1 = dateCounter(d1, type), t2 = dateCounter(d2, type);
183
- return t1 < t2 ? -1 : t1 > t2 ? 1 : 0;
184
- };
185
- const dateCounter = (date, type) => {
186
- switch (type) {
187
- case "y":
188
- return date.getFullYear();
189
- case "m":
190
- return date.getFullYear() * 12 + date.getMonth();
191
- }
192
- return date.getTime() / ONE_DAY >> 0;
193
- };
194
- const betweenDate = (date, left, right) => {
195
- if (left instanceof Date && compareDateSort(left, date, "d") > 0) {
196
- return false;
197
- }
198
- if (right instanceof Date && compareDateSort(date, right, "d") > 0) {
199
- return false;
200
- }
201
- return true;
202
- };
203
- const inputProps = {
204
- placeholder: {
205
- type: String,
206
- default: void 0
207
- },
208
- disabled: {
209
- type: Boolean,
210
- default: false
211
- },
212
- autoFocus: {
213
- type: Boolean,
214
- default: false
215
- },
216
- maxLength: {
217
- type: Number,
218
- default: Number.MAX_SAFE_INTEGER
219
- },
220
- cssClass: {
221
- type: String,
222
- default: ""
223
- },
224
- error: {
225
- type: Boolean,
226
- default: false
227
- },
228
- size: {
229
- type: String,
230
- default: ""
231
- },
232
- showPassword: {
233
- type: Boolean,
234
- default: false
235
- },
236
- modelValue: {
237
- type: String,
238
- default: ""
239
- },
240
- "update:modelValue": {
241
- type: Function,
242
- default: void 0
243
- },
244
- onChange: {
245
- type: Function,
246
- default: void 0
247
- },
248
- onKeydown: {
249
- type: Function,
250
- default: void 0
251
- },
252
- onFocus: {
253
- type: Function,
254
- default: void 0
255
- },
256
- onBlur: {
257
- type: Function,
258
- default: void 0
259
- }
260
- };
261
- const FORM_ITEM_TOKEN = Symbol("dFormItem");
262
- var input = "";
263
- var Input = defineComponent({
264
- name: "DInput",
265
- directives: {
266
- focus: {
267
- mounted: function(el, binding) {
268
- if (binding.value) {
269
- el.focus();
270
- }
271
- }
272
- }
273
- },
274
- props: inputProps,
275
- emits: ["update:modelValue", "focus", "blur", "change", "keydown"],
276
- setup(props, ctx) {
277
- const formItemContext = inject(FORM_ITEM_TOKEN);
278
- const sizeCls = computed(() => `devui-input-${props.size}`);
279
- const showPwdIcon = ref(false);
280
- const inputType = ref("text");
281
- const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
282
- const inputCls = computed(() => ({
283
- "devui-error": props.error || isValidateError.value,
284
- [props.cssClass]: true,
285
- "devui-input-restore": showPwdIcon.value,
286
- [sizeCls.value]: props.size !== ""
287
- }));
288
- const showPreviewIcon = computed(() => inputType.value === "password");
289
- watch(() => props.showPassword, (flg) => {
290
- inputType.value = flg ? "password" : "text";
291
- showPwdIcon.value = props.showPassword;
292
- }, {
293
- immediate: true
294
- });
295
- watch(() => props.modelValue, () => {
296
- formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
297
- });
298
- const onInput = ($event) => {
299
- ctx.emit("update:modelValue", $event.target.value);
300
- }, onFocus = () => {
301
- ctx.emit("focus");
302
- }, onBlur = () => {
303
- ctx.emit("blur");
304
- formItemContext == null ? void 0 : formItemContext.validate("blur").catch((err) => console.warn(err));
305
- }, onChange = ($event) => {
306
- ctx.emit("change", $event.target.value);
307
- }, onKeydown = ($event) => {
308
- ctx.emit("keydown", $event);
309
- }, onChangeInputType = () => {
310
- inputType.value = inputType.value === "password" ? "text" : "password";
311
- };
312
- return {
313
- inputCls,
314
- inputType,
315
- showPreviewIcon,
316
- showPwdIcon,
317
- onInput,
318
- onFocus,
319
- onBlur,
320
- onChange,
321
- onKeydown,
322
- onChangeInputType
323
- };
324
- },
325
- render() {
326
- const {
327
- modelValue,
328
- showPreviewIcon,
329
- showPwdIcon,
330
- inputCls,
331
- inputType,
332
- maxLength,
333
- autoFocus,
334
- placeholder,
335
- disabled,
336
- onInput,
337
- onFocus,
338
- onBlur,
339
- onChange,
340
- onKeydown,
341
- onChangeInputType
342
- } = this;
343
- return createVNode("div", {
344
- "class": "devui-input__wrap"
345
- }, [withDirectives(createVNode("input", mergeProps({
346
- dinput: true
347
- }, {
348
- "value": modelValue,
349
- "disabled": disabled,
350
- "type": inputType,
351
- "maxlength": maxLength,
352
- "placeholder": placeholder,
353
- "class": inputCls,
354
- "onInput": onInput,
355
- "onFocus": onFocus,
356
- "onBlur": onBlur,
357
- "onChange": onChange,
358
- "onKeydown": onKeydown
359
- }), null), [[resolveDirective("focus"), autoFocus]]), showPwdIcon && createVNode("div", {
360
- "class": "devui-input__preview",
361
- "onClick": onChangeInputType
362
- }, [showPreviewIcon ? createVNode(resolveComponent("d-icon"), {
363
- "name": "preview-forbidden",
364
- "size": "12px",
365
- "key": 1
366
- }, null) : createVNode(resolveComponent("d-icon"), {
367
- "name": "preview",
368
- "size": "12px",
369
- "key": 2
370
- }, null)])]);
371
- }
372
- });
373
- const iconProps = {
374
- name: {
375
- type: String,
376
- default: "",
377
- required: true
378
- },
379
- size: {
380
- type: String,
381
- default: "inherit"
382
- },
383
- color: {
384
- type: String,
385
- default: "inherit"
386
- },
387
- classPrefix: {
388
- type: String,
389
- default: "icon"
390
- }
391
- };
392
- var Icon = defineComponent({
393
- name: "DIcon",
394
- props: iconProps,
395
- setup(props) {
396
- const {
397
- name,
398
- size,
399
- color,
400
- classPrefix
401
- } = toRefs(props);
402
- return () => {
403
- return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
404
- "src": name.value,
405
- "alt": name.value.split("/")[name.value.split("/").length - 1],
406
- "style": {
407
- width: size.value,
408
- verticalAlign: "text-bottom"
409
- }
410
- }, null) : createVNode("i", {
411
- "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
412
- "style": {
413
- fontSize: size.value,
414
- color: color.value
415
- }
416
- }, null);
417
- };
418
- }
419
- });
420
- const handleCalendarSwitchState = (state, index2, pos, date) => {
421
- switch (index2) {
422
- case 0:
423
- const preYear = new Date(date);
424
- preYear.setFullYear(preYear.getFullYear() - 1);
425
- pos === 0 ? state.current = preYear : state.next = preYear;
426
- break;
427
- case 1:
428
- const preMonth = new Date(date);
429
- preMonth.setMonth(preMonth.getMonth() - 1);
430
- pos === 0 ? state.current = preMonth : state.next = preMonth;
431
- break;
432
- case 2:
433
- const nextMonth = new Date(date);
434
- nextMonth.setMonth(nextMonth.getMonth() + 1);
435
- pos === 0 ? state.current = nextMonth : state.next = nextMonth;
436
- break;
437
- case 3:
438
- const nextYear = new Date(date);
439
- nextYear.setFullYear(nextYear.getFullYear() + 1);
440
- pos === 0 ? state.current = nextYear : state.next = nextYear;
441
- break;
442
- }
443
- };
444
- const formatValue = (state, props) => {
445
- const { format = "y/MM/dd", range, rangeSpliter = "-" } = props || {};
446
- if (range) {
447
- if (!state.start) {
448
- return "";
449
- } else if (!state.end) {
450
- return formatDate(format, state.start);
451
- }
452
- if (state.end < state.start) {
453
- const end = state.end;
454
- state.end = state.start;
455
- state.start = end;
456
- }
457
- return formatRange$1(format, state.start, state.end, rangeSpliter);
458
- } else {
459
- if (!state.start) {
460
- return "";
461
- }
462
- return formatDate(format, state.start);
463
- }
464
- };
465
- const formatPlaceholder = (props) => {
466
- if (!props) {
467
- return "";
468
- }
469
- const format = props.format || `y/MM/dd`;
470
- const sp = props.rangeSpliter || "-";
471
- return props.range ? `${format} ${sp} ${format}` : format;
472
- };
473
- const getDateKey = (date) => {
474
- return date.toDateString();
475
- };
476
- const cellClassName = (props, day, base = "cell") => {
477
- if (!betweenDate(day.date, props.dateMin, props.dateMax)) {
478
- return `${base} disabled`;
479
- } else if (day.current !== 0) {
480
- return `${base} not-current`;
481
- }
482
- const key = getDateKey(day.date);
483
- if (props.type === "range") {
484
- if (props.dateStart) {
485
- if (getDateKey(props.dateStart) === key) {
486
- return `${base} selected`;
487
- }
488
- if (props.dateEnd && getDateKey(props.dateEnd) === key) {
489
- return `${base} selected`;
490
- }
491
- const innerEnd = props.dateEnd || props.dateHover;
492
- if (innerEnd) {
493
- const range = innerEnd > props.dateStart ? [props.dateStart, innerEnd] : [innerEnd, props.dateStart];
494
- if (day.date > range[0] && day.date < range[1]) {
495
- return `${base} innerday`;
496
- }
497
- }
498
- }
499
- return base;
500
- } else {
501
- return props.dateStart && getDateKey(props.dateStart) === key ? `${base} selected` : base;
502
- }
503
- };
504
- const trigEvent = (props, day) => {
505
- if (!betweenDate(day.date, props.dateMin, props.dateMax)) {
506
- return;
507
- }
508
- if (props.type === "range") {
509
- if (!props.dateStart) {
510
- invokeCallback(props.onSelectStart, day.date);
511
- } else if (!props.dateEnd) {
512
- if (subDateDay(props.dateStart, day.date) !== 0) {
513
- invokeCallback(props.onSelectEnd, day.date);
514
- typeof props.onChange === "function" && props.onChange(props.type, props);
515
- }
516
- } else {
517
- invokeCallback(props.onReset, day.date);
518
- }
519
- } else {
520
- invokeCallback(props.onSelected, day.date);
521
- typeof props.onChange === "function" && props.onChange(props.type, props);
522
- }
523
- };
524
- const handleDateEnter = (props, day) => {
525
- if (day.current !== 0) {
526
- return;
527
- }
528
- const { dateMin, dateMax } = props;
529
- if (dateMin && subDateDay(day.date, dateMin) < 0) {
530
- return;
531
- }
532
- if (dateMax && subDateDay(dateMax, day.date) < 0) {
533
- return;
534
- }
535
- if (props.type === "range") {
536
- const key = getDateKey(day.date);
537
- if (!props.dateStart || getDateKey(props.dateStart) === key || props.dateEnd) {
538
- return;
539
- }
540
- invokeCallback(props.onSelecting, day.date);
541
- }
542
- };
543
- const Year = (props) => {
544
- const {
545
- color = "#585d6b",
546
- rotate = 0
547
- } = props;
548
- return createVNode("svg", {
549
- "style": {
550
- transform: `rotate(${rotate}deg)`
551
- },
552
- "width": "10px",
553
- "height": "10px",
554
- "viewBox": "0 0 10 10",
555
- "version": "1.1",
556
- "xmlns": "http://www.w3.org/2000/svg"
557
- }, [createVNode("g", {
558
- "fill": color,
559
- "transform": "translate(-1.000000, -1.000000)"
560
- }, [createVNode("path", {
561
- "d": "M11,1.83333333 L11,10.1666667 L7,7.38833333 L7,10.1666667 L1,6 L7,1.83333333 L7,4.61033333 L11,1.83333333 Z"
562
- }, null)])]);
563
- };
564
- const Month = (props) => {
565
- const {
566
- color = "#585d6b",
567
- rotate = 0
568
- } = props;
569
- return createVNode("svg", {
570
- "style": {
571
- transform: `rotate(${rotate}deg)`
572
- },
573
- "width": "6px",
574
- "height": "10px",
575
- "viewBox": "0 0 6 10",
576
- "version": "1.1",
577
- "xmlns": "http://www.w3.org/2000/svg"
578
- }, [createVNode("g", {
579
- "fill": color,
580
- "transform": "translate(-3.000000, -1.000000)"
581
- }, [createVNode("polygon", {
582
- "points": "6 3 10.1666667 9 1.83333333 9"
583
- }, null)])]);
584
- };
585
- var index$6 = "";
586
- const Item = (props) => {
587
- const {
588
- button: Btn,
589
- disabled = false,
590
- rotate = 0,
591
- date,
592
- pos
593
- } = props;
594
- const color = disabled ? "#cfd0d3" : "#585d6b";
595
- const className = `${disabled ? "disabled" : ""}`;
596
- const handleClick = disabled ? void 0 : () => invokeCallback(props.cb, date, pos);
597
- return createVNode("a", {
598
- "class": className,
599
- "onClick": handleClick
600
- }, [createVNode(Btn, {
601
- "color": color,
602
- "rotate": rotate
603
- }, null)]);
604
- };
605
- const Title = (props) => {
606
- const {
607
- date
608
- } = props;
609
- return createVNode("a", {
610
- "class": "title"
611
- }, [`${date.getFullYear()}\u5E74${(date.getMonth() + 1 + "").padStart(2, "0")}\u6708`]);
612
- };
613
- const CalendarToolbar = (props) => {
614
- const {
615
- type,
616
- current,
617
- compare,
618
- pos,
619
- dateMax,
620
- dateMin,
621
- onPreviousYear,
622
- onPreviousMonth,
623
- onNextMonth,
624
- onNextYear
625
- } = props;
626
- const dis = [false, false, false, false];
627
- if (type === "range") {
628
- if (pos === 1) {
629
- dis[0] = !compareDate(compare, current, "year", 1);
630
- dis[1] = !compareDate(compare, current, "month", 1);
631
- dis[2] = !compareDate(current, dateMax, "month", 0);
632
- dis[3] = !compareDate(current, dateMax, "year", 0);
633
- } else {
634
- dis[0] = !compareDate(dateMin, current, "year", 0);
635
- dis[1] = !compareDate(dateMin, current, "month", 0);
636
- dis[2] = !compareDate(current, compare, "month", 1);
637
- dis[3] = !compareDate(current, compare, "year", 1);
638
- }
639
- } else {
640
- dis[0] = !compareDate(dateMin, current, "year", 0);
641
- dis[1] = !compareDate(dateMin, current, "month", 0);
642
- dis[2] = !compareDate(current, dateMax, "month", 0);
643
- dis[3] = !compareDate(current, dateMax, "year", 0);
644
- }
645
- return createVNode("div", {
646
- "class": "devui-calendar-toolbar"
647
- }, [createVNode(Item, {
648
- "disabled": dis[0],
649
- "date": current,
650
- "pos": pos,
651
- "button": Year,
652
- "cb": onPreviousYear
653
- }, null), createVNode(Item, {
654
- "disabled": dis[1],
655
- "date": current,
656
- "pos": pos,
657
- "button": Month,
658
- "rotate": -90,
659
- "cb": onPreviousMonth
660
- }, null), createVNode(Title, {
661
- "date": current
662
- }, null), createVNode(Item, {
663
- "disabled": dis[2],
664
- "date": current,
665
- "pos": pos,
666
- "button": Month,
667
- "rotate": 90,
668
- "cb": onNextMonth
669
- }, null), createVNode(Item, {
670
- "disabled": dis[3],
671
- "date": current,
672
- "pos": pos,
673
- "button": Year,
674
- "rotate": 180,
675
- "cb": onNextYear
676
- }, null)]);
677
- };
678
- const TodayDefault = (props) => {
679
- const {
680
- onSelected = () => 0,
681
- disabled = false
682
- } = props;
683
- return createVNode("div", {
684
- "class": `today-container ${disabled ? "disabled" : ""}`
685
- }, [createVNode("button", {
686
- "class": "today-button",
687
- "disabled": disabled,
688
- "onClick": disabled ? void 0 : () => onSelected(new Date())
689
- }, [createTextVNode("\u4ECA\u5929")])]);
690
- };
691
- var index$5 = "";
692
- const CalendarDatePanel = (props) => {
693
- const today = new Date();
694
- return createVNode("div", {
695
- "class": "devui-calendar-panel"
696
- }, [createVNode(CalendarToolbar, {
697
- "current": props.current,
698
- "compare": props.compare,
699
- "pos": props.pos,
700
- "type": props.type,
701
- "showTime": props.showTime,
702
- "onPreviousYear": props.onPreviousYear,
703
- "onPreviousMonth": props.onPreviousMonth,
704
- "onNextMonth": props.onNextMonth,
705
- "onNextYear": props.onNextYear,
706
- "dateMax": props.dateMax,
707
- "dateMin": props.dateMin
708
- }, null), createVNode("ol", {
709
- "class": "head row"
710
- }, [WEEK_DAYS.map((day) => createVNode("li", {
711
- "class": "cell"
712
- }, [day]))]), createVNode("ul", {
713
- "class": "body"
714
- }, [getMonthWeeklyDays(props.current).map((row) => createVNode("li", {
715
- "class": "row"
716
- }, [row.map((day) => {
717
- return createVNode("span", {
718
- "class": cellClassName(props, day),
719
- "onClick": () => trigEvent(props, day),
720
- "onMouseenter": () => handleDateEnter(props, day)
721
- }, [day.date.getDate()]);
722
- })]))]), props.type !== "range" ? createVNode(TodayDefault, {
723
- "disabled": !betweenDate(today, props.dateMin, props.dateMax),
724
- "onSelected": (today2) => {
725
- typeof props.onToday === "function" && props.onToday(today2, 0);
726
- }
727
- }, null) : null]);
728
- };
729
- var index$4 = "";
730
- const VerticalSlider = defineComponent({
731
- props: {
732
- size: {
733
- type: Number,
734
- default: 26
735
- },
736
- items: {
737
- type: Array
738
- },
739
- selectedIndex: {
740
- type: Number
741
- },
742
- className: {
743
- type: String
744
- },
745
- itemClassNormal: {
746
- type: String
747
- },
748
- itemClassSelected: {
749
- type: String
750
- },
751
- onChange: {
752
- type: Function
753
- }
754
- },
755
- setup(props) {
756
- const {
757
- items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
758
- selectedIndex = 0,
759
- size = 26,
760
- className = "",
761
- itemClassNormal = "",
762
- itemClassSelected = "selected",
763
- onChange
764
- } = props || {};
765
- let max_y = 0, min_y = 0;
766
- const container = ref();
767
- const movbar = ref();
768
- let pos_start = null;
769
- let pos_cache = null;
770
- const state = reactive({
771
- selectedIndex,
772
- barOpacity: 0,
773
- x: 0,
774
- y: 0,
775
- transition: "none"
776
- });
777
- const handleMouseDown = (e) => {
778
- e.stopPropagation();
779
- e.preventDefault();
780
- pos_start = [e.clientX, e.clientY];
781
- state.transition = "none";
782
- };
783
- const handleMouseMove = (e) => {
784
- e.stopPropagation();
785
- e.preventDefault();
786
- if (!pos_start || !pos_cache) {
787
- return;
788
- }
789
- state.x = pos_cache[0] + e.clientX - pos_start[0];
790
- state.y = Math.min(max_y, Math.max(min_y, pos_cache[1] + e.clientY - pos_start[1]));
791
- state.selectedIndex = (max_y - state.y + size / 2) / size >> 0;
792
- };
793
- const handleMouseUp = (e) => {
794
- e.stopPropagation();
795
- e.preventDefault();
796
- pos_start = null;
797
- state.y = max_y - state.selectedIndex * size;
798
- state.transition = "transform 0.1s";
799
- pos_cache[0] = state.x;
800
- pos_cache[1] = state.y;
801
- if (typeof onChange === "function") {
802
- const idx = state.selectedIndex;
803
- const val = items[idx];
804
- onChange(val, idx);
805
- }
806
- };
807
- onMounted(() => {
808
- const {
809
- height: ch
810
- } = container.value.getBoundingClientRect();
811
- const {
812
- height: mh
813
- } = movbar.value.getBoundingClientRect();
814
- max_y = (ch - size) / 2;
815
- min_y = (ch + size) / 2 - mh;
816
- pos_cache = [0, max_y - state.selectedIndex * size];
817
- state.x = pos_cache[0];
818
- state.y = pos_cache[1];
819
- state.barOpacity = 1;
820
- state.transition = "transform 0.1s";
821
- });
822
- return () => {
823
- return createVNode("div", {
824
- "ref": container,
825
- "class": `devui-vertical-slider ${className}`
826
- }, [createVNode("div", {
827
- "ref": movbar,
828
- "class": "movable-bar",
829
- "style": {
830
- opacity: state.barOpacity,
831
- transform: `translateY(${state.y}px)`,
832
- transition: state.transition
833
- }
834
- }, [items.map((c, i) => {
835
- const className2 = i === state.selectedIndex ? itemClassSelected : itemClassNormal;
836
- return createVNode("span", {
837
- "class": `slider-item ${className2}`,
838
- "style": {
839
- height: `${size}px`,
840
- lineHeight: `${size}px`
841
- }
842
- }, [c]);
843
- })]), createVNode("div", {
844
- "class": "slider-mask",
845
- "onMousedown": handleMouseDown,
846
- "onMousemove": handleMouseMove,
847
- "onMouseup": handleMouseUp,
848
- "onMouseout": handleMouseUp
849
- }, null)]);
850
- };
851
- }
852
- });
853
- var index$3 = "";
854
- const TimePicker = defineComponent({
855
- props: {
856
- time: {
857
- type: Date
858
- }
859
- },
860
- setup(props) {
861
- const {
862
- time = new Date()
863
- } = props || {};
864
- const state = reactive({
865
- hour: time.getHours(),
866
- minute: time.getMinutes(),
867
- second: time.getSeconds()
868
- });
869
- const hours = Array(24).fill(0).map((_, i) => `${i}`.padStart(2, "0"));
870
- const minutes = Array(60).fill(0).map((_, i) => `${i}`.padStart(2, "0"));
871
- return () => {
872
- return createVNode("div", {
873
- "class": "devui-calendar-timepicker"
874
- }, [createVNode("div", {
875
- "class": "head"
876
- }, [createVNode("div", {
877
- "class": "chars"
878
- }, [createVNode("span", null, [state.hour.toString().padStart(2, "0"), createTextVNode(":"), state.minute.toString().padStart(2, "0"), createTextVNode(":"), state.second.toString().padStart(2, "0")])])]), createVNode("div", {
879
- "class": "select"
880
- }, [createVNode(VerticalSlider, {
881
- "items": hours,
882
- "selectedIndex": state.hour,
883
- "onChange": (_, idx) => state.hour = idx
884
- }, null), createVNode(VerticalSlider, {
885
- "items": minutes,
886
- "selectedIndex": state.minute,
887
- "onChange": (_, idx) => state.minute = idx
888
- }, null), createVNode(VerticalSlider, {
889
- "items": minutes,
890
- "selectedIndex": state.second,
891
- "onChange": (_, idx) => state.second = idx
892
- }, null)])]);
893
- };
894
- }
895
- });
896
- var index$2 = "";
897
- const Calendar = (props) => {
898
- const {
899
- showTime = false
900
- } = props;
901
- let {
902
- current
903
- } = props;
904
- if (!(current instanceof Date)) {
905
- current = new Date();
906
- }
907
- if (props.type === "range") {
908
- let {
909
- next
910
- } = props;
911
- if (!(next instanceof Date)) {
912
- next = new Date(current.getFullYear(), current.getMonth() + 1, 1);
913
- }
914
- return createVNode("div", {
915
- "class": "devui-calendar-container"
916
- }, [createVNode(CalendarDatePanel, mergeProps(props, {
917
- "pos": 0,
918
- "current": current,
919
- "compare": next
920
- }), null), showTime ? createVNode(TimePicker, {
921
- "time": current
922
- }, null) : null, createVNode(CalendarDatePanel, mergeProps(props, {
923
- "pos": 1,
924
- "current": next,
925
- "compare": current
926
- }), null), showTime ? createVNode(TimePicker, {
927
- "time": next
928
- }, null) : null]);
929
- } else {
930
- return createVNode("div", {
931
- "class": "devui-calendar-container"
932
- }, [createVNode(CalendarDatePanel, mergeProps(props, {
933
- "pos": 0,
934
- "current": current
935
- }), null), showTime ? createVNode(TimePicker, {
936
- "time": current
937
- }, null) : null]);
938
- }
939
- };
940
- var datePicker = "";
941
- const formatRange = (state) => {
942
- const [start, end] = [state.start, state.end].sort((a, b) => a.getTime() - b.getTime());
943
- state.start = start;
944
- state.end = end;
945
- if (compareDateSort(start, end, "m") !== 0) {
946
- state.current = start;
947
- state.next = end;
948
- } else {
949
- if (compareDateSort(start, state.current) < 0) {
950
- state.current = start;
951
- }
952
- if (compareDateSort(state.next, end) < 0) {
953
- state.next = end;
954
- }
955
- }
956
- };
957
- var DatePicker = defineComponent({
958
- name: "DDatepicker",
959
- props: {
960
- selectedDateChange: {
961
- type: Function
962
- },
963
- autoClose: {
964
- type: Boolean,
965
- default: false
966
- },
967
- range: {
968
- type: Boolean,
969
- default: false
970
- },
971
- showTime: {
972
- type: Boolean,
973
- default: false
974
- },
975
- format: {
976
- type: String,
977
- default: "y/MM/dd"
978
- },
979
- rangeSpliter: {
980
- type: String,
981
- default: "-"
982
- },
983
- attachInputDom: {
984
- type: String
985
- },
986
- dateMin: {
987
- type: String
988
- },
989
- dateMax: {
990
- type: String
991
- }
992
- },
993
- setup(props) {
994
- const panel = ref(null);
995
- const input2 = ref(null);
996
- const current = parseDate(props.dateMin) || new Date();
997
- const next = new Date(current.getFullYear(), current.getMonth() + 1, 1);
998
- const state = reactive({
999
- show: false,
1000
- value: "",
1001
- placeholder: formatPlaceholder(props),
1002
- current,
1003
- next
1004
- });
1005
- state.value = formatValue(state, props);
1006
- state.placeholder = formatPlaceholder(props);
1007
- const documentClick = (e) => {
1008
- e.stopPropagation();
1009
- if (isIn(e.target, panel.value) || isIn(e.target, input2.value)) {
1010
- return;
1011
- }
1012
- state.show = false;
1013
- };
1014
- onMounted(() => {
1015
- document.addEventListener("click", documentClick);
1016
- });
1017
- onUnmounted(() => {
1018
- document.removeEventListener("click", documentClick);
1019
- });
1020
- return () => {
1021
- return createVNode("div", {
1022
- "class": "devui-datepicker-container"
1023
- }, [createVNode("div", {
1024
- "class": "input-container",
1025
- "ref": input2
1026
- }, [createVNode(Input, {
1027
- "ref": input2,
1028
- "class": "datepicker-input",
1029
- "modelValue": state.value,
1030
- "placeholder": state.placeholder,
1031
- "onFocus": () => state.show = true
1032
- }, null), createVNode(Icon, {
1033
- "size": "small",
1034
- "name": "calendar",
1035
- "class": "datepicker-input-icon"
1036
- }, null)]), createVNode("div", {
1037
- "class": "devui-datepicker-panel",
1038
- "ref": panel
1039
- }, [state.show ? createVNode(Calendar, {
1040
- "type": props.range ? "range" : "select",
1041
- "showTime": props.showTime,
1042
- "current": state.current,
1043
- "next": state.next,
1044
- "dateMin": parseDate(props.dateMin),
1045
- "dateMax": parseDate(props.dateMax),
1046
- "dateStart": state.start,
1047
- "dateEnd": state.end,
1048
- "dateHover": state.hover,
1049
- "onReset": (date) => {
1050
- state.end = state.hover = void 0;
1051
- state.start = date;
1052
- },
1053
- "onChange": () => {
1054
- state.value = formatValue(state, props);
1055
- state.placeholder = formatPlaceholder(props);
1056
- invokeFunction(props.selectedDateChange, state.value);
1057
- if (props.autoClose) {
1058
- state.show = false;
1059
- }
1060
- },
1061
- "onToday": (date) => {
1062
- state.current = date;
1063
- state.start = date;
1064
- state.value = formatValue(state, props);
1065
- state.placeholder = formatPlaceholder(props);
1066
- invokeFunction(props.selectedDateChange, state.value);
1067
- if (props.autoClose) {
1068
- state.show = false;
1069
- }
1070
- },
1071
- "onSelected": (date) => {
1072
- state.start = date;
1073
- if (compareDateSort(state.current, date) !== 0) {
1074
- state.current = date;
1075
- }
1076
- },
1077
- "onSelectStart": (date) => state.start = date,
1078
- "onSelectEnd": (date) => {
1079
- state.end = date;
1080
- formatRange(state);
1081
- },
1082
- "onSelecting": (date) => state.hover = date,
1083
- "onPreviousYear": (date, pos) => handleCalendarSwitchState(state, 0, pos, date),
1084
- "onPreviousMonth": (date, pos) => handleCalendarSwitchState(state, 1, pos, date),
1085
- "onNextMonth": (date, pos) => handleCalendarSwitchState(state, 2, pos, date),
1086
- "onNextYear": (date, pos) => handleCalendarSwitchState(state, 3, pos, date)
1087
- }, null) : null])]);
1088
- };
1089
- }
1090
- });
1091
- var index$1 = "";
1092
- const StickSlider = defineComponent({
1093
- name: "DStickSlider",
1094
- props: {},
1095
- setup() {
1096
- const state = reactive({
1097
- showButtons: false,
1098
- selectedIndex: 0
1099
- });
1100
- const reset = () => {
1101
- state.showButtons = false;
1102
- };
1103
- const handleMainButtonMouseDown = (e) => {
1104
- e.stopPropagation();
1105
- state.showButtons = true;
1106
- };
1107
- const handleMainButtonMouseUp = (e) => {
1108
- e.stopPropagation();
1109
- reset();
1110
- };
1111
- return () => {
1112
- return createVNode("div", {
1113
- "class": "devui-stick-slider",
1114
- "onMousedown": handleMainButtonMouseDown,
1115
- "onMouseup": handleMainButtonMouseUp,
1116
- "onMouseleave": handleMainButtonMouseUp
1117
- }, [createVNode("div", {
1118
- "class": "sub-buttons",
1119
- "style": {
1120
- display: state.showButtons ? "" : "none"
1121
- }
1122
- }, [Array(16).fill(null).map((_, i) => {
1123
- return createVNode("div", {
1124
- "class": `button ${i === state.selectedIndex ? "selected" : ""}`,
1125
- "onMouseenter": () => state.selectedIndex = i
1126
- }, [i]);
1127
- })]), createVNode("div", {
1128
- "class": "main-button"
1129
- }, null)]);
1130
- };
1131
- }
1132
- });
1133
- DatePicker.install = function(app) {
1134
- app.component(DatePicker.name, DatePicker);
1135
- app.component(StickSlider.name, StickSlider);
1136
- };
1137
- var index = {
1138
- title: "DatePicker \u65E5\u671F\u9009\u62E9\u5668",
1139
- category: "\u6570\u636E\u5F55\u5165",
1140
- status: "50%",
1141
- install(app) {
1142
- app.use(DatePicker);
1143
- }
1144
- };
1145
- export { DatePicker, StickSlider, index as default };