snail.vue 2.0.15 → 2.0.17
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 +320 -37
- package/dist/snail.vue.js +621 -266
- package/dist/snail.vue.umd.js +618 -263
- package/dist/styles/snail.vue.vue.css +34 -28
- package/package.json +2 -2
package/dist/snail.vue.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef,
|
|
3
|
-
import { throwError,
|
|
4
|
-
import {
|
|
2
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, computed, mergeProps, unref, createElementVNode, toDisplayString, Fragment, renderList, mergeModels, useModel, normalizeStyle, createCommentVNode, createBlock, nextTick, useTemplateRef, createVNode, watch, withDirectives, isRef, vModelText, withCtx, createApp, resolveDynamicComponent, TransitionGroup, Transition, normalizeProps, guardReactiveProps, ref, onErrorCaptured, createSlots, onMounted, withModifiers, getCurrentInstance, resolveComponent, onBeforeUnmount, onActivated, vShow, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
|
+
import { throwError, isObject, correctNumber, correctString, useKey, isArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isNumberNotNaN, isStringNotEmpty, hasAny, mustFunction, useScope, removeFromArray, mustObject, isArrayNotEmpty, hasOwnProperty, isString, script, delay, useTimer, defer, useAsyncScope, useHook, newId, throwIfTrue, isFunction, isNullish, getTimeNumber, getDateValue, parseDate, formatDateValue, getDateByValue, parseTimeValue, getTimeValue, padStart, formatTimeValue, parseDateValue, correctDateFormat, isValidTime, getFromArray, onMountScope } from 'snail.core';
|
|
4
|
+
import { link, css, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1$
|
|
7
|
-
var _sfc_main$
|
|
6
|
+
const _hoisted_1$n = ["title"];
|
|
7
|
+
var _sfc_main$D = defineComponent({
|
|
8
8
|
...{
|
|
9
9
|
name: "Button",
|
|
10
10
|
inheritAttrs: true
|
|
@@ -20,12 +20,16 @@ var _sfc_main$A = defineComponent({
|
|
|
20
20
|
return openBlock(), createElementBlock("div", {
|
|
21
21
|
class: normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
22
22
|
title: __props.title
|
|
23
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$
|
|
23
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$n);
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
29
|
+
|
|
30
|
+
addLink("/styles/snail.vue.vue.css");
|
|
31
|
+
|
|
32
|
+
function getBuiltinIcon(iconType) {
|
|
29
33
|
switch (iconType) {
|
|
30
34
|
case "success":
|
|
31
35
|
return ["M 102.272 613.285 a 48.9258 48.9258 0 0 1 -1.34967 -62.8444 l 26.0656 -31.2113 a 50.6129 50.6129 0 0 1 62.6756 -11.2192 l 199.583 121.218 c 19.4859 11.8097 49.0102 8.26677 65.9655 -8.01371 l 540.714 -519.625 a 40.3216 40.3216 0 0 1 57.9518 1.6871 l 37.9597 43.3583 a 47.5762 47.5762 0 0 1 -0.843545 62.4226 L 452.766 920.675 a 38.4658 38.4658 0 0 1 -56.8553 1.18097 L 102.272 613.285 Z"];
|
|
@@ -55,8 +59,6 @@ function getSvgDraw(iconType, draw) {
|
|
|
55
59
|
return ["M768 554.666667H256c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667h512c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666667z"];
|
|
56
60
|
case "grip":
|
|
57
61
|
return ["M 384 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z"];
|
|
58
|
-
case "custom":
|
|
59
|
-
return isArrayNotEmpty(draw) ? draw : isStringNotEmpty(draw) ? [draw] : throwError("options.draw must be a non-empty string or string array");
|
|
60
62
|
default:
|
|
61
63
|
{
|
|
62
64
|
throwError(`not support icon type: ${iconType}.`);
|
|
@@ -65,57 +67,82 @@ function getSvgDraw(iconType, draw) {
|
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
const _hoisted_1$
|
|
69
|
-
const _hoisted_2$
|
|
70
|
-
const _hoisted_3$
|
|
71
|
-
var _sfc_main$
|
|
72
|
-
...{
|
|
73
|
-
name: "Icon",
|
|
74
|
-
inheritAttrs: true
|
|
75
|
-
},
|
|
70
|
+
const _hoisted_1$m = ["viewBox"];
|
|
71
|
+
const _hoisted_2$e = ["textContent"];
|
|
72
|
+
const _hoisted_3$b = ["d"];
|
|
73
|
+
var _sfc_main$C = defineComponent({
|
|
76
74
|
__name: "icon",
|
|
77
75
|
props: {
|
|
78
76
|
title: {},
|
|
77
|
+
custom: {
|
|
78
|
+
type: Boolean
|
|
79
|
+
},
|
|
79
80
|
type: {},
|
|
80
|
-
|
|
81
|
+
button: {
|
|
82
|
+
type: Boolean
|
|
83
|
+
},
|
|
84
|
+
size: {},
|
|
81
85
|
color: {},
|
|
82
86
|
hoverColor: {},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
strokeWidth: {},
|
|
86
|
-
draw: {},
|
|
87
|
-
rotate: {}
|
|
87
|
+
rotate: {},
|
|
88
|
+
viewBox: {}
|
|
88
89
|
},
|
|
89
90
|
setup(__props) {
|
|
91
|
+
const props = __props;
|
|
90
92
|
const isMouseEnterRef = shallowRef(false);
|
|
93
|
+
const sizeRef = computed(() => {
|
|
94
|
+
if (isObject(props.size) == true) {
|
|
95
|
+
return {
|
|
96
|
+
width: correctNumber(props.size.width, 24),
|
|
97
|
+
height: correctNumber(props.size.height, 24)
|
|
98
|
+
};
|
|
99
|
+
} else {
|
|
100
|
+
const number = correctNumber(props.size, 24);
|
|
101
|
+
return {
|
|
102
|
+
width: number,
|
|
103
|
+
height: number
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const styleRef = computed(() => {
|
|
108
|
+
const style = Object.create(null);
|
|
109
|
+
let fill = isMouseEnterRef.value ? correctString(props.hoverColor, props.color, true) : void 0;
|
|
110
|
+
fill == void 0 && (fill = correctString(props.color, void 0, true));
|
|
111
|
+
fill && (style.fill = fill);
|
|
112
|
+
const rotate = correctNumber(props.rotate, 0);
|
|
113
|
+
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
114
|
+
return style;
|
|
115
|
+
});
|
|
91
116
|
return (_ctx, _cache) => {
|
|
92
|
-
return openBlock(), createElementBlock("svg", {
|
|
93
|
-
class:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
return openBlock(), createElementBlock("svg", mergeProps({
|
|
118
|
+
class: ["snail-icon", __props.type, {
|
|
119
|
+
button: __props.button
|
|
120
|
+
}],
|
|
121
|
+
viewBox: unref(correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
122
|
+
}, sizeRef.value, {
|
|
123
|
+
style: styleRef.value,
|
|
98
124
|
onMouseenter: _cache[0] || (_cache[0] = $event => isMouseEnterRef.value = true),
|
|
99
125
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
100
|
-
}, [createElementVNode("title", {
|
|
126
|
+
}), [createElementVNode("title", {
|
|
101
127
|
textContent: toDisplayString(__props.title || "")
|
|
102
|
-
}, null, 8, _hoisted_2$
|
|
128
|
+
}, null, 8, _hoisted_2$e), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
|
|
129
|
+
key: 0
|
|
130
|
+
}) : (openBlock(true), createElementBlock(Fragment, {
|
|
131
|
+
key: 1
|
|
132
|
+
}, renderList(unref(getBuiltinIcon)(__props.type), d => {
|
|
103
133
|
return openBlock(), createElementBlock("path", {
|
|
104
|
-
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
105
|
-
stroke: __props.stroke,
|
|
106
|
-
"stroke-width": __props.strokeWidth,
|
|
107
134
|
d
|
|
108
|
-
}, null, 8, _hoisted_3$
|
|
109
|
-
}), 256))],
|
|
135
|
+
}, null, 8, _hoisted_3$b);
|
|
136
|
+
}), 256))], 16, _hoisted_1$m);
|
|
110
137
|
};
|
|
111
138
|
}
|
|
112
139
|
});
|
|
113
140
|
|
|
114
|
-
const _hoisted_1$
|
|
115
|
-
const _hoisted_2$
|
|
116
|
-
const _hoisted_3$
|
|
141
|
+
const _hoisted_1$l = ["title", "onClick"];
|
|
142
|
+
const _hoisted_2$d = ["type", "checked"];
|
|
143
|
+
const _hoisted_3$a = ["textContent"];
|
|
117
144
|
const _hoisted_4$7 = ["textContent"];
|
|
118
|
-
var _sfc_main$
|
|
145
|
+
var _sfc_main$B = defineComponent({
|
|
119
146
|
...{
|
|
120
147
|
name: "Choose",
|
|
121
148
|
inheritAttrs: true
|
|
@@ -191,10 +218,10 @@ var _sfc_main$y = defineComponent({
|
|
|
191
218
|
key: 0,
|
|
192
219
|
type: unref(type),
|
|
193
220
|
checked: node.selected
|
|
194
|
-
}, null, 8, _hoisted_2$
|
|
221
|
+
}, null, 8, _hoisted_2$d)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
195
222
|
key: 1,
|
|
196
223
|
class: normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
197
|
-
}, [node.selected ? (openBlock(), createBlock(_sfc_main$
|
|
224
|
+
}, [node.selected ? (openBlock(), createBlock(_sfc_main$C, {
|
|
198
225
|
key: 0,
|
|
199
226
|
type: "success",
|
|
200
227
|
size: 12,
|
|
@@ -203,21 +230,17 @@ var _sfc_main$y = defineComponent({
|
|
|
203
230
|
key: 2,
|
|
204
231
|
class: "item-text",
|
|
205
232
|
textContent: toDisplayString(node.item.text)
|
|
206
|
-
}, null, 8, _hoisted_3$
|
|
233
|
+
}, null, 8, _hoisted_3$a)) : createCommentVNode("", true), node.item.description ? (openBlock(), createElementBlock("span", {
|
|
207
234
|
key: 3,
|
|
208
235
|
class: "item-des",
|
|
209
236
|
textContent: toDisplayString(node.item.description)
|
|
210
|
-
}, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
237
|
+
}, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$l);
|
|
211
238
|
}), 128))], 2);
|
|
212
239
|
};
|
|
213
240
|
}
|
|
214
241
|
});
|
|
215
242
|
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
addLink("/styles/snail.vue.vue.css");
|
|
219
|
-
|
|
220
|
-
var _sfc_main$x = defineComponent({
|
|
243
|
+
var _sfc_main$A = defineComponent({
|
|
221
244
|
...{
|
|
222
245
|
name: "Footer",
|
|
223
246
|
inheritAttrs: true
|
|
@@ -248,13 +271,13 @@ var _sfc_main$x = defineComponent({
|
|
|
248
271
|
class: normalizeClass(["snail-footer", {
|
|
249
272
|
"start-divider": __props.divider
|
|
250
273
|
}, __props.align || "right"])
|
|
251
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
274
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
252
275
|
key: 0,
|
|
253
276
|
size: "max",
|
|
254
277
|
type: "default",
|
|
255
278
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
256
279
|
textContent: toDisplayString(__props.cancelName || "取消")
|
|
257
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
280
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
258
281
|
key: 1,
|
|
259
282
|
size: "max",
|
|
260
283
|
type: "primary",
|
|
@@ -265,8 +288,8 @@ var _sfc_main$x = defineComponent({
|
|
|
265
288
|
}
|
|
266
289
|
});
|
|
267
290
|
|
|
268
|
-
const _hoisted_1$
|
|
269
|
-
var _sfc_main$
|
|
291
|
+
const _hoisted_1$k = ["textContent"];
|
|
292
|
+
var _sfc_main$z = defineComponent({
|
|
270
293
|
...{
|
|
271
294
|
name: "Header",
|
|
272
295
|
inheritAttrs: true
|
|
@@ -305,30 +328,31 @@ var _sfc_main$w = defineComponent({
|
|
|
305
328
|
key: 0,
|
|
306
329
|
textContent: toDisplayString(__props.title),
|
|
307
330
|
class: normalizeClass(["header-title", __props.titleAlign])
|
|
308
|
-
}, null, 10, _hoisted_1$
|
|
331
|
+
}, null, 10, _hoisted_1$k)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$C, {
|
|
309
332
|
key: 1,
|
|
333
|
+
class: "close-icon",
|
|
310
334
|
type: "close",
|
|
335
|
+
button: "",
|
|
311
336
|
size: 22,
|
|
312
337
|
color: __props.useTo == "page" ? "#2e3033" : "#464953",
|
|
313
|
-
class: "close-icon",
|
|
314
338
|
onClick: _cache[0] || (_cache[0] = $event => emits("close"))
|
|
315
339
|
}, null, 8, ["color"])) : createCommentVNode("", true)], 2);
|
|
316
340
|
};
|
|
317
341
|
}
|
|
318
342
|
});
|
|
319
343
|
|
|
320
|
-
const _hoisted_1$
|
|
321
|
-
const _hoisted_2$
|
|
344
|
+
const _hoisted_1$j = ["textContent"];
|
|
345
|
+
const _hoisted_2$c = {
|
|
322
346
|
key: 0,
|
|
323
347
|
class: "required",
|
|
324
348
|
textContent: "*"
|
|
325
349
|
};
|
|
326
|
-
const _hoisted_3$
|
|
350
|
+
const _hoisted_3$9 = {
|
|
327
351
|
class: "input-body"
|
|
328
352
|
};
|
|
329
353
|
const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
|
|
330
354
|
const _hoisted_5$4 = ["title"];
|
|
331
|
-
var _sfc_main$
|
|
355
|
+
var _sfc_main$y = defineComponent({
|
|
332
356
|
...{
|
|
333
357
|
name: "Input",
|
|
334
358
|
inheritAttrs: true
|
|
@@ -380,7 +404,7 @@ var _sfc_main$v = defineComponent({
|
|
|
380
404
|
}, [createElementVNode("span", {
|
|
381
405
|
class: "text",
|
|
382
406
|
textContent: toDisplayString(__props.title)
|
|
383
|
-
}, null, 8, _hoisted_1$
|
|
407
|
+
}, null, 8, _hoisted_1$j), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$c)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$9, [createElementVNode("input", {
|
|
384
408
|
ref: "input-el",
|
|
385
409
|
type: __props.type || "text",
|
|
386
410
|
value: inputModel.value,
|
|
@@ -393,8 +417,9 @@ var _sfc_main$v = defineComponent({
|
|
|
393
417
|
key: 0,
|
|
394
418
|
class: "validate",
|
|
395
419
|
title: validateRef.value
|
|
396
|
-
}, [createVNode(_sfc_main$
|
|
420
|
+
}, [createVNode(_sfc_main$C, {
|
|
397
421
|
type: "error",
|
|
422
|
+
button: "",
|
|
398
423
|
size: 16,
|
|
399
424
|
color: "red"
|
|
400
425
|
})], 8, _hoisted_5$4)) : createCommentVNode("", true)])], 2);
|
|
@@ -602,12 +627,12 @@ function useFormatter(options) {
|
|
|
602
627
|
return formatter;
|
|
603
628
|
}
|
|
604
629
|
|
|
605
|
-
const _hoisted_1$
|
|
630
|
+
const _hoisted_1$i = {
|
|
606
631
|
key: 0,
|
|
607
632
|
class: "number-prefix"
|
|
608
633
|
};
|
|
609
|
-
const _hoisted_2$
|
|
610
|
-
const _hoisted_3$
|
|
634
|
+
const _hoisted_2$b = ["textContent"];
|
|
635
|
+
const _hoisted_3$8 = ["inputmode", "placeholder", "title"];
|
|
611
636
|
const _hoisted_4$5 = {
|
|
612
637
|
key: 1,
|
|
613
638
|
class: "number-suffix"
|
|
@@ -615,7 +640,7 @@ const _hoisted_4$5 = {
|
|
|
615
640
|
const _hoisted_5$3 = ["textContent"];
|
|
616
641
|
const _hoisted_6$2 = ["title", "textContent"];
|
|
617
642
|
const _hoisted_7$1 = ["title", "textContent"];
|
|
618
|
-
var _sfc_main$
|
|
643
|
+
var _sfc_main$x = defineComponent({
|
|
619
644
|
__name: "number",
|
|
620
645
|
props: mergeModels({
|
|
621
646
|
placeholder: {},
|
|
@@ -762,10 +787,10 @@ var _sfc_main$u = defineComponent({
|
|
|
762
787
|
"has-prefix": unref(hasPrefix),
|
|
763
788
|
"has-suffix": unref(hasSuffix)
|
|
764
789
|
}])
|
|
765
|
-
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
790
|
+
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [createElementVNode("span", {
|
|
766
791
|
class: "ellipsis",
|
|
767
792
|
textContent: toDisplayString(unref(prefix))
|
|
768
|
-
}, null, 8, _hoisted_2$
|
|
793
|
+
}, null, 8, _hoisted_2$b)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
769
794
|
class: normalizeClass(["input-panel", unref(controls)])
|
|
770
795
|
}, [withDirectives(createElementVNode("input", {
|
|
771
796
|
type: "text",
|
|
@@ -777,34 +802,38 @@ var _sfc_main$u = defineComponent({
|
|
|
777
802
|
onFocus: _cache[1] || (_cache[1] = $event => isRef(needBackSection) ? needBackSection.value = true : needBackSection = true),
|
|
778
803
|
onPaste: _cache[2] || (_cache[2] = $event => isRef(needBackSection) ? needBackSection.value = false : needBackSection = false),
|
|
779
804
|
onBlur: _cache[3] || (_cache[3] = $event => formatOnEnd(true))
|
|
780
|
-
}, null, 40, _hoisted_3$
|
|
805
|
+
}, null, 40, _hoisted_3$8), [[vModelText, displayValueRef.value]]), unref(controls) == "default" ? (openBlock(), createElementBlock(Fragment, {
|
|
781
806
|
key: 0
|
|
782
807
|
}, [createElementVNode("div", {
|
|
783
808
|
class: "controls default subtract",
|
|
784
809
|
onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
|
|
785
|
-
}, [createVNode(_sfc_main$
|
|
810
|
+
}, [createVNode(_sfc_main$C, {
|
|
786
811
|
type: "subtract",
|
|
812
|
+
button: "",
|
|
787
813
|
size: 20
|
|
788
814
|
})]), createElementVNode("div", {
|
|
789
815
|
class: "controls default plus",
|
|
790
816
|
onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
|
|
791
|
-
}, [createVNode(_sfc_main$
|
|
817
|
+
}, [createVNode(_sfc_main$C, {
|
|
792
818
|
type: "plus",
|
|
819
|
+
button: "",
|
|
793
820
|
size: 20
|
|
794
821
|
})])], 64)) : unref(controls) == "right" ? (openBlock(), createElementBlock(Fragment, {
|
|
795
822
|
key: 1
|
|
796
823
|
}, [createElementVNode("div", {
|
|
797
824
|
class: "controls right plus",
|
|
798
825
|
onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
|
|
799
|
-
}, [createVNode(_sfc_main$
|
|
826
|
+
}, [createVNode(_sfc_main$C, {
|
|
800
827
|
type: "arrow",
|
|
828
|
+
button: "",
|
|
801
829
|
size: 20,
|
|
802
830
|
rotate: 270
|
|
803
831
|
})]), createElementVNode("div", {
|
|
804
832
|
class: "controls right subtract",
|
|
805
833
|
onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
|
|
806
|
-
}, [createVNode(_sfc_main$
|
|
834
|
+
}, [createVNode(_sfc_main$C, {
|
|
807
835
|
type: "arrow",
|
|
836
|
+
button: "",
|
|
808
837
|
size: 20,
|
|
809
838
|
rotate: 90
|
|
810
839
|
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createElementVNode("span", {
|
|
@@ -825,9 +854,8 @@ var _sfc_main$u = defineComponent({
|
|
|
825
854
|
}
|
|
826
855
|
});
|
|
827
856
|
|
|
828
|
-
const _hoisted_1$
|
|
829
|
-
|
|
830
|
-
var _sfc_main$t = defineComponent({
|
|
857
|
+
const _hoisted_1$h = ["placeholder", "readonly"];
|
|
858
|
+
var _sfc_main$w = defineComponent({
|
|
831
859
|
...{
|
|
832
860
|
name: "Search",
|
|
833
861
|
inheritAttrs: true
|
|
@@ -872,15 +900,19 @@ var _sfc_main$t = defineComponent({
|
|
|
872
900
|
readonly: __props.readonly,
|
|
873
901
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
874
902
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
875
|
-
}, null, 40, _hoisted_1$
|
|
903
|
+
}, null, 40, _hoisted_1$h), [[vModelText, textModel.value, void 0, {
|
|
876
904
|
trim: true
|
|
877
|
-
}]]), createElementVNode("div", null, [createVNode(_sfc_main$
|
|
905
|
+
}]]), createElementVNode("div", null, [createVNode(_sfc_main$C, {
|
|
878
906
|
class: "search-button",
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
size: 24,
|
|
907
|
+
custom: "",
|
|
908
|
+
button: "",
|
|
882
909
|
color: "#707070",
|
|
883
910
|
onClick: _cache[2] || (_cache[2] = $event => onSearch(void 0))
|
|
911
|
+
}, {
|
|
912
|
+
default: withCtx(() => [...(_cache[3] || (_cache[3] = [createElementVNode("path", {
|
|
913
|
+
d: "M 860.16 824.32 l -163.84 -163.84 c 102.4 -120.32 97.28 -302.08 -17.92 -414.72 c -120.32 -120.32 -314.88 -120.32 -435.2 0 c -120.32 120.32 -120.32 314.88 0 435.2 c 112.64 112.64 294.4 120.32 414.72 17.92 l 163.84 163.84 c 10.24 10.24 25.6 10.24 35.84 0 c 12.8 -12.8 12.8 -28.16 2.56 -38.4 Z M 281.6 642.56 C 181.76 542.72 181.76 381.44 281.6 281.6 c 99.84 -99.84 261.12 -99.84 360.96 0 c 99.84 99.84 99.84 261.12 0 360.96 c -99.84 102.4 -261.12 102.4 -360.96 0 Z"
|
|
914
|
+
}, null, -1)]))]),
|
|
915
|
+
_: 1
|
|
884
916
|
})])], 2);
|
|
885
917
|
};
|
|
886
918
|
}
|
|
@@ -1095,11 +1127,11 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
|
|
|
1095
1127
|
}
|
|
1096
1128
|
}
|
|
1097
1129
|
|
|
1098
|
-
const _hoisted_1$
|
|
1130
|
+
const _hoisted_1$g = {
|
|
1099
1131
|
class: "snail-confirm flex-column"
|
|
1100
1132
|
};
|
|
1101
|
-
const _hoisted_2$
|
|
1102
|
-
var _sfc_main$
|
|
1133
|
+
const _hoisted_2$a = ["innerHTML"];
|
|
1134
|
+
var _sfc_main$v = defineComponent({
|
|
1103
1135
|
...{
|
|
1104
1136
|
name: "ConfirmContainer",
|
|
1105
1137
|
inheritAttrs: true
|
|
@@ -1127,14 +1159,14 @@ var _sfc_main$s = defineComponent({
|
|
|
1127
1159
|
},
|
|
1128
1160
|
setup(__props) {
|
|
1129
1161
|
return (_ctx, _cache) => {
|
|
1130
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1162
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [createVNode(_sfc_main$z, {
|
|
1131
1163
|
"use-to": "dialog",
|
|
1132
1164
|
title: __props.title || "提示",
|
|
1133
1165
|
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
1134
1166
|
}, null, 8, ["title"]), createElementVNode("div", {
|
|
1135
1167
|
class: "confirm-body",
|
|
1136
1168
|
innerHTML: __props.message || "请确认?"
|
|
1137
|
-
}, null, 8, _hoisted_2$
|
|
1169
|
+
}, null, 8, _hoisted_2$a), createVNode(_sfc_main$A, {
|
|
1138
1170
|
align: "right",
|
|
1139
1171
|
"cancel-name": __props.cancelName,
|
|
1140
1172
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1195,7 +1227,7 @@ const MOTION = Object.freeze({
|
|
|
1195
1227
|
});
|
|
1196
1228
|
for (var key in MOTION) hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
|
|
1197
1229
|
|
|
1198
|
-
var _sfc_main$
|
|
1230
|
+
var _sfc_main$u = defineComponent({
|
|
1199
1231
|
__name: "motion",
|
|
1200
1232
|
props: {
|
|
1201
1233
|
multiple: {
|
|
@@ -1244,7 +1276,7 @@ var _sfc_main$r = defineComponent({
|
|
|
1244
1276
|
}
|
|
1245
1277
|
});
|
|
1246
1278
|
|
|
1247
|
-
var _sfc_main$
|
|
1279
|
+
var _sfc_main$t = defineComponent({
|
|
1248
1280
|
...{
|
|
1249
1281
|
name: "Loading",
|
|
1250
1282
|
inheritAttrs: true
|
|
@@ -1268,7 +1300,7 @@ var _sfc_main$q = defineComponent({
|
|
|
1268
1300
|
},
|
|
1269
1301
|
setup(__props) {
|
|
1270
1302
|
return (_ctx, _cache) => {
|
|
1271
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1303
|
+
return openBlock(), createBlock(_sfc_main$u, {
|
|
1272
1304
|
effect: unref(MOTION).fade
|
|
1273
1305
|
}, {
|
|
1274
1306
|
default: withCtx(() => [__props.show ? (openBlock(), createElementBlock("div", {
|
|
@@ -1283,7 +1315,7 @@ var _sfc_main$q = defineComponent({
|
|
|
1283
1315
|
}
|
|
1284
1316
|
});
|
|
1285
1317
|
|
|
1286
|
-
var _sfc_main$
|
|
1318
|
+
var _sfc_main$s = defineComponent({
|
|
1287
1319
|
...{
|
|
1288
1320
|
name: "Dynamic",
|
|
1289
1321
|
inheritAttrs: false
|
|
@@ -1307,7 +1339,7 @@ var _sfc_main$p = defineComponent({
|
|
|
1307
1339
|
const loadingComponent = defineComponent({
|
|
1308
1340
|
inheritAttrs: false,
|
|
1309
1341
|
components: {
|
|
1310
|
-
Loading: _sfc_main$
|
|
1342
|
+
Loading: _sfc_main$t
|
|
1311
1343
|
},
|
|
1312
1344
|
template: "<Loading :mask-disabled='true' />"
|
|
1313
1345
|
});
|
|
@@ -1374,7 +1406,7 @@ var _sfc_main$p = defineComponent({
|
|
|
1374
1406
|
}
|
|
1375
1407
|
});
|
|
1376
1408
|
|
|
1377
|
-
var _sfc_main$
|
|
1409
|
+
var _sfc_main$r = defineComponent({
|
|
1378
1410
|
...{
|
|
1379
1411
|
name: "DialogContainer",
|
|
1380
1412
|
inheritAttrs: true
|
|
@@ -1419,7 +1451,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1419
1451
|
onClick: _cache[1] || (_cache[1] = withModifiers($event => {
|
|
1420
1452
|
__props.options.closeOnMask && unref(closePopup)();
|
|
1421
1453
|
}, ["self"]))
|
|
1422
|
-
}, [createVNode(_sfc_main$
|
|
1454
|
+
}, [createVNode(_sfc_main$s, mergeProps({
|
|
1423
1455
|
class: "dialog-body",
|
|
1424
1456
|
name: __props.options.name,
|
|
1425
1457
|
component: __props.options.component,
|
|
@@ -1434,7 +1466,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1434
1466
|
}
|
|
1435
1467
|
});
|
|
1436
1468
|
|
|
1437
|
-
var _sfc_main$
|
|
1469
|
+
var _sfc_main$q = defineComponent({
|
|
1438
1470
|
...{
|
|
1439
1471
|
name: "FollowContainer",
|
|
1440
1472
|
inheritAttrs: true
|
|
@@ -1555,7 +1587,7 @@ var _sfc_main$n = defineComponent({
|
|
|
1555
1587
|
});
|
|
1556
1588
|
});
|
|
1557
1589
|
return (_ctx, _cache) => {
|
|
1558
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1590
|
+
return openBlock(), createBlock(_sfc_main$s, mergeProps({
|
|
1559
1591
|
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1560
1592
|
style: {
|
|
1561
1593
|
"z-index": __props.zIndex
|
|
@@ -1572,7 +1604,7 @@ var _sfc_main$n = defineComponent({
|
|
|
1572
1604
|
}
|
|
1573
1605
|
});
|
|
1574
1606
|
|
|
1575
|
-
var _sfc_main$
|
|
1607
|
+
var _sfc_main$p = defineComponent({
|
|
1576
1608
|
...{
|
|
1577
1609
|
name: "PopupContainer",
|
|
1578
1610
|
inheritAttrs: true
|
|
@@ -1592,7 +1624,7 @@ var _sfc_main$m = defineComponent({
|
|
|
1592
1624
|
model = shallowRef(void 0)
|
|
1593
1625
|
} = __props.options;
|
|
1594
1626
|
return (_ctx, _cache) => {
|
|
1595
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1627
|
+
return openBlock(), createBlock(_sfc_main$s, mergeProps({
|
|
1596
1628
|
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1597
1629
|
style: {
|
|
1598
1630
|
"z-index": __props.zIndex
|
|
@@ -1610,12 +1642,12 @@ var _sfc_main$m = defineComponent({
|
|
|
1610
1642
|
}
|
|
1611
1643
|
});
|
|
1612
1644
|
|
|
1613
|
-
const _hoisted_1$
|
|
1645
|
+
const _hoisted_1$f = {
|
|
1614
1646
|
key: 1,
|
|
1615
1647
|
class: "icon"
|
|
1616
1648
|
};
|
|
1617
|
-
const _hoisted_2$
|
|
1618
|
-
var _sfc_main$
|
|
1649
|
+
const _hoisted_2$9 = ["innerHTML"];
|
|
1650
|
+
var _sfc_main$o = defineComponent({
|
|
1619
1651
|
...{
|
|
1620
1652
|
name: "ToastContainer",
|
|
1621
1653
|
inheritAttrs: true
|
|
@@ -1638,7 +1670,6 @@ var _sfc_main$l = defineComponent({
|
|
|
1638
1670
|
closePopup
|
|
1639
1671
|
} = __props.extOptions;
|
|
1640
1672
|
const duration = props.duration > 0 ? props.duration : 1500;
|
|
1641
|
-
const closeFillRef = ref("#707070");
|
|
1642
1673
|
var destroyTimer;
|
|
1643
1674
|
function onMouseEvent(isLeave) {
|
|
1644
1675
|
destroyTimer && destroyTimer.destroy();
|
|
@@ -1651,34 +1682,34 @@ var _sfc_main$l = defineComponent({
|
|
|
1651
1682
|
style: normalizeStyle({
|
|
1652
1683
|
"z-index": __props.zIndex
|
|
1653
1684
|
}),
|
|
1654
|
-
onMouseenter: _cache[
|
|
1655
|
-
onMouseleave: _cache[
|
|
1656
|
-
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
1685
|
+
onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
|
|
1686
|
+
onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
|
|
1687
|
+
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$C, {
|
|
1657
1688
|
key: 0,
|
|
1658
1689
|
class: "close-icon",
|
|
1659
1690
|
type: "close",
|
|
1660
|
-
|
|
1691
|
+
button: "",
|
|
1661
1692
|
size: 20,
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
onClick: _cache[
|
|
1693
|
+
color: "#707070",
|
|
1694
|
+
"hover-color": "red",
|
|
1695
|
+
onClick: _cache[0] || (_cache[0] = $event => {
|
|
1665
1696
|
unref(closePopup)();
|
|
1666
1697
|
})
|
|
1667
|
-
}
|
|
1698
|
+
})) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$f, [createVNode(_sfc_main$C, {
|
|
1668
1699
|
type: unref(props).type,
|
|
1669
|
-
|
|
1700
|
+
color: "#707070",
|
|
1670
1701
|
size: 20
|
|
1671
1702
|
}, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
|
|
1672
1703
|
class: "message",
|
|
1673
1704
|
innerHTML: unref(props).message
|
|
1674
|
-
}, null, 8, _hoisted_2$
|
|
1705
|
+
}, null, 8, _hoisted_2$9)], 38);
|
|
1675
1706
|
};
|
|
1676
1707
|
}
|
|
1677
1708
|
});
|
|
1678
1709
|
|
|
1679
1710
|
function usePopup() {
|
|
1680
1711
|
function popup(options) {
|
|
1681
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1712
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$p, options);
|
|
1682
1713
|
return addScope2Scopes(scope);
|
|
1683
1714
|
}
|
|
1684
1715
|
function dialog(options) {
|
|
@@ -1711,7 +1742,7 @@ function usePopup() {
|
|
|
1711
1742
|
},
|
|
1712
1743
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1713
1744
|
});
|
|
1714
|
-
const descriptor = openPopup(_sfc_main$
|
|
1745
|
+
const descriptor = openPopup(_sfc_main$r, options, extOptions);
|
|
1715
1746
|
scope = useAsyncScope(deferred.promise);
|
|
1716
1747
|
monitorDialog(descriptor, scope, deferred);
|
|
1717
1748
|
}
|
|
@@ -1729,14 +1760,14 @@ function usePopup() {
|
|
|
1729
1760
|
inPopup: "follow",
|
|
1730
1761
|
target
|
|
1731
1762
|
};
|
|
1732
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1763
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$q, options, extOptions);
|
|
1733
1764
|
}
|
|
1734
1765
|
return addScope2Scopes(scope);
|
|
1735
1766
|
}
|
|
1736
1767
|
function confirm(title, message, options) {
|
|
1737
1768
|
options = options || Object.create(null);
|
|
1738
1769
|
return dialog({
|
|
1739
|
-
component: _sfc_main$
|
|
1770
|
+
component: _sfc_main$v,
|
|
1740
1771
|
closeOnEscape: true,
|
|
1741
1772
|
props: {
|
|
1742
1773
|
...options,
|
|
@@ -1746,7 +1777,7 @@ function usePopup() {
|
|
|
1746
1777
|
});
|
|
1747
1778
|
}
|
|
1748
1779
|
function toast(type, message, options) {
|
|
1749
|
-
return popupInCustomContainer(_sfc_main$
|
|
1780
|
+
return popupInCustomContainer(_sfc_main$o, {
|
|
1750
1781
|
url: "#ToastContainer",
|
|
1751
1782
|
props: {
|
|
1752
1783
|
...(options || Object.create(null)),
|
|
@@ -1779,7 +1810,7 @@ function usePopup() {
|
|
|
1779
1810
|
},
|
|
1780
1811
|
...extOptions
|
|
1781
1812
|
});
|
|
1782
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1813
|
+
const descriptor = openPopup(container || _sfc_main$p, options, extOptions);
|
|
1783
1814
|
const scope = useAsyncScope(deferred.promise);
|
|
1784
1815
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1785
1816
|
return scope;
|
|
@@ -1910,19 +1941,16 @@ function useSelectContext(items, selectsRef, separator) {
|
|
|
1910
1941
|
return Object.freeze(context);
|
|
1911
1942
|
}
|
|
1912
1943
|
|
|
1913
|
-
function getTwoArrowIconDraw() {
|
|
1914
|
-
return "M759.467 533.333L469.333 243.2l29.867-29.867 320 320-320 320-29.867-29.866 290.134-290.134z m-298.667 0L170.667 243.2l29.866-29.867 320 320-320 320-29.866-29.866L460.8 533.333z";
|
|
1915
|
-
}
|
|
1916
1944
|
function getNoDataBase64Image() {
|
|
1917
1945
|
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyREREODhFQ0M5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyREREODhFREM5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJEREQ4OEVBQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJEREQ4OEVCQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++keGxAAAA5lJREFUeNrsmktoE0EYx3eSTdpsk2abvnwcFBVp8QFqVPDgQaGgIogIoictelKKVhARBA8q+KAVrFqooh4qXgRfiHpTEHqw9iCKXqQHSVstpqlt0yabrP9p52K1yW72GTMf/JhZMrM7/3l+37REVVWhlMwjlJhxwVwwF8wFc8FcMBfsnIlGKg98TxRa9RbYAFYXUnl+XbjoRpiKXVXMU9qns3xK76CC/YC4QfA1MAg26aiTZGlQQ9la8AZ0g3VuENwLqsArsFVnXW+e30PgKVgGnoA+Nwi+Cw6DAHgGdmqoMwJoXJrJUcYPHoGN4C3Yl6e8rWv4Nmhma/kh2J6n/HW2JsdylLkKtoAPYAeYcPxYmmX32AjcAVHwPEfZFxreR2fAJ9Z5CbMaSYzceMxxDtN198vKo8Vt57ClYh0d4f/OtTTgOjpquaa8WEhldISM5DRYWYCXZdTS4DVoR9tSegdI9y6Nl1KBL5k/7JRto99HW/ZAtGralJ7DTtCPEUKUmqqKPlH0rtXgMZk2utms2jk0PEqPqt3gEOiybJdGjy5BcobmI7LUC7HrbRQ7HaR4PORoOBRoY+f0RbSp3spjqQNIPtEb8/vEqFMnixTwH0T6gPnwbZYIRk/uZWtHqApLQzaP7GyL1kSCPUinqIuKtjWZKhgvpFt1O82X+cXPXq9njdNHD2ZZC/aRTvZ4A20sN3OEz7IgXJDDkls8laV11aEBpHGaB62mCEbPNSA5QvNYO+88hDS6xcHABtbq9XiusMdTYJ4ZI3yBORdKZTBQ6zKnqq62OiQh7WdByzmjgqlzsWs6BAqW9xAiLHJdMECEY36f9zJ7pLt3oxHH4/j0O4kwWREoW8BuKvSYxG4utFoWjOoVHZErlg/+GP2I7ApwkgnXHy1h/VLntNJA76sROfgFI9CgoXh8OD72OJ3OHDA46Am4m3KhU7rSyJfRl2QiOaXVE3oPsU0mzPKw3RcAf5iiZEPaOkf9KsxcyVq7s1vu7SsZEQ5/LO81ydhk3I5Q05Y/tcQTExKLY/+9U2XV++PJVLMtZ7cdH0mlFfnnyPgIpm3s758y3Qj3NiNfY8sxlmeXNt2NhC/ej0grllXVdHIyVY/RbTD7G9iliZkXAIZsKqUspjjmjgolZlwwF1xigr8VoaYBI4I7ilBwl5Hw8JIwcx3aAha6XCj9t4ub4HzBjgfftLhgLpgL5oK5YC6YC+aCuWDt9luAAQC2EPxjL8cUkwAAAABJRU5ErkJggg==";
|
|
1918
1946
|
}
|
|
1919
1947
|
|
|
1920
|
-
const _hoisted_1$
|
|
1948
|
+
const _hoisted_1$e = {
|
|
1921
1949
|
class: "snail-empty"
|
|
1922
1950
|
};
|
|
1923
|
-
const _hoisted_2$
|
|
1924
|
-
const _hoisted_3$
|
|
1925
|
-
var _sfc_main$
|
|
1951
|
+
const _hoisted_2$8 = ["src"];
|
|
1952
|
+
const _hoisted_3$7 = ["textContent"];
|
|
1953
|
+
var _sfc_main$n = defineComponent({
|
|
1926
1954
|
...{
|
|
1927
1955
|
name: "Empty",
|
|
1928
1956
|
inheritAttrs: true
|
|
@@ -1935,23 +1963,23 @@ var _sfc_main$k = defineComponent({
|
|
|
1935
1963
|
setup(__props) {
|
|
1936
1964
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1937
1965
|
return (_ctx, _cache) => {
|
|
1938
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1966
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [createElementVNode("img", {
|
|
1939
1967
|
src: __props.imageUrl || unref(defaultImageBase64)
|
|
1940
|
-
}, null, 8, _hoisted_2$
|
|
1968
|
+
}, null, 8, _hoisted_2$8), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
|
|
1941
1969
|
class: "message",
|
|
1942
1970
|
textContent: toDisplayString(__props.message || "无数据")
|
|
1943
|
-
}, null, 8, _hoisted_3$
|
|
1971
|
+
}, null, 8, _hoisted_3$7)])]);
|
|
1944
1972
|
};
|
|
1945
1973
|
}
|
|
1946
1974
|
});
|
|
1947
1975
|
|
|
1948
|
-
const _hoisted_1$
|
|
1949
|
-
const _hoisted_2$
|
|
1950
|
-
const _hoisted_3$
|
|
1976
|
+
const _hoisted_1$d = ["title"];
|
|
1977
|
+
const _hoisted_2$7 = ["textContent"];
|
|
1978
|
+
const _hoisted_3$6 = {
|
|
1951
1979
|
key: 1,
|
|
1952
1980
|
class: "select-status"
|
|
1953
1981
|
};
|
|
1954
|
-
var _sfc_main$
|
|
1982
|
+
var _sfc_main$m = defineComponent({
|
|
1955
1983
|
...{
|
|
1956
1984
|
name: "SelectNode",
|
|
1957
1985
|
inheritAttrs: true
|
|
@@ -1996,15 +2024,15 @@ var _sfc_main$j = defineComponent({
|
|
|
1996
2024
|
}, [createElementVNode("div", {
|
|
1997
2025
|
class: "item-text ellipsis",
|
|
1998
2026
|
textContent: toDisplayString(__props.item.text)
|
|
1999
|
-
}, null, 8, _hoisted_2$
|
|
2027
|
+
}, null, 8, _hoisted_2$7), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$C, {
|
|
2000
2028
|
key: 0,
|
|
2001
|
-
type: "arrow"
|
|
2002
|
-
|
|
2003
|
-
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$z, {
|
|
2029
|
+
type: "arrow"
|
|
2030
|
+
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$6, [createVNode(_sfc_main$C, {
|
|
2004
2031
|
type: "success",
|
|
2005
|
-
|
|
2006
|
-
size: 12
|
|
2007
|
-
|
|
2032
|
+
button: "",
|
|
2033
|
+
size: 12,
|
|
2034
|
+
color: "white"
|
|
2035
|
+
})])) : createCommentVNode("", true)], 42, _hoisted_1$d)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
|
|
2008
2036
|
key: 1
|
|
2009
2037
|
}, renderList(unref(showChildrenRef), child => {
|
|
2010
2038
|
return openBlock(), createBlock(_component_SelectNode, {
|
|
@@ -2021,7 +2049,7 @@ var _sfc_main$j = defineComponent({
|
|
|
2021
2049
|
}
|
|
2022
2050
|
});
|
|
2023
2051
|
|
|
2024
|
-
var _sfc_main$
|
|
2052
|
+
var _sfc_main$l = defineComponent({
|
|
2025
2053
|
...{
|
|
2026
2054
|
name: "Select2Popup",
|
|
2027
2055
|
inheritAttrs: true
|
|
@@ -2193,13 +2221,13 @@ var _sfc_main$i = defineComponent({
|
|
|
2193
2221
|
key: 0
|
|
2194
2222
|
}, [createTextVNode(" 暂无选项 ")], 64)) : (openBlock(), createElementBlock(Fragment, {
|
|
2195
2223
|
key: 1
|
|
2196
|
-
}, [__props.search ? (openBlock(), createBlock(_sfc_main$
|
|
2224
|
+
}, [__props.search ? (openBlock(), createBlock(_sfc_main$w, mergeProps({
|
|
2197
2225
|
key: 0
|
|
2198
2226
|
}, __props.search, {
|
|
2199
2227
|
onSearch,
|
|
2200
2228
|
key: "select-search"
|
|
2201
2229
|
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
2202
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2230
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
2203
2231
|
key: unref(context).getKey(item),
|
|
2204
2232
|
multiple: __props.multiple,
|
|
2205
2233
|
item,
|
|
@@ -2208,7 +2236,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2208
2236
|
onEnter: onEnterSelectNode,
|
|
2209
2237
|
onClick: onClickSelectNode
|
|
2210
2238
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2211
|
-
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2239
|
+
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2212
2240
|
key: 1,
|
|
2213
2241
|
message: "无结果"
|
|
2214
2242
|
})) : createCommentVNode("", true), showClearButtonRef.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -2220,20 +2248,20 @@ var _sfc_main$i = defineComponent({
|
|
|
2220
2248
|
}
|
|
2221
2249
|
});
|
|
2222
2250
|
|
|
2223
|
-
const _hoisted_1$
|
|
2251
|
+
const _hoisted_1$c = {
|
|
2224
2252
|
key: 0,
|
|
2225
2253
|
class: "select-result"
|
|
2226
2254
|
};
|
|
2227
|
-
const _hoisted_2$
|
|
2228
|
-
const _hoisted_3$
|
|
2255
|
+
const _hoisted_2$6 = ["title", "textContent"];
|
|
2256
|
+
const _hoisted_3$5 = ["textContent"];
|
|
2229
2257
|
const _hoisted_4$4 = {
|
|
2230
2258
|
key: 1,
|
|
2231
2259
|
class: "placeholder"
|
|
2232
2260
|
};
|
|
2233
2261
|
onAppCreated((app, type) => {
|
|
2234
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2262
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$l);
|
|
2235
2263
|
});
|
|
2236
|
-
var _sfc_main$
|
|
2264
|
+
var _sfc_main$k = defineComponent({
|
|
2237
2265
|
...{
|
|
2238
2266
|
name: "Select",
|
|
2239
2267
|
inheritAttrs: true
|
|
@@ -2365,28 +2393,26 @@ var _sfc_main$h = defineComponent({
|
|
|
2365
2393
|
ref: "select"
|
|
2366
2394
|
}, [__props.items && __props.items.length ? (openBlock(), createElementBlock(Fragment, {
|
|
2367
2395
|
key: 0
|
|
2368
|
-
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2396
|
+
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$c, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
|
|
2369
2397
|
class: "select-text ellipsis",
|
|
2370
2398
|
title: selectedTextRef.value,
|
|
2371
2399
|
textContent: toDisplayString(selectedTextRef.value)
|
|
2372
|
-
}, null, 8, _hoisted_2$
|
|
2400
|
+
}, null, 8, _hoisted_2$6)])])) : (openBlock(), createElementBlock("div", {
|
|
2373
2401
|
key: 1,
|
|
2374
2402
|
class: "placeholder",
|
|
2375
2403
|
textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2376
|
-
}, null, 8, _hoisted_3$
|
|
2404
|
+
}, null, 8, _hoisted_3$5)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
|
|
2377
2405
|
key: 2,
|
|
2378
2406
|
type: "arrow",
|
|
2407
|
+
button: "",
|
|
2379
2408
|
size: 24,
|
|
2380
|
-
|
|
2381
|
-
style: {
|
|
2382
|
-
"transform": "rotate(90deg)"
|
|
2383
|
-
}
|
|
2409
|
+
rotate: 90
|
|
2384
2410
|
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
|
|
2385
2411
|
};
|
|
2386
2412
|
}
|
|
2387
2413
|
});
|
|
2388
2414
|
|
|
2389
|
-
var _sfc_main$
|
|
2415
|
+
var _sfc_main$j = defineComponent({
|
|
2390
2416
|
...{
|
|
2391
2417
|
name: "Switch",
|
|
2392
2418
|
inheritAttrs: true
|
|
@@ -2435,8 +2461,8 @@ var _sfc_main$g = defineComponent({
|
|
|
2435
2461
|
}
|
|
2436
2462
|
});
|
|
2437
2463
|
|
|
2438
|
-
const _hoisted_1$
|
|
2439
|
-
var _sfc_main$
|
|
2464
|
+
const _hoisted_1$b = ["readonly", "placeholder", "rows"];
|
|
2465
|
+
var _sfc_main$i = defineComponent({
|
|
2440
2466
|
...{
|
|
2441
2467
|
name: "Textarea"
|
|
2442
2468
|
},
|
|
@@ -2496,15 +2522,289 @@ var _sfc_main$f = defineComponent({
|
|
|
2496
2522
|
onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
|
|
2497
2523
|
onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
|
|
2498
2524
|
onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
|
|
2499
|
-
}), null, 16, _hoisted_1$
|
|
2525
|
+
}), null, 16, _hoisted_1$b)), [[vModelText, valueModel.value]]);
|
|
2500
2526
|
};
|
|
2501
2527
|
}
|
|
2502
2528
|
});
|
|
2503
2529
|
|
|
2504
|
-
|
|
2530
|
+
function isRight(root) {
|
|
2531
|
+
return root.scrollLeft + root.clientWidth >= root.scrollWidth;
|
|
2532
|
+
}
|
|
2533
|
+
function isBottom(root) {
|
|
2534
|
+
return root.scrollTop + root.clientHeight >= root.scrollHeight;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
const _hoisted_1$a = {
|
|
2538
|
+
key: 0,
|
|
2539
|
+
class: "down-refresh"
|
|
2540
|
+
};
|
|
2541
|
+
const _hoisted_2$5 = {
|
|
2542
|
+
class: "main-body"
|
|
2543
|
+
};
|
|
2544
|
+
const _hoisted_3$4 = {
|
|
2545
|
+
key: 1,
|
|
2546
|
+
class: "up-more"
|
|
2547
|
+
};
|
|
2548
|
+
var _sfc_main$h = defineComponent({
|
|
2549
|
+
__name: "elastic",
|
|
2550
|
+
props: {
|
|
2551
|
+
scroll: {},
|
|
2552
|
+
spring: {},
|
|
2553
|
+
downRefresh: {
|
|
2554
|
+
type: Boolean
|
|
2555
|
+
},
|
|
2556
|
+
upMore: {
|
|
2557
|
+
type: Boolean
|
|
2558
|
+
},
|
|
2559
|
+
barSize: {}
|
|
2560
|
+
},
|
|
2561
|
+
setup(__props) {
|
|
2562
|
+
const props = __props;
|
|
2563
|
+
const {
|
|
2564
|
+
onEvent
|
|
2565
|
+
} = useObserver();
|
|
2566
|
+
const rootDom = useTemplateRef("root-dom");
|
|
2567
|
+
const scrollStyleRef = computed(buildScrollStyle);
|
|
2568
|
+
ref(void 0);
|
|
2569
|
+
const springStyleRef = computed(buildSpringStyle);
|
|
2570
|
+
const springXRef = computed(() => props.spring == "x" || props.spring == "both");
|
|
2571
|
+
const springYRef = computed(() => props.spring == "y" || props.spring == "both");
|
|
2572
|
+
const downRefreshRef = computed(() => springYRef.value == true && props.downRefresh == true);
|
|
2573
|
+
const upMoreRef = computed(() => springYRef.value == true && props.upMore == true);
|
|
2574
|
+
const isMovingRef = ref(false);
|
|
2575
|
+
const springStatusRef = ref(void 0);
|
|
2576
|
+
const startPointerRef = ref(void 0);
|
|
2577
|
+
let isStartByTouch = false;
|
|
2578
|
+
function buildScrollStyle() {
|
|
2579
|
+
const vars = Object.create(null);
|
|
2580
|
+
switch (props.scroll) {
|
|
2581
|
+
case "x":
|
|
2582
|
+
vars["--overflow"] = "auto hidden";
|
|
2583
|
+
break;
|
|
2584
|
+
case "y":
|
|
2585
|
+
vars["--overflow"] = "hidden auto";
|
|
2586
|
+
break;
|
|
2587
|
+
case "both":
|
|
2588
|
+
vars["--overflow"] = "auto";
|
|
2589
|
+
break;
|
|
2590
|
+
}
|
|
2591
|
+
switch (props.barSize) {
|
|
2592
|
+
case "normal":
|
|
2593
|
+
vars["--bar-size"] = "10px";
|
|
2594
|
+
break;
|
|
2595
|
+
case "small":
|
|
2596
|
+
vars["--bar-size"] = "6px";
|
|
2597
|
+
break;
|
|
2598
|
+
case "mini":
|
|
2599
|
+
vars["--bar-size"] = "4px";
|
|
2600
|
+
break;
|
|
2601
|
+
case "none":
|
|
2602
|
+
vars["--bar-size"] = "0";
|
|
2603
|
+
break;
|
|
2604
|
+
}
|
|
2605
|
+
return vars;
|
|
2606
|
+
}
|
|
2607
|
+
function buildSpringStyle() {
|
|
2608
|
+
const style = Object.create(null);
|
|
2609
|
+
if (springStatusRef.value != void 0) {
|
|
2610
|
+
const {
|
|
2611
|
+
x,
|
|
2612
|
+
y
|
|
2613
|
+
} = springStatusRef.value;
|
|
2614
|
+
const transforms = [];
|
|
2615
|
+
x != void 0 && transforms.push(`translateX(${x}px)`);
|
|
2616
|
+
y != void 0 && transforms.push(`translateY(${y}px)`);
|
|
2617
|
+
transforms.length && (style["--spring-transform"] = transforms.join(" "));
|
|
2618
|
+
}
|
|
2619
|
+
return style;
|
|
2620
|
+
}
|
|
2621
|
+
function onSpringStart(isTouch, position) {
|
|
2622
|
+
if (isTouch != true && isStartByTouch == true) {
|
|
2623
|
+
return;
|
|
2624
|
+
}
|
|
2625
|
+
isTouch && (isStartByTouch = true);
|
|
2626
|
+
if (springXRef.value == true || springYRef.value == true) {
|
|
2627
|
+
isMovingRef.value = true;
|
|
2628
|
+
springStatusRef.value = Object.create(null);
|
|
2629
|
+
startPointerRef.value = {
|
|
2630
|
+
clientX: position.clientX,
|
|
2631
|
+
clientY: position.clientY
|
|
2632
|
+
};
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
function onSpringMove(isTouch, position) {
|
|
2636
|
+
if (startPointerRef.value == void 0 || isTouch != true && isStartByTouch == true) {
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
if (springXRef.value == true) {
|
|
2640
|
+
const distance = position.clientX - startPointerRef.value.clientX;
|
|
2641
|
+
if (distance >= 0 && rootDom.value.scrollLeft == 0) {
|
|
2642
|
+
springStatusRef.value.x = Math.pow(distance, 0.8);
|
|
2643
|
+
} else if (distance <= 0 && isRight(rootDom.value)) {
|
|
2644
|
+
springStatusRef.value.x = -Math.pow(-distance, 0.8);
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
if (springYRef.value == true) {
|
|
2648
|
+
const distance = position.clientY - startPointerRef.value.clientY;
|
|
2649
|
+
if (distance >= 0) {
|
|
2650
|
+
if (rootDom.value.scrollTop == 0) {
|
|
2651
|
+
springStatusRef.value.y = Math.pow(distance, 0.8);
|
|
2652
|
+
} else {
|
|
2653
|
+
startPointerRef.value.clientY = position.clientY;
|
|
2654
|
+
}
|
|
2655
|
+
} else if (distance <= 0 && isBottom(rootDom.value) == true) {
|
|
2656
|
+
springStatusRef.value.y = -Math.pow(-distance, 0.8);
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
function onSpringEnd(isTouch, isCancel) {
|
|
2661
|
+
if (startPointerRef.value != void 0) {
|
|
2662
|
+
springStatusRef.value = Object.create(null);
|
|
2663
|
+
isMovingRef.value = false;
|
|
2664
|
+
startPointerRef.value = void 0;
|
|
2665
|
+
isStartByTouch = false;
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
onMounted(() => {
|
|
2669
|
+
if ("ontouchstart" in window) {
|
|
2670
|
+
onEvent(rootDom.value, "touchstart", evt => onSpringStart(true, evt.touches[0]));
|
|
2671
|
+
onEvent(window, "touchmove", evt => onSpringMove(true, evt.touches[0]));
|
|
2672
|
+
onEvent(window, "touchend", () => onSpringEnd());
|
|
2673
|
+
onEvent(window, "touchcancel", () => onSpringEnd());
|
|
2674
|
+
}
|
|
2675
|
+
if ("onmousedown" in window) {
|
|
2676
|
+
onEvent(rootDom.value, "mousedown", evt => onSpringStart(false, evt));
|
|
2677
|
+
onEvent(window, "mousemove", evt => onSpringMove(false, evt));
|
|
2678
|
+
onEvent(window, "mouseup", () => onSpringEnd());
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
return (_ctx, _cache) => {
|
|
2682
|
+
return openBlock(), createElementBlock("div", {
|
|
2683
|
+
class: normalizeClass(["snail-elastic", {
|
|
2684
|
+
"spring": springXRef.value || springYRef.value,
|
|
2685
|
+
"moving": isMovingRef.value
|
|
2686
|
+
}]),
|
|
2687
|
+
style: normalizeStyle([scrollStyleRef.value, springStyleRef.value]),
|
|
2688
|
+
ref: "root-dom"
|
|
2689
|
+
}, [downRefreshRef.value ? (openBlock(), createElementBlock("div", _hoisted_1$a, [renderSlot(_ctx.$slots, "down-refresh", {}, () => [_cache[0] || (_cache[0] = createTextVNode(" 默认实现[下拉刷新] ", -1))])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), upMoreRef.value ? (openBlock(), createElementBlock("div", _hoisted_3$4, [renderSlot(_ctx.$slots, "up-more", {}, () => [_cache[1] || (_cache[1] = createTextVNode(" 默认实现[上拉加载更多] ", -1))])])) : createCommentVNode("", true)], 6);
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
});
|
|
2693
|
+
|
|
2694
|
+
var _sfc_main$g = defineComponent({
|
|
2695
|
+
__name: "flex",
|
|
2696
|
+
props: {
|
|
2697
|
+
direction: {},
|
|
2698
|
+
wrap: {},
|
|
2699
|
+
gap: {},
|
|
2700
|
+
justifyContent: {},
|
|
2701
|
+
alignItems: {},
|
|
2702
|
+
alignContent: {},
|
|
2703
|
+
repairItem: {
|
|
2704
|
+
type: Boolean
|
|
2705
|
+
},
|
|
2706
|
+
itemCount: {},
|
|
2707
|
+
itemTag: {},
|
|
2708
|
+
itemClass: {}
|
|
2709
|
+
},
|
|
2710
|
+
setup(__props) {
|
|
2711
|
+
const props = __props;
|
|
2712
|
+
const rootDom = useTemplateRef("root-flex");
|
|
2713
|
+
const {
|
|
2714
|
+
onSize
|
|
2715
|
+
} = useObserver();
|
|
2716
|
+
const {
|
|
2717
|
+
watcher
|
|
2718
|
+
} = useReactive();
|
|
2719
|
+
const styleRef = computed(buildStyleVar);
|
|
2720
|
+
const repairItemsRef = shallowRef(0);
|
|
2721
|
+
function isColumnDirection(direction) {
|
|
2722
|
+
switch (direction) {
|
|
2723
|
+
case "column":
|
|
2724
|
+
case "column-reverse":
|
|
2725
|
+
return true;
|
|
2726
|
+
default:
|
|
2727
|
+
return false;
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
function buildStyleVar() {
|
|
2731
|
+
const styleVar = Object.create(null);
|
|
2732
|
+
isStringNotEmpty(props.direction) && (styleVar["flex-direction"] = props.direction);
|
|
2733
|
+
isStringNotEmpty(props.wrap) && (styleVar["flex-wrap"] = props.wrap);
|
|
2734
|
+
isStringNotEmpty(props.gap) && (styleVar["gap"] = props.gap);
|
|
2735
|
+
const tmpFunc = value => {
|
|
2736
|
+
switch (value) {
|
|
2737
|
+
case "start":
|
|
2738
|
+
return "flex-start";
|
|
2739
|
+
case "end":
|
|
2740
|
+
return "flex-end";
|
|
2741
|
+
default:
|
|
2742
|
+
return value;
|
|
2743
|
+
}
|
|
2744
|
+
};
|
|
2745
|
+
isStringNotEmpty(props.justifyContent) && (styleVar["justify-content"] = tmpFunc(props.justifyContent));
|
|
2746
|
+
isStringNotEmpty(props.alignItems) && (styleVar["align-items"] = tmpFunc(props.alignItems));
|
|
2747
|
+
isStringNotEmpty(props.alignContent) && (styleVar["align-content"] = tmpFunc(props.alignContent));
|
|
2748
|
+
return styleVar;
|
|
2749
|
+
}
|
|
2750
|
+
function repairSpace() {
|
|
2751
|
+
repairItemsRef.value = 0;
|
|
2752
|
+
const needRepair = props.repairItem == true && props.justifyContent && props.justifyContent.startsWith("space-") && props.itemCount > 0 && rootDom.value.children.length > 0;
|
|
2753
|
+
if (needRepair == true) {
|
|
2754
|
+
let containerSize, itemSize, itemGap;
|
|
2755
|
+
const containerStyle = getComputedStyle(rootDom.value);
|
|
2756
|
+
const itemStyle = getComputedStyle(rootDom.value.children[0]);
|
|
2757
|
+
switch (props.direction) {
|
|
2758
|
+
case "column":
|
|
2759
|
+
case "column-reverse":
|
|
2760
|
+
{
|
|
2761
|
+
containerSize = parseFloat(containerStyle.height);
|
|
2762
|
+
itemGap = parseFloat(containerStyle.rowGap);
|
|
2763
|
+
itemSize = parseFloat(itemStyle.height);
|
|
2764
|
+
break;
|
|
2765
|
+
}
|
|
2766
|
+
default:
|
|
2767
|
+
{
|
|
2768
|
+
containerSize = parseFloat(containerStyle.width);
|
|
2769
|
+
itemGap = parseFloat(containerStyle.columnGap);
|
|
2770
|
+
itemSize = parseFloat(itemStyle.width);
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
let itemCountPer;
|
|
2775
|
+
itemCountPer = Math.floor((containerSize + itemGap) / (itemSize + itemGap));
|
|
2776
|
+
if (itemCountPer > 1) {
|
|
2777
|
+
const mode = props.itemCount % itemCountPer;
|
|
2778
|
+
mode > 0 && (repairItemsRef.value = itemCountPer - mode);
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
onMounted(() => {
|
|
2783
|
+
repairSpace();
|
|
2784
|
+
watcher(() => props.repairItem, repairSpace);
|
|
2785
|
+
watcher(() => props.itemCount, repairSpace);
|
|
2786
|
+
onSize(rootDom.value, repairSpace);
|
|
2787
|
+
});
|
|
2788
|
+
return (_ctx, _cache) => {
|
|
2789
|
+
return openBlock(), createElementBlock("div", {
|
|
2790
|
+
class: normalizeClass(["snail-flex", {
|
|
2791
|
+
"column": isColumnDirection(props.direction)
|
|
2792
|
+
}]),
|
|
2793
|
+
style: normalizeStyle(styleRef.value),
|
|
2794
|
+
ref: "root-flex"
|
|
2795
|
+
}, [renderSlot(_ctx.$slots, "default"), (openBlock(true), createElementBlock(Fragment, null, renderList(repairItemsRef.value, _ => {
|
|
2796
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(correctString)(props.itemTag, "div", true)), {
|
|
2797
|
+
class: normalizeClass([props.itemClass || "", "repair-item"])
|
|
2798
|
+
}, null, 8, ["class"]);
|
|
2799
|
+
}), 256))], 6);
|
|
2800
|
+
};
|
|
2801
|
+
}
|
|
2802
|
+
});
|
|
2803
|
+
|
|
2804
|
+
const _hoisted_1$9 = {
|
|
2505
2805
|
class: "fold-header"
|
|
2506
2806
|
};
|
|
2507
|
-
const _hoisted_2$
|
|
2807
|
+
const _hoisted_2$4 = ["textContent"];
|
|
2508
2808
|
const _hoisted_3$3 = ["textContent"];
|
|
2509
2809
|
const _hoisted_4$3 = {
|
|
2510
2810
|
key: 1,
|
|
@@ -2514,7 +2814,7 @@ const _hoisted_5$2 = {
|
|
|
2514
2814
|
class: "fold-body",
|
|
2515
2815
|
ref: "foldBody"
|
|
2516
2816
|
};
|
|
2517
|
-
var _sfc_main$
|
|
2817
|
+
var _sfc_main$f = defineComponent({
|
|
2518
2818
|
...{
|
|
2519
2819
|
name: "Fold",
|
|
2520
2820
|
inheritAttrs: true
|
|
@@ -2584,23 +2884,26 @@ var _sfc_main$e = defineComponent({
|
|
|
2584
2884
|
return (_ctx, _cache) => {
|
|
2585
2885
|
return openBlock(), createElementBlock("div", {
|
|
2586
2886
|
class: normalizeClass(["snail-fold", statusModel.value])
|
|
2587
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2887
|
+
}, [createElementVNode("div", _hoisted_1$9, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", {
|
|
2588
2888
|
class: "title ellipsis",
|
|
2589
2889
|
textContent: toDisplayString(__props.title)
|
|
2590
|
-
}, null, 8, _hoisted_2$
|
|
2890
|
+
}, null, 8, _hoisted_2$4), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
2591
2891
|
key: 0,
|
|
2592
2892
|
class: "subtitle ellipsis",
|
|
2593
2893
|
textContent: toDisplayString(__props.subtitle)
|
|
2594
|
-
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$
|
|
2894
|
+
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$C, {
|
|
2895
|
+
custom: false,
|
|
2595
2896
|
type: "arrow",
|
|
2897
|
+
button: "",
|
|
2596
2898
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2899
|
+
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
2597
2900
|
onClick: onStatusClick
|
|
2598
|
-
}, null, 8, ["title"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2901
|
+
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2599
2902
|
};
|
|
2600
2903
|
}
|
|
2601
2904
|
});
|
|
2602
2905
|
|
|
2603
|
-
var _sfc_main$
|
|
2906
|
+
var _sfc_main$e = defineComponent({
|
|
2604
2907
|
...{
|
|
2605
2908
|
name: "Scroll",
|
|
2606
2909
|
inheritAttrs: true
|
|
@@ -2730,7 +3033,7 @@ var _sfc_main$d = defineComponent({
|
|
|
2730
3033
|
}
|
|
2731
3034
|
});
|
|
2732
3035
|
|
|
2733
|
-
var _sfc_main$
|
|
3036
|
+
var _sfc_main$d = defineComponent({
|
|
2734
3037
|
__name: "layout",
|
|
2735
3038
|
props: {
|
|
2736
3039
|
mode: {},
|
|
@@ -2796,7 +3099,7 @@ var _sfc_main$c = defineComponent({
|
|
|
2796
3099
|
key: item
|
|
2797
3100
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (openBlock(), createElementBlock(Fragment, {
|
|
2798
3101
|
key: 0
|
|
2799
|
-
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$
|
|
3102
|
+
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
2800
3103
|
key: 0,
|
|
2801
3104
|
class: areaMap.value[item].class,
|
|
2802
3105
|
style: areaMap.value[item].style
|
|
@@ -2815,7 +3118,7 @@ var _sfc_main$c = defineComponent({
|
|
|
2815
3118
|
}
|
|
2816
3119
|
});
|
|
2817
3120
|
|
|
2818
|
-
var _sfc_main$
|
|
3121
|
+
var _sfc_main$c = defineComponent({
|
|
2819
3122
|
...{
|
|
2820
3123
|
name: "Sort",
|
|
2821
3124
|
inheritAttrs: true
|
|
@@ -2916,10 +3219,10 @@ var _sfc_main$b = defineComponent({
|
|
|
2916
3219
|
}
|
|
2917
3220
|
});
|
|
2918
3221
|
|
|
2919
|
-
const _hoisted_1$
|
|
3222
|
+
const _hoisted_1$8 = {
|
|
2920
3223
|
class: "table-body"
|
|
2921
3224
|
};
|
|
2922
|
-
var _sfc_main$
|
|
3225
|
+
var _sfc_main$b = defineComponent({
|
|
2923
3226
|
...{
|
|
2924
3227
|
name: "Table",
|
|
2925
3228
|
inheritAttrs: true
|
|
@@ -2944,7 +3247,7 @@ var _sfc_main$a = defineComponent({
|
|
|
2944
3247
|
const hStyleRef = computed(() => css.buildStyle(props.headerStyle));
|
|
2945
3248
|
const fStyleRef = computed(() => css.buildStyle(props.footerStyle));
|
|
2946
3249
|
return (_ctx, _cache) => {
|
|
2947
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3250
|
+
return openBlock(), createBlock(_sfc_main$e, {
|
|
2948
3251
|
class: normalizeClass(["snail-table", {
|
|
2949
3252
|
"start-border": __props.border == true
|
|
2950
3253
|
}]),
|
|
@@ -2954,7 +3257,7 @@ var _sfc_main$a = defineComponent({
|
|
|
2954
3257
|
default: withCtx(() => [createElementVNode("div", {
|
|
2955
3258
|
class: "table-header",
|
|
2956
3259
|
style: normalizeStyle(hStyleRef.value)
|
|
2957
|
-
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$
|
|
3260
|
+
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$8, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
|
|
2958
3261
|
class: "table-footer",
|
|
2959
3262
|
style: normalizeStyle(fStyleRef.value)
|
|
2960
3263
|
}, [renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -2964,7 +3267,7 @@ var _sfc_main$a = defineComponent({
|
|
|
2964
3267
|
}
|
|
2965
3268
|
});
|
|
2966
3269
|
|
|
2967
|
-
var _sfc_main$
|
|
3270
|
+
var _sfc_main$a = defineComponent({
|
|
2968
3271
|
...{
|
|
2969
3272
|
name: "TableRow",
|
|
2970
3273
|
inheritAttrs: true
|
|
@@ -2987,7 +3290,7 @@ var _sfc_main$9 = defineComponent({
|
|
|
2987
3290
|
}
|
|
2988
3291
|
});
|
|
2989
3292
|
|
|
2990
|
-
var _sfc_main$
|
|
3293
|
+
var _sfc_main$9 = defineComponent({
|
|
2991
3294
|
...{
|
|
2992
3295
|
name: "TableCol",
|
|
2993
3296
|
inheritAttrs: true
|
|
@@ -3033,20 +3336,19 @@ var _sfc_main$8 = defineComponent({
|
|
|
3033
3336
|
}
|
|
3034
3337
|
});
|
|
3035
3338
|
|
|
3036
|
-
const _hoisted_1$
|
|
3339
|
+
const _hoisted_1$7 = {
|
|
3037
3340
|
key: 0,
|
|
3038
3341
|
class: "node-fold"
|
|
3039
3342
|
};
|
|
3040
|
-
const _hoisted_2$
|
|
3343
|
+
const _hoisted_2$3 = ["title", "textContent"];
|
|
3041
3344
|
const _hoisted_3$2 = {
|
|
3042
3345
|
class: "node-slot ellipsis"
|
|
3043
3346
|
};
|
|
3044
3347
|
const _hoisted_4$2 = {
|
|
3045
|
-
|
|
3046
|
-
class: "snail-tree-children hidden",
|
|
3348
|
+
class: "snail-tree-children",
|
|
3047
3349
|
ref: "children"
|
|
3048
3350
|
};
|
|
3049
|
-
var _sfc_main$
|
|
3351
|
+
var _sfc_main$8 = defineComponent({
|
|
3050
3352
|
...{
|
|
3051
3353
|
name: "TreeNode",
|
|
3052
3354
|
inheritAttrs: true
|
|
@@ -3071,10 +3373,6 @@ var _sfc_main$7 = defineComponent({
|
|
|
3071
3373
|
const {
|
|
3072
3374
|
transition
|
|
3073
3375
|
} = useAnimation();
|
|
3074
|
-
const {
|
|
3075
|
-
watcher
|
|
3076
|
-
} = useReactive();
|
|
3077
|
-
const treeNodeDom = useTemplateRef("tree-node");
|
|
3078
3376
|
const isHoveredRef = shallowRef(false);
|
|
3079
3377
|
const showRef = computed(() => __props.context.isShow(__props.node, true));
|
|
3080
3378
|
const showChildrenRef = computed(() => __props.context.isShowChildren(__props.node, true));
|
|
@@ -3131,28 +3429,22 @@ var _sfc_main$7 = defineComponent({
|
|
|
3131
3429
|
parents = __props.parent ? [__props.parent, ...parents] : parents;
|
|
3132
3430
|
emits("click", child, parents);
|
|
3133
3431
|
}
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
newValue && treeNodeDom.value.classList.add("hovered");
|
|
3137
|
-
});
|
|
3138
|
-
watcher(() => __props.context.isActived(__props.node), newValue => {
|
|
3139
|
-
if (treeNodeDom.value) {
|
|
3140
|
-
treeNodeDom.value.classList.remove("actived");
|
|
3141
|
-
newValue && treeNodeDom.value.classList.add("actived");
|
|
3142
|
-
}
|
|
3143
|
-
});
|
|
3144
|
-
onMounted(() => {
|
|
3432
|
+
onMounted(async () => {
|
|
3433
|
+
await nextTick();
|
|
3145
3434
|
if (childrenDom.value) {
|
|
3146
3435
|
__props.options.expandLevel != void 0 && __props.options.expandLevel < nextLevel && toggleFold();
|
|
3147
|
-
childrenDom.value && childrenDom.value.classList.remove("hidden");
|
|
3148
3436
|
nodeEmitsDisabled = false;
|
|
3149
3437
|
}
|
|
3150
3438
|
});
|
|
3439
|
+
onActivated(() => {});
|
|
3151
3440
|
return (_ctx, _cache) => {
|
|
3152
3441
|
const _component_TreeNode = resolveComponent("TreeNode", true);
|
|
3153
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
3154
|
-
|
|
3155
|
-
|
|
3442
|
+
return openBlock(), createElementBlock(Fragment, null, [withDirectives(createElementVNode("div", {
|
|
3443
|
+
class: normalizeClass(["snail-tree-node", `level-${__props.level}`, {
|
|
3444
|
+
clickable: __props.node.clickable,
|
|
3445
|
+
hovered: isHoveredRef.value,
|
|
3446
|
+
actived: __props.context.isActived(__props.node)
|
|
3447
|
+
}]),
|
|
3156
3448
|
ref: "tree-node",
|
|
3157
3449
|
onMouseenter: _cache[0] || (_cache[0] = $event => isHoveredRef.value = true),
|
|
3158
3450
|
onMouseleave: _cache[1] || (_cache[1] = $event => isHoveredRef.value = false),
|
|
@@ -3162,21 +3454,24 @@ var _sfc_main$7 = defineComponent({
|
|
|
3162
3454
|
key: 0
|
|
3163
3455
|
}, unref(slotOptions)))) : (openBlock(), createElementBlock(Fragment, {
|
|
3164
3456
|
key: 1
|
|
3165
|
-
}, [_cache[
|
|
3457
|
+
}, [_cache[5] || (_cache[5] = createElementVNode("div", {
|
|
3166
3458
|
class: "indent"
|
|
3167
|
-
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3459
|
+
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$7, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$C, {
|
|
3168
3460
|
key: 0,
|
|
3169
3461
|
class: normalizeClass(statusRef.value),
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
color: "#8a8099",
|
|
3173
|
-
draw: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z",
|
|
3462
|
+
custom: "",
|
|
3463
|
+
button: "",
|
|
3174
3464
|
onClick: toggleFold
|
|
3175
|
-
},
|
|
3465
|
+
}, {
|
|
3466
|
+
default: withCtx(() => [...(_cache[4] || (_cache[4] = [createElementVNode("path", {
|
|
3467
|
+
d: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z"
|
|
3468
|
+
}, null, -1)]))]),
|
|
3469
|
+
_: 1
|
|
3470
|
+
}, 8, ["class"])) : createCommentVNode("", true)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
3176
3471
|
class: "node-text ellipsis",
|
|
3177
3472
|
title: __props.node.text,
|
|
3178
3473
|
textContent: toDisplayString(__props.node.text)
|
|
3179
|
-
}, null, 8, _hoisted_2$
|
|
3474
|
+
}, null, 8, _hoisted_2$3), 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 => {
|
|
3180
3475
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
3181
3476
|
key: __props.context.getKey(child),
|
|
3182
3477
|
node: child,
|
|
@@ -3191,15 +3486,15 @@ var _sfc_main$7 = defineComponent({
|
|
|
3191
3486
|
}, slotProps))]),
|
|
3192
3487
|
_: 3
|
|
3193
3488
|
}, 8, ["node", "parent", "options", "context"]);
|
|
3194
|
-
}), 128))], 512)
|
|
3489
|
+
}), 128))], 512), [[vShow, showRef.value && showChildrenRef.value]])], 64);
|
|
3195
3490
|
};
|
|
3196
3491
|
}
|
|
3197
3492
|
});
|
|
3198
3493
|
|
|
3199
|
-
const _hoisted_1$
|
|
3494
|
+
const _hoisted_1$6 = {
|
|
3200
3495
|
class: "snail-tree"
|
|
3201
3496
|
};
|
|
3202
|
-
var _sfc_main$
|
|
3497
|
+
var _sfc_main$7 = defineComponent({
|
|
3203
3498
|
...{
|
|
3204
3499
|
name: "Tree",
|
|
3205
3500
|
inheritAttrs: true
|
|
@@ -3233,15 +3528,15 @@ var _sfc_main$6 = defineComponent({
|
|
|
3233
3528
|
emits("click", node, parents);
|
|
3234
3529
|
}
|
|
3235
3530
|
return (_ctx, _cache) => {
|
|
3236
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3531
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [__props.search ? (openBlock(), createBlock(_sfc_main$w, mergeProps({
|
|
3237
3532
|
key: 0
|
|
3238
3533
|
}, __props.search, {
|
|
3239
3534
|
onSearch
|
|
3240
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3535
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$e, {
|
|
3241
3536
|
"scroll-y": true
|
|
3242
3537
|
}, {
|
|
3243
3538
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
|
|
3244
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3539
|
+
return openBlock(), createBlock(_sfc_main$8, {
|
|
3245
3540
|
key: unref(context).getKey(node),
|
|
3246
3541
|
node,
|
|
3247
3542
|
parent: void 0,
|
|
@@ -3262,7 +3557,7 @@ var _sfc_main$6 = defineComponent({
|
|
|
3262
3557
|
}
|
|
3263
3558
|
});
|
|
3264
3559
|
|
|
3265
|
-
var _sfc_main$
|
|
3560
|
+
var _sfc_main$6 = defineComponent({
|
|
3266
3561
|
__name: "wrapper",
|
|
3267
3562
|
props: {
|
|
3268
3563
|
readonly: {
|
|
@@ -3284,14 +3579,14 @@ var _sfc_main$5 = defineComponent({
|
|
|
3284
3579
|
return (_ctx, _cache) => {
|
|
3285
3580
|
return openBlock(), createElementBlock("div", {
|
|
3286
3581
|
class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
3287
|
-
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3582
|
+
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$z, mergeProps({
|
|
3288
3583
|
key: 0
|
|
3289
3584
|
}, __props.header || {
|
|
3290
3585
|
useTo: "dialog",
|
|
3291
3586
|
title: "对话框"
|
|
3292
3587
|
}, {
|
|
3293
3588
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3294
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3589
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$e, mergeProps({
|
|
3295
3590
|
class: "wrapper-body"
|
|
3296
3591
|
}, __props.content || {
|
|
3297
3592
|
scrollX: false,
|
|
@@ -3299,7 +3594,7 @@ var _sfc_main$5 = defineComponent({
|
|
|
3299
3594
|
}), {
|
|
3300
3595
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3301
3596
|
_: 3
|
|
3302
|
-
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3597
|
+
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$A, mergeProps({
|
|
3303
3598
|
key: 1
|
|
3304
3599
|
}, __props.footer || {}, {
|
|
3305
3600
|
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
@@ -3313,7 +3608,7 @@ function mount(target, options, onDestroyed) {
|
|
|
3313
3608
|
mustObject(options, "options");
|
|
3314
3609
|
target instanceof HTMLElement || throwError("target must be a HTMLElement");
|
|
3315
3610
|
target.classList.add("snail-app");
|
|
3316
|
-
const app = createApp(_sfc_main$
|
|
3611
|
+
const app = createApp(_sfc_main$s, options);
|
|
3317
3612
|
triggerAppCreated(app);
|
|
3318
3613
|
app.mount(target);
|
|
3319
3614
|
const scope = useScope().onDestroy(() => app.unmount());
|
|
@@ -3321,6 +3616,53 @@ function mount(target, options, onDestroyed) {
|
|
|
3321
3616
|
return scope;
|
|
3322
3617
|
}
|
|
3323
3618
|
|
|
3619
|
+
const _hoisted_1$5 = {
|
|
3620
|
+
class: "snail-flash-number"
|
|
3621
|
+
};
|
|
3622
|
+
const _hoisted_2$2 = ["textContent"];
|
|
3623
|
+
var _sfc_main$5 = defineComponent({
|
|
3624
|
+
__name: "flash-number",
|
|
3625
|
+
props: {
|
|
3626
|
+
value: {}
|
|
3627
|
+
},
|
|
3628
|
+
setup(__props) {
|
|
3629
|
+
const props = __props;
|
|
3630
|
+
const itemsRef = ref();
|
|
3631
|
+
function buildNumberItems() {
|
|
3632
|
+
itemsRef.value = [];
|
|
3633
|
+
const value = isNullish(props.value) ? null : String(props.value);
|
|
3634
|
+
if (isStringNotEmpty(value) == true) {
|
|
3635
|
+
for (const item of value) {
|
|
3636
|
+
const number = parseInt(item);
|
|
3637
|
+
const isNumber = 0 <= number && number <= 9;
|
|
3638
|
+
itemsRef.value.push({
|
|
3639
|
+
id: newId(),
|
|
3640
|
+
text: item,
|
|
3641
|
+
number: isNumber ? number : void 0
|
|
3642
|
+
});
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
if (isArrayNotEmpty(itemsRef.value) == true) ;
|
|
3646
|
+
}
|
|
3647
|
+
onMounted(() => {
|
|
3648
|
+
buildNumberItems();
|
|
3649
|
+
});
|
|
3650
|
+
return (_ctx, _cache) => {
|
|
3651
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
3652
|
+
return openBlock(), createElementBlock("span", {
|
|
3653
|
+
key: item.id,
|
|
3654
|
+
textContent: toDisplayString(item.text),
|
|
3655
|
+
class: normalizeClass(unref(isNullish)(item.number) ? "" : "number-item")
|
|
3656
|
+
}, null, 10, _hoisted_2$2);
|
|
3657
|
+
}), 128)), _cache[0] || (_cache[0] = createElementVNode("span", {
|
|
3658
|
+
style: {
|
|
3659
|
+
"color": "red"
|
|
3660
|
+
}
|
|
3661
|
+
}, "-----还没实现,别用", -1))]);
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3664
|
+
});
|
|
3665
|
+
|
|
3324
3666
|
function initStepByFormat(format) {
|
|
3325
3667
|
switch (format) {
|
|
3326
3668
|
case "yyyy":
|
|
@@ -3556,13 +3898,13 @@ var _sfc_main$4 = defineComponent({
|
|
|
3556
3898
|
}
|
|
3557
3899
|
onMounted(rebuildItems);
|
|
3558
3900
|
return (_ctx, _cache) => {
|
|
3559
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3901
|
+
return openBlock(), createBlock(_sfc_main$d, {
|
|
3560
3902
|
class: normalizeClass(["time-picker pc", {
|
|
3561
3903
|
"second-disabled": unref(format) != "HH:mm:ss"
|
|
3562
3904
|
}]),
|
|
3563
3905
|
mode: "vertical"
|
|
3564
3906
|
}, createSlots({
|
|
3565
|
-
main: withCtx(() => [createVNode(_sfc_main$
|
|
3907
|
+
main: withCtx(() => [createVNode(_sfc_main$u, {
|
|
3566
3908
|
multiple: "",
|
|
3567
3909
|
effect: unref(MOTION).top
|
|
3568
3910
|
}, {
|
|
@@ -3602,19 +3944,19 @@ var _sfc_main$4 = defineComponent({
|
|
|
3602
3944
|
_: 2
|
|
3603
3945
|
}, [__props.toolbarDisabled != true ? {
|
|
3604
3946
|
name: "bottom",
|
|
3605
|
-
fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3947
|
+
fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
3606
3948
|
key: 0,
|
|
3607
3949
|
type: "link",
|
|
3608
3950
|
size: "small",
|
|
3609
3951
|
textContent: "清空",
|
|
3610
3952
|
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
|
|
3611
|
-
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3953
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
3612
3954
|
key: 1,
|
|
3613
3955
|
type: "link",
|
|
3614
3956
|
size: "small",
|
|
3615
3957
|
textContent: "现在",
|
|
3616
3958
|
onClick: _cache[1] || (_cache[1] = $event => rebuildItems(unref(getTimeValue)(new Date())))
|
|
3617
|
-
})) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3959
|
+
})) : createCommentVNode("", true), createVNode(_sfc_main$D, {
|
|
3618
3960
|
type: "link",
|
|
3619
3961
|
size: "small",
|
|
3620
3962
|
textContent: "确定",
|
|
@@ -3856,7 +4198,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
3856
4198
|
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
3857
4199
|
buildPickerItems(stepRef.value, 0);
|
|
3858
4200
|
return (_ctx, _cache) => {
|
|
3859
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4201
|
+
return openBlock(), createBlock(_sfc_main$d, {
|
|
3860
4202
|
class: normalizeClass(["date-picker pc", {
|
|
3861
4203
|
"time-now": __props.pinned && __props.pinned.value == true
|
|
3862
4204
|
}]),
|
|
@@ -3868,8 +4210,9 @@ var _sfc_main$3 = defineComponent({
|
|
|
3868
4210
|
height: "30px"
|
|
3869
4211
|
}
|
|
3870
4212
|
}, createSlots({
|
|
3871
|
-
top: withCtx(() => [createVNode(_sfc_main$
|
|
4213
|
+
top: withCtx(() => [createVNode(_sfc_main$C, {
|
|
3872
4214
|
type: "arrow",
|
|
4215
|
+
button: "",
|
|
3873
4216
|
rotate: 180,
|
|
3874
4217
|
size: 26,
|
|
3875
4218
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
@@ -3887,8 +4230,9 @@ var _sfc_main$3 = defineComponent({
|
|
|
3887
4230
|
key: 0,
|
|
3888
4231
|
textContent: toDisplayString(`${dateRef.value.month}月`),
|
|
3889
4232
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
3890
|
-
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$
|
|
4233
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$C, {
|
|
3891
4234
|
type: "arrow",
|
|
4235
|
+
button: "",
|
|
3892
4236
|
size: 26,
|
|
3893
4237
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
3894
4238
|
})]),
|
|
@@ -3952,19 +4296,19 @@ var _sfc_main$3 = defineComponent({
|
|
|
3952
4296
|
onClick: onSelectTime
|
|
3953
4297
|
}, null, 10, _hoisted_8)) : createCommentVNode("", true), __props.toolbarDisabled != true ? (openBlock(), createElementBlock(Fragment, {
|
|
3954
4298
|
key: 1
|
|
3955
|
-
}, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
4299
|
+
}, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
3956
4300
|
key: 0,
|
|
3957
4301
|
type: "link",
|
|
3958
4302
|
size: "small",
|
|
3959
4303
|
textContent: "清空",
|
|
3960
4304
|
onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), unref(inPopup) && __props.closePopup("")))
|
|
3961
|
-
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
4305
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$D, {
|
|
3962
4306
|
key: 1,
|
|
3963
4307
|
type: "link",
|
|
3964
4308
|
size: "small",
|
|
3965
4309
|
textContent: "现在",
|
|
3966
4310
|
onClick: onNow
|
|
3967
|
-
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
4311
|
+
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$D, {
|
|
3968
4312
|
type: "link",
|
|
3969
4313
|
size: "small",
|
|
3970
4314
|
textContent: "确定",
|
|
@@ -4098,12 +4442,13 @@ var _sfc_main$2 = defineComponent({
|
|
|
4098
4442
|
type: "text",
|
|
4099
4443
|
readonly: "",
|
|
4100
4444
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4101
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$
|
|
4445
|
+
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
|
|
4102
4446
|
key: 0,
|
|
4103
4447
|
type: "datepicker",
|
|
4448
|
+
button: "",
|
|
4449
|
+
size: 16,
|
|
4104
4450
|
color: "#aeb6c2",
|
|
4105
|
-
"hover-color": "#279bf1"
|
|
4106
|
-
size: 16
|
|
4451
|
+
"hover-color": "#279bf1"
|
|
4107
4452
|
})) : createCommentVNode("", true)], 10, _hoisted_1$2);
|
|
4108
4453
|
};
|
|
4109
4454
|
}
|
|
@@ -4183,12 +4528,13 @@ var _sfc_main$1 = defineComponent({
|
|
|
4183
4528
|
type: "text",
|
|
4184
4529
|
readonly: "",
|
|
4185
4530
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4186
|
-
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$
|
|
4531
|
+
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$C, {
|
|
4187
4532
|
key: 0,
|
|
4188
4533
|
type: "timepicker",
|
|
4534
|
+
button: "",
|
|
4535
|
+
size: 20,
|
|
4189
4536
|
color: "#aeb6c2",
|
|
4190
|
-
"hover-color": "#279bf1"
|
|
4191
|
-
size: 20
|
|
4537
|
+
"hover-color": "#279bf1"
|
|
4192
4538
|
})) : createCommentVNode("", true)], 10, _hoisted_1$1);
|
|
4193
4539
|
};
|
|
4194
4540
|
}
|
|
@@ -4223,7 +4569,6 @@ var _sfc_main = defineComponent({
|
|
|
4223
4569
|
endX: 0,
|
|
4224
4570
|
distance: 0
|
|
4225
4571
|
});
|
|
4226
|
-
const towArrowIcon = getTwoArrowIconDraw();
|
|
4227
4572
|
function getMaxDistance() {
|
|
4228
4573
|
return dragHandleDom.value.parentElement.getBoundingClientRect().width - dragHandleDom.value.getBoundingClientRect().width;
|
|
4229
4574
|
}
|
|
@@ -4279,54 +4624,64 @@ var _sfc_main = defineComponent({
|
|
|
4279
4624
|
onTouchstart: onStartDrag,
|
|
4280
4625
|
onTouchmove: onDragMove,
|
|
4281
4626
|
onTouchend: onDragEnd
|
|
4282
|
-
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$
|
|
4627
|
+
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$C, {
|
|
4283
4628
|
key: 0,
|
|
4284
4629
|
type: "success",
|
|
4285
4630
|
size: 20,
|
|
4286
4631
|
color: "white"
|
|
4287
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
4632
|
+
})) : (openBlock(), createBlock(_sfc_main$C, {
|
|
4288
4633
|
key: 1,
|
|
4289
|
-
|
|
4634
|
+
custom: "",
|
|
4290
4635
|
size: 20,
|
|
4291
|
-
color: "#
|
|
4292
|
-
|
|
4293
|
-
|
|
4636
|
+
color: "#948d8d",
|
|
4637
|
+
style: {
|
|
4638
|
+
"cursor": "move"
|
|
4639
|
+
}
|
|
4640
|
+
}, {
|
|
4641
|
+
default: withCtx(() => [...(_cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
4642
|
+
d: "M759.467 533.333L469.333 243.2l29.867-29.867 320 320-320 320-29.867-29.866 290.134-290.134z m-298.667 0L170.667 243.2l29.866-29.867 320 320-320 320-29.866-29.866L460.8 533.333z"
|
|
4643
|
+
}, null, -1)]))]),
|
|
4644
|
+
_: 1
|
|
4645
|
+
}))], 36)], 2);
|
|
4294
4646
|
};
|
|
4295
4647
|
}
|
|
4296
4648
|
});
|
|
4297
4649
|
|
|
4298
4650
|
const components = {
|
|
4299
|
-
Button: _sfc_main$
|
|
4300
|
-
Choose: _sfc_main$
|
|
4301
|
-
Footer: _sfc_main$
|
|
4302
|
-
Header: _sfc_main$
|
|
4303
|
-
Icon: _sfc_main$
|
|
4304
|
-
Input: _sfc_main$
|
|
4305
|
-
Number: _sfc_main$
|
|
4306
|
-
Search: _sfc_main$
|
|
4307
|
-
Select: _sfc_main$
|
|
4308
|
-
Switch: _sfc_main$
|
|
4309
|
-
Textarea: _sfc_main$
|
|
4310
|
-
Dynamic: _sfc_main$
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4651
|
+
Button: _sfc_main$D,
|
|
4652
|
+
Choose: _sfc_main$B,
|
|
4653
|
+
Footer: _sfc_main$A,
|
|
4654
|
+
Header: _sfc_main$z,
|
|
4655
|
+
Icon: _sfc_main$C,
|
|
4656
|
+
Input: _sfc_main$y,
|
|
4657
|
+
Number: _sfc_main$x,
|
|
4658
|
+
Search: _sfc_main$w,
|
|
4659
|
+
Select: _sfc_main$k,
|
|
4660
|
+
Switch: _sfc_main$j,
|
|
4661
|
+
Textarea: _sfc_main$i,
|
|
4662
|
+
Dynamic: _sfc_main$s,
|
|
4663
|
+
Elastic: _sfc_main$h,
|
|
4664
|
+
Flex: _sfc_main$g,
|
|
4665
|
+
Fold: _sfc_main$f,
|
|
4666
|
+
Motion: _sfc_main$u,
|
|
4667
|
+
Layout: _sfc_main$d,
|
|
4668
|
+
Scroll: _sfc_main$e,
|
|
4669
|
+
Sort: _sfc_main$c,
|
|
4670
|
+
Table: _sfc_main$b,
|
|
4671
|
+
TableRow: _sfc_main$a,
|
|
4672
|
+
TableCol: _sfc_main$9,
|
|
4673
|
+
Tree: _sfc_main$7,
|
|
4674
|
+
Wrapper: _sfc_main$6,
|
|
4675
|
+
FlashNumber: _sfc_main$5,
|
|
4321
4676
|
DatePicker: _sfc_main$2,
|
|
4322
4677
|
TimePicker: _sfc_main$1,
|
|
4323
4678
|
DragVerify: _sfc_main,
|
|
4324
|
-
Empty: _sfc_main$
|
|
4325
|
-
Loading: _sfc_main$
|
|
4679
|
+
Empty: _sfc_main$n,
|
|
4680
|
+
Loading: _sfc_main$t
|
|
4326
4681
|
};
|
|
4327
4682
|
|
|
4328
4683
|
onMountScope(scope => {
|
|
4329
4684
|
getCurrentScope() && onScopeDispose(scope.destroy);
|
|
4330
4685
|
});
|
|
4331
4686
|
|
|
4332
|
-
export { MOTION, components,
|
|
4687
|
+
export { MOTION, components, getBuiltinIcon, mount, onAppCreated, triggerAppCreated, usePicker, usePopup, useReactive, useTreeContext };
|