snail.vue 2.0.31 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/snail.vue.js CHANGED
@@ -1,7 +1,7 @@
1
1
  //@ sourceURL=/snail.vue.js
2
2
  import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, computed, mergeProps, unref, createElementVNode, toDisplayString, Fragment, renderList, mergeModels, useModel, normalizeStyle, createCommentVNode, createBlock, nextTick, useTemplateRef, shallowRef, 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
- 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, runAsync, 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 { link, css, useObserver, useScroll, useAnimation, useElastic } from 'snail.view';
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, runAsync, defer, useAsyncScope, useHook, newId, throwIfTrue, isFunction, getTimeNumber, getDateValue, parseDate, formatDateValue, getDateByValue, parseTimeValue, getTimeValue, padStart, formatTimeValue, parseDateValue, correctDateFormat, isValidTime, getFromArray, isNullish, onMountScope } from 'snail.core';
4
+ import { css, link, useObserver, useScroll, useAnimation, useElastic } from 'snail.view';
5
5
 
6
6
  const _hoisted_1$p = ["title"];
7
7
  var _sfc_main$G = defineComponent({
@@ -31,10 +31,6 @@ var _sfc_main$G = defineComponent({
31
31
  }
32
32
  });
33
33
 
34
- var addLink = href => setTimeout(link.register, 0, href);
35
-
36
- addLink("/styles/snail.vue.vue.css");
37
-
38
34
  function getBuiltinIcon(iconType) {
39
35
  switch (iconType) {
40
36
  case "success":
@@ -263,6 +259,10 @@ var _sfc_main$E = defineComponent({
263
259
  }
264
260
  });
265
261
 
262
+ var addLink = href => setTimeout(link.register, 0, href);
263
+
264
+ addLink("/styles/snail.vue.vue.css");
265
+
266
266
  var _sfc_main$D = defineComponent({
267
267
  ...{
268
268
  name: "Footer",
@@ -374,7 +374,7 @@ const _hoisted_3$9 = {
374
374
  class: "input-body"
375
375
  };
376
376
  const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
377
- const _hoisted_5$3 = ["title"];
377
+ const _hoisted_5$4 = ["title"];
378
378
  var _sfc_main$B = defineComponent({
379
379
  ...{
380
380
  name: "Input",
@@ -445,7 +445,7 @@ var _sfc_main$B = defineComponent({
445
445
  button: "",
446
446
  size: 16,
447
447
  color: "red"
448
- })], 8, _hoisted_5$3)) : createCommentVNode("", true)])], 2);
448
+ })], 8, _hoisted_5$4)) : createCommentVNode("", true)])], 2);
449
449
  };
450
450
  }
451
451
  });
@@ -660,8 +660,8 @@ const _hoisted_4$5 = {
660
660
  key: 1,
661
661
  class: "number-suffix"
662
662
  };
663
- const _hoisted_5$2 = ["textContent"];
664
- const _hoisted_6$2 = ["title", "textContent"];
663
+ const _hoisted_5$3 = ["textContent"];
664
+ const _hoisted_6$3 = ["title", "textContent"];
665
665
  const _hoisted_7$1 = ["title", "textContent"];
666
666
  var _sfc_main$A = defineComponent({
667
667
  __name: "number",
@@ -862,12 +862,12 @@ var _sfc_main$A = defineComponent({
862
862
  })])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createElementVNode("span", {
863
863
  class: "ellipsis",
864
864
  textContent: toDisplayString(unref(suffix))
865
- }, null, 8, _hoisted_5$2)])) : createCommentVNode("", true), unref(upper) ? (openBlock(), createElementBlock("div", {
865
+ }, null, 8, _hoisted_5$3)])) : createCommentVNode("", true), unref(upper) ? (openBlock(), createElementBlock("div", {
866
866
  key: 2,
867
867
  class: "number-util ellipsis",
868
868
  title: upperTextRef.value,
869
869
  textContent: toDisplayString(`大写:${upperTextRef.value || ""}`)
870
- }, null, 8, _hoisted_6$2)) : createCommentVNode("", true), unref(thousands) == "below" ? (openBlock(), createElementBlock("div", {
870
+ }, null, 8, _hoisted_6$3)) : createCommentVNode("", true), unref(thousands) == "below" ? (openBlock(), createElementBlock("div", {
871
871
  key: 3,
872
872
  class: "number-util ellipsis",
873
873
  title: thousandsTextRef.value,
@@ -1607,6 +1607,11 @@ var _sfc_main$s = defineComponent({
1607
1607
  onBeforeClose
1608
1608
  });
1609
1609
  let fn_onBuildData = void 0;
1610
+ let mousedownTarget = void 0;
1611
+ function onDialogRootClick(evt) {
1612
+ evt.target === mousedownTarget && __props.options.closeOnMask && closePopup();
1613
+ mousedownTarget = void 0;
1614
+ }
1610
1615
  const registerBuildDataFunc = fn => {
1611
1616
  mustFunction(fn, "fn");
1612
1617
  fn_onBuildData = fn;
@@ -1624,6 +1629,7 @@ var _sfc_main$s = defineComponent({
1624
1629
  onEvent(window, "keyup", event => {
1625
1630
  event.key === "Escape" && __props.popupStatus.value == "active" && __props.options.closeOnEscape && closePopup();
1626
1631
  });
1632
+ onEvent(window, "click", () => mousedownTarget = void 0);
1627
1633
  });
1628
1634
  return (_ctx, _cache) => {
1629
1635
  return openBlock(), createElementBlock("div", {
@@ -1631,9 +1637,8 @@ var _sfc_main$s = defineComponent({
1631
1637
  style: normalizeStyle({
1632
1638
  "z-index": __props.zIndex
1633
1639
  }),
1634
- onClick: _cache[3] || (_cache[3] = withModifiers($event => {
1635
- __props.options.closeOnMask && unref(closePopup)();
1636
- }, ["self"]))
1640
+ onMousedown: _cache[3] || (_cache[3] = withModifiers(evt => isRef(mousedownTarget) ? mousedownTarget.value = evt.target : mousedownTarget = evt.target, ["self"])),
1641
+ onClick: withModifiers(onDialogRootClick, ["self"])
1637
1642
  }, [__props.options.wrapper == void 0 ? (openBlock(), createBlock(_sfc_main$v, mergeProps({
1638
1643
  key: 0,
1639
1644
  class: "dialog-body",
@@ -1665,7 +1670,7 @@ var _sfc_main$s = defineComponent({
1665
1670
  "on-build-data": registerBuildDataFunc
1666
1671
  }), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])]),
1667
1672
  _: 1
1668
- }, 16))], 6);
1673
+ }, 16))], 38);
1669
1674
  };
1670
1675
  }
1671
1676
  });
@@ -2739,173 +2744,7 @@ var _sfc_main$j = defineComponent({
2739
2744
  }
2740
2745
  });
2741
2746
 
2742
- const _hoisted_1$c = ["onClick"];
2743
- const _hoisted_2$9 = ["textContent"];
2744
2747
  var _sfc_main$i = defineComponent({
2745
- __name: "action-items",
2746
- props: {
2747
- mode: {},
2748
- actions: {},
2749
- inPopup: {},
2750
- closePopup: {
2751
- type: Function
2752
- },
2753
- popupStatus: {},
2754
- target: {},
2755
- followX: {},
2756
- followY: {},
2757
- pinned: {}
2758
- },
2759
- emits: ["trigger"],
2760
- setup(__props, _ref) {
2761
- let {
2762
- emit: __emit
2763
- } = _ref;
2764
- const props = __props;
2765
- const emits = __emit;
2766
- function onActionItemClick(code) {
2767
- emits("trigger", code);
2768
- props.inPopup && props.closePopup(code);
2769
- }
2770
- return (_ctx, _cache) => {
2771
- return openBlock(), createElementBlock("div", {
2772
- class: normalizeClass(["snail-action-items", [unref(correctString)(__props.mode, "vertical", true), unref(isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
2773
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, action => {
2774
- return openBlock(), createElementBlock("div", {
2775
- class: "action-item flex-cross-center",
2776
- key: action.code,
2777
- style: normalizeStyle({
2778
- "--color": unref(correctString)(action.color, null, true),
2779
- "--hcolor": unref(correctString)(action.hoverColor, null, true)
2780
- }),
2781
- onClick: $event => onActionItemClick(action.code)
2782
- }, [action.icon != void 0 ? (openBlock(), createBlock(_sfc_main$F, mergeProps({
2783
- key: 0,
2784
- ref_for: true
2785
- }, action.icon, {
2786
- custom: false,
2787
- size: 20
2788
- }), null, 16)) : createCommentVNode("", true), createElementVNode("span", {
2789
- class: "ellipsis",
2790
- textContent: toDisplayString(action.name)
2791
- }, null, 8, _hoisted_2$9)], 12, _hoisted_1$c);
2792
- }), 128))], 2);
2793
- };
2794
- }
2795
- });
2796
-
2797
- const _hoisted_1$b = {
2798
- class: "snail-action flex-cross-center",
2799
- ref: "snail-action"
2800
- };
2801
- const _hoisted_2$8 = {
2802
- class: "action-slot flex-cross-center"
2803
- };
2804
- var _sfc_main$h = defineComponent({
2805
- __name: "action",
2806
- props: {
2807
- disabled: {
2808
- type: Boolean
2809
- },
2810
- trigger: {},
2811
- actions: {},
2812
- followX: {},
2813
- followY: {},
2814
- spaceX: {},
2815
- spaceY: {}
2816
- },
2817
- emits: ["trigger"],
2818
- setup(__props, _ref) {
2819
- let {
2820
- emit: __emit
2821
- } = _ref;
2822
- const props = __props;
2823
- const emits = __emit;
2824
- const {
2825
- follow
2826
- } = usePopup();
2827
- const {
2828
- onEvent
2829
- } = useObserver();
2830
- const rootDom = useTemplateRef("snail-action");
2831
- const popupScopeRef = shallowRef(void 0);
2832
- let pressStartDate = void 0;
2833
- const slotHandle = Object.freeze({
2834
- isActived: () => popupScopeRef.value != void 0,
2835
- trigger: () => onFollowShow(props.trigger == "long-press")
2836
- });
2837
- async function onFollowShow(longPress) {
2838
- if (popupScopeRef.value && popupScopeRef.value.destroyed != true) {
2839
- popupScopeRef.value.destroy();
2840
- } else if (props.disabled != true) {
2841
- popupScopeRef.value = follow(rootDom.value, {
2842
- component: _sfc_main$i,
2843
- closeOnEscape: true,
2844
- closeOnMask: true,
2845
- closeOnResize: true,
2846
- closeOnTarget: true,
2847
- followX: props.followX || ["center", "start", "end", "after", "before", "ratio"],
2848
- followY: props.followY || ["after", "before", "center", "end", "start", "ratio"],
2849
- spaceX: props.spaceX,
2850
- spaceY: props.spaceY,
2851
- props: {
2852
- mode: "vertical",
2853
- actions: props.actions
2854
- }
2855
- });
2856
- const code = await popupScopeRef.value;
2857
- isStringNotEmpty(code) && emits("trigger", code);
2858
- }
2859
- popupScopeRef.value = void 0;
2860
- }
2861
- function onMouseDown() {
2862
- if (props.trigger == "long-press" && pressStartDate == void 0) {
2863
- pressStartDate = new Date();
2864
- }
2865
- }
2866
- function onMouseUp() {
2867
- if (pressStartDate != void 0) {
2868
- const time = ((new Date()).getTime() - pressStartDate.getTime()) / 1e3;
2869
- pressStartDate = void 0;
2870
- if (time >= 0.5) {
2871
- navigator.vibrate && navigator.vibrate(200);
2872
- onFollowShow();
2873
- }
2874
- }
2875
- }
2876
- function onMouseCancel() {
2877
- setTimeout(() => pressStartDate = void 0, 10);
2878
- }
2879
- onMounted(() => {
2880
- onEvent(rootDom.value, "mousedown", onMouseDown);
2881
- onEvent(rootDom.value, "mouseup", onMouseUp);
2882
- if ("ontouchstart" in window) {
2883
- onEvent(rootDom.value, "touchstart", onMouseDown);
2884
- onEvent(rootDom.value, "touchend", onMouseUp);
2885
- }
2886
- onEvent(window, "mouseup", onMouseCancel);
2887
- if ("ontouchstart" in window) {
2888
- onEvent(window, "touchend", onMouseCancel);
2889
- onEvent(window, "touchcancel", onMouseCancel);
2890
- }
2891
- });
2892
- return (_ctx, _cache) => {
2893
- return openBlock(), createElementBlock("div", _hoisted_1$b, [createElementVNode("div", _hoisted_2$8, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotHandle))))]), __props.disabled != true && (__props.trigger == "hover" || __props.trigger == "always") ? (openBlock(), createElementBlock("div", {
2894
- key: 0,
2895
- class: normalizeClass(["trigger-area", {
2896
- hidden: __props.trigger == "hover"
2897
- }])
2898
- }, [renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps(unref(slotHandle))), () => [createVNode(_sfc_main$F, {
2899
- button: "",
2900
- type: "more",
2901
- size: 16,
2902
- onClick: _cache[0] || (_cache[0] = $event => onFollowShow())
2903
- })])], 2)) : createCommentVNode("", true)], 512);
2904
- };
2905
- }
2906
- });
2907
-
2908
- var _sfc_main$g = defineComponent({
2909
2748
  ...{
2910
2749
  name: "Elastic",
2911
2750
  inheritAttrs: false
@@ -3111,7 +2950,7 @@ var _sfc_main$g = defineComponent({
3111
2950
  }
3112
2951
  });
3113
2952
 
3114
- var _sfc_main$f = defineComponent({
2953
+ var _sfc_main$h = defineComponent({
3115
2954
  ...{
3116
2955
  name: "Flex",
3117
2956
  inheritAttrs: false
@@ -3206,13 +3045,13 @@ var _sfc_main$f = defineComponent({
3206
3045
  }
3207
3046
  });
3208
3047
 
3209
- const _hoisted_1$a = ["textContent"];
3210
- const _hoisted_2$7 = ["textContent"];
3048
+ const _hoisted_1$c = ["textContent"];
3049
+ const _hoisted_2$9 = ["textContent"];
3211
3050
  const _hoisted_3$4 = {
3212
3051
  key: 1,
3213
3052
  class: "status"
3214
3053
  };
3215
- var _sfc_main$e = defineComponent({
3054
+ var _sfc_main$g = defineComponent({
3216
3055
  ...{
3217
3056
  name: "Fold",
3218
3057
  inheritAttrs: true
@@ -3304,11 +3143,11 @@ var _sfc_main$e = defineComponent({
3304
3143
  }, [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(slotHandle)), () => [createElementVNode("div", {
3305
3144
  class: "title ellipsis",
3306
3145
  textContent: toDisplayString(__props.title)
3307
- }, null, 8, _hoisted_1$a), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
3146
+ }, null, 8, _hoisted_1$c), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
3308
3147
  key: 0,
3309
3148
  class: "subtitle ellipsis",
3310
3149
  textContent: toDisplayString(__props.subtitle)
3311
- }, null, 8, _hoisted_2$7)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_3$4, [createVNode(_sfc_main$F, {
3150
+ }, null, 8, _hoisted_2$9)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_3$4, [createVNode(_sfc_main$F, {
3312
3151
  type: "arrow",
3313
3152
  button: "",
3314
3153
  title: statusModel.value == "expand" ? "收起" : "展开",
@@ -3322,7 +3161,7 @@ var _sfc_main$e = defineComponent({
3322
3161
  }
3323
3162
  });
3324
3163
 
3325
- var _sfc_main$d = defineComponent({
3164
+ var _sfc_main$f = defineComponent({
3326
3165
  __name: "layout",
3327
3166
  props: {
3328
3167
  direction: {},
@@ -3418,7 +3257,7 @@ var _sfc_main$d = defineComponent({
3418
3257
  }
3419
3258
  });
3420
3259
 
3421
- var _sfc_main$c = defineComponent({
3260
+ var _sfc_main$e = defineComponent({
3422
3261
  ...{
3423
3262
  name: "Sort",
3424
3263
  inheritAttrs: true
@@ -3519,10 +3358,10 @@ var _sfc_main$c = defineComponent({
3519
3358
  }
3520
3359
  });
3521
3360
 
3522
- const _hoisted_1$9 = {
3361
+ const _hoisted_1$b = {
3523
3362
  class: "table-body"
3524
3363
  };
3525
- var _sfc_main$b = defineComponent({
3364
+ var _sfc_main$d = defineComponent({
3526
3365
  ...{
3527
3366
  name: "Table",
3528
3367
  inheritAttrs: true
@@ -3552,7 +3391,7 @@ var _sfc_main$b = defineComponent({
3552
3391
  default: withCtx(() => [createElementVNode("div", {
3553
3392
  class: "table-header",
3554
3393
  style: normalizeStyle(hStyleRef.value)
3555
- }, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$9, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
3394
+ }, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$b, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
3556
3395
  class: "table-footer",
3557
3396
  style: normalizeStyle(fStyleRef.value)
3558
3397
  }, [renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -3562,7 +3401,7 @@ var _sfc_main$b = defineComponent({
3562
3401
  }
3563
3402
  });
3564
3403
 
3565
- var _sfc_main$a = defineComponent({
3404
+ var _sfc_main$c = defineComponent({
3566
3405
  ...{
3567
3406
  name: "TableRow",
3568
3407
  inheritAttrs: true
@@ -3585,7 +3424,7 @@ var _sfc_main$a = defineComponent({
3585
3424
  }
3586
3425
  });
3587
3426
 
3588
- var _sfc_main$9 = defineComponent({
3427
+ var _sfc_main$b = defineComponent({
3589
3428
  ...{
3590
3429
  name: "TableCol",
3591
3430
  inheritAttrs: true
@@ -3631,11 +3470,11 @@ var _sfc_main$9 = defineComponent({
3631
3470
  }
3632
3471
  });
3633
3472
 
3634
- const _hoisted_1$8 = {
3473
+ const _hoisted_1$a = {
3635
3474
  key: 0,
3636
3475
  class: "node-fold"
3637
3476
  };
3638
- const _hoisted_2$6 = ["title", "textContent"];
3477
+ const _hoisted_2$8 = ["title", "textContent"];
3639
3478
  const _hoisted_3$3 = {
3640
3479
  class: "node-slot ellipsis"
3641
3480
  };
@@ -3643,7 +3482,7 @@ const _hoisted_4$3 = {
3643
3482
  class: "snail-tree-children",
3644
3483
  ref: "children"
3645
3484
  };
3646
- var _sfc_main$8 = defineComponent({
3485
+ var _sfc_main$a = defineComponent({
3647
3486
  ...{
3648
3487
  name: "TreeNode",
3649
3488
  inheritAttrs: true
@@ -3751,7 +3590,7 @@ var _sfc_main$8 = defineComponent({
3751
3590
  key: 1
3752
3591
  }, [_cache[5] || (_cache[5] = createElementVNode("div", {
3753
3592
  class: "indent"
3754
- }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$8, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$F, {
3593
+ }, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$a, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$F, {
3755
3594
  key: 0,
3756
3595
  class: normalizeClass(statusRef.value),
3757
3596
  custom: "",
@@ -3766,7 +3605,7 @@ var _sfc_main$8 = defineComponent({
3766
3605
  class: "node-text ellipsis",
3767
3606
  title: __props.node.text,
3768
3607
  textContent: toDisplayString(__props.node.text)
3769
- }, null, 8, _hoisted_2$6), createElementVNode("div", _hoisted_3$3, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34), [[vShow, showRef.value]]), withDirectives(createElementVNode("div", _hoisted_4$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.node.children, child => {
3608
+ }, null, 8, _hoisted_2$8), createElementVNode("div", _hoisted_3$3, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34), [[vShow, showRef.value]]), withDirectives(createElementVNode("div", _hoisted_4$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.node.children, child => {
3770
3609
  return openBlock(), createBlock(_component_TreeNode, {
3771
3610
  key: __props.context.getKey(child),
3772
3611
  node: child,
@@ -3786,10 +3625,10 @@ var _sfc_main$8 = defineComponent({
3786
3625
  }
3787
3626
  });
3788
3627
 
3789
- const _hoisted_1$7 = {
3628
+ const _hoisted_1$9 = {
3790
3629
  class: "snail-tree"
3791
3630
  };
3792
- var _sfc_main$7 = defineComponent({
3631
+ var _sfc_main$9 = defineComponent({
3793
3632
  ...{
3794
3633
  name: "Tree",
3795
3634
  inheritAttrs: true
@@ -3823,7 +3662,7 @@ var _sfc_main$7 = defineComponent({
3823
3662
  emits("click", node, parents);
3824
3663
  }
3825
3664
  return (_ctx, _cache) => {
3826
- return openBlock(), createElementBlock("div", _hoisted_1$7, [__props.search ? (openBlock(), createBlock(_sfc_main$z, mergeProps({
3665
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [__props.search ? (openBlock(), createBlock(_sfc_main$z, mergeProps({
3827
3666
  key: 0
3828
3667
  }, __props.search, {
3829
3668
  onSearch
@@ -3831,7 +3670,7 @@ var _sfc_main$7 = defineComponent({
3831
3670
  scroll: "y"
3832
3671
  }, {
3833
3672
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
3834
- return openBlock(), createBlock(_sfc_main$8, {
3673
+ return openBlock(), createBlock(_sfc_main$a, {
3835
3674
  key: unref(context).getKey(node),
3836
3675
  node,
3837
3676
  parent: void 0,
@@ -3864,49 +3703,57 @@ function mount(target, options, onDestroyed) {
3864
3703
  return scope;
3865
3704
  }
3866
3705
 
3867
- const _hoisted_1$6 = {
3868
- class: "snail-flash-number"
3869
- };
3870
- const _hoisted_2$5 = ["textContent"];
3871
- var _sfc_main$6 = defineComponent({
3872
- __name: "flash-number",
3706
+ const _hoisted_1$8 = ["onClick"];
3707
+ const _hoisted_2$7 = ["textContent"];
3708
+ var _sfc_main$8 = defineComponent({
3709
+ __name: "action-items",
3873
3710
  props: {
3874
- value: {}
3711
+ mode: {},
3712
+ actions: {},
3713
+ inPopup: {},
3714
+ closePopup: {
3715
+ type: Function
3716
+ },
3717
+ popupStatus: {},
3718
+ target: {},
3719
+ followX: {},
3720
+ followY: {},
3721
+ pinned: {}
3875
3722
  },
3876
- setup(__props) {
3723
+ emits: ["trigger"],
3724
+ setup(__props, _ref) {
3725
+ let {
3726
+ emit: __emit
3727
+ } = _ref;
3877
3728
  const props = __props;
3878
- const itemsRef = ref();
3879
- function buildNumberItems() {
3880
- itemsRef.value = [];
3881
- const value = isNullish(props.value) ? null : String(props.value);
3882
- if (isStringNotEmpty(value) == true) {
3883
- for (const item of value) {
3884
- const number = parseInt(item);
3885
- const isNumber = 0 <= number && number <= 9;
3886
- itemsRef.value.push({
3887
- id: newId(),
3888
- text: item,
3889
- number: isNumber ? number : void 0
3890
- });
3891
- }
3892
- }
3893
- if (isArrayNotEmpty(itemsRef.value) == true) ;
3729
+ const emits = __emit;
3730
+ function onActionItemClick(code) {
3731
+ emits("trigger", code);
3732
+ props.inPopup && props.closePopup(code);
3894
3733
  }
3895
- onMounted(() => {
3896
- buildNumberItems();
3897
- });
3898
3734
  return (_ctx, _cache) => {
3899
- return openBlock(), createElementBlock("div", _hoisted_1$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
3900
- return openBlock(), createElementBlock("span", {
3901
- key: item.id,
3902
- textContent: toDisplayString(item.text),
3903
- class: normalizeClass(unref(isNullish)(item.number) ? "" : "number-item")
3904
- }, null, 10, _hoisted_2$5);
3905
- }), 128)), _cache[0] || (_cache[0] = createElementVNode("span", {
3906
- style: {
3907
- "color": "red"
3908
- }
3909
- }, "-----还没实现,别用", -1))]);
3735
+ return openBlock(), createElementBlock("div", {
3736
+ class: normalizeClass(["snail-action-items", [unref(correctString)(__props.mode, "vertical", true), unref(isStringNotEmpty)(__props.inPopup) ? "in-popup" : ""]])
3737
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, action => {
3738
+ return openBlock(), createElementBlock("div", {
3739
+ class: "action-item flex-cross-center",
3740
+ key: action.code,
3741
+ style: normalizeStyle({
3742
+ "--color": unref(correctString)(action.color, null, true),
3743
+ "--hcolor": unref(correctString)(action.hoverColor, null, true)
3744
+ }),
3745
+ onClick: $event => onActionItemClick(action.code)
3746
+ }, [action.icon != void 0 ? (openBlock(), createBlock(_sfc_main$F, mergeProps({
3747
+ key: 0,
3748
+ ref_for: true
3749
+ }, action.icon, {
3750
+ custom: false,
3751
+ size: 20
3752
+ }), null, 16)) : createCommentVNode("", true), createElementVNode("span", {
3753
+ class: "ellipsis",
3754
+ textContent: toDisplayString(action.name)
3755
+ }, null, 8, _hoisted_2$7)], 12, _hoisted_1$8);
3756
+ }), 128))], 2);
3910
3757
  };
3911
3758
  }
3912
3759
  });
@@ -4027,23 +3874,23 @@ function buildSecondItems(minuteItem, min, max) {
4027
3874
  return items;
4028
3875
  }
4029
3876
 
4030
- const _hoisted_1$5 = {
3877
+ const _hoisted_1$7 = {
4031
3878
  class: "tz-item",
4032
3879
  ref: "hour-items"
4033
3880
  };
4034
- const _hoisted_2$4 = ["textContent", "onClick", "onDblclick"];
3881
+ const _hoisted_2$6 = ["textContent", "onClick", "onDblclick"];
4035
3882
  const _hoisted_3$2 = {
4036
3883
  class: "tz-item",
4037
3884
  ref: "minute-items"
4038
3885
  };
4039
3886
  const _hoisted_4$2 = ["textContent", "onClick", "onDblclick"];
4040
- const _hoisted_5$1 = {
3887
+ const _hoisted_5$2 = {
4041
3888
  key: 0,
4042
3889
  class: "tz-item",
4043
3890
  ref: "second-items"
4044
3891
  };
4045
- const _hoisted_6$1 = ["textContent", "onClick", "onDblclick"];
4046
- var _sfc_main$5 = defineComponent({
3892
+ const _hoisted_6$2 = ["textContent", "onClick", "onDblclick"];
3893
+ var _sfc_main$7 = defineComponent({
4047
3894
  __name: "time-pc",
4048
3895
  props: {
4049
3896
  value: {},
@@ -4145,7 +3992,7 @@ var _sfc_main$5 = defineComponent({
4145
3992
  }
4146
3993
  onMounted(rebuildItems);
4147
3994
  return (_ctx, _cache) => {
4148
- return openBlock(), createBlock(_sfc_main$d, {
3995
+ return openBlock(), createBlock(_sfc_main$f, {
4149
3996
  class: normalizeClass(["time-picker pc", {
4150
3997
  "second-disabled": unref(format) != "HH:mm:ss"
4151
3998
  }]),
@@ -4155,7 +4002,7 @@ var _sfc_main$5 = defineComponent({
4155
4002
  multiple: "",
4156
4003
  effect: unref(MOTION).top
4157
4004
  }, {
4158
- default: withCtx(() => [createElementVNode("div", _hoisted_1$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(hourItems.value, item => {
4005
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$7, [(openBlock(true), createElementBlock(Fragment, null, renderList(hourItems.value, item => {
4159
4006
  return openBlock(), createElementBlock("div", {
4160
4007
  class: normalizeClass(["tzi-number", {
4161
4008
  active: item.hour == timeRef.value.hour,
@@ -4165,7 +4012,7 @@ var _sfc_main$5 = defineComponent({
4165
4012
  textContent: toDisplayString(unref(padStart)(item.hour, 2, "0")),
4166
4013
  onClick: $event => onHourClick(item),
4167
4014
  onDblclick: $event => onHourClick(item)
4168
- }, null, 42, _hoisted_2$4);
4015
+ }, null, 42, _hoisted_2$6);
4169
4016
  }), 128))], 512), createElementVNode("div", _hoisted_3$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(minuteItems.value, item => {
4170
4017
  return openBlock(), createElementBlock("div", {
4171
4018
  class: normalizeClass(["tzi-number", {
@@ -4177,7 +4024,7 @@ var _sfc_main$5 = defineComponent({
4177
4024
  onClick: $event => onMinuteClick(item),
4178
4025
  onDblclick: $event => onMinuteClick(item, true)
4179
4026
  }, null, 42, _hoisted_4$2);
4180
- }), 128))], 512), unref(format) == "HH:mm:ss" ? (openBlock(), createElementBlock("div", _hoisted_5$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(secondItems.value, item => {
4027
+ }), 128))], 512), unref(format) == "HH:mm:ss" ? (openBlock(), createElementBlock("div", _hoisted_5$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(secondItems.value, item => {
4181
4028
  return openBlock(), createElementBlock("div", {
4182
4029
  class: normalizeClass(["tzi-number", {
4183
4030
  active: item.second == timeRef.value.second,
@@ -4187,7 +4034,7 @@ var _sfc_main$5 = defineComponent({
4187
4034
  textContent: toDisplayString(unref(padStart)(item.second, 2, "0")),
4188
4035
  onClick: $event => onSecondClick(item),
4189
4036
  onDblclick: $event => onSecondClick(item, true)
4190
- }, null, 42, _hoisted_6$1);
4037
+ }, null, 42, _hoisted_6$2);
4191
4038
  }), 128))], 512)) : createCommentVNode("", true)]),
4192
4039
  _: 1
4193
4040
  }, 8, ["effect"])]),
@@ -4221,15 +4068,15 @@ var _sfc_main$5 = defineComponent({
4221
4068
  }
4222
4069
  });
4223
4070
 
4224
- const _hoisted_1$4 = ["textContent"];
4225
- const _hoisted_2$3 = ["textContent"];
4071
+ const _hoisted_1$6 = ["textContent"];
4072
+ const _hoisted_2$5 = ["textContent"];
4226
4073
  const _hoisted_3$1 = ["textContent"];
4227
4074
  const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
4228
- const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
4229
- const _hoisted_6 = ["textContent"];
4075
+ const _hoisted_5$1 = ["textContent", "onClick", "onDblclick"];
4076
+ const _hoisted_6$1 = ["textContent"];
4230
4077
  const _hoisted_7 = ["textContent", "onClick", "onDblclick"];
4231
4078
  const _hoisted_8 = ["textContent"];
4232
- var _sfc_main$4 = defineComponent({
4079
+ var _sfc_main$6 = defineComponent({
4233
4080
  __name: "date-pc",
4234
4081
  props: {
4235
4082
  value: {},
@@ -4446,7 +4293,7 @@ var _sfc_main$4 = defineComponent({
4446
4293
  dateRef.value == void 0 && (dateRef.value = electDateValue());
4447
4294
  buildPickerItems(stepRef.value, 0);
4448
4295
  return (_ctx, _cache) => {
4449
- return openBlock(), createBlock(_sfc_main$d, {
4296
+ return openBlock(), createBlock(_sfc_main$f, {
4450
4297
  class: normalizeClass(["date-picker pc", {
4451
4298
  "time-now": __props.pinned && __props.pinned.value == true
4452
4299
  }]),
@@ -4471,12 +4318,12 @@ var _sfc_main$4 = defineComponent({
4471
4318
  }, [stepRef.value == "year" ? (openBlock(), createElementBlock("div", {
4472
4319
  key: 0,
4473
4320
  textContent: toDisplayString(`${yearItems.value[0].year}年 - ${unref(getFromArray)(yearItems.value, -1).year}年`)
4474
- }, null, 8, _hoisted_1$4)) : (openBlock(), createElementBlock(Fragment, {
4321
+ }, null, 8, _hoisted_1$6)) : (openBlock(), createElementBlock(Fragment, {
4475
4322
  key: 1
4476
4323
  }, [createElementVNode("div", {
4477
4324
  textContent: toDisplayString(`${dateRef.value.year}年`),
4478
4325
  onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
4479
- }, null, 8, _hoisted_2$3), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
4326
+ }, null, 8, _hoisted_2$5), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
4480
4327
  key: 0,
4481
4328
  textContent: toDisplayString(`${dateRef.value.month}月`),
4482
4329
  onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
@@ -4516,7 +4363,7 @@ var _sfc_main$4 = defineComponent({
4516
4363
  textContent: toDisplayString(item.text),
4517
4364
  onClick: $event => onMonthItemClick(item),
4518
4365
  onDblclick: $event => onMonthItemClick(item, true)
4519
- }, null, 40, _hoisted_5)], 2);
4366
+ }, null, 40, _hoisted_5$1)], 2);
4520
4367
  }), 128)) : (openBlock(), createElementBlock(Fragment, {
4521
4368
  key: 2
4522
4369
  }, [(openBlock(), createElementBlock(Fragment, null, renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
@@ -4524,7 +4371,7 @@ var _sfc_main$4 = defineComponent({
4524
4371
  class: "day-item week",
4525
4372
  key: item,
4526
4373
  textContent: toDisplayString(item)
4527
- }, null, 8, _hoisted_6);
4374
+ }, null, 8, _hoisted_6$1);
4528
4375
  }), 64)), (openBlock(true), createElementBlock(Fragment, null, renderList(dayItemsRef.value, item => {
4529
4376
  return openBlock(), createElementBlock("div", {
4530
4377
  class: normalizeClass(["day-item", {
@@ -4579,25 +4426,32 @@ var _sfc_main$4 = defineComponent({
4579
4426
  }
4580
4427
  });
4581
4428
 
4582
- const _hoisted_1$3 = {
4429
+ const _hoisted_1$5 = {
4430
+ class: "snail-scroll-picker"
4431
+ };
4432
+ const _hoisted_2$4 = {
4583
4433
  key: 0,
4584
4434
  class: "pick-header"
4585
4435
  };
4586
- const _hoisted_2$2 = {
4436
+ const _hoisted_3 = ["textContent"];
4437
+ const _hoisted_4 = {
4587
4438
  class: "pick-body"
4588
4439
  };
4589
- const _hoisted_3 = {
4440
+ const _hoisted_5 = {
4590
4441
  class: "pick-items",
4591
4442
  ref: "pick-items"
4592
4443
  };
4593
- const _hoisted_4 = ["textContent"];
4444
+ const _hoisted_6 = ["textContent"];
4594
4445
  const itemHeight = 32;
4595
- var _sfc_main$3 = defineComponent({
4446
+ var _sfc_main$5 = defineComponent({
4596
4447
  __name: "scroll-picker",
4597
4448
  props: {
4598
4449
  items: {},
4599
4450
  value: {},
4600
4451
  title: {},
4452
+ clearDisabled: {
4453
+ type: Boolean
4454
+ },
4601
4455
  inPopup: {},
4602
4456
  closePopup: {
4603
4457
  type: Function
@@ -4653,20 +4507,32 @@ var _sfc_main$3 = defineComponent({
4653
4507
  index != -1 && onTimeout(() => elasticRef.value.scrollTo(void 0, -itemHeight * index), 50);
4654
4508
  });
4655
4509
  return (_ctx, _cache) => {
4656
- return openBlock(), createElementBlock("div", {
4657
- class: normalizeClass(["snail-scroll-picker wh-fill", {
4658
- "in-pupup": __props.inPopup
4659
- }])
4660
- }, [__props.inPopup ? (openBlock(), createElementBlock("div", _hoisted_1$3, "ddd")) : createCommentVNode("", true), createElementVNode("div", _hoisted_2$2, [createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, item => {
4510
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [__props.inPopup ? (openBlock(), createElementBlock("div", _hoisted_2$4, [createElementVNode("span", {
4511
+ class: "pick-button",
4512
+ textContent: "取消",
4513
+ onClick: _cache[0] || (_cache[0] = $event => __props.closePopup(void 0))
4514
+ }), __props.clearDisabled != true ? (openBlock(), createElementBlock("span", {
4515
+ key: 0,
4516
+ class: "pick-button",
4517
+ textContent: "清空",
4518
+ onClick: _cache[1] || (_cache[1] = $event => __props.closePopup(""))
4519
+ })) : createCommentVNode("", true), createElementVNode("span", {
4520
+ class: "pick-title ellipsis",
4521
+ textContent: toDisplayString(__props.title)
4522
+ }, null, 8, _hoisted_3), createElementVNode("span", {
4523
+ class: "pick-button",
4524
+ textContent: "确定",
4525
+ onClick: _cache[2] || (_cache[2] = $event => __props.closePopup(valueRef.value))
4526
+ })])) : createCommentVNode("", true), createElementVNode("div", _hoisted_4, [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, item => {
4661
4527
  return openBlock(), createElementBlock("span", {
4662
4528
  class: normalizeClass(["pick-item", {
4663
4529
  selected: item.code === valueRef.value,
4664
4530
  disabled: item.disabled
4665
4531
  }]),
4666
4532
  key: item.code,
4667
- textContent: toDisplayString(item.text)
4668
- }, null, 10, _hoisted_4);
4669
- }), 128))], 512), _cache[0] || (_cache[0] = createElementVNode("div", {
4533
+ textContent: toDisplayString(item.name)
4534
+ }, null, 10, _hoisted_6);
4535
+ }), 128))], 512), _cache[3] || (_cache[3] = createElementVNode("div", {
4670
4536
  class: "pick-layer"
4671
4537
  }, [createElementVNode("span", {
4672
4538
  class: "layer-top"
@@ -4674,7 +4540,7 @@ var _sfc_main$3 = defineComponent({
4674
4540
  class: "layer-selection"
4675
4541
  }), createElementVNode("span", {
4676
4542
  class: "layer-bottom"
4677
- })], -1))])], 2);
4543
+ })], -1))])]);
4678
4544
  };
4679
4545
  }
4680
4546
  });
@@ -4685,13 +4551,13 @@ function usePicker() {
4685
4551
  options = {
4686
4552
  ...options
4687
4553
  };
4688
- return showPicker(target, _sfc_main$4, options, popupOptions);
4554
+ return showPicker(target, _sfc_main$6, options, popupOptions);
4689
4555
  }
4690
4556
  function showTime(target, options, popupOptions) {
4691
4557
  options = {
4692
4558
  ...options
4693
4559
  };
4694
- return showPicker(target, _sfc_main$5, options, popupOptions);
4560
+ return showPicker(target, _sfc_main$7, options, popupOptions);
4695
4561
  }
4696
4562
  function showScroll(options) {
4697
4563
  const popupOptions = {
@@ -4701,7 +4567,7 @@ function usePicker() {
4701
4567
  closeOnMask: true
4702
4568
  }
4703
4569
  };
4704
- return showPicker(void 0, _sfc_main$3, options, popupOptions);
4570
+ return showPicker(void 0, _sfc_main$5, options, popupOptions);
4705
4571
  }
4706
4572
  function showPicker(target, component, options, popupOptions) {
4707
4573
  if (popupOptions && popupOptions.mode == "dialog") {
@@ -4746,6 +4612,181 @@ function usePicker() {
4746
4612
  return manager;
4747
4613
  }
4748
4614
 
4615
+ const _hoisted_1$4 = {
4616
+ class: "action-slot flex-cross-center"
4617
+ };
4618
+ const _hoisted_2$3 = ["textContent"];
4619
+ var _sfc_main$4 = defineComponent({
4620
+ __name: "action",
4621
+ props: {
4622
+ disabled: {
4623
+ type: Boolean
4624
+ },
4625
+ value: {},
4626
+ actions: {},
4627
+ mode: {},
4628
+ icon: {},
4629
+ popup: {},
4630
+ follow: {}
4631
+ },
4632
+ emits: ["trigger"],
4633
+ setup(__props, _ref) {
4634
+ let {
4635
+ emit: __emit
4636
+ } = _ref;
4637
+ const props = __props;
4638
+ const emits = __emit;
4639
+ const {
4640
+ follow
4641
+ } = usePopup();
4642
+ const {
4643
+ showScroll
4644
+ } = usePicker();
4645
+ const {
4646
+ onTouch
4647
+ } = useObserver();
4648
+ const valueRef = shallowRef(props.value);
4649
+ const rootDom = useTemplateRef("snail-action");
4650
+ const popupScopeRef = shallowRef(void 0);
4651
+ const slotHandle = Object.freeze({
4652
+ isActived: () => popupScopeRef.value != void 0,
4653
+ trigger: () => onShowActions(props.mode == "press")
4654
+ });
4655
+ function buildDefaultText() {
4656
+ if (isArrayNotEmpty(props.actions) == true) {
4657
+ const item = props.actions.find(item2 => item2.code == valueRef.value) || props.actions[0];
4658
+ return item.name;
4659
+ }
4660
+ return void 0;
4661
+ }
4662
+ async function onShowActions(longPress) {
4663
+ if (popupScopeRef.value && popupScopeRef.value.destroyed != true) {
4664
+ popupScopeRef.value.destroy();
4665
+ popupScopeRef.value = void 0;
4666
+ }
4667
+ if (props.disabled != true) {
4668
+ switch (props.popup) {
4669
+ case "picker":
4670
+ {
4671
+ popupScopeRef.value = showScroll({
4672
+ value: valueRef.value,
4673
+ items: props.actions,
4674
+ clearDisabled: true
4675
+ });
4676
+ break;
4677
+ }
4678
+ default:
4679
+ {
4680
+ const followOptions = props.follow || Object.create(null);
4681
+ popupScopeRef.value = follow(rootDom.value, {
4682
+ component: _sfc_main$8,
4683
+ closeOnEscape: true,
4684
+ closeOnMask: true,
4685
+ closeOnResize: true,
4686
+ closeOnTarget: true,
4687
+ followX: followOptions.followX || ["center", "start", "end", "after", "before", "ratio"],
4688
+ followY: followOptions.followY || ["after", "before", "center", "end", "start", "ratio"],
4689
+ spaceX: followOptions.spaceX,
4690
+ spaceY: followOptions.spaceY,
4691
+ props: {
4692
+ mode: "vertical",
4693
+ actions: props.actions
4694
+ }
4695
+ });
4696
+ break;
4697
+ }
4698
+ }
4699
+ const code = await popupScopeRef.value;
4700
+ popupScopeRef.value = void 0;
4701
+ if (isStringNotEmpty(code) == true) {
4702
+ valueRef.value = code;
4703
+ emits("trigger", code);
4704
+ }
4705
+ }
4706
+ }
4707
+ onMounted(() => {
4708
+ onTouch(rootDom.value, {}, detail => {
4709
+ if (props.mode == "press" && detail.status == "end") {
4710
+ const time = detail.now.timestamp - detail.start.timestamp;
4711
+ if (time > 500) {
4712
+ navigator.vibrate && navigator.vibrate(200);
4713
+ onShowActions();
4714
+ }
4715
+ }
4716
+ });
4717
+ });
4718
+ return (_ctx, _cache) => {
4719
+ return openBlock(), createElementBlock("div", {
4720
+ class: normalizeClass(["snail-action flex-cross-center", {
4721
+ button: __props.mode == "whole" && __props.disabled != true
4722
+ }]),
4723
+ ref: "snail-action",
4724
+ onClick: _cache[1] || (_cache[1] = $event => __props.mode == "whole" && onShowActions())
4725
+ }, [createElementVNode("div", _hoisted_1$4, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotHandle))), () => [createElementVNode("span", {
4726
+ class: "ellipsis",
4727
+ textContent: toDisplayString(buildDefaultText())
4728
+ }, null, 8, _hoisted_2$3)])]), __props.disabled != true && __props.mode != "press" ? (openBlock(), createElementBlock("div", {
4729
+ key: 0,
4730
+ class: normalizeClass(["trigger-slot", {
4731
+ "hover-show": __props.icon != "always"
4732
+ }])
4733
+ }, [renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps(unref(slotHandle))), () => [createVNode(_sfc_main$F, {
4734
+ button: "",
4735
+ type: "more",
4736
+ size: 16,
4737
+ onClick: _cache[0] || (_cache[0] = $event => __props.mode != "whole" && onShowActions())
4738
+ })])], 2)) : createCommentVNode("", true)], 2);
4739
+ };
4740
+ }
4741
+ });
4742
+
4743
+ const _hoisted_1$3 = {
4744
+ class: "snail-flash-number"
4745
+ };
4746
+ const _hoisted_2$2 = ["textContent"];
4747
+ var _sfc_main$3 = defineComponent({
4748
+ __name: "flash-number",
4749
+ props: {
4750
+ value: {}
4751
+ },
4752
+ setup(__props) {
4753
+ const props = __props;
4754
+ const itemsRef = ref();
4755
+ function buildNumberItems() {
4756
+ itemsRef.value = [];
4757
+ const value = isNullish(props.value) ? null : String(props.value);
4758
+ if (isStringNotEmpty(value) == true) {
4759
+ for (const item of value) {
4760
+ const number = parseInt(item);
4761
+ const isNumber = 0 <= number && number <= 9;
4762
+ itemsRef.value.push({
4763
+ id: newId(),
4764
+ text: item,
4765
+ number: isNumber ? number : void 0
4766
+ });
4767
+ }
4768
+ }
4769
+ if (isArrayNotEmpty(itemsRef.value) == true) ;
4770
+ }
4771
+ onMounted(() => {
4772
+ buildNumberItems();
4773
+ });
4774
+ return (_ctx, _cache) => {
4775
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
4776
+ return openBlock(), createElementBlock("span", {
4777
+ key: item.id,
4778
+ textContent: toDisplayString(item.text),
4779
+ class: normalizeClass(unref(isNullish)(item.number) ? "" : "number-item")
4780
+ }, null, 10, _hoisted_2$2);
4781
+ }), 128)), _cache[0] || (_cache[0] = createElementVNode("span", {
4782
+ style: {
4783
+ "color": "red"
4784
+ }
4785
+ }, "-----还没实现,别用", -1))]);
4786
+ };
4787
+ }
4788
+ });
4789
+
4749
4790
  const _hoisted_1$2 = ["title"];
4750
4791
  const _hoisted_2$1 = ["textContent"];
4751
4792
  var _sfc_main$2 = defineComponent({
@@ -5032,7 +5073,6 @@ var _sfc_main = defineComponent({
5032
5073
  });
5033
5074
 
5034
5075
  const components = {
5035
- Action: _sfc_main$h,
5036
5076
  Button: _sfc_main$G,
5037
5077
  Choose: _sfc_main$E,
5038
5078
  Footer: _sfc_main$D,
@@ -5045,21 +5085,22 @@ const components = {
5045
5085
  Switch: _sfc_main$k,
5046
5086
  Textarea: _sfc_main$j,
5047
5087
  Dynamic: _sfc_main$v,
5048
- Elastic: _sfc_main$g,
5049
- Flex: _sfc_main$f,
5050
- Fold: _sfc_main$e,
5088
+ Elastic: _sfc_main$i,
5089
+ Flex: _sfc_main$h,
5090
+ Fold: _sfc_main$g,
5051
5091
  Motion: _sfc_main$x,
5052
- Layout: _sfc_main$d,
5092
+ Layout: _sfc_main$f,
5053
5093
  Scroll: _sfc_main$u,
5054
- Sort: _sfc_main$c,
5055
- Table: _sfc_main$b,
5056
- TableRow: _sfc_main$a,
5057
- TableCol: _sfc_main$9,
5058
- Tree: _sfc_main$7,
5094
+ Sort: _sfc_main$e,
5095
+ Table: _sfc_main$d,
5096
+ TableRow: _sfc_main$c,
5097
+ TableCol: _sfc_main$b,
5098
+ Tree: _sfc_main$9,
5059
5099
  Wrapper: _sfc_main$t,
5060
- FlashNumber: _sfc_main$6,
5100
+ Action: _sfc_main$4,
5101
+ FlashNumber: _sfc_main$3,
5061
5102
  DatePicker: _sfc_main$2,
5062
- ScrollPicker: _sfc_main$3,
5103
+ ScrollPicker: _sfc_main$5,
5063
5104
  TimePicker: _sfc_main$1,
5064
5105
  DragVerify: _sfc_main,
5065
5106
  Empty: _sfc_main$o,