snail.vue 2.0.28 → 2.0.30
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.d.ts +1525 -1463
- package/dist/snail.vue.js +128 -91
- package/dist/snail.vue.umd.js +127 -90
- package/dist/styles/snail.vue.vue.css +9 -9
- package/package.json +2 -2
package/dist/snail.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode,
|
|
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
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
4
|
import { link, css, useObserver, useScroll, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
@@ -15,12 +15,18 @@ var _sfc_main$F = defineComponent({
|
|
|
15
15
|
size: {},
|
|
16
16
|
type: {}
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
emits: ["click"],
|
|
19
|
+
setup(__props, _ref) {
|
|
20
|
+
let {
|
|
21
|
+
emit: __emit
|
|
22
|
+
} = _ref;
|
|
23
|
+
const emits = __emit;
|
|
19
24
|
return (_ctx, _cache) => {
|
|
20
25
|
return openBlock(), createElementBlock("div", {
|
|
21
26
|
class: normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
22
|
-
title: __props.title
|
|
23
|
-
|
|
27
|
+
title: __props.title,
|
|
28
|
+
onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
|
|
29
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[1] || (_cache[1] = createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
|
|
24
30
|
};
|
|
25
31
|
}
|
|
26
32
|
});
|
|
@@ -72,7 +78,7 @@ function getBuiltinIcon(iconType) {
|
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
const _hoisted_1$n = ["viewBox"];
|
|
75
|
-
const _hoisted_2$
|
|
81
|
+
const _hoisted_2$h = ["textContent"];
|
|
76
82
|
const _hoisted_3$a = ["d"];
|
|
77
83
|
var _sfc_main$E = defineComponent({
|
|
78
84
|
__name: "icon",
|
|
@@ -95,9 +101,13 @@ var _sfc_main$E = defineComponent({
|
|
|
95
101
|
background: {},
|
|
96
102
|
viewBox: {}
|
|
97
103
|
},
|
|
98
|
-
|
|
104
|
+
emits: ["click"],
|
|
105
|
+
setup(__props, _ref) {
|
|
106
|
+
let {
|
|
107
|
+
emit: __emit
|
|
108
|
+
} = _ref;
|
|
99
109
|
const props = __props;
|
|
100
|
-
const
|
|
110
|
+
const emits = __emit;
|
|
101
111
|
const sizeRef = computed(() => {
|
|
102
112
|
if (isObject(props.size) == true) {
|
|
103
113
|
return {
|
|
@@ -114,9 +124,10 @@ var _sfc_main$E = defineComponent({
|
|
|
114
124
|
});
|
|
115
125
|
const styleRef = computed(() => {
|
|
116
126
|
const style = Object.create(null);
|
|
117
|
-
let fill =
|
|
118
|
-
fill
|
|
119
|
-
fill
|
|
127
|
+
let fill = correctString(props.color, void 0, true);
|
|
128
|
+
fill && (style["--fill"] = fill);
|
|
129
|
+
fill = correctString(props.hoverColor, fill, true);
|
|
130
|
+
fill && (style["--hover"] = fill);
|
|
120
131
|
const rotate = correctNumber(props.rotate, 0);
|
|
121
132
|
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
122
133
|
const opacity = correctNumber(props.opacity, void 0);
|
|
@@ -134,11 +145,10 @@ var _sfc_main$E = defineComponent({
|
|
|
134
145
|
viewBox: unref(correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
135
146
|
}, sizeRef.value, {
|
|
136
147
|
style: styleRef.value,
|
|
137
|
-
|
|
138
|
-
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
148
|
+
onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
|
|
139
149
|
}), [createElementVNode("title", {
|
|
140
150
|
textContent: toDisplayString(__props.title || "")
|
|
141
|
-
}, null, 8, _hoisted_2$
|
|
151
|
+
}, null, 8, _hoisted_2$h), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
|
|
142
152
|
key: 0
|
|
143
153
|
}) : (openBlock(true), createElementBlock(Fragment, {
|
|
144
154
|
key: 1
|
|
@@ -152,7 +162,7 @@ var _sfc_main$E = defineComponent({
|
|
|
152
162
|
});
|
|
153
163
|
|
|
154
164
|
const _hoisted_1$m = ["title", "onClick"];
|
|
155
|
-
const _hoisted_2$
|
|
165
|
+
const _hoisted_2$g = ["type", "checked"];
|
|
156
166
|
const _hoisted_3$9 = ["textContent"];
|
|
157
167
|
const _hoisted_4$6 = ["textContent"];
|
|
158
168
|
var _sfc_main$D = defineComponent({
|
|
@@ -231,7 +241,7 @@ var _sfc_main$D = defineComponent({
|
|
|
231
241
|
key: 0,
|
|
232
242
|
type: unref(type),
|
|
233
243
|
checked: node.selected
|
|
234
|
-
}, null, 8, _hoisted_2$
|
|
244
|
+
}, null, 8, _hoisted_2$g)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
235
245
|
key: 1,
|
|
236
246
|
class: normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
237
247
|
}, [node.selected ? (openBlock(), createBlock(_sfc_main$E, {
|
|
@@ -355,7 +365,7 @@ var _sfc_main$B = defineComponent({
|
|
|
355
365
|
});
|
|
356
366
|
|
|
357
367
|
const _hoisted_1$k = ["textContent"];
|
|
358
|
-
const _hoisted_2$
|
|
368
|
+
const _hoisted_2$f = {
|
|
359
369
|
key: 0,
|
|
360
370
|
class: "required",
|
|
361
371
|
textContent: "*"
|
|
@@ -417,7 +427,7 @@ var _sfc_main$A = defineComponent({
|
|
|
417
427
|
}, [createElementVNode("span", {
|
|
418
428
|
class: "text",
|
|
419
429
|
textContent: toDisplayString(__props.title)
|
|
420
|
-
}, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
430
|
+
}, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$f)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$8, [createElementVNode("input", {
|
|
421
431
|
ref: "input-el",
|
|
422
432
|
type: __props.type || "text",
|
|
423
433
|
value: inputModel.value,
|
|
@@ -644,7 +654,7 @@ const _hoisted_1$j = {
|
|
|
644
654
|
key: 0,
|
|
645
655
|
class: "number-prefix"
|
|
646
656
|
};
|
|
647
|
-
const _hoisted_2$
|
|
657
|
+
const _hoisted_2$e = ["textContent"];
|
|
648
658
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
649
659
|
const _hoisted_4$4 = {
|
|
650
660
|
key: 1,
|
|
@@ -803,7 +813,7 @@ var _sfc_main$z = defineComponent({
|
|
|
803
813
|
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$j, [createElementVNode("span", {
|
|
804
814
|
class: "ellipsis",
|
|
805
815
|
textContent: toDisplayString(unref(prefix))
|
|
806
|
-
}, null, 8, _hoisted_2$
|
|
816
|
+
}, null, 8, _hoisted_2$e)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
807
817
|
class: normalizeClass(["input-panel", unref(controls)])
|
|
808
818
|
}, [withDirectives(createElementVNode("input", {
|
|
809
819
|
type: "text",
|
|
@@ -1143,7 +1153,7 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
|
|
|
1143
1153
|
const _hoisted_1$h = {
|
|
1144
1154
|
class: "snail-confirm flex-column"
|
|
1145
1155
|
};
|
|
1146
|
-
const _hoisted_2$
|
|
1156
|
+
const _hoisted_2$d = ["innerHTML"];
|
|
1147
1157
|
var _sfc_main$x = defineComponent({
|
|
1148
1158
|
...{
|
|
1149
1159
|
name: "ConfirmContainer",
|
|
@@ -1179,7 +1189,7 @@ var _sfc_main$x = defineComponent({
|
|
|
1179
1189
|
}, null, 8, ["title"]), createElementVNode("div", {
|
|
1180
1190
|
class: "confirm-body",
|
|
1181
1191
|
innerHTML: __props.message || "请确认?"
|
|
1182
|
-
}, null, 8, _hoisted_2$
|
|
1192
|
+
}, null, 8, _hoisted_2$d), createVNode(_sfc_main$C, {
|
|
1183
1193
|
align: "right",
|
|
1184
1194
|
"cancel-name": __props.cancelName,
|
|
1185
1195
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1637,7 +1647,7 @@ var _sfc_main$r = defineComponent({
|
|
|
1637
1647
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => isRef(model) ? model.value = $event : null)
|
|
1638
1648
|
}), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])) : (openBlock(), createBlock(_sfc_main$s, mergeProps({
|
|
1639
1649
|
key: 1,
|
|
1640
|
-
class: "dialog-body",
|
|
1650
|
+
class: "dialog-body dialog-builtin",
|
|
1641
1651
|
"in-popup": true
|
|
1642
1652
|
}, __props.options.wrapper, {
|
|
1643
1653
|
onCancel: _cache[2] || (_cache[2] = $event => unref(closePopup)()),
|
|
@@ -1840,7 +1850,7 @@ const _hoisted_1$g = {
|
|
|
1840
1850
|
key: 1,
|
|
1841
1851
|
class: "icon"
|
|
1842
1852
|
};
|
|
1843
|
-
const _hoisted_2$
|
|
1853
|
+
const _hoisted_2$c = ["innerHTML"];
|
|
1844
1854
|
var _sfc_main$o = defineComponent({
|
|
1845
1855
|
...{
|
|
1846
1856
|
name: "ToastContainer",
|
|
@@ -1896,7 +1906,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1896
1906
|
}, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
|
|
1897
1907
|
class: "message",
|
|
1898
1908
|
innerHTML: unref(props).message
|
|
1899
|
-
}, null, 8, _hoisted_2$
|
|
1909
|
+
}, null, 8, _hoisted_2$c)], 38);
|
|
1900
1910
|
};
|
|
1901
1911
|
}
|
|
1902
1912
|
});
|
|
@@ -2142,7 +2152,7 @@ function getNoDataBase64Image() {
|
|
|
2142
2152
|
const _hoisted_1$f = {
|
|
2143
2153
|
class: "snail-empty"
|
|
2144
2154
|
};
|
|
2145
|
-
const _hoisted_2$
|
|
2155
|
+
const _hoisted_2$b = ["src"];
|
|
2146
2156
|
const _hoisted_3$6 = ["textContent"];
|
|
2147
2157
|
var _sfc_main$n = defineComponent({
|
|
2148
2158
|
...{
|
|
@@ -2159,7 +2169,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2159
2169
|
return (_ctx, _cache) => {
|
|
2160
2170
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [createElementVNode("img", {
|
|
2161
2171
|
src: __props.imageUrl || unref(defaultImageBase64)
|
|
2162
|
-
}, null, 8, _hoisted_2$
|
|
2172
|
+
}, null, 8, _hoisted_2$b), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
|
|
2163
2173
|
class: "message",
|
|
2164
2174
|
textContent: toDisplayString(__props.message || "无数据")
|
|
2165
2175
|
}, null, 8, _hoisted_3$6)])]);
|
|
@@ -2168,7 +2178,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2168
2178
|
});
|
|
2169
2179
|
|
|
2170
2180
|
const _hoisted_1$e = ["title"];
|
|
2171
|
-
const _hoisted_2$
|
|
2181
|
+
const _hoisted_2$a = ["textContent"];
|
|
2172
2182
|
const _hoisted_3$5 = {
|
|
2173
2183
|
key: 1,
|
|
2174
2184
|
class: "select-status"
|
|
@@ -2218,7 +2228,7 @@ var _sfc_main$m = defineComponent({
|
|
|
2218
2228
|
}, [createElementVNode("div", {
|
|
2219
2229
|
class: "item-text ellipsis",
|
|
2220
2230
|
textContent: toDisplayString(__props.item.text)
|
|
2221
|
-
}, null, 8, _hoisted_2$
|
|
2231
|
+
}, null, 8, _hoisted_2$a), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2222
2232
|
key: 0,
|
|
2223
2233
|
type: "arrow"
|
|
2224
2234
|
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$E, {
|
|
@@ -2446,7 +2456,7 @@ const _hoisted_1$d = {
|
|
|
2446
2456
|
key: 0,
|
|
2447
2457
|
class: "select-result"
|
|
2448
2458
|
};
|
|
2449
|
-
const _hoisted_2$
|
|
2459
|
+
const _hoisted_2$9 = ["title", "textContent"];
|
|
2450
2460
|
const _hoisted_3$4 = ["textContent"];
|
|
2451
2461
|
const _hoisted_4$3 = {
|
|
2452
2462
|
key: 1,
|
|
@@ -2591,7 +2601,7 @@ var _sfc_main$k = defineComponent({
|
|
|
2591
2601
|
class: "select-text ellipsis",
|
|
2592
2602
|
title: selectedTextRef.value,
|
|
2593
2603
|
textContent: toDisplayString(selectedTextRef.value)
|
|
2594
|
-
}, null, 8, _hoisted_2$
|
|
2604
|
+
}, null, 8, _hoisted_2$9)])])) : (openBlock(), createElementBlock("div", {
|
|
2595
2605
|
key: 1,
|
|
2596
2606
|
class: "placeholder",
|
|
2597
2607
|
textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
@@ -2730,7 +2740,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2730
2740
|
});
|
|
2731
2741
|
|
|
2732
2742
|
const _hoisted_1$b = ["onClick"];
|
|
2733
|
-
const _hoisted_2$
|
|
2743
|
+
const _hoisted_2$8 = ["textContent"];
|
|
2734
2744
|
var _sfc_main$h = defineComponent({
|
|
2735
2745
|
__name: "action-items",
|
|
2736
2746
|
props: {
|
|
@@ -2778,7 +2788,7 @@ var _sfc_main$h = defineComponent({
|
|
|
2778
2788
|
}), null, 16)) : createCommentVNode("", true), createElementVNode("span", {
|
|
2779
2789
|
class: "ellipsis",
|
|
2780
2790
|
textContent: toDisplayString(action.name)
|
|
2781
|
-
}, null, 8, _hoisted_2$
|
|
2791
|
+
}, null, 8, _hoisted_2$8)], 12, _hoisted_1$b);
|
|
2782
2792
|
}), 128))], 2);
|
|
2783
2793
|
};
|
|
2784
2794
|
}
|
|
@@ -2788,7 +2798,7 @@ const _hoisted_1$a = {
|
|
|
2788
2798
|
class: "snail-action flex-cross-center",
|
|
2789
2799
|
ref: "snail-action"
|
|
2790
2800
|
};
|
|
2791
|
-
const _hoisted_2$
|
|
2801
|
+
const _hoisted_2$7 = {
|
|
2792
2802
|
class: "action-slot flex-cross-center"
|
|
2793
2803
|
};
|
|
2794
2804
|
var _sfc_main$g = defineComponent({
|
|
@@ -2880,7 +2890,7 @@ var _sfc_main$g = defineComponent({
|
|
|
2880
2890
|
}
|
|
2881
2891
|
});
|
|
2882
2892
|
return (_ctx, _cache) => {
|
|
2883
|
-
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$
|
|
2893
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$7, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotHandle))))]), __props.disabled != true && (__props.trigger == "hover" || __props.trigger == "always") ? (openBlock(), createElementBlock("div", {
|
|
2884
2894
|
key: 0,
|
|
2885
2895
|
class: normalizeClass(["trigger-area", {
|
|
2886
2896
|
hidden: __props.trigger == "hover"
|
|
@@ -3197,7 +3207,7 @@ var _sfc_main$e = defineComponent({
|
|
|
3197
3207
|
});
|
|
3198
3208
|
|
|
3199
3209
|
const _hoisted_1$9 = ["textContent"];
|
|
3200
|
-
const _hoisted_2$
|
|
3210
|
+
const _hoisted_2$6 = ["textContent"];
|
|
3201
3211
|
const _hoisted_3$3 = {
|
|
3202
3212
|
key: 1,
|
|
3203
3213
|
class: "status"
|
|
@@ -3298,7 +3308,7 @@ var _sfc_main$d = defineComponent({
|
|
|
3298
3308
|
key: 0,
|
|
3299
3309
|
class: "subtitle ellipsis",
|
|
3300
3310
|
textContent: toDisplayString(__props.subtitle)
|
|
3301
|
-
}, null, 8, _hoisted_2$
|
|
3311
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_3$3, [createVNode(_sfc_main$E, {
|
|
3302
3312
|
type: "arrow",
|
|
3303
3313
|
button: "",
|
|
3304
3314
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
@@ -3625,7 +3635,7 @@ const _hoisted_1$7 = {
|
|
|
3625
3635
|
key: 0,
|
|
3626
3636
|
class: "node-fold"
|
|
3627
3637
|
};
|
|
3628
|
-
const _hoisted_2$
|
|
3638
|
+
const _hoisted_2$5 = ["title", "textContent"];
|
|
3629
3639
|
const _hoisted_3$2 = {
|
|
3630
3640
|
class: "node-slot ellipsis"
|
|
3631
3641
|
};
|
|
@@ -3756,7 +3766,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
3756
3766
|
class: "node-text ellipsis",
|
|
3757
3767
|
title: __props.node.text,
|
|
3758
3768
|
textContent: toDisplayString(__props.node.text)
|
|
3759
|
-
}, null, 8, _hoisted_2$
|
|
3769
|
+
}, null, 8, _hoisted_2$5), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34), [[vShow, showRef.value]]), withDirectives(createElementVNode("div", _hoisted_4$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.node.children, child => {
|
|
3760
3770
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
3761
3771
|
key: __props.context.getKey(child),
|
|
3762
3772
|
node: child,
|
|
@@ -3857,7 +3867,7 @@ function mount(target, options, onDestroyed) {
|
|
|
3857
3867
|
const _hoisted_1$5 = {
|
|
3858
3868
|
class: "snail-flash-number"
|
|
3859
3869
|
};
|
|
3860
|
-
const _hoisted_2$
|
|
3870
|
+
const _hoisted_2$4 = ["textContent"];
|
|
3861
3871
|
var _sfc_main$5 = defineComponent({
|
|
3862
3872
|
__name: "flash-number",
|
|
3863
3873
|
props: {
|
|
@@ -3891,7 +3901,7 @@ var _sfc_main$5 = defineComponent({
|
|
|
3891
3901
|
key: item.id,
|
|
3892
3902
|
textContent: toDisplayString(item.text),
|
|
3893
3903
|
class: normalizeClass(unref(isNullish)(item.number) ? "" : "number-item")
|
|
3894
|
-
}, null, 10, _hoisted_2$
|
|
3904
|
+
}, null, 10, _hoisted_2$4);
|
|
3895
3905
|
}), 128)), _cache[0] || (_cache[0] = createElementVNode("span", {
|
|
3896
3906
|
style: {
|
|
3897
3907
|
"color": "red"
|
|
@@ -4021,7 +4031,7 @@ const _hoisted_1$4 = {
|
|
|
4021
4031
|
class: "tz-item",
|
|
4022
4032
|
ref: "hour-items"
|
|
4023
4033
|
};
|
|
4024
|
-
const _hoisted_2$
|
|
4034
|
+
const _hoisted_2$3 = ["textContent", "onClick", "onDblclick"];
|
|
4025
4035
|
const _hoisted_3$1 = {
|
|
4026
4036
|
class: "tz-item",
|
|
4027
4037
|
ref: "minute-items"
|
|
@@ -4038,6 +4048,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
4038
4048
|
props: {
|
|
4039
4049
|
value: {},
|
|
4040
4050
|
format: {},
|
|
4051
|
+
mode: {},
|
|
4041
4052
|
min: {},
|
|
4042
4053
|
max: {},
|
|
4043
4054
|
toolbarDisabled: {
|
|
@@ -4154,7 +4165,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
4154
4165
|
textContent: toDisplayString(unref(padStart)(item.hour, 2, "0")),
|
|
4155
4166
|
onClick: $event => onHourClick(item),
|
|
4156
4167
|
onDblclick: $event => onHourClick(item)
|
|
4157
|
-
}, null, 42, _hoisted_2$
|
|
4168
|
+
}, null, 42, _hoisted_2$3);
|
|
4158
4169
|
}), 128))], 512), createElementVNode("div", _hoisted_3$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(minuteItems.value, item => {
|
|
4159
4170
|
return openBlock(), createElementBlock("div", {
|
|
4160
4171
|
class: normalizeClass(["tzi-number", {
|
|
@@ -4211,7 +4222,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
4211
4222
|
});
|
|
4212
4223
|
|
|
4213
4224
|
const _hoisted_1$3 = ["textContent"];
|
|
4214
|
-
const _hoisted_2 = ["textContent"];
|
|
4225
|
+
const _hoisted_2$2 = ["textContent"];
|
|
4215
4226
|
const _hoisted_3 = ["textContent"];
|
|
4216
4227
|
const _hoisted_4 = ["textContent", "onClick", "onDblclick"];
|
|
4217
4228
|
const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
|
|
@@ -4223,6 +4234,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
4223
4234
|
props: {
|
|
4224
4235
|
value: {},
|
|
4225
4236
|
format: {},
|
|
4237
|
+
mode: {},
|
|
4226
4238
|
min: {},
|
|
4227
4239
|
max: {},
|
|
4228
4240
|
minPickTime: {},
|
|
@@ -4399,10 +4411,13 @@ var _sfc_main$3 = defineComponent({
|
|
|
4399
4411
|
clearDisabled: props.clearDisabled,
|
|
4400
4412
|
toolbarDisabled: props.toolbarDisabled
|
|
4401
4413
|
}, {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4414
|
+
mode: "follow",
|
|
4415
|
+
follow: {
|
|
4416
|
+
followX: "start",
|
|
4417
|
+
followY: "before",
|
|
4418
|
+
spaceX: -2,
|
|
4419
|
+
spaceY: 4
|
|
4420
|
+
}
|
|
4406
4421
|
});
|
|
4407
4422
|
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
4408
4423
|
if (text != void 0) {
|
|
@@ -4448,6 +4463,8 @@ var _sfc_main$3 = defineComponent({
|
|
|
4448
4463
|
button: "",
|
|
4449
4464
|
rotate: 180,
|
|
4450
4465
|
size: 26,
|
|
4466
|
+
color: "#8a9099",
|
|
4467
|
+
"hover-color": "#58a4fd",
|
|
4451
4468
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
4452
4469
|
}), createElementVNode("div", {
|
|
4453
4470
|
class: normalizeClass(["header-content", stepRef.value])
|
|
@@ -4459,14 +4476,17 @@ var _sfc_main$3 = defineComponent({
|
|
|
4459
4476
|
}, [createElementVNode("div", {
|
|
4460
4477
|
textContent: toDisplayString(`${dateRef.value.year}年`),
|
|
4461
4478
|
onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
|
|
4462
|
-
}, null, 8, _hoisted_2), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
|
|
4479
|
+
}, null, 8, _hoisted_2$2), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
|
|
4463
4480
|
key: 0,
|
|
4464
4481
|
textContent: toDisplayString(`${dateRef.value.month}月`),
|
|
4465
4482
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4466
4483
|
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$E, {
|
|
4484
|
+
class: "flex-0",
|
|
4467
4485
|
type: "arrow",
|
|
4468
4486
|
button: "",
|
|
4469
4487
|
size: 26,
|
|
4488
|
+
color: "#8a9099",
|
|
4489
|
+
"hover-color": "#58a4fd",
|
|
4470
4490
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4471
4491
|
})]),
|
|
4472
4492
|
main: withCtx(() => [stepRef.value == "year" ? (openBlock(true), createElementBlock(Fragment, {
|
|
@@ -4574,25 +4594,38 @@ function usePicker() {
|
|
|
4574
4594
|
return showPicker(target, _sfc_main$4, options, popupOptions);
|
|
4575
4595
|
}
|
|
4576
4596
|
function showPicker(target, component, options, popupOptions) {
|
|
4577
|
-
{
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4597
|
+
if (popupOptions && popupOptions.mode == "dialog") {
|
|
4598
|
+
return popup.dialog({
|
|
4599
|
+
component,
|
|
4600
|
+
...(popupOptions.dialog || {
|
|
4601
|
+
closeOnEscape: false,
|
|
4602
|
+
closeOnMask: true
|
|
4603
|
+
}),
|
|
4604
|
+
props: {
|
|
4605
|
+
...options,
|
|
4606
|
+
picker: manager,
|
|
4607
|
+
popup
|
|
4608
|
+
}
|
|
4609
|
+
});
|
|
4610
|
+
} else {
|
|
4611
|
+
const follow = (popupOptions ? popupOptions.follow : void 0) || Object.create(null);
|
|
4612
|
+
{
|
|
4613
|
+
follow.followX = follow.followX || ["center", "start", "end", "before", "after"];
|
|
4614
|
+
follow.spaceX = correctNumber(follow.spaceX, 2);
|
|
4615
|
+
follow.spaceY = correctNumber(follow.spaceY, 2);
|
|
4616
|
+
follow.spaceClient = correctNumber(follow.spaceClient, 10);
|
|
4617
|
+
follow.closeOnMask = follow.closeOnMask == void 0 ? true : follow.closeOnMask;
|
|
4594
4618
|
}
|
|
4595
|
-
|
|
4619
|
+
return popup.follow(target, {
|
|
4620
|
+
...follow,
|
|
4621
|
+
component,
|
|
4622
|
+
props: {
|
|
4623
|
+
...options,
|
|
4624
|
+
picker: manager,
|
|
4625
|
+
popup
|
|
4626
|
+
}
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4596
4629
|
}
|
|
4597
4630
|
const manager = Object.freeze(mountScope({
|
|
4598
4631
|
showDate,
|
|
@@ -4603,6 +4636,7 @@ function usePicker() {
|
|
|
4603
4636
|
}
|
|
4604
4637
|
|
|
4605
4638
|
const _hoisted_1$2 = ["title"];
|
|
4639
|
+
const _hoisted_2$1 = ["textContent"];
|
|
4606
4640
|
var _sfc_main$2 = defineComponent({
|
|
4607
4641
|
__name: "date-picker",
|
|
4608
4642
|
props: {
|
|
@@ -4611,6 +4645,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4611
4645
|
},
|
|
4612
4646
|
value: {},
|
|
4613
4647
|
format: {},
|
|
4648
|
+
mode: {},
|
|
4614
4649
|
min: {},
|
|
4615
4650
|
max: {},
|
|
4616
4651
|
minPickTime: {},
|
|
@@ -4623,7 +4658,8 @@ var _sfc_main$2 = defineComponent({
|
|
|
4623
4658
|
},
|
|
4624
4659
|
clearDisabled: {
|
|
4625
4660
|
type: Boolean
|
|
4626
|
-
}
|
|
4661
|
+
},
|
|
4662
|
+
popup: {}
|
|
4627
4663
|
},
|
|
4628
4664
|
emits: ["change"],
|
|
4629
4665
|
setup(__props, _ref) {
|
|
@@ -4650,10 +4686,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4650
4686
|
pickerScope = showDate(pickerDom.value, {
|
|
4651
4687
|
...props,
|
|
4652
4688
|
value: valueRef.value
|
|
4653
|
-
},
|
|
4654
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4655
|
-
closeOnTarget: true
|
|
4656
|
-
});
|
|
4689
|
+
}, props.popup);
|
|
4657
4690
|
const dateText = await pickerScope;
|
|
4658
4691
|
pickerScope = void 0;
|
|
4659
4692
|
if (dateText !== void 0 && dateText != valueRef.value) {
|
|
@@ -4668,18 +4701,20 @@ var _sfc_main$2 = defineComponent({
|
|
|
4668
4701
|
return (_ctx, _cache) => {
|
|
4669
4702
|
return openBlock(), createElementBlock("div", {
|
|
4670
4703
|
class: normalizeClass(["snail-datepicker", {
|
|
4671
|
-
readonly: __props.readonly
|
|
4704
|
+
readonly: __props.readonly,
|
|
4705
|
+
"simple": __props.mode == "simple"
|
|
4672
4706
|
}]),
|
|
4673
|
-
ref: "datepicker",
|
|
4674
4707
|
title: valueRef.value,
|
|
4708
|
+
ref: "datepicker",
|
|
4675
4709
|
onClick: showPicker
|
|
4676
|
-
}, [
|
|
4677
|
-
class: "wh-fill",
|
|
4678
|
-
type: "text",
|
|
4679
|
-
readonly: "",
|
|
4680
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4681
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4710
|
+
}, [__props.mode != "simple" || unref(isStringNotEmpty)(valueRef.value) ? (openBlock(), createElementBlock("span", {
|
|
4682
4711
|
key: 0,
|
|
4712
|
+
class: normalizeClass(["ellipsis", {
|
|
4713
|
+
"flex-1": __props.mode != "simple"
|
|
4714
|
+
}]),
|
|
4715
|
+
textContent: toDisplayString(valueRef.value)
|
|
4716
|
+
}, null, 10, _hoisted_2$1)) : createCommentVNode("", true), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4717
|
+
key: 1,
|
|
4683
4718
|
type: "datepicker",
|
|
4684
4719
|
button: "",
|
|
4685
4720
|
size: 16,
|
|
@@ -4691,6 +4726,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4691
4726
|
});
|
|
4692
4727
|
|
|
4693
4728
|
const _hoisted_1$1 = ["title"];
|
|
4729
|
+
const _hoisted_2 = ["textContent"];
|
|
4694
4730
|
var _sfc_main$1 = defineComponent({
|
|
4695
4731
|
__name: "time-picker",
|
|
4696
4732
|
props: {
|
|
@@ -4699,6 +4735,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4699
4735
|
},
|
|
4700
4736
|
value: {},
|
|
4701
4737
|
format: {},
|
|
4738
|
+
mode: {},
|
|
4702
4739
|
min: {},
|
|
4703
4740
|
max: {},
|
|
4704
4741
|
toolbarDisabled: {
|
|
@@ -4709,7 +4746,8 @@ var _sfc_main$1 = defineComponent({
|
|
|
4709
4746
|
},
|
|
4710
4747
|
clearDisabled: {
|
|
4711
4748
|
type: Boolean
|
|
4712
|
-
}
|
|
4749
|
+
},
|
|
4750
|
+
popup: {}
|
|
4713
4751
|
},
|
|
4714
4752
|
emits: ["change"],
|
|
4715
4753
|
setup(__props, _ref) {
|
|
@@ -4736,10 +4774,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4736
4774
|
pickerScope = showTime(pickerDom.value, {
|
|
4737
4775
|
...props,
|
|
4738
4776
|
value: valueRef.value
|
|
4739
|
-
},
|
|
4740
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4741
|
-
closeOnTarget: true
|
|
4742
|
-
});
|
|
4777
|
+
}, props.popup);
|
|
4743
4778
|
const timeText = await pickerScope;
|
|
4744
4779
|
pickerScope = void 0;
|
|
4745
4780
|
if (timeText !== void 0 && timeText != valueRef.value) {
|
|
@@ -4754,18 +4789,20 @@ var _sfc_main$1 = defineComponent({
|
|
|
4754
4789
|
return (_ctx, _cache) => {
|
|
4755
4790
|
return openBlock(), createElementBlock("div", {
|
|
4756
4791
|
class: normalizeClass(["snail-timepicker", {
|
|
4757
|
-
readonly: __props.readonly
|
|
4792
|
+
readonly: __props.readonly,
|
|
4793
|
+
"simple": __props.mode == "simple"
|
|
4758
4794
|
}]),
|
|
4759
4795
|
ref: "timepicker",
|
|
4760
4796
|
title: valueRef.value,
|
|
4761
4797
|
onClick: showPicker
|
|
4762
|
-
}, [
|
|
4763
|
-
class: "wh-fill",
|
|
4764
|
-
type: "text",
|
|
4765
|
-
readonly: "",
|
|
4766
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4767
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4798
|
+
}, [__props.mode != "simple" || unref(isStringNotEmpty)(valueRef.value) ? (openBlock(), createElementBlock("span", {
|
|
4768
4799
|
key: 0,
|
|
4800
|
+
class: normalizeClass(["ellipsis", {
|
|
4801
|
+
"flex-1": __props.mode != "simple"
|
|
4802
|
+
}]),
|
|
4803
|
+
textContent: toDisplayString(valueRef.value)
|
|
4804
|
+
}, null, 10, _hoisted_2)) : createCommentVNode("", true), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4805
|
+
key: 1,
|
|
4769
4806
|
type: "timepicker",
|
|
4770
4807
|
button: "",
|
|
4771
4808
|
size: 20,
|