snail.vue 2.0.9 → 2.0.10

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$j = ["title"];
9
- var _sfc_main$x = vue.defineComponent({
8
+ const _hoisted_1$k = ["title"];
9
+ var _sfc_main$y = 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$j);
25
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$k);
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":
@@ -69,10 +65,10 @@
69
65
  }
70
66
  }
71
67
 
72
- const _hoisted_1$i = ["width", "height"];
73
- const _hoisted_2$b = ["textContent"];
74
- const _hoisted_3$8 = ["fill", "stroke", "stroke-width", "d"];
75
- var _sfc_main$w = vue.defineComponent({
68
+ const _hoisted_1$j = ["width", "height"];
69
+ const _hoisted_2$c = ["textContent"];
70
+ const _hoisted_3$9 = ["fill", "stroke", "stroke-width", "d"];
71
+ var _sfc_main$x = vue.defineComponent({
76
72
  ...{
77
73
  name: "Icon",
78
74
  inheritAttrs: true
@@ -102,23 +98,23 @@
102
98
  onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
103
99
  }, [vue.createElementVNode("title", {
104
100
  textContent: vue.toDisplayString(__props.title || "")
105
- }, null, 8, _hoisted_2$b), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSvgDraw)(__props.type, __props.draw), d => {
101
+ }, null, 8, _hoisted_2$c), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSvgDraw)(__props.type, __props.draw), d => {
106
102
  return vue.openBlock(), vue.createElementBlock("path", {
107
103
  fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
108
104
  stroke: __props.stroke,
109
105
  "stroke-width": __props.strokeWidth,
110
106
  d
111
- }, null, 8, _hoisted_3$8);
112
- }), 256))], 46, _hoisted_1$i);
107
+ }, null, 8, _hoisted_3$9);
108
+ }), 256))], 46, _hoisted_1$j);
113
109
  };
114
110
  }
115
111
  });
116
112
 
117
- const _hoisted_1$h = ["title", "onClick"];
118
- const _hoisted_2$a = ["type", "checked"];
119
- const _hoisted_3$7 = ["textContent"];
120
- const _hoisted_4$5 = ["textContent"];
121
- var _sfc_main$v = vue.defineComponent({
113
+ const _hoisted_1$i = ["title", "onClick"];
114
+ const _hoisted_2$b = ["type", "checked"];
115
+ const _hoisted_3$8 = ["textContent"];
116
+ const _hoisted_4$6 = ["textContent"];
117
+ var _sfc_main$w = vue.defineComponent({
122
118
  ...{
123
119
  name: "Choose",
124
120
  inheritAttrs: true
@@ -194,10 +190,10 @@
194
190
  key: 0,
195
191
  type: vue.unref(type),
196
192
  checked: node.selected
197
- }, null, 8, _hoisted_2$a)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
193
+ }, null, 8, _hoisted_2$b)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
198
194
  key: 1,
199
195
  class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
200
- }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
196
+ }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
201
197
  key: 0,
202
198
  type: "success",
203
199
  size: 12,
@@ -206,18 +202,18 @@
206
202
  key: 2,
207
203
  class: "item-text",
208
204
  textContent: vue.toDisplayString(node.item.text)
209
- }, null, 8, _hoisted_3$7)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
205
+ }, null, 8, _hoisted_3$8)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
210
206
  key: 3,
211
207
  class: "item-des",
212
208
  textContent: vue.toDisplayString(node.item.description)
213
- }, null, 8, _hoisted_4$5)) : vue.createCommentVNode("", true)], 14, _hoisted_1$h);
209
+ }, null, 8, _hoisted_4$6)) : vue.createCommentVNode("", true)], 14, _hoisted_1$i);
214
210
  }), 128))], 2);
215
211
  };
216
212
  }
217
213
  });
218
214
 
219
- const _hoisted_1$g = ["id"];
220
- var _sfc_main$u = vue.defineComponent({
215
+ const _hoisted_1$h = ["id"];
216
+ var _sfc_main$v = vue.defineComponent({
221
217
  __name: "datepicker",
222
218
  props: {
223
219
  type: {},
@@ -368,12 +364,16 @@
368
364
  class: "snail-datepicker",
369
365
  id: vue.unref(id),
370
366
  onClick
371
- }, null, 8, _hoisted_1$g);
367
+ }, null, 8, _hoisted_1$h);
372
368
  };
373
369
  }
374
370
  });
375
371
 
376
- var _sfc_main$t = vue.defineComponent({
372
+ var addLink = href => setTimeout(snail_view.link.register, 0, href);
373
+
374
+ addLink("/styles/snail.vue.vue.css");
375
+
376
+ var _sfc_main$u = vue.defineComponent({
377
377
  ...{
378
378
  name: "Footer",
379
379
  inheritAttrs: true
@@ -404,13 +404,13 @@
404
404
  class: vue.normalizeClass(["snail-footer", {
405
405
  "start-divider": __props.divider
406
406
  }, __props.align || "right"])
407
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
407
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
408
408
  key: 0,
409
409
  size: "max",
410
410
  type: "default",
411
411
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
412
412
  textContent: vue.toDisplayString(__props.cancelName || "取消")
413
- }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
413
+ }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
414
414
  key: 1,
415
415
  size: "max",
416
416
  type: "primary",
@@ -421,8 +421,8 @@
421
421
  }
422
422
  });
423
423
 
424
- const _hoisted_1$f = ["textContent"];
425
- var _sfc_main$s = vue.defineComponent({
424
+ const _hoisted_1$g = ["textContent"];
425
+ var _sfc_main$t = vue.defineComponent({
426
426
  ...{
427
427
  name: "Header",
428
428
  inheritAttrs: true
@@ -461,7 +461,7 @@
461
461
  key: 0,
462
462
  textContent: vue.toDisplayString(__props.title),
463
463
  class: vue.normalizeClass(["header-title", __props.titleAlign])
464
- }, null, 10, _hoisted_1$f)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
464
+ }, null, 10, _hoisted_1$g)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
465
465
  key: 1,
466
466
  type: "close",
467
467
  size: 22,
@@ -473,18 +473,18 @@
473
473
  }
474
474
  });
475
475
 
476
- const _hoisted_1$e = ["textContent"];
477
- const _hoisted_2$9 = {
476
+ const _hoisted_1$f = ["textContent"];
477
+ const _hoisted_2$a = {
478
478
  key: 0,
479
479
  class: "required",
480
480
  textContent: "*"
481
481
  };
482
- const _hoisted_3$6 = {
482
+ const _hoisted_3$7 = {
483
483
  class: "input-body"
484
484
  };
485
- const _hoisted_4$4 = ["type", "value", "readonly", "placeholder", "title"];
486
- const _hoisted_5$2 = ["title"];
487
- var _sfc_main$r = vue.defineComponent({
485
+ const _hoisted_4$5 = ["type", "value", "readonly", "placeholder", "title"];
486
+ const _hoisted_5$3 = ["title"];
487
+ var _sfc_main$s = vue.defineComponent({
488
488
  ...{
489
489
  name: "Input",
490
490
  inheritAttrs: true
@@ -536,7 +536,7 @@
536
536
  }, [vue.createElementVNode("span", {
537
537
  class: "text",
538
538
  textContent: vue.toDisplayString(__props.title)
539
- }, null, 8, _hoisted_1$e), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$9)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$6, [vue.createElementVNode("input", {
539
+ }, 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$7, [vue.createElementVNode("input", {
540
540
  ref: "input-el",
541
541
  type: __props.type || "text",
542
542
  value: inputModel.value,
@@ -545,15 +545,15 @@
545
545
  title: inputModel.value,
546
546
  onChange: onValueChange,
547
547
  onClick: _cache[0] || (_cache[0] = $event => emits("click"))
548
- }, null, 40, _hoisted_4$4), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
548
+ }, null, 40, _hoisted_4$5), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
549
549
  key: 0,
550
550
  class: "validate",
551
551
  title: validateRef.value
552
- }, [vue.createVNode(_sfc_main$w, {
552
+ }, [vue.createVNode(_sfc_main$x, {
553
553
  type: "error",
554
554
  size: 16,
555
555
  color: "red"
556
- })], 8, _hoisted_5$2)) : vue.createCommentVNode("", true)])], 2);
556
+ })], 8, _hoisted_5$3)) : vue.createCommentVNode("", true)])], 2);
557
557
  };
558
558
  }
559
559
  });
@@ -758,20 +758,20 @@
758
758
  return formatter;
759
759
  }
760
760
 
761
- const _hoisted_1$d = {
761
+ const _hoisted_1$e = {
762
762
  key: 0,
763
763
  class: "number-prefix"
764
764
  };
765
- const _hoisted_2$8 = ["textContent"];
766
- const _hoisted_3$5 = ["inputmode", "placeholder", "title"];
767
- const _hoisted_4$3 = {
765
+ const _hoisted_2$9 = ["textContent"];
766
+ const _hoisted_3$6 = ["inputmode", "placeholder", "title"];
767
+ const _hoisted_4$4 = {
768
768
  key: 1,
769
769
  class: "number-suffix"
770
770
  };
771
- const _hoisted_5$1 = ["textContent"];
772
- const _hoisted_6 = ["title", "textContent"];
773
- const _hoisted_7 = ["title", "textContent"];
774
- var _sfc_main$q = vue.defineComponent({
771
+ const _hoisted_5$2 = ["textContent"];
772
+ const _hoisted_6$1 = ["title", "textContent"];
773
+ const _hoisted_7$1 = ["title", "textContent"];
774
+ var _sfc_main$r = vue.defineComponent({
775
775
  __name: "number",
776
776
  props: vue.mergeModels({
777
777
  placeholder: {},
@@ -918,10 +918,10 @@
918
918
  "has-prefix": vue.unref(hasPrefix),
919
919
  "has-suffix": vue.unref(hasSuffix)
920
920
  }])
921
- }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [vue.createElementVNode("span", {
921
+ }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createElementVNode("span", {
922
922
  class: "ellipsis",
923
923
  textContent: vue.toDisplayString(vue.unref(prefix))
924
- }, null, 8, _hoisted_2$8)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
924
+ }, null, 8, _hoisted_2$9)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
925
925
  class: vue.normalizeClass(["input-panel", vue.unref(controls)])
926
926
  }, [vue.withDirectives(vue.createElementVNode("input", {
927
927
  type: "text",
@@ -933,18 +933,18 @@
933
933
  onFocus: _cache[1] || (_cache[1] = $event => vue.isRef(needBackSection) ? needBackSection.value = true : needBackSection = true),
934
934
  onPaste: _cache[2] || (_cache[2] = $event => vue.isRef(needBackSection) ? needBackSection.value = false : needBackSection = false),
935
935
  onBlur: _cache[3] || (_cache[3] = $event => formatOnEnd(true))
936
- }, null, 40, _hoisted_3$5), [[vue.vModelText, displayValueRef.value]]), vue.unref(controls) == "default" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
936
+ }, null, 40, _hoisted_3$6), [[vue.vModelText, displayValueRef.value]]), vue.unref(controls) == "default" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
937
937
  key: 0
938
938
  }, [vue.createElementVNode("div", {
939
939
  class: "controls default subtract",
940
940
  onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
941
- }, [vue.createVNode(_sfc_main$w, {
941
+ }, [vue.createVNode(_sfc_main$x, {
942
942
  type: "subtract",
943
943
  size: 20
944
944
  })]), vue.createElementVNode("div", {
945
945
  class: "controls default plus",
946
946
  onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
947
- }, [vue.createVNode(_sfc_main$w, {
947
+ }, [vue.createVNode(_sfc_main$x, {
948
948
  type: "plus",
949
949
  size: 20
950
950
  })])], 64)) : vue.unref(controls) == "right" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
@@ -952,38 +952,38 @@
952
952
  }, [vue.createElementVNode("div", {
953
953
  class: "controls right plus",
954
954
  onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
955
- }, [vue.createVNode(_sfc_main$w, {
955
+ }, [vue.createVNode(_sfc_main$x, {
956
956
  type: "arrow",
957
957
  size: 20,
958
958
  rotate: 270
959
959
  })]), vue.createElementVNode("div", {
960
960
  class: "controls right subtract",
961
961
  onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
962
- }, [vue.createVNode(_sfc_main$w, {
962
+ }, [vue.createVNode(_sfc_main$x, {
963
963
  type: "arrow",
964
964
  size: 20,
965
965
  rotate: 90
966
- })])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createElementVNode("span", {
966
+ })])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [vue.createElementVNode("span", {
967
967
  class: "ellipsis",
968
968
  textContent: vue.toDisplayString(vue.unref(suffix))
969
- }, null, 8, _hoisted_5$1)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
969
+ }, null, 8, _hoisted_5$2)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
970
970
  key: 2,
971
971
  class: "number-util ellipsis",
972
972
  title: upperTextRef.value,
973
973
  textContent: vue.toDisplayString(`大写:${upperTextRef.value || ""}`)
974
- }, null, 8, _hoisted_6)) : vue.createCommentVNode("", true), vue.unref(thousands) == "below" ? (vue.openBlock(), vue.createElementBlock("div", {
974
+ }, null, 8, _hoisted_6$1)) : vue.createCommentVNode("", true), vue.unref(thousands) == "below" ? (vue.openBlock(), vue.createElementBlock("div", {
975
975
  key: 3,
976
976
  class: "number-util ellipsis",
977
977
  title: thousandsTextRef.value,
978
978
  textContent: vue.toDisplayString(`千分位:${thousandsTextRef.value || ""}`)
979
- }, null, 8, _hoisted_7)) : vue.createCommentVNode("", true)], 2);
979
+ }, null, 8, _hoisted_7$1)) : vue.createCommentVNode("", true)], 2);
980
980
  };
981
981
  }
982
982
  });
983
983
 
984
- const _hoisted_1$c = ["placeholder", "readonly"];
984
+ const _hoisted_1$d = ["placeholder", "readonly"];
985
985
  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";
986
- var _sfc_main$p = vue.defineComponent({
986
+ var _sfc_main$q = vue.defineComponent({
987
987
  ...{
988
988
  name: "Search",
989
989
  inheritAttrs: true
@@ -1028,9 +1028,9 @@
1028
1028
  readonly: __props.readonly,
1029
1029
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
1030
1030
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
1031
- }, null, 40, _hoisted_1$c), [[vue.vModelText, textModel.value, void 0, {
1031
+ }, null, 40, _hoisted_1$d), [[vue.vModelText, textModel.value, void 0, {
1032
1032
  trim: true
1033
- }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$w, {
1033
+ }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$x, {
1034
1034
  class: "search-button",
1035
1035
  type: "custom",
1036
1036
  draw: searchIon,
@@ -1251,11 +1251,11 @@
1251
1251
  }
1252
1252
  }
1253
1253
 
1254
- const _hoisted_1$b = {
1254
+ const _hoisted_1$c = {
1255
1255
  class: "snail-confirm flex-column"
1256
1256
  };
1257
- const _hoisted_2$7 = ["innerHTML"];
1258
- var _sfc_main$o = vue.defineComponent({
1257
+ const _hoisted_2$8 = ["innerHTML"];
1258
+ var _sfc_main$p = vue.defineComponent({
1259
1259
  ...{
1260
1260
  name: "ConfirmContainer",
1261
1261
  inheritAttrs: true
@@ -1283,14 +1283,14 @@
1283
1283
  },
1284
1284
  setup(__props) {
1285
1285
  return (_ctx, _cache) => {
1286
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [vue.createVNode(_sfc_main$s, {
1286
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createVNode(_sfc_main$t, {
1287
1287
  "use-to": "dialog",
1288
1288
  title: __props.title || "提示",
1289
1289
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1290
1290
  }, null, 8, ["title"]), vue.createElementVNode("div", {
1291
1291
  class: "confirm-body",
1292
1292
  innerHTML: __props.message || "请确认?"
1293
- }, null, 8, _hoisted_2$7), vue.createVNode(_sfc_main$t, {
1293
+ }, null, 8, _hoisted_2$8), vue.createVNode(_sfc_main$u, {
1294
1294
  align: "right",
1295
1295
  "cancel-name": __props.cancelName,
1296
1296
  "cancel-disabled": __props.cancelDisabled,
@@ -1303,7 +1303,7 @@
1303
1303
  }
1304
1304
  });
1305
1305
 
1306
- var _sfc_main$n = vue.defineComponent({
1306
+ var _sfc_main$o = vue.defineComponent({
1307
1307
  ...{
1308
1308
  name: "Loading",
1309
1309
  inheritAttrs: true
@@ -1342,7 +1342,7 @@
1342
1342
  }
1343
1343
  });
1344
1344
 
1345
- var _sfc_main$m = vue.defineComponent({
1345
+ var _sfc_main$n = vue.defineComponent({
1346
1346
  ...{
1347
1347
  name: "Dynamic",
1348
1348
  inheritAttrs: false
@@ -1366,7 +1366,7 @@
1366
1366
  const loadingComponent = vue.defineComponent({
1367
1367
  inheritAttrs: false,
1368
1368
  components: {
1369
- Loading: _sfc_main$n
1369
+ Loading: _sfc_main$o
1370
1370
  },
1371
1371
  template: "<Loading :mask-disabled='true' />"
1372
1372
  });
@@ -1433,7 +1433,7 @@
1433
1433
  }
1434
1434
  });
1435
1435
 
1436
- var _sfc_main$l = vue.defineComponent({
1436
+ var _sfc_main$m = vue.defineComponent({
1437
1437
  ...{
1438
1438
  name: "DialogContainer",
1439
1439
  inheritAttrs: true
@@ -1478,7 +1478,7 @@
1478
1478
  onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
1479
1479
  __props.options.closeOnMask && vue.unref(closePopup)();
1480
1480
  }, ["self"]))
1481
- }, [vue.createVNode(_sfc_main$m, vue.mergeProps({
1481
+ }, [vue.createVNode(_sfc_main$n, vue.mergeProps({
1482
1482
  class: "dialog-body",
1483
1483
  name: __props.options.name,
1484
1484
  component: __props.options.component,
@@ -1493,7 +1493,7 @@
1493
1493
  }
1494
1494
  });
1495
1495
 
1496
- var _sfc_main$k = vue.defineComponent({
1496
+ var _sfc_main$l = vue.defineComponent({
1497
1497
  ...{
1498
1498
  name: "FollowContainer",
1499
1499
  inheritAttrs: true
@@ -1595,7 +1595,15 @@
1595
1595
  onEvent(window, "resize", () => __props.options.closeOnResize ? closePopup(void 0) : rootDom.value && buildFollow());
1596
1596
  onEvent(window, "keyup", evet => __props.options.closeOnEscape && evet.key === "Escape" && followExt.pinned.value != true && closePopup(void 0));
1597
1597
  onEvent(window, "click", event => {
1598
- __props.options.closeOnMask && followExt.pinned.value != true && rootDom.value != event.target && rootDom.value.contains(event.target) == false && closePopup(void 0);
1598
+ if (__props.options.closeOnMask != true || followExt.pinned.value == true) {
1599
+ return;
1600
+ }
1601
+ const isClickInContainer = rootDom.value === event.target || rootDom.value.contains(event.target);
1602
+ const isClickInTarget = __props.extOptions.target == event.target || __props.extOptions.target.contains(event.target);
1603
+ if (isClickInContainer || isClickInTarget && __props.options.closeOnTarget != true) {
1604
+ return;
1605
+ }
1606
+ closePopup(void 0);
1599
1607
  });
1600
1608
  onMutation(rootDom.value, {
1601
1609
  childList: true,
@@ -1606,7 +1614,7 @@
1606
1614
  });
1607
1615
  });
1608
1616
  return (_ctx, _cache) => {
1609
- return vue.openBlock(), vue.createBlock(_sfc_main$m, vue.mergeProps({
1617
+ return vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
1610
1618
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1611
1619
  style: {
1612
1620
  "z-index": __props.zIndex
@@ -1623,7 +1631,7 @@
1623
1631
  }
1624
1632
  });
1625
1633
 
1626
- var _sfc_main$j = vue.defineComponent({
1634
+ var _sfc_main$k = vue.defineComponent({
1627
1635
  ...{
1628
1636
  name: "PopupContainer",
1629
1637
  inheritAttrs: true
@@ -1643,7 +1651,7 @@
1643
1651
  model = vue.shallowRef(void 0)
1644
1652
  } = __props.options;
1645
1653
  return (_ctx, _cache) => {
1646
- return vue.openBlock(), vue.createBlock(_sfc_main$m, vue.mergeProps({
1654
+ return vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
1647
1655
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1648
1656
  style: {
1649
1657
  "z-index": __props.zIndex
@@ -1661,12 +1669,12 @@
1661
1669
  }
1662
1670
  });
1663
1671
 
1664
- const _hoisted_1$a = {
1672
+ const _hoisted_1$b = {
1665
1673
  key: 1,
1666
1674
  class: "icon"
1667
1675
  };
1668
- const _hoisted_2$6 = ["innerHTML"];
1669
- var _sfc_main$i = vue.defineComponent({
1676
+ const _hoisted_2$7 = ["innerHTML"];
1677
+ var _sfc_main$j = vue.defineComponent({
1670
1678
  ...{
1671
1679
  name: "ToastContainer",
1672
1680
  inheritAttrs: true
@@ -1704,7 +1712,7 @@
1704
1712
  }),
1705
1713
  onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
1706
1714
  onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
1707
- }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
1715
+ }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
1708
1716
  key: 0,
1709
1717
  class: "close-icon",
1710
1718
  type: "close",
@@ -1715,21 +1723,21 @@
1715
1723
  onClick: _cache[2] || (_cache[2] = $event => {
1716
1724
  vue.unref(closePopup)();
1717
1725
  })
1718
- }, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createVNode(_sfc_main$w, {
1726
+ }, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [vue.createVNode(_sfc_main$x, {
1719
1727
  type: vue.unref(props).type,
1720
1728
  fill: "#707070",
1721
1729
  size: 20
1722
1730
  }, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
1723
1731
  class: "message",
1724
1732
  innerHTML: vue.unref(props).message
1725
- }, null, 8, _hoisted_2$6)], 38);
1733
+ }, null, 8, _hoisted_2$7)], 38);
1726
1734
  };
1727
1735
  }
1728
1736
  });
1729
1737
 
1730
1738
  function usePopup() {
1731
1739
  function popup(options) {
1732
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$j, options);
1740
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$k, options);
1733
1741
  return addScope2Scopes(scope);
1734
1742
  }
1735
1743
  function dialog(options) {
@@ -1762,7 +1770,7 @@
1762
1770
  },
1763
1771
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1764
1772
  });
1765
- const descriptor = openPopup(_sfc_main$l, options, extOptions);
1773
+ const descriptor = openPopup(_sfc_main$m, options, extOptions);
1766
1774
  scope = snail_core.useAsyncScope(deferred.promise);
1767
1775
  monitorDialog(descriptor, scope, deferred);
1768
1776
  }
@@ -1780,14 +1788,14 @@
1780
1788
  inPopup: "follow",
1781
1789
  target
1782
1790
  };
1783
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$k, options, extOptions);
1791
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$l, options, extOptions);
1784
1792
  }
1785
1793
  return addScope2Scopes(scope);
1786
1794
  }
1787
1795
  function confirm(title, message, options) {
1788
1796
  options = options || Object.create(null);
1789
1797
  return dialog({
1790
- component: _sfc_main$o,
1798
+ component: _sfc_main$p,
1791
1799
  closeOnEscape: true,
1792
1800
  props: {
1793
1801
  ...options,
@@ -1797,7 +1805,7 @@
1797
1805
  });
1798
1806
  }
1799
1807
  function toast(type, message, options) {
1800
- return popupInCustomContainer(_sfc_main$i, {
1808
+ return popupInCustomContainer(_sfc_main$j, {
1801
1809
  url: "#ToastContainer",
1802
1810
  props: {
1803
1811
  ...(options || Object.create(null)),
@@ -1830,7 +1838,7 @@
1830
1838
  },
1831
1839
  ...extOptions
1832
1840
  });
1833
- const descriptor = openPopup(container || _sfc_main$j, options, extOptions);
1841
+ const descriptor = openPopup(container || _sfc_main$k, options, extOptions);
1834
1842
  const scope = snail_core.useAsyncScope(deferred.promise);
1835
1843
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
1836
1844
  return scope;
@@ -1968,12 +1976,12 @@
1968
1976
  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==";
1969
1977
  }
1970
1978
 
1971
- const _hoisted_1$9 = {
1979
+ const _hoisted_1$a = {
1972
1980
  class: "snail-empty"
1973
1981
  };
1974
- const _hoisted_2$5 = ["src"];
1975
- const _hoisted_3$4 = ["textContent"];
1976
- var _sfc_main$h = vue.defineComponent({
1982
+ const _hoisted_2$6 = ["src"];
1983
+ const _hoisted_3$5 = ["textContent"];
1984
+ var _sfc_main$i = vue.defineComponent({
1977
1985
  ...{
1978
1986
  name: "Empty",
1979
1987
  inheritAttrs: true
@@ -1986,23 +1994,23 @@
1986
1994
  setup(__props) {
1987
1995
  const defaultImageBase64 = getNoDataBase64Image();
1988
1996
  return (_ctx, _cache) => {
1989
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [vue.createElementVNode("img", {
1997
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("img", {
1990
1998
  src: __props.imageUrl || vue.unref(defaultImageBase64)
1991
- }, null, 8, _hoisted_2$5), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
1999
+ }, null, 8, _hoisted_2$6), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
1992
2000
  class: "message",
1993
2001
  textContent: vue.toDisplayString(__props.message || "无数据")
1994
- }, null, 8, _hoisted_3$4)])]);
2002
+ }, null, 8, _hoisted_3$5)])]);
1995
2003
  };
1996
2004
  }
1997
2005
  });
1998
2006
 
1999
- const _hoisted_1$8 = ["title"];
2000
- const _hoisted_2$4 = ["textContent"];
2001
- const _hoisted_3$3 = {
2007
+ const _hoisted_1$9 = ["title"];
2008
+ const _hoisted_2$5 = ["textContent"];
2009
+ const _hoisted_3$4 = {
2002
2010
  key: 1,
2003
2011
  class: "select-status"
2004
2012
  };
2005
- var _sfc_main$g = vue.defineComponent({
2013
+ var _sfc_main$h = vue.defineComponent({
2006
2014
  ...{
2007
2015
  name: "SelectNode",
2008
2016
  inheritAttrs: true
@@ -2047,15 +2055,15 @@
2047
2055
  }, [vue.createElementVNode("div", {
2048
2056
  class: "item-text ellipsis",
2049
2057
  textContent: vue.toDisplayString(__props.item.text)
2050
- }, null, 8, _hoisted_2$4), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
2058
+ }, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
2051
2059
  key: 0,
2052
2060
  type: "arrow",
2053
2061
  color: "#8a9099"
2054
- })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [vue.createVNode(_sfc_main$w, {
2062
+ })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [vue.createVNode(_sfc_main$x, {
2055
2063
  type: "success",
2056
2064
  color: "white",
2057
2065
  size: 12
2058
- })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$8)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2066
+ })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$9)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2059
2067
  key: 1
2060
2068
  }, vue.renderList(vue.unref(showChildrenRef), child => {
2061
2069
  return vue.openBlock(), vue.createBlock(_component_SelectNode, {
@@ -2072,7 +2080,7 @@
2072
2080
  }
2073
2081
  });
2074
2082
 
2075
- var _sfc_main$f = vue.defineComponent({
2083
+ var _sfc_main$g = vue.defineComponent({
2076
2084
  ...{
2077
2085
  name: "Select2Popup",
2078
2086
  inheritAttrs: true
@@ -2244,13 +2252,13 @@
2244
2252
  key: 0
2245
2253
  }, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2246
2254
  key: 1
2247
- }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
2255
+ }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
2248
2256
  key: 0
2249
2257
  }, __props.search, {
2250
2258
  onSearch,
2251
2259
  key: "select-search"
2252
2260
  }), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
2253
- return vue.openBlock(), vue.createBlock(_sfc_main$g, {
2261
+ return vue.openBlock(), vue.createBlock(_sfc_main$h, {
2254
2262
  key: vue.unref(context).getKey(item),
2255
2263
  multiple: __props.multiple,
2256
2264
  item,
@@ -2259,7 +2267,7 @@
2259
2267
  onEnter: onEnterSelectNode,
2260
2268
  onClick: onClickSelectNode
2261
2269
  }, null, 8, ["multiple", "item", "context"]);
2262
- }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
2270
+ }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
2263
2271
  key: 1,
2264
2272
  message: "无结果"
2265
2273
  })) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2271,20 +2279,20 @@
2271
2279
  }
2272
2280
  });
2273
2281
 
2274
- const _hoisted_1$7 = {
2282
+ const _hoisted_1$8 = {
2275
2283
  key: 0,
2276
2284
  class: "select-result"
2277
2285
  };
2278
- const _hoisted_2$3 = ["title", "textContent"];
2279
- const _hoisted_3$2 = ["textContent"];
2280
- const _hoisted_4$2 = {
2286
+ const _hoisted_2$4 = ["title", "textContent"];
2287
+ const _hoisted_3$3 = ["textContent"];
2288
+ const _hoisted_4$3 = {
2281
2289
  key: 1,
2282
2290
  class: "placeholder"
2283
2291
  };
2284
2292
  onAppCreated((app, type) => {
2285
- type == "popup" && app.component("SelectPopup", _sfc_main$f);
2293
+ type == "popup" && app.component("SelectPopup", _sfc_main$g);
2286
2294
  });
2287
- var _sfc_main$e = vue.defineComponent({
2295
+ var _sfc_main$f = vue.defineComponent({
2288
2296
  ...{
2289
2297
  name: "Select",
2290
2298
  inheritAttrs: true
@@ -2416,15 +2424,15 @@
2416
2424
  ref: "select"
2417
2425
  }, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2418
2426
  key: 0
2419
- }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2427
+ }, [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", {
2420
2428
  class: "select-text ellipsis",
2421
2429
  title: selectedTextRef.value,
2422
2430
  textContent: vue.toDisplayString(selectedTextRef.value)
2423
- }, null, 8, _hoisted_2$3)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2431
+ }, null, 8, _hoisted_2$4)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2424
2432
  key: 1,
2425
2433
  class: "placeholder",
2426
2434
  textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2427
- }, null, 8, _hoisted_3$2)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
2435
+ }, null, 8, _hoisted_3$3)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
2428
2436
  key: 2,
2429
2437
  type: "arrow",
2430
2438
  size: 24,
@@ -2432,12 +2440,12 @@
2432
2440
  style: {
2433
2441
  "transform": "rotate(90deg)"
2434
2442
  }
2435
- })) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, "暂无可选项"))], 2);
2443
+ })) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, "暂无可选项"))], 2);
2436
2444
  };
2437
2445
  }
2438
2446
  });
2439
2447
 
2440
- var _sfc_main$d = vue.defineComponent({
2448
+ var _sfc_main$e = vue.defineComponent({
2441
2449
  ...{
2442
2450
  name: "Switch",
2443
2451
  inheritAttrs: true
@@ -2486,8 +2494,8 @@
2486
2494
  }
2487
2495
  });
2488
2496
 
2489
- const _hoisted_1$6 = ["readonly", "placeholder", "rows"];
2490
- var _sfc_main$c = vue.defineComponent({
2497
+ const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
2498
+ var _sfc_main$d = vue.defineComponent({
2491
2499
  ...{
2492
2500
  name: "Textarea"
2493
2501
  },
@@ -2547,25 +2555,25 @@
2547
2555
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2548
2556
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2549
2557
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2550
- }), null, 16, _hoisted_1$6)), [[vue.vModelText, valueModel.value]]);
2558
+ }), null, 16, _hoisted_1$7)), [[vue.vModelText, valueModel.value]]);
2551
2559
  };
2552
2560
  }
2553
2561
  });
2554
2562
 
2555
- const _hoisted_1$5 = {
2563
+ const _hoisted_1$6 = {
2556
2564
  class: "fold-header"
2557
2565
  };
2558
- const _hoisted_2$2 = ["textContent"];
2559
- const _hoisted_3$1 = ["textContent"];
2560
- const _hoisted_4$1 = {
2566
+ const _hoisted_2$3 = ["textContent"];
2567
+ const _hoisted_3$2 = ["textContent"];
2568
+ const _hoisted_4$2 = {
2561
2569
  key: 1,
2562
2570
  class: "status"
2563
2571
  };
2564
- const _hoisted_5 = {
2572
+ const _hoisted_5$1 = {
2565
2573
  class: "fold-body",
2566
2574
  ref: "foldBody"
2567
2575
  };
2568
- var _sfc_main$b = vue.defineComponent({
2576
+ var _sfc_main$c = vue.defineComponent({
2569
2577
  ...{
2570
2578
  name: "Fold",
2571
2579
  inheritAttrs: true
@@ -2635,23 +2643,23 @@
2635
2643
  return (_ctx, _cache) => {
2636
2644
  return vue.openBlock(), vue.createElementBlock("div", {
2637
2645
  class: vue.normalizeClass(["snail-fold", statusModel.value])
2638
- }, [vue.createElementVNode("div", _hoisted_1$5, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
2646
+ }, [vue.createElementVNode("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
2639
2647
  class: "title ellipsis",
2640
2648
  textContent: vue.toDisplayString(__props.title)
2641
- }, null, 8, _hoisted_2$2), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
2649
+ }, null, 8, _hoisted_2$3), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
2642
2650
  key: 0,
2643
2651
  class: "subtitle ellipsis",
2644
2652
  textContent: vue.toDisplayString(__props.subtitle)
2645
- }, null, 8, _hoisted_3$1)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [vue.createVNode(_sfc_main$w, {
2653
+ }, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [vue.createVNode(_sfc_main$x, {
2646
2654
  type: "arrow",
2647
2655
  title: statusModel.value == "expand" ? "收起" : "展开",
2648
2656
  onClick: onStatusClick
2649
- }, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
2657
+ }, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5$1, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
2650
2658
  };
2651
2659
  }
2652
2660
  });
2653
2661
 
2654
- var _sfc_main$a = vue.defineComponent({
2662
+ var _sfc_main$b = vue.defineComponent({
2655
2663
  ...{
2656
2664
  name: "Scroll",
2657
2665
  inheritAttrs: true
@@ -2663,6 +2671,11 @@
2663
2671
  },
2664
2672
  scrollY: {
2665
2673
  type: Boolean
2674
+ },
2675
+ barSize: {},
2676
+ barMode: {},
2677
+ debounce: {
2678
+ type: Boolean
2666
2679
  }
2667
2680
  },
2668
2681
  emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
@@ -2681,9 +2694,30 @@
2681
2694
  onInterval
2682
2695
  } = snail_core.useTimer();
2683
2696
  const classRef = vue.computed(() => ({
2684
- "scroll-x": props.scrollX == true,
2685
- "scroll-y": props.scrollY == true
2697
+ "debounce": props.scrollY == true && props.debounce == true,
2698
+ "hover-show": props.barMode == "hover"
2686
2699
  }));
2700
+ const styleRef = vue.computed(() => {
2701
+ const style = Object.create(null);
2702
+ (props.scrollX || props.scrollY) && (style["--scroll-overflow"] = `${props.scrollX ? "auto" : "hidden"} ${props.scrollY ? "auto" : "hidden"}`);
2703
+ if (props.barSize) {
2704
+ switch (props.barSize) {
2705
+ case "normal":
2706
+ style["--scroll-bar-size"] = "10px";
2707
+ break;
2708
+ case "small":
2709
+ style["--scroll-bar-size"] = "6px";
2710
+ break;
2711
+ case "mini":
2712
+ style["--scroll-bar-size"] = "4px";
2713
+ break;
2714
+ case "none":
2715
+ style["--scroll-bar-size"] = "0";
2716
+ break;
2717
+ }
2718
+ }
2719
+ return style;
2720
+ });
2687
2721
  var preStatus = void 0;
2688
2722
  __expose({
2689
2723
  scroll,
@@ -2762,21 +2796,22 @@
2762
2796
  return vue.openBlock(), vue.createElementBlock("div", {
2763
2797
  class: vue.normalizeClass(["snail-scroll", classRef.value]),
2764
2798
  ref: "scroll-root",
2799
+ style: vue.normalizeStyle(styleRef.value),
2765
2800
  onScroll: refreshScrollInfo
2766
- }, [vue.renderSlot(_ctx.$slots, "default")], 34);
2801
+ }, [vue.renderSlot(_ctx.$slots, "default")], 38);
2767
2802
  };
2768
2803
  }
2769
2804
  });
2770
2805
 
2771
- const _hoisted_1$4 = {
2806
+ const _hoisted_1$5 = {
2772
2807
  key: 0,
2773
2808
  class: "layout-start"
2774
2809
  };
2775
- const _hoisted_2$1 = {
2810
+ const _hoisted_2$2 = {
2776
2811
  key: 1,
2777
2812
  class: "layout-end"
2778
2813
  };
2779
- var _sfc_main$9 = vue.defineComponent({
2814
+ var _sfc_main$a = vue.defineComponent({
2780
2815
  __name: "layout",
2781
2816
  props: {
2782
2817
  mode: {},
@@ -2786,17 +2821,17 @@
2786
2821
  return (_ctx, _cache) => {
2787
2822
  return vue.openBlock(), vue.createElementBlock("div", {
2788
2823
  class: vue.normalizeClass(["snail-layout", __props.mode])
2789
- }, [_ctx.$slots.start ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [vue.renderSlot(_ctx.$slots, "start")])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$a, vue.mergeProps({
2824
+ }, [_ctx.$slots.start ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [vue.renderSlot(_ctx.$slots, "start")])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$b, vue.mergeProps({
2790
2825
  class: "layout-body"
2791
2826
  }, __props.scroll), {
2792
2827
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
2793
2828
  _: 3
2794
- }, 16), _ctx.$slots.end ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "end")])) : vue.createCommentVNode("", true)], 2);
2829
+ }, 16), _ctx.$slots.end ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [vue.renderSlot(_ctx.$slots, "end")])) : vue.createCommentVNode("", true)], 2);
2795
2830
  };
2796
2831
  }
2797
2832
  });
2798
2833
 
2799
- var _sfc_main$8 = vue.defineComponent({
2834
+ var _sfc_main$9 = vue.defineComponent({
2800
2835
  ...{
2801
2836
  name: "Sort",
2802
2837
  inheritAttrs: true
@@ -2897,10 +2932,10 @@
2897
2932
  }
2898
2933
  });
2899
2934
 
2900
- const _hoisted_1$3 = {
2935
+ const _hoisted_1$4 = {
2901
2936
  class: "table-body"
2902
2937
  };
2903
- var _sfc_main$7 = vue.defineComponent({
2938
+ var _sfc_main$8 = vue.defineComponent({
2904
2939
  ...{
2905
2940
  name: "Table",
2906
2941
  inheritAttrs: true
@@ -2913,6 +2948,11 @@
2913
2948
  scrollY: {
2914
2949
  type: Boolean
2915
2950
  },
2951
+ barSize: {},
2952
+ barMode: {},
2953
+ debounce: {
2954
+ type: Boolean
2955
+ },
2916
2956
  border: {
2917
2957
  type: Boolean
2918
2958
  },
@@ -2924,7 +2964,7 @@
2924
2964
  const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
2925
2965
  const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
2926
2966
  return (_ctx, _cache) => {
2927
- return vue.openBlock(), vue.createBlock(_sfc_main$a, {
2967
+ return vue.openBlock(), vue.createBlock(_sfc_main$b, {
2928
2968
  class: vue.normalizeClass(["snail-table", {
2929
2969
  "start-border": __props.border == true
2930
2970
  }]),
@@ -2934,7 +2974,7 @@
2934
2974
  default: vue.withCtx(() => [vue.createElementVNode("div", {
2935
2975
  class: "table-header",
2936
2976
  style: vue.normalizeStyle(hStyleRef.value)
2937
- }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$3, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
2977
+ }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$4, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
2938
2978
  class: "table-footer",
2939
2979
  style: vue.normalizeStyle(fStyleRef.value)
2940
2980
  }, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -2944,7 +2984,7 @@
2944
2984
  }
2945
2985
  });
2946
2986
 
2947
- var _sfc_main$6 = vue.defineComponent({
2987
+ var _sfc_main$7 = vue.defineComponent({
2948
2988
  ...{
2949
2989
  name: "TableRow",
2950
2990
  inheritAttrs: true
@@ -2967,7 +3007,7 @@
2967
3007
  }
2968
3008
  });
2969
3009
 
2970
- var _sfc_main$5 = vue.defineComponent({
3010
+ var _sfc_main$6 = vue.defineComponent({
2971
3011
  ...{
2972
3012
  name: "TableCol",
2973
3013
  inheritAttrs: true
@@ -3013,14 +3053,15 @@
3013
3053
  }
3014
3054
  });
3015
3055
 
3016
- var _sfc_main$4 = vue.defineComponent({
3056
+ var _sfc_main$5 = vue.defineComponent({
3017
3057
  __name: "transitions",
3018
3058
  props: {
3019
- customClass: {},
3020
- effect: {},
3021
3059
  group: {
3022
3060
  type: Boolean
3023
- }
3061
+ },
3062
+ duration: {},
3063
+ customClass: {},
3064
+ effect: {}
3024
3065
  },
3025
3066
  setup(__props) {
3026
3067
  const props = __props;
@@ -3031,11 +3072,13 @@
3031
3072
  } else {
3032
3073
  array.push(props.effect || "fade");
3033
3074
  }
3075
+ console.log(array);
3034
3076
  return array.join(" ");
3035
3077
  });
3036
3078
  return (_ctx, _cache) => {
3037
3079
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.group ? vue.TransitionGroup : vue.Transition), vue.mergeProps(_ctx.$attrs, {
3038
3080
  appear: "",
3081
+ duration: __props.duration,
3039
3082
  "enter-active-class": `${classNames.value} enter-active`,
3040
3083
  "enter-from-class": `${classNames.value} enter-from`,
3041
3084
  "enter-to-class": `${classNames.value} enter-to`,
@@ -3045,25 +3088,25 @@
3045
3088
  }), {
3046
3089
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
3047
3090
  _: 3
3048
- }, 16, ["enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
3091
+ }, 16, ["duration", "enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
3049
3092
  };
3050
3093
  }
3051
3094
  });
3052
3095
 
3053
- const _hoisted_1$2 = {
3096
+ const _hoisted_1$3 = {
3054
3097
  key: 0,
3055
3098
  class: "node-fold"
3056
3099
  };
3057
- const _hoisted_2 = ["title", "textContent"];
3058
- const _hoisted_3 = {
3100
+ const _hoisted_2$1 = ["title", "textContent"];
3101
+ const _hoisted_3$1 = {
3059
3102
  class: "node-slot ellipsis"
3060
3103
  };
3061
- const _hoisted_4 = {
3104
+ const _hoisted_4$1 = {
3062
3105
  key: 1,
3063
3106
  class: "snail-tree-children hidden",
3064
3107
  ref: "children"
3065
3108
  };
3066
- var _sfc_main$3 = vue.defineComponent({
3109
+ var _sfc_main$4 = vue.defineComponent({
3067
3110
  ...{
3068
3111
  name: "TreeNode",
3069
3112
  inheritAttrs: true
@@ -3181,7 +3224,7 @@
3181
3224
  key: 1
3182
3225
  }, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
3183
3226
  class: "indent"
3184
- }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3227
+ }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
3185
3228
  key: 0,
3186
3229
  class: vue.normalizeClass(statusRef.value),
3187
3230
  type: "custom",
@@ -3193,7 +3236,7 @@
3193
3236
  class: "node-text ellipsis",
3194
3237
  title: __props.node.text,
3195
3238
  textContent: vue.toDisplayString(__props.node.text)
3196
- }, null, 8, _hoisted_2), vue.createElementVNode("div", _hoisted_3, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34)) : vue.createCommentVNode("", true), showRef.value && showChildrenRef.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
3239
+ }, null, 8, _hoisted_2$1), vue.createElementVNode("div", _hoisted_3$1, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34)) : vue.createCommentVNode("", true), showRef.value && showChildrenRef.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
3197
3240
  return vue.openBlock(), vue.createBlock(_component_TreeNode, {
3198
3241
  key: __props.context.getKey(child),
3199
3242
  node: child,
@@ -3213,10 +3256,10 @@
3213
3256
  }
3214
3257
  });
3215
3258
 
3216
- const _hoisted_1$1 = {
3259
+ const _hoisted_1$2 = {
3217
3260
  class: "snail-tree"
3218
3261
  };
3219
- var _sfc_main$2 = vue.defineComponent({
3262
+ var _sfc_main$3 = vue.defineComponent({
3220
3263
  ...{
3221
3264
  name: "Tree",
3222
3265
  inheritAttrs: true
@@ -3250,15 +3293,15 @@
3250
3293
  emits("click", node, parents);
3251
3294
  }
3252
3295
  return (_ctx, _cache) => {
3253
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
3296
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
3254
3297
  key: 0
3255
3298
  }, __props.search, {
3256
3299
  onSearch
3257
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$a, {
3300
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$b, {
3258
3301
  "scroll-y": true
3259
3302
  }, {
3260
3303
  default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
3261
- return vue.openBlock(), vue.createBlock(_sfc_main$3, {
3304
+ return vue.openBlock(), vue.createBlock(_sfc_main$4, {
3262
3305
  key: vue.unref(context).getKey(node),
3263
3306
  node,
3264
3307
  parent: void 0,
@@ -3279,7 +3322,7 @@
3279
3322
  }
3280
3323
  });
3281
3324
 
3282
- var _sfc_main$1 = vue.defineComponent({
3325
+ var _sfc_main$2 = vue.defineComponent({
3283
3326
  __name: "wrapper",
3284
3327
  props: {
3285
3328
  readonly: {
@@ -3301,14 +3344,14 @@
3301
3344
  return (_ctx, _cache) => {
3302
3345
  return vue.openBlock(), vue.createElementBlock("div", {
3303
3346
  class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
3304
- }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$s, vue.mergeProps({
3347
+ }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
3305
3348
  key: 0
3306
3349
  }, __props.header || {
3307
3350
  useTo: "dialog",
3308
3351
  title: "对话框"
3309
3352
  }, {
3310
3353
  onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
3311
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$a, vue.mergeProps({
3354
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$b, vue.mergeProps({
3312
3355
  class: "wrapper-body"
3313
3356
  }, __props.content || {
3314
3357
  scrollX: false,
@@ -3316,7 +3359,7 @@
3316
3359
  }), {
3317
3360
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
3318
3361
  _: 3
3319
- }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
3362
+ }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
3320
3363
  key: 1
3321
3364
  }, __props.footer || {}, {
3322
3365
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -3330,7 +3373,7 @@
3330
3373
  snail_core.mustObject(options, "options");
3331
3374
  target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
3332
3375
  target.classList.add("snail-app");
3333
- const app = vue.createApp(_sfc_main$m, options);
3376
+ const app = vue.createApp(_sfc_main$n, options);
3334
3377
  triggerAppCreated(app);
3335
3378
  app.mount(target);
3336
3379
  const scope = snail_core.useScope().onDestroy(() => app.unmount());
@@ -3338,6 +3381,253 @@
3338
3381
  return scope;
3339
3382
  }
3340
3383
 
3384
+ const _hoisted_1$1 = {
3385
+ class: "time-zone"
3386
+ };
3387
+ const _hoisted_2 = {
3388
+ class: "tz-item",
3389
+ ref: "hour-items"
3390
+ };
3391
+ const _hoisted_3 = ["textContent", "onClick"];
3392
+ const _hoisted_4 = {
3393
+ class: "tz-item",
3394
+ ref: "minute-items"
3395
+ };
3396
+ const _hoisted_5 = ["textContent", "onClick"];
3397
+ const _hoisted_6 = {
3398
+ key: 0,
3399
+ class: "tz-item",
3400
+ ref: "second-items"
3401
+ };
3402
+ const _hoisted_7 = ["textContent", "onClick"];
3403
+ const _hoisted_8 = {
3404
+ class: "time-operation"
3405
+ };
3406
+ var _sfc_main$1 = vue.defineComponent({
3407
+ __name: "time-pc",
3408
+ props: {
3409
+ value: {},
3410
+ initialDisabled: {
3411
+ type: Boolean
3412
+ },
3413
+ nowDisabled: {
3414
+ type: Boolean
3415
+ },
3416
+ manager: {},
3417
+ format: {},
3418
+ min: {},
3419
+ max: {},
3420
+ inPopup: {},
3421
+ closePopup: {
3422
+ type: Function
3423
+ },
3424
+ popupStatus: {},
3425
+ target: {},
3426
+ followX: {},
3427
+ followY: {},
3428
+ pinned: {}
3429
+ },
3430
+ emits: ["clear", "confirm"],
3431
+ setup(__props, _ref) {
3432
+ let {
3433
+ emit: __emit
3434
+ } = _ref;
3435
+ const props = __props;
3436
+ const emits = __emit;
3437
+ const tm = props.manager || snail_core.useTime({
3438
+ format: props.format == "HH:mm" ? "HH:mm" : "HH:mm:ss",
3439
+ min: snail_core.parseTime(props.min),
3440
+ max: snail_core.parseTime(props.max)
3441
+ });
3442
+ const {
3443
+ toast
3444
+ } = usePopup();
3445
+ const {
3446
+ inPopup,
3447
+ closePopup
3448
+ } = props;
3449
+ const secondDisabled = tm.format == "HH:mm";
3450
+ const tvRef = vue.ref();
3451
+ const hItemsDom = vue.useTemplateRef("hour-items");
3452
+ const mItemsDom = vue.useTemplateRef("minute-items");
3453
+ const sItemsDom = vue.useTemplateRef("second-items");
3454
+ function getTimeClass(type, value) {
3455
+ switch (type) {
3456
+ case "hour":
3457
+ return {
3458
+ active: tvRef.value.hour == value,
3459
+ disabled: tm.validateHH(value) == false
3460
+ };
3461
+ case "minute":
3462
+ return {
3463
+ active: tvRef.value.minute == value,
3464
+ disabled: tm.validateHHmm(tvRef.value.hour, value) == false
3465
+ };
3466
+ case "second":
3467
+ return {
3468
+ active: tvRef.value.second == value,
3469
+ disabled: tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value) == false
3470
+ };
3471
+ }
3472
+ }
3473
+ function scrollIntoView(items) {
3474
+ let activeIndex = void 0,
3475
+ firstValidIndex;
3476
+ for (var index = 0; index < (items ? items.children.length : 0); index++) {
3477
+ const ele = items.children[index];
3478
+ if (ele.classList.contains("disabled") == true) {
3479
+ continue;
3480
+ }
3481
+ if (firstValidIndex == void 0) {
3482
+ firstValidIndex = index;
3483
+ }
3484
+ if (ele.classList.contains("active") == true) {
3485
+ activeIndex = index;
3486
+ break;
3487
+ }
3488
+ }
3489
+ let showIndex = activeIndex;
3490
+ if (activeIndex == void 0) {
3491
+ if (firstValidIndex != void 0) {
3492
+ showIndex = firstValidIndex;
3493
+ }
3494
+ }
3495
+ showIndex != void 0 && items.children[showIndex].scrollIntoView({
3496
+ behavior: "smooth",
3497
+ block: "center"
3498
+ });
3499
+ }
3500
+ async function onTimeClick(type, value) {
3501
+ switch (type) {
3502
+ case "hour":
3503
+ if (tm.validateHH(value)) {
3504
+ tvRef.value.hour = value;
3505
+ await vue.nextTick();
3506
+ scrollIntoView(mItemsDom.value);
3507
+ }
3508
+ break;
3509
+ case "minute":
3510
+ if (tm.validateHHmm(tvRef.value.hour, value)) {
3511
+ tvRef.value.minute = value;
3512
+ await vue.nextTick();
3513
+ scrollIntoView(sItemsDom.value);
3514
+ }
3515
+ break;
3516
+ case "second":
3517
+ if (tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value)) {
3518
+ tvRef.value.second = value;
3519
+ }
3520
+ break;
3521
+ }
3522
+ }
3523
+ async function onNow() {
3524
+ tvRef.value = snail_core.getTimeNow();
3525
+ if (tm.validate(tvRef.value)) {
3526
+ await vue.nextTick();
3527
+ scrollIntoView(hItemsDom.value);
3528
+ scrollIntoView(mItemsDom.value);
3529
+ scrollIntoView(sItemsDom.value);
3530
+ }
3531
+ }
3532
+ function onConfirm() {
3533
+ tvRef.value = tm.correct(tvRef.value) || Object.create(null);
3534
+ if (tvRef.value == void 0 || tvRef.value.hour == void 0) {
3535
+ return toast("error", "请选选择时间");
3536
+ }
3537
+ if (secondDisabled != true && tvRef.value.minute == void 0) {
3538
+ return toast("error", "请选选择时间");
3539
+ }
3540
+ const value = tm.toString(tvRef.value);
3541
+ emits("confirm", value);
3542
+ inPopup && closePopup(value);
3543
+ }
3544
+ {
3545
+ props.value && (tvRef.value = tm.parse(props.value));
3546
+ tvRef.value || props.initialDisabled || (tvRef.value = tm.correct(snail_core.getTimeNow()));
3547
+ tvRef.value || (tvRef.value = Object.create(null));
3548
+ }
3549
+ vue.onMounted(async () => {
3550
+ await vue.nextTick();
3551
+ scrollIntoView(hItemsDom.value);
3552
+ scrollIntoView(mItemsDom.value);
3553
+ scrollIntoView(sItemsDom.value);
3554
+ });
3555
+ return (_ctx, _cache) => {
3556
+ return vue.openBlock(), vue.createElementBlock("div", {
3557
+ class: vue.normalizeClass(["snail-time-picker pc", {
3558
+ "second-disabled": secondDisabled
3559
+ }])
3560
+ }, [vue.createVNode(_sfc_main$5, {
3561
+ group: true,
3562
+ effect: ["down-up"]
3563
+ }, {
3564
+ default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$1, [vue.createElementVNode("div", _hoisted_2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array(24).fill(void 0), (_, index) => {
3565
+ return vue.openBlock(), vue.createElementBlock("div", {
3566
+ class: vue.normalizeClass(["tzi-number", getTimeClass("hour", index)]),
3567
+ textContent: vue.toDisplayString(String(index).padStart(2, "0")),
3568
+ onClick: $event => onTimeClick("hour", index)
3569
+ }, null, 10, _hoisted_3);
3570
+ }), 256))], 512), vue.createElementVNode("div", _hoisted_4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array(60).fill(void 0), (_, index) => {
3571
+ return vue.openBlock(), vue.createElementBlock("div", {
3572
+ class: vue.normalizeClass(["tzi-number", getTimeClass("minute", index)]),
3573
+ textContent: vue.toDisplayString(String(index).padStart(2, "0")),
3574
+ onClick: $event => onTimeClick("minute", index)
3575
+ }, null, 10, _hoisted_5);
3576
+ }), 256))], 512), secondDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array(60).fill(void 0), (_, index) => {
3577
+ return vue.openBlock(), vue.createElementBlock("div", {
3578
+ class: vue.normalizeClass(["tzi-number", getTimeClass("second", index)]),
3579
+ textContent: vue.toDisplayString(String(index).padStart(2, "0")),
3580
+ onClick: $event => onTimeClick("second", index)
3581
+ }, null, 10, _hoisted_7);
3582
+ }), 256))], 512)) : vue.createCommentVNode("", true)]), vue.createElementVNode("div", _hoisted_8, [vue.createVNode(_sfc_main$y, {
3583
+ type: "link",
3584
+ size: "small",
3585
+ textContent: "清空",
3586
+ onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), vue.unref(inPopup) && vue.unref(closePopup)("")))
3587
+ }), vue.unref(tm).validate(vue.unref(snail_core.getTimeNow)()) ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
3588
+ key: 0,
3589
+ type: "link",
3590
+ size: "small",
3591
+ textContent: "现在",
3592
+ onClick: onNow
3593
+ })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$y, {
3594
+ type: "link",
3595
+ size: "small",
3596
+ textContent: "确定",
3597
+ onClick: onConfirm
3598
+ })])]),
3599
+ _: 1
3600
+ })], 2);
3601
+ };
3602
+ }
3603
+ });
3604
+
3605
+ function usePicker() {
3606
+ const popup = usePopup();
3607
+ function showTime(target, options) {
3608
+ options = {
3609
+ ...options
3610
+ };
3611
+ delete options["manager"];
3612
+ return popup.follow(target, {
3613
+ component: _sfc_main$1,
3614
+ followX: ["center"],
3615
+ spaceClient: 10,
3616
+ spaceY: 2,
3617
+ spaceX: 2,
3618
+ closeOnMask: true,
3619
+ props: options
3620
+ });
3621
+ }
3622
+ {
3623
+ const manager = Object.freeze(snail_core.mountScope({
3624
+ showTime
3625
+ }, "IPickerManager"));
3626
+ manager.onDestroy(popup.destroy);
3627
+ return manager;
3628
+ }
3629
+ }
3630
+
3341
3631
  const _hoisted_1 = ["textContent"];
3342
3632
  var _sfc_main = vue.defineComponent({
3343
3633
  ...{
@@ -3423,12 +3713,12 @@
3423
3713
  onTouchstart: onStartDrag,
3424
3714
  onTouchmove: onDragMove,
3425
3715
  onTouchend: onDragEnd
3426
- }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3716
+ }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
3427
3717
  key: 0,
3428
3718
  type: "success",
3429
3719
  size: 20,
3430
3720
  color: "white"
3431
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3721
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$x, {
3432
3722
  key: 1,
3433
3723
  type: "custom",
3434
3724
  size: 20,
@@ -3440,32 +3730,32 @@
3440
3730
  });
3441
3731
 
3442
3732
  const components = {
3443
- Button: _sfc_main$x,
3444
- Choose: _sfc_main$v,
3445
- DatePicker: _sfc_main$u,
3446
- Footer: _sfc_main$t,
3447
- Header: _sfc_main$s,
3448
- Icon: _sfc_main$w,
3449
- Input: _sfc_main$r,
3450
- Number: _sfc_main$q,
3451
- Search: _sfc_main$p,
3452
- Select: _sfc_main$e,
3453
- Switch: _sfc_main$d,
3454
- Textarea: _sfc_main$c,
3455
- Dynamic: _sfc_main$m,
3456
- Fold: _sfc_main$b,
3457
- Layout: _sfc_main$9,
3458
- Scroll: _sfc_main$a,
3459
- Sort: _sfc_main$8,
3460
- Table: _sfc_main$7,
3461
- TableRow: _sfc_main$6,
3462
- TableCol: _sfc_main$5,
3463
- Transitions: _sfc_main$4,
3464
- Tree: _sfc_main$2,
3465
- Wrapper: _sfc_main$1,
3733
+ Button: _sfc_main$y,
3734
+ Choose: _sfc_main$w,
3735
+ DatePicker: _sfc_main$v,
3736
+ Footer: _sfc_main$u,
3737
+ Header: _sfc_main$t,
3738
+ Icon: _sfc_main$x,
3739
+ Input: _sfc_main$s,
3740
+ Number: _sfc_main$r,
3741
+ Search: _sfc_main$q,
3742
+ Select: _sfc_main$f,
3743
+ Switch: _sfc_main$e,
3744
+ Textarea: _sfc_main$d,
3745
+ Dynamic: _sfc_main$n,
3746
+ Fold: _sfc_main$c,
3747
+ Layout: _sfc_main$a,
3748
+ Scroll: _sfc_main$b,
3749
+ Sort: _sfc_main$9,
3750
+ Table: _sfc_main$8,
3751
+ TableRow: _sfc_main$7,
3752
+ TableCol: _sfc_main$6,
3753
+ Transitions: _sfc_main$5,
3754
+ Tree: _sfc_main$3,
3755
+ Wrapper: _sfc_main$2,
3466
3756
  DragVerify: _sfc_main,
3467
- Empty: _sfc_main$h,
3468
- Loading: _sfc_main$n
3757
+ Empty: _sfc_main$i,
3758
+ Loading: _sfc_main$o
3469
3759
  };
3470
3760
 
3471
3761
  snail_core.onMountScope(scope => {
@@ -3477,6 +3767,7 @@
3477
3767
  exports.mount = mount;
3478
3768
  exports.onAppCreated = onAppCreated;
3479
3769
  exports.triggerAppCreated = triggerAppCreated;
3770
+ exports.usePicker = usePicker;
3480
3771
  exports.usePopup = usePopup;
3481
3772
  exports.useReactive = useReactive;
3482
3773
  exports.useTreeContext = useTreeContext;