snail.vue 2.0.20 → 2.0.22

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, useScroll, useAnimation } from 'snail.view';
4
+ import { link, css, useObserver, useScroll, useAnimation } from 'snail.view';
5
5
 
6
- const _hoisted_1$m = ["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,11 +20,15 @@ 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$m);
23
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
24
24
  };
25
25
  }
26
26
  });
27
27
 
28
+ var addLink = href => setTimeout(link.register, 0, href);
29
+
30
+ addLink("/styles/snail.vue.vue.css");
31
+
28
32
  function getBuiltinIcon(iconType) {
29
33
  switch (iconType) {
30
34
  case "success":
@@ -63,10 +67,10 @@ function getBuiltinIcon(iconType) {
63
67
  }
64
68
  }
65
69
 
66
- const _hoisted_1$l = ["viewBox"];
67
- const _hoisted_2$d = ["textContent"];
70
+ const _hoisted_1$n = ["viewBox"];
71
+ const _hoisted_2$f = ["textContent"];
68
72
  const _hoisted_3$a = ["d"];
69
- var _sfc_main$C = defineComponent({
73
+ var _sfc_main$E = defineComponent({
70
74
  __name: "icon",
71
75
  props: {
72
76
  title: {},
@@ -121,7 +125,7 @@ var _sfc_main$C = defineComponent({
121
125
  onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
122
126
  }), [createElementVNode("title", {
123
127
  textContent: toDisplayString(__props.title || "")
124
- }, null, 8, _hoisted_2$d), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
128
+ }, null, 8, _hoisted_2$f), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
125
129
  key: 0
126
130
  }) : (openBlock(true), createElementBlock(Fragment, {
127
131
  key: 1
@@ -129,16 +133,16 @@ var _sfc_main$C = defineComponent({
129
133
  return openBlock(), createElementBlock("path", {
130
134
  d
131
135
  }, null, 8, _hoisted_3$a);
132
- }), 256))], 16, _hoisted_1$l);
136
+ }), 256))], 16, _hoisted_1$n);
133
137
  };
134
138
  }
135
139
  });
136
140
 
137
- const _hoisted_1$k = ["title", "onClick"];
138
- const _hoisted_2$c = ["type", "checked"];
141
+ const _hoisted_1$m = ["title", "onClick"];
142
+ const _hoisted_2$e = ["type", "checked"];
139
143
  const _hoisted_3$9 = ["textContent"];
140
144
  const _hoisted_4$7 = ["textContent"];
141
- var _sfc_main$B = defineComponent({
145
+ var _sfc_main$D = defineComponent({
142
146
  ...{
143
147
  name: "Choose",
144
148
  inheritAttrs: true
@@ -214,10 +218,10 @@ var _sfc_main$B = defineComponent({
214
218
  key: 0,
215
219
  type: unref(type),
216
220
  checked: node.selected
217
- }, null, 8, _hoisted_2$c)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
221
+ }, null, 8, _hoisted_2$e)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
218
222
  key: 1,
219
223
  class: normalizeClass(["status", [node.selected ? "selected" : ""]])
220
- }, [node.selected ? (openBlock(), createBlock(_sfc_main$C, {
224
+ }, [node.selected ? (openBlock(), createBlock(_sfc_main$E, {
221
225
  key: 0,
222
226
  type: "success",
223
227
  size: 12,
@@ -230,17 +234,13 @@ var _sfc_main$B = defineComponent({
230
234
  key: 3,
231
235
  class: "item-des",
232
236
  textContent: toDisplayString(node.item.description)
233
- }, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$k);
237
+ }, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$m);
234
238
  }), 128))], 2);
235
239
  };
236
240
  }
237
241
  });
238
242
 
239
- var addLink = href => setTimeout(link.register, 0, href);
240
-
241
- addLink("/styles/snail.vue.vue.css");
242
-
243
- var _sfc_main$A = defineComponent({
243
+ var _sfc_main$C = defineComponent({
244
244
  ...{
245
245
  name: "Footer",
246
246
  inheritAttrs: true
@@ -271,13 +271,13 @@ var _sfc_main$A = defineComponent({
271
271
  class: normalizeClass(["snail-footer", {
272
272
  "start-divider": __props.divider
273
273
  }, __props.align || "right"])
274
- }, [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, {
275
275
  key: 0,
276
276
  size: "max",
277
277
  type: "default",
278
278
  onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
279
279
  textContent: toDisplayString(__props.cancelName || "取消")
280
- }, 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, {
281
281
  key: 1,
282
282
  size: "max",
283
283
  type: "primary",
@@ -288,8 +288,8 @@ var _sfc_main$A = defineComponent({
288
288
  }
289
289
  });
290
290
 
291
- const _hoisted_1$j = ["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$j)) : 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$i = ["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$i), __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$h = {
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$h, [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$g = ["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$g), [[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$f = {
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$f, [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$e = {
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$e, [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$d = {
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$d, [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$c = ["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$c)) : 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$b = {
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$b, [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$a = ["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,7 +2522,161 @@ 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$a)), [[vModelText, valueModel.value]]);
2525
+ }, null, 40, _hoisted_1$c)), [[vModelText, valueModel.value]]);
2526
+ };
2527
+ }
2528
+ });
2529
+
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
+ });
2584
+
2585
+ const _hoisted_1$a = {
2586
+ class: "snail-action flex-cross-center",
2587
+ ref: "snail-action"
2588
+ };
2589
+ const _hoisted_2$5 = {
2590
+ class: "action-slot flex-cross-center"
2591
+ };
2592
+ var _sfc_main$i = 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
+ } = useObserver();
2611
+ const rootDom = 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
+ 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
+ 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 openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" ? (openBlock(), createBlock(_sfc_main$E, {
2668
+ key: 0,
2669
+ class: "hover-tips",
2670
+ button: "",
2671
+ custom: "",
2672
+ size: 16,
2673
+ onClick: _cache[0] || (_cache[0] = $event => onFollowShow(false))
2674
+ }, {
2675
+ default: withCtx(() => [...(_cache[1] || (_cache[1] = [createElementVNode("path", {
2676
+ 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"
2677
+ }, null, -1)]))]),
2678
+ _: 1
2679
+ })) : createCommentVNode("", true)], 512);
2526
2680
  };
2527
2681
  }
2528
2682
  });
@@ -2764,10 +2918,10 @@ var _sfc_main$h = defineComponent({
2764
2918
  return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
2765
2919
  class: "snail-elastic"
2766
2920
  }), [springYRef.value == true && __props.downRefresh == true ? withDirectives((openBlock(), createElementBlock("div", {
2767
- key: 0,
2768
2921
  class: normalizeClass(["down-refresh", {
2769
2922
  "running": loadingRef.value == "refresh"
2770
2923
  }]),
2924
+ key: "down-refresh",
2771
2925
  ref: "down-refresh"
2772
2926
  }, [renderSlot(_ctx.$slots, "down-refresh", {}, () => [_cache[0] || (_cache[0] = createElementVNode("div", {
2773
2927
  class: "flex-center default-loading"
@@ -2779,10 +2933,10 @@ var _sfc_main$h = defineComponent({
2779
2933
  key: "main-body",
2780
2934
  style: normalizeStyle(buildMainBodyStyle())
2781
2935
  }, [renderSlot(_ctx.$slots, "default")], 6), springYRef.value == true && __props.upMore == true ? withDirectives((openBlock(), createElementBlock("div", {
2782
- key: 1,
2783
2936
  class: normalizeClass(["up-more", {
2784
2937
  "running": loadingRef.value == "more"
2785
2938
  }]),
2939
+ key: "up-more",
2786
2940
  ref: "up-more"
2787
2941
  }, [renderSlot(_ctx.$slots, "up-more", {}, () => [_cache[1] || (_cache[1] = createElementVNode("div", {
2788
2942
  class: "flex-center default-loading"
@@ -2976,7 +3130,7 @@ var _sfc_main$f = defineComponent({
2976
3130
  key: 0,
2977
3131
  class: "subtitle ellipsis",
2978
3132
  textContent: toDisplayString(__props.subtitle)
2979
- }, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$C, {
3133
+ }, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$E, {
2980
3134
  custom: false,
2981
3135
  type: "arrow",
2982
3136
  button: "",
@@ -3048,29 +3202,29 @@ var _sfc_main$d = defineComponent({
3048
3202
  const map = Object.create(null);
3049
3203
  map.main = {
3050
3204
  scrollable: props.main && props.main.scroll != void 0,
3051
- class: "main-area",
3205
+ class: props.main && isStringNotEmpty(props.main.class) ? `main-area ${props.main.class}` : "main-area",
3052
3206
  style: void 0
3053
3207
  };
3054
3208
  if (props.mode == "vertical") {
3055
3209
  map.top = {
3056
3210
  scrollable: props.top && props.top.scroll != void 0,
3057
- class: "top-area",
3211
+ class: props.top && isStringNotEmpty(props.top.class) ? `top-area ${props.top.class}` : "top-area",
3058
3212
  style: buildHeightStyle(props.top)
3059
3213
  };
3060
3214
  map.bottom = {
3061
3215
  scrollable: props.bottom && props.bottom.scroll != void 0,
3062
- class: "bottom-area",
3216
+ class: props.bottom && isStringNotEmpty(props.bottom.class) ? `bottom-area ${props.bottom.class}` : "bottom-area",
3063
3217
  style: buildHeightStyle(props.bottom)
3064
3218
  };
3065
3219
  } else {
3066
3220
  map.left = {
3067
3221
  scrollable: props.left && props.left.scroll != void 0,
3068
- class: "left-area",
3222
+ class: props.left && isStringNotEmpty(props.left.class) ? `left-area ${props.left.class}` : "left-area",
3069
3223
  style: buildWidthStyle(props.left)
3070
3224
  };
3071
3225
  map.right = {
3072
3226
  scrollable: props.right && props.right.scroll != void 0,
3073
- class: "right-area",
3227
+ class: props.right && isStringNotEmpty(props.right.class) ? `right-area ${props.right.class}` : "right-area",
3074
3228
  style: buildWidthStyle(props.right)
3075
3229
  };
3076
3230
  }
@@ -3450,7 +3604,7 @@ var _sfc_main$8 = defineComponent({
3450
3604
  key: 1
3451
3605
  }, [_cache[5] || (_cache[5] = createElementVNode("div", {
3452
3606
  class: "indent"
3453
- }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$C, {
3607
+ }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$E, {
3454
3608
  key: 0,
3455
3609
  class: normalizeClass(statusRef.value),
3456
3610
  custom: "",
@@ -3522,7 +3676,7 @@ var _sfc_main$7 = defineComponent({
3522
3676
  emits("click", node, parents);
3523
3677
  }
3524
3678
  return (_ctx, _cache) => {
3525
- return openBlock(), createElementBlock("div", _hoisted_1$6, [__props.search ? (openBlock(), createBlock(_sfc_main$w, mergeProps({
3679
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [__props.search ? (openBlock(), createBlock(_sfc_main$y, mergeProps({
3526
3680
  key: 0
3527
3681
  }, __props.search, {
3528
3682
  onSearch
@@ -3573,7 +3727,7 @@ var _sfc_main$6 = defineComponent({
3573
3727
  return (_ctx, _cache) => {
3574
3728
  return openBlock(), createElementBlock("div", {
3575
3729
  class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
3576
- }, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$z, mergeProps({
3730
+ }, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$B, mergeProps({
3577
3731
  key: 0
3578
3732
  }, __props.header || {
3579
3733
  useTo: "dialog",
@@ -3587,7 +3741,7 @@ var _sfc_main$6 = defineComponent({
3587
3741
  }), {
3588
3742
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
3589
3743
  _: 3
3590
- }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$A, mergeProps({
3744
+ }, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$C, mergeProps({
3591
3745
  key: 1
3592
3746
  }, __props.footer || {}, {
3593
3747
  onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
@@ -3601,7 +3755,7 @@ function mount(target, options, onDestroyed) {
3601
3755
  mustObject(options, "options");
3602
3756
  target instanceof HTMLElement || throwError("target must be a HTMLElement");
3603
3757
  target.classList.add("snail-app");
3604
- const app = createApp(_sfc_main$s, options);
3758
+ const app = createApp(_sfc_main$u, options);
3605
3759
  triggerAppCreated(app);
3606
3760
  app.mount(target);
3607
3761
  const scope = useScope().onDestroy(() => app.unmount());
@@ -3897,7 +4051,7 @@ var _sfc_main$4 = defineComponent({
3897
4051
  }]),
3898
4052
  mode: "vertical"
3899
4053
  }, createSlots({
3900
- main: withCtx(() => [createVNode(_sfc_main$u, {
4054
+ main: withCtx(() => [createVNode(_sfc_main$w, {
3901
4055
  multiple: "",
3902
4056
  effect: unref(MOTION).top
3903
4057
  }, {
@@ -3937,19 +4091,19 @@ var _sfc_main$4 = defineComponent({
3937
4091
  _: 2
3938
4092
  }, [__props.toolbarDisabled != true ? {
3939
4093
  name: "bottom",
3940
- fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4094
+ fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
3941
4095
  key: 0,
3942
4096
  type: "link",
3943
4097
  size: "small",
3944
4098
  textContent: "清空",
3945
4099
  onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
3946
- })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4100
+ })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
3947
4101
  key: 1,
3948
4102
  type: "link",
3949
4103
  size: "small",
3950
4104
  textContent: "现在",
3951
4105
  onClick: _cache[1] || (_cache[1] = $event => rebuildItems(unref(getTimeValue)(new Date())))
3952
- })) : createCommentVNode("", true), createVNode(_sfc_main$D, {
4106
+ })) : createCommentVNode("", true), createVNode(_sfc_main$F, {
3953
4107
  type: "link",
3954
4108
  size: "small",
3955
4109
  textContent: "确定",
@@ -4203,7 +4357,7 @@ var _sfc_main$3 = defineComponent({
4203
4357
  height: "30px"
4204
4358
  }
4205
4359
  }, createSlots({
4206
- top: withCtx(() => [createVNode(_sfc_main$C, {
4360
+ top: withCtx(() => [createVNode(_sfc_main$E, {
4207
4361
  type: "arrow",
4208
4362
  button: "",
4209
4363
  rotate: 180,
@@ -4223,7 +4377,7 @@ var _sfc_main$3 = defineComponent({
4223
4377
  key: 0,
4224
4378
  textContent: toDisplayString(`${dateRef.value.month}月`),
4225
4379
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
4226
- }, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$C, {
4380
+ }, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$E, {
4227
4381
  type: "arrow",
4228
4382
  button: "",
4229
4383
  size: 26,
@@ -4289,19 +4443,19 @@ var _sfc_main$3 = defineComponent({
4289
4443
  onClick: onSelectTime
4290
4444
  }, null, 10, _hoisted_8)) : createCommentVNode("", true), __props.toolbarDisabled != true ? (openBlock(), createElementBlock(Fragment, {
4291
4445
  key: 1
4292
- }, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4446
+ }, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
4293
4447
  key: 0,
4294
4448
  type: "link",
4295
4449
  size: "small",
4296
4450
  textContent: "清空",
4297
4451
  onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), unref(inPopup) && __props.closePopup("")))
4298
- })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
4452
+ })) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$F, {
4299
4453
  key: 1,
4300
4454
  type: "link",
4301
4455
  size: "small",
4302
4456
  textContent: "现在",
4303
4457
  onClick: onNow
4304
- })) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$D, {
4458
+ })) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$F, {
4305
4459
  type: "link",
4306
4460
  size: "small",
4307
4461
  textContent: "确定",
@@ -4335,7 +4489,7 @@ function usePicker() {
4335
4489
  popupOptions = {
4336
4490
  ...popupOptions
4337
4491
  };
4338
- popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
4492
+ popupOptions.followX = popupOptions.followX || ["start", "end", "center", "before", "after"];
4339
4493
  popupOptions.spaceX = correctNumber(popupOptions.spaceX, 2);
4340
4494
  popupOptions.spaceY = correctNumber(popupOptions.spaceY, 2);
4341
4495
  popupOptions.spaceClient = correctNumber(popupOptions.spaceClient, 10);
@@ -4435,7 +4589,7 @@ var _sfc_main$2 = defineComponent({
4435
4589
  type: "text",
4436
4590
  readonly: "",
4437
4591
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4438
- }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
4592
+ }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
4439
4593
  key: 0,
4440
4594
  type: "datepicker",
4441
4595
  button: "",
@@ -4521,7 +4675,7 @@ var _sfc_main$1 = defineComponent({
4521
4675
  type: "text",
4522
4676
  readonly: "",
4523
4677
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
4524
- }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
4678
+ }, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
4525
4679
  key: 0,
4526
4680
  type: "timepicker",
4527
4681
  button: "",
@@ -4617,12 +4771,12 @@ var _sfc_main = defineComponent({
4617
4771
  onTouchstart: onStartDrag,
4618
4772
  onTouchmove: onDragMove,
4619
4773
  onTouchend: onDragEnd
4620
- }, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$C, {
4774
+ }, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$E, {
4621
4775
  key: 0,
4622
4776
  type: "success",
4623
4777
  size: 20,
4624
4778
  color: "white"
4625
- })) : (openBlock(), createBlock(_sfc_main$C, {
4779
+ })) : (openBlock(), createBlock(_sfc_main$E, {
4626
4780
  key: 1,
4627
4781
  custom: "",
4628
4782
  size: 20,
@@ -4641,22 +4795,23 @@ var _sfc_main = defineComponent({
4641
4795
  });
4642
4796
 
4643
4797
  const components = {
4644
- Button: _sfc_main$D,
4645
- Choose: _sfc_main$B,
4646
- Footer: _sfc_main$A,
4647
- Header: _sfc_main$z,
4648
- Icon: _sfc_main$C,
4649
- Input: _sfc_main$y,
4650
- Number: _sfc_main$x,
4651
- Search: _sfc_main$w,
4652
- Select: _sfc_main$k,
4653
- Switch: _sfc_main$j,
4654
- Textarea: _sfc_main$i,
4655
- Dynamic: _sfc_main$s,
4798
+ Action: _sfc_main$i,
4799
+ Button: _sfc_main$F,
4800
+ Choose: _sfc_main$D,
4801
+ Footer: _sfc_main$C,
4802
+ Header: _sfc_main$B,
4803
+ Icon: _sfc_main$E,
4804
+ Input: _sfc_main$A,
4805
+ Number: _sfc_main$z,
4806
+ Search: _sfc_main$y,
4807
+ Select: _sfc_main$m,
4808
+ Switch: _sfc_main$l,
4809
+ Textarea: _sfc_main$k,
4810
+ Dynamic: _sfc_main$u,
4656
4811
  Elastic: _sfc_main$h,
4657
4812
  Flex: _sfc_main$g,
4658
4813
  Fold: _sfc_main$f,
4659
- Motion: _sfc_main$u,
4814
+ Motion: _sfc_main$w,
4660
4815
  Layout: _sfc_main$d,
4661
4816
  Scroll: _sfc_main$e,
4662
4817
  Sort: _sfc_main$c,
@@ -4669,8 +4824,8 @@ const components = {
4669
4824
  DatePicker: _sfc_main$2,
4670
4825
  TimePicker: _sfc_main$1,
4671
4826
  DragVerify: _sfc_main,
4672
- Empty: _sfc_main$n,
4673
- Loading: _sfc_main$t
4827
+ Empty: _sfc_main$p,
4828
+ Loading: _sfc_main$v
4674
4829
  };
4675
4830
 
4676
4831
  onMountScope(scope => {