snail.vue 2.0.27 → 2.0.29
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 +1807 -1732
- package/dist/snail.vue.js +186 -137
- package/dist/snail.vue.umd.js +184 -135
- package/dist/styles/snail.vue.vue.css +6 -6
- package/package.json +1 -1
package/dist/snail.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import {
|
|
4
|
+
import { link, css, useObserver, useScroll, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
6
|
const _hoisted_1$o = ["title"];
|
|
7
7
|
var _sfc_main$F = defineComponent({
|
|
@@ -15,16 +15,26 @@ 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
|
});
|
|
27
33
|
|
|
34
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
35
|
+
|
|
36
|
+
addLink("/styles/snail.vue.vue.css");
|
|
37
|
+
|
|
28
38
|
function getBuiltinIcon(iconType) {
|
|
29
39
|
switch (iconType) {
|
|
30
40
|
case "success":
|
|
@@ -43,6 +53,8 @@ function getBuiltinIcon(iconType) {
|
|
|
43
53
|
return ["M896 256H128a96 96 0 0 0-96 96v256a96 96 0 0 0 96 96h32v-160h704v160h32a96 96 0 0 0 96-96v-256a96 96 0 0 0-96-96z m-67.52 208a64 64 0 1 1 64-64 64 64 0 0 1-64 64zM224 960a32 32 0 0 0 32 32h512a32 32 0 0 0 32-32V608H224zM800 96a35.2 35.2 0 0 0-35.52-32h-512A29.12 29.12 0 0 0 224 96v96h576z"];
|
|
44
54
|
case "edit":
|
|
45
55
|
return ["M 780.8 366.933 c 34.1333 -34.1333 34.1333 -93.8667 0 -128 c -38.4 -34.1333 -93.8667 -34.1333 -132.267 0 l -68.2667 68.2667 l 132.267 128 l 68.2667 -68.2667 Z M 541.867 349.867 l -277.333 277.333 L 213.333 806.4 l 179.2 -51.2 l 281.6 -277.333 Z M 469.333 768 h 341.333 v 42.6667 h -341.333 Z"];
|
|
56
|
+
case "pause":
|
|
57
|
+
return ["M716.805057 780.798397V243.199797c0-21.204979-17.196985-38.40377-38.40377-38.403771s-38.401964 17.196985-38.401964 38.403771v537.5986c0 21.204979 17.196985 38.392933 38.401964 38.392933s38.40377-17.187954 38.40377-38.392933zM384.000677 780.798397V243.199797c0-21.204979-17.187954-38.40377-38.391127-38.403771-21.215816 0-38.40377 17.196985-38.40377 38.403771v537.5986c0 21.204979 17.187954 38.392933 38.40377 38.392933 21.203173 0 38.391127-17.187954 38.391127-38.392933z"];
|
|
46
58
|
case "arrow":
|
|
47
59
|
return ["M651.3 514.2c0 8.2-3.1 16.4-9.4 22.6L426.4 752.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L574 514.2 381.1 321.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l215.5 215.5c6.2 6.3 9.4 14.5 9.4 22.6z"];
|
|
48
60
|
case "datepicker":
|
|
@@ -66,7 +78,7 @@ function getBuiltinIcon(iconType) {
|
|
|
66
78
|
}
|
|
67
79
|
|
|
68
80
|
const _hoisted_1$n = ["viewBox"];
|
|
69
|
-
const _hoisted_2$
|
|
81
|
+
const _hoisted_2$h = ["textContent"];
|
|
70
82
|
const _hoisted_3$a = ["d"];
|
|
71
83
|
var _sfc_main$E = defineComponent({
|
|
72
84
|
__name: "icon",
|
|
@@ -84,11 +96,18 @@ var _sfc_main$E = defineComponent({
|
|
|
84
96
|
hoverColor: {},
|
|
85
97
|
rotate: {},
|
|
86
98
|
opacity: {},
|
|
99
|
+
border: {},
|
|
100
|
+
radius: {},
|
|
101
|
+
background: {},
|
|
87
102
|
viewBox: {}
|
|
88
103
|
},
|
|
89
|
-
|
|
104
|
+
emits: ["click"],
|
|
105
|
+
setup(__props, _ref) {
|
|
106
|
+
let {
|
|
107
|
+
emit: __emit
|
|
108
|
+
} = _ref;
|
|
90
109
|
const props = __props;
|
|
91
|
-
const
|
|
110
|
+
const emits = __emit;
|
|
92
111
|
const sizeRef = computed(() => {
|
|
93
112
|
if (isObject(props.size) == true) {
|
|
94
113
|
return {
|
|
@@ -105,13 +124,17 @@ var _sfc_main$E = defineComponent({
|
|
|
105
124
|
});
|
|
106
125
|
const styleRef = computed(() => {
|
|
107
126
|
const style = Object.create(null);
|
|
108
|
-
let fill =
|
|
109
|
-
fill
|
|
110
|
-
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);
|
|
111
131
|
const rotate = correctNumber(props.rotate, 0);
|
|
112
132
|
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
113
133
|
const opacity = correctNumber(props.opacity, void 0);
|
|
114
134
|
opacity >= 0 && (style.opacity = opacity);
|
|
135
|
+
style.border = correctString(props.border, void 0, true);
|
|
136
|
+
style.borderRadius = correctString(props.radius, void 0, true);
|
|
137
|
+
style.background = correctString(props.background, void 0, true);
|
|
115
138
|
return style;
|
|
116
139
|
});
|
|
117
140
|
return (_ctx, _cache) => {
|
|
@@ -122,11 +145,10 @@ var _sfc_main$E = defineComponent({
|
|
|
122
145
|
viewBox: unref(correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
123
146
|
}, sizeRef.value, {
|
|
124
147
|
style: styleRef.value,
|
|
125
|
-
|
|
126
|
-
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
148
|
+
onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
|
|
127
149
|
}), [createElementVNode("title", {
|
|
128
150
|
textContent: toDisplayString(__props.title || "")
|
|
129
|
-
}, null, 8, _hoisted_2$
|
|
151
|
+
}, null, 8, _hoisted_2$h), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
|
|
130
152
|
key: 0
|
|
131
153
|
}) : (openBlock(true), createElementBlock(Fragment, {
|
|
132
154
|
key: 1
|
|
@@ -140,7 +162,7 @@ var _sfc_main$E = defineComponent({
|
|
|
140
162
|
});
|
|
141
163
|
|
|
142
164
|
const _hoisted_1$m = ["title", "onClick"];
|
|
143
|
-
const _hoisted_2$
|
|
165
|
+
const _hoisted_2$g = ["type", "checked"];
|
|
144
166
|
const _hoisted_3$9 = ["textContent"];
|
|
145
167
|
const _hoisted_4$6 = ["textContent"];
|
|
146
168
|
var _sfc_main$D = defineComponent({
|
|
@@ -219,7 +241,7 @@ var _sfc_main$D = defineComponent({
|
|
|
219
241
|
key: 0,
|
|
220
242
|
type: unref(type),
|
|
221
243
|
checked: node.selected
|
|
222
|
-
}, null, 8, _hoisted_2$
|
|
244
|
+
}, null, 8, _hoisted_2$g)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
223
245
|
key: 1,
|
|
224
246
|
class: normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
225
247
|
}, [node.selected ? (openBlock(), createBlock(_sfc_main$E, {
|
|
@@ -241,10 +263,6 @@ var _sfc_main$D = defineComponent({
|
|
|
241
263
|
}
|
|
242
264
|
});
|
|
243
265
|
|
|
244
|
-
var addLink = href => setTimeout(link.register, 0, href);
|
|
245
|
-
|
|
246
|
-
addLink("/styles/snail.vue.vue.css");
|
|
247
|
-
|
|
248
266
|
var _sfc_main$C = defineComponent({
|
|
249
267
|
...{
|
|
250
268
|
name: "Footer",
|
|
@@ -347,7 +365,7 @@ var _sfc_main$B = defineComponent({
|
|
|
347
365
|
});
|
|
348
366
|
|
|
349
367
|
const _hoisted_1$k = ["textContent"];
|
|
350
|
-
const _hoisted_2$
|
|
368
|
+
const _hoisted_2$f = {
|
|
351
369
|
key: 0,
|
|
352
370
|
class: "required",
|
|
353
371
|
textContent: "*"
|
|
@@ -409,7 +427,7 @@ var _sfc_main$A = defineComponent({
|
|
|
409
427
|
}, [createElementVNode("span", {
|
|
410
428
|
class: "text",
|
|
411
429
|
textContent: toDisplayString(__props.title)
|
|
412
|
-
}, 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", {
|
|
413
431
|
ref: "input-el",
|
|
414
432
|
type: __props.type || "text",
|
|
415
433
|
value: inputModel.value,
|
|
@@ -636,7 +654,7 @@ const _hoisted_1$j = {
|
|
|
636
654
|
key: 0,
|
|
637
655
|
class: "number-prefix"
|
|
638
656
|
};
|
|
639
|
-
const _hoisted_2$
|
|
657
|
+
const _hoisted_2$e = ["textContent"];
|
|
640
658
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
641
659
|
const _hoisted_4$4 = {
|
|
642
660
|
key: 1,
|
|
@@ -795,7 +813,7 @@ var _sfc_main$z = defineComponent({
|
|
|
795
813
|
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$j, [createElementVNode("span", {
|
|
796
814
|
class: "ellipsis",
|
|
797
815
|
textContent: toDisplayString(unref(prefix))
|
|
798
|
-
}, null, 8, _hoisted_2$
|
|
816
|
+
}, null, 8, _hoisted_2$e)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
799
817
|
class: normalizeClass(["input-panel", unref(controls)])
|
|
800
818
|
}, [withDirectives(createElementVNode("input", {
|
|
801
819
|
type: "text",
|
|
@@ -1135,7 +1153,7 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
|
|
|
1135
1153
|
const _hoisted_1$h = {
|
|
1136
1154
|
class: "snail-confirm flex-column"
|
|
1137
1155
|
};
|
|
1138
|
-
const _hoisted_2$
|
|
1156
|
+
const _hoisted_2$d = ["innerHTML"];
|
|
1139
1157
|
var _sfc_main$x = defineComponent({
|
|
1140
1158
|
...{
|
|
1141
1159
|
name: "ConfirmContainer",
|
|
@@ -1171,7 +1189,7 @@ var _sfc_main$x = defineComponent({
|
|
|
1171
1189
|
}, null, 8, ["title"]), createElementVNode("div", {
|
|
1172
1190
|
class: "confirm-body",
|
|
1173
1191
|
innerHTML: __props.message || "请确认?"
|
|
1174
|
-
}, null, 8, _hoisted_2$
|
|
1192
|
+
}, null, 8, _hoisted_2$d), createVNode(_sfc_main$C, {
|
|
1175
1193
|
align: "right",
|
|
1176
1194
|
"cancel-name": __props.cancelName,
|
|
1177
1195
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1832,7 +1850,7 @@ const _hoisted_1$g = {
|
|
|
1832
1850
|
key: 1,
|
|
1833
1851
|
class: "icon"
|
|
1834
1852
|
};
|
|
1835
|
-
const _hoisted_2$
|
|
1853
|
+
const _hoisted_2$c = ["innerHTML"];
|
|
1836
1854
|
var _sfc_main$o = defineComponent({
|
|
1837
1855
|
...{
|
|
1838
1856
|
name: "ToastContainer",
|
|
@@ -1888,7 +1906,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1888
1906
|
}, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
|
|
1889
1907
|
class: "message",
|
|
1890
1908
|
innerHTML: unref(props).message
|
|
1891
|
-
}, null, 8, _hoisted_2$
|
|
1909
|
+
}, null, 8, _hoisted_2$c)], 38);
|
|
1892
1910
|
};
|
|
1893
1911
|
}
|
|
1894
1912
|
});
|
|
@@ -2134,7 +2152,7 @@ function getNoDataBase64Image() {
|
|
|
2134
2152
|
const _hoisted_1$f = {
|
|
2135
2153
|
class: "snail-empty"
|
|
2136
2154
|
};
|
|
2137
|
-
const _hoisted_2$
|
|
2155
|
+
const _hoisted_2$b = ["src"];
|
|
2138
2156
|
const _hoisted_3$6 = ["textContent"];
|
|
2139
2157
|
var _sfc_main$n = defineComponent({
|
|
2140
2158
|
...{
|
|
@@ -2151,7 +2169,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2151
2169
|
return (_ctx, _cache) => {
|
|
2152
2170
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [createElementVNode("img", {
|
|
2153
2171
|
src: __props.imageUrl || unref(defaultImageBase64)
|
|
2154
|
-
}, null, 8, _hoisted_2$
|
|
2172
|
+
}, null, 8, _hoisted_2$b), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
|
|
2155
2173
|
class: "message",
|
|
2156
2174
|
textContent: toDisplayString(__props.message || "无数据")
|
|
2157
2175
|
}, null, 8, _hoisted_3$6)])]);
|
|
@@ -2160,7 +2178,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2160
2178
|
});
|
|
2161
2179
|
|
|
2162
2180
|
const _hoisted_1$e = ["title"];
|
|
2163
|
-
const _hoisted_2$
|
|
2181
|
+
const _hoisted_2$a = ["textContent"];
|
|
2164
2182
|
const _hoisted_3$5 = {
|
|
2165
2183
|
key: 1,
|
|
2166
2184
|
class: "select-status"
|
|
@@ -2210,7 +2228,7 @@ var _sfc_main$m = defineComponent({
|
|
|
2210
2228
|
}, [createElementVNode("div", {
|
|
2211
2229
|
class: "item-text ellipsis",
|
|
2212
2230
|
textContent: toDisplayString(__props.item.text)
|
|
2213
|
-
}, null, 8, _hoisted_2$
|
|
2231
|
+
}, null, 8, _hoisted_2$a), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2214
2232
|
key: 0,
|
|
2215
2233
|
type: "arrow"
|
|
2216
2234
|
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$E, {
|
|
@@ -2438,7 +2456,7 @@ const _hoisted_1$d = {
|
|
|
2438
2456
|
key: 0,
|
|
2439
2457
|
class: "select-result"
|
|
2440
2458
|
};
|
|
2441
|
-
const _hoisted_2$
|
|
2459
|
+
const _hoisted_2$9 = ["title", "textContent"];
|
|
2442
2460
|
const _hoisted_3$4 = ["textContent"];
|
|
2443
2461
|
const _hoisted_4$3 = {
|
|
2444
2462
|
key: 1,
|
|
@@ -2583,7 +2601,7 @@ var _sfc_main$k = defineComponent({
|
|
|
2583
2601
|
class: "select-text ellipsis",
|
|
2584
2602
|
title: selectedTextRef.value,
|
|
2585
2603
|
textContent: toDisplayString(selectedTextRef.value)
|
|
2586
|
-
}, null, 8, _hoisted_2$
|
|
2604
|
+
}, null, 8, _hoisted_2$9)])])) : (openBlock(), createElementBlock("div", {
|
|
2587
2605
|
key: 1,
|
|
2588
2606
|
class: "placeholder",
|
|
2589
2607
|
textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
@@ -2722,7 +2740,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2722
2740
|
});
|
|
2723
2741
|
|
|
2724
2742
|
const _hoisted_1$b = ["onClick"];
|
|
2725
|
-
const _hoisted_2$
|
|
2743
|
+
const _hoisted_2$8 = ["textContent"];
|
|
2726
2744
|
var _sfc_main$h = defineComponent({
|
|
2727
2745
|
__name: "action-items",
|
|
2728
2746
|
props: {
|
|
@@ -2770,7 +2788,7 @@ var _sfc_main$h = defineComponent({
|
|
|
2770
2788
|
}), null, 16)) : createCommentVNode("", true), createElementVNode("span", {
|
|
2771
2789
|
class: "ellipsis",
|
|
2772
2790
|
textContent: toDisplayString(action.name)
|
|
2773
|
-
}, null, 8, _hoisted_2$
|
|
2791
|
+
}, null, 8, _hoisted_2$8)], 12, _hoisted_1$b);
|
|
2774
2792
|
}), 128))], 2);
|
|
2775
2793
|
};
|
|
2776
2794
|
}
|
|
@@ -2780,7 +2798,7 @@ const _hoisted_1$a = {
|
|
|
2780
2798
|
class: "snail-action flex-cross-center",
|
|
2781
2799
|
ref: "snail-action"
|
|
2782
2800
|
};
|
|
2783
|
-
const _hoisted_2$
|
|
2801
|
+
const _hoisted_2$7 = {
|
|
2784
2802
|
class: "action-slot flex-cross-center"
|
|
2785
2803
|
};
|
|
2786
2804
|
var _sfc_main$g = defineComponent({
|
|
@@ -2790,7 +2808,11 @@ var _sfc_main$g = defineComponent({
|
|
|
2790
2808
|
type: Boolean
|
|
2791
2809
|
},
|
|
2792
2810
|
trigger: {},
|
|
2793
|
-
actions: {}
|
|
2811
|
+
actions: {},
|
|
2812
|
+
followX: {},
|
|
2813
|
+
followY: {},
|
|
2814
|
+
spaceX: {},
|
|
2815
|
+
spaceY: {}
|
|
2794
2816
|
},
|
|
2795
2817
|
emits: ["trigger"],
|
|
2796
2818
|
setup(__props, _ref) {
|
|
@@ -2822,8 +2844,10 @@ var _sfc_main$g = defineComponent({
|
|
|
2822
2844
|
closeOnMask: true,
|
|
2823
2845
|
closeOnResize: true,
|
|
2824
2846
|
closeOnTarget: true,
|
|
2825
|
-
followX:
|
|
2826
|
-
followY:
|
|
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,
|
|
2827
2851
|
props: {
|
|
2828
2852
|
mode: "vertical",
|
|
2829
2853
|
actions: props.actions
|
|
@@ -2845,7 +2869,7 @@ var _sfc_main$g = defineComponent({
|
|
|
2845
2869
|
pressStartDate = void 0;
|
|
2846
2870
|
if (time >= 0.5) {
|
|
2847
2871
|
navigator.vibrate && navigator.vibrate(200);
|
|
2848
|
-
onFollowShow(
|
|
2872
|
+
onFollowShow();
|
|
2849
2873
|
}
|
|
2850
2874
|
}
|
|
2851
2875
|
}
|
|
@@ -2866,7 +2890,7 @@ var _sfc_main$g = defineComponent({
|
|
|
2866
2890
|
}
|
|
2867
2891
|
});
|
|
2868
2892
|
return (_ctx, _cache) => {
|
|
2869
|
-
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", {
|
|
2870
2894
|
key: 0,
|
|
2871
2895
|
class: normalizeClass(["trigger-area", {
|
|
2872
2896
|
hidden: __props.trigger == "hover"
|
|
@@ -2875,7 +2899,7 @@ var _sfc_main$g = defineComponent({
|
|
|
2875
2899
|
button: "",
|
|
2876
2900
|
type: "more",
|
|
2877
2901
|
size: 16,
|
|
2878
|
-
onClick: _cache[0] || (_cache[0] = $event => onFollowShow(
|
|
2902
|
+
onClick: _cache[0] || (_cache[0] = $event => onFollowShow())
|
|
2879
2903
|
})])], 2)) : createCommentVNode("", true)], 512);
|
|
2880
2904
|
};
|
|
2881
2905
|
}
|
|
@@ -3183,7 +3207,7 @@ var _sfc_main$e = defineComponent({
|
|
|
3183
3207
|
});
|
|
3184
3208
|
|
|
3185
3209
|
const _hoisted_1$9 = ["textContent"];
|
|
3186
|
-
const _hoisted_2$
|
|
3210
|
+
const _hoisted_2$6 = ["textContent"];
|
|
3187
3211
|
const _hoisted_3$3 = {
|
|
3188
3212
|
key: 1,
|
|
3189
3213
|
class: "status"
|
|
@@ -3284,7 +3308,7 @@ var _sfc_main$d = defineComponent({
|
|
|
3284
3308
|
key: 0,
|
|
3285
3309
|
class: "subtitle ellipsis",
|
|
3286
3310
|
textContent: toDisplayString(__props.subtitle)
|
|
3287
|
-
}, 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, {
|
|
3288
3312
|
type: "arrow",
|
|
3289
3313
|
button: "",
|
|
3290
3314
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
@@ -3611,7 +3635,7 @@ const _hoisted_1$7 = {
|
|
|
3611
3635
|
key: 0,
|
|
3612
3636
|
class: "node-fold"
|
|
3613
3637
|
};
|
|
3614
|
-
const _hoisted_2$
|
|
3638
|
+
const _hoisted_2$5 = ["title", "textContent"];
|
|
3615
3639
|
const _hoisted_3$2 = {
|
|
3616
3640
|
class: "node-slot ellipsis"
|
|
3617
3641
|
};
|
|
@@ -3742,7 +3766,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
3742
3766
|
class: "node-text ellipsis",
|
|
3743
3767
|
title: __props.node.text,
|
|
3744
3768
|
textContent: toDisplayString(__props.node.text)
|
|
3745
|
-
}, 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 => {
|
|
3746
3770
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
3747
3771
|
key: __props.context.getKey(child),
|
|
3748
3772
|
node: child,
|
|
@@ -3843,7 +3867,7 @@ function mount(target, options, onDestroyed) {
|
|
|
3843
3867
|
const _hoisted_1$5 = {
|
|
3844
3868
|
class: "snail-flash-number"
|
|
3845
3869
|
};
|
|
3846
|
-
const _hoisted_2$
|
|
3870
|
+
const _hoisted_2$4 = ["textContent"];
|
|
3847
3871
|
var _sfc_main$5 = defineComponent({
|
|
3848
3872
|
__name: "flash-number",
|
|
3849
3873
|
props: {
|
|
@@ -3877,7 +3901,7 @@ var _sfc_main$5 = defineComponent({
|
|
|
3877
3901
|
key: item.id,
|
|
3878
3902
|
textContent: toDisplayString(item.text),
|
|
3879
3903
|
class: normalizeClass(unref(isNullish)(item.number) ? "" : "number-item")
|
|
3880
|
-
}, null, 10, _hoisted_2$
|
|
3904
|
+
}, null, 10, _hoisted_2$4);
|
|
3881
3905
|
}), 128)), _cache[0] || (_cache[0] = createElementVNode("span", {
|
|
3882
3906
|
style: {
|
|
3883
3907
|
"color": "red"
|
|
@@ -4007,23 +4031,24 @@ const _hoisted_1$4 = {
|
|
|
4007
4031
|
class: "tz-item",
|
|
4008
4032
|
ref: "hour-items"
|
|
4009
4033
|
};
|
|
4010
|
-
const _hoisted_2$
|
|
4034
|
+
const _hoisted_2$3 = ["textContent", "onClick", "onDblclick"];
|
|
4011
4035
|
const _hoisted_3$1 = {
|
|
4012
4036
|
class: "tz-item",
|
|
4013
4037
|
ref: "minute-items"
|
|
4014
4038
|
};
|
|
4015
|
-
const _hoisted_4$1 = ["textContent", "onClick"];
|
|
4039
|
+
const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
|
|
4016
4040
|
const _hoisted_5$1 = {
|
|
4017
4041
|
key: 0,
|
|
4018
4042
|
class: "tz-item",
|
|
4019
4043
|
ref: "second-items"
|
|
4020
4044
|
};
|
|
4021
|
-
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
4045
|
+
const _hoisted_6$1 = ["textContent", "onClick", "onDblclick"];
|
|
4022
4046
|
var _sfc_main$4 = defineComponent({
|
|
4023
4047
|
__name: "time-pc",
|
|
4024
4048
|
props: {
|
|
4025
4049
|
value: {},
|
|
4026
4050
|
format: {},
|
|
4051
|
+
mode: {},
|
|
4027
4052
|
min: {},
|
|
4028
4053
|
max: {},
|
|
4029
4054
|
toolbarDisabled: {
|
|
@@ -4088,29 +4113,27 @@ var _sfc_main$4 = defineComponent({
|
|
|
4088
4113
|
block: "center"
|
|
4089
4114
|
});
|
|
4090
4115
|
}
|
|
4091
|
-
function onHourClick(item) {
|
|
4116
|
+
function onHourClick(item, dbClick) {
|
|
4092
4117
|
if (item.disabled != true && timeRef.value.hour != item.hour) {
|
|
4093
4118
|
timeRef.value.hour = item.hour;
|
|
4094
4119
|
minuteItems.value = buildMinuteItems(item, min, max);
|
|
4095
4120
|
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
4096
4121
|
}
|
|
4097
4122
|
}
|
|
4098
|
-
function onMinuteClick(item) {
|
|
4123
|
+
function onMinuteClick(item, dbClick) {
|
|
4099
4124
|
if (item.disabled != true) {
|
|
4125
|
+
timeRef.value.minute = item.minute;
|
|
4100
4126
|
if (format == "HH:mm") {
|
|
4101
|
-
|
|
4102
|
-
emits("confirm", value);
|
|
4103
|
-
props.inPopup && props.closePopup(value);
|
|
4127
|
+
dbClick && onConfirm();
|
|
4104
4128
|
} else if (timeRef.value.minute != item.minute) {
|
|
4105
|
-
timeRef.value.minute = item.minute;
|
|
4106
4129
|
secondItems.value = buildSecondItems(item, min, max);
|
|
4107
4130
|
}
|
|
4108
4131
|
}
|
|
4109
4132
|
}
|
|
4110
|
-
function onSecondClick(item) {
|
|
4133
|
+
function onSecondClick(item, dbClick) {
|
|
4111
4134
|
if (item.disabled != true) {
|
|
4112
4135
|
timeRef.value.second = item.second;
|
|
4113
|
-
onConfirm();
|
|
4136
|
+
dbClick && onConfirm();
|
|
4114
4137
|
}
|
|
4115
4138
|
}
|
|
4116
4139
|
function onConfirm() {
|
|
@@ -4140,8 +4163,9 @@ var _sfc_main$4 = defineComponent({
|
|
|
4140
4163
|
}]),
|
|
4141
4164
|
key: item.hour,
|
|
4142
4165
|
textContent: toDisplayString(unref(padStart)(item.hour, 2, "0")),
|
|
4143
|
-
onClick: $event => onHourClick(item)
|
|
4144
|
-
|
|
4166
|
+
onClick: $event => onHourClick(item),
|
|
4167
|
+
onDblclick: $event => onHourClick(item)
|
|
4168
|
+
}, null, 42, _hoisted_2$3);
|
|
4145
4169
|
}), 128))], 512), createElementVNode("div", _hoisted_3$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(minuteItems.value, item => {
|
|
4146
4170
|
return openBlock(), createElementBlock("div", {
|
|
4147
4171
|
class: normalizeClass(["tzi-number", {
|
|
@@ -4150,8 +4174,9 @@ var _sfc_main$4 = defineComponent({
|
|
|
4150
4174
|
}]),
|
|
4151
4175
|
key: `${item.hour}:${item.minute}`,
|
|
4152
4176
|
textContent: toDisplayString(unref(padStart)(item.minute, 2, "0")),
|
|
4153
|
-
onClick: $event => onMinuteClick(item)
|
|
4154
|
-
|
|
4177
|
+
onClick: $event => onMinuteClick(item),
|
|
4178
|
+
onDblclick: $event => onMinuteClick(item, true)
|
|
4179
|
+
}, null, 42, _hoisted_4$1);
|
|
4155
4180
|
}), 128))], 512), unref(format) == "HH:mm:ss" ? (openBlock(), createElementBlock("div", _hoisted_5$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(secondItems.value, item => {
|
|
4156
4181
|
return openBlock(), createElementBlock("div", {
|
|
4157
4182
|
class: normalizeClass(["tzi-number", {
|
|
@@ -4160,8 +4185,9 @@ var _sfc_main$4 = defineComponent({
|
|
|
4160
4185
|
}]),
|
|
4161
4186
|
key: `${item.hour}:${item.minute}:${item.second}`,
|
|
4162
4187
|
textContent: toDisplayString(unref(padStart)(item.second, 2, "0")),
|
|
4163
|
-
onClick: $event => onSecondClick(item)
|
|
4164
|
-
|
|
4188
|
+
onClick: $event => onSecondClick(item),
|
|
4189
|
+
onDblclick: $event => onSecondClick(item, true)
|
|
4190
|
+
}, null, 42, _hoisted_6$1);
|
|
4165
4191
|
}), 128))], 512)) : createCommentVNode("", true)]),
|
|
4166
4192
|
_: 1
|
|
4167
4193
|
}, 8, ["effect"])]),
|
|
@@ -4196,18 +4222,19 @@ var _sfc_main$4 = defineComponent({
|
|
|
4196
4222
|
});
|
|
4197
4223
|
|
|
4198
4224
|
const _hoisted_1$3 = ["textContent"];
|
|
4199
|
-
const _hoisted_2 = ["textContent"];
|
|
4225
|
+
const _hoisted_2$2 = ["textContent"];
|
|
4200
4226
|
const _hoisted_3 = ["textContent"];
|
|
4201
|
-
const _hoisted_4 = ["textContent", "onClick"];
|
|
4202
|
-
const _hoisted_5 = ["textContent", "onClick"];
|
|
4227
|
+
const _hoisted_4 = ["textContent", "onClick", "onDblclick"];
|
|
4228
|
+
const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
|
|
4203
4229
|
const _hoisted_6 = ["textContent"];
|
|
4204
|
-
const _hoisted_7 = ["textContent", "onClick"];
|
|
4230
|
+
const _hoisted_7 = ["textContent", "onClick", "onDblclick"];
|
|
4205
4231
|
const _hoisted_8 = ["textContent"];
|
|
4206
4232
|
var _sfc_main$3 = defineComponent({
|
|
4207
4233
|
__name: "date-pc",
|
|
4208
4234
|
props: {
|
|
4209
4235
|
value: {},
|
|
4210
4236
|
format: {},
|
|
4237
|
+
mode: {},
|
|
4211
4238
|
min: {},
|
|
4212
4239
|
max: {},
|
|
4213
4240
|
minPickTime: {},
|
|
@@ -4332,13 +4359,11 @@ var _sfc_main$3 = defineComponent({
|
|
|
4332
4359
|
function onSwitchStepClick(newValue) {
|
|
4333
4360
|
setTimeout(() => stepRef.value = newValue);
|
|
4334
4361
|
}
|
|
4335
|
-
function onYearItemClick(item) {
|
|
4362
|
+
function onYearItemClick(item, dbClick) {
|
|
4336
4363
|
if (item.disabled != true) {
|
|
4337
4364
|
dateRef.value.year = item.year;
|
|
4338
4365
|
if (format == "yyyy") {
|
|
4339
|
-
|
|
4340
|
-
emits("confirm", value);
|
|
4341
|
-
props.inPopup && props.closePopup(value);
|
|
4366
|
+
dbClick && onConfirm();
|
|
4342
4367
|
} else {
|
|
4343
4368
|
dateRef.value.month = 1;
|
|
4344
4369
|
monthItems.value = buildMonthItems(item, min, max);
|
|
@@ -4346,14 +4371,12 @@ var _sfc_main$3 = defineComponent({
|
|
|
4346
4371
|
}
|
|
4347
4372
|
}
|
|
4348
4373
|
}
|
|
4349
|
-
function onMonthItemClick(item) {
|
|
4374
|
+
function onMonthItemClick(item, dbClick) {
|
|
4350
4375
|
if (item.disabled != true) {
|
|
4351
4376
|
dateRef.value.year = item.year;
|
|
4352
4377
|
dateRef.value.month = item.month;
|
|
4353
4378
|
if (format == "yyyy-MM") {
|
|
4354
|
-
|
|
4355
|
-
emits("confirm", value);
|
|
4356
|
-
props.inPopup && props.closePopup(value);
|
|
4379
|
+
dbClick && onConfirm();
|
|
4357
4380
|
} else {
|
|
4358
4381
|
dateRef.value.day = 1;
|
|
4359
4382
|
dayItemsRef.value = buildDayItems(item, min, max);
|
|
@@ -4361,19 +4384,17 @@ var _sfc_main$3 = defineComponent({
|
|
|
4361
4384
|
}
|
|
4362
4385
|
}
|
|
4363
4386
|
}
|
|
4364
|
-
function onDayItemClick(item) {
|
|
4387
|
+
function onDayItemClick(item, dbClick) {
|
|
4365
4388
|
if (item.disabled != true) {
|
|
4366
|
-
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4367
4389
|
Object.assign(dateRef.value, {
|
|
4368
4390
|
year: item.year,
|
|
4369
4391
|
month: item.month,
|
|
4370
4392
|
day: item.day
|
|
4371
4393
|
});
|
|
4372
4394
|
if (format == "yyyy-MM-dd") {
|
|
4373
|
-
|
|
4374
|
-
emits("confirm", value);
|
|
4375
|
-
props.inPopup && props.closePopup(value);
|
|
4395
|
+
dbClick && onConfirm();
|
|
4376
4396
|
} else {
|
|
4397
|
+
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4377
4398
|
isNowMonth || buildPickerItems("day", 0);
|
|
4378
4399
|
}
|
|
4379
4400
|
}
|
|
@@ -4390,10 +4411,13 @@ var _sfc_main$3 = defineComponent({
|
|
|
4390
4411
|
clearDisabled: props.clearDisabled,
|
|
4391
4412
|
toolbarDisabled: props.toolbarDisabled
|
|
4392
4413
|
}, {
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4414
|
+
mode: "follow",
|
|
4415
|
+
follow: {
|
|
4416
|
+
followX: "start",
|
|
4417
|
+
followY: "before",
|
|
4418
|
+
spaceX: -2,
|
|
4419
|
+
spaceY: 4
|
|
4420
|
+
}
|
|
4397
4421
|
});
|
|
4398
4422
|
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
4399
4423
|
if (text != void 0) {
|
|
@@ -4439,6 +4463,8 @@ var _sfc_main$3 = defineComponent({
|
|
|
4439
4463
|
button: "",
|
|
4440
4464
|
rotate: 180,
|
|
4441
4465
|
size: 26,
|
|
4466
|
+
color: "#8a9099",
|
|
4467
|
+
"hover-color": "#58a4fd",
|
|
4442
4468
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
4443
4469
|
}), createElementVNode("div", {
|
|
4444
4470
|
class: normalizeClass(["header-content", stepRef.value])
|
|
@@ -4450,14 +4476,17 @@ var _sfc_main$3 = defineComponent({
|
|
|
4450
4476
|
}, [createElementVNode("div", {
|
|
4451
4477
|
textContent: toDisplayString(`${dateRef.value.year}年`),
|
|
4452
4478
|
onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
|
|
4453
|
-
}, null, 8, _hoisted_2), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
|
|
4479
|
+
}, null, 8, _hoisted_2$2), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
|
|
4454
4480
|
key: 0,
|
|
4455
4481
|
textContent: toDisplayString(`${dateRef.value.month}月`),
|
|
4456
4482
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4457
4483
|
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$E, {
|
|
4484
|
+
class: "flex-0",
|
|
4458
4485
|
type: "arrow",
|
|
4459
4486
|
button: "",
|
|
4460
4487
|
size: 26,
|
|
4488
|
+
color: "#8a9099",
|
|
4489
|
+
"hover-color": "#58a4fd",
|
|
4461
4490
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4462
4491
|
})]),
|
|
4463
4492
|
main: withCtx(() => [stepRef.value == "year" ? (openBlock(true), createElementBlock(Fragment, {
|
|
@@ -4471,8 +4500,9 @@ var _sfc_main$3 = defineComponent({
|
|
|
4471
4500
|
key: item.year
|
|
4472
4501
|
}, [createElementVNode("span", {
|
|
4473
4502
|
textContent: toDisplayString(item.year),
|
|
4474
|
-
onClick: $event => onYearItemClick(item)
|
|
4475
|
-
|
|
4503
|
+
onClick: $event => onYearItemClick(item),
|
|
4504
|
+
onDblclick: $event => onYearItemClick(item, true)
|
|
4505
|
+
}, null, 40, _hoisted_4)], 2);
|
|
4476
4506
|
}), 128)) : stepRef.value == "month" ? (openBlock(true), createElementBlock(Fragment, {
|
|
4477
4507
|
key: 1
|
|
4478
4508
|
}, renderList(monthItems.value, item => {
|
|
@@ -4484,8 +4514,9 @@ var _sfc_main$3 = defineComponent({
|
|
|
4484
4514
|
key: `${item.year}-${item.month}`
|
|
4485
4515
|
}, [createElementVNode("span", {
|
|
4486
4516
|
textContent: toDisplayString(item.text),
|
|
4487
|
-
onClick: $event => onMonthItemClick(item)
|
|
4488
|
-
|
|
4517
|
+
onClick: $event => onMonthItemClick(item),
|
|
4518
|
+
onDblclick: $event => onMonthItemClick(item, true)
|
|
4519
|
+
}, null, 40, _hoisted_5)], 2);
|
|
4489
4520
|
}), 128)) : (openBlock(), createElementBlock(Fragment, {
|
|
4490
4521
|
key: 2
|
|
4491
4522
|
}, [(openBlock(), createElementBlock(Fragment, null, renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
|
|
@@ -4504,8 +4535,9 @@ var _sfc_main$3 = defineComponent({
|
|
|
4504
4535
|
key: `${item.year}-${item.month}-${item.day}`
|
|
4505
4536
|
}, [createElementVNode("span", {
|
|
4506
4537
|
textContent: toDisplayString(item.day),
|
|
4507
|
-
onClick: $event => onDayItemClick(item)
|
|
4508
|
-
|
|
4538
|
+
onClick: $event => onDayItemClick(item),
|
|
4539
|
+
onDblclick: $event => onDayItemClick(item, true)
|
|
4540
|
+
}, null, 40, _hoisted_7)], 2);
|
|
4509
4541
|
}), 128))], 64))]),
|
|
4510
4542
|
_: 2
|
|
4511
4543
|
}, [unref(endStep) == stepRef.value && (__props.toolbarDisabled != true || unref(timeFormat) != void 0) ? {
|
|
@@ -4562,25 +4594,38 @@ function usePicker() {
|
|
|
4562
4594
|
return showPicker(target, _sfc_main$4, options, popupOptions);
|
|
4563
4595
|
}
|
|
4564
4596
|
function showPicker(target, component, options, popupOptions) {
|
|
4565
|
-
{
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
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;
|
|
4582
4618
|
}
|
|
4583
|
-
|
|
4619
|
+
return popup.follow(target, {
|
|
4620
|
+
...follow,
|
|
4621
|
+
component,
|
|
4622
|
+
props: {
|
|
4623
|
+
...options,
|
|
4624
|
+
picker: manager,
|
|
4625
|
+
popup
|
|
4626
|
+
}
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4584
4629
|
}
|
|
4585
4630
|
const manager = Object.freeze(mountScope({
|
|
4586
4631
|
showDate,
|
|
@@ -4591,6 +4636,7 @@ function usePicker() {
|
|
|
4591
4636
|
}
|
|
4592
4637
|
|
|
4593
4638
|
const _hoisted_1$2 = ["title"];
|
|
4639
|
+
const _hoisted_2$1 = ["textContent"];
|
|
4594
4640
|
var _sfc_main$2 = defineComponent({
|
|
4595
4641
|
__name: "date-picker",
|
|
4596
4642
|
props: {
|
|
@@ -4599,6 +4645,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4599
4645
|
},
|
|
4600
4646
|
value: {},
|
|
4601
4647
|
format: {},
|
|
4648
|
+
mode: {},
|
|
4602
4649
|
min: {},
|
|
4603
4650
|
max: {},
|
|
4604
4651
|
minPickTime: {},
|
|
@@ -4611,7 +4658,8 @@ var _sfc_main$2 = defineComponent({
|
|
|
4611
4658
|
},
|
|
4612
4659
|
clearDisabled: {
|
|
4613
4660
|
type: Boolean
|
|
4614
|
-
}
|
|
4661
|
+
},
|
|
4662
|
+
popup: {}
|
|
4615
4663
|
},
|
|
4616
4664
|
emits: ["change"],
|
|
4617
4665
|
setup(__props, _ref) {
|
|
@@ -4638,10 +4686,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4638
4686
|
pickerScope = showDate(pickerDom.value, {
|
|
4639
4687
|
...props,
|
|
4640
4688
|
value: valueRef.value
|
|
4641
|
-
},
|
|
4642
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4643
|
-
closeOnTarget: true
|
|
4644
|
-
});
|
|
4689
|
+
}, props.popup);
|
|
4645
4690
|
const dateText = await pickerScope;
|
|
4646
4691
|
pickerScope = void 0;
|
|
4647
4692
|
if (dateText !== void 0 && dateText != valueRef.value) {
|
|
@@ -4656,18 +4701,20 @@ var _sfc_main$2 = defineComponent({
|
|
|
4656
4701
|
return (_ctx, _cache) => {
|
|
4657
4702
|
return openBlock(), createElementBlock("div", {
|
|
4658
4703
|
class: normalizeClass(["snail-datepicker", {
|
|
4659
|
-
readonly: __props.readonly
|
|
4704
|
+
readonly: __props.readonly,
|
|
4705
|
+
"simple": __props.mode == "simple"
|
|
4660
4706
|
}]),
|
|
4661
|
-
ref: "datepicker",
|
|
4662
4707
|
title: valueRef.value,
|
|
4708
|
+
ref: "datepicker",
|
|
4663
4709
|
onClick: showPicker
|
|
4664
|
-
}, [
|
|
4665
|
-
class: "wh-fill",
|
|
4666
|
-
type: "text",
|
|
4667
|
-
readonly: "",
|
|
4668
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4669
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4710
|
+
}, [__props.mode != "simple" || unref(isStringNotEmpty)(valueRef.value) ? (openBlock(), createElementBlock("span", {
|
|
4670
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,
|
|
4671
4718
|
type: "datepicker",
|
|
4672
4719
|
button: "",
|
|
4673
4720
|
size: 16,
|
|
@@ -4679,6 +4726,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
4679
4726
|
});
|
|
4680
4727
|
|
|
4681
4728
|
const _hoisted_1$1 = ["title"];
|
|
4729
|
+
const _hoisted_2 = ["textContent"];
|
|
4682
4730
|
var _sfc_main$1 = defineComponent({
|
|
4683
4731
|
__name: "time-picker",
|
|
4684
4732
|
props: {
|
|
@@ -4687,6 +4735,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4687
4735
|
},
|
|
4688
4736
|
value: {},
|
|
4689
4737
|
format: {},
|
|
4738
|
+
mode: {},
|
|
4690
4739
|
min: {},
|
|
4691
4740
|
max: {},
|
|
4692
4741
|
toolbarDisabled: {
|
|
@@ -4697,7 +4746,8 @@ var _sfc_main$1 = defineComponent({
|
|
|
4697
4746
|
},
|
|
4698
4747
|
clearDisabled: {
|
|
4699
4748
|
type: Boolean
|
|
4700
|
-
}
|
|
4749
|
+
},
|
|
4750
|
+
popup: {}
|
|
4701
4751
|
},
|
|
4702
4752
|
emits: ["change"],
|
|
4703
4753
|
setup(__props, _ref) {
|
|
@@ -4724,10 +4774,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4724
4774
|
pickerScope = showTime(pickerDom.value, {
|
|
4725
4775
|
...props,
|
|
4726
4776
|
value: valueRef.value
|
|
4727
|
-
},
|
|
4728
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4729
|
-
closeOnTarget: true
|
|
4730
|
-
});
|
|
4777
|
+
}, props.popup);
|
|
4731
4778
|
const timeText = await pickerScope;
|
|
4732
4779
|
pickerScope = void 0;
|
|
4733
4780
|
if (timeText !== void 0 && timeText != valueRef.value) {
|
|
@@ -4742,18 +4789,20 @@ var _sfc_main$1 = defineComponent({
|
|
|
4742
4789
|
return (_ctx, _cache) => {
|
|
4743
4790
|
return openBlock(), createElementBlock("div", {
|
|
4744
4791
|
class: normalizeClass(["snail-timepicker", {
|
|
4745
|
-
readonly: __props.readonly
|
|
4792
|
+
readonly: __props.readonly,
|
|
4793
|
+
"simple": __props.mode == "simple"
|
|
4746
4794
|
}]),
|
|
4747
4795
|
ref: "timepicker",
|
|
4748
4796
|
title: valueRef.value,
|
|
4749
4797
|
onClick: showPicker
|
|
4750
|
-
}, [
|
|
4751
|
-
class: "wh-fill",
|
|
4752
|
-
type: "text",
|
|
4753
|
-
readonly: "",
|
|
4754
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4755
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
4798
|
+
}, [__props.mode != "simple" || unref(isStringNotEmpty)(valueRef.value) ? (openBlock(), createElementBlock("span", {
|
|
4756
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,
|
|
4757
4806
|
type: "timepicker",
|
|
4758
4807
|
button: "",
|
|
4759
4808
|
size: 20,
|