snail.vue 2.0.8 → 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
@@ -1278,18 +1278,19 @@
1278
1278
  },
1279
1279
  onBeforeClose: {
1280
1280
  type: Function
1281
- }
1281
+ },
1282
+ popupStatus: {}
1282
1283
  },
1283
1284
  setup(__props) {
1284
1285
  return (_ctx, _cache) => {
1285
- 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, {
1286
1287
  "use-to": "dialog",
1287
1288
  title: __props.title || "提示",
1288
1289
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1289
1290
  }, null, 8, ["title"]), vue.createElementVNode("div", {
1290
1291
  class: "confirm-body",
1291
1292
  innerHTML: __props.message || "请确认?"
1292
- }, null, 8, _hoisted_2$7), vue.createVNode(_sfc_main$t, {
1293
+ }, null, 8, _hoisted_2$8), vue.createVNode(_sfc_main$u, {
1293
1294
  align: "right",
1294
1295
  "cancel-name": __props.cancelName,
1295
1296
  "cancel-disabled": __props.cancelDisabled,
@@ -1302,7 +1303,7 @@
1302
1303
  }
1303
1304
  });
1304
1305
 
1305
- var _sfc_main$n = vue.defineComponent({
1306
+ var _sfc_main$o = vue.defineComponent({
1306
1307
  ...{
1307
1308
  name: "Loading",
1308
1309
  inheritAttrs: true
@@ -1341,7 +1342,7 @@
1341
1342
  }
1342
1343
  });
1343
1344
 
1344
- var _sfc_main$m = vue.defineComponent({
1345
+ var _sfc_main$n = vue.defineComponent({
1345
1346
  ...{
1346
1347
  name: "Dynamic",
1347
1348
  inheritAttrs: false
@@ -1365,7 +1366,7 @@
1365
1366
  const loadingComponent = vue.defineComponent({
1366
1367
  inheritAttrs: false,
1367
1368
  components: {
1368
- Loading: _sfc_main$n
1369
+ Loading: _sfc_main$o
1369
1370
  },
1370
1371
  template: "<Loading :mask-disabled='true' />"
1371
1372
  });
@@ -1432,7 +1433,7 @@
1432
1433
  }
1433
1434
  });
1434
1435
 
1435
- var _sfc_main$l = vue.defineComponent({
1436
+ var _sfc_main$m = vue.defineComponent({
1436
1437
  ...{
1437
1438
  name: "DialogContainer",
1438
1439
  inheritAttrs: true
@@ -1477,21 +1478,22 @@
1477
1478
  onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
1478
1479
  __props.options.closeOnMask && vue.unref(closePopup)();
1479
1480
  }, ["self"]))
1480
- }, [vue.createVNode(_sfc_main$m, vue.mergeProps({
1481
+ }, [vue.createVNode(_sfc_main$n, vue.mergeProps({
1481
1482
  class: "dialog-body",
1482
1483
  name: __props.options.name,
1483
1484
  component: __props.options.component,
1484
1485
  url: __props.options.url,
1485
1486
  props: vue.unref(props)
1486
1487
  }, vue.unref(dialogExtend), {
1488
+ "popup-status": __props.popupStatus.value,
1487
1489
  modelValue: vue.unref(model),
1488
1490
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
1489
- }), null, 16, ["name", "component", "url", "props", "modelValue"])], 6);
1491
+ }), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])], 6);
1490
1492
  };
1491
1493
  }
1492
1494
  });
1493
1495
 
1494
- var _sfc_main$k = vue.defineComponent({
1496
+ var _sfc_main$l = vue.defineComponent({
1495
1497
  ...{
1496
1498
  name: "FollowContainer",
1497
1499
  inheritAttrs: true
@@ -1593,7 +1595,15 @@
1593
1595
  onEvent(window, "resize", () => __props.options.closeOnResize ? closePopup(void 0) : rootDom.value && buildFollow());
1594
1596
  onEvent(window, "keyup", evet => __props.options.closeOnEscape && evet.key === "Escape" && followExt.pinned.value != true && closePopup(void 0));
1595
1597
  onEvent(window, "click", event => {
1596
- __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);
1597
1607
  });
1598
1608
  onMutation(rootDom.value, {
1599
1609
  childList: true,
@@ -1604,7 +1614,7 @@
1604
1614
  });
1605
1615
  });
1606
1616
  return (_ctx, _cache) => {
1607
- return vue.openBlock(), vue.createBlock(_sfc_main$m, vue.mergeProps({
1617
+ return vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
1608
1618
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1609
1619
  style: {
1610
1620
  "z-index": __props.zIndex
@@ -1621,7 +1631,7 @@
1621
1631
  }
1622
1632
  });
1623
1633
 
1624
- var _sfc_main$j = vue.defineComponent({
1634
+ var _sfc_main$k = vue.defineComponent({
1625
1635
  ...{
1626
1636
  name: "PopupContainer",
1627
1637
  inheritAttrs: true
@@ -1641,7 +1651,7 @@
1641
1651
  model = vue.shallowRef(void 0)
1642
1652
  } = __props.options;
1643
1653
  return (_ctx, _cache) => {
1644
- return vue.openBlock(), vue.createBlock(_sfc_main$m, vue.mergeProps({
1654
+ return vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
1645
1655
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1646
1656
  style: {
1647
1657
  "z-index": __props.zIndex
@@ -1651,19 +1661,20 @@
1651
1661
  url: __props.options.url,
1652
1662
  props: vue.unref(props)
1653
1663
  }, __props.extOptions, {
1664
+ "popup-status": __props.popupStatus.value,
1654
1665
  modelValue: vue.unref(model),
1655
1666
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
1656
- }), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
1667
+ }), null, 16, ["class", "style", "name", "component", "url", "props", "popup-status", "modelValue"]);
1657
1668
  };
1658
1669
  }
1659
1670
  });
1660
1671
 
1661
- const _hoisted_1$a = {
1672
+ const _hoisted_1$b = {
1662
1673
  key: 1,
1663
1674
  class: "icon"
1664
1675
  };
1665
- const _hoisted_2$6 = ["innerHTML"];
1666
- var _sfc_main$i = vue.defineComponent({
1676
+ const _hoisted_2$7 = ["innerHTML"];
1677
+ var _sfc_main$j = vue.defineComponent({
1667
1678
  ...{
1668
1679
  name: "ToastContainer",
1669
1680
  inheritAttrs: true
@@ -1701,7 +1712,7 @@
1701
1712
  }),
1702
1713
  onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
1703
1714
  onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
1704
- }, [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, {
1705
1716
  key: 0,
1706
1717
  class: "close-icon",
1707
1718
  type: "close",
@@ -1712,21 +1723,21 @@
1712
1723
  onClick: _cache[2] || (_cache[2] = $event => {
1713
1724
  vue.unref(closePopup)();
1714
1725
  })
1715
- }, 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, {
1716
1727
  type: vue.unref(props).type,
1717
1728
  fill: "#707070",
1718
1729
  size: 20
1719
1730
  }, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
1720
1731
  class: "message",
1721
1732
  innerHTML: vue.unref(props).message
1722
- }, null, 8, _hoisted_2$6)], 38);
1733
+ }, null, 8, _hoisted_2$7)], 38);
1723
1734
  };
1724
1735
  }
1725
1736
  });
1726
1737
 
1727
1738
  function usePopup() {
1728
1739
  function popup(options) {
1729
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$j, options);
1740
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$k, options);
1730
1741
  return addScope2Scopes(scope);
1731
1742
  }
1732
1743
  function dialog(options) {
@@ -1759,7 +1770,7 @@
1759
1770
  },
1760
1771
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1761
1772
  });
1762
- const descriptor = openPopup(_sfc_main$l, options, extOptions);
1773
+ const descriptor = openPopup(_sfc_main$m, options, extOptions);
1763
1774
  scope = snail_core.useAsyncScope(deferred.promise);
1764
1775
  monitorDialog(descriptor, scope, deferred);
1765
1776
  }
@@ -1777,14 +1788,14 @@
1777
1788
  inPopup: "follow",
1778
1789
  target
1779
1790
  };
1780
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$k, options, extOptions);
1791
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$l, options, extOptions);
1781
1792
  }
1782
1793
  return addScope2Scopes(scope);
1783
1794
  }
1784
1795
  function confirm(title, message, options) {
1785
1796
  options = options || Object.create(null);
1786
1797
  return dialog({
1787
- component: _sfc_main$o,
1798
+ component: _sfc_main$p,
1788
1799
  closeOnEscape: true,
1789
1800
  props: {
1790
1801
  ...options,
@@ -1794,7 +1805,7 @@
1794
1805
  });
1795
1806
  }
1796
1807
  function toast(type, message, options) {
1797
- return popupInCustomContainer(_sfc_main$i, {
1808
+ return popupInCustomContainer(_sfc_main$j, {
1798
1809
  url: "#ToastContainer",
1799
1810
  props: {
1800
1811
  ...(options || Object.create(null)),
@@ -1827,7 +1838,7 @@
1827
1838
  },
1828
1839
  ...extOptions
1829
1840
  });
1830
- const descriptor = openPopup(container || _sfc_main$j, options, extOptions);
1841
+ const descriptor = openPopup(container || _sfc_main$k, options, extOptions);
1831
1842
  const scope = snail_core.useAsyncScope(deferred.promise);
1832
1843
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
1833
1844
  return scope;
@@ -1965,12 +1976,12 @@
1965
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==";
1966
1977
  }
1967
1978
 
1968
- const _hoisted_1$9 = {
1979
+ const _hoisted_1$a = {
1969
1980
  class: "snail-empty"
1970
1981
  };
1971
- const _hoisted_2$5 = ["src"];
1972
- const _hoisted_3$4 = ["textContent"];
1973
- 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({
1974
1985
  ...{
1975
1986
  name: "Empty",
1976
1987
  inheritAttrs: true
@@ -1983,23 +1994,23 @@
1983
1994
  setup(__props) {
1984
1995
  const defaultImageBase64 = getNoDataBase64Image();
1985
1996
  return (_ctx, _cache) => {
1986
- 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", {
1987
1998
  src: __props.imageUrl || vue.unref(defaultImageBase64)
1988
- }, 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", {
1989
2000
  class: "message",
1990
2001
  textContent: vue.toDisplayString(__props.message || "无数据")
1991
- }, null, 8, _hoisted_3$4)])]);
2002
+ }, null, 8, _hoisted_3$5)])]);
1992
2003
  };
1993
2004
  }
1994
2005
  });
1995
2006
 
1996
- const _hoisted_1$8 = ["title"];
1997
- const _hoisted_2$4 = ["textContent"];
1998
- const _hoisted_3$3 = {
2007
+ const _hoisted_1$9 = ["title"];
2008
+ const _hoisted_2$5 = ["textContent"];
2009
+ const _hoisted_3$4 = {
1999
2010
  key: 1,
2000
2011
  class: "select-status"
2001
2012
  };
2002
- var _sfc_main$g = vue.defineComponent({
2013
+ var _sfc_main$h = vue.defineComponent({
2003
2014
  ...{
2004
2015
  name: "SelectNode",
2005
2016
  inheritAttrs: true
@@ -2044,15 +2055,15 @@
2044
2055
  }, [vue.createElementVNode("div", {
2045
2056
  class: "item-text ellipsis",
2046
2057
  textContent: vue.toDisplayString(__props.item.text)
2047
- }, 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, {
2048
2059
  key: 0,
2049
2060
  type: "arrow",
2050
2061
  color: "#8a9099"
2051
- })) : __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, {
2052
2063
  type: "success",
2053
2064
  color: "white",
2054
2065
  size: 12
2055
- })])) : 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, {
2056
2067
  key: 1
2057
2068
  }, vue.renderList(vue.unref(showChildrenRef), child => {
2058
2069
  return vue.openBlock(), vue.createBlock(_component_SelectNode, {
@@ -2069,7 +2080,7 @@
2069
2080
  }
2070
2081
  });
2071
2082
 
2072
- var _sfc_main$f = vue.defineComponent({
2083
+ var _sfc_main$g = vue.defineComponent({
2073
2084
  ...{
2074
2085
  name: "Select2Popup",
2075
2086
  inheritAttrs: true
@@ -2241,13 +2252,13 @@
2241
2252
  key: 0
2242
2253
  }, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2243
2254
  key: 1
2244
- }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
2255
+ }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
2245
2256
  key: 0
2246
2257
  }, __props.search, {
2247
2258
  onSearch,
2248
2259
  key: "select-search"
2249
2260
  }), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
2250
- return vue.openBlock(), vue.createBlock(_sfc_main$g, {
2261
+ return vue.openBlock(), vue.createBlock(_sfc_main$h, {
2251
2262
  key: vue.unref(context).getKey(item),
2252
2263
  multiple: __props.multiple,
2253
2264
  item,
@@ -2256,7 +2267,7 @@
2256
2267
  onEnter: onEnterSelectNode,
2257
2268
  onClick: onClickSelectNode
2258
2269
  }, null, 8, ["multiple", "item", "context"]);
2259
- }), 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, {
2260
2271
  key: 1,
2261
2272
  message: "无结果"
2262
2273
  })) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2268,20 +2279,20 @@
2268
2279
  }
2269
2280
  });
2270
2281
 
2271
- const _hoisted_1$7 = {
2282
+ const _hoisted_1$8 = {
2272
2283
  key: 0,
2273
2284
  class: "select-result"
2274
2285
  };
2275
- const _hoisted_2$3 = ["title", "textContent"];
2276
- const _hoisted_3$2 = ["textContent"];
2277
- const _hoisted_4$2 = {
2286
+ const _hoisted_2$4 = ["title", "textContent"];
2287
+ const _hoisted_3$3 = ["textContent"];
2288
+ const _hoisted_4$3 = {
2278
2289
  key: 1,
2279
2290
  class: "placeholder"
2280
2291
  };
2281
2292
  onAppCreated((app, type) => {
2282
- type == "popup" && app.component("SelectPopup", _sfc_main$f);
2293
+ type == "popup" && app.component("SelectPopup", _sfc_main$g);
2283
2294
  });
2284
- var _sfc_main$e = vue.defineComponent({
2295
+ var _sfc_main$f = vue.defineComponent({
2285
2296
  ...{
2286
2297
  name: "Select",
2287
2298
  inheritAttrs: true
@@ -2413,15 +2424,15 @@
2413
2424
  ref: "select"
2414
2425
  }, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2415
2426
  key: 0
2416
- }, [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", {
2417
2428
  class: "select-text ellipsis",
2418
2429
  title: selectedTextRef.value,
2419
2430
  textContent: vue.toDisplayString(selectedTextRef.value)
2420
- }, null, 8, _hoisted_2$3)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2431
+ }, null, 8, _hoisted_2$4)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2421
2432
  key: 1,
2422
2433
  class: "placeholder",
2423
2434
  textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2424
- }, 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, {
2425
2436
  key: 2,
2426
2437
  type: "arrow",
2427
2438
  size: 24,
@@ -2429,12 +2440,12 @@
2429
2440
  style: {
2430
2441
  "transform": "rotate(90deg)"
2431
2442
  }
2432
- })) : 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);
2433
2444
  };
2434
2445
  }
2435
2446
  });
2436
2447
 
2437
- var _sfc_main$d = vue.defineComponent({
2448
+ var _sfc_main$e = vue.defineComponent({
2438
2449
  ...{
2439
2450
  name: "Switch",
2440
2451
  inheritAttrs: true
@@ -2483,8 +2494,8 @@
2483
2494
  }
2484
2495
  });
2485
2496
 
2486
- const _hoisted_1$6 = ["readonly", "placeholder", "rows"];
2487
- var _sfc_main$c = vue.defineComponent({
2497
+ const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
2498
+ var _sfc_main$d = vue.defineComponent({
2488
2499
  ...{
2489
2500
  name: "Textarea"
2490
2501
  },
@@ -2544,25 +2555,25 @@
2544
2555
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2545
2556
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2546
2557
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2547
- }), null, 16, _hoisted_1$6)), [[vue.vModelText, valueModel.value]]);
2558
+ }), null, 16, _hoisted_1$7)), [[vue.vModelText, valueModel.value]]);
2548
2559
  };
2549
2560
  }
2550
2561
  });
2551
2562
 
2552
- const _hoisted_1$5 = {
2563
+ const _hoisted_1$6 = {
2553
2564
  class: "fold-header"
2554
2565
  };
2555
- const _hoisted_2$2 = ["textContent"];
2556
- const _hoisted_3$1 = ["textContent"];
2557
- const _hoisted_4$1 = {
2566
+ const _hoisted_2$3 = ["textContent"];
2567
+ const _hoisted_3$2 = ["textContent"];
2568
+ const _hoisted_4$2 = {
2558
2569
  key: 1,
2559
2570
  class: "status"
2560
2571
  };
2561
- const _hoisted_5 = {
2572
+ const _hoisted_5$1 = {
2562
2573
  class: "fold-body",
2563
2574
  ref: "foldBody"
2564
2575
  };
2565
- var _sfc_main$b = vue.defineComponent({
2576
+ var _sfc_main$c = vue.defineComponent({
2566
2577
  ...{
2567
2578
  name: "Fold",
2568
2579
  inheritAttrs: true
@@ -2632,23 +2643,23 @@
2632
2643
  return (_ctx, _cache) => {
2633
2644
  return vue.openBlock(), vue.createElementBlock("div", {
2634
2645
  class: vue.normalizeClass(["snail-fold", statusModel.value])
2635
- }, [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", {
2636
2647
  class: "title ellipsis",
2637
2648
  textContent: vue.toDisplayString(__props.title)
2638
- }, 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", {
2639
2650
  key: 0,
2640
2651
  class: "subtitle ellipsis",
2641
2652
  textContent: vue.toDisplayString(__props.subtitle)
2642
- }, 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, {
2643
2654
  type: "arrow",
2644
2655
  title: statusModel.value == "expand" ? "收起" : "展开",
2645
2656
  onClick: onStatusClick
2646
- }, 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);
2647
2658
  };
2648
2659
  }
2649
2660
  });
2650
2661
 
2651
- var _sfc_main$a = vue.defineComponent({
2662
+ var _sfc_main$b = vue.defineComponent({
2652
2663
  ...{
2653
2664
  name: "Scroll",
2654
2665
  inheritAttrs: true
@@ -2660,6 +2671,11 @@
2660
2671
  },
2661
2672
  scrollY: {
2662
2673
  type: Boolean
2674
+ },
2675
+ barSize: {},
2676
+ barMode: {},
2677
+ debounce: {
2678
+ type: Boolean
2663
2679
  }
2664
2680
  },
2665
2681
  emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
@@ -2678,9 +2694,30 @@
2678
2694
  onInterval
2679
2695
  } = snail_core.useTimer();
2680
2696
  const classRef = vue.computed(() => ({
2681
- "scroll-x": props.scrollX == true,
2682
- "scroll-y": props.scrollY == true
2697
+ "debounce": props.scrollY == true && props.debounce == true,
2698
+ "hover-show": props.barMode == "hover"
2683
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
+ });
2684
2721
  var preStatus = void 0;
2685
2722
  __expose({
2686
2723
  scroll,
@@ -2759,21 +2796,22 @@
2759
2796
  return vue.openBlock(), vue.createElementBlock("div", {
2760
2797
  class: vue.normalizeClass(["snail-scroll", classRef.value]),
2761
2798
  ref: "scroll-root",
2799
+ style: vue.normalizeStyle(styleRef.value),
2762
2800
  onScroll: refreshScrollInfo
2763
- }, [vue.renderSlot(_ctx.$slots, "default")], 34);
2801
+ }, [vue.renderSlot(_ctx.$slots, "default")], 38);
2764
2802
  };
2765
2803
  }
2766
2804
  });
2767
2805
 
2768
- const _hoisted_1$4 = {
2806
+ const _hoisted_1$5 = {
2769
2807
  key: 0,
2770
2808
  class: "layout-start"
2771
2809
  };
2772
- const _hoisted_2$1 = {
2810
+ const _hoisted_2$2 = {
2773
2811
  key: 1,
2774
2812
  class: "layout-end"
2775
2813
  };
2776
- var _sfc_main$9 = vue.defineComponent({
2814
+ var _sfc_main$a = vue.defineComponent({
2777
2815
  __name: "layout",
2778
2816
  props: {
2779
2817
  mode: {},
@@ -2783,17 +2821,17 @@
2783
2821
  return (_ctx, _cache) => {
2784
2822
  return vue.openBlock(), vue.createElementBlock("div", {
2785
2823
  class: vue.normalizeClass(["snail-layout", __props.mode])
2786
- }, [_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({
2787
2825
  class: "layout-body"
2788
2826
  }, __props.scroll), {
2789
2827
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
2790
2828
  _: 3
2791
- }, 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);
2792
2830
  };
2793
2831
  }
2794
2832
  });
2795
2833
 
2796
- var _sfc_main$8 = vue.defineComponent({
2834
+ var _sfc_main$9 = vue.defineComponent({
2797
2835
  ...{
2798
2836
  name: "Sort",
2799
2837
  inheritAttrs: true
@@ -2894,10 +2932,10 @@
2894
2932
  }
2895
2933
  });
2896
2934
 
2897
- const _hoisted_1$3 = {
2935
+ const _hoisted_1$4 = {
2898
2936
  class: "table-body"
2899
2937
  };
2900
- var _sfc_main$7 = vue.defineComponent({
2938
+ var _sfc_main$8 = vue.defineComponent({
2901
2939
  ...{
2902
2940
  name: "Table",
2903
2941
  inheritAttrs: true
@@ -2910,6 +2948,11 @@
2910
2948
  scrollY: {
2911
2949
  type: Boolean
2912
2950
  },
2951
+ barSize: {},
2952
+ barMode: {},
2953
+ debounce: {
2954
+ type: Boolean
2955
+ },
2913
2956
  border: {
2914
2957
  type: Boolean
2915
2958
  },
@@ -2921,7 +2964,7 @@
2921
2964
  const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
2922
2965
  const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
2923
2966
  return (_ctx, _cache) => {
2924
- return vue.openBlock(), vue.createBlock(_sfc_main$a, {
2967
+ return vue.openBlock(), vue.createBlock(_sfc_main$b, {
2925
2968
  class: vue.normalizeClass(["snail-table", {
2926
2969
  "start-border": __props.border == true
2927
2970
  }]),
@@ -2931,7 +2974,7 @@
2931
2974
  default: vue.withCtx(() => [vue.createElementVNode("div", {
2932
2975
  class: "table-header",
2933
2976
  style: vue.normalizeStyle(hStyleRef.value)
2934
- }, [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", {
2935
2978
  class: "table-footer",
2936
2979
  style: vue.normalizeStyle(fStyleRef.value)
2937
2980
  }, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -2941,7 +2984,7 @@
2941
2984
  }
2942
2985
  });
2943
2986
 
2944
- var _sfc_main$6 = vue.defineComponent({
2987
+ var _sfc_main$7 = vue.defineComponent({
2945
2988
  ...{
2946
2989
  name: "TableRow",
2947
2990
  inheritAttrs: true
@@ -2964,7 +3007,7 @@
2964
3007
  }
2965
3008
  });
2966
3009
 
2967
- var _sfc_main$5 = vue.defineComponent({
3010
+ var _sfc_main$6 = vue.defineComponent({
2968
3011
  ...{
2969
3012
  name: "TableCol",
2970
3013
  inheritAttrs: true
@@ -3010,14 +3053,15 @@
3010
3053
  }
3011
3054
  });
3012
3055
 
3013
- var _sfc_main$4 = vue.defineComponent({
3056
+ var _sfc_main$5 = vue.defineComponent({
3014
3057
  __name: "transitions",
3015
3058
  props: {
3016
- customClass: {},
3017
- effect: {},
3018
3059
  group: {
3019
3060
  type: Boolean
3020
- }
3061
+ },
3062
+ duration: {},
3063
+ customClass: {},
3064
+ effect: {}
3021
3065
  },
3022
3066
  setup(__props) {
3023
3067
  const props = __props;
@@ -3028,11 +3072,13 @@
3028
3072
  } else {
3029
3073
  array.push(props.effect || "fade");
3030
3074
  }
3075
+ console.log(array);
3031
3076
  return array.join(" ");
3032
3077
  });
3033
3078
  return (_ctx, _cache) => {
3034
3079
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.group ? vue.TransitionGroup : vue.Transition), vue.mergeProps(_ctx.$attrs, {
3035
3080
  appear: "",
3081
+ duration: __props.duration,
3036
3082
  "enter-active-class": `${classNames.value} enter-active`,
3037
3083
  "enter-from-class": `${classNames.value} enter-from`,
3038
3084
  "enter-to-class": `${classNames.value} enter-to`,
@@ -3042,25 +3088,25 @@
3042
3088
  }), {
3043
3089
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
3044
3090
  _: 3
3045
- }, 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"]);
3046
3092
  };
3047
3093
  }
3048
3094
  });
3049
3095
 
3050
- const _hoisted_1$2 = {
3096
+ const _hoisted_1$3 = {
3051
3097
  key: 0,
3052
3098
  class: "node-fold"
3053
3099
  };
3054
- const _hoisted_2 = ["title", "textContent"];
3055
- const _hoisted_3 = {
3100
+ const _hoisted_2$1 = ["title", "textContent"];
3101
+ const _hoisted_3$1 = {
3056
3102
  class: "node-slot ellipsis"
3057
3103
  };
3058
- const _hoisted_4 = {
3104
+ const _hoisted_4$1 = {
3059
3105
  key: 1,
3060
3106
  class: "snail-tree-children hidden",
3061
3107
  ref: "children"
3062
3108
  };
3063
- var _sfc_main$3 = vue.defineComponent({
3109
+ var _sfc_main$4 = vue.defineComponent({
3064
3110
  ...{
3065
3111
  name: "TreeNode",
3066
3112
  inheritAttrs: true
@@ -3178,7 +3224,7 @@
3178
3224
  key: 1
3179
3225
  }, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
3180
3226
  class: "indent"
3181
- }, 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, {
3182
3228
  key: 0,
3183
3229
  class: vue.normalizeClass(statusRef.value),
3184
3230
  type: "custom",
@@ -3190,7 +3236,7 @@
3190
3236
  class: "node-text ellipsis",
3191
3237
  title: __props.node.text,
3192
3238
  textContent: vue.toDisplayString(__props.node.text)
3193
- }, 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 => {
3194
3240
  return vue.openBlock(), vue.createBlock(_component_TreeNode, {
3195
3241
  key: __props.context.getKey(child),
3196
3242
  node: child,
@@ -3210,10 +3256,10 @@
3210
3256
  }
3211
3257
  });
3212
3258
 
3213
- const _hoisted_1$1 = {
3259
+ const _hoisted_1$2 = {
3214
3260
  class: "snail-tree"
3215
3261
  };
3216
- var _sfc_main$2 = vue.defineComponent({
3262
+ var _sfc_main$3 = vue.defineComponent({
3217
3263
  ...{
3218
3264
  name: "Tree",
3219
3265
  inheritAttrs: true
@@ -3247,15 +3293,15 @@
3247
3293
  emits("click", node, parents);
3248
3294
  }
3249
3295
  return (_ctx, _cache) => {
3250
- 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({
3251
3297
  key: 0
3252
3298
  }, __props.search, {
3253
3299
  onSearch
3254
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$a, {
3300
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$b, {
3255
3301
  "scroll-y": true
3256
3302
  }, {
3257
3303
  default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
3258
- return vue.openBlock(), vue.createBlock(_sfc_main$3, {
3304
+ return vue.openBlock(), vue.createBlock(_sfc_main$4, {
3259
3305
  key: vue.unref(context).getKey(node),
3260
3306
  node,
3261
3307
  parent: void 0,
@@ -3276,7 +3322,7 @@
3276
3322
  }
3277
3323
  });
3278
3324
 
3279
- var _sfc_main$1 = vue.defineComponent({
3325
+ var _sfc_main$2 = vue.defineComponent({
3280
3326
  __name: "wrapper",
3281
3327
  props: {
3282
3328
  readonly: {
@@ -3298,14 +3344,14 @@
3298
3344
  return (_ctx, _cache) => {
3299
3345
  return vue.openBlock(), vue.createElementBlock("div", {
3300
3346
  class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
3301
- }, [__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({
3302
3348
  key: 0
3303
3349
  }, __props.header || {
3304
3350
  useTo: "dialog",
3305
3351
  title: "对话框"
3306
3352
  }, {
3307
3353
  onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
3308
- }), 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({
3309
3355
  class: "wrapper-body"
3310
3356
  }, __props.content || {
3311
3357
  scrollX: false,
@@ -3313,7 +3359,7 @@
3313
3359
  }), {
3314
3360
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
3315
3361
  _: 3
3316
- }, 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({
3317
3363
  key: 1
3318
3364
  }, __props.footer || {}, {
3319
3365
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -3327,7 +3373,7 @@
3327
3373
  snail_core.mustObject(options, "options");
3328
3374
  target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
3329
3375
  target.classList.add("snail-app");
3330
- const app = vue.createApp(_sfc_main$m, options);
3376
+ const app = vue.createApp(_sfc_main$n, options);
3331
3377
  triggerAppCreated(app);
3332
3378
  app.mount(target);
3333
3379
  const scope = snail_core.useScope().onDestroy(() => app.unmount());
@@ -3335,6 +3381,253 @@
3335
3381
  return scope;
3336
3382
  }
3337
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
+
3338
3631
  const _hoisted_1 = ["textContent"];
3339
3632
  var _sfc_main = vue.defineComponent({
3340
3633
  ...{
@@ -3420,12 +3713,12 @@
3420
3713
  onTouchstart: onStartDrag,
3421
3714
  onTouchmove: onDragMove,
3422
3715
  onTouchend: onDragEnd
3423
- }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3716
+ }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
3424
3717
  key: 0,
3425
3718
  type: "success",
3426
3719
  size: 20,
3427
3720
  color: "white"
3428
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3721
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$x, {
3429
3722
  key: 1,
3430
3723
  type: "custom",
3431
3724
  size: 20,
@@ -3437,32 +3730,32 @@
3437
3730
  });
3438
3731
 
3439
3732
  const components = {
3440
- Button: _sfc_main$x,
3441
- Choose: _sfc_main$v,
3442
- DatePicker: _sfc_main$u,
3443
- Footer: _sfc_main$t,
3444
- Header: _sfc_main$s,
3445
- Icon: _sfc_main$w,
3446
- Input: _sfc_main$r,
3447
- Number: _sfc_main$q,
3448
- Search: _sfc_main$p,
3449
- Select: _sfc_main$e,
3450
- Switch: _sfc_main$d,
3451
- Textarea: _sfc_main$c,
3452
- Dynamic: _sfc_main$m,
3453
- Fold: _sfc_main$b,
3454
- Layout: _sfc_main$9,
3455
- Scroll: _sfc_main$a,
3456
- Sort: _sfc_main$8,
3457
- Table: _sfc_main$7,
3458
- TableRow: _sfc_main$6,
3459
- TableCol: _sfc_main$5,
3460
- Transitions: _sfc_main$4,
3461
- Tree: _sfc_main$2,
3462
- 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,
3463
3756
  DragVerify: _sfc_main,
3464
- Empty: _sfc_main$h,
3465
- Loading: _sfc_main$n
3757
+ Empty: _sfc_main$i,
3758
+ Loading: _sfc_main$o
3466
3759
  };
3467
3760
 
3468
3761
  snail_core.onMountScope(scope => {
@@ -3474,6 +3767,7 @@
3474
3767
  exports.mount = mount;
3475
3768
  exports.onAppCreated = onAppCreated;
3476
3769
  exports.triggerAppCreated = triggerAppCreated;
3770
+ exports.usePicker = usePicker;
3477
3771
  exports.usePopup = usePopup;
3478
3772
  exports.useReactive = useReactive;
3479
3773
  exports.useTreeContext = useTreeContext;