snail.vue 2.0.19 → 2.0.21

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$n = ["title"];
9
- var _sfc_main$D = vue.defineComponent({
8
+ const _hoisted_1$o = ["title"];
9
+ var _sfc_main$F = vue.defineComponent({
10
10
  ...{
11
11
  name: "Button",
12
12
  inheritAttrs: true
@@ -22,7 +22,7 @@
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$n);
25
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
26
26
  };
27
27
  }
28
28
  });
@@ -65,10 +65,10 @@
65
65
  }
66
66
  }
67
67
 
68
- const _hoisted_1$m = ["viewBox"];
69
- const _hoisted_2$d = ["textContent"];
68
+ const _hoisted_1$n = ["viewBox"];
69
+ const _hoisted_2$f = ["textContent"];
70
70
  const _hoisted_3$a = ["d"];
71
- var _sfc_main$C = vue.defineComponent({
71
+ var _sfc_main$E = vue.defineComponent({
72
72
  __name: "icon",
73
73
  props: {
74
74
  title: {},
@@ -123,7 +123,7 @@
123
123
  onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
124
124
  }), [vue.createElementVNode("title", {
125
125
  textContent: vue.toDisplayString(__props.title || "")
126
- }, null, 8, _hoisted_2$d), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
126
+ }, null, 8, _hoisted_2$f), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
127
127
  key: 0
128
128
  }) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
129
129
  key: 1
@@ -131,16 +131,16 @@
131
131
  return vue.openBlock(), vue.createElementBlock("path", {
132
132
  d
133
133
  }, null, 8, _hoisted_3$a);
134
- }), 256))], 16, _hoisted_1$m);
134
+ }), 256))], 16, _hoisted_1$n);
135
135
  };
136
136
  }
137
137
  });
138
138
 
139
- const _hoisted_1$l = ["title", "onClick"];
140
- const _hoisted_2$c = ["type", "checked"];
139
+ const _hoisted_1$m = ["title", "onClick"];
140
+ const _hoisted_2$e = ["type", "checked"];
141
141
  const _hoisted_3$9 = ["textContent"];
142
142
  const _hoisted_4$7 = ["textContent"];
143
- var _sfc_main$B = vue.defineComponent({
143
+ var _sfc_main$D = vue.defineComponent({
144
144
  ...{
145
145
  name: "Choose",
146
146
  inheritAttrs: true
@@ -216,10 +216,10 @@
216
216
  key: 0,
217
217
  type: vue.unref(type),
218
218
  checked: node.selected
219
- }, null, 8, _hoisted_2$c)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
219
+ }, null, 8, _hoisted_2$e)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
220
220
  key: 1,
221
221
  class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
222
- }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
222
+ }, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
223
223
  key: 0,
224
224
  type: "success",
225
225
  size: 12,
@@ -232,13 +232,17 @@
232
232
  key: 3,
233
233
  class: "item-des",
234
234
  textContent: vue.toDisplayString(node.item.description)
235
- }, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$l);
235
+ }, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$m);
236
236
  }), 128))], 2);
237
237
  };
238
238
  }
239
239
  });
240
240
 
241
- var _sfc_main$A = vue.defineComponent({
241
+ var addLink = href => setTimeout(snail_view.link.register, 0, href);
242
+
243
+ addLink("/styles/snail.vue.vue.css");
244
+
245
+ var _sfc_main$C = vue.defineComponent({
242
246
  ...{
243
247
  name: "Footer",
244
248
  inheritAttrs: true
@@ -269,13 +273,13 @@
269
273
  class: vue.normalizeClass(["snail-footer", {
270
274
  "start-divider": __props.divider
271
275
  }, __props.align || "right"])
272
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
276
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
273
277
  key: 0,
274
278
  size: "max",
275
279
  type: "default",
276
280
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
277
281
  textContent: vue.toDisplayString(__props.cancelName || "取消")
278
- }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
282
+ }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
279
283
  key: 1,
280
284
  size: "max",
281
285
  type: "primary",
@@ -286,12 +290,8 @@
286
290
  }
287
291
  });
288
292
 
289
- var addLink = href => setTimeout(snail_view.link.register, 0, href);
290
-
291
- addLink("/styles/snail.vue.vue.css");
292
-
293
- const _hoisted_1$k = ["textContent"];
294
- var _sfc_main$z = vue.defineComponent({
293
+ const _hoisted_1$l = ["textContent"];
294
+ var _sfc_main$B = vue.defineComponent({
295
295
  ...{
296
296
  name: "Header",
297
297
  inheritAttrs: true
@@ -330,7 +330,7 @@
330
330
  key: 0,
331
331
  textContent: vue.toDisplayString(__props.title),
332
332
  class: vue.normalizeClass(["header-title", __props.titleAlign])
333
- }, null, 10, _hoisted_1$k)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
333
+ }, null, 10, _hoisted_1$l)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
334
334
  key: 1,
335
335
  class: "close-icon",
336
336
  type: "close",
@@ -343,8 +343,8 @@
343
343
  }
344
344
  });
345
345
 
346
- const _hoisted_1$j = ["textContent"];
347
- const _hoisted_2$b = {
346
+ const _hoisted_1$k = ["textContent"];
347
+ const _hoisted_2$d = {
348
348
  key: 0,
349
349
  class: "required",
350
350
  textContent: "*"
@@ -354,7 +354,7 @@
354
354
  };
355
355
  const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
356
356
  const _hoisted_5$4 = ["title"];
357
- var _sfc_main$y = vue.defineComponent({
357
+ var _sfc_main$A = vue.defineComponent({
358
358
  ...{
359
359
  name: "Input",
360
360
  inheritAttrs: true
@@ -406,7 +406,7 @@
406
406
  }, [vue.createElementVNode("span", {
407
407
  class: "text",
408
408
  textContent: vue.toDisplayString(__props.title)
409
- }, null, 8, _hoisted_1$j), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$b)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
409
+ }, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$d)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
410
410
  ref: "input-el",
411
411
  type: __props.type || "text",
412
412
  value: inputModel.value,
@@ -419,7 +419,7 @@
419
419
  key: 0,
420
420
  class: "validate",
421
421
  title: validateRef.value
422
- }, [vue.createVNode(_sfc_main$C, {
422
+ }, [vue.createVNode(_sfc_main$E, {
423
423
  type: "error",
424
424
  button: "",
425
425
  size: 16,
@@ -629,11 +629,11 @@
629
629
  return formatter;
630
630
  }
631
631
 
632
- const _hoisted_1$i = {
632
+ const _hoisted_1$j = {
633
633
  key: 0,
634
634
  class: "number-prefix"
635
635
  };
636
- const _hoisted_2$a = ["textContent"];
636
+ const _hoisted_2$c = ["textContent"];
637
637
  const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
638
638
  const _hoisted_4$5 = {
639
639
  key: 1,
@@ -642,7 +642,7 @@
642
642
  const _hoisted_5$3 = ["textContent"];
643
643
  const _hoisted_6$2 = ["title", "textContent"];
644
644
  const _hoisted_7$1 = ["title", "textContent"];
645
- var _sfc_main$x = vue.defineComponent({
645
+ var _sfc_main$z = vue.defineComponent({
646
646
  __name: "number",
647
647
  props: vue.mergeModels({
648
648
  placeholder: {},
@@ -789,10 +789,10 @@
789
789
  "has-prefix": vue.unref(hasPrefix),
790
790
  "has-suffix": vue.unref(hasSuffix)
791
791
  }])
792
- }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [vue.createElementVNode("span", {
792
+ }, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [vue.createElementVNode("span", {
793
793
  class: "ellipsis",
794
794
  textContent: vue.toDisplayString(vue.unref(prefix))
795
- }, null, 8, _hoisted_2$a)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
795
+ }, null, 8, _hoisted_2$c)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
796
796
  class: vue.normalizeClass(["input-panel", vue.unref(controls)])
797
797
  }, [vue.withDirectives(vue.createElementVNode("input", {
798
798
  type: "text",
@@ -809,14 +809,14 @@
809
809
  }, [vue.createElementVNode("div", {
810
810
  class: "controls default subtract",
811
811
  onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
812
- }, [vue.createVNode(_sfc_main$C, {
812
+ }, [vue.createVNode(_sfc_main$E, {
813
813
  type: "subtract",
814
814
  button: "",
815
815
  size: 20
816
816
  })]), vue.createElementVNode("div", {
817
817
  class: "controls default plus",
818
818
  onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
819
- }, [vue.createVNode(_sfc_main$C, {
819
+ }, [vue.createVNode(_sfc_main$E, {
820
820
  type: "plus",
821
821
  button: "",
822
822
  size: 20
@@ -825,7 +825,7 @@
825
825
  }, [vue.createElementVNode("div", {
826
826
  class: "controls right plus",
827
827
  onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
828
- }, [vue.createVNode(_sfc_main$C, {
828
+ }, [vue.createVNode(_sfc_main$E, {
829
829
  type: "arrow",
830
830
  button: "",
831
831
  size: 20,
@@ -833,7 +833,7 @@
833
833
  })]), vue.createElementVNode("div", {
834
834
  class: "controls right subtract",
835
835
  onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
836
- }, [vue.createVNode(_sfc_main$C, {
836
+ }, [vue.createVNode(_sfc_main$E, {
837
837
  type: "arrow",
838
838
  button: "",
839
839
  size: 20,
@@ -856,8 +856,8 @@
856
856
  }
857
857
  });
858
858
 
859
- const _hoisted_1$h = ["placeholder", "readonly"];
860
- var _sfc_main$w = vue.defineComponent({
859
+ const _hoisted_1$i = ["placeholder", "readonly"];
860
+ var _sfc_main$y = vue.defineComponent({
861
861
  ...{
862
862
  name: "Search",
863
863
  inheritAttrs: true
@@ -902,9 +902,9 @@
902
902
  readonly: __props.readonly,
903
903
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
904
904
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
905
- }, null, 40, _hoisted_1$h), [[vue.vModelText, textModel.value, void 0, {
905
+ }, null, 40, _hoisted_1$i), [[vue.vModelText, textModel.value, void 0, {
906
906
  trim: true
907
- }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$C, {
907
+ }]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$E, {
908
908
  class: "search-button",
909
909
  custom: "",
910
910
  button: "",
@@ -1129,11 +1129,11 @@
1129
1129
  }
1130
1130
  }
1131
1131
 
1132
- const _hoisted_1$g = {
1132
+ const _hoisted_1$h = {
1133
1133
  class: "snail-confirm flex-column"
1134
1134
  };
1135
- const _hoisted_2$9 = ["innerHTML"];
1136
- var _sfc_main$v = vue.defineComponent({
1135
+ const _hoisted_2$b = ["innerHTML"];
1136
+ var _sfc_main$x = vue.defineComponent({
1137
1137
  ...{
1138
1138
  name: "ConfirmContainer",
1139
1139
  inheritAttrs: true
@@ -1161,14 +1161,14 @@
1161
1161
  },
1162
1162
  setup(__props) {
1163
1163
  return (_ctx, _cache) => {
1164
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createVNode(_sfc_main$z, {
1164
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [vue.createVNode(_sfc_main$B, {
1165
1165
  "use-to": "dialog",
1166
1166
  title: __props.title || "提示",
1167
1167
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1168
1168
  }, null, 8, ["title"]), vue.createElementVNode("div", {
1169
1169
  class: "confirm-body",
1170
1170
  innerHTML: __props.message || "请确认?"
1171
- }, null, 8, _hoisted_2$9), vue.createVNode(_sfc_main$A, {
1171
+ }, null, 8, _hoisted_2$b), vue.createVNode(_sfc_main$C, {
1172
1172
  align: "right",
1173
1173
  "cancel-name": __props.cancelName,
1174
1174
  "cancel-disabled": __props.cancelDisabled,
@@ -1229,7 +1229,7 @@
1229
1229
  });
1230
1230
  for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
1231
1231
 
1232
- var _sfc_main$u = vue.defineComponent({
1232
+ var _sfc_main$w = vue.defineComponent({
1233
1233
  __name: "motion",
1234
1234
  props: {
1235
1235
  multiple: {
@@ -1278,7 +1278,7 @@
1278
1278
  }
1279
1279
  });
1280
1280
 
1281
- var _sfc_main$t = vue.defineComponent({
1281
+ var _sfc_main$v = vue.defineComponent({
1282
1282
  ...{
1283
1283
  name: "Loading",
1284
1284
  inheritAttrs: true
@@ -1302,7 +1302,7 @@
1302
1302
  },
1303
1303
  setup(__props) {
1304
1304
  return (_ctx, _cache) => {
1305
- return vue.openBlock(), vue.createBlock(_sfc_main$u, {
1305
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
1306
1306
  effect: vue.unref(MOTION).fade
1307
1307
  }, {
1308
1308
  default: vue.withCtx(() => [__props.show ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -1317,7 +1317,7 @@
1317
1317
  }
1318
1318
  });
1319
1319
 
1320
- var _sfc_main$s = vue.defineComponent({
1320
+ var _sfc_main$u = vue.defineComponent({
1321
1321
  ...{
1322
1322
  name: "Dynamic",
1323
1323
  inheritAttrs: false
@@ -1341,7 +1341,7 @@
1341
1341
  const loadingComponent = vue.defineComponent({
1342
1342
  inheritAttrs: false,
1343
1343
  components: {
1344
- Loading: _sfc_main$t
1344
+ Loading: _sfc_main$v
1345
1345
  },
1346
1346
  template: "<Loading :mask-disabled='true' />"
1347
1347
  });
@@ -1408,7 +1408,7 @@
1408
1408
  }
1409
1409
  });
1410
1410
 
1411
- var _sfc_main$r = vue.defineComponent({
1411
+ var _sfc_main$t = vue.defineComponent({
1412
1412
  ...{
1413
1413
  name: "DialogContainer",
1414
1414
  inheritAttrs: true
@@ -1453,7 +1453,7 @@
1453
1453
  onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
1454
1454
  __props.options.closeOnMask && vue.unref(closePopup)();
1455
1455
  }, ["self"]))
1456
- }, [vue.createVNode(_sfc_main$s, vue.mergeProps({
1456
+ }, [vue.createVNode(_sfc_main$u, vue.mergeProps({
1457
1457
  class: "dialog-body",
1458
1458
  name: __props.options.name,
1459
1459
  component: __props.options.component,
@@ -1468,7 +1468,7 @@
1468
1468
  }
1469
1469
  });
1470
1470
 
1471
- var _sfc_main$q = vue.defineComponent({
1471
+ var _sfc_main$s = vue.defineComponent({
1472
1472
  ...{
1473
1473
  name: "FollowContainer",
1474
1474
  inheritAttrs: true
@@ -1589,7 +1589,7 @@
1589
1589
  });
1590
1590
  });
1591
1591
  return (_ctx, _cache) => {
1592
- return vue.openBlock(), vue.createBlock(_sfc_main$s, vue.mergeProps({
1592
+ return vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
1593
1593
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1594
1594
  style: {
1595
1595
  "z-index": __props.zIndex
@@ -1606,7 +1606,7 @@
1606
1606
  }
1607
1607
  });
1608
1608
 
1609
- var _sfc_main$p = vue.defineComponent({
1609
+ var _sfc_main$r = vue.defineComponent({
1610
1610
  ...{
1611
1611
  name: "PopupContainer",
1612
1612
  inheritAttrs: true
@@ -1626,7 +1626,7 @@
1626
1626
  model = vue.shallowRef(void 0)
1627
1627
  } = __props.options;
1628
1628
  return (_ctx, _cache) => {
1629
- return vue.openBlock(), vue.createBlock(_sfc_main$s, vue.mergeProps({
1629
+ return vue.openBlock(), vue.createBlock(_sfc_main$u, vue.mergeProps({
1630
1630
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1631
1631
  style: {
1632
1632
  "z-index": __props.zIndex
@@ -1644,12 +1644,12 @@
1644
1644
  }
1645
1645
  });
1646
1646
 
1647
- const _hoisted_1$f = {
1647
+ const _hoisted_1$g = {
1648
1648
  key: 1,
1649
1649
  class: "icon"
1650
1650
  };
1651
- const _hoisted_2$8 = ["innerHTML"];
1652
- var _sfc_main$o = vue.defineComponent({
1651
+ const _hoisted_2$a = ["innerHTML"];
1652
+ var _sfc_main$q = vue.defineComponent({
1653
1653
  ...{
1654
1654
  name: "ToastContainer",
1655
1655
  inheritAttrs: true
@@ -1686,7 +1686,7 @@
1686
1686
  }),
1687
1687
  onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
1688
1688
  onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
1689
- }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
1689
+ }, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
1690
1690
  key: 0,
1691
1691
  class: "close-icon",
1692
1692
  type: "close",
@@ -1697,21 +1697,21 @@
1697
1697
  onClick: _cache[0] || (_cache[0] = $event => {
1698
1698
  vue.unref(closePopup)();
1699
1699
  })
1700
- })) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [vue.createVNode(_sfc_main$C, {
1700
+ })) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createVNode(_sfc_main$E, {
1701
1701
  type: vue.unref(props).type,
1702
1702
  color: "#707070",
1703
1703
  size: 20
1704
1704
  }, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
1705
1705
  class: "message",
1706
1706
  innerHTML: vue.unref(props).message
1707
- }, null, 8, _hoisted_2$8)], 38);
1707
+ }, null, 8, _hoisted_2$a)], 38);
1708
1708
  };
1709
1709
  }
1710
1710
  });
1711
1711
 
1712
1712
  function usePopup() {
1713
1713
  function popup(options) {
1714
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$p, options);
1714
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$r, options);
1715
1715
  return addScope2Scopes(scope);
1716
1716
  }
1717
1717
  function dialog(options) {
@@ -1744,7 +1744,7 @@
1744
1744
  },
1745
1745
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1746
1746
  });
1747
- const descriptor = openPopup(_sfc_main$r, options, extOptions);
1747
+ const descriptor = openPopup(_sfc_main$t, options, extOptions);
1748
1748
  scope = snail_core.useAsyncScope(deferred.promise);
1749
1749
  monitorDialog(descriptor, scope, deferred);
1750
1750
  }
@@ -1752,7 +1752,7 @@
1752
1752
  }
1753
1753
  function follow(target, options) {
1754
1754
  var scope = void 0;
1755
- if (target instanceof HTMLElement == false) {
1755
+ if (target instanceof Element == false) {
1756
1756
  const deferred = snail_core.defer();
1757
1757
  deferred.reject("follow: target must be an HTMLElement.");
1758
1758
  scope = snail_core.useAsyncScope(deferred.promise);
@@ -1762,14 +1762,14 @@
1762
1762
  inPopup: "follow",
1763
1763
  target
1764
1764
  };
1765
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$q, options, extOptions);
1765
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$s, options, extOptions);
1766
1766
  }
1767
1767
  return addScope2Scopes(scope);
1768
1768
  }
1769
1769
  function confirm(title, message, options) {
1770
1770
  options = options || Object.create(null);
1771
1771
  return dialog({
1772
- component: _sfc_main$v,
1772
+ component: _sfc_main$x,
1773
1773
  closeOnEscape: true,
1774
1774
  props: {
1775
1775
  ...options,
@@ -1779,7 +1779,7 @@
1779
1779
  });
1780
1780
  }
1781
1781
  function toast(type, message, options) {
1782
- return popupInCustomContainer(_sfc_main$o, {
1782
+ return popupInCustomContainer(_sfc_main$q, {
1783
1783
  url: "#ToastContainer",
1784
1784
  props: {
1785
1785
  ...(options || Object.create(null)),
@@ -1812,7 +1812,7 @@
1812
1812
  },
1813
1813
  ...extOptions
1814
1814
  });
1815
- const descriptor = openPopup(container || _sfc_main$p, options, extOptions);
1815
+ const descriptor = openPopup(container || _sfc_main$r, options, extOptions);
1816
1816
  const scope = snail_core.useAsyncScope(deferred.promise);
1817
1817
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
1818
1818
  return scope;
@@ -1947,12 +1947,12 @@
1947
1947
  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==";
1948
1948
  }
1949
1949
 
1950
- const _hoisted_1$e = {
1950
+ const _hoisted_1$f = {
1951
1951
  class: "snail-empty"
1952
1952
  };
1953
- const _hoisted_2$7 = ["src"];
1953
+ const _hoisted_2$9 = ["src"];
1954
1954
  const _hoisted_3$6 = ["textContent"];
1955
- var _sfc_main$n = vue.defineComponent({
1955
+ var _sfc_main$p = vue.defineComponent({
1956
1956
  ...{
1957
1957
  name: "Empty",
1958
1958
  inheritAttrs: true
@@ -1965,9 +1965,9 @@
1965
1965
  setup(__props) {
1966
1966
  const defaultImageBase64 = getNoDataBase64Image();
1967
1967
  return (_ctx, _cache) => {
1968
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createElementVNode("img", {
1968
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [vue.createElementVNode("img", {
1969
1969
  src: __props.imageUrl || vue.unref(defaultImageBase64)
1970
- }, null, 8, _hoisted_2$7), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
1970
+ }, null, 8, _hoisted_2$9), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
1971
1971
  class: "message",
1972
1972
  textContent: vue.toDisplayString(__props.message || "无数据")
1973
1973
  }, null, 8, _hoisted_3$6)])]);
@@ -1975,13 +1975,13 @@
1975
1975
  }
1976
1976
  });
1977
1977
 
1978
- const _hoisted_1$d = ["title"];
1979
- const _hoisted_2$6 = ["textContent"];
1978
+ const _hoisted_1$e = ["title"];
1979
+ const _hoisted_2$8 = ["textContent"];
1980
1980
  const _hoisted_3$5 = {
1981
1981
  key: 1,
1982
1982
  class: "select-status"
1983
1983
  };
1984
- var _sfc_main$m = vue.defineComponent({
1984
+ var _sfc_main$o = vue.defineComponent({
1985
1985
  ...{
1986
1986
  name: "SelectNode",
1987
1987
  inheritAttrs: true
@@ -2026,15 +2026,15 @@
2026
2026
  }, [vue.createElementVNode("div", {
2027
2027
  class: "item-text ellipsis",
2028
2028
  textContent: vue.toDisplayString(__props.item.text)
2029
- }, null, 8, _hoisted_2$6), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
2029
+ }, null, 8, _hoisted_2$8), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
2030
2030
  key: 0,
2031
2031
  type: "arrow"
2032
- })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$C, {
2032
+ })) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$E, {
2033
2033
  type: "success",
2034
2034
  button: "",
2035
2035
  size: 12,
2036
2036
  color: "white"
2037
- })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$d)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2037
+ })])) : vue.createCommentVNode("", true)], 42, _hoisted_1$e)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
2038
2038
  key: 1
2039
2039
  }, vue.renderList(vue.unref(showChildrenRef), child => {
2040
2040
  return vue.openBlock(), vue.createBlock(_component_SelectNode, {
@@ -2051,7 +2051,7 @@
2051
2051
  }
2052
2052
  });
2053
2053
 
2054
- var _sfc_main$l = vue.defineComponent({
2054
+ var _sfc_main$n = vue.defineComponent({
2055
2055
  ...{
2056
2056
  name: "Select2Popup",
2057
2057
  inheritAttrs: true
@@ -2223,13 +2223,13 @@
2223
2223
  key: 0
2224
2224
  }, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2225
2225
  key: 1
2226
- }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$w, vue.mergeProps({
2226
+ }, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$y, vue.mergeProps({
2227
2227
  key: 0
2228
2228
  }, __props.search, {
2229
2229
  onSearch,
2230
2230
  key: "select-search"
2231
2231
  }), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
2232
- return vue.openBlock(), vue.createBlock(_sfc_main$m, {
2232
+ return vue.openBlock(), vue.createBlock(_sfc_main$o, {
2233
2233
  key: vue.unref(context).getKey(item),
2234
2234
  multiple: __props.multiple,
2235
2235
  item,
@@ -2238,7 +2238,7 @@
2238
2238
  onEnter: onEnterSelectNode,
2239
2239
  onClick: onClickSelectNode
2240
2240
  }, null, 8, ["multiple", "item", "context"]);
2241
- }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$n, {
2241
+ }), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$p, {
2242
2242
  key: 1,
2243
2243
  message: "无结果"
2244
2244
  })) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2250,20 +2250,20 @@
2250
2250
  }
2251
2251
  });
2252
2252
 
2253
- const _hoisted_1$c = {
2253
+ const _hoisted_1$d = {
2254
2254
  key: 0,
2255
2255
  class: "select-result"
2256
2256
  };
2257
- const _hoisted_2$5 = ["title", "textContent"];
2257
+ const _hoisted_2$7 = ["title", "textContent"];
2258
2258
  const _hoisted_3$4 = ["textContent"];
2259
2259
  const _hoisted_4$4 = {
2260
2260
  key: 1,
2261
2261
  class: "placeholder"
2262
2262
  };
2263
2263
  onAppCreated((app, type) => {
2264
- type == "popup" && app.component("SelectPopup", _sfc_main$l);
2264
+ type == "popup" && app.component("SelectPopup", _sfc_main$n);
2265
2265
  });
2266
- var _sfc_main$k = vue.defineComponent({
2266
+ var _sfc_main$m = vue.defineComponent({
2267
2267
  ...{
2268
2268
  name: "Select",
2269
2269
  inheritAttrs: true
@@ -2395,15 +2395,15 @@
2395
2395
  ref: "select"
2396
2396
  }, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2397
2397
  key: 0
2398
- }, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
2398
+ }, [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", {
2399
2399
  class: "select-text ellipsis",
2400
2400
  title: selectedTextRef.value,
2401
2401
  textContent: vue.toDisplayString(selectedTextRef.value)
2402
- }, null, 8, _hoisted_2$5)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2402
+ }, null, 8, _hoisted_2$7)])])) : (vue.openBlock(), vue.createElementBlock("div", {
2403
2403
  key: 1,
2404
2404
  class: "placeholder",
2405
2405
  textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2406
- }, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
2406
+ }, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
2407
2407
  key: 2,
2408
2408
  type: "arrow",
2409
2409
  button: "",
@@ -2414,7 +2414,7 @@
2414
2414
  }
2415
2415
  });
2416
2416
 
2417
- var _sfc_main$j = vue.defineComponent({
2417
+ var _sfc_main$l = vue.defineComponent({
2418
2418
  ...{
2419
2419
  name: "Switch",
2420
2420
  inheritAttrs: true
@@ -2463,8 +2463,8 @@
2463
2463
  }
2464
2464
  });
2465
2465
 
2466
- const _hoisted_1$b = ["readonly", "placeholder", "rows"];
2467
- var _sfc_main$i = vue.defineComponent({
2466
+ const _hoisted_1$c = ["readonly", "placeholder", "rows"];
2467
+ var _sfc_main$k = vue.defineComponent({
2468
2468
  ...{
2469
2469
  name: "Textarea",
2470
2470
  inheritAttrs: true
@@ -2524,28 +2524,229 @@
2524
2524
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2525
2525
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2526
2526
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2527
- }, null, 40, _hoisted_1$b)), [[vue.vModelText, valueModel.value]]);
2527
+ }, null, 40, _hoisted_1$c)), [[vue.vModelText, valueModel.value]]);
2528
2528
  };
2529
2529
  }
2530
2530
  });
2531
2531
 
2532
- function isLeft(root) {
2533
- return root.scrollLeft == 0;
2534
- }
2535
- function isRight(root) {
2536
- return Math.abs(root.scrollWidth - root.clientWidth - root.scrollLeft) < 1;
2537
- }
2538
- function isTop(root) {
2539
- return root.scrollTop == 0;
2540
- }
2541
- function isBottom(root) {
2542
- return Math.abs(root.scrollHeight - root.clientHeight - root.scrollTop) < 1;
2543
- }
2532
+ const _hoisted_1$b = ["onClick"];
2533
+ const _hoisted_2$6 = ["textContent"];
2534
+ var _sfc_main$j = vue.defineComponent({
2535
+ __name: "action-items",
2536
+ props: {
2537
+ mode: {},
2538
+ actions: {},
2539
+ inPopup: {},
2540
+ closePopup: {
2541
+ type: Function
2542
+ },
2543
+ popupStatus: {},
2544
+ target: {},
2545
+ followX: {},
2546
+ followY: {},
2547
+ pinned: {}
2548
+ },
2549
+ emits: ["trigger"],
2550
+ setup(__props, _ref) {
2551
+ let {
2552
+ emit: __emit
2553
+ } = _ref;
2554
+ const props = __props;
2555
+ const emits = __emit;
2556
+ function onActionItemClick(code) {
2557
+ emits("trigger", code);
2558
+ props.inPopup && props.closePopup(code);
2559
+ }
2560
+ return (_ctx, _cache) => {
2561
+ return vue.openBlock(), vue.createElementBlock("div", {
2562
+ class: vue.normalizeClass(["snail-action-items", [vue.unref(snail_core.correctString)(__props.mode, "vertical", true), vue.unref(snail_core.isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
2563
+ }, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, action => {
2564
+ return vue.openBlock(), vue.createElementBlock("div", {
2565
+ class: "action-item flex-cross-center",
2566
+ key: action.code,
2567
+ style: vue.normalizeStyle({
2568
+ "--color": vue.unref(snail_core.correctString)(action.color, null, true),
2569
+ "--hcolor": vue.unref(snail_core.correctString)(action.hoverColor, null, true)
2570
+ }),
2571
+ onClick: $event => onActionItemClick(action.code)
2572
+ }, [action.icon != void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$E, vue.mergeProps({
2573
+ key: 0,
2574
+ ref_for: true
2575
+ }, action.icon, {
2576
+ custom: false,
2577
+ size: 20
2578
+ }), null, 16)) : vue.createCommentVNode("", true), vue.createElementVNode("span", {
2579
+ class: "ellipsis",
2580
+ textContent: vue.toDisplayString(action.name)
2581
+ }, null, 8, _hoisted_2$6)], 12, _hoisted_1$b);
2582
+ }), 128))], 2);
2583
+ };
2584
+ }
2585
+ });
2544
2586
 
2545
2587
  const _hoisted_1$a = {
2546
- class: "snail-elastic"
2588
+ class: "snail-action flex-cross-center",
2589
+ ref: "snail-action"
2547
2590
  };
2591
+ const _hoisted_2$5 = ["title"];
2592
+ var _sfc_main$i = vue.defineComponent({
2593
+ __name: "action",
2594
+ props: {
2595
+ trigger: {},
2596
+ actions: {}
2597
+ },
2598
+ emits: ["trigger"],
2599
+ setup(__props, _ref) {
2600
+ let {
2601
+ emit: __emit
2602
+ } = _ref;
2603
+ const props = __props;
2604
+ const emits = __emit;
2605
+ const {
2606
+ follow
2607
+ } = usePopup();
2608
+ const {
2609
+ onEvent
2610
+ } = snail_view.useObserver();
2611
+ const rootDom = vue.useTemplateRef("snail-action");
2612
+ let popupScope = void 0;
2613
+ let pressStartDate = void 0;
2614
+ async function onFollowShow(longPress) {
2615
+ if (popupScope && popupScope.destroyed != true) {
2616
+ popupScope.destroy();
2617
+ return;
2618
+ }
2619
+ popupScope = follow(rootDom.value, {
2620
+ component: _sfc_main$j,
2621
+ closeOnEscape: true,
2622
+ closeOnMask: true,
2623
+ closeOnResize: true,
2624
+ closeOnTarget: true,
2625
+ followX: longPress ? ["center", "start", "end"] : ["after", "end", "start", "end", "center"],
2626
+ followY: longPress ? ["center", "after", "before"] : ["after", "before", "center", "end", "after"],
2627
+ props: {
2628
+ mode: "vertical",
2629
+ actions: props.actions
2630
+ }
2631
+ });
2632
+ const code = await popupScope;
2633
+ snail_core.isStringNotEmpty(code) && emits("trigger", code);
2634
+ }
2635
+ function onMouseDown() {
2636
+ if (props.trigger == "long-press" && pressStartDate == void 0) {
2637
+ pressStartDate = new Date();
2638
+ }
2639
+ }
2640
+ function onMouseUp() {
2641
+ if (pressStartDate != void 0) {
2642
+ const time = ((new Date()).getTime() - pressStartDate.getTime()) / 1e3;
2643
+ pressStartDate = void 0;
2644
+ if (time >= 0.5) {
2645
+ navigator.vibrate && navigator.vibrate(200);
2646
+ onFollowShow(true);
2647
+ }
2648
+ }
2649
+ }
2650
+ function onMouseCancel() {
2651
+ setTimeout(() => pressStartDate = void 0, 10);
2652
+ }
2653
+ vue.onMounted(() => {
2654
+ onEvent(rootDom.value, "mousedown", onMouseDown);
2655
+ onEvent(rootDom.value, "mouseup", onMouseUp);
2656
+ if ("ontouchstart" in window) {
2657
+ onEvent(rootDom.value, "touchstart", onMouseDown);
2658
+ onEvent(rootDom.value, "touchend", onMouseUp);
2659
+ }
2660
+ onEvent(window, "mouseup", onMouseCancel);
2661
+ if ("ontouchstart" in window) {
2662
+ onEvent(window, "touchend", onMouseCancel);
2663
+ onEvent(window, "touchcancel", onMouseCancel);
2664
+ }
2665
+ });
2666
+ return (_ctx, _cache) => {
2667
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", {
2668
+ class: "action-slot flex-cross-center",
2669
+ title: String(__props.trigger == "hover")
2670
+ }, [vue.renderSlot(_ctx.$slots, "default")], 8, _hoisted_2$5), __props.trigger == "hover" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
2671
+ key: 0,
2672
+ class: "hover-tips",
2673
+ button: "",
2674
+ custom: "",
2675
+ size: 16,
2676
+ onClick: _cache[0] || (_cache[0] = $event => onFollowShow(false))
2677
+ }, {
2678
+ default: vue.withCtx(() => [...(_cache[1] || (_cache[1] = [vue.createElementVNode("path", {
2679
+ d: "M415.93 223.79c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.003-95.984-95.984zM415.93 511.742c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.004-95.984-95.984zM415.93 799.866c0-52.98 43.004-95.984 95.984-95.984s95.984 43.003 95.984 95.984-43.004 95.983-95.984 95.983-95.984-43.175-95.984-95.983z"
2680
+ }, null, -1)]))]),
2681
+ _: 1
2682
+ })) : vue.createCommentVNode("", true)], 512);
2683
+ };
2684
+ }
2685
+ });
2686
+
2687
+ function monitScroll(manager, root, options, emiter, classStyleRef) {
2688
+ const scope = snail_core.useScope();
2689
+ let preStatus = void 0;
2690
+ const observer = snail_view.useObserver();
2691
+ const timer = snail_core.useTimer();
2692
+ const reactive = useReactive();
2693
+ function buildClassStyle() {
2694
+ const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item == "x-bar" || item == "y-bar");
2695
+ array.push(...manager.buildClassStyle(options));
2696
+ classStyleRef.value = array;
2697
+ }
2698
+ function refreshScrollInfo() {
2699
+ const status = Object.freeze(manager.getStatus(root));
2700
+ const events = Object.create(null);
2701
+ if (preStatus != void 0) {
2702
+ preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
2703
+ preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
2704
+ if (preStatus.xbar == true && status.xbar == true) {
2705
+ status.left && preStatus.left !== status.left && (events.left = []);
2706
+ status.right && preStatus.right !== status.right && (events.right = []);
2707
+ }
2708
+ if (preStatus.ybar == true && status.ybar == true) {
2709
+ status.top && preStatus.top !== status.top && (events.top = []);
2710
+ status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
2711
+ }
2712
+ }
2713
+ preStatus = status;
2714
+ events.xbar && emiter("xbar", ...events.xbar);
2715
+ events.left && emiter("left");
2716
+ events.right && emiter("right");
2717
+ events.ybar && emiter("ybar", ...events.ybar);
2718
+ events.top && emiter("top");
2719
+ events.bottom && emiter("bottom");
2720
+ {
2721
+ const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item != "x-bar" && item != "y-bar");
2722
+ status.xbar && array.push("x-bar");
2723
+ status.ybar && array.push("y-bar");
2724
+ classStyleRef.value = array;
2725
+ }
2726
+ }
2727
+ buildClassStyle();
2728
+ refreshScrollInfo();
2729
+ reactive.watcher(() => options.scroll, buildClassStyle);
2730
+ reactive.watcher(() => options.barSize, buildClassStyle);
2731
+ observer.onSize(root, refreshScrollInfo);
2732
+ observer.onEvent(root, "scroll", refreshScrollInfo);
2733
+ timer.onInterval(() => {
2734
+ const isChange = preStatus.scrollWidth != root.scrollWidth || preStatus.scrollHeight != root.scrollHeight;
2735
+ isChange && refreshScrollInfo();
2736
+ }, 100);
2737
+ scope.onDestroy(() => {
2738
+ observer.destroyed || observer.destroy();
2739
+ timer.destroyed || timer.destroy();
2740
+ reactive.destroyed || reactive.destroy();
2741
+ });
2742
+ return scope;
2743
+ }
2744
+
2548
2745
  var _sfc_main$h = vue.defineComponent({
2746
+ ...{
2747
+ name: "Elastic",
2748
+ inheritAttrs: false
2749
+ },
2549
2750
  __name: "elastic",
2550
2751
  props: {
2551
2752
  scroll: {},
@@ -2558,23 +2759,26 @@
2558
2759
  type: Boolean
2559
2760
  }
2560
2761
  },
2561
- emits: ["refresh", "more"],
2762
+ emits: ["xbar", "left", "right", "ybar", "top", "bottom", "refresh", "more"],
2562
2763
  setup(__props, _ref) {
2563
2764
  let {
2765
+ expose: __expose,
2564
2766
  emit: __emit
2565
2767
  } = _ref;
2768
+ __expose({
2769
+ loadRefresh,
2770
+ loadMore
2771
+ });
2566
2772
  const props = __props;
2567
2773
  const emits = __emit;
2568
2774
  const {
2569
- onEvent,
2570
- onSize
2775
+ onEvent
2571
2776
  } = snail_view.useObserver();
2572
- const {
2573
- watcher
2574
- } = useReactive();
2777
+ const manager = snail_view.useScroll();
2575
2778
  const downRefreshDom = vue.useTemplateRef("down-refresh");
2576
2779
  const mainBodyDom = vue.useTemplateRef("main-body");
2577
2780
  const upMoreDom = vue.useTemplateRef("up-more");
2781
+ const classStyleRef = vue.shallowRef();
2578
2782
  let isStartByTouch = false;
2579
2783
  const startPointerRef = vue.ref(void 0);
2580
2784
  const isMovingRef = vue.shallowRef(false);
@@ -2584,17 +2788,6 @@
2584
2788
  const loadingRef = vue.shallowRef();
2585
2789
  function buildMainBodyStyle() {
2586
2790
  const style = Object.create(null);
2587
- switch (props.scroll) {
2588
- case "x":
2589
- style["overflow"] = "auto hidden";
2590
- break;
2591
- case "y":
2592
- style["overflow"] = "hidden auto";
2593
- break;
2594
- case "none":
2595
- style["overflow"] = "none";
2596
- break;
2597
- }
2598
2791
  if (springStatusRef.value != void 0) {
2599
2792
  const {
2600
2793
  x,
@@ -2607,6 +2800,41 @@
2607
2800
  }
2608
2801
  return style;
2609
2802
  }
2803
+ function loadRefresh() {
2804
+ const deferred = snail_core.defer();
2805
+ if (downRefreshDom.value == void 0) {
2806
+ deferred.reject("not support pullRefresh feature!");
2807
+ } else if (loadingRef.value != void 0) {
2808
+ deferred.reject(`pre load task[${loadingRef.value}] is running!`);
2809
+ } else {
2810
+ resetAfterEnd();
2811
+ loadingRef.value = "refresh";
2812
+ springStatusRef.value.y = downRefreshDom.value.clientHeight;
2813
+ emits("refresh", () => {
2814
+ resetAfterEnd();
2815
+ deferred.resolve();
2816
+ });
2817
+ }
2818
+ return deferred.promise;
2819
+ }
2820
+ function loadMore() {
2821
+ const deferred = snail_core.defer();
2822
+ if (downRefreshDom.value == void 0) {
2823
+ deferred.reject("not support upMore feature!");
2824
+ } else if (loadingRef.value != void 0) {
2825
+ deferred.reject(`pre load task[${loadingRef.value}] is running!`);
2826
+ } else {
2827
+ resetAfterEnd();
2828
+ loadingRef.value = "more";
2829
+ springStatusRef.value.y = -upMoreDom.value.clientHeight;
2830
+ emits("more", () => {
2831
+ resetAfterEnd();
2832
+ deferred.resolve();
2833
+ });
2834
+ return;
2835
+ }
2836
+ return deferred.promise;
2837
+ }
2610
2838
  function onSpringStart(isTouch, position) {
2611
2839
  if (loadingRef.value != void 0) {
2612
2840
  return;
@@ -2629,9 +2857,9 @@
2629
2857
  isMovingRef.value = true;
2630
2858
  if (springXRef.value == true) {
2631
2859
  const distance = position.clientX - startPointerRef.value.clientX;
2632
- if (distance >= 0 && isLeft(mainBodyDom.value)) {
2860
+ if (distance >= 0 && manager.isLeft(mainBodyDom.value)) {
2633
2861
  springStatusRef.value.x = Math.pow(distance, 0.8);
2634
- } else if (distance <= 0 && isRight(mainBodyDom.value)) {
2862
+ } else if (distance <= 0 && manager.isRight(mainBodyDom.value)) {
2635
2863
  springStatusRef.value.x = -Math.pow(-distance, 0.8);
2636
2864
  }
2637
2865
  }
@@ -2641,10 +2869,10 @@
2641
2869
  default:
2642
2870
  {
2643
2871
  if (distance >= 0) {
2644
- isTop(mainBodyDom.value) ? springStatusRef.value.y = Math.pow(distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2872
+ manager.isTop(mainBodyDom.value) ? springStatusRef.value.y = Math.pow(distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2645
2873
  } else {
2646
2874
  console.log("isBottom", mainBodyDom.value.scrollTop + mainBodyDom.value.clientHeight, "---", mainBodyDom.value.scrollHeight);
2647
- isBottom(mainBodyDom.value) ? springStatusRef.value.y = -Math.pow(-distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2875
+ manager.isBottom(mainBodyDom.value) ? springStatusRef.value.y = -Math.pow(-distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2648
2876
  }
2649
2877
  break;
2650
2878
  }
@@ -2660,18 +2888,10 @@
2660
2888
  }
2661
2889
  if (loadingRef.value == void 0) {
2662
2890
  if (downRefreshDom.value && springStatusRef.value.y > downRefreshDom.value.clientHeight) {
2663
- resetAfterEnd();
2664
- loadingRef.value = "refresh";
2665
- springStatusRef.value.y = downRefreshDom.value.clientHeight;
2666
- emits("refresh", resetAfterEnd);
2667
- return;
2891
+ return loadRefresh();
2668
2892
  }
2669
2893
  if (upMoreDom.value && springStatusRef.value.y <= -upMoreDom.value.clientHeight) {
2670
- resetAfterEnd();
2671
- loadingRef.value = "more";
2672
- springStatusRef.value.y = -upMoreDom.value.clientHeight;
2673
- emits("more", resetAfterEnd);
2674
- return;
2894
+ return loadMore();
2675
2895
  }
2676
2896
  }
2677
2897
  resetAfterEnd();
@@ -2684,6 +2904,7 @@
2684
2904
  isStartByTouch = false;
2685
2905
  }
2686
2906
  vue.onMounted(() => {
2907
+ monitScroll(manager, mainBodyDom.value, props, emits, classStyleRef);
2687
2908
  if ("ontouchstart" in window) {
2688
2909
  onEvent(mainBodyDom.value, "touchstart", evt => onSpringStart(true, evt.touches[0]));
2689
2910
  onEvent(window, "touchmove", evt => onSpringMove(true, evt.touches[0]));
@@ -2697,28 +2918,32 @@
2697
2918
  }
2698
2919
  });
2699
2920
  return (_ctx, _cache) => {
2700
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [springYRef.value == true && __props.downRefresh == true ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
2701
- key: 0,
2921
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(_ctx.$attrs, {
2922
+ class: "snail-elastic"
2923
+ }), [springYRef.value == true && __props.downRefresh == true ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
2702
2924
  class: vue.normalizeClass(["down-refresh", {
2703
2925
  "running": loadingRef.value == "refresh"
2704
2926
  }]),
2927
+ key: "down-refresh",
2705
2928
  ref: "down-refresh"
2706
2929
  }, [vue.renderSlot(_ctx.$slots, "down-refresh", {}, () => [_cache[0] || (_cache[0] = vue.createElementVNode("div", {
2707
2930
  class: "flex-center default-loading"
2708
2931
  }, [vue.createElementVNode("span"), vue.createElementVNode("span"), vue.createElementVNode("span")], -1))])], 2)), [[vue.vShow, loadingRef.value != "more"]]) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
2709
- class: vue.normalizeClass(["main-body wh-fill", [__props.barSize ? `${__props.barSize}-scrollbar` : "", isMovingRef.value ? "moving" : ""]]),
2932
+ class: vue.normalizeClass(["main-body wh-fill", classStyleRef.value, {
2933
+ "moving": isMovingRef.value
2934
+ }]),
2710
2935
  ref: "main-body",
2711
2936
  key: "main-body",
2712
2937
  style: vue.normalizeStyle(buildMainBodyStyle())
2713
2938
  }, [vue.renderSlot(_ctx.$slots, "default")], 6), springYRef.value == true && __props.upMore == true ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
2714
- key: 1,
2715
2939
  class: vue.normalizeClass(["up-more", {
2716
2940
  "running": loadingRef.value == "more"
2717
2941
  }]),
2942
+ key: "up-more",
2718
2943
  ref: "up-more"
2719
2944
  }, [vue.renderSlot(_ctx.$slots, "up-more", {}, () => [_cache[1] || (_cache[1] = vue.createElementVNode("div", {
2720
2945
  class: "flex-center default-loading"
2721
- }, [vue.createElementVNode("span"), vue.createElementVNode("span"), vue.createElementVNode("span")], -1))])], 2)), [[vue.vShow, loadingRef.value != "refresh"]]) : vue.createCommentVNode("", true)]);
2946
+ }, [vue.createElementVNode("span"), vue.createElementVNode("span"), vue.createElementVNode("span")], -1))])], 2)), [[vue.vShow, loadingRef.value != "refresh"]]) : vue.createCommentVNode("", true)], 16);
2722
2947
  };
2723
2948
  }
2724
2949
  });
@@ -2908,7 +3133,7 @@
2908
3133
  key: 0,
2909
3134
  class: "subtitle ellipsis",
2910
3135
  textContent: vue.toDisplayString(__props.subtitle)
2911
- }, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$C, {
3136
+ }, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$E, {
2912
3137
  custom: false,
2913
3138
  type: "arrow",
2914
3139
  button: "",
@@ -2923,7 +3148,7 @@
2923
3148
  var _sfc_main$e = vue.defineComponent({
2924
3149
  ...{
2925
3150
  name: "Scroll",
2926
- inheritAttrs: true
3151
+ inheritAttrs: false
2927
3152
  },
2928
3153
  __name: "scroll",
2929
3154
  props: {
@@ -2939,102 +3164,27 @@
2939
3164
  const props = __props;
2940
3165
  const emits = __emit;
2941
3166
  const rootDom = vue.useTemplateRef("scroll-root");
2942
- const {
2943
- onSize
2944
- } = snail_view.useObserver();
2945
- const {
2946
- onInterval
2947
- } = snail_core.useTimer();
2948
- var preStatus = void 0;
3167
+ const manager = snail_view.useScroll();
3168
+ const classStyleRef = vue.shallowRef();
2949
3169
  __expose({
2950
- scroll,
2951
- scrollTo
2952
- });
2953
- function buildStyle() {
2954
- const style = Object.create(null);
2955
- switch (props.scroll) {
2956
- case "x":
2957
- style["overflow"] = "auto hidden";
2958
- break;
2959
- case "y":
2960
- style["overflow"] = "hidden auto";
2961
- break;
2962
- case "none":
2963
- style["overflow"] = "none";
2964
- break;
2965
- }
2966
- return style;
2967
- }
2968
- function scroll(left, top) {
2969
- left == void 0 || (rootDom.value.scrollLeft += left);
2970
- top == void 0 || (rootDom.value.scrollTop += top);
2971
- }
2972
- function scrollTo(left, top) {
2973
- left == void 0 || (rootDom.value.scrollLeft = left);
2974
- top == void 0 || (rootDom.value.scrollTop = top);
2975
- }
2976
- function refreshScrollInfo() {
2977
- const status = {
2978
- xbar: rootDom.value.scrollWidth > rootDom.value.clientWidth,
2979
- ybar: rootDom.value.scrollHeight > rootDom.value.clientHeight,
2980
- left: false,
2981
- right: false,
2982
- top: false,
2983
- bottom: false,
2984
- scrollwidth: rootDom.value.scrollWidth,
2985
- scrollheight: rootDom.value.scrollHeight
2986
- };
2987
- if (status.xbar == true) {
2988
- status.left = rootDom.value.scrollLeft == 0;
2989
- status.right = rootDom.value.scrollLeft + rootDom.value.clientWidth == rootDom.value.scrollWidth;
2990
- }
2991
- if (status.ybar == true) {
2992
- status.top = rootDom.value.scrollTop == 0;
2993
- status.bottom = rootDom.value.scrollTop + rootDom.value.clientHeight == rootDom.value.scrollHeight;
2994
- }
2995
- Object.freeze(status);
2996
- const events = Object.create(null);
2997
- if (preStatus != void 0) {
2998
- preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
2999
- preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
3000
- if (preStatus.xbar == true && status.xbar == true) {
3001
- status.left && preStatus.left !== status.left && (events.left = []);
3002
- status.right && preStatus.right !== status.right && (events.right = []);
3003
- }
3004
- if (preStatus.ybar == true && status.ybar == true) {
3005
- status.top && preStatus.top !== status.top && (events.top = []);
3006
- status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
3007
- }
3008
- }
3009
- preStatus = status;
3010
- preStatus = Object.freeze(status);
3011
- events.xbar && emits("xbar", ...events.xbar);
3012
- events.left && emits("left");
3013
- events.right && emits("right");
3014
- events.ybar && emits("ybar", ...events.ybar);
3015
- events.top && emits("top");
3016
- events.bottom && emits("bottom");
3017
- if (rootDom.value) {
3018
- rootDom.value.classList.remove("x-bar", "y-bar");
3019
- status.xbar && rootDom.value.classList.add("x-bar");
3020
- status.ybar && rootDom.value.classList.add("y-bar");
3170
+ getStatus() {
3171
+ return manager.getStatus(rootDom.value);
3172
+ },
3173
+ scroll(left, top) {
3174
+ left == void 0 || (rootDom.value.scrollLeft += left);
3175
+ top == void 0 || (rootDom.value.scrollTop += top);
3176
+ },
3177
+ scrollTo(left, top) {
3178
+ left == void 0 || (rootDom.value.scrollLeft = left);
3179
+ top == void 0 || (rootDom.value.scrollTop = top);
3021
3180
  }
3022
- }
3023
- vue.onMounted(() => {
3024
- refreshScrollInfo();
3025
- onSize(rootDom.value, refreshScrollInfo);
3026
- onInterval(() => {
3027
- const isChange = preStatus.scrollwidth != rootDom.value.scrollWidth || preStatus.scrollheight != rootDom.value.scrollHeight;
3028
- isChange && refreshScrollInfo();
3029
- }, 100);
3030
3181
  });
3182
+ vue.onMounted(() => monitScroll(manager, rootDom.value, props, emits, classStyleRef));
3031
3183
  return (_ctx, _cache) => {
3032
- return vue.openBlock(), vue.createElementBlock("div", {
3033
- class: vue.normalizeClass(["snail-scroll", __props.barSize ? `${__props.barSize}-scrollbar` : ""]),
3034
- ref: "scroll-root",
3035
- style: vue.normalizeStyle(buildStyle()),
3036
- onScroll: refreshScrollInfo
3037
- }, [vue.renderSlot(_ctx.$slots, "default")], 38);
3184
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(_ctx.$attrs, {
3185
+ class: ["snail-scroll", classStyleRef.value],
3186
+ ref: "scroll-root"
3187
+ }), [vue.renderSlot(_ctx.$slots, "default")], 16);
3038
3188
  };
3039
3189
  }
3040
3190
  });
@@ -3457,7 +3607,7 @@
3457
3607
  key: 1
3458
3608
  }, [_cache[5] || (_cache[5] = vue.createElementVNode("div", {
3459
3609
  class: "indent"
3460
- }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
3610
+ }, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
3461
3611
  key: 0,
3462
3612
  class: vue.normalizeClass(statusRef.value),
3463
3613
  custom: "",
@@ -3529,7 +3679,7 @@
3529
3679
  emits("click", node, parents);
3530
3680
  }
3531
3681
  return (_ctx, _cache) => {
3532
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$w, vue.mergeProps({
3682
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$y, vue.mergeProps({
3533
3683
  key: 0
3534
3684
  }, __props.search, {
3535
3685
  onSearch
@@ -3580,7 +3730,7 @@
3580
3730
  return (_ctx, _cache) => {
3581
3731
  return vue.openBlock(), vue.createElementBlock("div", {
3582
3732
  class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
3583
- }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
3733
+ }, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, vue.mergeProps({
3584
3734
  key: 0
3585
3735
  }, __props.header || {
3586
3736
  useTo: "dialog",
@@ -3594,7 +3744,7 @@
3594
3744
  }), {
3595
3745
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
3596
3746
  _: 3
3597
- }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, vue.mergeProps({
3747
+ }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({
3598
3748
  key: 1
3599
3749
  }, __props.footer || {}, {
3600
3750
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -3608,7 +3758,7 @@
3608
3758
  snail_core.mustObject(options, "options");
3609
3759
  target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
3610
3760
  target.classList.add("snail-app");
3611
- const app = vue.createApp(_sfc_main$s, options);
3761
+ const app = vue.createApp(_sfc_main$u, options);
3612
3762
  triggerAppCreated(app);
3613
3763
  app.mount(target);
3614
3764
  const scope = snail_core.useScope().onDestroy(() => app.unmount());
@@ -3904,7 +4054,7 @@
3904
4054
  }]),
3905
4055
  mode: "vertical"
3906
4056
  }, vue.createSlots({
3907
- main: vue.withCtx(() => [vue.createVNode(_sfc_main$u, {
4057
+ main: vue.withCtx(() => [vue.createVNode(_sfc_main$w, {
3908
4058
  multiple: "",
3909
4059
  effect: vue.unref(MOTION).top
3910
4060
  }, {
@@ -3944,19 +4094,19 @@
3944
4094
  _: 2
3945
4095
  }, [__props.toolbarDisabled != true ? {
3946
4096
  name: "bottom",
3947
- fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
4097
+ fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
3948
4098
  key: 0,
3949
4099
  type: "link",
3950
4100
  size: "small",
3951
4101
  textContent: "清空",
3952
4102
  onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
3953
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
4103
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
3954
4104
  key: 1,
3955
4105
  type: "link",
3956
4106
  size: "small",
3957
4107
  textContent: "现在",
3958
4108
  onClick: _cache[1] || (_cache[1] = $event => rebuildItems(vue.unref(snail_core.getTimeValue)(new Date())))
3959
- })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$D, {
4109
+ })) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$F, {
3960
4110
  type: "link",
3961
4111
  size: "small",
3962
4112
  textContent: "确定",
@@ -4210,7 +4360,7 @@
4210
4360
  height: "30px"
4211
4361
  }
4212
4362
  }, vue.createSlots({
4213
- top: vue.withCtx(() => [vue.createVNode(_sfc_main$C, {
4363
+ top: vue.withCtx(() => [vue.createVNode(_sfc_main$E, {
4214
4364
  type: "arrow",
4215
4365
  button: "",
4216
4366
  rotate: 180,
@@ -4230,7 +4380,7 @@
4230
4380
  key: 0,
4231
4381
  textContent: vue.toDisplayString(`${dateRef.value.month}月`),
4232
4382
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
4233
- }, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$C, {
4383
+ }, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$E, {
4234
4384
  type: "arrow",
4235
4385
  button: "",
4236
4386
  size: 26,
@@ -4296,19 +4446,19 @@
4296
4446
  onClick: onSelectTime
4297
4447
  }, null, 10, _hoisted_8)) : vue.createCommentVNode("", true), __props.toolbarDisabled != true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4298
4448
  key: 1
4299
- }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
4449
+ }, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4300
4450
  key: 0,
4301
4451
  type: "link",
4302
4452
  size: "small",
4303
4453
  textContent: "清空",
4304
4454
  onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), vue.unref(inPopup) && __props.closePopup("")))
4305
- })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
4455
+ })) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
4306
4456
  key: 1,
4307
4457
  type: "link",
4308
4458
  size: "small",
4309
4459
  textContent: "现在",
4310
4460
  onClick: onNow
4311
- })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$D, {
4461
+ })) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$F, {
4312
4462
  type: "link",
4313
4463
  size: "small",
4314
4464
  textContent: "确定",
@@ -4342,7 +4492,7 @@
4342
4492
  popupOptions = {
4343
4493
  ...popupOptions
4344
4494
  };
4345
- popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
4495
+ popupOptions.followX = popupOptions.followX || ["start", "end", "center", "before", "after"];
4346
4496
  popupOptions.spaceX = snail_core.correctNumber(popupOptions.spaceX, 2);
4347
4497
  popupOptions.spaceY = snail_core.correctNumber(popupOptions.spaceY, 2);
4348
4498
  popupOptions.spaceClient = snail_core.correctNumber(popupOptions.spaceClient, 10);
@@ -4442,7 +4592,7 @@
4442
4592
  type: "text",
4443
4593
  readonly: "",
4444
4594
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4445
- }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
4595
+ }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4446
4596
  key: 0,
4447
4597
  type: "datepicker",
4448
4598
  button: "",
@@ -4528,7 +4678,7 @@
4528
4678
  type: "text",
4529
4679
  readonly: "",
4530
4680
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4531
- }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
4681
+ }, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4532
4682
  key: 0,
4533
4683
  type: "timepicker",
4534
4684
  button: "",
@@ -4624,12 +4774,12 @@
4624
4774
  onTouchstart: onStartDrag,
4625
4775
  onTouchmove: onDragMove,
4626
4776
  onTouchend: onDragEnd
4627
- }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$C, {
4777
+ }, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4628
4778
  key: 0,
4629
4779
  type: "success",
4630
4780
  size: 20,
4631
4781
  color: "white"
4632
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$C, {
4782
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$E, {
4633
4783
  key: 1,
4634
4784
  custom: "",
4635
4785
  size: 20,
@@ -4648,22 +4798,23 @@
4648
4798
  });
4649
4799
 
4650
4800
  const components = {
4651
- Button: _sfc_main$D,
4652
- Choose: _sfc_main$B,
4653
- Footer: _sfc_main$A,
4654
- Header: _sfc_main$z,
4655
- Icon: _sfc_main$C,
4656
- Input: _sfc_main$y,
4657
- Number: _sfc_main$x,
4658
- Search: _sfc_main$w,
4659
- Select: _sfc_main$k,
4660
- Switch: _sfc_main$j,
4661
- Textarea: _sfc_main$i,
4662
- Dynamic: _sfc_main$s,
4801
+ Action: _sfc_main$i,
4802
+ Button: _sfc_main$F,
4803
+ Choose: _sfc_main$D,
4804
+ Footer: _sfc_main$C,
4805
+ Header: _sfc_main$B,
4806
+ Icon: _sfc_main$E,
4807
+ Input: _sfc_main$A,
4808
+ Number: _sfc_main$z,
4809
+ Search: _sfc_main$y,
4810
+ Select: _sfc_main$m,
4811
+ Switch: _sfc_main$l,
4812
+ Textarea: _sfc_main$k,
4813
+ Dynamic: _sfc_main$u,
4663
4814
  Elastic: _sfc_main$h,
4664
4815
  Flex: _sfc_main$g,
4665
4816
  Fold: _sfc_main$f,
4666
- Motion: _sfc_main$u,
4817
+ Motion: _sfc_main$w,
4667
4818
  Layout: _sfc_main$d,
4668
4819
  Scroll: _sfc_main$e,
4669
4820
  Sort: _sfc_main$c,
@@ -4676,8 +4827,8 @@
4676
4827
  DatePicker: _sfc_main$2,
4677
4828
  TimePicker: _sfc_main$1,
4678
4829
  DragVerify: _sfc_main,
4679
- Empty: _sfc_main$n,
4680
- Loading: _sfc_main$t
4830
+ Empty: _sfc_main$p,
4831
+ Loading: _sfc_main$v
4681
4832
  };
4682
4833
 
4683
4834
  snail_core.onMountScope(scope => {