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.umd.js
CHANGED
|
@@ -17,16 +17,26 @@
|
|
|
17
17
|
size: {},
|
|
18
18
|
type: {}
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
emits: ["click"],
|
|
21
|
+
setup(__props, _ref) {
|
|
22
|
+
let {
|
|
23
|
+
emit: __emit
|
|
24
|
+
} = _ref;
|
|
25
|
+
const emits = __emit;
|
|
21
26
|
return (_ctx, _cache) => {
|
|
22
27
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
23
28
|
class: vue.normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
24
|
-
title: __props.title
|
|
25
|
-
|
|
29
|
+
title: __props.title,
|
|
30
|
+
onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
|
|
31
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[1] || (_cache[1] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$o);
|
|
26
32
|
};
|
|
27
33
|
}
|
|
28
34
|
});
|
|
29
35
|
|
|
36
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
37
|
+
|
|
38
|
+
addLink("/styles/snail.vue.vue.css");
|
|
39
|
+
|
|
30
40
|
function getBuiltinIcon(iconType) {
|
|
31
41
|
switch (iconType) {
|
|
32
42
|
case "success":
|
|
@@ -45,6 +55,8 @@
|
|
|
45
55
|
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"];
|
|
46
56
|
case "edit":
|
|
47
57
|
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"];
|
|
58
|
+
case "pause":
|
|
59
|
+
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"];
|
|
48
60
|
case "arrow":
|
|
49
61
|
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"];
|
|
50
62
|
case "datepicker":
|
|
@@ -68,7 +80,7 @@
|
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
const _hoisted_1$n = ["viewBox"];
|
|
71
|
-
const _hoisted_2$
|
|
83
|
+
const _hoisted_2$h = ["textContent"];
|
|
72
84
|
const _hoisted_3$a = ["d"];
|
|
73
85
|
var _sfc_main$E = vue.defineComponent({
|
|
74
86
|
__name: "icon",
|
|
@@ -86,11 +98,18 @@
|
|
|
86
98
|
hoverColor: {},
|
|
87
99
|
rotate: {},
|
|
88
100
|
opacity: {},
|
|
101
|
+
border: {},
|
|
102
|
+
radius: {},
|
|
103
|
+
background: {},
|
|
89
104
|
viewBox: {}
|
|
90
105
|
},
|
|
91
|
-
|
|
106
|
+
emits: ["click"],
|
|
107
|
+
setup(__props, _ref) {
|
|
108
|
+
let {
|
|
109
|
+
emit: __emit
|
|
110
|
+
} = _ref;
|
|
92
111
|
const props = __props;
|
|
93
|
-
const
|
|
112
|
+
const emits = __emit;
|
|
94
113
|
const sizeRef = vue.computed(() => {
|
|
95
114
|
if (snail_core.isObject(props.size) == true) {
|
|
96
115
|
return {
|
|
@@ -107,13 +126,17 @@
|
|
|
107
126
|
});
|
|
108
127
|
const styleRef = vue.computed(() => {
|
|
109
128
|
const style = Object.create(null);
|
|
110
|
-
let fill =
|
|
111
|
-
fill
|
|
112
|
-
fill
|
|
129
|
+
let fill = snail_core.correctString(props.color, void 0, true);
|
|
130
|
+
fill && (style["--fill"] = fill);
|
|
131
|
+
fill = snail_core.correctString(props.hoverColor, fill, true);
|
|
132
|
+
fill && (style["--hover"] = fill);
|
|
113
133
|
const rotate = snail_core.correctNumber(props.rotate, 0);
|
|
114
134
|
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
115
135
|
const opacity = snail_core.correctNumber(props.opacity, void 0);
|
|
116
136
|
opacity >= 0 && (style.opacity = opacity);
|
|
137
|
+
style.border = snail_core.correctString(props.border, void 0, true);
|
|
138
|
+
style.borderRadius = snail_core.correctString(props.radius, void 0, true);
|
|
139
|
+
style.background = snail_core.correctString(props.background, void 0, true);
|
|
117
140
|
return style;
|
|
118
141
|
});
|
|
119
142
|
return (_ctx, _cache) => {
|
|
@@ -124,11 +147,10 @@
|
|
|
124
147
|
viewBox: vue.unref(snail_core.correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
125
148
|
}, sizeRef.value, {
|
|
126
149
|
style: styleRef.value,
|
|
127
|
-
|
|
128
|
-
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
150
|
+
onClick: _cache[0] || (_cache[0] = evt => emits("click", evt))
|
|
129
151
|
}), [vue.createElementVNode("title", {
|
|
130
152
|
textContent: vue.toDisplayString(__props.title || "")
|
|
131
|
-
}, null, 8, _hoisted_2$
|
|
153
|
+
}, null, 8, _hoisted_2$h), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
|
|
132
154
|
key: 0
|
|
133
155
|
}) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
134
156
|
key: 1
|
|
@@ -142,7 +164,7 @@
|
|
|
142
164
|
});
|
|
143
165
|
|
|
144
166
|
const _hoisted_1$m = ["title", "onClick"];
|
|
145
|
-
const _hoisted_2$
|
|
167
|
+
const _hoisted_2$g = ["type", "checked"];
|
|
146
168
|
const _hoisted_3$9 = ["textContent"];
|
|
147
169
|
const _hoisted_4$6 = ["textContent"];
|
|
148
170
|
var _sfc_main$D = vue.defineComponent({
|
|
@@ -221,7 +243,7 @@
|
|
|
221
243
|
key: 0,
|
|
222
244
|
type: vue.unref(type),
|
|
223
245
|
checked: node.selected
|
|
224
|
-
}, null, 8, _hoisted_2$
|
|
246
|
+
}, null, 8, _hoisted_2$g)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
225
247
|
key: 1,
|
|
226
248
|
class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
227
249
|
}, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
@@ -243,10 +265,6 @@
|
|
|
243
265
|
}
|
|
244
266
|
});
|
|
245
267
|
|
|
246
|
-
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
247
|
-
|
|
248
|
-
addLink("/styles/snail.vue.vue.css");
|
|
249
|
-
|
|
250
268
|
var _sfc_main$C = vue.defineComponent({
|
|
251
269
|
...{
|
|
252
270
|
name: "Footer",
|
|
@@ -349,7 +367,7 @@
|
|
|
349
367
|
});
|
|
350
368
|
|
|
351
369
|
const _hoisted_1$k = ["textContent"];
|
|
352
|
-
const _hoisted_2$
|
|
370
|
+
const _hoisted_2$f = {
|
|
353
371
|
key: 0,
|
|
354
372
|
class: "required",
|
|
355
373
|
textContent: "*"
|
|
@@ -411,7 +429,7 @@
|
|
|
411
429
|
}, [vue.createElementVNode("span", {
|
|
412
430
|
class: "text",
|
|
413
431
|
textContent: vue.toDisplayString(__props.title)
|
|
414
|
-
}, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
432
|
+
}, null, 8, _hoisted_1$k), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$f)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
|
|
415
433
|
ref: "input-el",
|
|
416
434
|
type: __props.type || "text",
|
|
417
435
|
value: inputModel.value,
|
|
@@ -638,7 +656,7 @@
|
|
|
638
656
|
key: 0,
|
|
639
657
|
class: "number-prefix"
|
|
640
658
|
};
|
|
641
|
-
const _hoisted_2$
|
|
659
|
+
const _hoisted_2$e = ["textContent"];
|
|
642
660
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
643
661
|
const _hoisted_4$4 = {
|
|
644
662
|
key: 1,
|
|
@@ -797,7 +815,7 @@
|
|
|
797
815
|
}, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [vue.createElementVNode("span", {
|
|
798
816
|
class: "ellipsis",
|
|
799
817
|
textContent: vue.toDisplayString(vue.unref(prefix))
|
|
800
|
-
}, null, 8, _hoisted_2$
|
|
818
|
+
}, null, 8, _hoisted_2$e)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
801
819
|
class: vue.normalizeClass(["input-panel", vue.unref(controls)])
|
|
802
820
|
}, [vue.withDirectives(vue.createElementVNode("input", {
|
|
803
821
|
type: "text",
|
|
@@ -1137,7 +1155,7 @@
|
|
|
1137
1155
|
const _hoisted_1$h = {
|
|
1138
1156
|
class: "snail-confirm flex-column"
|
|
1139
1157
|
};
|
|
1140
|
-
const _hoisted_2$
|
|
1158
|
+
const _hoisted_2$d = ["innerHTML"];
|
|
1141
1159
|
var _sfc_main$x = vue.defineComponent({
|
|
1142
1160
|
...{
|
|
1143
1161
|
name: "ConfirmContainer",
|
|
@@ -1173,7 +1191,7 @@
|
|
|
1173
1191
|
}, null, 8, ["title"]), vue.createElementVNode("div", {
|
|
1174
1192
|
class: "confirm-body",
|
|
1175
1193
|
innerHTML: __props.message || "请确认?"
|
|
1176
|
-
}, null, 8, _hoisted_2$
|
|
1194
|
+
}, null, 8, _hoisted_2$d), vue.createVNode(_sfc_main$C, {
|
|
1177
1195
|
align: "right",
|
|
1178
1196
|
"cancel-name": __props.cancelName,
|
|
1179
1197
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1834,7 +1852,7 @@
|
|
|
1834
1852
|
key: 1,
|
|
1835
1853
|
class: "icon"
|
|
1836
1854
|
};
|
|
1837
|
-
const _hoisted_2$
|
|
1855
|
+
const _hoisted_2$c = ["innerHTML"];
|
|
1838
1856
|
var _sfc_main$o = vue.defineComponent({
|
|
1839
1857
|
...{
|
|
1840
1858
|
name: "ToastContainer",
|
|
@@ -1890,7 +1908,7 @@
|
|
|
1890
1908
|
}, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
1891
1909
|
class: "message",
|
|
1892
1910
|
innerHTML: vue.unref(props).message
|
|
1893
|
-
}, null, 8, _hoisted_2$
|
|
1911
|
+
}, null, 8, _hoisted_2$c)], 38);
|
|
1894
1912
|
};
|
|
1895
1913
|
}
|
|
1896
1914
|
});
|
|
@@ -2136,7 +2154,7 @@
|
|
|
2136
2154
|
const _hoisted_1$f = {
|
|
2137
2155
|
class: "snail-empty"
|
|
2138
2156
|
};
|
|
2139
|
-
const _hoisted_2$
|
|
2157
|
+
const _hoisted_2$b = ["src"];
|
|
2140
2158
|
const _hoisted_3$6 = ["textContent"];
|
|
2141
2159
|
var _sfc_main$n = vue.defineComponent({
|
|
2142
2160
|
...{
|
|
@@ -2153,7 +2171,7 @@
|
|
|
2153
2171
|
return (_ctx, _cache) => {
|
|
2154
2172
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [vue.createElementVNode("img", {
|
|
2155
2173
|
src: __props.imageUrl || vue.unref(defaultImageBase64)
|
|
2156
|
-
}, null, 8, _hoisted_2$
|
|
2174
|
+
}, null, 8, _hoisted_2$b), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
|
|
2157
2175
|
class: "message",
|
|
2158
2176
|
textContent: vue.toDisplayString(__props.message || "无数据")
|
|
2159
2177
|
}, null, 8, _hoisted_3$6)])]);
|
|
@@ -2162,7 +2180,7 @@
|
|
|
2162
2180
|
});
|
|
2163
2181
|
|
|
2164
2182
|
const _hoisted_1$e = ["title"];
|
|
2165
|
-
const _hoisted_2$
|
|
2183
|
+
const _hoisted_2$a = ["textContent"];
|
|
2166
2184
|
const _hoisted_3$5 = {
|
|
2167
2185
|
key: 1,
|
|
2168
2186
|
class: "select-status"
|
|
@@ -2212,7 +2230,7 @@
|
|
|
2212
2230
|
}, [vue.createElementVNode("div", {
|
|
2213
2231
|
class: "item-text ellipsis",
|
|
2214
2232
|
textContent: vue.toDisplayString(__props.item.text)
|
|
2215
|
-
}, null, 8, _hoisted_2$
|
|
2233
|
+
}, null, 8, _hoisted_2$a), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
2216
2234
|
key: 0,
|
|
2217
2235
|
type: "arrow"
|
|
2218
2236
|
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$E, {
|
|
@@ -2440,7 +2458,7 @@
|
|
|
2440
2458
|
key: 0,
|
|
2441
2459
|
class: "select-result"
|
|
2442
2460
|
};
|
|
2443
|
-
const _hoisted_2$
|
|
2461
|
+
const _hoisted_2$9 = ["title", "textContent"];
|
|
2444
2462
|
const _hoisted_3$4 = ["textContent"];
|
|
2445
2463
|
const _hoisted_4$3 = {
|
|
2446
2464
|
key: 1,
|
|
@@ -2585,7 +2603,7 @@
|
|
|
2585
2603
|
class: "select-text ellipsis",
|
|
2586
2604
|
title: selectedTextRef.value,
|
|
2587
2605
|
textContent: vue.toDisplayString(selectedTextRef.value)
|
|
2588
|
-
}, null, 8, _hoisted_2$
|
|
2606
|
+
}, null, 8, _hoisted_2$9)])])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
2589
2607
|
key: 1,
|
|
2590
2608
|
class: "placeholder",
|
|
2591
2609
|
textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
@@ -2724,7 +2742,7 @@
|
|
|
2724
2742
|
});
|
|
2725
2743
|
|
|
2726
2744
|
const _hoisted_1$b = ["onClick"];
|
|
2727
|
-
const _hoisted_2$
|
|
2745
|
+
const _hoisted_2$8 = ["textContent"];
|
|
2728
2746
|
var _sfc_main$h = vue.defineComponent({
|
|
2729
2747
|
__name: "action-items",
|
|
2730
2748
|
props: {
|
|
@@ -2772,7 +2790,7 @@
|
|
|
2772
2790
|
}), null, 16)) : vue.createCommentVNode("", true), vue.createElementVNode("span", {
|
|
2773
2791
|
class: "ellipsis",
|
|
2774
2792
|
textContent: vue.toDisplayString(action.name)
|
|
2775
|
-
}, null, 8, _hoisted_2$
|
|
2793
|
+
}, null, 8, _hoisted_2$8)], 12, _hoisted_1$b);
|
|
2776
2794
|
}), 128))], 2);
|
|
2777
2795
|
};
|
|
2778
2796
|
}
|
|
@@ -2782,7 +2800,7 @@
|
|
|
2782
2800
|
class: "snail-action flex-cross-center",
|
|
2783
2801
|
ref: "snail-action"
|
|
2784
2802
|
};
|
|
2785
|
-
const _hoisted_2$
|
|
2803
|
+
const _hoisted_2$7 = {
|
|
2786
2804
|
class: "action-slot flex-cross-center"
|
|
2787
2805
|
};
|
|
2788
2806
|
var _sfc_main$g = vue.defineComponent({
|
|
@@ -2792,7 +2810,11 @@
|
|
|
2792
2810
|
type: Boolean
|
|
2793
2811
|
},
|
|
2794
2812
|
trigger: {},
|
|
2795
|
-
actions: {}
|
|
2813
|
+
actions: {},
|
|
2814
|
+
followX: {},
|
|
2815
|
+
followY: {},
|
|
2816
|
+
spaceX: {},
|
|
2817
|
+
spaceY: {}
|
|
2796
2818
|
},
|
|
2797
2819
|
emits: ["trigger"],
|
|
2798
2820
|
setup(__props, _ref) {
|
|
@@ -2824,8 +2846,10 @@
|
|
|
2824
2846
|
closeOnMask: true,
|
|
2825
2847
|
closeOnResize: true,
|
|
2826
2848
|
closeOnTarget: true,
|
|
2827
|
-
followX:
|
|
2828
|
-
followY:
|
|
2849
|
+
followX: props.followX || ["center", "start", "end", "after", "before", "ratio"],
|
|
2850
|
+
followY: props.followY || ["after", "before", "center", "end", "start", "ratio"],
|
|
2851
|
+
spaceX: props.spaceX,
|
|
2852
|
+
spaceY: props.spaceY,
|
|
2829
2853
|
props: {
|
|
2830
2854
|
mode: "vertical",
|
|
2831
2855
|
actions: props.actions
|
|
@@ -2847,7 +2871,7 @@
|
|
|
2847
2871
|
pressStartDate = void 0;
|
|
2848
2872
|
if (time >= 0.5) {
|
|
2849
2873
|
navigator.vibrate && navigator.vibrate(200);
|
|
2850
|
-
onFollowShow(
|
|
2874
|
+
onFollowShow();
|
|
2851
2875
|
}
|
|
2852
2876
|
}
|
|
2853
2877
|
}
|
|
@@ -2868,7 +2892,7 @@
|
|
|
2868
2892
|
}
|
|
2869
2893
|
});
|
|
2870
2894
|
return (_ctx, _cache) => {
|
|
2871
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$
|
|
2895
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$7, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))))]), __props.disabled != true && (__props.trigger == "hover" || __props.trigger == "always") ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2872
2896
|
key: 0,
|
|
2873
2897
|
class: vue.normalizeClass(["trigger-area", {
|
|
2874
2898
|
hidden: __props.trigger == "hover"
|
|
@@ -2877,7 +2901,7 @@
|
|
|
2877
2901
|
button: "",
|
|
2878
2902
|
type: "more",
|
|
2879
2903
|
size: 16,
|
|
2880
|
-
onClick: _cache[0] || (_cache[0] = $event => onFollowShow(
|
|
2904
|
+
onClick: _cache[0] || (_cache[0] = $event => onFollowShow())
|
|
2881
2905
|
})])], 2)) : vue.createCommentVNode("", true)], 512);
|
|
2882
2906
|
};
|
|
2883
2907
|
}
|
|
@@ -3185,7 +3209,7 @@
|
|
|
3185
3209
|
});
|
|
3186
3210
|
|
|
3187
3211
|
const _hoisted_1$9 = ["textContent"];
|
|
3188
|
-
const _hoisted_2$
|
|
3212
|
+
const _hoisted_2$6 = ["textContent"];
|
|
3189
3213
|
const _hoisted_3$3 = {
|
|
3190
3214
|
key: 1,
|
|
3191
3215
|
class: "status"
|
|
@@ -3286,7 +3310,7 @@
|
|
|
3286
3310
|
key: 0,
|
|
3287
3311
|
class: "subtitle ellipsis",
|
|
3288
3312
|
textContent: vue.toDisplayString(__props.subtitle)
|
|
3289
|
-
}, null, 8, _hoisted_2$
|
|
3313
|
+
}, null, 8, _hoisted_2$6)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [vue.createVNode(_sfc_main$E, {
|
|
3290
3314
|
type: "arrow",
|
|
3291
3315
|
button: "",
|
|
3292
3316
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
@@ -3613,7 +3637,7 @@
|
|
|
3613
3637
|
key: 0,
|
|
3614
3638
|
class: "node-fold"
|
|
3615
3639
|
};
|
|
3616
|
-
const _hoisted_2$
|
|
3640
|
+
const _hoisted_2$5 = ["title", "textContent"];
|
|
3617
3641
|
const _hoisted_3$2 = {
|
|
3618
3642
|
class: "node-slot ellipsis"
|
|
3619
3643
|
};
|
|
@@ -3744,7 +3768,7 @@
|
|
|
3744
3768
|
class: "node-text ellipsis",
|
|
3745
3769
|
title: __props.node.text,
|
|
3746
3770
|
textContent: vue.toDisplayString(__props.node.text)
|
|
3747
|
-
}, null, 8, _hoisted_2$
|
|
3771
|
+
}, null, 8, _hoisted_2$5), vue.createElementVNode("div", _hoisted_3$2, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34), [[vue.vShow, showRef.value]]), vue.withDirectives(vue.createElementVNode("div", _hoisted_4$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
|
|
3748
3772
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
3749
3773
|
key: __props.context.getKey(child),
|
|
3750
3774
|
node: child,
|
|
@@ -3845,7 +3869,7 @@
|
|
|
3845
3869
|
const _hoisted_1$5 = {
|
|
3846
3870
|
class: "snail-flash-number"
|
|
3847
3871
|
};
|
|
3848
|
-
const _hoisted_2$
|
|
3872
|
+
const _hoisted_2$4 = ["textContent"];
|
|
3849
3873
|
var _sfc_main$5 = vue.defineComponent({
|
|
3850
3874
|
__name: "flash-number",
|
|
3851
3875
|
props: {
|
|
@@ -3879,7 +3903,7 @@
|
|
|
3879
3903
|
key: item.id,
|
|
3880
3904
|
textContent: vue.toDisplayString(item.text),
|
|
3881
3905
|
class: vue.normalizeClass(vue.unref(snail_core.isNullish)(item.number) ? "" : "number-item")
|
|
3882
|
-
}, null, 10, _hoisted_2$
|
|
3906
|
+
}, null, 10, _hoisted_2$4);
|
|
3883
3907
|
}), 128)), _cache[0] || (_cache[0] = vue.createElementVNode("span", {
|
|
3884
3908
|
style: {
|
|
3885
3909
|
"color": "red"
|
|
@@ -4009,23 +4033,24 @@
|
|
|
4009
4033
|
class: "tz-item",
|
|
4010
4034
|
ref: "hour-items"
|
|
4011
4035
|
};
|
|
4012
|
-
const _hoisted_2$
|
|
4036
|
+
const _hoisted_2$3 = ["textContent", "onClick", "onDblclick"];
|
|
4013
4037
|
const _hoisted_3$1 = {
|
|
4014
4038
|
class: "tz-item",
|
|
4015
4039
|
ref: "minute-items"
|
|
4016
4040
|
};
|
|
4017
|
-
const _hoisted_4$1 = ["textContent", "onClick"];
|
|
4041
|
+
const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
|
|
4018
4042
|
const _hoisted_5$1 = {
|
|
4019
4043
|
key: 0,
|
|
4020
4044
|
class: "tz-item",
|
|
4021
4045
|
ref: "second-items"
|
|
4022
4046
|
};
|
|
4023
|
-
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
4047
|
+
const _hoisted_6$1 = ["textContent", "onClick", "onDblclick"];
|
|
4024
4048
|
var _sfc_main$4 = vue.defineComponent({
|
|
4025
4049
|
__name: "time-pc",
|
|
4026
4050
|
props: {
|
|
4027
4051
|
value: {},
|
|
4028
4052
|
format: {},
|
|
4053
|
+
mode: {},
|
|
4029
4054
|
min: {},
|
|
4030
4055
|
max: {},
|
|
4031
4056
|
toolbarDisabled: {
|
|
@@ -4090,29 +4115,27 @@
|
|
|
4090
4115
|
block: "center"
|
|
4091
4116
|
});
|
|
4092
4117
|
}
|
|
4093
|
-
function onHourClick(item) {
|
|
4118
|
+
function onHourClick(item, dbClick) {
|
|
4094
4119
|
if (item.disabled != true && timeRef.value.hour != item.hour) {
|
|
4095
4120
|
timeRef.value.hour = item.hour;
|
|
4096
4121
|
minuteItems.value = buildMinuteItems(item, min, max);
|
|
4097
4122
|
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
4098
4123
|
}
|
|
4099
4124
|
}
|
|
4100
|
-
function onMinuteClick(item) {
|
|
4125
|
+
function onMinuteClick(item, dbClick) {
|
|
4101
4126
|
if (item.disabled != true) {
|
|
4127
|
+
timeRef.value.minute = item.minute;
|
|
4102
4128
|
if (format == "HH:mm") {
|
|
4103
|
-
|
|
4104
|
-
emits("confirm", value);
|
|
4105
|
-
props.inPopup && props.closePopup(value);
|
|
4129
|
+
dbClick && onConfirm();
|
|
4106
4130
|
} else if (timeRef.value.minute != item.minute) {
|
|
4107
|
-
timeRef.value.minute = item.minute;
|
|
4108
4131
|
secondItems.value = buildSecondItems(item, min, max);
|
|
4109
4132
|
}
|
|
4110
4133
|
}
|
|
4111
4134
|
}
|
|
4112
|
-
function onSecondClick(item) {
|
|
4135
|
+
function onSecondClick(item, dbClick) {
|
|
4113
4136
|
if (item.disabled != true) {
|
|
4114
4137
|
timeRef.value.second = item.second;
|
|
4115
|
-
onConfirm();
|
|
4138
|
+
dbClick && onConfirm();
|
|
4116
4139
|
}
|
|
4117
4140
|
}
|
|
4118
4141
|
function onConfirm() {
|
|
@@ -4142,8 +4165,9 @@
|
|
|
4142
4165
|
}]),
|
|
4143
4166
|
key: item.hour,
|
|
4144
4167
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.hour, 2, "0")),
|
|
4145
|
-
onClick: $event => onHourClick(item)
|
|
4146
|
-
|
|
4168
|
+
onClick: $event => onHourClick(item),
|
|
4169
|
+
onDblclick: $event => onHourClick(item)
|
|
4170
|
+
}, null, 42, _hoisted_2$3);
|
|
4147
4171
|
}), 128))], 512), vue.createElementVNode("div", _hoisted_3$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(minuteItems.value, item => {
|
|
4148
4172
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4149
4173
|
class: vue.normalizeClass(["tzi-number", {
|
|
@@ -4152,8 +4176,9 @@
|
|
|
4152
4176
|
}]),
|
|
4153
4177
|
key: `${item.hour}:${item.minute}`,
|
|
4154
4178
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.minute, 2, "0")),
|
|
4155
|
-
onClick: $event => onMinuteClick(item)
|
|
4156
|
-
|
|
4179
|
+
onClick: $event => onMinuteClick(item),
|
|
4180
|
+
onDblclick: $event => onMinuteClick(item, true)
|
|
4181
|
+
}, null, 42, _hoisted_4$1);
|
|
4157
4182
|
}), 128))], 512), vue.unref(format) == "HH:mm:ss" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(secondItems.value, item => {
|
|
4158
4183
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4159
4184
|
class: vue.normalizeClass(["tzi-number", {
|
|
@@ -4162,8 +4187,9 @@
|
|
|
4162
4187
|
}]),
|
|
4163
4188
|
key: `${item.hour}:${item.minute}:${item.second}`,
|
|
4164
4189
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.second, 2, "0")),
|
|
4165
|
-
onClick: $event => onSecondClick(item)
|
|
4166
|
-
|
|
4190
|
+
onClick: $event => onSecondClick(item),
|
|
4191
|
+
onDblclick: $event => onSecondClick(item, true)
|
|
4192
|
+
}, null, 42, _hoisted_6$1);
|
|
4167
4193
|
}), 128))], 512)) : vue.createCommentVNode("", true)]),
|
|
4168
4194
|
_: 1
|
|
4169
4195
|
}, 8, ["effect"])]),
|
|
@@ -4198,18 +4224,19 @@
|
|
|
4198
4224
|
});
|
|
4199
4225
|
|
|
4200
4226
|
const _hoisted_1$3 = ["textContent"];
|
|
4201
|
-
const _hoisted_2 = ["textContent"];
|
|
4227
|
+
const _hoisted_2$2 = ["textContent"];
|
|
4202
4228
|
const _hoisted_3 = ["textContent"];
|
|
4203
|
-
const _hoisted_4 = ["textContent", "onClick"];
|
|
4204
|
-
const _hoisted_5 = ["textContent", "onClick"];
|
|
4229
|
+
const _hoisted_4 = ["textContent", "onClick", "onDblclick"];
|
|
4230
|
+
const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
|
|
4205
4231
|
const _hoisted_6 = ["textContent"];
|
|
4206
|
-
const _hoisted_7 = ["textContent", "onClick"];
|
|
4232
|
+
const _hoisted_7 = ["textContent", "onClick", "onDblclick"];
|
|
4207
4233
|
const _hoisted_8 = ["textContent"];
|
|
4208
4234
|
var _sfc_main$3 = vue.defineComponent({
|
|
4209
4235
|
__name: "date-pc",
|
|
4210
4236
|
props: {
|
|
4211
4237
|
value: {},
|
|
4212
4238
|
format: {},
|
|
4239
|
+
mode: {},
|
|
4213
4240
|
min: {},
|
|
4214
4241
|
max: {},
|
|
4215
4242
|
minPickTime: {},
|
|
@@ -4334,13 +4361,11 @@
|
|
|
4334
4361
|
function onSwitchStepClick(newValue) {
|
|
4335
4362
|
setTimeout(() => stepRef.value = newValue);
|
|
4336
4363
|
}
|
|
4337
|
-
function onYearItemClick(item) {
|
|
4364
|
+
function onYearItemClick(item, dbClick) {
|
|
4338
4365
|
if (item.disabled != true) {
|
|
4339
4366
|
dateRef.value.year = item.year;
|
|
4340
4367
|
if (format == "yyyy") {
|
|
4341
|
-
|
|
4342
|
-
emits("confirm", value);
|
|
4343
|
-
props.inPopup && props.closePopup(value);
|
|
4368
|
+
dbClick && onConfirm();
|
|
4344
4369
|
} else {
|
|
4345
4370
|
dateRef.value.month = 1;
|
|
4346
4371
|
monthItems.value = buildMonthItems(item, min, max);
|
|
@@ -4348,14 +4373,12 @@
|
|
|
4348
4373
|
}
|
|
4349
4374
|
}
|
|
4350
4375
|
}
|
|
4351
|
-
function onMonthItemClick(item) {
|
|
4376
|
+
function onMonthItemClick(item, dbClick) {
|
|
4352
4377
|
if (item.disabled != true) {
|
|
4353
4378
|
dateRef.value.year = item.year;
|
|
4354
4379
|
dateRef.value.month = item.month;
|
|
4355
4380
|
if (format == "yyyy-MM") {
|
|
4356
|
-
|
|
4357
|
-
emits("confirm", value);
|
|
4358
|
-
props.inPopup && props.closePopup(value);
|
|
4381
|
+
dbClick && onConfirm();
|
|
4359
4382
|
} else {
|
|
4360
4383
|
dateRef.value.day = 1;
|
|
4361
4384
|
dayItemsRef.value = buildDayItems(item, min, max);
|
|
@@ -4363,19 +4386,17 @@
|
|
|
4363
4386
|
}
|
|
4364
4387
|
}
|
|
4365
4388
|
}
|
|
4366
|
-
function onDayItemClick(item) {
|
|
4389
|
+
function onDayItemClick(item, dbClick) {
|
|
4367
4390
|
if (item.disabled != true) {
|
|
4368
|
-
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4369
4391
|
Object.assign(dateRef.value, {
|
|
4370
4392
|
year: item.year,
|
|
4371
4393
|
month: item.month,
|
|
4372
4394
|
day: item.day
|
|
4373
4395
|
});
|
|
4374
4396
|
if (format == "yyyy-MM-dd") {
|
|
4375
|
-
|
|
4376
|
-
emits("confirm", value);
|
|
4377
|
-
props.inPopup && props.closePopup(value);
|
|
4397
|
+
dbClick && onConfirm();
|
|
4378
4398
|
} else {
|
|
4399
|
+
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4379
4400
|
isNowMonth || buildPickerItems("day", 0);
|
|
4380
4401
|
}
|
|
4381
4402
|
}
|
|
@@ -4392,10 +4413,13 @@
|
|
|
4392
4413
|
clearDisabled: props.clearDisabled,
|
|
4393
4414
|
toolbarDisabled: props.toolbarDisabled
|
|
4394
4415
|
}, {
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4416
|
+
mode: "follow",
|
|
4417
|
+
follow: {
|
|
4418
|
+
followX: "start",
|
|
4419
|
+
followY: "before",
|
|
4420
|
+
spaceX: -2,
|
|
4421
|
+
spaceY: 4
|
|
4422
|
+
}
|
|
4399
4423
|
});
|
|
4400
4424
|
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
4401
4425
|
if (text != void 0) {
|
|
@@ -4441,6 +4465,8 @@
|
|
|
4441
4465
|
button: "",
|
|
4442
4466
|
rotate: 180,
|
|
4443
4467
|
size: 26,
|
|
4468
|
+
color: "#8a9099",
|
|
4469
|
+
"hover-color": "#58a4fd",
|
|
4444
4470
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
4445
4471
|
}), vue.createElementVNode("div", {
|
|
4446
4472
|
class: vue.normalizeClass(["header-content", stepRef.value])
|
|
@@ -4452,14 +4478,17 @@
|
|
|
4452
4478
|
}, [vue.createElementVNode("div", {
|
|
4453
4479
|
textContent: vue.toDisplayString(`${dateRef.value.year}年`),
|
|
4454
4480
|
onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
|
|
4455
|
-
}, null, 8, _hoisted_2), stepRef.value == "day" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4481
|
+
}, null, 8, _hoisted_2$2), stepRef.value == "day" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4456
4482
|
key: 0,
|
|
4457
4483
|
textContent: vue.toDisplayString(`${dateRef.value.month}月`),
|
|
4458
4484
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4459
4485
|
}, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$E, {
|
|
4486
|
+
class: "flex-0",
|
|
4460
4487
|
type: "arrow",
|
|
4461
4488
|
button: "",
|
|
4462
4489
|
size: 26,
|
|
4490
|
+
color: "#8a9099",
|
|
4491
|
+
"hover-color": "#58a4fd",
|
|
4463
4492
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4464
4493
|
})]),
|
|
4465
4494
|
main: vue.withCtx(() => [stepRef.value == "year" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
@@ -4473,8 +4502,9 @@
|
|
|
4473
4502
|
key: item.year
|
|
4474
4503
|
}, [vue.createElementVNode("span", {
|
|
4475
4504
|
textContent: vue.toDisplayString(item.year),
|
|
4476
|
-
onClick: $event => onYearItemClick(item)
|
|
4477
|
-
|
|
4505
|
+
onClick: $event => onYearItemClick(item),
|
|
4506
|
+
onDblclick: $event => onYearItemClick(item, true)
|
|
4507
|
+
}, null, 40, _hoisted_4)], 2);
|
|
4478
4508
|
}), 128)) : stepRef.value == "month" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
4479
4509
|
key: 1
|
|
4480
4510
|
}, vue.renderList(monthItems.value, item => {
|
|
@@ -4486,8 +4516,9 @@
|
|
|
4486
4516
|
key: `${item.year}-${item.month}`
|
|
4487
4517
|
}, [vue.createElementVNode("span", {
|
|
4488
4518
|
textContent: vue.toDisplayString(item.text),
|
|
4489
|
-
onClick: $event => onMonthItemClick(item)
|
|
4490
|
-
|
|
4519
|
+
onClick: $event => onMonthItemClick(item),
|
|
4520
|
+
onDblclick: $event => onMonthItemClick(item, true)
|
|
4521
|
+
}, null, 40, _hoisted_5)], 2);
|
|
4491
4522
|
}), 128)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4492
4523
|
key: 2
|
|
4493
4524
|
}, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
|
|
@@ -4506,8 +4537,9 @@
|
|
|
4506
4537
|
key: `${item.year}-${item.month}-${item.day}`
|
|
4507
4538
|
}, [vue.createElementVNode("span", {
|
|
4508
4539
|
textContent: vue.toDisplayString(item.day),
|
|
4509
|
-
onClick: $event => onDayItemClick(item)
|
|
4510
|
-
|
|
4540
|
+
onClick: $event => onDayItemClick(item),
|
|
4541
|
+
onDblclick: $event => onDayItemClick(item, true)
|
|
4542
|
+
}, null, 40, _hoisted_7)], 2);
|
|
4511
4543
|
}), 128))], 64))]),
|
|
4512
4544
|
_: 2
|
|
4513
4545
|
}, [vue.unref(endStep) == stepRef.value && (__props.toolbarDisabled != true || vue.unref(timeFormat) != void 0) ? {
|
|
@@ -4564,25 +4596,38 @@
|
|
|
4564
4596
|
return showPicker(target, _sfc_main$4, options, popupOptions);
|
|
4565
4597
|
}
|
|
4566
4598
|
function showPicker(target, component, options, popupOptions) {
|
|
4567
|
-
{
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4599
|
+
if (popupOptions && popupOptions.mode == "dialog") {
|
|
4600
|
+
return popup.dialog({
|
|
4601
|
+
component,
|
|
4602
|
+
...(popupOptions.dialog || {
|
|
4603
|
+
closeOnEscape: false,
|
|
4604
|
+
closeOnMask: true
|
|
4605
|
+
}),
|
|
4606
|
+
props: {
|
|
4607
|
+
...options,
|
|
4608
|
+
picker: manager,
|
|
4609
|
+
popup
|
|
4610
|
+
}
|
|
4611
|
+
});
|
|
4612
|
+
} else {
|
|
4613
|
+
const follow = (popupOptions ? popupOptions.follow : void 0) || Object.create(null);
|
|
4614
|
+
{
|
|
4615
|
+
follow.followX = follow.followX || ["center", "start", "end", "before", "after"];
|
|
4616
|
+
follow.spaceX = snail_core.correctNumber(follow.spaceX, 2);
|
|
4617
|
+
follow.spaceY = snail_core.correctNumber(follow.spaceY, 2);
|
|
4618
|
+
follow.spaceClient = snail_core.correctNumber(follow.spaceClient, 10);
|
|
4619
|
+
follow.closeOnMask = follow.closeOnMask == void 0 ? true : follow.closeOnMask;
|
|
4584
4620
|
}
|
|
4585
|
-
|
|
4621
|
+
return popup.follow(target, {
|
|
4622
|
+
...follow,
|
|
4623
|
+
component,
|
|
4624
|
+
props: {
|
|
4625
|
+
...options,
|
|
4626
|
+
picker: manager,
|
|
4627
|
+
popup
|
|
4628
|
+
}
|
|
4629
|
+
});
|
|
4630
|
+
}
|
|
4586
4631
|
}
|
|
4587
4632
|
const manager = Object.freeze(snail_core.mountScope({
|
|
4588
4633
|
showDate,
|
|
@@ -4593,6 +4638,7 @@
|
|
|
4593
4638
|
}
|
|
4594
4639
|
|
|
4595
4640
|
const _hoisted_1$2 = ["title"];
|
|
4641
|
+
const _hoisted_2$1 = ["textContent"];
|
|
4596
4642
|
var _sfc_main$2 = vue.defineComponent({
|
|
4597
4643
|
__name: "date-picker",
|
|
4598
4644
|
props: {
|
|
@@ -4601,6 +4647,7 @@
|
|
|
4601
4647
|
},
|
|
4602
4648
|
value: {},
|
|
4603
4649
|
format: {},
|
|
4650
|
+
mode: {},
|
|
4604
4651
|
min: {},
|
|
4605
4652
|
max: {},
|
|
4606
4653
|
minPickTime: {},
|
|
@@ -4613,7 +4660,8 @@
|
|
|
4613
4660
|
},
|
|
4614
4661
|
clearDisabled: {
|
|
4615
4662
|
type: Boolean
|
|
4616
|
-
}
|
|
4663
|
+
},
|
|
4664
|
+
popup: {}
|
|
4617
4665
|
},
|
|
4618
4666
|
emits: ["change"],
|
|
4619
4667
|
setup(__props, _ref) {
|
|
@@ -4640,10 +4688,7 @@
|
|
|
4640
4688
|
pickerScope = showDate(pickerDom.value, {
|
|
4641
4689
|
...props,
|
|
4642
4690
|
value: valueRef.value
|
|
4643
|
-
},
|
|
4644
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4645
|
-
closeOnTarget: true
|
|
4646
|
-
});
|
|
4691
|
+
}, props.popup);
|
|
4647
4692
|
const dateText = await pickerScope;
|
|
4648
4693
|
pickerScope = void 0;
|
|
4649
4694
|
if (dateText !== void 0 && dateText != valueRef.value) {
|
|
@@ -4658,18 +4703,20 @@
|
|
|
4658
4703
|
return (_ctx, _cache) => {
|
|
4659
4704
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4660
4705
|
class: vue.normalizeClass(["snail-datepicker", {
|
|
4661
|
-
readonly: __props.readonly
|
|
4706
|
+
readonly: __props.readonly,
|
|
4707
|
+
"simple": __props.mode == "simple"
|
|
4662
4708
|
}]),
|
|
4663
|
-
ref: "datepicker",
|
|
4664
4709
|
title: valueRef.value,
|
|
4710
|
+
ref: "datepicker",
|
|
4665
4711
|
onClick: showPicker
|
|
4666
|
-
}, [vue.
|
|
4667
|
-
class: "wh-fill",
|
|
4668
|
-
type: "text",
|
|
4669
|
-
readonly: "",
|
|
4670
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4671
|
-
}, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
4712
|
+
}, [__props.mode != "simple" || vue.unref(snail_core.isStringNotEmpty)(valueRef.value) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4672
4713
|
key: 0,
|
|
4714
|
+
class: vue.normalizeClass(["ellipsis", {
|
|
4715
|
+
"flex-1": __props.mode != "simple"
|
|
4716
|
+
}]),
|
|
4717
|
+
textContent: vue.toDisplayString(valueRef.value)
|
|
4718
|
+
}, null, 10, _hoisted_2$1)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
4719
|
+
key: 1,
|
|
4673
4720
|
type: "datepicker",
|
|
4674
4721
|
button: "",
|
|
4675
4722
|
size: 16,
|
|
@@ -4681,6 +4728,7 @@
|
|
|
4681
4728
|
});
|
|
4682
4729
|
|
|
4683
4730
|
const _hoisted_1$1 = ["title"];
|
|
4731
|
+
const _hoisted_2 = ["textContent"];
|
|
4684
4732
|
var _sfc_main$1 = vue.defineComponent({
|
|
4685
4733
|
__name: "time-picker",
|
|
4686
4734
|
props: {
|
|
@@ -4689,6 +4737,7 @@
|
|
|
4689
4737
|
},
|
|
4690
4738
|
value: {},
|
|
4691
4739
|
format: {},
|
|
4740
|
+
mode: {},
|
|
4692
4741
|
min: {},
|
|
4693
4742
|
max: {},
|
|
4694
4743
|
toolbarDisabled: {
|
|
@@ -4699,7 +4748,8 @@
|
|
|
4699
4748
|
},
|
|
4700
4749
|
clearDisabled: {
|
|
4701
4750
|
type: Boolean
|
|
4702
|
-
}
|
|
4751
|
+
},
|
|
4752
|
+
popup: {}
|
|
4703
4753
|
},
|
|
4704
4754
|
emits: ["change"],
|
|
4705
4755
|
setup(__props, _ref) {
|
|
@@ -4726,10 +4776,7 @@
|
|
|
4726
4776
|
pickerScope = showTime(pickerDom.value, {
|
|
4727
4777
|
...props,
|
|
4728
4778
|
value: valueRef.value
|
|
4729
|
-
},
|
|
4730
|
-
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4731
|
-
closeOnTarget: true
|
|
4732
|
-
});
|
|
4779
|
+
}, props.popup);
|
|
4733
4780
|
const timeText = await pickerScope;
|
|
4734
4781
|
pickerScope = void 0;
|
|
4735
4782
|
if (timeText !== void 0 && timeText != valueRef.value) {
|
|
@@ -4744,18 +4791,20 @@
|
|
|
4744
4791
|
return (_ctx, _cache) => {
|
|
4745
4792
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4746
4793
|
class: vue.normalizeClass(["snail-timepicker", {
|
|
4747
|
-
readonly: __props.readonly
|
|
4794
|
+
readonly: __props.readonly,
|
|
4795
|
+
"simple": __props.mode == "simple"
|
|
4748
4796
|
}]),
|
|
4749
4797
|
ref: "timepicker",
|
|
4750
4798
|
title: valueRef.value,
|
|
4751
4799
|
onClick: showPicker
|
|
4752
|
-
}, [vue.
|
|
4753
|
-
class: "wh-fill",
|
|
4754
|
-
type: "text",
|
|
4755
|
-
readonly: "",
|
|
4756
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4757
|
-
}, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
4800
|
+
}, [__props.mode != "simple" || vue.unref(snail_core.isStringNotEmpty)(valueRef.value) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4758
4801
|
key: 0,
|
|
4802
|
+
class: vue.normalizeClass(["ellipsis", {
|
|
4803
|
+
"flex-1": __props.mode != "simple"
|
|
4804
|
+
}]),
|
|
4805
|
+
textContent: vue.toDisplayString(valueRef.value)
|
|
4806
|
+
}, null, 10, _hoisted_2)) : vue.createCommentVNode("", true), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
4807
|
+
key: 1,
|
|
4759
4808
|
type: "timepicker",
|
|
4760
4809
|
button: "",
|
|
4761
4810
|
size: 20,
|