snail.vue 2.0.30 → 2.0.32

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$o = ["title"];
9
- var _sfc_main$F = vue.defineComponent({
8
+ const _hoisted_1$p = ["title"];
9
+ var _sfc_main$G = vue.defineComponent({
10
10
  ...{
11
11
  name: "Button",
12
12
  inheritAttrs: true
@@ -28,15 +28,11 @@
28
28
  class: vue.normalizeClass(["snail-button", [__props.size, __props.type]]),
29
29
  title: __props.title,
30
30
  onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
31
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[1] || (_cache[1] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
31
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[1] || (_cache[1] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$p);
32
32
  };
33
33
  }
34
34
  });
35
35
 
36
- var addLink = href => setTimeout(snail_view.link.register, 0, href);
37
-
38
- addLink("/styles/snail.vue.vue.css");
39
-
40
36
  function getBuiltinIcon(iconType) {
41
37
  switch (iconType) {
42
38
  case "success":
@@ -79,10 +75,10 @@
79
75
  }
80
76
  }
81
77
 
82
- const _hoisted_1$n = ["viewBox"];
83
- const _hoisted_2$h = ["textContent"];
84
- const _hoisted_3$a = ["d"];
85
- var _sfc_main$E = vue.defineComponent({
78
+ const _hoisted_1$o = ["viewBox"];
79
+ const _hoisted_2$i = ["textContent"];
80
+ const _hoisted_3$b = ["d"];
81
+ var _sfc_main$F = vue.defineComponent({
86
82
  __name: "icon",
87
83
  props: {
88
84
  title: {},
@@ -150,24 +146,24 @@
150
146
  onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
151
147
  }), [vue.createElementVNode("title", {
152
148
  textContent: vue.toDisplayString(__props.title || "")
153
- }, null, 8, _hoisted_2$h), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
149
+ }, null, 8, _hoisted_2$i), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
154
150
  key: 0
155
151
  }) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
156
152
  key: 1
157
153
  }, vue.renderList(vue.unref(getBuiltinIcon)(__props.type), d => {
158
154
  return vue.openBlock(), vue.createElementBlock("path", {
159
155
  d
160
- }, null, 8, _hoisted_3$a);
161
- }), 256))], 16, _hoisted_1$n);
156
+ }, null, 8, _hoisted_3$b);
157
+ }), 256))], 16, _hoisted_1$o);
162
158
  };
163
159
  }
164
160
  });
165
161
 
166
- const _hoisted_1$m = ["title", "onClick"];
167
- const _hoisted_2$g = ["type", "checked"];
168
- const _hoisted_3$9 = ["textContent"];
169
- const _hoisted_4$6 = ["textContent"];
170
- var _sfc_main$D = vue.defineComponent({
162
+ const _hoisted_1$n = ["title", "onClick"];
163
+ const _hoisted_2$h = ["type", "checked"];
164
+ const _hoisted_3$a = ["textContent"];
165
+ const _hoisted_4$7 = ["textContent"];
166
+ var _sfc_main$E = vue.defineComponent({
171
167
  ...{
172
168
  name: "Choose",
173
169
  inheritAttrs: true
@@ -243,10 +239,10 @@
243
239
  key: 0,
244
240
  type: vue.unref(type),
245
241
  checked: node.selected
246
- }, null, 8, _hoisted_2$g)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
242
+ }, null, 8, _hoisted_2$h)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
247
243
  key: 1,
248
244
  class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
249
- }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
245
+ }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
250
246
  key: 0,
251
247
  type: "success",
252
248
  size: 12,
@@ -255,17 +251,21 @@
255
251
  key: 2,
256
252
  class: "item-text",
257
253
  textContent: vue.toDisplayString(node.item.text)
258
- }, null, 8, _hoisted_3$9)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
254
+ }, null, 8, _hoisted_3$a)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
259
255
  key: 3,
260
256
  class: "item-des",
261
257
  textContent: vue.toDisplayString(node.item.description)
262
- }, null, 8, _hoisted_4$6)) : vue.createCommentVNode("", true)], 14, _hoisted_1$m);
258
+ }, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$n);
263
259
  }), 128))], 2);
264
260
  };
265
261
  }
266
262
  });
267
263
 
268
- var _sfc_main$C = vue.defineComponent({
264
+ var addLink = href => setTimeout(snail_view.link.register, 0, href);
265
+
266
+ addLink("/styles/snail.vue.vue.css");
267
+
268
+ var _sfc_main$D = vue.defineComponent({
269
269
  ...{
270
270
  name: "Footer",
271
271
  inheritAttrs: true
@@ -296,13 +296,13 @@
296
296
  class: vue.normalizeClass(["snail-footer", {
297
297
  "start-divider": __props.divider
298
298
  }, __props.align || "right"])
299
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
299
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
300
300
  key: 0,
301
301
  size: "max",
302
302
  type: "default",
303
303
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
304
304
  textContent: vue.toDisplayString(__props.cancelName || "取消")
305
- }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
305
+ }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
306
306
  key: 1,
307
307
  size: "max",
308
308
  type: "primary",
@@ -313,8 +313,8 @@
313
313
  }
314
314
  });
315
315
 
316
- const _hoisted_1$l = ["textContent"];
317
- var _sfc_main$B = vue.defineComponent({
316
+ const _hoisted_1$m = ["textContent"];
317
+ var _sfc_main$C = vue.defineComponent({
318
318
  ...{
319
319
  name: "Header",
320
320
  inheritAttrs: true
@@ -353,7 +353,7 @@
353
353
  key: 0,
354
354
  textContent: vue.toDisplayString(__props.title),
355
355
  class: vue.normalizeClass(["header-title", __props.titleAlign])
356
- }, null, 10, _hoisted_1$l)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
356
+ }, null, 10, _hoisted_1$m)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
357
357
  key: 1,
358
358
  class: "close-icon",
359
359
  type: "close",
@@ -366,18 +366,18 @@
366
366
  }
367
367
  });
368
368
 
369
- const _hoisted_1$k = ["textContent"];
370
- const _hoisted_2$f = {
369
+ const _hoisted_1$l = ["textContent"];
370
+ const _hoisted_2$g = {
371
371
  key: 0,
372
372
  class: "required",
373
373
  textContent: "*"
374
374
  };
375
- const _hoisted_3$8 = {
375
+ const _hoisted_3$9 = {
376
376
  class: "input-body"
377
377
  };
378
- const _hoisted_4$5 = ["type", "value", "readonly", "placeholder", "title"];
379
- const _hoisted_5$3 = ["title"];
380
- var _sfc_main$A = vue.defineComponent({
378
+ const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
379
+ const _hoisted_5$4 = ["title"];
380
+ var _sfc_main$B = vue.defineComponent({
381
381
  ...{
382
382
  name: "Input",
383
383
  inheritAttrs: true
@@ -429,7 +429,7 @@
429
429
  }, [vue.createElementVNode("span", {
430
430
  class: "text",
431
431
  textContent: vue.toDisplayString(__props.title)
432
- }, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$f)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
432
+ }, null, 8, _hoisted_1$l), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$g)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$9, [vue.createElementVNode("input", {
433
433
  ref: "input-el",
434
434
  type: __props.type || "text",
435
435
  value: inputModel.value,
@@ -438,16 +438,16 @@
438
438
  title: inputModel.value,
439
439
  onChange: onValueChange,
440
440
  onClick: _cache[0] || (_cache[0] = $event => emits("click"))
441
- }, null, 40, _hoisted_4$5), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
441
+ }, null, 40, _hoisted_4$6), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
442
442
  key: 0,
443
443
  class: "validate",
444
444
  title: validateRef.value
445
- }, [vue.createVNode(_sfc_main$E, {
445
+ }, [vue.createVNode(_sfc_main$F, {
446
446
  type: "error",
447
447
  button: "",
448
448
  size: 16,
449
449
  color: "red"
450
- })], 8, _hoisted_5$3)) : vue.createCommentVNode("", true)])], 2);
450
+ })], 8, _hoisted_5$4)) : vue.createCommentVNode("", true)])], 2);
451
451
  };
452
452
  }
453
453
  });
@@ -652,20 +652,20 @@
652
652
  return formatter;
653
653
  }
654
654
 
655
- const _hoisted_1$j = {
655
+ const _hoisted_1$k = {
656
656
  key: 0,
657
657
  class: "number-prefix"
658
658
  };
659
- const _hoisted_2$e = ["textContent"];
660
- const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
661
- const _hoisted_4$4 = {
659
+ const _hoisted_2$f = ["textContent"];
660
+ const _hoisted_3$8 = ["inputmode", "placeholder", "title"];
661
+ const _hoisted_4$5 = {
662
662
  key: 1,
663
663
  class: "number-suffix"
664
664
  };
665
- const _hoisted_5$2 = ["textContent"];
666
- const _hoisted_6$2 = ["title", "textContent"];
665
+ const _hoisted_5$3 = ["textContent"];
666
+ const _hoisted_6$3 = ["title", "textContent"];
667
667
  const _hoisted_7$1 = ["title", "textContent"];
668
- var _sfc_main$z = vue.defineComponent({
668
+ var _sfc_main$A = vue.defineComponent({
669
669
  __name: "number",
670
670
  props: vue.mergeModels({
671
671
  placeholder: {},
@@ -812,10 +812,10 @@
812
812
  "has-prefix": vue.unref(hasPrefix),
813
813
  "has-suffix": vue.unref(hasSuffix)
814
814
  }])
815
- }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [vue.createElementVNode("span", {
815
+ }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [vue.createElementVNode("span", {
816
816
  class: "ellipsis",
817
817
  textContent: vue.toDisplayString(vue.unref(prefix))
818
- }, null, 8, _hoisted_2$e)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
818
+ }, null, 8, _hoisted_2$f)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
819
819
  class: vue.normalizeClass(["input-panel", vue.unref(controls)])
820
820
  }, [vue.withDirectives(vue.createElementVNode("input", {
821
821
  type: "text",
@@ -827,19 +827,19 @@
827
827
  onFocus: _cache[1] || (_cache[1] = $event => vue.isRef(needBackSection) ? needBackSection.value = true : needBackSection = true),
828
828
  onPaste: _cache[2] || (_cache[2] = $event => vue.isRef(needBackSection) ? needBackSection.value = false : needBackSection = false),
829
829
  onBlur: _cache[3] || (_cache[3] = $event => formatOnEnd(true))
830
- }, null, 40, _hoisted_3$7), [[vue.vModelText, displayValueRef.value]]), vue.unref(controls) == "default" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
830
+ }, null, 40, _hoisted_3$8), [[vue.vModelText, displayValueRef.value]]), vue.unref(controls) == "default" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
831
831
  key: 0
832
832
  }, [vue.createElementVNode("div", {
833
833
  class: "controls default subtract",
834
834
  onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
835
- }, [vue.createVNode(_sfc_main$E, {
835
+ }, [vue.createVNode(_sfc_main$F, {
836
836
  type: "subtract",
837
837
  button: "",
838
838
  size: 20
839
839
  })]), vue.createElementVNode("div", {
840
840
  class: "controls default plus",
841
841
  onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
842
- }, [vue.createVNode(_sfc_main$E, {
842
+ }, [vue.createVNode(_sfc_main$F, {
843
843
  type: "plus",
844
844
  button: "",
845
845
  size: 20
@@ -848,7 +848,7 @@
848
848
  }, [vue.createElementVNode("div", {
849
849
  class: "controls right plus",
850
850
  onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
851
- }, [vue.createVNode(_sfc_main$E, {
851
+ }, [vue.createVNode(_sfc_main$F, {
852
852
  type: "arrow",
853
853
  button: "",
854
854
  size: 20,
@@ -856,20 +856,20 @@
856
856
  })]), vue.createElementVNode("div", {
857
857
  class: "controls right subtract",
858
858
  onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
859
- }, [vue.createVNode(_sfc_main$E, {
859
+ }, [vue.createVNode(_sfc_main$F, {
860
860
  type: "arrow",
861
861
  button: "",
862
862
  size: 20,
863
863
  rotate: 90
864
- })])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [vue.createElementVNode("span", {
864
+ })])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [vue.createElementVNode("span", {
865
865
  class: "ellipsis",
866
866
  textContent: vue.toDisplayString(vue.unref(suffix))
867
- }, null, 8, _hoisted_5$2)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
867
+ }, null, 8, _hoisted_5$3)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
868
868
  key: 2,
869
869
  class: "number-util ellipsis",
870
870
  title: upperTextRef.value,
871
871
  textContent: vue.toDisplayString(`大写:${upperTextRef.value || ""}`)
872
- }, null, 8, _hoisted_6$2)) : vue.createCommentVNode("", true), vue.unref(thousands) == "below" ? (vue.openBlock(), vue.createElementBlock("div", {
872
+ }, null, 8, _hoisted_6$3)) : vue.createCommentVNode("", true), vue.unref(thousands) == "below" ? (vue.openBlock(), vue.createElementBlock("div", {
873
873
  key: 3,
874
874
  class: "number-util ellipsis",
875
875
  title: thousandsTextRef.value,
@@ -879,8 +879,8 @@
879
879
  }
880
880
  });
881
881
 
882
- const _hoisted_1$i = ["placeholder", "readonly"];
883
- var _sfc_main$y = vue.defineComponent({
882
+ const _hoisted_1$j = ["placeholder", "readonly"];
883
+ var _sfc_main$z = vue.defineComponent({
884
884
  ...{
885
885
  name: "Search",
886
886
  inheritAttrs: true
@@ -925,9 +925,9 @@
925
925
  readonly: __props.readonly,
926
926
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
927
927
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
928
- }, null, 40, _hoisted_1$i), [[vue.vModelText, textModel.value, void 0, {
928
+ }, null, 40, _hoisted_1$j), [[vue.vModelText, textModel.value, void 0, {
929
929
  trim: true
930
- }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$E, {
930
+ }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$F, {
931
931
  class: "search-button",
932
932
  custom: "",
933
933
  button: "",
@@ -1152,11 +1152,11 @@
1152
1152
  }
1153
1153
  }
1154
1154
 
1155
- const _hoisted_1$h = {
1155
+ const _hoisted_1$i = {
1156
1156
  class: "snail-confirm flex-column"
1157
1157
  };
1158
- const _hoisted_2$d = ["innerHTML"];
1159
- var _sfc_main$x = vue.defineComponent({
1158
+ const _hoisted_2$e = ["innerHTML"];
1159
+ var _sfc_main$y = vue.defineComponent({
1160
1160
  ...{
1161
1161
  name: "ConfirmContainer",
1162
1162
  inheritAttrs: true
@@ -1184,14 +1184,14 @@
1184
1184
  },
1185
1185
  setup(__props) {
1186
1186
  return (_ctx, _cache) => {
1187
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [vue.createVNode(_sfc_main$B, {
1187
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [vue.createVNode(_sfc_main$C, {
1188
1188
  "use-to": "dialog",
1189
1189
  title: __props.title || "提示",
1190
1190
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1191
1191
  }, null, 8, ["title"]), vue.createElementVNode("div", {
1192
1192
  class: "confirm-body",
1193
1193
  innerHTML: __props.message || "请确认?"
1194
- }, null, 8, _hoisted_2$d), vue.createVNode(_sfc_main$C, {
1194
+ }, null, 8, _hoisted_2$e), vue.createVNode(_sfc_main$D, {
1195
1195
  align: "right",
1196
1196
  "cancel-name": __props.cancelName,
1197
1197
  "cancel-disabled": __props.cancelDisabled,
@@ -1252,7 +1252,7 @@
1252
1252
  });
1253
1253
  for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
1254
1254
 
1255
- var _sfc_main$w = vue.defineComponent({
1255
+ var _sfc_main$x = vue.defineComponent({
1256
1256
  __name: "motion",
1257
1257
  props: {
1258
1258
  multiple: {
@@ -1301,7 +1301,7 @@
1301
1301
  }
1302
1302
  });
1303
1303
 
1304
- var _sfc_main$v = vue.defineComponent({
1304
+ var _sfc_main$w = vue.defineComponent({
1305
1305
  ...{
1306
1306
  name: "Loading",
1307
1307
  inheritAttrs: true
@@ -1325,7 +1325,7 @@
1325
1325
  },
1326
1326
  setup(__props) {
1327
1327
  return (_ctx, _cache) => {
1328
- return vue.openBlock(), vue.createBlock(_sfc_main$w, {
1328
+ return vue.openBlock(), vue.createBlock(_sfc_main$x, {
1329
1329
  effect: vue.unref(MOTION).fade
1330
1330
  }, {
1331
1331
  default: vue.withCtx(() => [__props.show ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -1340,7 +1340,7 @@
1340
1340
  }
1341
1341
  });
1342
1342
 
1343
- var _sfc_main$u = vue.defineComponent({
1343
+ var _sfc_main$v = vue.defineComponent({
1344
1344
  ...{
1345
1345
  name: "Dynamic",
1346
1346
  inheritAttrs: false
@@ -1364,7 +1364,7 @@
1364
1364
  const loadingComponent = vue.defineComponent({
1365
1365
  inheritAttrs: false,
1366
1366
  components: {
1367
- Loading: _sfc_main$v
1367
+ Loading: _sfc_main$w
1368
1368
  },
1369
1369
  template: "<Loading :mask-disabled='true' />"
1370
1370
  });
@@ -1489,7 +1489,7 @@
1489
1489
  return scope;
1490
1490
  }
1491
1491
 
1492
- var _sfc_main$t = vue.defineComponent({
1492
+ var _sfc_main$u = vue.defineComponent({
1493
1493
  ...{
1494
1494
  name: "Scroll",
1495
1495
  inheritAttrs: false
@@ -1533,7 +1533,7 @@
1533
1533
  }
1534
1534
  });
1535
1535
 
1536
- var _sfc_main$s = vue.defineComponent({
1536
+ var _sfc_main$t = vue.defineComponent({
1537
1537
  __name: "wrapper",
1538
1538
  props: {
1539
1539
  inPopup: {
@@ -1552,7 +1552,7 @@
1552
1552
  return (_ctx, _cache) => {
1553
1553
  return vue.openBlock(), vue.createElementBlock("div", {
1554
1554
  class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
1555
- }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, vue.mergeProps({
1555
+ }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({
1556
1556
  key: 0
1557
1557
  }, __props.header || {
1558
1558
  useTo: "dialog",
@@ -1560,14 +1560,14 @@
1560
1560
  }, {
1561
1561
  "use-to": (__props.header ? __props.header.useTo : void 0) || (__props.inPopup ? "dialog" : "page"),
1562
1562
  onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
1563
- }), null, 16, ["use-to"])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$t, vue.mergeProps({
1563
+ }), null, 16, ["use-to"])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$u, vue.mergeProps({
1564
1564
  class: "wrapper-body flex-1"
1565
1565
  }, __props.content || {
1566
1566
  scroll: "none"
1567
1567
  }), {
1568
1568
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
1569
1569
  _: 3
1570
- }, 16), __props.footer && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({
1570
+ }, 16), __props.footer && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, vue.mergeProps({
1571
1571
  key: 1
1572
1572
  }, __props.footer || {}, {
1573
1573
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -1577,7 +1577,7 @@
1577
1577
  }
1578
1578
  });
1579
1579
 
1580
- var _sfc_main$r = vue.defineComponent({
1580
+ var _sfc_main$s = vue.defineComponent({
1581
1581
  ...{
1582
1582
  name: "DialogContainer",
1583
1583
  inheritAttrs: true
@@ -1609,6 +1609,11 @@
1609
1609
  onBeforeClose
1610
1610
  });
1611
1611
  let fn_onBuildData = void 0;
1612
+ let mousedownTarget = void 0;
1613
+ function onDialogRootClick(evt) {
1614
+ evt.target === mousedownTarget && __props.options.closeOnMask && closePopup();
1615
+ mousedownTarget = void 0;
1616
+ }
1612
1617
  const registerBuildDataFunc = fn => {
1613
1618
  snail_core.mustFunction(fn, "fn");
1614
1619
  fn_onBuildData = fn;
@@ -1626,6 +1631,7 @@
1626
1631
  onEvent(window, "keyup", event => {
1627
1632
  event.key === "Escape" && __props.popupStatus.value == "active" && __props.options.closeOnEscape && closePopup();
1628
1633
  });
1634
+ onEvent(window, "click", () => mousedownTarget = void 0);
1629
1635
  });
1630
1636
  return (_ctx, _cache) => {
1631
1637
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -1633,10 +1639,9 @@
1633
1639
  style: vue.normalizeStyle({
1634
1640
  "z-index": __props.zIndex
1635
1641
  }),
1636
- onClick: _cache[3] || (_cache[3] = vue.withModifiers($event => {
1637
- __props.options.closeOnMask && vue.unref(closePopup)();
1638
- }, ["self"]))
1639
- }, [__props.options.wrapper == void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
1642
+ onMousedown: _cache[3] || (_cache[3] = vue.withModifiers(evt => vue.isRef(mousedownTarget) ? mousedownTarget.value = evt.target : mousedownTarget = evt.target, ["self"])),
1643
+ onClick: vue.withModifiers(onDialogRootClick, ["self"])
1644
+ }, [__props.options.wrapper == void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
1640
1645
  key: 0,
1641
1646
  class: "dialog-body",
1642
1647
  name: __props.options.name,
@@ -1647,7 +1652,7 @@
1647
1652
  "popup-status": __props.popupStatus.value,
1648
1653
  modelValue: vue.unref(model),
1649
1654
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
1650
- }), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])) : (vue.openBlock(), vue.createBlock(_sfc_main$s, vue.mergeProps({
1655
+ }), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])) : (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
1651
1656
  key: 1,
1652
1657
  class: "dialog-body dialog-builtin",
1653
1658
  "in-popup": true
@@ -1655,7 +1660,7 @@
1655
1660
  onCancel: _cache[2] || (_cache[2] = $event => vue.unref(closePopup)()),
1656
1661
  onConfirm: onWrapperConfirm
1657
1662
  }), {
1658
- default: vue.withCtx(() => [vue.createVNode(_sfc_main$u, vue.mergeProps({
1663
+ default: vue.withCtx(() => [vue.createVNode(_sfc_main$v, vue.mergeProps({
1659
1664
  name: __props.options.name,
1660
1665
  component: __props.options.component,
1661
1666
  url: __props.options.url,
@@ -1667,12 +1672,12 @@
1667
1672
  "on-build-data": registerBuildDataFunc
1668
1673
  }), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])]),
1669
1674
  _: 1
1670
- }, 16))], 6);
1675
+ }, 16))], 38);
1671
1676
  };
1672
1677
  }
1673
1678
  });
1674
1679
 
1675
- var _sfc_main$q = vue.defineComponent({
1680
+ var _sfc_main$r = vue.defineComponent({
1676
1681
  ...{
1677
1682
  name: "FollowContainer",
1678
1683
  inheritAttrs: true
@@ -1793,7 +1798,7 @@
1793
1798
  });
1794
1799
  });
1795
1800
  return (_ctx, _cache) => {
1796
- return vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
1801
+ return vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
1797
1802
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1798
1803
  style: {
1799
1804
  "z-index": __props.zIndex
@@ -1810,7 +1815,7 @@
1810
1815
  }
1811
1816
  });
1812
1817
 
1813
- var _sfc_main$p = vue.defineComponent({
1818
+ var _sfc_main$q = vue.defineComponent({
1814
1819
  ...{
1815
1820
  name: "PopupContainer",
1816
1821
  inheritAttrs: true
@@ -1830,7 +1835,7 @@
1830
1835
  model = vue.shallowRef(void 0)
1831
1836
  } = __props.options;
1832
1837
  return (_ctx, _cache) => {
1833
- return vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
1838
+ return vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
1834
1839
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1835
1840
  style: {
1836
1841
  "z-index": __props.zIndex
@@ -1848,12 +1853,12 @@
1848
1853
  }
1849
1854
  });
1850
1855
 
1851
- const _hoisted_1$g = {
1856
+ const _hoisted_1$h = {
1852
1857
  key: 1,
1853
1858
  class: "icon"
1854
1859
  };
1855
- const _hoisted_2$c = ["innerHTML"];
1856
- var _sfc_main$o = vue.defineComponent({
1860
+ const _hoisted_2$d = ["innerHTML"];
1861
+ var _sfc_main$p = vue.defineComponent({
1857
1862
  ...{
1858
1863
  name: "ToastContainer",
1859
1864
  inheritAttrs: true
@@ -1890,7 +1895,7 @@
1890
1895
  }),
1891
1896
  onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
1892
1897
  onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
1893
- }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
1898
+ }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
1894
1899
  key: 0,
1895
1900
  class: "close-icon",
1896
1901
  type: "close",
@@ -1901,21 +1906,21 @@
1901
1906
  onClick: _cache[0] || (_cache[0] = $event => {
1902
1907
  vue.unref(closePopup)();
1903
1908
  })
1904
- })) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createVNode(_sfc_main$E, {
1909
+ })) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [vue.createVNode(_sfc_main$F, {
1905
1910
  type: vue.unref(props).type,
1906
1911
  color: "#707070",
1907
1912
  size: 20
1908
1913
  }, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
1909
1914
  class: "message",
1910
1915
  innerHTML: vue.unref(props).message
1911
- }, null, 8, _hoisted_2$c)], 38);
1916
+ }, null, 8, _hoisted_2$d)], 38);
1912
1917
  };
1913
1918
  }
1914
1919
  });
1915
1920
 
1916
1921
  function usePopup() {
1917
1922
  function popup(options) {
1918
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$p, options);
1923
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$q, options);
1919
1924
  return addScope2Scopes(scope);
1920
1925
  }
1921
1926
  function dialog(options) {
@@ -1948,7 +1953,7 @@
1948
1953
  },
1949
1954
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1950
1955
  });
1951
- const descriptor = openPopup(_sfc_main$r, options, extOptions);
1956
+ const descriptor = openPopup(_sfc_main$s, options, extOptions);
1952
1957
  scope = snail_core.useAsyncScope(deferred.promise);
1953
1958
  monitorDialog(descriptor, scope, deferred);
1954
1959
  }
@@ -1966,14 +1971,14 @@
1966
1971
  inPopup: "follow",
1967
1972
  target
1968
1973
  };
1969
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$q, options, extOptions);
1974
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$r, options, extOptions);
1970
1975
  }
1971
1976
  return addScope2Scopes(scope);
1972
1977
  }
1973
1978
  function confirm(title, message, options) {
1974
1979
  options = options || Object.create(null);
1975
1980
  return dialog({
1976
- component: _sfc_main$x,
1981
+ component: _sfc_main$y,
1977
1982
  closeOnEscape: true,
1978
1983
  props: {
1979
1984
  ...options,
@@ -1983,7 +1988,7 @@
1983
1988
  });
1984
1989
  }
1985
1990
  function toast(type, message, options) {
1986
- return popupInCustomContainer(_sfc_main$o, {
1991
+ return popupInCustomContainer(_sfc_main$p, {
1987
1992
  url: "#ToastContainer",
1988
1993
  props: {
1989
1994
  ...(options || Object.create(null)),
@@ -2016,7 +2021,7 @@
2016
2021
  },
2017
2022
  ...extOptions
2018
2023
  });
2019
- const descriptor = openPopup(container || _sfc_main$p, options, extOptions);
2024
+ const descriptor = openPopup(container || _sfc_main$q, options, extOptions);
2020
2025
  const scope = snail_core.useAsyncScope(deferred.promise);
2021
2026
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
2022
2027
  return scope;
@@ -2151,12 +2156,12 @@
2151
2156
  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==";
2152
2157
  }
2153
2158
 
2154
- const _hoisted_1$f = {
2159
+ const _hoisted_1$g = {
2155
2160
  class: "snail-empty"
2156
2161
  };
2157
- const _hoisted_2$b = ["src"];
2158
- const _hoisted_3$6 = ["textContent"];
2159
- var _sfc_main$n = vue.defineComponent({
2162
+ const _hoisted_2$c = ["src"];
2163
+ const _hoisted_3$7 = ["textContent"];
2164
+ var _sfc_main$o = vue.defineComponent({
2160
2165
  ...{
2161
2166
  name: "Empty",
2162
2167
  inheritAttrs: true
@@ -2169,23 +2174,23 @@
2169
2174
  setup(__props) {
2170
2175
  const defaultImageBase64 = getNoDataBase64Image();
2171
2176
  return (_ctx, _cache) => {
2172
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [vue.createElementVNode("img", {
2177
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createElementVNode("img", {
2173
2178
  src: __props.imageUrl || vue.unref(defaultImageBase64)
2174
- }, null, 8, _hoisted_2$b), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
2179
+ }, null, 8, _hoisted_2$c), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
2175
2180
  class: "message",
2176
2181
  textContent: vue.toDisplayString(__props.message || "无数据")
2177
- }, null, 8, _hoisted_3$6)])]);
2182
+ }, null, 8, _hoisted_3$7)])]);
2178
2183
  };
2179
2184
  }
2180
2185
  });
2181
2186
 
2182
- const _hoisted_1$e = ["title"];
2183
- const _hoisted_2$a = ["textContent"];
2184
- const _hoisted_3$5 = {
2187
+ const _hoisted_1$f = ["title"];
2188
+ const _hoisted_2$b = ["textContent"];
2189
+ const _hoisted_3$6 = {
2185
2190
  key: 1,
2186
2191
  class: "select-status"
2187
2192
  };
2188
- var _sfc_main$m = vue.defineComponent({
2193
+ var _sfc_main$n = vue.defineComponent({
2189
2194
  ...{
2190
2195
  name: "SelectNode",
2191
2196
  inheritAttrs: true
@@ -2230,15 +2235,15 @@
2230
2235
  }, [vue.createElementVNode("div", {
2231
2236
  class: "item-text ellipsis",
2232
2237
  textContent: vue.toDisplayString(__props.item.text)
2233
- }, null, 8, _hoisted_2$a), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
2238
+ }, null, 8, _hoisted_2$b), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
2234
2239
  key: 0,
2235
2240
  type: "arrow"
2236
- })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$E, {
2241
+ })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [vue.createVNode(_sfc_main$F, {
2237
2242
  type: "success",
2238
2243
  button: "",
2239
2244
  size: 12,
2240
2245
  color: "white"
2241
- })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$e)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2246
+ })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$f)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2242
2247
  key: 1
2243
2248
  }, vue.renderList(vue.unref(showChildrenRef), child => {
2244
2249
  return vue.openBlock(), vue.createBlock(_component_SelectNode, {
@@ -2255,7 +2260,7 @@
2255
2260
  }
2256
2261
  });
2257
2262
 
2258
- var _sfc_main$l = vue.defineComponent({
2263
+ var _sfc_main$m = vue.defineComponent({
2259
2264
  ...{
2260
2265
  name: "Select2Popup",
2261
2266
  inheritAttrs: true
@@ -2427,13 +2432,13 @@
2427
2432
  key: 0
2428
2433
  }, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2429
2434
  key: 1
2430
- }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$y, vue.mergeProps({
2435
+ }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
2431
2436
  key: 0
2432
2437
  }, __props.search, {
2433
2438
  onSearch,
2434
2439
  key: "select-search"
2435
2440
  }), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
2436
- return vue.openBlock(), vue.createBlock(_sfc_main$m, {
2441
+ return vue.openBlock(), vue.createBlock(_sfc_main$n, {
2437
2442
  key: vue.unref(context).getKey(item),
2438
2443
  multiple: __props.multiple,
2439
2444
  item,
@@ -2442,7 +2447,7 @@
2442
2447
  onEnter: onEnterSelectNode,
2443
2448
  onClick: onClickSelectNode
2444
2449
  }, null, 8, ["multiple", "item", "context"]);
2445
- }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$n, {
2450
+ }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
2446
2451
  key: 1,
2447
2452
  message: "无结果"
2448
2453
  })) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2454,20 +2459,20 @@
2454
2459
  }
2455
2460
  });
2456
2461
 
2457
- const _hoisted_1$d = {
2462
+ const _hoisted_1$e = {
2458
2463
  key: 0,
2459
2464
  class: "select-result"
2460
2465
  };
2461
- const _hoisted_2$9 = ["title", "textContent"];
2462
- const _hoisted_3$4 = ["textContent"];
2463
- const _hoisted_4$3 = {
2466
+ const _hoisted_2$a = ["title", "textContent"];
2467
+ const _hoisted_3$5 = ["textContent"];
2468
+ const _hoisted_4$4 = {
2464
2469
  key: 1,
2465
2470
  class: "placeholder"
2466
2471
  };
2467
2472
  onAppCreated((app, type) => {
2468
- type == "popup" && app.component("SelectPopup", _sfc_main$l);
2473
+ type == "popup" && app.component("SelectPopup", _sfc_main$m);
2469
2474
  });
2470
- var _sfc_main$k = vue.defineComponent({
2475
+ var _sfc_main$l = vue.defineComponent({
2471
2476
  ...{
2472
2477
  name: "Select",
2473
2478
  inheritAttrs: true
@@ -2599,26 +2604,26 @@
2599
2604
  ref: "select"
2600
2605
  }, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2601
2606
  key: 0
2602
- }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2607
+ }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2603
2608
  class: "select-text ellipsis",
2604
2609
  title: selectedTextRef.value,
2605
2610
  textContent: vue.toDisplayString(selectedTextRef.value)
2606
- }, null, 8, _hoisted_2$9)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2611
+ }, null, 8, _hoisted_2$a)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2607
2612
  key: 1,
2608
2613
  class: "placeholder",
2609
2614
  textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2610
- }, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
2615
+ }, null, 8, _hoisted_3$5)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
2611
2616
  key: 2,
2612
2617
  type: "arrow",
2613
2618
  button: "",
2614
2619
  size: 24,
2615
2620
  rotate: 90
2616
- })) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, "暂无可选项"))], 2);
2621
+ })) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
2617
2622
  };
2618
2623
  }
2619
2624
  });
2620
2625
 
2621
- var _sfc_main$j = vue.defineComponent({
2626
+ var _sfc_main$k = vue.defineComponent({
2622
2627
  ...{
2623
2628
  name: "Switch",
2624
2629
  inheritAttrs: true
@@ -2657,7 +2662,7 @@
2657
2662
  return vue.openBlock(), vue.createElementBlock("div", {
2658
2663
  class: vue.normalizeClass(["snail-switch", [switchModel.value ? "on" : "off", __props.readonly ? "readonly" : ""], __props.type || "switch"]),
2659
2664
  onClick: onSwitchChange
2660
- }, [__props.type == "checkbox" || __props.type == "radio" ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$E, {
2665
+ }, [__props.type == "checkbox" || __props.type == "radio" ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$F, {
2661
2666
  key: 0,
2662
2667
  type: "success",
2663
2668
  color: "white",
@@ -2675,8 +2680,8 @@
2675
2680
  }
2676
2681
  });
2677
2682
 
2678
- const _hoisted_1$c = ["readonly", "placeholder", "rows"];
2679
- var _sfc_main$i = vue.defineComponent({
2683
+ const _hoisted_1$d = ["readonly", "placeholder", "rows"];
2684
+ var _sfc_main$j = vue.defineComponent({
2680
2685
  ...{
2681
2686
  name: "Textarea",
2682
2687
  inheritAttrs: true
@@ -2736,178 +2741,12 @@
2736
2741
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2737
2742
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2738
2743
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2739
- }, null, 40, _hoisted_1$c)), [[vue.vModelText, valueModel.value]]);
2740
- };
2741
- }
2742
- });
2743
-
2744
- const _hoisted_1$b = ["onClick"];
2745
- const _hoisted_2$8 = ["textContent"];
2746
- var _sfc_main$h = vue.defineComponent({
2747
- __name: "action-items",
2748
- props: {
2749
- mode: {},
2750
- actions: {},
2751
- inPopup: {},
2752
- closePopup: {
2753
- type: Function
2754
- },
2755
- popupStatus: {},
2756
- target: {},
2757
- followX: {},
2758
- followY: {},
2759
- pinned: {}
2760
- },
2761
- emits: ["trigger"],
2762
- setup(__props, _ref) {
2763
- let {
2764
- emit: __emit
2765
- } = _ref;
2766
- const props = __props;
2767
- const emits = __emit;
2768
- function onActionItemClick(code) {
2769
- emits("trigger", code);
2770
- props.inPopup && props.closePopup(code);
2771
- }
2772
- return (_ctx, _cache) => {
2773
- return vue.openBlock(), vue.createElementBlock("div", {
2774
- class: vue.normalizeClass(["snail-action-items", [vue.unref(snail_core.correctString)(__props.mode, "vertical", true), vue.unref(snail_core.isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
2775
- }, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, action => {
2776
- return vue.openBlock(), vue.createElementBlock("div", {
2777
- class: "action-item flex-cross-center",
2778
- key: action.code,
2779
- style: vue.normalizeStyle({
2780
- "--color": vue.unref(snail_core.correctString)(action.color, null, true),
2781
- "--hcolor": vue.unref(snail_core.correctString)(action.hoverColor, null, true)
2782
- }),
2783
- onClick: $event => onActionItemClick(action.code)
2784
- }, [action.icon != void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$E, vue.mergeProps({
2785
- key: 0,
2786
- ref_for: true
2787
- }, action.icon, {
2788
- custom: false,
2789
- size: 20
2790
- }), null, 16)) : vue.createCommentVNode("", true), vue.createElementVNode("span", {
2791
- class: "ellipsis",
2792
- textContent: vue.toDisplayString(action.name)
2793
- }, null, 8, _hoisted_2$8)], 12, _hoisted_1$b);
2794
- }), 128))], 2);
2795
- };
2796
- }
2797
- });
2798
-
2799
- const _hoisted_1$a = {
2800
- class: "snail-action flex-cross-center",
2801
- ref: "snail-action"
2802
- };
2803
- const _hoisted_2$7 = {
2804
- class: "action-slot flex-cross-center"
2805
- };
2806
- var _sfc_main$g = vue.defineComponent({
2807
- __name: "action",
2808
- props: {
2809
- disabled: {
2810
- type: Boolean
2811
- },
2812
- trigger: {},
2813
- actions: {},
2814
- followX: {},
2815
- followY: {},
2816
- spaceX: {},
2817
- spaceY: {}
2818
- },
2819
- emits: ["trigger"],
2820
- setup(__props, _ref) {
2821
- let {
2822
- emit: __emit
2823
- } = _ref;
2824
- const props = __props;
2825
- const emits = __emit;
2826
- const {
2827
- follow
2828
- } = usePopup();
2829
- const {
2830
- onEvent
2831
- } = snail_view.useObserver();
2832
- const rootDom = vue.useTemplateRef("snail-action");
2833
- const popupScopeRef = vue.shallowRef(void 0);
2834
- let pressStartDate = void 0;
2835
- const slotHandle = Object.freeze({
2836
- isActived: () => popupScopeRef.value != void 0,
2837
- trigger: () => onFollowShow(props.trigger == "long-press")
2838
- });
2839
- async function onFollowShow(longPress) {
2840
- if (popupScopeRef.value && popupScopeRef.value.destroyed != true) {
2841
- popupScopeRef.value.destroy();
2842
- } else if (props.disabled != true) {
2843
- popupScopeRef.value = follow(rootDom.value, {
2844
- component: _sfc_main$h,
2845
- closeOnEscape: true,
2846
- closeOnMask: true,
2847
- closeOnResize: true,
2848
- closeOnTarget: true,
2849
- followX: props.followX || ["center", "start", "end", "after", "before", "ratio"],
2850
- followY: props.followY || ["after", "before", "center", "end", "start", "ratio"],
2851
- spaceX: props.spaceX,
2852
- spaceY: props.spaceY,
2853
- props: {
2854
- mode: "vertical",
2855
- actions: props.actions
2856
- }
2857
- });
2858
- const code = await popupScopeRef.value;
2859
- snail_core.isStringNotEmpty(code) && emits("trigger", code);
2860
- }
2861
- popupScopeRef.value = void 0;
2862
- }
2863
- function onMouseDown() {
2864
- if (props.trigger == "long-press" && pressStartDate == void 0) {
2865
- pressStartDate = new Date();
2866
- }
2867
- }
2868
- function onMouseUp() {
2869
- if (pressStartDate != void 0) {
2870
- const time = ((new Date()).getTime() - pressStartDate.getTime()) / 1e3;
2871
- pressStartDate = void 0;
2872
- if (time >= 0.5) {
2873
- navigator.vibrate && navigator.vibrate(200);
2874
- onFollowShow();
2875
- }
2876
- }
2877
- }
2878
- function onMouseCancel() {
2879
- setTimeout(() => pressStartDate = void 0, 10);
2880
- }
2881
- vue.onMounted(() => {
2882
- onEvent(rootDom.value, "mousedown", onMouseDown);
2883
- onEvent(rootDom.value, "mouseup", onMouseUp);
2884
- if ("ontouchstart" in window) {
2885
- onEvent(rootDom.value, "touchstart", onMouseDown);
2886
- onEvent(rootDom.value, "touchend", onMouseUp);
2887
- }
2888
- onEvent(window, "mouseup", onMouseCancel);
2889
- if ("ontouchstart" in window) {
2890
- onEvent(window, "touchend", onMouseCancel);
2891
- onEvent(window, "touchcancel", onMouseCancel);
2892
- }
2893
- });
2894
- return (_ctx, _cache) => {
2895
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$7, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))))]), __props.disabled != true && (__props.trigger == "hover" || __props.trigger == "always") ? (vue.openBlock(), vue.createElementBlock("div", {
2896
- key: 0,
2897
- class: vue.normalizeClass(["trigger-area", {
2898
- hidden: __props.trigger == "hover"
2899
- }])
2900
- }, [vue.renderSlot(_ctx.$slots, "trigger", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))), () => [vue.createVNode(_sfc_main$E, {
2901
- button: "",
2902
- type: "more",
2903
- size: 16,
2904
- onClick: _cache[0] || (_cache[0] = $event => onFollowShow())
2905
- })])], 2)) : vue.createCommentVNode("", true)], 512);
2744
+ }, null, 40, _hoisted_1$d)), [[vue.vModelText, valueModel.value]]);
2906
2745
  };
2907
2746
  }
2908
2747
  });
2909
2748
 
2910
- var _sfc_main$f = vue.defineComponent({
2749
+ var _sfc_main$i = vue.defineComponent({
2911
2750
  ...{
2912
2751
  name: "Elastic",
2913
2752
  inheritAttrs: false
@@ -3113,7 +2952,7 @@
3113
2952
  }
3114
2953
  });
3115
2954
 
3116
- var _sfc_main$e = vue.defineComponent({
2955
+ var _sfc_main$h = vue.defineComponent({
3117
2956
  ...{
3118
2957
  name: "Flex",
3119
2958
  inheritAttrs: false
@@ -3208,13 +3047,13 @@
3208
3047
  }
3209
3048
  });
3210
3049
 
3211
- const _hoisted_1$9 = ["textContent"];
3212
- const _hoisted_2$6 = ["textContent"];
3213
- const _hoisted_3$3 = {
3050
+ const _hoisted_1$c = ["textContent"];
3051
+ const _hoisted_2$9 = ["textContent"];
3052
+ const _hoisted_3$4 = {
3214
3053
  key: 1,
3215
3054
  class: "status"
3216
3055
  };
3217
- var _sfc_main$d = vue.defineComponent({
3056
+ var _sfc_main$g = vue.defineComponent({
3218
3057
  ...{
3219
3058
  name: "Fold",
3220
3059
  inheritAttrs: true
@@ -3306,11 +3145,11 @@
3306
3145
  }, [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps(slotHandle)), () => [vue.createElementVNode("div", {
3307
3146
  class: "title ellipsis",
3308
3147
  textContent: vue.toDisplayString(__props.title)
3309
- }, null, 8, _hoisted_1$9), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
3148
+ }, null, 8, _hoisted_1$c), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
3310
3149
  key: 0,
3311
3150
  class: "subtitle ellipsis",
3312
3151
  textContent: vue.toDisplayString(__props.subtitle)
3313
- }, null, 8, _hoisted_2$6)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [vue.createVNode(_sfc_main$E, {
3152
+ }, null, 8, _hoisted_2$9)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [vue.createVNode(_sfc_main$F, {
3314
3153
  type: "arrow",
3315
3154
  button: "",
3316
3155
  title: statusModel.value == "expand" ? "收起" : "展开",
@@ -3324,7 +3163,7 @@
3324
3163
  }
3325
3164
  });
3326
3165
 
3327
- var _sfc_main$c = vue.defineComponent({
3166
+ var _sfc_main$f = vue.defineComponent({
3328
3167
  __name: "layout",
3329
3168
  props: {
3330
3169
  direction: {},
@@ -3401,7 +3240,7 @@
3401
3240
  key: item
3402
3241
  }, [areaMap.value[item] && _ctx.$slots[item] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3403
3242
  key: 0
3404
- }, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
3243
+ }, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
3405
3244
  key: 0,
3406
3245
  class: areaMap.value[item].class,
3407
3246
  style: areaMap.value[item].style
@@ -3420,7 +3259,7 @@
3420
3259
  }
3421
3260
  });
3422
3261
 
3423
- var _sfc_main$b = vue.defineComponent({
3262
+ var _sfc_main$e = vue.defineComponent({
3424
3263
  ...{
3425
3264
  name: "Sort",
3426
3265
  inheritAttrs: true
@@ -3521,10 +3360,10 @@
3521
3360
  }
3522
3361
  });
3523
3362
 
3524
- const _hoisted_1$8 = {
3363
+ const _hoisted_1$b = {
3525
3364
  class: "table-body"
3526
3365
  };
3527
- var _sfc_main$a = vue.defineComponent({
3366
+ var _sfc_main$d = vue.defineComponent({
3528
3367
  ...{
3529
3368
  name: "Table",
3530
3369
  inheritAttrs: true
@@ -3544,7 +3383,7 @@
3544
3383
  const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
3545
3384
  const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
3546
3385
  return (_ctx, _cache) => {
3547
- return vue.openBlock(), vue.createBlock(_sfc_main$t, {
3386
+ return vue.openBlock(), vue.createBlock(_sfc_main$u, {
3548
3387
  class: vue.normalizeClass(["snail-table", {
3549
3388
  "start-border": __props.border == true
3550
3389
  }]),
@@ -3554,7 +3393,7 @@
3554
3393
  default: vue.withCtx(() => [vue.createElementVNode("div", {
3555
3394
  class: "table-header",
3556
3395
  style: vue.normalizeStyle(hStyleRef.value)
3557
- }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$8, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
3396
+ }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$b, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
3558
3397
  class: "table-footer",
3559
3398
  style: vue.normalizeStyle(fStyleRef.value)
3560
3399
  }, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -3564,7 +3403,7 @@
3564
3403
  }
3565
3404
  });
3566
3405
 
3567
- var _sfc_main$9 = vue.defineComponent({
3406
+ var _sfc_main$c = vue.defineComponent({
3568
3407
  ...{
3569
3408
  name: "TableRow",
3570
3409
  inheritAttrs: true
@@ -3587,7 +3426,7 @@
3587
3426
  }
3588
3427
  });
3589
3428
 
3590
- var _sfc_main$8 = vue.defineComponent({
3429
+ var _sfc_main$b = vue.defineComponent({
3591
3430
  ...{
3592
3431
  name: "TableCol",
3593
3432
  inheritAttrs: true
@@ -3633,19 +3472,19 @@
3633
3472
  }
3634
3473
  });
3635
3474
 
3636
- const _hoisted_1$7 = {
3475
+ const _hoisted_1$a = {
3637
3476
  key: 0,
3638
3477
  class: "node-fold"
3639
3478
  };
3640
- const _hoisted_2$5 = ["title", "textContent"];
3641
- const _hoisted_3$2 = {
3479
+ const _hoisted_2$8 = ["title", "textContent"];
3480
+ const _hoisted_3$3 = {
3642
3481
  class: "node-slot ellipsis"
3643
3482
  };
3644
- const _hoisted_4$2 = {
3483
+ const _hoisted_4$3 = {
3645
3484
  class: "snail-tree-children",
3646
3485
  ref: "children"
3647
3486
  };
3648
- var _sfc_main$7 = vue.defineComponent({
3487
+ var _sfc_main$a = vue.defineComponent({
3649
3488
  ...{
3650
3489
  name: "TreeNode",
3651
3490
  inheritAttrs: true
@@ -3753,7 +3592,7 @@
3753
3592
  key: 1
3754
3593
  }, [_cache[5] || (_cache[5] = vue.createElementVNode("div", {
3755
3594
  class: "indent"
3756
- }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
3595
+ }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
3757
3596
  key: 0,
3758
3597
  class: vue.normalizeClass(statusRef.value),
3759
3598
  custom: "",
@@ -3768,7 +3607,7 @@
3768
3607
  class: "node-text ellipsis",
3769
3608
  title: __props.node.text,
3770
3609
  textContent: vue.toDisplayString(__props.node.text)
3771
- }, null, 8, _hoisted_2$5), vue.createElementVNode("div", _hoisted_3$2, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34), [[vue.vShow, showRef.value]]), vue.withDirectives(vue.createElementVNode("div", _hoisted_4$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
3610
+ }, null, 8, _hoisted_2$8), vue.createElementVNode("div", _hoisted_3$3, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34), [[vue.vShow, showRef.value]]), vue.withDirectives(vue.createElementVNode("div", _hoisted_4$3, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
3772
3611
  return vue.openBlock(), vue.createBlock(_component_TreeNode, {
3773
3612
  key: __props.context.getKey(child),
3774
3613
  node: child,
@@ -3788,10 +3627,10 @@
3788
3627
  }
3789
3628
  });
3790
3629
 
3791
- const _hoisted_1$6 = {
3630
+ const _hoisted_1$9 = {
3792
3631
  class: "snail-tree"
3793
3632
  };
3794
- var _sfc_main$6 = vue.defineComponent({
3633
+ var _sfc_main$9 = vue.defineComponent({
3795
3634
  ...{
3796
3635
  name: "Tree",
3797
3636
  inheritAttrs: true
@@ -3825,15 +3664,15 @@
3825
3664
  emits("click", node, parents);
3826
3665
  }
3827
3666
  return (_ctx, _cache) => {
3828
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$y, vue.mergeProps({
3667
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
3829
3668
  key: 0
3830
3669
  }, __props.search, {
3831
3670
  onSearch
3832
- }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$t, {
3671
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$u, {
3833
3672
  scroll: "y"
3834
3673
  }, {
3835
3674
  default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
3836
- return vue.openBlock(), vue.createBlock(_sfc_main$7, {
3675
+ return vue.openBlock(), vue.createBlock(_sfc_main$a, {
3837
3676
  key: vue.unref(context).getKey(node),
3838
3677
  node,
3839
3678
  parent: void 0,
@@ -3858,7 +3697,7 @@
3858
3697
  snail_core.mustObject(options, "options");
3859
3698
  target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
3860
3699
  target.classList.add("snail-app");
3861
- const app = vue.createApp(_sfc_main$u, options);
3700
+ const app = vue.createApp(_sfc_main$v, options);
3862
3701
  triggerAppCreated(app);
3863
3702
  app.mount(target);
3864
3703
  const scope = snail_core.useScope().onDestroy(() => app.unmount());
@@ -3866,49 +3705,57 @@
3866
3705
  return scope;
3867
3706
  }
3868
3707
 
3869
- const _hoisted_1$5 = {
3870
- class: "snail-flash-number"
3871
- };
3872
- const _hoisted_2$4 = ["textContent"];
3873
- var _sfc_main$5 = vue.defineComponent({
3874
- __name: "flash-number",
3708
+ const _hoisted_1$8 = ["onClick"];
3709
+ const _hoisted_2$7 = ["textContent"];
3710
+ var _sfc_main$8 = vue.defineComponent({
3711
+ __name: "action-items",
3875
3712
  props: {
3876
- value: {}
3713
+ mode: {},
3714
+ actions: {},
3715
+ inPopup: {},
3716
+ closePopup: {
3717
+ type: Function
3718
+ },
3719
+ popupStatus: {},
3720
+ target: {},
3721
+ followX: {},
3722
+ followY: {},
3723
+ pinned: {}
3877
3724
  },
3878
- setup(__props) {
3725
+ emits: ["trigger"],
3726
+ setup(__props, _ref) {
3727
+ let {
3728
+ emit: __emit
3729
+ } = _ref;
3879
3730
  const props = __props;
3880
- const itemsRef = vue.ref();
3881
- function buildNumberItems() {
3882
- itemsRef.value = [];
3883
- const value = snail_core.isNullish(props.value) ? null : String(props.value);
3884
- if (snail_core.isStringNotEmpty(value) == true) {
3885
- for (const item of value) {
3886
- const number = parseInt(item);
3887
- const isNumber = 0 <= number && number <= 9;
3888
- itemsRef.value.push({
3889
- id: snail_core.newId(),
3890
- text: item,
3891
- number: isNumber ? number : void 0
3892
- });
3893
- }
3894
- }
3895
- if (snail_core.isArrayNotEmpty(itemsRef.value) == true) ;
3731
+ const emits = __emit;
3732
+ function onActionItemClick(code) {
3733
+ emits("trigger", code);
3734
+ props.inPopup && props.closePopup(code);
3896
3735
  }
3897
- vue.onMounted(() => {
3898
- buildNumberItems();
3899
- });
3900
3736
  return (_ctx, _cache) => {
3901
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
3902
- return vue.openBlock(), vue.createElementBlock("span", {
3903
- key: item.id,
3904
- textContent: vue.toDisplayString(item.text),
3905
- class: vue.normalizeClass(vue.unref(snail_core.isNullish)(item.number) ? "" : "number-item")
3906
- }, null, 10, _hoisted_2$4);
3907
- }), 128)), _cache[0] || (_cache[0] = vue.createElementVNode("span", {
3908
- style: {
3909
- "color": "red"
3910
- }
3911
- }, "-----还没实现,别用", -1))]);
3737
+ return vue.openBlock(), vue.createElementBlock("div", {
3738
+ class: vue.normalizeClass(["snail-action-items", [vue.unref(snail_core.correctString)(__props.mode, "vertical", true), vue.unref(snail_core.isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
3739
+ }, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, action => {
3740
+ return vue.openBlock(), vue.createElementBlock("div", {
3741
+ class: "action-item flex-cross-center",
3742
+ key: action.code,
3743
+ style: vue.normalizeStyle({
3744
+ "--color": vue.unref(snail_core.correctString)(action.color, null, true),
3745
+ "--hcolor": vue.unref(snail_core.correctString)(action.hoverColor, null, true)
3746
+ }),
3747
+ onClick: $event => onActionItemClick(action.code)
3748
+ }, [action.icon != void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$F, vue.mergeProps({
3749
+ key: 0,
3750
+ ref_for: true
3751
+ }, action.icon, {
3752
+ custom: false,
3753
+ size: 20
3754
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createElementVNode("span", {
3755
+ class: "ellipsis",
3756
+ textContent: vue.toDisplayString(action.name)
3757
+ }, null, 8, _hoisted_2$7)], 12, _hoisted_1$8);
3758
+ }), 128))], 2);
3912
3759
  };
3913
3760
  }
3914
3761
  });
@@ -4029,23 +3876,23 @@
4029
3876
  return items;
4030
3877
  }
4031
3878
 
4032
- const _hoisted_1$4 = {
3879
+ const _hoisted_1$7 = {
4033
3880
  class: "tz-item",
4034
3881
  ref: "hour-items"
4035
3882
  };
4036
- const _hoisted_2$3 = ["textContent", "onClick", "onDblclick"];
4037
- const _hoisted_3$1 = {
3883
+ const _hoisted_2$6 = ["textContent", "onClick", "onDblclick"];
3884
+ const _hoisted_3$2 = {
4038
3885
  class: "tz-item",
4039
3886
  ref: "minute-items"
4040
3887
  };
4041
- const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
4042
- const _hoisted_5$1 = {
3888
+ const _hoisted_4$2 = ["textContent", "onClick", "onDblclick"];
3889
+ const _hoisted_5$2 = {
4043
3890
  key: 0,
4044
3891
  class: "tz-item",
4045
3892
  ref: "second-items"
4046
3893
  };
4047
- const _hoisted_6$1 = ["textContent", "onClick", "onDblclick"];
4048
- var _sfc_main$4 = vue.defineComponent({
3894
+ const _hoisted_6$2 = ["textContent", "onClick", "onDblclick"];
3895
+ var _sfc_main$7 = vue.defineComponent({
4049
3896
  __name: "time-pc",
4050
3897
  props: {
4051
3898
  value: {},
@@ -4147,17 +3994,17 @@
4147
3994
  }
4148
3995
  vue.onMounted(rebuildItems);
4149
3996
  return (_ctx, _cache) => {
4150
- return vue.openBlock(), vue.createBlock(_sfc_main$c, {
3997
+ return vue.openBlock(), vue.createBlock(_sfc_main$f, {
4151
3998
  class: vue.normalizeClass(["time-picker pc", {
4152
3999
  "second-disabled": vue.unref(format) != "HH:mm:ss"
4153
4000
  }]),
4154
4001
  direction: "vertical"
4155
4002
  }, vue.createSlots({
4156
- main: vue.withCtx(() => [vue.createVNode(_sfc_main$w, {
4003
+ main: vue.withCtx(() => [vue.createVNode(_sfc_main$x, {
4157
4004
  multiple: "",
4158
4005
  effect: vue.unref(MOTION).top
4159
4006
  }, {
4160
- default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
4007
+ default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$7, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
4161
4008
  return vue.openBlock(), vue.createElementBlock("div", {
4162
4009
  class: vue.normalizeClass(["tzi-number", {
4163
4010
  active: item.hour == timeRef.value.hour,
@@ -4167,8 +4014,8 @@
4167
4014
  textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.hour, 2, "0")),
4168
4015
  onClick: $event => onHourClick(item),
4169
4016
  onDblclick: $event => onHourClick(item)
4170
- }, null, 42, _hoisted_2$3);
4171
- }), 128))], 512), vue.createElementVNode("div", _hoisted_3$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(minuteItems.value, item => {
4017
+ }, null, 42, _hoisted_2$6);
4018
+ }), 128))], 512), vue.createElementVNode("div", _hoisted_3$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(minuteItems.value, item => {
4172
4019
  return vue.openBlock(), vue.createElementBlock("div", {
4173
4020
  class: vue.normalizeClass(["tzi-number", {
4174
4021
  active: item.minute == timeRef.value.minute,
@@ -4178,8 +4025,8 @@
4178
4025
  textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.minute, 2, "0")),
4179
4026
  onClick: $event => onMinuteClick(item),
4180
4027
  onDblclick: $event => onMinuteClick(item, true)
4181
- }, null, 42, _hoisted_4$1);
4182
- }), 128))], 512), vue.unref(format) == "HH:mm:ss" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(secondItems.value, item => {
4028
+ }, null, 42, _hoisted_4$2);
4029
+ }), 128))], 512), vue.unref(format) == "HH:mm:ss" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(secondItems.value, item => {
4183
4030
  return vue.openBlock(), vue.createElementBlock("div", {
4184
4031
  class: vue.normalizeClass(["tzi-number", {
4185
4032
  active: item.second == timeRef.value.second,
@@ -4189,26 +4036,26 @@
4189
4036
  textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.second, 2, "0")),
4190
4037
  onClick: $event => onSecondClick(item),
4191
4038
  onDblclick: $event => onSecondClick(item, true)
4192
- }, null, 42, _hoisted_6$1);
4039
+ }, null, 42, _hoisted_6$2);
4193
4040
  }), 128))], 512)) : vue.createCommentVNode("", true)]),
4194
4041
  _: 1
4195
4042
  }, 8, ["effect"])]),
4196
4043
  _: 2
4197
4044
  }, [__props.toolbarDisabled != true ? {
4198
4045
  name: "bottom",
4199
- fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4046
+ fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
4200
4047
  key: 0,
4201
4048
  type: "link",
4202
4049
  size: "small",
4203
4050
  textContent: "清空",
4204
4051
  onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
4205
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4052
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
4206
4053
  key: 1,
4207
4054
  type: "link",
4208
4055
  size: "small",
4209
4056
  textContent: "现在",
4210
4057
  onClick: _cache[1] || (_cache[1] = $event => rebuildItems(vue.unref(snail_core.getTimeValue)(new Date())))
4211
- })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$F, {
4058
+ })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$G, {
4212
4059
  type: "link",
4213
4060
  size: "small",
4214
4061
  textContent: "确定",
@@ -4223,15 +4070,15 @@
4223
4070
  }
4224
4071
  });
4225
4072
 
4226
- const _hoisted_1$3 = ["textContent"];
4227
- const _hoisted_2$2 = ["textContent"];
4228
- const _hoisted_3 = ["textContent"];
4229
- const _hoisted_4 = ["textContent", "onClick", "onDblclick"];
4230
- const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
4231
- const _hoisted_6 = ["textContent"];
4073
+ const _hoisted_1$6 = ["textContent"];
4074
+ const _hoisted_2$5 = ["textContent"];
4075
+ const _hoisted_3$1 = ["textContent"];
4076
+ const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
4077
+ const _hoisted_5$1 = ["textContent", "onClick", "onDblclick"];
4078
+ const _hoisted_6$1 = ["textContent"];
4232
4079
  const _hoisted_7 = ["textContent", "onClick", "onDblclick"];
4233
4080
  const _hoisted_8 = ["textContent"];
4234
- var _sfc_main$3 = vue.defineComponent({
4081
+ var _sfc_main$6 = vue.defineComponent({
4235
4082
  __name: "date-pc",
4236
4083
  props: {
4237
4084
  value: {},
@@ -4448,7 +4295,7 @@
4448
4295
  dateRef.value == void 0 && (dateRef.value = electDateValue());
4449
4296
  buildPickerItems(stepRef.value, 0);
4450
4297
  return (_ctx, _cache) => {
4451
- return vue.openBlock(), vue.createBlock(_sfc_main$c, {
4298
+ return vue.openBlock(), vue.createBlock(_sfc_main$f, {
4452
4299
  class: vue.normalizeClass(["date-picker pc", {
4453
4300
  "time-now": __props.pinned && __props.pinned.value == true
4454
4301
  }]),
@@ -4460,7 +4307,7 @@
4460
4307
  height: "30px"
4461
4308
  }
4462
4309
  }, vue.createSlots({
4463
- top: vue.withCtx(() => [vue.createVNode(_sfc_main$E, {
4310
+ top: vue.withCtx(() => [vue.createVNode(_sfc_main$F, {
4464
4311
  type: "arrow",
4465
4312
  button: "",
4466
4313
  rotate: 180,
@@ -4473,16 +4320,16 @@
4473
4320
  }, [stepRef.value == "year" ? (vue.openBlock(), vue.createElementBlock("div", {
4474
4321
  key: 0,
4475
4322
  textContent: vue.toDisplayString(`${yearItems.value[0].year}年 - ${vue.unref(snail_core.getFromArray)(yearItems.value, -1).year}年`)
4476
- }, null, 8, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4323
+ }, null, 8, _hoisted_1$6)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4477
4324
  key: 1
4478
4325
  }, [vue.createElementVNode("div", {
4479
4326
  textContent: vue.toDisplayString(`${dateRef.value.year}年`),
4480
4327
  onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
4481
- }, null, 8, _hoisted_2$2), stepRef.value == "day" ? (vue.openBlock(), vue.createElementBlock("div", {
4328
+ }, null, 8, _hoisted_2$5), stepRef.value == "day" ? (vue.openBlock(), vue.createElementBlock("div", {
4482
4329
  key: 0,
4483
4330
  textContent: vue.toDisplayString(`${dateRef.value.month}月`),
4484
4331
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
4485
- }, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$E, {
4332
+ }, null, 8, _hoisted_3$1)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$F, {
4486
4333
  class: "flex-0",
4487
4334
  type: "arrow",
4488
4335
  button: "",
@@ -4504,7 +4351,7 @@
4504
4351
  textContent: vue.toDisplayString(item.year),
4505
4352
  onClick: $event => onYearItemClick(item),
4506
4353
  onDblclick: $event => onYearItemClick(item, true)
4507
- }, null, 40, _hoisted_4)], 2);
4354
+ }, null, 40, _hoisted_4$1)], 2);
4508
4355
  }), 128)) : stepRef.value == "month" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
4509
4356
  key: 1
4510
4357
  }, vue.renderList(monthItems.value, item => {
@@ -4518,7 +4365,7 @@
4518
4365
  textContent: vue.toDisplayString(item.text),
4519
4366
  onClick: $event => onMonthItemClick(item),
4520
4367
  onDblclick: $event => onMonthItemClick(item, true)
4521
- }, null, 40, _hoisted_5)], 2);
4368
+ }, null, 40, _hoisted_5$1)], 2);
4522
4369
  }), 128)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4523
4370
  key: 2
4524
4371
  }, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
@@ -4526,7 +4373,7 @@
4526
4373
  class: "day-item week",
4527
4374
  key: item,
4528
4375
  textContent: vue.toDisplayString(item)
4529
- }, null, 8, _hoisted_6);
4376
+ }, null, 8, _hoisted_6$1);
4530
4377
  }), 64)), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(dayItemsRef.value, item => {
4531
4378
  return vue.openBlock(), vue.createElementBlock("div", {
4532
4379
  class: vue.normalizeClass(["day-item", {
@@ -4554,19 +4401,19 @@
4554
4401
  onClick: onSelectTime
4555
4402
  }, null, 10, _hoisted_8)) : vue.createCommentVNode("", true), __props.toolbarDisabled != true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4556
4403
  key: 1
4557
- }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4404
+ }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
4558
4405
  key: 0,
4559
4406
  type: "link",
4560
4407
  size: "small",
4561
4408
  textContent: "清空",
4562
4409
  onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), vue.unref(inPopup) && __props.closePopup("")))
4563
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4410
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$G, {
4564
4411
  key: 1,
4565
4412
  type: "link",
4566
4413
  size: "small",
4567
4414
  textContent: "现在",
4568
4415
  onClick: onNow
4569
- })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$F, {
4416
+ })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$G, {
4570
4417
  type: "link",
4571
4418
  size: "small",
4572
4419
  textContent: "确定",
@@ -4581,19 +4428,148 @@
4581
4428
  }
4582
4429
  });
4583
4430
 
4431
+ const _hoisted_1$5 = {
4432
+ class: "snail-scroll-picker"
4433
+ };
4434
+ const _hoisted_2$4 = {
4435
+ key: 0,
4436
+ class: "pick-header"
4437
+ };
4438
+ const _hoisted_3 = ["textContent"];
4439
+ const _hoisted_4 = {
4440
+ class: "pick-body"
4441
+ };
4442
+ const _hoisted_5 = {
4443
+ class: "pick-items",
4444
+ ref: "pick-items"
4445
+ };
4446
+ const _hoisted_6 = ["textContent"];
4447
+ const itemHeight = 32;
4448
+ var _sfc_main$5 = vue.defineComponent({
4449
+ __name: "scroll-picker",
4450
+ props: {
4451
+ items: {},
4452
+ value: {},
4453
+ title: {},
4454
+ clearDisabled: {
4455
+ type: Boolean
4456
+ },
4457
+ inPopup: {},
4458
+ closePopup: {
4459
+ type: Function
4460
+ },
4461
+ onBeforeClose: {
4462
+ type: Function
4463
+ },
4464
+ popupStatus: {},
4465
+ popup: {},
4466
+ picker: {}
4467
+ },
4468
+ emits: ["select"],
4469
+ setup(__props, _ref) {
4470
+ var _ref2, _props$value, _props$items$;
4471
+ let {
4472
+ emit: __emit
4473
+ } = _ref;
4474
+ const props = __props;
4475
+ const emits = __emit;
4476
+ const {
4477
+ onSize
4478
+ } = snail_view.useObserver();
4479
+ const {
4480
+ onTimeout
4481
+ } = snail_core.useTimer();
4482
+ const pickItemsDom = vue.useTemplateRef("pick-items");
4483
+ const elasticRef = vue.shallowRef();
4484
+ const valueRef = vue.ref((_ref2 = (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : (_props$items$ = props.items[0]) === null || _props$items$ === void 0 ? void 0 : _props$items$.code) !== null && _ref2 !== void 0 ? _ref2 : "");
4485
+ let backValue = void 0;
4486
+ function onElastic(detail) {
4487
+ if (detail.status == "start") {
4488
+ backValue = valueRef.value;
4489
+ } else {
4490
+ const index = parseInt((detail.position.y / itemHeight).toFixed(0));
4491
+ const item = props.items[-index];
4492
+ valueRef.value = item ? item.code : void 0;
4493
+ if (detail.status == "end") {
4494
+ elasticRef.value.scrollTo(void 0, index * itemHeight);
4495
+ backValue != valueRef.value && emits("select", valueRef.value);
4496
+ }
4497
+ }
4498
+ }
4499
+ vue.onMounted(async () => {
4500
+ onSize(pickItemsDom.value.parentElement, size => {
4501
+ const offset = (size.height - itemHeight) / 2;
4502
+ pickItemsDom.value.style.padding = `${offset}px 0`;
4503
+ });
4504
+ elasticRef.value = snail_view.useElastic(pickItemsDom.value, {
4505
+ elastic: "y",
4506
+ distance: 100
4507
+ }, onElastic);
4508
+ const index = props.items.findIndex(item => item.code == valueRef.value);
4509
+ index != -1 && onTimeout(() => elasticRef.value.scrollTo(void 0, -itemHeight * index), 50);
4510
+ });
4511
+ return (_ctx, _cache) => {
4512
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [__props.inPopup ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$4, [vue.createElementVNode("span", {
4513
+ class: "pick-button",
4514
+ textContent: "取消",
4515
+ onClick: _cache[0] || (_cache[0] = $event => __props.closePopup(void 0))
4516
+ }), __props.clearDisabled != true ? (vue.openBlock(), vue.createElementBlock("span", {
4517
+ key: 0,
4518
+ class: "pick-button",
4519
+ textContent: "清空",
4520
+ onClick: _cache[1] || (_cache[1] = $event => __props.closePopup(""))
4521
+ })) : vue.createCommentVNode("", true), vue.createElementVNode("span", {
4522
+ class: "pick-title ellipsis",
4523
+ textContent: vue.toDisplayString(__props.title)
4524
+ }, null, 8, _hoisted_3), vue.createElementVNode("span", {
4525
+ class: "pick-button",
4526
+ textContent: "确定",
4527
+ onClick: _cache[2] || (_cache[2] = $event => __props.closePopup(valueRef.value))
4528
+ })])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_4, [vue.createElementVNode("div", _hoisted_5, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, item => {
4529
+ return vue.openBlock(), vue.createElementBlock("span", {
4530
+ class: vue.normalizeClass(["pick-item", {
4531
+ selected: item.code === valueRef.value,
4532
+ disabled: item.disabled
4533
+ }]),
4534
+ key: item.code,
4535
+ textContent: vue.toDisplayString(item.name)
4536
+ }, null, 10, _hoisted_6);
4537
+ }), 128))], 512), _cache[3] || (_cache[3] = vue.createElementVNode("div", {
4538
+ class: "pick-layer"
4539
+ }, [vue.createElementVNode("span", {
4540
+ class: "layer-top"
4541
+ }), vue.createElementVNode("span", {
4542
+ class: "layer-selection"
4543
+ }), vue.createElementVNode("span", {
4544
+ class: "layer-bottom"
4545
+ })], -1))])]);
4546
+ };
4547
+ }
4548
+ });
4549
+
4584
4550
  function usePicker() {
4585
4551
  const popup = usePopup();
4586
4552
  function showDate(target, options, popupOptions) {
4587
4553
  options = {
4588
4554
  ...options
4589
4555
  };
4590
- return showPicker(target, _sfc_main$3, options, popupOptions);
4556
+ return showPicker(target, _sfc_main$6, options, popupOptions);
4591
4557
  }
4592
4558
  function showTime(target, options, popupOptions) {
4593
4559
  options = {
4594
4560
  ...options
4595
4561
  };
4596
- return showPicker(target, _sfc_main$4, options, popupOptions);
4562
+ return showPicker(target, _sfc_main$7, options, popupOptions);
4563
+ }
4564
+ function showScroll(options) {
4565
+ const popupOptions = {
4566
+ mode: "dialog",
4567
+ dialog: {
4568
+ closeOnEscape: true,
4569
+ closeOnMask: true
4570
+ }
4571
+ };
4572
+ return showPicker(void 0, _sfc_main$5, options, popupOptions);
4597
4573
  }
4598
4574
  function showPicker(target, component, options, popupOptions) {
4599
4575
  if (popupOptions && popupOptions.mode == "dialog") {
@@ -4631,12 +4607,188 @@
4631
4607
  }
4632
4608
  const manager = Object.freeze(snail_core.mountScope({
4633
4609
  showDate,
4634
- showTime
4610
+ showTime,
4611
+ showScroll
4635
4612
  }, "IPickerManager"));
4636
4613
  manager.onDestroy(popup.destroy);
4637
4614
  return manager;
4638
4615
  }
4639
4616
 
4617
+ const _hoisted_1$4 = {
4618
+ class: "action-slot flex-cross-center"
4619
+ };
4620
+ const _hoisted_2$3 = ["textContent"];
4621
+ var _sfc_main$4 = vue.defineComponent({
4622
+ __name: "action",
4623
+ props: {
4624
+ disabled: {
4625
+ type: Boolean
4626
+ },
4627
+ value: {},
4628
+ actions: {},
4629
+ mode: {},
4630
+ icon: {},
4631
+ popup: {},
4632
+ follow: {}
4633
+ },
4634
+ emits: ["trigger"],
4635
+ setup(__props, _ref) {
4636
+ let {
4637
+ emit: __emit
4638
+ } = _ref;
4639
+ const props = __props;
4640
+ const emits = __emit;
4641
+ const {
4642
+ follow
4643
+ } = usePopup();
4644
+ const {
4645
+ showScroll
4646
+ } = usePicker();
4647
+ const {
4648
+ onTouch
4649
+ } = snail_view.useObserver();
4650
+ const valueRef = vue.shallowRef(props.value);
4651
+ const rootDom = vue.useTemplateRef("snail-action");
4652
+ const popupScopeRef = vue.shallowRef(void 0);
4653
+ const slotHandle = Object.freeze({
4654
+ isActived: () => popupScopeRef.value != void 0,
4655
+ trigger: () => onShowActions(props.mode == "press")
4656
+ });
4657
+ function buildDefaultText() {
4658
+ if (snail_core.isArrayNotEmpty(props.actions) == true) {
4659
+ const item = props.actions.find(item2 => item2.code == valueRef.value) || props.actions[0];
4660
+ return item.name;
4661
+ }
4662
+ return void 0;
4663
+ }
4664
+ async function onShowActions(longPress) {
4665
+ if (popupScopeRef.value && popupScopeRef.value.destroyed != true) {
4666
+ popupScopeRef.value.destroy();
4667
+ popupScopeRef.value = void 0;
4668
+ }
4669
+ if (props.disabled != true) {
4670
+ switch (props.popup) {
4671
+ case "picker":
4672
+ {
4673
+ popupScopeRef.value = showScroll({
4674
+ value: valueRef.value,
4675
+ items: props.actions,
4676
+ clearDisabled: true
4677
+ });
4678
+ break;
4679
+ }
4680
+ default:
4681
+ {
4682
+ const followOptions = props.follow || Object.create(null);
4683
+ popupScopeRef.value = follow(rootDom.value, {
4684
+ component: _sfc_main$8,
4685
+ closeOnEscape: true,
4686
+ closeOnMask: true,
4687
+ closeOnResize: true,
4688
+ closeOnTarget: true,
4689
+ followX: followOptions.followX || ["center", "start", "end", "after", "before", "ratio"],
4690
+ followY: followOptions.followY || ["after", "before", "center", "end", "start", "ratio"],
4691
+ spaceX: followOptions.spaceX,
4692
+ spaceY: followOptions.spaceY,
4693
+ props: {
4694
+ mode: "vertical",
4695
+ actions: props.actions
4696
+ }
4697
+ });
4698
+ break;
4699
+ }
4700
+ }
4701
+ const code = await popupScopeRef.value;
4702
+ popupScopeRef.value = void 0;
4703
+ if (snail_core.isStringNotEmpty(code) == true) {
4704
+ valueRef.value = code;
4705
+ emits("trigger", code);
4706
+ }
4707
+ }
4708
+ }
4709
+ vue.onMounted(() => {
4710
+ onTouch(rootDom.value, {}, detail => {
4711
+ if (props.mode == "press" && detail.status == "end") {
4712
+ const time = detail.now.timestamp - detail.start.timestamp;
4713
+ if (time > 500) {
4714
+ navigator.vibrate && navigator.vibrate(200);
4715
+ onShowActions();
4716
+ }
4717
+ }
4718
+ });
4719
+ });
4720
+ return (_ctx, _cache) => {
4721
+ return vue.openBlock(), vue.createElementBlock("div", {
4722
+ class: vue.normalizeClass(["snail-action flex-cross-center", {
4723
+ button: __props.mode == "whole" && __props.disabled != true
4724
+ }]),
4725
+ ref: "snail-action",
4726
+ onClick: _cache[1] || (_cache[1] = $event => __props.mode == "whole" && onShowActions())
4727
+ }, [vue.createElementVNode("div", _hoisted_1$4, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))), () => [vue.createElementVNode("span", {
4728
+ class: "ellipsis",
4729
+ textContent: vue.toDisplayString(buildDefaultText())
4730
+ }, null, 8, _hoisted_2$3)])]), __props.disabled != true && __props.mode != "press" ? (vue.openBlock(), vue.createElementBlock("div", {
4731
+ key: 0,
4732
+ class: vue.normalizeClass(["trigger-slot", {
4733
+ "hover-show": __props.icon != "always"
4734
+ }])
4735
+ }, [vue.renderSlot(_ctx.$slots, "trigger", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))), () => [vue.createVNode(_sfc_main$F, {
4736
+ button: "",
4737
+ type: "more",
4738
+ size: 16,
4739
+ onClick: _cache[0] || (_cache[0] = $event => __props.mode != "whole" && onShowActions())
4740
+ })])], 2)) : vue.createCommentVNode("", true)], 2);
4741
+ };
4742
+ }
4743
+ });
4744
+
4745
+ const _hoisted_1$3 = {
4746
+ class: "snail-flash-number"
4747
+ };
4748
+ const _hoisted_2$2 = ["textContent"];
4749
+ var _sfc_main$3 = vue.defineComponent({
4750
+ __name: "flash-number",
4751
+ props: {
4752
+ value: {}
4753
+ },
4754
+ setup(__props) {
4755
+ const props = __props;
4756
+ const itemsRef = vue.ref();
4757
+ function buildNumberItems() {
4758
+ itemsRef.value = [];
4759
+ const value = snail_core.isNullish(props.value) ? null : String(props.value);
4760
+ if (snail_core.isStringNotEmpty(value) == true) {
4761
+ for (const item of value) {
4762
+ const number = parseInt(item);
4763
+ const isNumber = 0 <= number && number <= 9;
4764
+ itemsRef.value.push({
4765
+ id: snail_core.newId(),
4766
+ text: item,
4767
+ number: isNumber ? number : void 0
4768
+ });
4769
+ }
4770
+ }
4771
+ if (snail_core.isArrayNotEmpty(itemsRef.value) == true) ;
4772
+ }
4773
+ vue.onMounted(() => {
4774
+ buildNumberItems();
4775
+ });
4776
+ return (_ctx, _cache) => {
4777
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
4778
+ return vue.openBlock(), vue.createElementBlock("span", {
4779
+ key: item.id,
4780
+ textContent: vue.toDisplayString(item.text),
4781
+ class: vue.normalizeClass(vue.unref(snail_core.isNullish)(item.number) ? "" : "number-item")
4782
+ }, null, 10, _hoisted_2$2);
4783
+ }), 128)), _cache[0] || (_cache[0] = vue.createElementVNode("span", {
4784
+ style: {
4785
+ "color": "red"
4786
+ }
4787
+ }, "-----还没实现,别用", -1))]);
4788
+ };
4789
+ }
4790
+ });
4791
+
4640
4792
  const _hoisted_1$2 = ["title"];
4641
4793
  const _hoisted_2$1 = ["textContent"];
4642
4794
  var _sfc_main$2 = vue.defineComponent({
@@ -4715,7 +4867,7 @@
4715
4867
  "flex-1": __props.mode != "simple"
4716
4868
  }]),
4717
4869
  textContent: vue.toDisplayString(valueRef.value)
4718
- }, null, 10, _hoisted_2$1)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4870
+ }, null, 10, _hoisted_2$1)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4719
4871
  key: 1,
4720
4872
  type: "datepicker",
4721
4873
  button: "",
@@ -4803,7 +4955,7 @@
4803
4955
  "flex-1": __props.mode != "simple"
4804
4956
  }]),
4805
4957
  textContent: vue.toDisplayString(valueRef.value)
4806
- }, null, 10, _hoisted_2)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4958
+ }, null, 10, _hoisted_2)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4807
4959
  key: 1,
4808
4960
  type: "timepicker",
4809
4961
  button: "",
@@ -4899,12 +5051,12 @@
4899
5051
  onTouchstart: onStartDrag,
4900
5052
  onTouchmove: onDragMove,
4901
5053
  onTouchend: onDragEnd
4902
- }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
5054
+ }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4903
5055
  key: 0,
4904
5056
  type: "success",
4905
5057
  size: 20,
4906
5058
  color: "white"
4907
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$E, {
5059
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4908
5060
  key: 1,
4909
5061
  custom: "",
4910
5062
  size: 20,
@@ -4923,37 +5075,38 @@
4923
5075
  });
4924
5076
 
4925
5077
  const components = {
4926
- Action: _sfc_main$g,
4927
- Button: _sfc_main$F,
4928
- Choose: _sfc_main$D,
4929
- Footer: _sfc_main$C,
4930
- Header: _sfc_main$B,
4931
- Icon: _sfc_main$E,
4932
- Input: _sfc_main$A,
4933
- Number: _sfc_main$z,
4934
- Search: _sfc_main$y,
4935
- Select: _sfc_main$k,
4936
- Switch: _sfc_main$j,
4937
- Textarea: _sfc_main$i,
4938
- Dynamic: _sfc_main$u,
4939
- Elastic: _sfc_main$f,
4940
- Flex: _sfc_main$e,
4941
- Fold: _sfc_main$d,
4942
- Motion: _sfc_main$w,
4943
- Layout: _sfc_main$c,
4944
- Scroll: _sfc_main$t,
4945
- Sort: _sfc_main$b,
4946
- Table: _sfc_main$a,
4947
- TableRow: _sfc_main$9,
4948
- TableCol: _sfc_main$8,
4949
- Tree: _sfc_main$6,
4950
- Wrapper: _sfc_main$s,
4951
- FlashNumber: _sfc_main$5,
5078
+ Button: _sfc_main$G,
5079
+ Choose: _sfc_main$E,
5080
+ Footer: _sfc_main$D,
5081
+ Header: _sfc_main$C,
5082
+ Icon: _sfc_main$F,
5083
+ Input: _sfc_main$B,
5084
+ Number: _sfc_main$A,
5085
+ Search: _sfc_main$z,
5086
+ Select: _sfc_main$l,
5087
+ Switch: _sfc_main$k,
5088
+ Textarea: _sfc_main$j,
5089
+ Dynamic: _sfc_main$v,
5090
+ Elastic: _sfc_main$i,
5091
+ Flex: _sfc_main$h,
5092
+ Fold: _sfc_main$g,
5093
+ Motion: _sfc_main$x,
5094
+ Layout: _sfc_main$f,
5095
+ Scroll: _sfc_main$u,
5096
+ Sort: _sfc_main$e,
5097
+ Table: _sfc_main$d,
5098
+ TableRow: _sfc_main$c,
5099
+ TableCol: _sfc_main$b,
5100
+ Tree: _sfc_main$9,
5101
+ Wrapper: _sfc_main$t,
5102
+ Action: _sfc_main$4,
5103
+ FlashNumber: _sfc_main$3,
4952
5104
  DatePicker: _sfc_main$2,
5105
+ ScrollPicker: _sfc_main$5,
4953
5106
  TimePicker: _sfc_main$1,
4954
5107
  DragVerify: _sfc_main,
4955
- Empty: _sfc_main$n,
4956
- Loading: _sfc_main$v
5108
+ Empty: _sfc_main$o,
5109
+ Loading: _sfc_main$w
4957
5110
  };
4958
5111
 
4959
5112
  snail_core.onMountScope(scope => {