snail.vue 2.0.13 → 2.0.15

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.
@@ -5,8 +5,8 @@
5
5
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SnailVue = global.SnailVue || {}, global.Vue, global.Snail, global.SnailView));
6
6
  })(this, (function (exports, vue, snail_core, snail_view) { 'use strict';
7
7
 
8
- const _hoisted_1$k = ["title"];
9
- var _sfc_main$B = vue.defineComponent({
8
+ const _hoisted_1$l = ["title"];
9
+ var _sfc_main$A = vue.defineComponent({
10
10
  ...{
11
11
  name: "Button",
12
12
  inheritAttrs: true
@@ -22,15 +22,11 @@
22
22
  return vue.openBlock(), vue.createElementBlock("div", {
23
23
  class: vue.normalizeClass(["snail-button", [__props.size, __props.type]]),
24
24
  title: __props.title
25
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$k);
25
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$l);
26
26
  };
27
27
  }
28
28
  });
29
29
 
30
- var addLink = href => setTimeout(snail_view.link.register, 0, href);
31
-
32
- addLink("/styles/snail.vue.vue.css");
33
-
34
30
  function getSvgDraw(iconType, draw) {
35
31
  switch (iconType) {
36
32
  case "success":
@@ -53,6 +49,8 @@
53
49
  return ["M651.3 514.2c0 8.2-3.1 16.4-9.4 22.6L426.4 752.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L574 514.2 381.1 321.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l215.5 215.5c6.2 6.3 9.4 14.5 9.4 22.6z"];
54
50
  case "datepicker":
55
51
  return ["M848.9 118h-93.5c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8H363.3c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8h-96.6C98.8 118 37 179.8 37 256.1v599.8C37 932.2 98.8 994 175.1 994h673.7c76.3 0 138.1-61.8 138.1-138.1V256.1c0.1-76.3-61.7-138.1-138-138.1zM97 256.1c0-43.2 35-78.1 78.1-78.1h96.6c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h300.5c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h93.5c43.2 0 78.1 35 78.1 78.1v45.4c0 11.4-9.2 20.6-20.6 20.6H117.6c-11.4 0-20.6-9.2-20.6-20.6v-45.4zM927 856c0 43.2-35 78.1-78.1 78.1H175.1c-43.1 0-78.1-35-78.1-78.1V402.7c0-11.4 9.2-20.6 20.6-20.6h788.9c11.4 0 20.6 9.2 20.6 20.6L927 856z", "M240.3 586.1H306c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM479.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30 0.1 16.6 13.5 30 30 30zM718.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM312 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H312c16.5 0 30-13.4 30-30s-13.4-30-30-30zM551 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H551c16.5 0 30-13.4 30-30-0.1-16.6-13.5-30-30-30zM789.9 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30h65.7c16.5 0 30-13.4 30-30s-13.4-30-30-30z"];
52
+ case "timepicker":
53
+ return ["M511.3 926.5c-55.9 0-110.2-11-161.2-32.6-49.3-20.9-93.6-50.7-131.7-88.8-38-38-67.9-82.3-88.8-131.7C108 622.3 97 568.1 97 512.2S108 402 129.6 351c20.9-49.3 50.7-93.6 88.8-131.7 38-38 82.3-67.9 131.7-88.8C401.2 108.9 455.4 98 511.3 98s110.2 11 161.2 32.6c49.3 20.9 93.6 50.7 131.7 88.8 38 38 67.9 82.3 88.8 131.7 21.6 51.1 32.6 105.3 32.6 161.2s-11 110.2-32.6 161.2c-20.9 49.3-50.7 93.6-88.8 131.7s-82.3 67.9-131.7 88.8c-51 21.5-105.3 32.5-161.2 32.5z m0-768.5C316 158 157.1 316.9 157.1 512.2S316 866.5 511.3 866.5s354.2-158.9 354.2-354.2S706.7 158 511.3 158z", "M640.1 702.1c-7.7 0-15.3-2.9-21.2-8.8l-128-127.9c-5.6-5.6-8.8-13.3-8.8-21.2V288c0-16.6 13.4-30 30-30s30 13.4 30 30v243.8l119.2 119.1c11.7 11.7 11.7 30.7 0 42.4-5.8 5.9-13.5 8.8-21.2 8.8z"];
56
54
  case "plus":
57
55
  return ["M 768 469.333 h -213.333 V 256 c 0 -25.6 -17.0667 -42.6667 -42.6667 -42.6667 s -42.6667 17.0667 -42.6667 42.6667 v 213.333 H 256 c -25.6 0 -42.6667 17.0667 -42.6667 42.6667 s 17.0667 42.6667 42.6667 42.6667 h 213.333 v 213.333 c 0 25.6 17.0667 42.6667 42.6667 42.6667 s 42.6667 -17.0667 42.6667 -42.6667 v -213.333 h 213.333 c 25.6 0 42.6667 -17.0667 42.6667 -42.6667 s -17.0667 -42.6667 -42.6667 -42.6667 Z"];
58
56
  case "subtract":
@@ -69,10 +67,10 @@
69
67
  }
70
68
  }
71
69
 
72
- const _hoisted_1$j = ["viewBox", "width", "height"];
70
+ const _hoisted_1$k = ["viewBox", "width", "height"];
73
71
  const _hoisted_2$c = ["textContent"];
74
72
  const _hoisted_3$a = ["fill", "stroke", "stroke-width", "d"];
75
- var _sfc_main$A = vue.defineComponent({
73
+ var _sfc_main$z = vue.defineComponent({
76
74
  ...{
77
75
  name: "Icon",
78
76
  inheritAttrs: true
@@ -110,16 +108,16 @@
110
108
  "stroke-width": __props.strokeWidth,
111
109
  d
112
110
  }, null, 8, _hoisted_3$a);
113
- }), 256))], 46, _hoisted_1$j);
111
+ }), 256))], 46, _hoisted_1$k);
114
112
  };
115
113
  }
116
114
  });
117
115
 
118
- const _hoisted_1$i = ["title", "onClick"];
116
+ const _hoisted_1$j = ["title", "onClick"];
119
117
  const _hoisted_2$b = ["type", "checked"];
120
118
  const _hoisted_3$9 = ["textContent"];
121
119
  const _hoisted_4$7 = ["textContent"];
122
- var _sfc_main$z = vue.defineComponent({
120
+ var _sfc_main$y = vue.defineComponent({
123
121
  ...{
124
122
  name: "Choose",
125
123
  inheritAttrs: true
@@ -198,7 +196,7 @@
198
196
  }, null, 8, _hoisted_2$b)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
199
197
  key: 1,
200
198
  class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
201
- }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
199
+ }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
202
200
  key: 0,
203
201
  type: "success",
204
202
  size: 12,
@@ -211,168 +209,15 @@
211
209
  key: 3,
212
210
  class: "item-des",
213
211
  textContent: vue.toDisplayString(node.item.description)
214
- }, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$i);
212
+ }, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$j);
215
213
  }), 128))], 2);
216
214
  };
217
215
  }
218
216
  });
219
217
 
220
- const _hoisted_1$h = ["id"];
221
- var _sfc_main$y = vue.defineComponent({
222
- __name: "datepicker",
223
- props: {
224
- type: {},
225
- range: {
226
- type: Boolean
227
- },
228
- format: {},
229
- begin: {},
230
- end: {},
231
- min: {},
232
- max: {},
233
- zIndex: {},
234
- timeDisabled: {
235
- type: Boolean
236
- },
237
- secondDisabled: {
238
- type: Boolean
239
- },
240
- cleanDisabled: {
241
- type: Boolean
242
- },
243
- nowDisabled: {
244
- type: Boolean
245
- },
246
- submitDisabled: {
247
- type: Boolean
248
- },
249
- width: {},
250
- height: {},
251
- behindTop: {}
252
- },
253
- emits: ["change", "picker-focus", "picker-blur"],
254
- setup(__props, _ref) {
255
- let {
256
- expose: __expose,
257
- emit: __emit
258
- } = _ref;
259
- const props = __props;
260
- const emits = __emit;
261
- const {
262
- onInterval,
263
- onTimeout
264
- } = snail_core.useTimer();
265
- const {
266
- range
267
- } = props;
268
- const format = props.format || "yyyy-MM-dd";
269
- const id = `DP${snail_core.newId()}`.toUpperCase();
270
- var pickerInitialTimer = void 0;
271
- var pickerLastStatus = void 0;
272
- var pickerStatusTimer = void 0;
273
- const pickerStatusArray = [];
274
- __expose({
275
- showPicker
276
- });
277
- function initZanePopup(flag) {
278
- const obj = window[flag] ? window[flag].$obj : void 0;
279
- if (obj) {
280
- obj.removeEventListener("mouseenter", onZanePopupFocus);
281
- obj.removeEventListener("mouseleave", onZanePopupFocus);
282
- obj.addEventListener("mouseenter", onZanePopupFocus);
283
- obj.addEventListener("mouseleave", onZanePopupFocus);
284
- return true;
285
- }
286
- }
287
- function destroyZanePopup(flag) {
288
- if (window[flag]) {
289
- window[flag].removeCalendar && window[flag].removeCalendar();
290
- delete window[flag];
291
- }
292
- }
293
- function showPicker(delay) {
294
- const div = document.getElementById(id);
295
- div && (delay > 0 ? onTimeout(() => div.click(), delay) : div.click());
296
- }
297
- function onClick() {
298
- if (pickerInitialTimer && pickerInitialTimer.destroyed != true) {
299
- return;
300
- }
301
- pickerInitialTimer = onInterval(() => {
302
- let counter = 0;
303
- initZanePopup(id) && counter++;
304
- range && initZanePopup(`${id}DOUBLE`) && counter++;
305
- counter == (range ? 2 : 1) && pickerInitialTimer.destroy();
306
- }, 10);
307
- const timeoutScope = onTimeout(() => pickerInitialTimer.destroyed || pickerInitialTimer.destroy(), 5e3);
308
- pickerInitialTimer.onDestroy(() => timeoutScope.destroyed || timeoutScope.destroy());
309
- }
310
- function onZaneMounted() {}
311
- function onZanePopupFocus(e) {
312
- const type = e.type == "mouseenter" ? "focus" : "blur";
313
- pickerStatusArray.push(type);
314
- pickerStatusTimer && pickerStatusTimer.destroy();
315
- pickerStatusTimer = onTimeout(() => {
316
- const lastStatus = snail_core.getFromArray(pickerStatusArray, -1);
317
- lastStatus && pickerLastStatus != lastStatus && emits(`picker-${lastStatus}`);
318
- pickerLastStatus = lastStatus;
319
- pickerStatusTimer = void 0;
320
- pickerStatusArray.splice(0);
321
- }, 0);
322
- }
323
- function onZaneDone(full, begin, end) {
324
- if (format.includes("-") == true) {
325
- begin && (begin = begin.replaceAll("/", "-"));
326
- end && (end = end.replaceAll("/", "-"));
327
- }
328
- emits("change", begin, end);
329
- }
330
- snail_view.link.register("/styles/zane-calendar.css");
331
- vue.onMounted(() => {
332
- snail_core.script.has("zane-calendar") || snail_core.throwError(`zane-calendar module unregistered.`);
333
- const zaneOptions = {
334
- elem: `#${id}`,
335
- type: `${range ? "double" : ""}${props.type || "day"}`,
336
- format,
337
- begintime: props.begin || "",
338
- endtime: props.end || "",
339
- min: props.min || "1900-10-01",
340
- max: props.max || "",
341
- zindex: props.zIndex || 1e4,
342
- showtime: props.timeDisabled != true,
343
- showsecond: props.secondDisabled != true,
344
- showclean: props.cleanDisabled != true,
345
- shownow: props.nowDisabled != true,
346
- showsubmit: props.submitDisabled != true,
347
- width: props.width || 280,
348
- height: props.height || 300,
349
- behindTop: props.behindTop || 4,
350
- lang: "cn",
351
- event: "click",
352
- position: "fixed",
353
- haveBotBtns: true,
354
- mounted: onZaneMounted,
355
- done: onZaneDone
356
- };
357
- snail_core.script.load("zane-calendar").then(calendar => {
358
- console.log(zaneOptions);
359
- snail_core.isFunction(calendar) || snail_core.throwError("load zane-calendar failed: value is not a function.");
360
- calendar(zaneOptions);
361
- }, reason => snail_core.throwError(reason));
362
- });
363
- vue.onUnmounted(() => {
364
- destroyZanePopup(id);
365
- range && destroyZanePopup(`${id}DOUBLE`);
366
- });
367
- return (_ctx, _cache) => {
368
- return vue.openBlock(), vue.createElementBlock("div", {
369
- class: "snail-datepicker",
370
- id: vue.unref(id),
371
- onClick
372
- }, null, 8, _hoisted_1$h);
373
- };
374
- }
375
- });
218
+ var addLink = href => setTimeout(snail_view.link.register, 0, href);
219
+
220
+ addLink("/styles/snail.vue.vue.css");
376
221
 
377
222
  var _sfc_main$x = vue.defineComponent({
378
223
  ...{
@@ -405,13 +250,13 @@
405
250
  class: vue.normalizeClass(["snail-footer", {
406
251
  "start-divider": __props.divider
407
252
  }, __props.align || "right"])
408
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
253
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
409
254
  key: 0,
410
255
  size: "max",
411
256
  type: "default",
412
257
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
413
258
  textContent: vue.toDisplayString(__props.cancelName || "取消")
414
- }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
259
+ }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
415
260
  key: 1,
416
261
  size: "max",
417
262
  type: "primary",
@@ -422,7 +267,7 @@
422
267
  }
423
268
  });
424
269
 
425
- const _hoisted_1$g = ["textContent"];
270
+ const _hoisted_1$i = ["textContent"];
426
271
  var _sfc_main$w = vue.defineComponent({
427
272
  ...{
428
273
  name: "Header",
@@ -462,7 +307,7 @@
462
307
  key: 0,
463
308
  textContent: vue.toDisplayString(__props.title),
464
309
  class: vue.normalizeClass(["header-title", __props.titleAlign])
465
- }, null, 10, _hoisted_1$g)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
310
+ }, null, 10, _hoisted_1$i)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
466
311
  key: 1,
467
312
  type: "close",
468
313
  size: 22,
@@ -474,7 +319,7 @@
474
319
  }
475
320
  });
476
321
 
477
- const _hoisted_1$f = ["textContent"];
322
+ const _hoisted_1$h = ["textContent"];
478
323
  const _hoisted_2$a = {
479
324
  key: 0,
480
325
  class: "required",
@@ -537,7 +382,7 @@
537
382
  }, [vue.createElementVNode("span", {
538
383
  class: "text",
539
384
  textContent: vue.toDisplayString(__props.title)
540
- }, null, 8, _hoisted_1$f), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$a)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
385
+ }, null, 8, _hoisted_1$h), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$a)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
541
386
  ref: "input-el",
542
387
  type: __props.type || "text",
543
388
  value: inputModel.value,
@@ -550,7 +395,7 @@
550
395
  key: 0,
551
396
  class: "validate",
552
397
  title: validateRef.value
553
- }, [vue.createVNode(_sfc_main$A, {
398
+ }, [vue.createVNode(_sfc_main$z, {
554
399
  type: "error",
555
400
  size: 16,
556
401
  color: "red"
@@ -759,7 +604,7 @@
759
604
  return formatter;
760
605
  }
761
606
 
762
- const _hoisted_1$e = {
607
+ const _hoisted_1$g = {
763
608
  key: 0,
764
609
  class: "number-prefix"
765
610
  };
@@ -919,7 +764,7 @@
919
764
  "has-prefix": vue.unref(hasPrefix),
920
765
  "has-suffix": vue.unref(hasSuffix)
921
766
  }])
922
- }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createElementVNode("span", {
767
+ }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createElementVNode("span", {
923
768
  class: "ellipsis",
924
769
  textContent: vue.toDisplayString(vue.unref(prefix))
925
770
  }, null, 8, _hoisted_2$9)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
@@ -939,13 +784,13 @@
939
784
  }, [vue.createElementVNode("div", {
940
785
  class: "controls default subtract",
941
786
  onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
942
- }, [vue.createVNode(_sfc_main$A, {
787
+ }, [vue.createVNode(_sfc_main$z, {
943
788
  type: "subtract",
944
789
  size: 20
945
790
  })]), vue.createElementVNode("div", {
946
791
  class: "controls default plus",
947
792
  onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
948
- }, [vue.createVNode(_sfc_main$A, {
793
+ }, [vue.createVNode(_sfc_main$z, {
949
794
  type: "plus",
950
795
  size: 20
951
796
  })])], 64)) : vue.unref(controls) == "right" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
@@ -953,14 +798,14 @@
953
798
  }, [vue.createElementVNode("div", {
954
799
  class: "controls right plus",
955
800
  onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
956
- }, [vue.createVNode(_sfc_main$A, {
801
+ }, [vue.createVNode(_sfc_main$z, {
957
802
  type: "arrow",
958
803
  size: 20,
959
804
  rotate: 270
960
805
  })]), vue.createElementVNode("div", {
961
806
  class: "controls right subtract",
962
807
  onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
963
- }, [vue.createVNode(_sfc_main$A, {
808
+ }, [vue.createVNode(_sfc_main$z, {
964
809
  type: "arrow",
965
810
  size: 20,
966
811
  rotate: 90
@@ -982,7 +827,7 @@
982
827
  }
983
828
  });
984
829
 
985
- const _hoisted_1$d = ["placeholder", "readonly"];
830
+ const _hoisted_1$f = ["placeholder", "readonly"];
986
831
  const searchIon = "M 860.16 824.32 l -163.84 -163.84 c 102.4 -120.32 97.28 -302.08 -17.92 -414.72 c -120.32 -120.32 -314.88 -120.32 -435.2 0 c -120.32 120.32 -120.32 314.88 0 435.2 c 112.64 112.64 294.4 120.32 414.72 17.92 l 163.84 163.84 c 10.24 10.24 25.6 10.24 35.84 0 c 12.8 -12.8 12.8 -28.16 2.56 -38.4 Z M 281.6 642.56 C 181.76 542.72 181.76 381.44 281.6 281.6 c 99.84 -99.84 261.12 -99.84 360.96 0 c 99.84 99.84 99.84 261.12 0 360.96 c -99.84 102.4 -261.12 102.4 -360.96 0 Z";
987
832
  var _sfc_main$t = vue.defineComponent({
988
833
  ...{
@@ -1029,9 +874,9 @@
1029
874
  readonly: __props.readonly,
1030
875
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
1031
876
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
1032
- }, null, 40, _hoisted_1$d), [[vue.vModelText, textModel.value, void 0, {
877
+ }, null, 40, _hoisted_1$f), [[vue.vModelText, textModel.value, void 0, {
1033
878
  trim: true
1034
- }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$A, {
879
+ }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$z, {
1035
880
  class: "search-button",
1036
881
  type: "custom",
1037
882
  draw: searchIon,
@@ -1252,7 +1097,7 @@
1252
1097
  }
1253
1098
  }
1254
1099
 
1255
- const _hoisted_1$c = {
1100
+ const _hoisted_1$e = {
1256
1101
  class: "snail-confirm flex-column"
1257
1102
  };
1258
1103
  const _hoisted_2$8 = ["innerHTML"];
@@ -1284,7 +1129,7 @@
1284
1129
  },
1285
1130
  setup(__props) {
1286
1131
  return (_ctx, _cache) => {
1287
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createVNode(_sfc_main$w, {
1132
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createVNode(_sfc_main$w, {
1288
1133
  "use-to": "dialog",
1289
1134
  title: __props.title || "提示",
1290
1135
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
@@ -1304,7 +1149,104 @@
1304
1149
  }
1305
1150
  });
1306
1151
 
1152
+ const MOTION = Object.freeze({
1153
+ "fade": {
1154
+ enter: "fade-in",
1155
+ leave: "fade-out"
1156
+ },
1157
+ "scale": {
1158
+ enter: "scale-in",
1159
+ leave: "scale-out"
1160
+ },
1161
+ "rotate": {
1162
+ enter: "rotate-in",
1163
+ leave: "rotate-out"
1164
+ },
1165
+ "top": {
1166
+ enter: "top-in",
1167
+ leave: "top-out"
1168
+ },
1169
+ "topBottom": {
1170
+ enter: "top-in",
1171
+ leave: "bottom-out"
1172
+ },
1173
+ "bottom": {
1174
+ enter: "bottom-in",
1175
+ leave: "bottom-out"
1176
+ },
1177
+ "bottomTop": {
1178
+ enter: "bottom-in",
1179
+ leave: "top-out"
1180
+ },
1181
+ "left": {
1182
+ enter: "left-in",
1183
+ leave: "left-out"
1184
+ },
1185
+ "leftRight": {
1186
+ enter: "left-in",
1187
+ leave: "right-out"
1188
+ },
1189
+ "right": {
1190
+ enter: "right-in",
1191
+ leave: "right-out"
1192
+ },
1193
+ "rightLeft": {
1194
+ enter: "right-in",
1195
+ leave: "left-out"
1196
+ }
1197
+ });
1198
+ for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
1199
+
1307
1200
  var _sfc_main$r = vue.defineComponent({
1201
+ __name: "motion",
1202
+ props: {
1203
+ multiple: {
1204
+ type: Boolean
1205
+ },
1206
+ effect: {},
1207
+ duration: {},
1208
+ mode: {}
1209
+ },
1210
+ setup(__props) {
1211
+ const props = __props;
1212
+ const durationRef = vue.computed(() => {
1213
+ const number = snail_core.correctNumber(props.duration, 200);
1214
+ return number > 0 ? number : 0;
1215
+ });
1216
+ const motionClassRef = vue.computed(buildMotionClass);
1217
+ function buildMotionClass() {
1218
+ const effectClass = Object.create(null);
1219
+ if (durationRef.value > 0) {
1220
+ if (snail_core.isString(props.effect) == false) {
1221
+ const effect = props.effect || MOTION.fade;
1222
+ effectClass.enterActiveClass = effect.enter;
1223
+ effectClass.leaveActiveClass = effect.leave;
1224
+ } else if (props.effect.length > 0) {
1225
+ effectClass.enterActiveClass = `${props.effect} enter-active`;
1226
+ effectClass.enterFromClass = `${props.effect} enter-from`;
1227
+ effectClass.enterToClass = `${props.effect} enter-to`;
1228
+ effectClass.leaveActiveClass = `${props.effect} leave-active`;
1229
+ effectClass.leaveFromClass = `${props.effect} leave-from`;
1230
+ effectClass.leaveToClass = `${props.effect} leave-to`;
1231
+ }
1232
+ }
1233
+ return effectClass;
1234
+ }
1235
+ return (_ctx, _cache) => {
1236
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.multiple ? vue.TransitionGroup : vue.Transition), vue.mergeProps({
1237
+ appear: "",
1238
+ duration: durationRef.value
1239
+ }, __props.multiple ? void 0 : {
1240
+ mode: __props.mode
1241
+ }, motionClassRef.value), {
1242
+ default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
1243
+ _: 3
1244
+ }, 16, ["duration"]);
1245
+ };
1246
+ }
1247
+ });
1248
+
1249
+ var _sfc_main$q = vue.defineComponent({
1308
1250
  ...{
1309
1251
  name: "Loading",
1310
1252
  inheritAttrs: true
@@ -1328,8 +1270,8 @@
1328
1270
  },
1329
1271
  setup(__props) {
1330
1272
  return (_ctx, _cache) => {
1331
- return vue.openBlock(), vue.createBlock(vue.Transition, {
1332
- name: __props.transition
1273
+ return vue.openBlock(), vue.createBlock(_sfc_main$r, {
1274
+ effect: vue.unref(MOTION).fade
1333
1275
  }, {
1334
1276
  default: vue.withCtx(() => [__props.show ? (vue.openBlock(), vue.createElementBlock("div", {
1335
1277
  key: 0,
@@ -1338,12 +1280,12 @@
1338
1280
  }, __props.rootClass])
1339
1281
  }, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)))], 2)) : vue.createCommentVNode("", true)]),
1340
1282
  _: 3
1341
- }, 8, ["name"]);
1283
+ }, 8, ["effect"]);
1342
1284
  };
1343
1285
  }
1344
1286
  });
1345
1287
 
1346
- var _sfc_main$q = vue.defineComponent({
1288
+ var _sfc_main$p = vue.defineComponent({
1347
1289
  ...{
1348
1290
  name: "Dynamic",
1349
1291
  inheritAttrs: false
@@ -1367,7 +1309,7 @@
1367
1309
  const loadingComponent = vue.defineComponent({
1368
1310
  inheritAttrs: false,
1369
1311
  components: {
1370
- Loading: _sfc_main$r
1312
+ Loading: _sfc_main$q
1371
1313
  },
1372
1314
  template: "<Loading :mask-disabled='true' />"
1373
1315
  });
@@ -1434,7 +1376,7 @@
1434
1376
  }
1435
1377
  });
1436
1378
 
1437
- var _sfc_main$p = vue.defineComponent({
1379
+ var _sfc_main$o = vue.defineComponent({
1438
1380
  ...{
1439
1381
  name: "DialogContainer",
1440
1382
  inheritAttrs: true
@@ -1479,7 +1421,7 @@
1479
1421
  onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
1480
1422
  __props.options.closeOnMask && vue.unref(closePopup)();
1481
1423
  }, ["self"]))
1482
- }, [vue.createVNode(_sfc_main$q, vue.mergeProps({
1424
+ }, [vue.createVNode(_sfc_main$p, vue.mergeProps({
1483
1425
  class: "dialog-body",
1484
1426
  name: __props.options.name,
1485
1427
  component: __props.options.component,
@@ -1494,7 +1436,7 @@
1494
1436
  }
1495
1437
  });
1496
1438
 
1497
- var _sfc_main$o = vue.defineComponent({
1439
+ var _sfc_main$n = vue.defineComponent({
1498
1440
  ...{
1499
1441
  name: "FollowContainer",
1500
1442
  inheritAttrs: true
@@ -1615,7 +1557,7 @@
1615
1557
  });
1616
1558
  });
1617
1559
  return (_ctx, _cache) => {
1618
- return vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
1560
+ return vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
1619
1561
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1620
1562
  style: {
1621
1563
  "z-index": __props.zIndex
@@ -1632,7 +1574,7 @@
1632
1574
  }
1633
1575
  });
1634
1576
 
1635
- var _sfc_main$n = vue.defineComponent({
1577
+ var _sfc_main$m = vue.defineComponent({
1636
1578
  ...{
1637
1579
  name: "PopupContainer",
1638
1580
  inheritAttrs: true
@@ -1652,7 +1594,7 @@
1652
1594
  model = vue.shallowRef(void 0)
1653
1595
  } = __props.options;
1654
1596
  return (_ctx, _cache) => {
1655
- return vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
1597
+ return vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
1656
1598
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1657
1599
  style: {
1658
1600
  "z-index": __props.zIndex
@@ -1670,12 +1612,12 @@
1670
1612
  }
1671
1613
  });
1672
1614
 
1673
- const _hoisted_1$b = {
1615
+ const _hoisted_1$d = {
1674
1616
  key: 1,
1675
1617
  class: "icon"
1676
1618
  };
1677
1619
  const _hoisted_2$7 = ["innerHTML"];
1678
- var _sfc_main$m = vue.defineComponent({
1620
+ var _sfc_main$l = vue.defineComponent({
1679
1621
  ...{
1680
1622
  name: "ToastContainer",
1681
1623
  inheritAttrs: true
@@ -1713,7 +1655,7 @@
1713
1655
  }),
1714
1656
  onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
1715
1657
  onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
1716
- }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
1658
+ }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
1717
1659
  key: 0,
1718
1660
  class: "close-icon",
1719
1661
  type: "close",
@@ -1724,7 +1666,7 @@
1724
1666
  onClick: _cache[2] || (_cache[2] = $event => {
1725
1667
  vue.unref(closePopup)();
1726
1668
  })
1727
- }, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [vue.createVNode(_sfc_main$A, {
1669
+ }, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [vue.createVNode(_sfc_main$z, {
1728
1670
  type: vue.unref(props).type,
1729
1671
  fill: "#707070",
1730
1672
  size: 20
@@ -1738,7 +1680,7 @@
1738
1680
 
1739
1681
  function usePopup() {
1740
1682
  function popup(options) {
1741
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$n, options);
1683
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$m, options);
1742
1684
  return addScope2Scopes(scope);
1743
1685
  }
1744
1686
  function dialog(options) {
@@ -1771,7 +1713,7 @@
1771
1713
  },
1772
1714
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1773
1715
  });
1774
- const descriptor = openPopup(_sfc_main$p, options, extOptions);
1716
+ const descriptor = openPopup(_sfc_main$o, options, extOptions);
1775
1717
  scope = snail_core.useAsyncScope(deferred.promise);
1776
1718
  monitorDialog(descriptor, scope, deferred);
1777
1719
  }
@@ -1789,7 +1731,7 @@
1789
1731
  inPopup: "follow",
1790
1732
  target
1791
1733
  };
1792
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$o, options, extOptions);
1734
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$n, options, extOptions);
1793
1735
  }
1794
1736
  return addScope2Scopes(scope);
1795
1737
  }
@@ -1806,7 +1748,7 @@
1806
1748
  });
1807
1749
  }
1808
1750
  function toast(type, message, options) {
1809
- return popupInCustomContainer(_sfc_main$m, {
1751
+ return popupInCustomContainer(_sfc_main$l, {
1810
1752
  url: "#ToastContainer",
1811
1753
  props: {
1812
1754
  ...(options || Object.create(null)),
@@ -1839,7 +1781,7 @@
1839
1781
  },
1840
1782
  ...extOptions
1841
1783
  });
1842
- const descriptor = openPopup(container || _sfc_main$n, options, extOptions);
1784
+ const descriptor = openPopup(container || _sfc_main$m, options, extOptions);
1843
1785
  const scope = snail_core.useAsyncScope(deferred.promise);
1844
1786
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
1845
1787
  return scope;
@@ -1977,12 +1919,12 @@
1977
1919
  return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyREREODhFQ0M5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyREREODhFREM5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJEREQ4OEVBQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJEREQ4OEVCQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++keGxAAAA5lJREFUeNrsmktoE0EYx3eSTdpsk2abvnwcFBVp8QFqVPDgQaGgIogIoictelKKVhARBA8q+KAVrFqooh4qXgRfiHpTEHqw9iCKXqQHSVstpqlt0yabrP9p52K1yW72GTMf/JhZMrM7/3l+37REVVWhlMwjlJhxwVwwF8wFc8FcMBfsnIlGKg98TxRa9RbYAFYXUnl+XbjoRpiKXVXMU9qns3xK76CC/YC4QfA1MAg26aiTZGlQQ9la8AZ0g3VuENwLqsArsFVnXW+e30PgKVgGnoA+Nwi+Cw6DAHgGdmqoMwJoXJrJUcYPHoGN4C3Yl6e8rWv4Nmhma/kh2J6n/HW2JsdylLkKtoAPYAeYcPxYmmX32AjcAVHwPEfZFxreR2fAJ9Z5CbMaSYzceMxxDtN198vKo8Vt57ClYh0d4f/OtTTgOjpquaa8WEhldISM5DRYWYCXZdTS4DVoR9tSegdI9y6Nl1KBL5k/7JRto99HW/ZAtGralJ7DTtCPEUKUmqqKPlH0rtXgMZk2utms2jk0PEqPqt3gEOiybJdGjy5BcobmI7LUC7HrbRQ7HaR4PORoOBRoY+f0RbSp3spjqQNIPtEb8/vEqFMnixTwH0T6gPnwbZYIRk/uZWtHqApLQzaP7GyL1kSCPUinqIuKtjWZKhgvpFt1O82X+cXPXq9njdNHD2ZZC/aRTvZ4A20sN3OEz7IgXJDDkls8laV11aEBpHGaB62mCEbPNSA5QvNYO+88hDS6xcHABtbq9XiusMdTYJ4ZI3yBORdKZTBQ6zKnqq62OiQh7WdByzmjgqlzsWs6BAqW9xAiLHJdMECEY36f9zJ7pLt3oxHH4/j0O4kwWREoW8BuKvSYxG4utFoWjOoVHZErlg/+GP2I7ApwkgnXHy1h/VLntNJA76sROfgFI9CgoXh8OD72OJ3OHDA46Am4m3KhU7rSyJfRl2QiOaXVE3oPsU0mzPKw3RcAf5iiZEPaOkf9KsxcyVq7s1vu7SsZEQ5/LO81ydhk3I5Q05Y/tcQTExKLY/+9U2XV++PJVLMtZ7cdH0mlFfnnyPgIpm3s758y3Qj3NiNfY8sxlmeXNt2NhC/ej0grllXVdHIyVY/RbTD7G9iliZkXAIZsKqUspjjmjgolZlwwF1xigr8VoaYBI4I7ilBwl5Hw8JIwcx3aAha6XCj9t4ub4HzBjgfftLhgLpgL5oK5YC6YC+aCuWDt9luAAQC2EPxjL8cUkwAAAABJRU5ErkJggg==";
1978
1920
  }
1979
1921
 
1980
- const _hoisted_1$a = {
1922
+ const _hoisted_1$c = {
1981
1923
  class: "snail-empty"
1982
1924
  };
1983
1925
  const _hoisted_2$6 = ["src"];
1984
1926
  const _hoisted_3$6 = ["textContent"];
1985
- var _sfc_main$l = vue.defineComponent({
1927
+ var _sfc_main$k = vue.defineComponent({
1986
1928
  ...{
1987
1929
  name: "Empty",
1988
1930
  inheritAttrs: true
@@ -1995,7 +1937,7 @@
1995
1937
  setup(__props) {
1996
1938
  const defaultImageBase64 = getNoDataBase64Image();
1997
1939
  return (_ctx, _cache) => {
1998
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("img", {
1940
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createElementVNode("img", {
1999
1941
  src: __props.imageUrl || vue.unref(defaultImageBase64)
2000
1942
  }, null, 8, _hoisted_2$6), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
2001
1943
  class: "message",
@@ -2005,13 +1947,13 @@
2005
1947
  }
2006
1948
  });
2007
1949
 
2008
- const _hoisted_1$9 = ["title"];
1950
+ const _hoisted_1$b = ["title"];
2009
1951
  const _hoisted_2$5 = ["textContent"];
2010
1952
  const _hoisted_3$5 = {
2011
1953
  key: 1,
2012
1954
  class: "select-status"
2013
1955
  };
2014
- var _sfc_main$k = vue.defineComponent({
1956
+ var _sfc_main$j = vue.defineComponent({
2015
1957
  ...{
2016
1958
  name: "SelectNode",
2017
1959
  inheritAttrs: true
@@ -2056,15 +1998,15 @@
2056
1998
  }, [vue.createElementVNode("div", {
2057
1999
  class: "item-text ellipsis",
2058
2000
  textContent: vue.toDisplayString(__props.item.text)
2059
- }, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
2001
+ }, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
2060
2002
  key: 0,
2061
2003
  type: "arrow",
2062
2004
  color: "#8a9099"
2063
- })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$A, {
2005
+ })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$z, {
2064
2006
  type: "success",
2065
2007
  color: "white",
2066
2008
  size: 12
2067
- })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$9)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2009
+ })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$b)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2068
2010
  key: 1
2069
2011
  }, vue.renderList(vue.unref(showChildrenRef), child => {
2070
2012
  return vue.openBlock(), vue.createBlock(_component_SelectNode, {
@@ -2081,7 +2023,7 @@
2081
2023
  }
2082
2024
  });
2083
2025
 
2084
- var _sfc_main$j = vue.defineComponent({
2026
+ var _sfc_main$i = vue.defineComponent({
2085
2027
  ...{
2086
2028
  name: "Select2Popup",
2087
2029
  inheritAttrs: true
@@ -2259,7 +2201,7 @@
2259
2201
  onSearch,
2260
2202
  key: "select-search"
2261
2203
  }), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
2262
- return vue.openBlock(), vue.createBlock(_sfc_main$k, {
2204
+ return vue.openBlock(), vue.createBlock(_sfc_main$j, {
2263
2205
  key: vue.unref(context).getKey(item),
2264
2206
  multiple: __props.multiple,
2265
2207
  item,
@@ -2268,7 +2210,7 @@
2268
2210
  onEnter: onEnterSelectNode,
2269
2211
  onClick: onClickSelectNode
2270
2212
  }, null, 8, ["multiple", "item", "context"]);
2271
- }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
2213
+ }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$k, {
2272
2214
  key: 1,
2273
2215
  message: "无结果"
2274
2216
  })) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2280,7 +2222,7 @@
2280
2222
  }
2281
2223
  });
2282
2224
 
2283
- const _hoisted_1$8 = {
2225
+ const _hoisted_1$a = {
2284
2226
  key: 0,
2285
2227
  class: "select-result"
2286
2228
  };
@@ -2291,9 +2233,9 @@
2291
2233
  class: "placeholder"
2292
2234
  };
2293
2235
  onAppCreated((app, type) => {
2294
- type == "popup" && app.component("SelectPopup", _sfc_main$j);
2236
+ type == "popup" && app.component("SelectPopup", _sfc_main$i);
2295
2237
  });
2296
- var _sfc_main$i = vue.defineComponent({
2238
+ var _sfc_main$h = vue.defineComponent({
2297
2239
  ...{
2298
2240
  name: "Select",
2299
2241
  inheritAttrs: true
@@ -2425,7 +2367,7 @@
2425
2367
  ref: "select"
2426
2368
  }, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2427
2369
  key: 0
2428
- }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2370
+ }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2429
2371
  class: "select-text ellipsis",
2430
2372
  title: selectedTextRef.value,
2431
2373
  textContent: vue.toDisplayString(selectedTextRef.value)
@@ -2433,7 +2375,7 @@
2433
2375
  key: 1,
2434
2376
  class: "placeholder",
2435
2377
  textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2436
- }, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
2378
+ }, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
2437
2379
  key: 2,
2438
2380
  type: "arrow",
2439
2381
  size: 24,
@@ -2446,7 +2388,7 @@
2446
2388
  }
2447
2389
  });
2448
2390
 
2449
- var _sfc_main$h = vue.defineComponent({
2391
+ var _sfc_main$g = vue.defineComponent({
2450
2392
  ...{
2451
2393
  name: "Switch",
2452
2394
  inheritAttrs: true
@@ -2495,8 +2437,8 @@
2495
2437
  }
2496
2438
  });
2497
2439
 
2498
- const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
2499
- var _sfc_main$g = vue.defineComponent({
2440
+ const _hoisted_1$9 = ["readonly", "placeholder", "rows"];
2441
+ var _sfc_main$f = vue.defineComponent({
2500
2442
  ...{
2501
2443
  name: "Textarea"
2502
2444
  },
@@ -2556,87 +2498,12 @@
2556
2498
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2557
2499
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2558
2500
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2559
- }), null, 16, _hoisted_1$7)), [[vue.vModelText, valueModel.value]]);
2560
- };
2561
- }
2562
- });
2563
-
2564
- var _sfc_main$f = vue.defineComponent({
2565
- __name: "transitions",
2566
- props: {
2567
- group: {
2568
- type: Boolean
2569
- },
2570
- duration: {},
2571
- customClass: {},
2572
- effect: {}
2573
- },
2574
- setup(__props) {
2575
- const props = __props;
2576
- const classNames = vue.computed(() => {
2577
- const array = [props.customClass || "snail-transition"];
2578
- if (snail_core.isArray(props.effect)) {
2579
- props.effect.length > 0 ? array.push(...props.effect) : array.push("fade");
2580
- } else {
2581
- array.push(props.effect || "fade");
2582
- }
2583
- props.duration === 0 && array.push("no-duration");
2584
- return array.join(" ");
2585
- });
2586
- return (_ctx, _cache) => {
2587
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.group ? vue.TransitionGroup : vue.Transition), {
2588
- appear: "",
2589
- duration: __props.duration,
2590
- "enter-active-class": `${classNames.value} enter-active`,
2591
- "enter-from-class": `${classNames.value} enter-from`,
2592
- "enter-to-class": `${classNames.value} enter-to`,
2593
- "leave-active-class": `${classNames.value} leave-active`,
2594
- "leave-from-class": `${classNames.value} leave-from`,
2595
- "leave-to-class": `${classNames.value} leave-to`
2596
- }, {
2597
- default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
2598
- _: 3
2599
- }, 8, ["duration", "enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
2501
+ }), null, 16, _hoisted_1$9)), [[vue.vModelText, valueModel.value]]);
2600
2502
  };
2601
2503
  }
2602
2504
  });
2603
2505
 
2604
- var _sfc_main$e = vue.defineComponent({
2605
- __name: "element",
2606
- props: {
2607
- tag: {},
2608
- show: {
2609
- type: Boolean
2610
- },
2611
- showMode: {},
2612
- transition: {},
2613
- children: {}
2614
- },
2615
- setup(__props) {
2616
- return (_ctx, _cache) => {
2617
- return vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
2618
- group: false
2619
- }, __props.transition, {
2620
- duration: __props.transition ? __props.transition.duration : 0
2621
- }), {
2622
- default: vue.withCtx(() => [(__props.showMode == "vShow" ? true : __props.show) ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(snail_core.correctString)(__props.tag, "div", true)), {
2623
- key: 0
2624
- }, {
2625
- default: vue.withCtx(() => [vue.createVNode(_sfc_main$f, vue.mergeProps(__props.children, {
2626
- duration: __props.children ? __props.children.duration : 0
2627
- }), {
2628
- default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
2629
- _: 3
2630
- }, 16, ["duration"])]),
2631
- _: 3
2632
- }, 512)), [[vue.vShow, __props.showMode == "vShow" ? __props.show : true]]) : vue.createCommentVNode("", true)]),
2633
- _: 3
2634
- }, 16, ["duration"]);
2635
- };
2636
- }
2637
- });
2638
-
2639
- const _hoisted_1$6 = {
2506
+ const _hoisted_1$8 = {
2640
2507
  class: "fold-header"
2641
2508
  };
2642
2509
  const _hoisted_2$3 = ["textContent"];
@@ -2649,7 +2516,7 @@
2649
2516
  class: "fold-body",
2650
2517
  ref: "foldBody"
2651
2518
  };
2652
- var _sfc_main$d = vue.defineComponent({
2519
+ var _sfc_main$e = vue.defineComponent({
2653
2520
  ...{
2654
2521
  name: "Fold",
2655
2522
  inheritAttrs: true
@@ -2719,14 +2586,14 @@
2719
2586
  return (_ctx, _cache) => {
2720
2587
  return vue.openBlock(), vue.createElementBlock("div", {
2721
2588
  class: vue.normalizeClass(["snail-fold", statusModel.value])
2722
- }, [vue.createElementVNode("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
2589
+ }, [vue.createElementVNode("div", _hoisted_1$8, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
2723
2590
  class: "title ellipsis",
2724
2591
  textContent: vue.toDisplayString(__props.title)
2725
2592
  }, null, 8, _hoisted_2$3), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
2726
2593
  key: 0,
2727
2594
  class: "subtitle ellipsis",
2728
2595
  textContent: vue.toDisplayString(__props.subtitle)
2729
- }, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$A, {
2596
+ }, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$z, {
2730
2597
  type: "arrow",
2731
2598
  title: statusModel.value == "expand" ? "收起" : "展开",
2732
2599
  onClick: onStatusClick
@@ -2735,7 +2602,7 @@
2735
2602
  }
2736
2603
  });
2737
2604
 
2738
- var _sfc_main$c = vue.defineComponent({
2605
+ var _sfc_main$d = vue.defineComponent({
2739
2606
  ...{
2740
2607
  name: "Scroll",
2741
2608
  inheritAttrs: true
@@ -2865,7 +2732,7 @@
2865
2732
  }
2866
2733
  });
2867
2734
 
2868
- var _sfc_main$b = vue.defineComponent({
2735
+ var _sfc_main$c = vue.defineComponent({
2869
2736
  __name: "layout",
2870
2737
  props: {
2871
2738
  mode: {},
@@ -2931,7 +2798,7 @@
2931
2798
  key: item
2932
2799
  }, [areaMap.value[item] && _ctx.$slots[item] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2933
2800
  key: 0
2934
- }, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$c, vue.mergeProps({
2801
+ }, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, vue.mergeProps({
2935
2802
  key: 0,
2936
2803
  class: areaMap.value[item].class,
2937
2804
  style: areaMap.value[item].style
@@ -2950,37 +2817,7 @@
2950
2817
  }
2951
2818
  });
2952
2819
 
2953
- var _sfc_main$a = vue.defineComponent({
2954
- __name: "motion",
2955
- props: {
2956
- enter: {},
2957
- leave: {},
2958
- multiple: {
2959
- type: Boolean
2960
- },
2961
- duration: {},
2962
- mode: {}
2963
- },
2964
- setup(__props) {
2965
- const props = __props;
2966
- const duration = snail_core.correctNumber(props.duration, 200);
2967
- return (_ctx, _cache) => {
2968
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.multiple ? vue.TransitionGroup : vue.Transition), {
2969
- appear: "",
2970
- type: "animation",
2971
- duration: vue.unref(duration),
2972
- mode: __props.mode,
2973
- "enter-active-class": vue.unref(snail_core.correctString)(props.enter, "fade-in", true),
2974
- "leave-active-class": vue.unref(snail_core.correctString)(props.leave, "fade-out", true)
2975
- }, {
2976
- default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
2977
- _: 3
2978
- }, 8, ["duration", "mode", "enter-active-class", "leave-active-class"]);
2979
- };
2980
- }
2981
- });
2982
-
2983
- var _sfc_main$9 = vue.defineComponent({
2820
+ var _sfc_main$b = vue.defineComponent({
2984
2821
  ...{
2985
2822
  name: "Sort",
2986
2823
  inheritAttrs: true
@@ -3081,10 +2918,10 @@
3081
2918
  }
3082
2919
  });
3083
2920
 
3084
- const _hoisted_1$5 = {
2921
+ const _hoisted_1$7 = {
3085
2922
  class: "table-body"
3086
2923
  };
3087
- var _sfc_main$8 = vue.defineComponent({
2924
+ var _sfc_main$a = vue.defineComponent({
3088
2925
  ...{
3089
2926
  name: "Table",
3090
2927
  inheritAttrs: true
@@ -3109,7 +2946,7 @@
3109
2946
  const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
3110
2947
  const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
3111
2948
  return (_ctx, _cache) => {
3112
- return vue.openBlock(), vue.createBlock(_sfc_main$c, {
2949
+ return vue.openBlock(), vue.createBlock(_sfc_main$d, {
3113
2950
  class: vue.normalizeClass(["snail-table", {
3114
2951
  "start-border": __props.border == true
3115
2952
  }]),
@@ -3119,7 +2956,7 @@
3119
2956
  default: vue.withCtx(() => [vue.createElementVNode("div", {
3120
2957
  class: "table-header",
3121
2958
  style: vue.normalizeStyle(hStyleRef.value)
3122
- }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$5, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
2959
+ }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$7, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
3123
2960
  class: "table-footer",
3124
2961
  style: vue.normalizeStyle(fStyleRef.value)
3125
2962
  }, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -3129,7 +2966,7 @@
3129
2966
  }
3130
2967
  });
3131
2968
 
3132
- var _sfc_main$7 = vue.defineComponent({
2969
+ var _sfc_main$9 = vue.defineComponent({
3133
2970
  ...{
3134
2971
  name: "TableRow",
3135
2972
  inheritAttrs: true
@@ -3152,7 +2989,7 @@
3152
2989
  }
3153
2990
  });
3154
2991
 
3155
- var _sfc_main$6 = vue.defineComponent({
2992
+ var _sfc_main$8 = vue.defineComponent({
3156
2993
  ...{
3157
2994
  name: "TableCol",
3158
2995
  inheritAttrs: true
@@ -3198,7 +3035,7 @@
3198
3035
  }
3199
3036
  });
3200
3037
 
3201
- const _hoisted_1$4 = {
3038
+ const _hoisted_1$6 = {
3202
3039
  key: 0,
3203
3040
  class: "node-fold"
3204
3041
  };
@@ -3211,7 +3048,7 @@
3211
3048
  class: "snail-tree-children hidden",
3212
3049
  ref: "children"
3213
3050
  };
3214
- var _sfc_main$5 = vue.defineComponent({
3051
+ var _sfc_main$7 = vue.defineComponent({
3215
3052
  ...{
3216
3053
  name: "TreeNode",
3217
3054
  inheritAttrs: true
@@ -3329,7 +3166,7 @@
3329
3166
  key: 1
3330
3167
  }, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
3331
3168
  class: "indent"
3332
- }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
3169
+ }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
3333
3170
  key: 0,
3334
3171
  class: vue.normalizeClass(statusRef.value),
3335
3172
  type: "custom",
@@ -3361,10 +3198,10 @@
3361
3198
  }
3362
3199
  });
3363
3200
 
3364
- const _hoisted_1$3 = {
3201
+ const _hoisted_1$5 = {
3365
3202
  class: "snail-tree"
3366
3203
  };
3367
- var _sfc_main$4 = vue.defineComponent({
3204
+ var _sfc_main$6 = vue.defineComponent({
3368
3205
  ...{
3369
3206
  name: "Tree",
3370
3207
  inheritAttrs: true
@@ -3398,15 +3235,15 @@
3398
3235
  emits("click", node, parents);
3399
3236
  }
3400
3237
  return (_ctx, _cache) => {
3401
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
3238
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
3402
3239
  key: 0
3403
3240
  }, __props.search, {
3404
3241
  onSearch
3405
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$c, {
3242
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$d, {
3406
3243
  "scroll-y": true
3407
3244
  }, {
3408
3245
  default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
3409
- return vue.openBlock(), vue.createBlock(_sfc_main$5, {
3246
+ return vue.openBlock(), vue.createBlock(_sfc_main$7, {
3410
3247
  key: vue.unref(context).getKey(node),
3411
3248
  node,
3412
3249
  parent: void 0,
@@ -3427,7 +3264,7 @@
3427
3264
  }
3428
3265
  });
3429
3266
 
3430
- var _sfc_main$3 = vue.defineComponent({
3267
+ var _sfc_main$5 = vue.defineComponent({
3431
3268
  __name: "wrapper",
3432
3269
  props: {
3433
3270
  readonly: {
@@ -3456,7 +3293,7 @@
3456
3293
  title: "对话框"
3457
3294
  }, {
3458
3295
  onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
3459
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$c, vue.mergeProps({
3296
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$d, vue.mergeProps({
3460
3297
  class: "wrapper-body"
3461
3298
  }, __props.content || {
3462
3299
  scrollX: false,
@@ -3478,7 +3315,7 @@
3478
3315
  snail_core.mustObject(options, "options");
3479
3316
  target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
3480
3317
  target.classList.add("snail-app");
3481
- const app = vue.createApp(_sfc_main$q, options);
3318
+ const app = vue.createApp(_sfc_main$p, options);
3482
3319
  triggerAppCreated(app);
3483
3320
  app.mount(target);
3484
3321
  const scope = snail_core.useScope().onDestroy(() => app.unmount());
@@ -3486,54 +3323,6 @@
3486
3323
  return scope;
3487
3324
  }
3488
3325
 
3489
- const MOTION = Object.freeze({
3490
- "fade": {
3491
- enter: "fade-in",
3492
- leave: "fade-out"
3493
- },
3494
- "scale": {
3495
- enter: "scale-in",
3496
- leave: "scale-out"
3497
- },
3498
- "rotate": {
3499
- enter: "rotate-in",
3500
- leave: "rotate-out"
3501
- },
3502
- "top": {
3503
- enter: "top-in",
3504
- leave: "top-out"
3505
- },
3506
- "topBottom": {
3507
- enter: "top-in",
3508
- leave: "bottom-out"
3509
- },
3510
- "bottom": {
3511
- enter: "bottom-in",
3512
- leave: "bottom-out"
3513
- },
3514
- "bottomTop": {
3515
- enter: "bottom-in",
3516
- leave: "top-out"
3517
- },
3518
- "left": {
3519
- enter: "left-in",
3520
- leave: "left-out"
3521
- },
3522
- "leftRight": {
3523
- enter: "left-in",
3524
- leave: "right-out"
3525
- },
3526
- "right": {
3527
- enter: "right-in",
3528
- leave: "right-out"
3529
- },
3530
- "rightLeft": {
3531
- enter: "right-in",
3532
- leave: "left-out"
3533
- }
3534
- });
3535
- for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
3536
-
3537
3326
  function initStepByFormat(format) {
3538
3327
  switch (format) {
3539
3328
  case "yyyy":
@@ -3560,8 +3349,8 @@
3560
3349
  return items;
3561
3350
  }
3562
3351
  function buildMonthItems(yearItem, min, max) {
3563
- const minDate = new Date(snail_core.formatDateValue(min, "yyyy-MM"));
3564
- const maxDate = new Date(snail_core.formatDateValue(max, "yyyy-MM"));
3352
+ const minDate = snail_core.parseDate(snail_core.formatDateValue(min, "yyyy-MM"), "min");
3353
+ const maxDate = snail_core.parseDate(snail_core.formatDateValue(max, "yyyy-MM"), "max");
3565
3354
  const items = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
3566
3355
  return items.map((item, index) => {
3567
3356
  const mi = {
@@ -3571,16 +3360,19 @@
3571
3360
  disabled: yearItem.disabled
3572
3361
  };
3573
3362
  if (mi.disabled != true) {
3574
- const date = new Date(snail_core.formatDateValue(mi, "yyyy-MM"));
3363
+ const date = snail_core.getDateByValue(mi);
3575
3364
  mi.disabled = minDate != void 0 && date < minDate || maxDate != void 0 && date > maxDate;
3576
3365
  }
3577
3366
  return Object.freeze(mi);
3578
3367
  });
3579
3368
  }
3580
3369
  function buildDayItems(monthItem, min, max) {
3581
- const minDate = new Date(snail_core.formatDateValue(min, "yyyy-MM-dd"));
3582
- const maxDate = new Date(snail_core.formatDateValue(max, "yyyy-MM-dd"));
3583
- const date = new Date(monthItem.year, monthItem.month - 1);
3370
+ const minDate = snail_core.parseDate(snail_core.formatDateValue(min, "yyyy-MM-dd"), "min");
3371
+ const maxDate = snail_core.parseDate(snail_core.formatDateValue(max, "yyyy-MM-dd"), "max");
3372
+ const date = snail_core.getDateByValue({
3373
+ ...monthItem,
3374
+ day: 1
3375
+ });
3584
3376
  date.setDate(date.getDate() - (date.getDay() || 7) - 1);
3585
3377
  const items = new Array(42);
3586
3378
  for (var index = 0; index < items.length; index++) {
@@ -3592,7 +3384,7 @@
3592
3384
  disabled: monthItem.disabled
3593
3385
  };
3594
3386
  if (item.disabled != true) {
3595
- const date2 = new Date(snail_core.formatDateValue(item, "yyyy-MM-dd"));
3387
+ const date2 = snail_core.getDateByValue(item);
3596
3388
  item.disabled = minDate != void 0 && date2 < minDate || maxDate != void 0 && date2 > maxDate;
3597
3389
  }
3598
3390
  items[index] = Object.freeze(item);
@@ -3610,9 +3402,9 @@
3610
3402
  return items;
3611
3403
  }
3612
3404
  function buildMinuteItems(hourItem, min, max) {
3405
+ const minNumber = min && min.minute != void 0 ? snail_core.getTimeNumber(min.hour, min.minute, 0) : void 0;
3406
+ const maxNumber = max && max.minute != void 0 ? snail_core.getTimeNumber(max.hour, max.minute, 0) : void 0;
3613
3407
  const items = new Array(60);
3614
- const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, 0) : void 0;
3615
- const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, 0) : void 0;
3616
3408
  for (let index = 0; index < items.length; index++) {
3617
3409
  const item = {
3618
3410
  minute: index,
@@ -3620,7 +3412,7 @@
3620
3412
  disabled: hourItem.disabled
3621
3413
  };
3622
3414
  if (item.disabled != true) {
3623
- const number = getTimeNumber(item.hour, item.minute, 0);
3415
+ const number = snail_core.getTimeNumber(item.hour, item.minute, 0);
3624
3416
  item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
3625
3417
  }
3626
3418
  items[index] = Object.freeze(item);
@@ -3629,8 +3421,8 @@
3629
3421
  }
3630
3422
  function buildSecondItems(minuteItem, min, max) {
3631
3423
  const items = new Array(60);
3632
- const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, min.second) : void 0;
3633
- const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, max.second) : void 0;
3424
+ const minNumber = min && min.minute != void 0 ? snail_core.getTimeNumber(min.hour, min.minute, min.second) : void 0;
3425
+ const maxNumber = max && max.minute != void 0 ? snail_core.getTimeNumber(max.hour, max.minute, max.second) : void 0;
3634
3426
  for (let index = 0; index < items.length; index++) {
3635
3427
  const item = {
3636
3428
  second: index,
@@ -3639,44 +3431,15 @@
3639
3431
  disabled: minuteItem.disabled
3640
3432
  };
3641
3433
  if (item.disabled != true) {
3642
- const number = getTimeNumber(item.hour, item.minute, item.second);
3434
+ const number = snail_core.getTimeNumber(item.hour, item.minute, item.second);
3643
3435
  item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
3644
3436
  }
3645
3437
  items[index] = Object.freeze(item);
3646
3438
  }
3647
3439
  return items;
3648
3440
  }
3649
- function getTimeNumber(hour, minute, second) {
3650
- return (hour || 0) * 1e4 + (minute || 0) * 100 + (second || 0);
3651
- }
3652
- function isValidTime(format, time, min, max) {
3653
- time = snail_core.correctTimeValue(time);
3654
- if (time) {
3655
- min = snail_core.correctTimeValue({
3656
- ...min
3657
- });
3658
- const timeNumber = getTimeNumber(time.hour, time.minute, format == "HH:mm" ? 0 : time.second);
3659
- if (min != void 0) {
3660
- const minNumber = getTimeNumber(min.hour, min.minute, format == "HH:mm" ? 0 : max.second);
3661
- if (timeNumber < minNumber) {
3662
- return false;
3663
- }
3664
- }
3665
- max = snail_core.correctTimeValue({
3666
- ...max
3667
- });
3668
- if (max != void 0) {
3669
- const maxNumber = getTimeNumber(max.hour, max.minute, format == "HH:mm" ? 0 : max.second);
3670
- if (timeNumber > maxNumber) {
3671
- return false;
3672
- }
3673
- }
3674
- return true;
3675
- }
3676
- return false;
3677
- }
3678
3441
 
3679
- const _hoisted_1$2 = {
3442
+ const _hoisted_1$4 = {
3680
3443
  class: "tz-item",
3681
3444
  ref: "hour-items"
3682
3445
  };
@@ -3692,7 +3455,7 @@
3692
3455
  ref: "second-items"
3693
3456
  };
3694
3457
  const _hoisted_6$1 = ["textContent", "onClick"];
3695
- var _sfc_main$2 = vue.defineComponent({
3458
+ var _sfc_main$4 = vue.defineComponent({
3696
3459
  __name: "time-pc",
3697
3460
  props: {
3698
3461
  value: {},
@@ -3728,9 +3491,9 @@
3728
3491
  const props = __props;
3729
3492
  const emits = __emit;
3730
3493
  const format = props.format == "HH:mm" ? "HH:mm" : "HH:mm:ss";
3731
- const min = snail_core.parseTimeValue(props.min);
3732
- const max = snail_core.parseTimeValue(props.max);
3733
- const timeRef = vue.ref(snail_core.parseTimeValue(props.value) || snail_core.getTimeValue(new Date()));
3494
+ const min = snail_core.parseTimeValue(props.min, "min");
3495
+ const max = snail_core.parseTimeValue(props.max, "max");
3496
+ const timeRef = vue.ref(snail_core.parseTimeValue(props.value, "min") || snail_core.getTimeValue(new Date()));
3734
3497
  const isValidTimeRef = vue.computed(() => format == "HH:mm" ? minuteItems.value && minuteItems.value[timeRef.value.minute].disabled != true : secondItems.value && secondItems.value[timeRef.value.second].disabled != true);
3735
3498
  const hourItems = vue.shallowRef(buildHourItems(min, max));
3736
3499
  const minuteItems = vue.shallowRef();
@@ -3795,17 +3558,17 @@
3795
3558
  }
3796
3559
  vue.onMounted(rebuildItems);
3797
3560
  return (_ctx, _cache) => {
3798
- return vue.openBlock(), vue.createBlock(_sfc_main$b, {
3561
+ return vue.openBlock(), vue.createBlock(_sfc_main$c, {
3799
3562
  class: vue.normalizeClass(["time-picker pc", {
3800
3563
  "second-disabled": vue.unref(format) != "HH:mm:ss"
3801
3564
  }]),
3802
3565
  mode: "vertical"
3803
3566
  }, vue.createSlots({
3804
- main: vue.withCtx(() => [vue.createVNode(_sfc_main$f, {
3805
- group: true,
3806
- effect: "down-up"
3567
+ main: vue.withCtx(() => [vue.createVNode(_sfc_main$r, {
3568
+ multiple: "",
3569
+ effect: vue.unref(MOTION).top
3807
3570
  }, {
3808
- default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
3571
+ default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
3809
3572
  return vue.openBlock(), vue.createElementBlock("div", {
3810
3573
  class: vue.normalizeClass(["tzi-number", {
3811
3574
  active: item.hour == timeRef.value.hour,
@@ -3837,23 +3600,23 @@
3837
3600
  }, null, 10, _hoisted_6$1);
3838
3601
  }), 128))], 512)) : vue.createCommentVNode("", true)]),
3839
3602
  _: 1
3840
- })]),
3603
+ }, 8, ["effect"])]),
3841
3604
  _: 2
3842
3605
  }, [__props.toolbarDisabled != true ? {
3843
3606
  name: "bottom",
3844
- fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3607
+ fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
3845
3608
  key: 0,
3846
3609
  type: "link",
3847
3610
  size: "small",
3848
3611
  textContent: "清空",
3849
3612
  onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
3850
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3613
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
3851
3614
  key: 1,
3852
3615
  type: "link",
3853
3616
  size: "small",
3854
3617
  textContent: "现在",
3855
3618
  onClick: _cache[1] || (_cache[1] = $event => rebuildItems(vue.unref(snail_core.getTimeValue)(new Date())))
3856
- })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$B, {
3619
+ })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$A, {
3857
3620
  type: "link",
3858
3621
  size: "small",
3859
3622
  textContent: "确定",
@@ -3868,7 +3631,7 @@
3868
3631
  }
3869
3632
  });
3870
3633
 
3871
- const _hoisted_1$1 = ["textContent"];
3634
+ const _hoisted_1$3 = ["textContent"];
3872
3635
  const _hoisted_2 = ["textContent"];
3873
3636
  const _hoisted_3 = ["textContent"];
3874
3637
  const _hoisted_4 = ["textContent", "onClick"];
@@ -3876,7 +3639,7 @@
3876
3639
  const _hoisted_6 = ["textContent"];
3877
3640
  const _hoisted_7 = ["textContent", "onClick"];
3878
3641
  const _hoisted_8 = ["textContent"];
3879
- var _sfc_main$1 = vue.defineComponent({
3642
+ var _sfc_main$3 = vue.defineComponent({
3880
3643
  __name: "date-pc",
3881
3644
  props: {
3882
3645
  value: {},
@@ -3916,18 +3679,18 @@
3916
3679
  const {
3917
3680
  inPopup
3918
3681
  } = props;
3919
- const dateRef = vue.ref(snail_core.parseDateValue(props.value));
3682
+ const dateRef = vue.ref(snail_core.parseDateValue(props.value, "min"));
3920
3683
  const format = snail_core.correctDateFormat(props.format, "yyyy-MM-dd");
3921
- const min = Object.freeze(snail_core.parseDateValue(props.min));
3922
- const max = Object.freeze(snail_core.parseDateValue(props.max));
3684
+ const min = Object.freeze(snail_core.parseDateValue(props.min, "min"));
3685
+ const max = Object.freeze(snail_core.parseDateValue(props.max, "max"));
3923
3686
  const endStep = initStepByFormat(format);
3924
3687
  const stepRef = vue.shallowRef(endStep);
3925
3688
  const yearItems = vue.shallowRef();
3926
3689
  const monthItems = vue.shallowRef();
3927
3690
  const dayItemsRef = vue.shallowRef([]);
3928
3691
  const isValidDateRef = vue.computed(validateDate);
3929
- const minPickTime = Object.freeze(snail_core.parseTimeValue(props.minPickTime));
3930
- const maxPickTime = Object.freeze(snail_core.parseTimeValue(props.maxPickTime));
3692
+ const minPickTime = Object.freeze(snail_core.parseTimeValue(props.minPickTime, "min"));
3693
+ const maxPickTime = Object.freeze(snail_core.parseTimeValue(props.maxPickTime, "max"));
3931
3694
  const timeFormat = format == "yyyy-MM-dd HH:mm" ? "HH:mm" : format == "yyyy-MM-dd HH:mm:ss" ? "HH:mm:ss" : void 0;
3932
3695
  const timeAreaDom = timeFormat ? vue.useTemplateRef("time-area") : void 0;
3933
3696
  function validateDate() {
@@ -3950,7 +3713,7 @@
3950
3713
  case "yyyy-MM-dd HH:mm":
3951
3714
  case "yyyy-MM-dd HH:mm:ss":
3952
3715
  {
3953
- if (isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
3716
+ if (snail_core.isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
3954
3717
  const date = snail_core.getDateByValue(dateRef.value);
3955
3718
  const disabled = min && date < snail_core.getDateByValue(min) || max && date > snail_core.getDateByValue(max);
3956
3719
  return disabled != true;
@@ -3987,7 +3750,7 @@
3987
3750
  }
3988
3751
  case "day":
3989
3752
  {
3990
- const date = new Date(dateRef.value.year, dateRef.value.month - 1, 1);
3753
+ const date = snail_core.getDateByValue(dateRef.value);
3991
3754
  date.setMonth(date.getMonth() + basis);
3992
3755
  dateRef.value.year = date.getFullYear();
3993
3756
  dateRef.value.month = date.getMonth() + 1;
@@ -4052,30 +3815,33 @@
4052
3815
  }
4053
3816
  }
4054
3817
  async function onSelectTime() {
4055
- if (props.picker == void 0 || timeAreaDom.value == void 0 || props.pinned.value == true) {
4056
- return;
3818
+ if (props.picker != void 0 && timeAreaDom.value != void 0 && props.pinned.value != true) {
3819
+ props.pinned.value = true;
3820
+ const task = props.picker.showTime(timeAreaDom.value, {
3821
+ format: timeFormat,
3822
+ value: snail_core.formatTimeValue(dateRef.value, timeFormat),
3823
+ min: props.minPickTime,
3824
+ max: props.minPickTime,
3825
+ nowDisabled: props.nowDisabled,
3826
+ clearDisabled: props.clearDisabled,
3827
+ toolbarDisabled: props.toolbarDisabled
3828
+ }, {
3829
+ followX: "start",
3830
+ followY: "before",
3831
+ spaceX: -2,
3832
+ spaceY: 4
3833
+ });
3834
+ task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
3835
+ if (text != void 0) {
3836
+ const time = snail_core.parseTimeValue(text, "min") || Object.create(null);
3837
+ dateRef.value.hour = time.hour;
3838
+ dateRef.value.minute = time.minute;
3839
+ dateRef.value.second = time.second;
3840
+ }
3841
+ }, reason => {
3842
+ console.error(reason);
3843
+ });
4057
3844
  }
4058
- props.pinned.value = true;
4059
- const task = props.picker.showTime(timeAreaDom.value, {
4060
- format: timeFormat,
4061
- value: snail_core.formatTimeValue(dateRef.value, timeFormat),
4062
- min: props.minPickTime,
4063
- max: props.minPickTime,
4064
- followX: "start",
4065
- followY: "before",
4066
- spaceX: -2,
4067
- spaceY: 4
4068
- });
4069
- task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
4070
- if (text != void 0) {
4071
- const time = snail_core.parseTimeValue(text) || Object.create(null);
4072
- dateRef.value.hour = time.hour;
4073
- dateRef.value.minute = time.minute;
4074
- dateRef.value.second = time.second;
4075
- }
4076
- }, reason => {
4077
- console.error(reason);
4078
- });
4079
3845
  }
4080
3846
  function onNow() {
4081
3847
  stepRef.value = initStepByFormat(format);
@@ -4092,7 +3858,7 @@
4092
3858
  dateRef.value == void 0 && (dateRef.value = electDateValue());
4093
3859
  buildPickerItems(stepRef.value, 0);
4094
3860
  return (_ctx, _cache) => {
4095
- return vue.openBlock(), vue.createBlock(_sfc_main$b, {
3861
+ return vue.openBlock(), vue.createBlock(_sfc_main$c, {
4096
3862
  class: vue.normalizeClass(["date-picker pc", {
4097
3863
  "time-now": __props.pinned && __props.pinned.value == true
4098
3864
  }]),
@@ -4104,7 +3870,7 @@
4104
3870
  height: "30px"
4105
3871
  }
4106
3872
  }, vue.createSlots({
4107
- top: vue.withCtx(() => [vue.createVNode(_sfc_main$A, {
3873
+ top: vue.withCtx(() => [vue.createVNode(_sfc_main$z, {
4108
3874
  type: "arrow",
4109
3875
  rotate: 180,
4110
3876
  size: 26,
@@ -4114,7 +3880,7 @@
4114
3880
  }, [stepRef.value == "year" ? (vue.openBlock(), vue.createElementBlock("div", {
4115
3881
  key: 0,
4116
3882
  textContent: vue.toDisplayString(`${yearItems.value[0].year}年 - ${vue.unref(snail_core.getFromArray)(yearItems.value, -1).year}年`)
4117
- }, null, 8, _hoisted_1$1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3883
+ }, null, 8, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4118
3884
  key: 1
4119
3885
  }, [vue.createElementVNode("div", {
4120
3886
  textContent: vue.toDisplayString(`${dateRef.value.year}年`),
@@ -4123,7 +3889,7 @@
4123
3889
  key: 0,
4124
3890
  textContent: vue.toDisplayString(`${dateRef.value.month}月`),
4125
3891
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
4126
- }, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$A, {
3892
+ }, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$z, {
4127
3893
  type: "arrow",
4128
3894
  size: 26,
4129
3895
  onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
@@ -4188,19 +3954,19 @@
4188
3954
  onClick: onSelectTime
4189
3955
  }, null, 10, _hoisted_8)) : vue.createCommentVNode("", true), __props.toolbarDisabled != true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4190
3956
  key: 1
4191
- }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3957
+ }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4192
3958
  key: 0,
4193
3959
  type: "link",
4194
3960
  size: "small",
4195
3961
  textContent: "清空",
4196
3962
  onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), vue.unref(inPopup) && __props.closePopup("")))
4197
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3963
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4198
3964
  key: 1,
4199
3965
  type: "link",
4200
3966
  size: "small",
4201
3967
  textContent: "现在",
4202
3968
  onClick: onNow
4203
- })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$B, {
3969
+ })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$A, {
4204
3970
  type: "link",
4205
3971
  size: "small",
4206
3972
  textContent: "确定",
@@ -4217,40 +3983,32 @@
4217
3983
 
4218
3984
  function usePicker() {
4219
3985
  const popup = usePopup();
4220
- function showDate(target, options) {
3986
+ function showDate(target, options, popupOptions) {
4221
3987
  options = {
4222
3988
  ...options
4223
3989
  };
4224
- return showPicker(target, _sfc_main$1, options);
3990
+ return showPicker(target, _sfc_main$3, options, popupOptions);
4225
3991
  }
4226
- function showTime(target, options) {
3992
+ function showTime(target, options, popupOptions) {
4227
3993
  options = {
4228
3994
  ...options
4229
3995
  };
4230
- return showPicker(target, _sfc_main$2, options);
3996
+ return showPicker(target, _sfc_main$4, options, popupOptions);
4231
3997
  }
4232
- function showPicker(target, component, options) {
4233
- let popupOptions = Object.create(null);
4234
- if (options != void 0) {
4235
- popupOptions.followX = options.followX;
4236
- popupOptions.followY = options.followY;
4237
- popupOptions.spaceX = options.spaceX;
4238
- popupOptions.spaceY = options.spaceY;
4239
- popupOptions.spaceClient = options.spaceClien;
4240
- delete options.followX;
4241
- delete options.followY;
4242
- delete options.spaceX;
4243
- delete options.spaceY;
4244
- delete options.spaceClient;
3998
+ function showPicker(target, component, options, popupOptions) {
3999
+ {
4000
+ popupOptions = {
4001
+ ...popupOptions
4002
+ };
4003
+ popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
4004
+ popupOptions.spaceX = snail_core.correctNumber(popupOptions.spaceX, 2);
4005
+ popupOptions.spaceY = snail_core.correctNumber(popupOptions.spaceY, 2);
4006
+ popupOptions.spaceClient = snail_core.correctNumber(popupOptions.spaceClient, 10);
4007
+ popupOptions.closeOnMask = popupOptions.closeOnMask == void 0 ? true : popupOptions.closeOnMask;
4245
4008
  }
4246
4009
  return popup.follow(target, {
4010
+ ...popupOptions,
4247
4011
  component,
4248
- followX: popupOptions.followX || "center",
4249
- followY: popupOptions.followY,
4250
- spaceX: snail_core.correctNumber(popupOptions.spaceX, 2),
4251
- spaceY: snail_core.correctNumber(popupOptions.spaceY, 2),
4252
- spaceClient: snail_core.correctNumber(popupOptions.spaceClient, 10),
4253
- closeOnMask: true,
4254
4012
  props: {
4255
4013
  ...options,
4256
4014
  picker: manager,
@@ -4266,6 +4024,178 @@
4266
4024
  return manager;
4267
4025
  }
4268
4026
 
4027
+ const _hoisted_1$2 = ["title"];
4028
+ var _sfc_main$2 = vue.defineComponent({
4029
+ __name: "date-picker",
4030
+ props: {
4031
+ readonly: {
4032
+ type: Boolean
4033
+ },
4034
+ value: {},
4035
+ format: {},
4036
+ min: {},
4037
+ max: {},
4038
+ minPickTime: {},
4039
+ maxPickTime: {},
4040
+ toolbarDisabled: {
4041
+ type: Boolean
4042
+ },
4043
+ nowDisabled: {
4044
+ type: Boolean
4045
+ },
4046
+ clearDisabled: {
4047
+ type: Boolean
4048
+ }
4049
+ },
4050
+ emits: ["change"],
4051
+ setup(__props, _ref) {
4052
+ let {
4053
+ emit: __emit
4054
+ } = _ref;
4055
+ const props = __props;
4056
+ const emits = __emit;
4057
+ const pickerDom = vue.useTemplateRef("datepicker");
4058
+ const {
4059
+ showDate
4060
+ } = usePicker();
4061
+ const {
4062
+ watcher
4063
+ } = useReactive();
4064
+ const valueRef = vue.shallowRef();
4065
+ let pickerScope;
4066
+ function resetDateValue(value) {
4067
+ const dateValue = snail_core.parseDateValue(value, "min");
4068
+ valueRef.value = snail_core.formatDateValue(dateValue, props.format);
4069
+ }
4070
+ async function showPicker(evt) {
4071
+ if (props.readonly != true && pickerScope == void 0) {
4072
+ pickerScope = showDate(pickerDom.value, {
4073
+ ...props,
4074
+ value: valueRef.value
4075
+ }, {
4076
+ followX: evt.target.tagName == "svg" ? ["end"] : void 0,
4077
+ closeOnTarget: true
4078
+ });
4079
+ const dateText = await pickerScope;
4080
+ pickerScope = void 0;
4081
+ if (dateText !== void 0 && dateText != valueRef.value) {
4082
+ const oldText = valueRef.value;
4083
+ valueRef.value = dateText;
4084
+ emits("change", dateText, oldText);
4085
+ }
4086
+ }
4087
+ }
4088
+ snail_core.isStringNotEmpty(props.value) && resetDateValue(props.value);
4089
+ watcher(() => props.value, newValue => newValue !== valueRef.value && resetDateValue(newValue));
4090
+ return (_ctx, _cache) => {
4091
+ return vue.openBlock(), vue.createElementBlock("div", {
4092
+ class: vue.normalizeClass(["snail-datepicker", {
4093
+ readonly: __props.readonly
4094
+ }]),
4095
+ ref: "datepicker",
4096
+ title: valueRef.value,
4097
+ onClick: showPicker
4098
+ }, [vue.withDirectives(vue.createElementVNode("input", {
4099
+ class: "wh-fill",
4100
+ type: "text",
4101
+ readonly: "",
4102
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4103
+ }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
4104
+ key: 0,
4105
+ type: "datepicker",
4106
+ color: "#aeb6c2",
4107
+ "hover-color": "#279bf1",
4108
+ size: 16
4109
+ })) : vue.createCommentVNode("", true)], 10, _hoisted_1$2);
4110
+ };
4111
+ }
4112
+ });
4113
+
4114
+ const _hoisted_1$1 = ["title"];
4115
+ var _sfc_main$1 = vue.defineComponent({
4116
+ __name: "time-picker",
4117
+ props: {
4118
+ readonly: {
4119
+ type: Boolean
4120
+ },
4121
+ value: {},
4122
+ format: {},
4123
+ min: {},
4124
+ max: {},
4125
+ toolbarDisabled: {
4126
+ type: Boolean
4127
+ },
4128
+ nowDisabled: {
4129
+ type: Boolean
4130
+ },
4131
+ clearDisabled: {
4132
+ type: Boolean
4133
+ }
4134
+ },
4135
+ emits: ["change"],
4136
+ setup(__props, _ref) {
4137
+ let {
4138
+ emit: __emit
4139
+ } = _ref;
4140
+ const props = __props;
4141
+ const emits = __emit;
4142
+ const pickerDom = vue.useTemplateRef("timepicker");
4143
+ const {
4144
+ showTime
4145
+ } = usePicker();
4146
+ const {
4147
+ watcher
4148
+ } = useReactive();
4149
+ const valueRef = vue.shallowRef();
4150
+ let pickerScope;
4151
+ function resetTimeValue(value) {
4152
+ const timeValue = snail_core.parseTimeValue(value, "min");
4153
+ valueRef.value = snail_core.formatTimeValue(timeValue, props.format);
4154
+ }
4155
+ async function showPicker(evt) {
4156
+ if (props.readonly != true && pickerScope == void 0) {
4157
+ pickerScope = showTime(pickerDom.value, {
4158
+ ...props,
4159
+ value: valueRef.value
4160
+ }, {
4161
+ followX: evt.target.tagName == "svg" ? ["end"] : void 0,
4162
+ closeOnTarget: true
4163
+ });
4164
+ const timeText = await pickerScope;
4165
+ pickerScope = void 0;
4166
+ if (timeText !== void 0 && timeText != valueRef.value) {
4167
+ const oldText = valueRef.value;
4168
+ valueRef.value = timeText;
4169
+ emits("change", timeText, oldText);
4170
+ }
4171
+ }
4172
+ }
4173
+ snail_core.isStringNotEmpty(props.value) && resetTimeValue(props.value);
4174
+ watcher(() => props.value, newValue => newValue !== valueRef.value && resetTimeValue(newValue));
4175
+ return (_ctx, _cache) => {
4176
+ return vue.openBlock(), vue.createElementBlock("div", {
4177
+ class: vue.normalizeClass(["snail-timepicker", {
4178
+ readonly: __props.readonly
4179
+ }]),
4180
+ ref: "timepicker",
4181
+ title: valueRef.value,
4182
+ onClick: showPicker
4183
+ }, [vue.withDirectives(vue.createElementVNode("input", {
4184
+ class: "wh-fill",
4185
+ type: "text",
4186
+ readonly: "",
4187
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4188
+ }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
4189
+ key: 0,
4190
+ type: "timepicker",
4191
+ color: "#aeb6c2",
4192
+ "hover-color": "#279bf1",
4193
+ size: 20
4194
+ })) : vue.createCommentVNode("", true)], 10, _hoisted_1$1);
4195
+ };
4196
+ }
4197
+ });
4198
+
4269
4199
  const _hoisted_1 = ["textContent"];
4270
4200
  var _sfc_main = vue.defineComponent({
4271
4201
  ...{
@@ -4351,12 +4281,12 @@
4351
4281
  onTouchstart: onStartDrag,
4352
4282
  onTouchmove: onDragMove,
4353
4283
  onTouchend: onDragEnd
4354
- }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4284
+ }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
4355
4285
  key: 0,
4356
4286
  type: "success",
4357
4287
  size: 20,
4358
4288
  color: "white"
4359
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4289
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$z, {
4360
4290
  key: 1,
4361
4291
  type: "custom",
4362
4292
  size: 20,
@@ -4368,34 +4298,33 @@
4368
4298
  });
4369
4299
 
4370
4300
  const components = {
4371
- Button: _sfc_main$B,
4372
- Choose: _sfc_main$z,
4373
- DatePicker: _sfc_main$y,
4301
+ Button: _sfc_main$A,
4302
+ Choose: _sfc_main$y,
4374
4303
  Footer: _sfc_main$x,
4375
4304
  Header: _sfc_main$w,
4376
- Icon: _sfc_main$A,
4305
+ Icon: _sfc_main$z,
4377
4306
  Input: _sfc_main$v,
4378
4307
  Number: _sfc_main$u,
4379
4308
  Search: _sfc_main$t,
4380
- Select: _sfc_main$i,
4381
- Switch: _sfc_main$h,
4382
- Textarea: _sfc_main$g,
4383
- Dynamic: _sfc_main$q,
4384
- Element: _sfc_main$e,
4385
- Fold: _sfc_main$d,
4386
- Motion: _sfc_main$a,
4387
- Layout: _sfc_main$b,
4388
- Scroll: _sfc_main$c,
4389
- Sort: _sfc_main$9,
4390
- Table: _sfc_main$8,
4391
- TableRow: _sfc_main$7,
4392
- TableCol: _sfc_main$6,
4393
- Transitions: _sfc_main$f,
4394
- Tree: _sfc_main$4,
4395
- Wrapper: _sfc_main$3,
4309
+ Select: _sfc_main$h,
4310
+ Switch: _sfc_main$g,
4311
+ Textarea: _sfc_main$f,
4312
+ Dynamic: _sfc_main$p,
4313
+ Fold: _sfc_main$e,
4314
+ Motion: _sfc_main$r,
4315
+ Layout: _sfc_main$c,
4316
+ Scroll: _sfc_main$d,
4317
+ Sort: _sfc_main$b,
4318
+ Table: _sfc_main$a,
4319
+ TableRow: _sfc_main$9,
4320
+ TableCol: _sfc_main$8,
4321
+ Tree: _sfc_main$6,
4322
+ Wrapper: _sfc_main$5,
4323
+ DatePicker: _sfc_main$2,
4324
+ TimePicker: _sfc_main$1,
4396
4325
  DragVerify: _sfc_main,
4397
- Empty: _sfc_main$l,
4398
- Loading: _sfc_main$r
4326
+ Empty: _sfc_main$k,
4327
+ Loading: _sfc_main$q
4399
4328
  };
4400
4329
 
4401
4330
  snail_core.onMountScope(scope => {