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.
package/dist/snail.vue.js CHANGED
@@ -1,10 +1,10 @@
1
1
  //@ sourceURL=/snail.vue.js
2
2
  import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, computed, mergeProps, unref, createElementVNode, toDisplayString, Fragment, renderList, mergeModels, useModel, normalizeStyle, createCommentVNode, createBlock, nextTick, useTemplateRef, createVNode, watch, withDirectives, isRef, vModelText, withCtx, createApp, resolveDynamicComponent, TransitionGroup, Transition, normalizeProps, guardReactiveProps, ref, onErrorCaptured, createSlots, onMounted, withModifiers, getCurrentInstance, resolveComponent, vShow, onBeforeUnmount, onActivated, getCurrentScope, onScopeDispose } from 'vue';
3
3
  import { throwError, isObject, correctNumber, correctString, useKey, isArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isNumberNotNaN, isStringNotEmpty, hasAny, mustFunction, useScope, removeFromArray, mustObject, isArrayNotEmpty, hasOwnProperty, isString, script, delay, useTimer, defer, useAsyncScope, useHook, newId, throwIfTrue, isFunction, isNullish, getTimeNumber, getDateValue, parseDate, formatDateValue, getDateByValue, parseTimeValue, getTimeValue, padStart, formatTimeValue, parseDateValue, correctDateFormat, isValidTime, getFromArray, onMountScope } from 'snail.core';
4
- import { css, link, useObserver, useAnimation } from 'snail.view';
4
+ import { css, link, useObserver, useScroll, useAnimation } from 'snail.view';
5
5
 
6
- const _hoisted_1$n = ["title"];
7
- var _sfc_main$D = defineComponent({
6
+ const _hoisted_1$o = ["title"];
7
+ var _sfc_main$F = defineComponent({
8
8
  ...{
9
9
  name: "Button",
10
10
  inheritAttrs: true
@@ -20,7 +20,7 @@ var _sfc_main$D = defineComponent({
20
20
  return openBlock(), createElementBlock("div", {
21
21
  class: normalizeClass(["snail-button", [__props.size, __props.type]]),
22
22
  title: __props.title
23
- }, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$n);
23
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
24
24
  };
25
25
  }
26
26
  });
@@ -63,10 +63,10 @@ function getBuiltinIcon(iconType) {
63
63
  }
64
64
  }
65
65
 
66
- const _hoisted_1$m = ["viewBox"];
67
- const _hoisted_2$d = ["textContent"];
66
+ const _hoisted_1$n = ["viewBox"];
67
+ const _hoisted_2$f = ["textContent"];
68
68
  const _hoisted_3$a = ["d"];
69
- var _sfc_main$C = defineComponent({
69
+ var _sfc_main$E = defineComponent({
70
70
  __name: "icon",
71
71
  props: {
72
72
  title: {},
@@ -121,7 +121,7 @@ var _sfc_main$C = defineComponent({
121
121
  onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
122
122
  }), [createElementVNode("title", {
123
123
  textContent: toDisplayString(__props.title || "")
124
- }, null, 8, _hoisted_2$d), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
124
+ }, null, 8, _hoisted_2$f), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
125
125
  key: 0
126
126
  }) : (openBlock(true), createElementBlock(Fragment, {
127
127
  key: 1
@@ -129,16 +129,16 @@ var _sfc_main$C = defineComponent({
129
129
  return openBlock(), createElementBlock("path", {
130
130
  d
131
131
  }, null, 8, _hoisted_3$a);
132
- }), 256))], 16, _hoisted_1$m);
132
+ }), 256))], 16, _hoisted_1$n);
133
133
  };
134
134
  }
135
135
  });
136
136
 
137
- const _hoisted_1$l = ["title", "onClick"];
138
- const _hoisted_2$c = ["type", "checked"];
137
+ const _hoisted_1$m = ["title", "onClick"];
138
+ const _hoisted_2$e = ["type", "checked"];
139
139
  const _hoisted_3$9 = ["textContent"];
140
140
  const _hoisted_4$7 = ["textContent"];
141
- var _sfc_main$B = defineComponent({
141
+ var _sfc_main$D = defineComponent({
142
142
  ...{
143
143
  name: "Choose",
144
144
  inheritAttrs: true
@@ -214,10 +214,10 @@ var _sfc_main$B = defineComponent({
214
214
  key: 0,
215
215
  type: unref(type),
216
216
  checked: node.selected
217
- }, null, 8, _hoisted_2$c)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
217
+ }, null, 8, _hoisted_2$e)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
218
218
  key: 1,
219
219
  class: normalizeClass(["status", [node.selected ? "selected" : ""]])
220
- }, [node.selected ? (openBlock(), createBlock(_sfc_main$C, {
220
+ }, [node.selected ? (openBlock(), createBlock(_sfc_main$E, {
221
221
  key: 0,
222
222
  type: "success",
223
223
  size: 12,
@@ -230,13 +230,17 @@ var _sfc_main$B = defineComponent({
230
230
  key: 3,
231
231
  class: "item-des",
232
232
  textContent: toDisplayString(node.item.description)
233
- }, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$l);
233
+ }, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$m);
234
234
  }), 128))], 2);
235
235
  };
236
236
  }
237
237
  });
238
238
 
239
- var _sfc_main$A = defineComponent({
239
+ var addLink = href => setTimeout(link.register, 0, href);
240
+
241
+ addLink("/styles/snail.vue.vue.css");
242
+
243
+ var _sfc_main$C = defineComponent({
240
244
  ...{
241
245
  name: "Footer",
242
246
  inheritAttrs: true
@@ -267,13 +271,13 @@ var _sfc_main$A = defineComponent({
267
271
  class: normalizeClass(["snail-footer", {
268
272
  "start-divider": __props.divider
269
273
  }, __props.align || "right"])
270
- }, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
274
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
271
275
  key: 0,
272
276
  size: "max",
273
277
  type: "default",
274
278
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
275
279
  textContent: toDisplayString(__props.cancelName || "取消")
276
- }, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
280
+ }, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
277
281
  key: 1,
278
282
  size: "max",
279
283
  type: "primary",
@@ -284,12 +288,8 @@ var _sfc_main$A = defineComponent({
284
288
  }
285
289
  });
286
290
 
287
- var addLink = href => setTimeout(link.register, 0, href);
288
-
289
- addLink("/styles/snail.vue.vue.css");
290
-
291
- const _hoisted_1$k = ["textContent"];
292
- var _sfc_main$z = defineComponent({
291
+ const _hoisted_1$l = ["textContent"];
292
+ var _sfc_main$B = defineComponent({
293
293
  ...{
294
294
  name: "Header",
295
295
  inheritAttrs: true
@@ -328,7 +328,7 @@ var _sfc_main$z = defineComponent({
328
328
  key: 0,
329
329
  textContent: toDisplayString(__props.title),
330
330
  class: normalizeClass(["header-title", __props.titleAlign])
331
- }, null, 10, _hoisted_1$k)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$C, {
331
+ }, null, 10, _hoisted_1$l)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$E, {
332
332
  key: 1,
333
333
  class: "close-icon",
334
334
  type: "close",
@@ -341,8 +341,8 @@ var _sfc_main$z = defineComponent({
341
341
  }
342
342
  });
343
343
 
344
- const _hoisted_1$j = ["textContent"];
345
- const _hoisted_2$b = {
344
+ const _hoisted_1$k = ["textContent"];
345
+ const _hoisted_2$d = {
346
346
  key: 0,
347
347
  class: "required",
348
348
  textContent: "*"
@@ -352,7 +352,7 @@ const _hoisted_3$8 = {
352
352
  };
353
353
  const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
354
354
  const _hoisted_5$4 = ["title"];
355
- var _sfc_main$y = defineComponent({
355
+ var _sfc_main$A = defineComponent({
356
356
  ...{
357
357
  name: "Input",
358
358
  inheritAttrs: true
@@ -404,7 +404,7 @@ var _sfc_main$y = defineComponent({
404
404
  }, [createElementVNode("span", {
405
405
  class: "text",
406
406
  textContent: toDisplayString(__props.title)
407
- }, null, 8, _hoisted_1$j), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$b)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$8, [createElementVNode("input", {
407
+ }, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$d)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$8, [createElementVNode("input", {
408
408
  ref: "input-el",
409
409
  type: __props.type || "text",
410
410
  value: inputModel.value,
@@ -417,7 +417,7 @@ var _sfc_main$y = defineComponent({
417
417
  key: 0,
418
418
  class: "validate",
419
419
  title: validateRef.value
420
- }, [createVNode(_sfc_main$C, {
420
+ }, [createVNode(_sfc_main$E, {
421
421
  type: "error",
422
422
  button: "",
423
423
  size: 16,
@@ -627,11 +627,11 @@ function useFormatter(options) {
627
627
  return formatter;
628
628
  }
629
629
 
630
- const _hoisted_1$i = {
630
+ const _hoisted_1$j = {
631
631
  key: 0,
632
632
  class: "number-prefix"
633
633
  };
634
- const _hoisted_2$a = ["textContent"];
634
+ const _hoisted_2$c = ["textContent"];
635
635
  const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
636
636
  const _hoisted_4$5 = {
637
637
  key: 1,
@@ -640,7 +640,7 @@ const _hoisted_4$5 = {
640
640
  const _hoisted_5$3 = ["textContent"];
641
641
  const _hoisted_6$2 = ["title", "textContent"];
642
642
  const _hoisted_7$1 = ["title", "textContent"];
643
- var _sfc_main$x = defineComponent({
643
+ var _sfc_main$z = defineComponent({
644
644
  __name: "number",
645
645
  props: mergeModels({
646
646
  placeholder: {},
@@ -787,10 +787,10 @@ var _sfc_main$x = defineComponent({
787
787
  "has-prefix": unref(hasPrefix),
788
788
  "has-suffix": unref(hasSuffix)
789
789
  }])
790
- }, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [createElementVNode("span", {
790
+ }, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$j, [createElementVNode("span", {
791
791
  class: "ellipsis",
792
792
  textContent: toDisplayString(unref(prefix))
793
- }, null, 8, _hoisted_2$a)])) : createCommentVNode("", true), createElementVNode("div", {
793
+ }, null, 8, _hoisted_2$c)])) : createCommentVNode("", true), createElementVNode("div", {
794
794
  class: normalizeClass(["input-panel", unref(controls)])
795
795
  }, [withDirectives(createElementVNode("input", {
796
796
  type: "text",
@@ -807,14 +807,14 @@ var _sfc_main$x = defineComponent({
807
807
  }, [createElementVNode("div", {
808
808
  class: "controls default subtract",
809
809
  onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
810
- }, [createVNode(_sfc_main$C, {
810
+ }, [createVNode(_sfc_main$E, {
811
811
  type: "subtract",
812
812
  button: "",
813
813
  size: 20
814
814
  })]), createElementVNode("div", {
815
815
  class: "controls default plus",
816
816
  onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
817
- }, [createVNode(_sfc_main$C, {
817
+ }, [createVNode(_sfc_main$E, {
818
818
  type: "plus",
819
819
  button: "",
820
820
  size: 20
@@ -823,7 +823,7 @@ var _sfc_main$x = defineComponent({
823
823
  }, [createElementVNode("div", {
824
824
  class: "controls right plus",
825
825
  onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
826
- }, [createVNode(_sfc_main$C, {
826
+ }, [createVNode(_sfc_main$E, {
827
827
  type: "arrow",
828
828
  button: "",
829
829
  size: 20,
@@ -831,7 +831,7 @@ var _sfc_main$x = defineComponent({
831
831
  })]), createElementVNode("div", {
832
832
  class: "controls right subtract",
833
833
  onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
834
- }, [createVNode(_sfc_main$C, {
834
+ }, [createVNode(_sfc_main$E, {
835
835
  type: "arrow",
836
836
  button: "",
837
837
  size: 20,
@@ -854,8 +854,8 @@ var _sfc_main$x = defineComponent({
854
854
  }
855
855
  });
856
856
 
857
- const _hoisted_1$h = ["placeholder", "readonly"];
858
- var _sfc_main$w = defineComponent({
857
+ const _hoisted_1$i = ["placeholder", "readonly"];
858
+ var _sfc_main$y = defineComponent({
859
859
  ...{
860
860
  name: "Search",
861
861
  inheritAttrs: true
@@ -900,9 +900,9 @@ var _sfc_main$w = defineComponent({
900
900
  readonly: __props.readonly,
901
901
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
902
902
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
903
- }, null, 40, _hoisted_1$h), [[vModelText, textModel.value, void 0, {
903
+ }, null, 40, _hoisted_1$i), [[vModelText, textModel.value, void 0, {
904
904
  trim: true
905
- }]]), createElementVNode("div", null, [createVNode(_sfc_main$C, {
905
+ }]]), createElementVNode("div", null, [createVNode(_sfc_main$E, {
906
906
  class: "search-button",
907
907
  custom: "",
908
908
  button: "",
@@ -1127,11 +1127,11 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
1127
1127
  }
1128
1128
  }
1129
1129
 
1130
- const _hoisted_1$g = {
1130
+ const _hoisted_1$h = {
1131
1131
  class: "snail-confirm flex-column"
1132
1132
  };
1133
- const _hoisted_2$9 = ["innerHTML"];
1134
- var _sfc_main$v = defineComponent({
1133
+ const _hoisted_2$b = ["innerHTML"];
1134
+ var _sfc_main$x = defineComponent({
1135
1135
  ...{
1136
1136
  name: "ConfirmContainer",
1137
1137
  inheritAttrs: true
@@ -1159,14 +1159,14 @@ var _sfc_main$v = defineComponent({
1159
1159
  },
1160
1160
  setup(__props) {
1161
1161
  return (_ctx, _cache) => {
1162
- return openBlock(), createElementBlock("div", _hoisted_1$g, [createVNode(_sfc_main$z, {
1162
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [createVNode(_sfc_main$B, {
1163
1163
  "use-to": "dialog",
1164
1164
  title: __props.title || "提示",
1165
1165
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1166
1166
  }, null, 8, ["title"]), createElementVNode("div", {
1167
1167
  class: "confirm-body",
1168
1168
  innerHTML: __props.message || "请确认?"
1169
- }, null, 8, _hoisted_2$9), createVNode(_sfc_main$A, {
1169
+ }, null, 8, _hoisted_2$b), createVNode(_sfc_main$C, {
1170
1170
  align: "right",
1171
1171
  "cancel-name": __props.cancelName,
1172
1172
  "cancel-disabled": __props.cancelDisabled,
@@ -1227,7 +1227,7 @@ const MOTION = Object.freeze({
1227
1227
  });
1228
1228
  for (var key in MOTION) hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
1229
1229
 
1230
- var _sfc_main$u = defineComponent({
1230
+ var _sfc_main$w = defineComponent({
1231
1231
  __name: "motion",
1232
1232
  props: {
1233
1233
  multiple: {
@@ -1276,7 +1276,7 @@ var _sfc_main$u = defineComponent({
1276
1276
  }
1277
1277
  });
1278
1278
 
1279
- var _sfc_main$t = defineComponent({
1279
+ var _sfc_main$v = defineComponent({
1280
1280
  ...{
1281
1281
  name: "Loading",
1282
1282
  inheritAttrs: true
@@ -1300,7 +1300,7 @@ var _sfc_main$t = defineComponent({
1300
1300
  },
1301
1301
  setup(__props) {
1302
1302
  return (_ctx, _cache) => {
1303
- return openBlock(), createBlock(_sfc_main$u, {
1303
+ return openBlock(), createBlock(_sfc_main$w, {
1304
1304
  effect: unref(MOTION).fade
1305
1305
  }, {
1306
1306
  default: withCtx(() => [__props.show ? (openBlock(), createElementBlock("div", {
@@ -1315,7 +1315,7 @@ var _sfc_main$t = defineComponent({
1315
1315
  }
1316
1316
  });
1317
1317
 
1318
- var _sfc_main$s = defineComponent({
1318
+ var _sfc_main$u = defineComponent({
1319
1319
  ...{
1320
1320
  name: "Dynamic",
1321
1321
  inheritAttrs: false
@@ -1339,7 +1339,7 @@ var _sfc_main$s = defineComponent({
1339
1339
  const loadingComponent = defineComponent({
1340
1340
  inheritAttrs: false,
1341
1341
  components: {
1342
- Loading: _sfc_main$t
1342
+ Loading: _sfc_main$v
1343
1343
  },
1344
1344
  template: "<Loading :mask-disabled='true' />"
1345
1345
  });
@@ -1406,7 +1406,7 @@ var _sfc_main$s = defineComponent({
1406
1406
  }
1407
1407
  });
1408
1408
 
1409
- var _sfc_main$r = defineComponent({
1409
+ var _sfc_main$t = defineComponent({
1410
1410
  ...{
1411
1411
  name: "DialogContainer",
1412
1412
  inheritAttrs: true
@@ -1451,7 +1451,7 @@ var _sfc_main$r = defineComponent({
1451
1451
  onClick: _cache[1] || (_cache[1] = withModifiers($event => {
1452
1452
  __props.options.closeOnMask && unref(closePopup)();
1453
1453
  }, ["self"]))
1454
- }, [createVNode(_sfc_main$s, mergeProps({
1454
+ }, [createVNode(_sfc_main$u, mergeProps({
1455
1455
  class: "dialog-body",
1456
1456
  name: __props.options.name,
1457
1457
  component: __props.options.component,
@@ -1466,7 +1466,7 @@ var _sfc_main$r = defineComponent({
1466
1466
  }
1467
1467
  });
1468
1468
 
1469
- var _sfc_main$q = defineComponent({
1469
+ var _sfc_main$s = defineComponent({
1470
1470
  ...{
1471
1471
  name: "FollowContainer",
1472
1472
  inheritAttrs: true
@@ -1587,7 +1587,7 @@ var _sfc_main$q = defineComponent({
1587
1587
  });
1588
1588
  });
1589
1589
  return (_ctx, _cache) => {
1590
- return openBlock(), createBlock(_sfc_main$s, mergeProps({
1590
+ return openBlock(), createBlock(_sfc_main$u, mergeProps({
1591
1591
  class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
1592
1592
  style: {
1593
1593
  "z-index": __props.zIndex
@@ -1604,7 +1604,7 @@ var _sfc_main$q = defineComponent({
1604
1604
  }
1605
1605
  });
1606
1606
 
1607
- var _sfc_main$p = defineComponent({
1607
+ var _sfc_main$r = defineComponent({
1608
1608
  ...{
1609
1609
  name: "PopupContainer",
1610
1610
  inheritAttrs: true
@@ -1624,7 +1624,7 @@ var _sfc_main$p = defineComponent({
1624
1624
  model = shallowRef(void 0)
1625
1625
  } = __props.options;
1626
1626
  return (_ctx, _cache) => {
1627
- return openBlock(), createBlock(_sfc_main$s, mergeProps({
1627
+ return openBlock(), createBlock(_sfc_main$u, mergeProps({
1628
1628
  class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
1629
1629
  style: {
1630
1630
  "z-index": __props.zIndex
@@ -1642,12 +1642,12 @@ var _sfc_main$p = defineComponent({
1642
1642
  }
1643
1643
  });
1644
1644
 
1645
- const _hoisted_1$f = {
1645
+ const _hoisted_1$g = {
1646
1646
  key: 1,
1647
1647
  class: "icon"
1648
1648
  };
1649
- const _hoisted_2$8 = ["innerHTML"];
1650
- var _sfc_main$o = defineComponent({
1649
+ const _hoisted_2$a = ["innerHTML"];
1650
+ var _sfc_main$q = defineComponent({
1651
1651
  ...{
1652
1652
  name: "ToastContainer",
1653
1653
  inheritAttrs: true
@@ -1684,7 +1684,7 @@ var _sfc_main$o = defineComponent({
1684
1684
  }),
1685
1685
  onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
1686
1686
  onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
1687
- }, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$C, {
1687
+ }, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$E, {
1688
1688
  key: 0,
1689
1689
  class: "close-icon",
1690
1690
  type: "close",
@@ -1695,21 +1695,21 @@ var _sfc_main$o = defineComponent({
1695
1695
  onClick: _cache[0] || (_cache[0] = $event => {
1696
1696
  unref(closePopup)();
1697
1697
  })
1698
- })) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$f, [createVNode(_sfc_main$C, {
1698
+ })) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$g, [createVNode(_sfc_main$E, {
1699
1699
  type: unref(props).type,
1700
1700
  color: "#707070",
1701
1701
  size: 20
1702
1702
  }, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
1703
1703
  class: "message",
1704
1704
  innerHTML: unref(props).message
1705
- }, null, 8, _hoisted_2$8)], 38);
1705
+ }, null, 8, _hoisted_2$a)], 38);
1706
1706
  };
1707
1707
  }
1708
1708
  });
1709
1709
 
1710
1710
  function usePopup() {
1711
1711
  function popup(options) {
1712
- const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$p, options);
1712
+ const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$r, options);
1713
1713
  return addScope2Scopes(scope);
1714
1714
  }
1715
1715
  function dialog(options) {
@@ -1742,7 +1742,7 @@ function usePopup() {
1742
1742
  },
1743
1743
  onBeforeClose: fn => hook.register("onBeforeClose", fn)
1744
1744
  });
1745
- const descriptor = openPopup(_sfc_main$r, options, extOptions);
1745
+ const descriptor = openPopup(_sfc_main$t, options, extOptions);
1746
1746
  scope = useAsyncScope(deferred.promise);
1747
1747
  monitorDialog(descriptor, scope, deferred);
1748
1748
  }
@@ -1750,7 +1750,7 @@ function usePopup() {
1750
1750
  }
1751
1751
  function follow(target, options) {
1752
1752
  var scope = void 0;
1753
- if (target instanceof HTMLElement == false) {
1753
+ if (target instanceof Element == false) {
1754
1754
  const deferred = defer();
1755
1755
  deferred.reject("follow: target must be an HTMLElement.");
1756
1756
  scope = useAsyncScope(deferred.promise);
@@ -1760,14 +1760,14 @@ function usePopup() {
1760
1760
  inPopup: "follow",
1761
1761
  target
1762
1762
  };
1763
- scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$q, options, extOptions);
1763
+ scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$s, options, extOptions);
1764
1764
  }
1765
1765
  return addScope2Scopes(scope);
1766
1766
  }
1767
1767
  function confirm(title, message, options) {
1768
1768
  options = options || Object.create(null);
1769
1769
  return dialog({
1770
- component: _sfc_main$v,
1770
+ component: _sfc_main$x,
1771
1771
  closeOnEscape: true,
1772
1772
  props: {
1773
1773
  ...options,
@@ -1777,7 +1777,7 @@ function usePopup() {
1777
1777
  });
1778
1778
  }
1779
1779
  function toast(type, message, options) {
1780
- return popupInCustomContainer(_sfc_main$o, {
1780
+ return popupInCustomContainer(_sfc_main$q, {
1781
1781
  url: "#ToastContainer",
1782
1782
  props: {
1783
1783
  ...(options || Object.create(null)),
@@ -1810,7 +1810,7 @@ function usePopup() {
1810
1810
  },
1811
1811
  ...extOptions
1812
1812
  });
1813
- const descriptor = openPopup(container || _sfc_main$p, options, extOptions);
1813
+ const descriptor = openPopup(container || _sfc_main$r, options, extOptions);
1814
1814
  const scope = useAsyncScope(deferred.promise);
1815
1815
  scope.onDestroy(() => destroyPopup(descriptor, deferred));
1816
1816
  return scope;
@@ -1945,12 +1945,12 @@ function getNoDataBase64Image() {
1945
1945
  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==";
1946
1946
  }
1947
1947
 
1948
- const _hoisted_1$e = {
1948
+ const _hoisted_1$f = {
1949
1949
  class: "snail-empty"
1950
1950
  };
1951
- const _hoisted_2$7 = ["src"];
1951
+ const _hoisted_2$9 = ["src"];
1952
1952
  const _hoisted_3$6 = ["textContent"];
1953
- var _sfc_main$n = defineComponent({
1953
+ var _sfc_main$p = defineComponent({
1954
1954
  ...{
1955
1955
  name: "Empty",
1956
1956
  inheritAttrs: true
@@ -1963,9 +1963,9 @@ var _sfc_main$n = defineComponent({
1963
1963
  setup(__props) {
1964
1964
  const defaultImageBase64 = getNoDataBase64Image();
1965
1965
  return (_ctx, _cache) => {
1966
- return openBlock(), createElementBlock("div", _hoisted_1$e, [createElementVNode("img", {
1966
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [createElementVNode("img", {
1967
1967
  src: __props.imageUrl || unref(defaultImageBase64)
1968
- }, null, 8, _hoisted_2$7), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
1968
+ }, null, 8, _hoisted_2$9), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
1969
1969
  class: "message",
1970
1970
  textContent: toDisplayString(__props.message || "无数据")
1971
1971
  }, null, 8, _hoisted_3$6)])]);
@@ -1973,13 +1973,13 @@ var _sfc_main$n = defineComponent({
1973
1973
  }
1974
1974
  });
1975
1975
 
1976
- const _hoisted_1$d = ["title"];
1977
- const _hoisted_2$6 = ["textContent"];
1976
+ const _hoisted_1$e = ["title"];
1977
+ const _hoisted_2$8 = ["textContent"];
1978
1978
  const _hoisted_3$5 = {
1979
1979
  key: 1,
1980
1980
  class: "select-status"
1981
1981
  };
1982
- var _sfc_main$m = defineComponent({
1982
+ var _sfc_main$o = defineComponent({
1983
1983
  ...{
1984
1984
  name: "SelectNode",
1985
1985
  inheritAttrs: true
@@ -2024,15 +2024,15 @@ var _sfc_main$m = defineComponent({
2024
2024
  }, [createElementVNode("div", {
2025
2025
  class: "item-text ellipsis",
2026
2026
  textContent: toDisplayString(__props.item.text)
2027
- }, null, 8, _hoisted_2$6), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$C, {
2027
+ }, null, 8, _hoisted_2$8), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$E, {
2028
2028
  key: 0,
2029
2029
  type: "arrow"
2030
- })) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$C, {
2030
+ })) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$E, {
2031
2031
  type: "success",
2032
2032
  button: "",
2033
2033
  size: 12,
2034
2034
  color: "white"
2035
- })])) : createCommentVNode("", true)], 42, _hoisted_1$d)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
2035
+ })])) : createCommentVNode("", true)], 42, _hoisted_1$e)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
2036
2036
  key: 1
2037
2037
  }, renderList(unref(showChildrenRef), child => {
2038
2038
  return openBlock(), createBlock(_component_SelectNode, {
@@ -2049,7 +2049,7 @@ var _sfc_main$m = defineComponent({
2049
2049
  }
2050
2050
  });
2051
2051
 
2052
- var _sfc_main$l = defineComponent({
2052
+ var _sfc_main$n = defineComponent({
2053
2053
  ...{
2054
2054
  name: "Select2Popup",
2055
2055
  inheritAttrs: true
@@ -2221,13 +2221,13 @@ var _sfc_main$l = defineComponent({
2221
2221
  key: 0
2222
2222
  }, [createTextVNode(" 暂无选项 ")], 64)) : (openBlock(), createElementBlock(Fragment, {
2223
2223
  key: 1
2224
- }, [__props.search ? (openBlock(), createBlock(_sfc_main$w, mergeProps({
2224
+ }, [__props.search ? (openBlock(), createBlock(_sfc_main$y, mergeProps({
2225
2225
  key: 0
2226
2226
  }, __props.search, {
2227
2227
  onSearch,
2228
2228
  key: "select-search"
2229
2229
  }), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
2230
- return openBlock(), createBlock(_sfc_main$m, {
2230
+ return openBlock(), createBlock(_sfc_main$o, {
2231
2231
  key: unref(context).getKey(item),
2232
2232
  multiple: __props.multiple,
2233
2233
  item,
@@ -2236,7 +2236,7 @@ var _sfc_main$l = defineComponent({
2236
2236
  onEnter: onEnterSelectNode,
2237
2237
  onClick: onClickSelectNode
2238
2238
  }, null, 8, ["multiple", "item", "context"]);
2239
- }), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$n, {
2239
+ }), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$p, {
2240
2240
  key: 1,
2241
2241
  message: "无结果"
2242
2242
  })) : createCommentVNode("", true), showClearButtonRef.value ? (openBlock(), createElementBlock("div", {
@@ -2248,20 +2248,20 @@ var _sfc_main$l = defineComponent({
2248
2248
  }
2249
2249
  });
2250
2250
 
2251
- const _hoisted_1$c = {
2251
+ const _hoisted_1$d = {
2252
2252
  key: 0,
2253
2253
  class: "select-result"
2254
2254
  };
2255
- const _hoisted_2$5 = ["title", "textContent"];
2255
+ const _hoisted_2$7 = ["title", "textContent"];
2256
2256
  const _hoisted_3$4 = ["textContent"];
2257
2257
  const _hoisted_4$4 = {
2258
2258
  key: 1,
2259
2259
  class: "placeholder"
2260
2260
  };
2261
2261
  onAppCreated((app, type) => {
2262
- type == "popup" && app.component("SelectPopup", _sfc_main$l);
2262
+ type == "popup" && app.component("SelectPopup", _sfc_main$n);
2263
2263
  });
2264
- var _sfc_main$k = defineComponent({
2264
+ var _sfc_main$m = defineComponent({
2265
2265
  ...{
2266
2266
  name: "Select",
2267
2267
  inheritAttrs: true
@@ -2393,15 +2393,15 @@ var _sfc_main$k = defineComponent({
2393
2393
  ref: "select"
2394
2394
  }, [__props.items && __props.items.length ? (openBlock(), createElementBlock(Fragment, {
2395
2395
  key: 0
2396
- }, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$c, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
2396
+ }, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$d, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
2397
2397
  class: "select-text ellipsis",
2398
2398
  title: selectedTextRef.value,
2399
2399
  textContent: toDisplayString(selectedTextRef.value)
2400
- }, null, 8, _hoisted_2$5)])])) : (openBlock(), createElementBlock("div", {
2400
+ }, null, 8, _hoisted_2$7)])])) : (openBlock(), createElementBlock("div", {
2401
2401
  key: 1,
2402
2402
  class: "placeholder",
2403
2403
  textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
2404
- }, null, 8, _hoisted_3$4)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
2404
+ }, null, 8, _hoisted_3$4)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
2405
2405
  key: 2,
2406
2406
  type: "arrow",
2407
2407
  button: "",
@@ -2412,7 +2412,7 @@ var _sfc_main$k = defineComponent({
2412
2412
  }
2413
2413
  });
2414
2414
 
2415
- var _sfc_main$j = defineComponent({
2415
+ var _sfc_main$l = defineComponent({
2416
2416
  ...{
2417
2417
  name: "Switch",
2418
2418
  inheritAttrs: true
@@ -2461,8 +2461,8 @@ var _sfc_main$j = defineComponent({
2461
2461
  }
2462
2462
  });
2463
2463
 
2464
- const _hoisted_1$b = ["readonly", "placeholder", "rows"];
2465
- var _sfc_main$i = defineComponent({
2464
+ const _hoisted_1$c = ["readonly", "placeholder", "rows"];
2465
+ var _sfc_main$k = defineComponent({
2466
2466
  ...{
2467
2467
  name: "Textarea",
2468
2468
  inheritAttrs: true
@@ -2522,28 +2522,229 @@ var _sfc_main$i = defineComponent({
2522
2522
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2523
2523
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2524
2524
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2525
- }, null, 40, _hoisted_1$b)), [[vModelText, valueModel.value]]);
2525
+ }, null, 40, _hoisted_1$c)), [[vModelText, valueModel.value]]);
2526
2526
  };
2527
2527
  }
2528
2528
  });
2529
2529
 
2530
- function isLeft(root) {
2531
- return root.scrollLeft == 0;
2532
- }
2533
- function isRight(root) {
2534
- return Math.abs(root.scrollWidth - root.clientWidth - root.scrollLeft) < 1;
2535
- }
2536
- function isTop(root) {
2537
- return root.scrollTop == 0;
2538
- }
2539
- function isBottom(root) {
2540
- return Math.abs(root.scrollHeight - root.clientHeight - root.scrollTop) < 1;
2541
- }
2530
+ const _hoisted_1$b = ["onClick"];
2531
+ const _hoisted_2$6 = ["textContent"];
2532
+ var _sfc_main$j = defineComponent({
2533
+ __name: "action-items",
2534
+ props: {
2535
+ mode: {},
2536
+ actions: {},
2537
+ inPopup: {},
2538
+ closePopup: {
2539
+ type: Function
2540
+ },
2541
+ popupStatus: {},
2542
+ target: {},
2543
+ followX: {},
2544
+ followY: {},
2545
+ pinned: {}
2546
+ },
2547
+ emits: ["trigger"],
2548
+ setup(__props, _ref) {
2549
+ let {
2550
+ emit: __emit
2551
+ } = _ref;
2552
+ const props = __props;
2553
+ const emits = __emit;
2554
+ function onActionItemClick(code) {
2555
+ emits("trigger", code);
2556
+ props.inPopup && props.closePopup(code);
2557
+ }
2558
+ return (_ctx, _cache) => {
2559
+ return openBlock(), createElementBlock("div", {
2560
+ class: normalizeClass(["snail-action-items", [unref(correctString)(__props.mode, "vertical", true), unref(isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
2561
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, action => {
2562
+ return openBlock(), createElementBlock("div", {
2563
+ class: "action-item flex-cross-center",
2564
+ key: action.code,
2565
+ style: normalizeStyle({
2566
+ "--color": unref(correctString)(action.color, null, true),
2567
+ "--hcolor": unref(correctString)(action.hoverColor, null, true)
2568
+ }),
2569
+ onClick: $event => onActionItemClick(action.code)
2570
+ }, [action.icon != void 0 ? (openBlock(), createBlock(_sfc_main$E, mergeProps({
2571
+ key: 0,
2572
+ ref_for: true
2573
+ }, action.icon, {
2574
+ custom: false,
2575
+ size: 20
2576
+ }), null, 16)) : createCommentVNode("", true), createElementVNode("span", {
2577
+ class: "ellipsis",
2578
+ textContent: toDisplayString(action.name)
2579
+ }, null, 8, _hoisted_2$6)], 12, _hoisted_1$b);
2580
+ }), 128))], 2);
2581
+ };
2582
+ }
2583
+ });
2542
2584
 
2543
2585
  const _hoisted_1$a = {
2544
- class: "snail-elastic"
2586
+ class: "snail-action flex-cross-center",
2587
+ ref: "snail-action"
2545
2588
  };
2589
+ const _hoisted_2$5 = ["title"];
2590
+ var _sfc_main$i = defineComponent({
2591
+ __name: "action",
2592
+ props: {
2593
+ trigger: {},
2594
+ actions: {}
2595
+ },
2596
+ emits: ["trigger"],
2597
+ setup(__props, _ref) {
2598
+ let {
2599
+ emit: __emit
2600
+ } = _ref;
2601
+ const props = __props;
2602
+ const emits = __emit;
2603
+ const {
2604
+ follow
2605
+ } = usePopup();
2606
+ const {
2607
+ onEvent
2608
+ } = useObserver();
2609
+ const rootDom = useTemplateRef("snail-action");
2610
+ let popupScope = void 0;
2611
+ let pressStartDate = void 0;
2612
+ async function onFollowShow(longPress) {
2613
+ if (popupScope && popupScope.destroyed != true) {
2614
+ popupScope.destroy();
2615
+ return;
2616
+ }
2617
+ popupScope = follow(rootDom.value, {
2618
+ component: _sfc_main$j,
2619
+ closeOnEscape: true,
2620
+ closeOnMask: true,
2621
+ closeOnResize: true,
2622
+ closeOnTarget: true,
2623
+ followX: longPress ? ["center", "start", "end"] : ["after", "end", "start", "end", "center"],
2624
+ followY: longPress ? ["center", "after", "before"] : ["after", "before", "center", "end", "after"],
2625
+ props: {
2626
+ mode: "vertical",
2627
+ actions: props.actions
2628
+ }
2629
+ });
2630
+ const code = await popupScope;
2631
+ isStringNotEmpty(code) && emits("trigger", code);
2632
+ }
2633
+ function onMouseDown() {
2634
+ if (props.trigger == "long-press" && pressStartDate == void 0) {
2635
+ pressStartDate = new Date();
2636
+ }
2637
+ }
2638
+ function onMouseUp() {
2639
+ if (pressStartDate != void 0) {
2640
+ const time = ((new Date()).getTime() - pressStartDate.getTime()) / 1e3;
2641
+ pressStartDate = void 0;
2642
+ if (time >= 0.5) {
2643
+ navigator.vibrate && navigator.vibrate(200);
2644
+ onFollowShow(true);
2645
+ }
2646
+ }
2647
+ }
2648
+ function onMouseCancel() {
2649
+ setTimeout(() => pressStartDate = void 0, 10);
2650
+ }
2651
+ onMounted(() => {
2652
+ onEvent(rootDom.value, "mousedown", onMouseDown);
2653
+ onEvent(rootDom.value, "mouseup", onMouseUp);
2654
+ if ("ontouchstart" in window) {
2655
+ onEvent(rootDom.value, "touchstart", onMouseDown);
2656
+ onEvent(rootDom.value, "touchend", onMouseUp);
2657
+ }
2658
+ onEvent(window, "mouseup", onMouseCancel);
2659
+ if ("ontouchstart" in window) {
2660
+ onEvent(window, "touchend", onMouseCancel);
2661
+ onEvent(window, "touchcancel", onMouseCancel);
2662
+ }
2663
+ });
2664
+ return (_ctx, _cache) => {
2665
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", {
2666
+ class: "action-slot flex-cross-center",
2667
+ title: String(__props.trigger == "hover")
2668
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_2$5), __props.trigger == "hover" ? (openBlock(), createBlock(_sfc_main$E, {
2669
+ key: 0,
2670
+ class: "hover-tips",
2671
+ button: "",
2672
+ custom: "",
2673
+ size: 16,
2674
+ onClick: _cache[0] || (_cache[0] = $event => onFollowShow(false))
2675
+ }, {
2676
+ default: withCtx(() => [...(_cache[1] || (_cache[1] = [createElementVNode("path", {
2677
+ 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"
2678
+ }, null, -1)]))]),
2679
+ _: 1
2680
+ })) : createCommentVNode("", true)], 512);
2681
+ };
2682
+ }
2683
+ });
2684
+
2685
+ function monitScroll(manager, root, options, emiter, classStyleRef) {
2686
+ const scope = useScope();
2687
+ let preStatus = void 0;
2688
+ const observer = useObserver();
2689
+ const timer = useTimer();
2690
+ const reactive = useReactive();
2691
+ function buildClassStyle() {
2692
+ const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item == "x-bar" || item == "y-bar");
2693
+ array.push(...manager.buildClassStyle(options));
2694
+ classStyleRef.value = array;
2695
+ }
2696
+ function refreshScrollInfo() {
2697
+ const status = Object.freeze(manager.getStatus(root));
2698
+ const events = Object.create(null);
2699
+ if (preStatus != void 0) {
2700
+ preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
2701
+ preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
2702
+ if (preStatus.xbar == true && status.xbar == true) {
2703
+ status.left && preStatus.left !== status.left && (events.left = []);
2704
+ status.right && preStatus.right !== status.right && (events.right = []);
2705
+ }
2706
+ if (preStatus.ybar == true && status.ybar == true) {
2707
+ status.top && preStatus.top !== status.top && (events.top = []);
2708
+ status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
2709
+ }
2710
+ }
2711
+ preStatus = status;
2712
+ events.xbar && emiter("xbar", ...events.xbar);
2713
+ events.left && emiter("left");
2714
+ events.right && emiter("right");
2715
+ events.ybar && emiter("ybar", ...events.ybar);
2716
+ events.top && emiter("top");
2717
+ events.bottom && emiter("bottom");
2718
+ {
2719
+ const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item != "x-bar" && item != "y-bar");
2720
+ status.xbar && array.push("x-bar");
2721
+ status.ybar && array.push("y-bar");
2722
+ classStyleRef.value = array;
2723
+ }
2724
+ }
2725
+ buildClassStyle();
2726
+ refreshScrollInfo();
2727
+ reactive.watcher(() => options.scroll, buildClassStyle);
2728
+ reactive.watcher(() => options.barSize, buildClassStyle);
2729
+ observer.onSize(root, refreshScrollInfo);
2730
+ observer.onEvent(root, "scroll", refreshScrollInfo);
2731
+ timer.onInterval(() => {
2732
+ const isChange = preStatus.scrollWidth != root.scrollWidth || preStatus.scrollHeight != root.scrollHeight;
2733
+ isChange && refreshScrollInfo();
2734
+ }, 100);
2735
+ scope.onDestroy(() => {
2736
+ observer.destroyed || observer.destroy();
2737
+ timer.destroyed || timer.destroy();
2738
+ reactive.destroyed || reactive.destroy();
2739
+ });
2740
+ return scope;
2741
+ }
2742
+
2546
2743
  var _sfc_main$h = defineComponent({
2744
+ ...{
2745
+ name: "Elastic",
2746
+ inheritAttrs: false
2747
+ },
2547
2748
  __name: "elastic",
2548
2749
  props: {
2549
2750
  scroll: {},
@@ -2556,23 +2757,26 @@ var _sfc_main$h = defineComponent({
2556
2757
  type: Boolean
2557
2758
  }
2558
2759
  },
2559
- emits: ["refresh", "more"],
2760
+ emits: ["xbar", "left", "right", "ybar", "top", "bottom", "refresh", "more"],
2560
2761
  setup(__props, _ref) {
2561
2762
  let {
2763
+ expose: __expose,
2562
2764
  emit: __emit
2563
2765
  } = _ref;
2766
+ __expose({
2767
+ loadRefresh,
2768
+ loadMore
2769
+ });
2564
2770
  const props = __props;
2565
2771
  const emits = __emit;
2566
2772
  const {
2567
- onEvent,
2568
- onSize
2773
+ onEvent
2569
2774
  } = useObserver();
2570
- const {
2571
- watcher
2572
- } = useReactive();
2775
+ const manager = useScroll();
2573
2776
  const downRefreshDom = useTemplateRef("down-refresh");
2574
2777
  const mainBodyDom = useTemplateRef("main-body");
2575
2778
  const upMoreDom = useTemplateRef("up-more");
2779
+ const classStyleRef = shallowRef();
2576
2780
  let isStartByTouch = false;
2577
2781
  const startPointerRef = ref(void 0);
2578
2782
  const isMovingRef = shallowRef(false);
@@ -2582,17 +2786,6 @@ var _sfc_main$h = defineComponent({
2582
2786
  const loadingRef = shallowRef();
2583
2787
  function buildMainBodyStyle() {
2584
2788
  const style = Object.create(null);
2585
- switch (props.scroll) {
2586
- case "x":
2587
- style["overflow"] = "auto hidden";
2588
- break;
2589
- case "y":
2590
- style["overflow"] = "hidden auto";
2591
- break;
2592
- case "none":
2593
- style["overflow"] = "none";
2594
- break;
2595
- }
2596
2789
  if (springStatusRef.value != void 0) {
2597
2790
  const {
2598
2791
  x,
@@ -2605,6 +2798,41 @@ var _sfc_main$h = defineComponent({
2605
2798
  }
2606
2799
  return style;
2607
2800
  }
2801
+ function loadRefresh() {
2802
+ const deferred = defer();
2803
+ if (downRefreshDom.value == void 0) {
2804
+ deferred.reject("not support pullRefresh feature!");
2805
+ } else if (loadingRef.value != void 0) {
2806
+ deferred.reject(`pre load task[${loadingRef.value}] is running!`);
2807
+ } else {
2808
+ resetAfterEnd();
2809
+ loadingRef.value = "refresh";
2810
+ springStatusRef.value.y = downRefreshDom.value.clientHeight;
2811
+ emits("refresh", () => {
2812
+ resetAfterEnd();
2813
+ deferred.resolve();
2814
+ });
2815
+ }
2816
+ return deferred.promise;
2817
+ }
2818
+ function loadMore() {
2819
+ const deferred = defer();
2820
+ if (downRefreshDom.value == void 0) {
2821
+ deferred.reject("not support upMore feature!");
2822
+ } else if (loadingRef.value != void 0) {
2823
+ deferred.reject(`pre load task[${loadingRef.value}] is running!`);
2824
+ } else {
2825
+ resetAfterEnd();
2826
+ loadingRef.value = "more";
2827
+ springStatusRef.value.y = -upMoreDom.value.clientHeight;
2828
+ emits("more", () => {
2829
+ resetAfterEnd();
2830
+ deferred.resolve();
2831
+ });
2832
+ return;
2833
+ }
2834
+ return deferred.promise;
2835
+ }
2608
2836
  function onSpringStart(isTouch, position) {
2609
2837
  if (loadingRef.value != void 0) {
2610
2838
  return;
@@ -2627,9 +2855,9 @@ var _sfc_main$h = defineComponent({
2627
2855
  isMovingRef.value = true;
2628
2856
  if (springXRef.value == true) {
2629
2857
  const distance = position.clientX - startPointerRef.value.clientX;
2630
- if (distance >= 0 && isLeft(mainBodyDom.value)) {
2858
+ if (distance >= 0 && manager.isLeft(mainBodyDom.value)) {
2631
2859
  springStatusRef.value.x = Math.pow(distance, 0.8);
2632
- } else if (distance <= 0 && isRight(mainBodyDom.value)) {
2860
+ } else if (distance <= 0 && manager.isRight(mainBodyDom.value)) {
2633
2861
  springStatusRef.value.x = -Math.pow(-distance, 0.8);
2634
2862
  }
2635
2863
  }
@@ -2639,10 +2867,10 @@ var _sfc_main$h = defineComponent({
2639
2867
  default:
2640
2868
  {
2641
2869
  if (distance >= 0) {
2642
- isTop(mainBodyDom.value) ? springStatusRef.value.y = Math.pow(distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2870
+ manager.isTop(mainBodyDom.value) ? springStatusRef.value.y = Math.pow(distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2643
2871
  } else {
2644
2872
  console.log("isBottom", mainBodyDom.value.scrollTop + mainBodyDom.value.clientHeight, "---", mainBodyDom.value.scrollHeight);
2645
- isBottom(mainBodyDom.value) ? springStatusRef.value.y = -Math.pow(-distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2873
+ manager.isBottom(mainBodyDom.value) ? springStatusRef.value.y = -Math.pow(-distance, 0.8) : startPointerRef.value.clientY = position.clientY;
2646
2874
  }
2647
2875
  break;
2648
2876
  }
@@ -2658,18 +2886,10 @@ var _sfc_main$h = defineComponent({
2658
2886
  }
2659
2887
  if (loadingRef.value == void 0) {
2660
2888
  if (downRefreshDom.value && springStatusRef.value.y > downRefreshDom.value.clientHeight) {
2661
- resetAfterEnd();
2662
- loadingRef.value = "refresh";
2663
- springStatusRef.value.y = downRefreshDom.value.clientHeight;
2664
- emits("refresh", resetAfterEnd);
2665
- return;
2889
+ return loadRefresh();
2666
2890
  }
2667
2891
  if (upMoreDom.value && springStatusRef.value.y <= -upMoreDom.value.clientHeight) {
2668
- resetAfterEnd();
2669
- loadingRef.value = "more";
2670
- springStatusRef.value.y = -upMoreDom.value.clientHeight;
2671
- emits("more", resetAfterEnd);
2672
- return;
2892
+ return loadMore();
2673
2893
  }
2674
2894
  }
2675
2895
  resetAfterEnd();
@@ -2682,6 +2902,7 @@ var _sfc_main$h = defineComponent({
2682
2902
  isStartByTouch = false;
2683
2903
  }
2684
2904
  onMounted(() => {
2905
+ monitScroll(manager, mainBodyDom.value, props, emits, classStyleRef);
2685
2906
  if ("ontouchstart" in window) {
2686
2907
  onEvent(mainBodyDom.value, "touchstart", evt => onSpringStart(true, evt.touches[0]));
2687
2908
  onEvent(window, "touchmove", evt => onSpringMove(true, evt.touches[0]));
@@ -2695,28 +2916,32 @@ var _sfc_main$h = defineComponent({
2695
2916
  }
2696
2917
  });
2697
2918
  return (_ctx, _cache) => {
2698
- return openBlock(), createElementBlock("div", _hoisted_1$a, [springYRef.value == true && __props.downRefresh == true ? withDirectives((openBlock(), createElementBlock("div", {
2699
- key: 0,
2919
+ return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
2920
+ class: "snail-elastic"
2921
+ }), [springYRef.value == true && __props.downRefresh == true ? withDirectives((openBlock(), createElementBlock("div", {
2700
2922
  class: normalizeClass(["down-refresh", {
2701
2923
  "running": loadingRef.value == "refresh"
2702
2924
  }]),
2925
+ key: "down-refresh",
2703
2926
  ref: "down-refresh"
2704
2927
  }, [renderSlot(_ctx.$slots, "down-refresh", {}, () => [_cache[0] || (_cache[0] = createElementVNode("div", {
2705
2928
  class: "flex-center default-loading"
2706
2929
  }, [createElementVNode("span"), createElementVNode("span"), createElementVNode("span")], -1))])], 2)), [[vShow, loadingRef.value != "more"]]) : createCommentVNode("", true), createElementVNode("div", {
2707
- class: normalizeClass(["main-body wh-fill", [__props.barSize ? `${__props.barSize}-scrollbar` : "", isMovingRef.value ? "moving" : ""]]),
2930
+ class: normalizeClass(["main-body wh-fill", classStyleRef.value, {
2931
+ "moving": isMovingRef.value
2932
+ }]),
2708
2933
  ref: "main-body",
2709
2934
  key: "main-body",
2710
2935
  style: normalizeStyle(buildMainBodyStyle())
2711
2936
  }, [renderSlot(_ctx.$slots, "default")], 6), springYRef.value == true && __props.upMore == true ? withDirectives((openBlock(), createElementBlock("div", {
2712
- key: 1,
2713
2937
  class: normalizeClass(["up-more", {
2714
2938
  "running": loadingRef.value == "more"
2715
2939
  }]),
2940
+ key: "up-more",
2716
2941
  ref: "up-more"
2717
2942
  }, [renderSlot(_ctx.$slots, "up-more", {}, () => [_cache[1] || (_cache[1] = createElementVNode("div", {
2718
2943
  class: "flex-center default-loading"
2719
- }, [createElementVNode("span"), createElementVNode("span"), createElementVNode("span")], -1))])], 2)), [[vShow, loadingRef.value != "refresh"]]) : createCommentVNode("", true)]);
2944
+ }, [createElementVNode("span"), createElementVNode("span"), createElementVNode("span")], -1))])], 2)), [[vShow, loadingRef.value != "refresh"]]) : createCommentVNode("", true)], 16);
2720
2945
  };
2721
2946
  }
2722
2947
  });
@@ -2906,7 +3131,7 @@ var _sfc_main$f = defineComponent({
2906
3131
  key: 0,
2907
3132
  class: "subtitle ellipsis",
2908
3133
  textContent: toDisplayString(__props.subtitle)
2909
- }, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$C, {
3134
+ }, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$E, {
2910
3135
  custom: false,
2911
3136
  type: "arrow",
2912
3137
  button: "",
@@ -2921,7 +3146,7 @@ var _sfc_main$f = defineComponent({
2921
3146
  var _sfc_main$e = defineComponent({
2922
3147
  ...{
2923
3148
  name: "Scroll",
2924
- inheritAttrs: true
3149
+ inheritAttrs: false
2925
3150
  },
2926
3151
  __name: "scroll",
2927
3152
  props: {
@@ -2937,102 +3162,27 @@ var _sfc_main$e = defineComponent({
2937
3162
  const props = __props;
2938
3163
  const emits = __emit;
2939
3164
  const rootDom = useTemplateRef("scroll-root");
2940
- const {
2941
- onSize
2942
- } = useObserver();
2943
- const {
2944
- onInterval
2945
- } = useTimer();
2946
- var preStatus = void 0;
3165
+ const manager = useScroll();
3166
+ const classStyleRef = shallowRef();
2947
3167
  __expose({
2948
- scroll,
2949
- scrollTo
2950
- });
2951
- function buildStyle() {
2952
- const style = Object.create(null);
2953
- switch (props.scroll) {
2954
- case "x":
2955
- style["overflow"] = "auto hidden";
2956
- break;
2957
- case "y":
2958
- style["overflow"] = "hidden auto";
2959
- break;
2960
- case "none":
2961
- style["overflow"] = "none";
2962
- break;
2963
- }
2964
- return style;
2965
- }
2966
- function scroll(left, top) {
2967
- left == void 0 || (rootDom.value.scrollLeft += left);
2968
- top == void 0 || (rootDom.value.scrollTop += top);
2969
- }
2970
- function scrollTo(left, top) {
2971
- left == void 0 || (rootDom.value.scrollLeft = left);
2972
- top == void 0 || (rootDom.value.scrollTop = top);
2973
- }
2974
- function refreshScrollInfo() {
2975
- const status = {
2976
- xbar: rootDom.value.scrollWidth > rootDom.value.clientWidth,
2977
- ybar: rootDom.value.scrollHeight > rootDom.value.clientHeight,
2978
- left: false,
2979
- right: false,
2980
- top: false,
2981
- bottom: false,
2982
- scrollwidth: rootDom.value.scrollWidth,
2983
- scrollheight: rootDom.value.scrollHeight
2984
- };
2985
- if (status.xbar == true) {
2986
- status.left = rootDom.value.scrollLeft == 0;
2987
- status.right = rootDom.value.scrollLeft + rootDom.value.clientWidth == rootDom.value.scrollWidth;
2988
- }
2989
- if (status.ybar == true) {
2990
- status.top = rootDom.value.scrollTop == 0;
2991
- status.bottom = rootDom.value.scrollTop + rootDom.value.clientHeight == rootDom.value.scrollHeight;
2992
- }
2993
- Object.freeze(status);
2994
- const events = Object.create(null);
2995
- if (preStatus != void 0) {
2996
- preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
2997
- preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
2998
- if (preStatus.xbar == true && status.xbar == true) {
2999
- status.left && preStatus.left !== status.left && (events.left = []);
3000
- status.right && preStatus.right !== status.right && (events.right = []);
3001
- }
3002
- if (preStatus.ybar == true && status.ybar == true) {
3003
- status.top && preStatus.top !== status.top && (events.top = []);
3004
- status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
3005
- }
3006
- }
3007
- preStatus = status;
3008
- preStatus = Object.freeze(status);
3009
- events.xbar && emits("xbar", ...events.xbar);
3010
- events.left && emits("left");
3011
- events.right && emits("right");
3012
- events.ybar && emits("ybar", ...events.ybar);
3013
- events.top && emits("top");
3014
- events.bottom && emits("bottom");
3015
- if (rootDom.value) {
3016
- rootDom.value.classList.remove("x-bar", "y-bar");
3017
- status.xbar && rootDom.value.classList.add("x-bar");
3018
- status.ybar && rootDom.value.classList.add("y-bar");
3168
+ getStatus() {
3169
+ return manager.getStatus(rootDom.value);
3170
+ },
3171
+ scroll(left, top) {
3172
+ left == void 0 || (rootDom.value.scrollLeft += left);
3173
+ top == void 0 || (rootDom.value.scrollTop += top);
3174
+ },
3175
+ scrollTo(left, top) {
3176
+ left == void 0 || (rootDom.value.scrollLeft = left);
3177
+ top == void 0 || (rootDom.value.scrollTop = top);
3019
3178
  }
3020
- }
3021
- onMounted(() => {
3022
- refreshScrollInfo();
3023
- onSize(rootDom.value, refreshScrollInfo);
3024
- onInterval(() => {
3025
- const isChange = preStatus.scrollwidth != rootDom.value.scrollWidth || preStatus.scrollheight != rootDom.value.scrollHeight;
3026
- isChange && refreshScrollInfo();
3027
- }, 100);
3028
3179
  });
3180
+ onMounted(() => monitScroll(manager, rootDom.value, props, emits, classStyleRef));
3029
3181
  return (_ctx, _cache) => {
3030
- return openBlock(), createElementBlock("div", {
3031
- class: normalizeClass(["snail-scroll", __props.barSize ? `${__props.barSize}-scrollbar` : ""]),
3032
- ref: "scroll-root",
3033
- style: normalizeStyle(buildStyle()),
3034
- onScroll: refreshScrollInfo
3035
- }, [renderSlot(_ctx.$slots, "default")], 38);
3182
+ return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
3183
+ class: ["snail-scroll", classStyleRef.value],
3184
+ ref: "scroll-root"
3185
+ }), [renderSlot(_ctx.$slots, "default")], 16);
3036
3186
  };
3037
3187
  }
3038
3188
  });
@@ -3455,7 +3605,7 @@ var _sfc_main$8 = defineComponent({
3455
3605
  key: 1
3456
3606
  }, [_cache[5] || (_cache[5] = createElementVNode("div", {
3457
3607
  class: "indent"
3458
- }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$C, {
3608
+ }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$E, {
3459
3609
  key: 0,
3460
3610
  class: normalizeClass(statusRef.value),
3461
3611
  custom: "",
@@ -3527,7 +3677,7 @@ var _sfc_main$7 = defineComponent({
3527
3677
  emits("click", node, parents);
3528
3678
  }
3529
3679
  return (_ctx, _cache) => {
3530
- return openBlock(), createElementBlock("div", _hoisted_1$6, [__props.search ? (openBlock(), createBlock(_sfc_main$w, mergeProps({
3680
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [__props.search ? (openBlock(), createBlock(_sfc_main$y, mergeProps({
3531
3681
  key: 0
3532
3682
  }, __props.search, {
3533
3683
  onSearch
@@ -3578,7 +3728,7 @@ var _sfc_main$6 = defineComponent({
3578
3728
  return (_ctx, _cache) => {
3579
3729
  return openBlock(), createElementBlock("div", {
3580
3730
  class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
3581
- }, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$z, mergeProps({
3731
+ }, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$B, mergeProps({
3582
3732
  key: 0
3583
3733
  }, __props.header || {
3584
3734
  useTo: "dialog",
@@ -3592,7 +3742,7 @@ var _sfc_main$6 = defineComponent({
3592
3742
  }), {
3593
3743
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
3594
3744
  _: 3
3595
- }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$A, mergeProps({
3745
+ }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$C, mergeProps({
3596
3746
  key: 1
3597
3747
  }, __props.footer || {}, {
3598
3748
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -3606,7 +3756,7 @@ function mount(target, options, onDestroyed) {
3606
3756
  mustObject(options, "options");
3607
3757
  target instanceof HTMLElement || throwError("target must be a HTMLElement");
3608
3758
  target.classList.add("snail-app");
3609
- const app = createApp(_sfc_main$s, options);
3759
+ const app = createApp(_sfc_main$u, options);
3610
3760
  triggerAppCreated(app);
3611
3761
  app.mount(target);
3612
3762
  const scope = useScope().onDestroy(() => app.unmount());
@@ -3902,7 +4052,7 @@ var _sfc_main$4 = defineComponent({
3902
4052
  }]),
3903
4053
  mode: "vertical"
3904
4054
  }, createSlots({
3905
- main: withCtx(() => [createVNode(_sfc_main$u, {
4055
+ main: withCtx(() => [createVNode(_sfc_main$w, {
3906
4056
  multiple: "",
3907
4057
  effect: unref(MOTION).top
3908
4058
  }, {
@@ -3942,19 +4092,19 @@ var _sfc_main$4 = defineComponent({
3942
4092
  _: 2
3943
4093
  }, [__props.toolbarDisabled != true ? {
3944
4094
  name: "bottom",
3945
- fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4095
+ fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
3946
4096
  key: 0,
3947
4097
  type: "link",
3948
4098
  size: "small",
3949
4099
  textContent: "清空",
3950
4100
  onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
3951
- })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4101
+ })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
3952
4102
  key: 1,
3953
4103
  type: "link",
3954
4104
  size: "small",
3955
4105
  textContent: "现在",
3956
4106
  onClick: _cache[1] || (_cache[1] = $event => rebuildItems(unref(getTimeValue)(new Date())))
3957
- })) : createCommentVNode("", true), createVNode(_sfc_main$D, {
4107
+ })) : createCommentVNode("", true), createVNode(_sfc_main$F, {
3958
4108
  type: "link",
3959
4109
  size: "small",
3960
4110
  textContent: "确定",
@@ -4208,7 +4358,7 @@ var _sfc_main$3 = defineComponent({
4208
4358
  height: "30px"
4209
4359
  }
4210
4360
  }, createSlots({
4211
- top: withCtx(() => [createVNode(_sfc_main$C, {
4361
+ top: withCtx(() => [createVNode(_sfc_main$E, {
4212
4362
  type: "arrow",
4213
4363
  button: "",
4214
4364
  rotate: 180,
@@ -4228,7 +4378,7 @@ var _sfc_main$3 = defineComponent({
4228
4378
  key: 0,
4229
4379
  textContent: toDisplayString(`${dateRef.value.month}月`),
4230
4380
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
4231
- }, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$C, {
4381
+ }, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$E, {
4232
4382
  type: "arrow",
4233
4383
  button: "",
4234
4384
  size: 26,
@@ -4294,19 +4444,19 @@ var _sfc_main$3 = defineComponent({
4294
4444
  onClick: onSelectTime
4295
4445
  }, null, 10, _hoisted_8)) : createCommentVNode("", true), __props.toolbarDisabled != true ? (openBlock(), createElementBlock(Fragment, {
4296
4446
  key: 1
4297
- }, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4447
+ }, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
4298
4448
  key: 0,
4299
4449
  type: "link",
4300
4450
  size: "small",
4301
4451
  textContent: "清空",
4302
4452
  onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), unref(inPopup) && __props.closePopup("")))
4303
- })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4453
+ })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
4304
4454
  key: 1,
4305
4455
  type: "link",
4306
4456
  size: "small",
4307
4457
  textContent: "现在",
4308
4458
  onClick: onNow
4309
- })) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$D, {
4459
+ })) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$F, {
4310
4460
  type: "link",
4311
4461
  size: "small",
4312
4462
  textContent: "确定",
@@ -4340,7 +4490,7 @@ function usePicker() {
4340
4490
  popupOptions = {
4341
4491
  ...popupOptions
4342
4492
  };
4343
- popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
4493
+ popupOptions.followX = popupOptions.followX || ["start", "end", "center", "before", "after"];
4344
4494
  popupOptions.spaceX = correctNumber(popupOptions.spaceX, 2);
4345
4495
  popupOptions.spaceY = correctNumber(popupOptions.spaceY, 2);
4346
4496
  popupOptions.spaceClient = correctNumber(popupOptions.spaceClient, 10);
@@ -4440,7 +4590,7 @@ var _sfc_main$2 = defineComponent({
4440
4590
  type: "text",
4441
4591
  readonly: "",
4442
4592
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4443
- }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
4593
+ }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
4444
4594
  key: 0,
4445
4595
  type: "datepicker",
4446
4596
  button: "",
@@ -4526,7 +4676,7 @@ var _sfc_main$1 = defineComponent({
4526
4676
  type: "text",
4527
4677
  readonly: "",
4528
4678
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4529
- }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
4679
+ }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
4530
4680
  key: 0,
4531
4681
  type: "timepicker",
4532
4682
  button: "",
@@ -4622,12 +4772,12 @@ var _sfc_main = defineComponent({
4622
4772
  onTouchstart: onStartDrag,
4623
4773
  onTouchmove: onDragMove,
4624
4774
  onTouchend: onDragEnd
4625
- }, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$C, {
4775
+ }, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$E, {
4626
4776
  key: 0,
4627
4777
  type: "success",
4628
4778
  size: 20,
4629
4779
  color: "white"
4630
- })) : (openBlock(), createBlock(_sfc_main$C, {
4780
+ })) : (openBlock(), createBlock(_sfc_main$E, {
4631
4781
  key: 1,
4632
4782
  custom: "",
4633
4783
  size: 20,
@@ -4646,22 +4796,23 @@ var _sfc_main = defineComponent({
4646
4796
  });
4647
4797
 
4648
4798
  const components = {
4649
- Button: _sfc_main$D,
4650
- Choose: _sfc_main$B,
4651
- Footer: _sfc_main$A,
4652
- Header: _sfc_main$z,
4653
- Icon: _sfc_main$C,
4654
- Input: _sfc_main$y,
4655
- Number: _sfc_main$x,
4656
- Search: _sfc_main$w,
4657
- Select: _sfc_main$k,
4658
- Switch: _sfc_main$j,
4659
- Textarea: _sfc_main$i,
4660
- Dynamic: _sfc_main$s,
4799
+ Action: _sfc_main$i,
4800
+ Button: _sfc_main$F,
4801
+ Choose: _sfc_main$D,
4802
+ Footer: _sfc_main$C,
4803
+ Header: _sfc_main$B,
4804
+ Icon: _sfc_main$E,
4805
+ Input: _sfc_main$A,
4806
+ Number: _sfc_main$z,
4807
+ Search: _sfc_main$y,
4808
+ Select: _sfc_main$m,
4809
+ Switch: _sfc_main$l,
4810
+ Textarea: _sfc_main$k,
4811
+ Dynamic: _sfc_main$u,
4661
4812
  Elastic: _sfc_main$h,
4662
4813
  Flex: _sfc_main$g,
4663
4814
  Fold: _sfc_main$f,
4664
- Motion: _sfc_main$u,
4815
+ Motion: _sfc_main$w,
4665
4816
  Layout: _sfc_main$d,
4666
4817
  Scroll: _sfc_main$e,
4667
4818
  Sort: _sfc_main$c,
@@ -4674,8 +4825,8 @@ const components = {
4674
4825
  DatePicker: _sfc_main$2,
4675
4826
  TimePicker: _sfc_main$1,
4676
4827
  DragVerify: _sfc_main,
4677
- Empty: _sfc_main$n,
4678
- Loading: _sfc_main$t
4828
+ Empty: _sfc_main$p,
4829
+ Loading: _sfc_main$v
4679
4830
  };
4680
4831
 
4681
4832
  onMountScope(scope => {