snail.vue 2.0.11 → 2.0.12
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 +141 -40
- package/dist/snail.vue.js +841 -355
- package/dist/snail.vue.umd.js +839 -353
- package/dist/styles/snail.vue.vue.css +24 -22
- package/package.json +2 -2
package/dist/snail.vue.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, normalizeStyle, createElementVNode, toDisplayString, Fragment, renderList, unref, mergeModels, useModel, computed, createCommentVNode, createBlock, nextTick, onMounted, onUnmounted, useTemplateRef, createVNode, watch, withDirectives, isRef, vModelText, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, withModifiers, getCurrentInstance, resolveComponent, onBeforeUnmount, TransitionGroup, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
|
-
import { throwError, isArrayNotEmpty, isStringNotEmpty, useKey, isArray, useTimer, newId, script, isFunction, getFromArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isObject, isNumberNotNaN, hasAny, mustFunction, useScope, removeFromArray, mustObject, delay, defer, useAsyncScope, useHook, throwIfTrue,
|
|
4
|
-
import {
|
|
3
|
+
import { throwError, isArrayNotEmpty, isStringNotEmpty, useKey, isArray, useTimer, newId, script, isFunction, getFromArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isObject, isNumberNotNaN, hasAny, mustFunction, useScope, removeFromArray, mustObject, delay, defer, useAsyncScope, useHook, throwIfTrue, correctTimeValue, getDateValue, formatDateValue, parseTimeValue, getTimeValue, padStart, formatTimeValue, parseDateValue, correctDateFormat, getDateByValue, correctNumber, onMountScope } from 'snail.core';
|
|
4
|
+
import { css, link, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1$
|
|
7
|
-
var _sfc_main$
|
|
6
|
+
const _hoisted_1$k = ["title"];
|
|
7
|
+
var _sfc_main$z = defineComponent({
|
|
8
8
|
...{
|
|
9
9
|
name: "Button",
|
|
10
10
|
inheritAttrs: true
|
|
@@ -20,15 +20,11 @@ var _sfc_main$y = 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$k);
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
var addLink = href => setTimeout(link.register, 0, href);
|
|
29
|
-
|
|
30
|
-
addLink("/styles/snail.vue.vue.css");
|
|
31
|
-
|
|
32
28
|
function getSvgDraw(iconType, draw) {
|
|
33
29
|
switch (iconType) {
|
|
34
30
|
case "success":
|
|
@@ -67,10 +63,10 @@ function getSvgDraw(iconType, draw) {
|
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
|
|
70
|
-
const _hoisted_1$
|
|
71
|
-
const _hoisted_2$
|
|
72
|
-
const _hoisted_3$
|
|
73
|
-
var _sfc_main$
|
|
66
|
+
const _hoisted_1$j = ["width", "height"];
|
|
67
|
+
const _hoisted_2$c = ["textContent"];
|
|
68
|
+
const _hoisted_3$a = ["fill", "stroke", "stroke-width", "d"];
|
|
69
|
+
var _sfc_main$y = defineComponent({
|
|
74
70
|
...{
|
|
75
71
|
name: "Icon",
|
|
76
72
|
inheritAttrs: true
|
|
@@ -100,23 +96,23 @@ var _sfc_main$x = defineComponent({
|
|
|
100
96
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
101
97
|
}, [createElementVNode("title", {
|
|
102
98
|
textContent: toDisplayString(__props.title || "")
|
|
103
|
-
}, null, 8, _hoisted_2$
|
|
99
|
+
}, null, 8, _hoisted_2$c), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSvgDraw)(__props.type, __props.draw), d => {
|
|
104
100
|
return openBlock(), createElementBlock("path", {
|
|
105
101
|
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
106
102
|
stroke: __props.stroke,
|
|
107
103
|
"stroke-width": __props.strokeWidth,
|
|
108
104
|
d
|
|
109
|
-
}, null, 8, _hoisted_3$
|
|
110
|
-
}), 256))], 46, _hoisted_1$
|
|
105
|
+
}, null, 8, _hoisted_3$a);
|
|
106
|
+
}), 256))], 46, _hoisted_1$j);
|
|
111
107
|
};
|
|
112
108
|
}
|
|
113
109
|
});
|
|
114
110
|
|
|
115
|
-
const _hoisted_1$
|
|
116
|
-
const _hoisted_2$
|
|
117
|
-
const _hoisted_3$
|
|
118
|
-
const _hoisted_4$
|
|
119
|
-
var _sfc_main$
|
|
111
|
+
const _hoisted_1$i = ["title", "onClick"];
|
|
112
|
+
const _hoisted_2$b = ["type", "checked"];
|
|
113
|
+
const _hoisted_3$9 = ["textContent"];
|
|
114
|
+
const _hoisted_4$7 = ["textContent"];
|
|
115
|
+
var _sfc_main$x = defineComponent({
|
|
120
116
|
...{
|
|
121
117
|
name: "Choose",
|
|
122
118
|
inheritAttrs: true
|
|
@@ -192,10 +188,10 @@ var _sfc_main$w = defineComponent({
|
|
|
192
188
|
key: 0,
|
|
193
189
|
type: unref(type),
|
|
194
190
|
checked: node.selected
|
|
195
|
-
}, null, 8, _hoisted_2$
|
|
191
|
+
}, null, 8, _hoisted_2$b)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
196
192
|
key: 1,
|
|
197
193
|
class: normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
198
|
-
}, [node.selected ? (openBlock(), createBlock(_sfc_main$
|
|
194
|
+
}, [node.selected ? (openBlock(), createBlock(_sfc_main$y, {
|
|
199
195
|
key: 0,
|
|
200
196
|
type: "success",
|
|
201
197
|
size: 12,
|
|
@@ -204,18 +200,22 @@ var _sfc_main$w = defineComponent({
|
|
|
204
200
|
key: 2,
|
|
205
201
|
class: "item-text",
|
|
206
202
|
textContent: toDisplayString(node.item.text)
|
|
207
|
-
}, null, 8, _hoisted_3$
|
|
203
|
+
}, null, 8, _hoisted_3$9)) : createCommentVNode("", true), node.item.description ? (openBlock(), createElementBlock("span", {
|
|
208
204
|
key: 3,
|
|
209
205
|
class: "item-des",
|
|
210
206
|
textContent: toDisplayString(node.item.description)
|
|
211
|
-
}, null, 8, _hoisted_4$
|
|
207
|
+
}, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$i);
|
|
212
208
|
}), 128))], 2);
|
|
213
209
|
};
|
|
214
210
|
}
|
|
215
211
|
});
|
|
216
212
|
|
|
217
|
-
|
|
218
|
-
|
|
213
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
214
|
+
|
|
215
|
+
addLink("/styles/snail.vue.vue.css");
|
|
216
|
+
|
|
217
|
+
const _hoisted_1$h = ["id"];
|
|
218
|
+
var _sfc_main$w = defineComponent({
|
|
219
219
|
__name: "datepicker",
|
|
220
220
|
props: {
|
|
221
221
|
type: {},
|
|
@@ -366,12 +366,12 @@ var _sfc_main$v = defineComponent({
|
|
|
366
366
|
class: "snail-datepicker",
|
|
367
367
|
id: unref(id),
|
|
368
368
|
onClick
|
|
369
|
-
}, null, 8, _hoisted_1$
|
|
369
|
+
}, null, 8, _hoisted_1$h);
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
373
|
|
|
374
|
-
var _sfc_main$
|
|
374
|
+
var _sfc_main$v = defineComponent({
|
|
375
375
|
...{
|
|
376
376
|
name: "Footer",
|
|
377
377
|
inheritAttrs: true
|
|
@@ -402,13 +402,13 @@ var _sfc_main$u = defineComponent({
|
|
|
402
402
|
class: normalizeClass(["snail-footer", {
|
|
403
403
|
"start-divider": __props.divider
|
|
404
404
|
}, __props.align || "right"])
|
|
405
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
405
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
406
406
|
key: 0,
|
|
407
407
|
size: "max",
|
|
408
408
|
type: "default",
|
|
409
409
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
410
410
|
textContent: toDisplayString(__props.cancelName || "取消")
|
|
411
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
411
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
412
412
|
key: 1,
|
|
413
413
|
size: "max",
|
|
414
414
|
type: "primary",
|
|
@@ -419,8 +419,8 @@ var _sfc_main$u = defineComponent({
|
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
421
|
|
|
422
|
-
const _hoisted_1$
|
|
423
|
-
var _sfc_main$
|
|
422
|
+
const _hoisted_1$g = ["textContent"];
|
|
423
|
+
var _sfc_main$u = defineComponent({
|
|
424
424
|
...{
|
|
425
425
|
name: "Header",
|
|
426
426
|
inheritAttrs: true
|
|
@@ -459,7 +459,7 @@ var _sfc_main$t = defineComponent({
|
|
|
459
459
|
key: 0,
|
|
460
460
|
textContent: toDisplayString(__props.title),
|
|
461
461
|
class: normalizeClass(["header-title", __props.titleAlign])
|
|
462
|
-
}, null, 10, _hoisted_1$
|
|
462
|
+
}, null, 10, _hoisted_1$g)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$y, {
|
|
463
463
|
key: 1,
|
|
464
464
|
type: "close",
|
|
465
465
|
size: 22,
|
|
@@ -471,18 +471,18 @@ var _sfc_main$t = defineComponent({
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
|
|
474
|
-
const _hoisted_1$
|
|
475
|
-
const _hoisted_2$
|
|
474
|
+
const _hoisted_1$f = ["textContent"];
|
|
475
|
+
const _hoisted_2$a = {
|
|
476
476
|
key: 0,
|
|
477
477
|
class: "required",
|
|
478
478
|
textContent: "*"
|
|
479
479
|
};
|
|
480
|
-
const _hoisted_3$
|
|
480
|
+
const _hoisted_3$8 = {
|
|
481
481
|
class: "input-body"
|
|
482
482
|
};
|
|
483
|
-
const _hoisted_4$
|
|
484
|
-
const _hoisted_5$
|
|
485
|
-
var _sfc_main$
|
|
483
|
+
const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
|
|
484
|
+
const _hoisted_5$4 = ["title"];
|
|
485
|
+
var _sfc_main$t = defineComponent({
|
|
486
486
|
...{
|
|
487
487
|
name: "Input",
|
|
488
488
|
inheritAttrs: true
|
|
@@ -534,7 +534,7 @@ var _sfc_main$s = defineComponent({
|
|
|
534
534
|
}, [createElementVNode("span", {
|
|
535
535
|
class: "text",
|
|
536
536
|
textContent: toDisplayString(__props.title)
|
|
537
|
-
}, null, 8, _hoisted_1$
|
|
537
|
+
}, null, 8, _hoisted_1$f), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$a)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$8, [createElementVNode("input", {
|
|
538
538
|
ref: "input-el",
|
|
539
539
|
type: __props.type || "text",
|
|
540
540
|
value: inputModel.value,
|
|
@@ -543,15 +543,15 @@ var _sfc_main$s = defineComponent({
|
|
|
543
543
|
title: inputModel.value,
|
|
544
544
|
onChange: onValueChange,
|
|
545
545
|
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
546
|
-
}, null, 40, _hoisted_4$
|
|
546
|
+
}, null, 40, _hoisted_4$6), !!validateRef.value ? (openBlock(), createElementBlock("span", {
|
|
547
547
|
key: 0,
|
|
548
548
|
class: "validate",
|
|
549
549
|
title: validateRef.value
|
|
550
|
-
}, [createVNode(_sfc_main$
|
|
550
|
+
}, [createVNode(_sfc_main$y, {
|
|
551
551
|
type: "error",
|
|
552
552
|
size: 16,
|
|
553
553
|
color: "red"
|
|
554
|
-
})], 8, _hoisted_5$
|
|
554
|
+
})], 8, _hoisted_5$4)) : createCommentVNode("", true)])], 2);
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
557
|
});
|
|
@@ -756,20 +756,20 @@ function useFormatter(options) {
|
|
|
756
756
|
return formatter;
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
-
const _hoisted_1$
|
|
759
|
+
const _hoisted_1$e = {
|
|
760
760
|
key: 0,
|
|
761
761
|
class: "number-prefix"
|
|
762
762
|
};
|
|
763
|
-
const _hoisted_2$
|
|
764
|
-
const _hoisted_3$
|
|
765
|
-
const _hoisted_4$
|
|
763
|
+
const _hoisted_2$9 = ["textContent"];
|
|
764
|
+
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
765
|
+
const _hoisted_4$5 = {
|
|
766
766
|
key: 1,
|
|
767
767
|
class: "number-suffix"
|
|
768
768
|
};
|
|
769
|
-
const _hoisted_5$
|
|
770
|
-
const _hoisted_6$
|
|
771
|
-
const _hoisted_7 = ["title", "textContent"];
|
|
772
|
-
var _sfc_main$
|
|
769
|
+
const _hoisted_5$3 = ["textContent"];
|
|
770
|
+
const _hoisted_6$2 = ["title", "textContent"];
|
|
771
|
+
const _hoisted_7$1 = ["title", "textContent"];
|
|
772
|
+
var _sfc_main$s = defineComponent({
|
|
773
773
|
__name: "number",
|
|
774
774
|
props: mergeModels({
|
|
775
775
|
placeholder: {},
|
|
@@ -916,10 +916,10 @@ var _sfc_main$r = defineComponent({
|
|
|
916
916
|
"has-prefix": unref(hasPrefix),
|
|
917
917
|
"has-suffix": unref(hasSuffix)
|
|
918
918
|
}])
|
|
919
|
-
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
919
|
+
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$e, [createElementVNode("span", {
|
|
920
920
|
class: "ellipsis",
|
|
921
921
|
textContent: toDisplayString(unref(prefix))
|
|
922
|
-
}, null, 8, _hoisted_2$
|
|
922
|
+
}, null, 8, _hoisted_2$9)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
923
923
|
class: normalizeClass(["input-panel", unref(controls)])
|
|
924
924
|
}, [withDirectives(createElementVNode("input", {
|
|
925
925
|
type: "text",
|
|
@@ -931,18 +931,18 @@ var _sfc_main$r = defineComponent({
|
|
|
931
931
|
onFocus: _cache[1] || (_cache[1] = $event => isRef(needBackSection) ? needBackSection.value = true : needBackSection = true),
|
|
932
932
|
onPaste: _cache[2] || (_cache[2] = $event => isRef(needBackSection) ? needBackSection.value = false : needBackSection = false),
|
|
933
933
|
onBlur: _cache[3] || (_cache[3] = $event => formatOnEnd(true))
|
|
934
|
-
}, null, 40, _hoisted_3$
|
|
934
|
+
}, null, 40, _hoisted_3$7), [[vModelText, displayValueRef.value]]), unref(controls) == "default" ? (openBlock(), createElementBlock(Fragment, {
|
|
935
935
|
key: 0
|
|
936
936
|
}, [createElementVNode("div", {
|
|
937
937
|
class: "controls default subtract",
|
|
938
938
|
onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
|
|
939
|
-
}, [createVNode(_sfc_main$
|
|
939
|
+
}, [createVNode(_sfc_main$y, {
|
|
940
940
|
type: "subtract",
|
|
941
941
|
size: 20
|
|
942
942
|
})]), createElementVNode("div", {
|
|
943
943
|
class: "controls default plus",
|
|
944
944
|
onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
|
|
945
|
-
}, [createVNode(_sfc_main$
|
|
945
|
+
}, [createVNode(_sfc_main$y, {
|
|
946
946
|
type: "plus",
|
|
947
947
|
size: 20
|
|
948
948
|
})])], 64)) : unref(controls) == "right" ? (openBlock(), createElementBlock(Fragment, {
|
|
@@ -950,38 +950,38 @@ var _sfc_main$r = defineComponent({
|
|
|
950
950
|
}, [createElementVNode("div", {
|
|
951
951
|
class: "controls right plus",
|
|
952
952
|
onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
|
|
953
|
-
}, [createVNode(_sfc_main$
|
|
953
|
+
}, [createVNode(_sfc_main$y, {
|
|
954
954
|
type: "arrow",
|
|
955
955
|
size: 20,
|
|
956
956
|
rotate: 270
|
|
957
957
|
})]), createElementVNode("div", {
|
|
958
958
|
class: "controls right subtract",
|
|
959
959
|
onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
|
|
960
|
-
}, [createVNode(_sfc_main$
|
|
960
|
+
}, [createVNode(_sfc_main$y, {
|
|
961
961
|
type: "arrow",
|
|
962
962
|
size: 20,
|
|
963
963
|
rotate: 90
|
|
964
|
-
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
964
|
+
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createElementVNode("span", {
|
|
965
965
|
class: "ellipsis",
|
|
966
966
|
textContent: toDisplayString(unref(suffix))
|
|
967
|
-
}, null, 8, _hoisted_5$
|
|
967
|
+
}, null, 8, _hoisted_5$3)])) : createCommentVNode("", true), unref(upper) ? (openBlock(), createElementBlock("div", {
|
|
968
968
|
key: 2,
|
|
969
969
|
class: "number-util ellipsis",
|
|
970
970
|
title: upperTextRef.value,
|
|
971
971
|
textContent: toDisplayString(`大写:${upperTextRef.value || ""}`)
|
|
972
|
-
}, null, 8, _hoisted_6$
|
|
972
|
+
}, null, 8, _hoisted_6$2)) : createCommentVNode("", true), unref(thousands) == "below" ? (openBlock(), createElementBlock("div", {
|
|
973
973
|
key: 3,
|
|
974
974
|
class: "number-util ellipsis",
|
|
975
975
|
title: thousandsTextRef.value,
|
|
976
976
|
textContent: toDisplayString(`千分位:${thousandsTextRef.value || ""}`)
|
|
977
|
-
}, null, 8, _hoisted_7)) : createCommentVNode("", true)], 2);
|
|
977
|
+
}, null, 8, _hoisted_7$1)) : createCommentVNode("", true)], 2);
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
980
|
});
|
|
981
981
|
|
|
982
|
-
const _hoisted_1$
|
|
982
|
+
const _hoisted_1$d = ["placeholder", "readonly"];
|
|
983
983
|
const searchIon = "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";
|
|
984
|
-
var _sfc_main$
|
|
984
|
+
var _sfc_main$r = defineComponent({
|
|
985
985
|
...{
|
|
986
986
|
name: "Search",
|
|
987
987
|
inheritAttrs: true
|
|
@@ -1026,9 +1026,9 @@ var _sfc_main$q = defineComponent({
|
|
|
1026
1026
|
readonly: __props.readonly,
|
|
1027
1027
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
1028
1028
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
1029
|
-
}, null, 40, _hoisted_1$
|
|
1029
|
+
}, null, 40, _hoisted_1$d), [[vModelText, textModel.value, void 0, {
|
|
1030
1030
|
trim: true
|
|
1031
|
-
}]]), createElementVNode("div", null, [createVNode(_sfc_main$
|
|
1031
|
+
}]]), createElementVNode("div", null, [createVNode(_sfc_main$y, {
|
|
1032
1032
|
class: "search-button",
|
|
1033
1033
|
type: "custom",
|
|
1034
1034
|
draw: searchIon,
|
|
@@ -1249,11 +1249,11 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
|
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
|
-
const _hoisted_1$
|
|
1252
|
+
const _hoisted_1$c = {
|
|
1253
1253
|
class: "snail-confirm flex-column"
|
|
1254
1254
|
};
|
|
1255
|
-
const _hoisted_2$
|
|
1256
|
-
var _sfc_main$
|
|
1255
|
+
const _hoisted_2$8 = ["innerHTML"];
|
|
1256
|
+
var _sfc_main$q = defineComponent({
|
|
1257
1257
|
...{
|
|
1258
1258
|
name: "ConfirmContainer",
|
|
1259
1259
|
inheritAttrs: true
|
|
@@ -1281,14 +1281,14 @@ var _sfc_main$p = defineComponent({
|
|
|
1281
1281
|
},
|
|
1282
1282
|
setup(__props) {
|
|
1283
1283
|
return (_ctx, _cache) => {
|
|
1284
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1284
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [createVNode(_sfc_main$u, {
|
|
1285
1285
|
"use-to": "dialog",
|
|
1286
1286
|
title: __props.title || "提示",
|
|
1287
1287
|
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
1288
1288
|
}, null, 8, ["title"]), createElementVNode("div", {
|
|
1289
1289
|
class: "confirm-body",
|
|
1290
1290
|
innerHTML: __props.message || "请确认?"
|
|
1291
|
-
}, null, 8, _hoisted_2$
|
|
1291
|
+
}, null, 8, _hoisted_2$8), createVNode(_sfc_main$v, {
|
|
1292
1292
|
align: "right",
|
|
1293
1293
|
"cancel-name": __props.cancelName,
|
|
1294
1294
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1301,7 +1301,7 @@ var _sfc_main$p = defineComponent({
|
|
|
1301
1301
|
}
|
|
1302
1302
|
});
|
|
1303
1303
|
|
|
1304
|
-
var _sfc_main$
|
|
1304
|
+
var _sfc_main$p = defineComponent({
|
|
1305
1305
|
...{
|
|
1306
1306
|
name: "Loading",
|
|
1307
1307
|
inheritAttrs: true
|
|
@@ -1340,7 +1340,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1340
1340
|
}
|
|
1341
1341
|
});
|
|
1342
1342
|
|
|
1343
|
-
var _sfc_main$
|
|
1343
|
+
var _sfc_main$o = defineComponent({
|
|
1344
1344
|
...{
|
|
1345
1345
|
name: "Dynamic",
|
|
1346
1346
|
inheritAttrs: false
|
|
@@ -1364,7 +1364,7 @@ var _sfc_main$n = defineComponent({
|
|
|
1364
1364
|
const loadingComponent = defineComponent({
|
|
1365
1365
|
inheritAttrs: false,
|
|
1366
1366
|
components: {
|
|
1367
|
-
Loading: _sfc_main$
|
|
1367
|
+
Loading: _sfc_main$p
|
|
1368
1368
|
},
|
|
1369
1369
|
template: "<Loading :mask-disabled='true' />"
|
|
1370
1370
|
});
|
|
@@ -1431,7 +1431,7 @@ var _sfc_main$n = defineComponent({
|
|
|
1431
1431
|
}
|
|
1432
1432
|
});
|
|
1433
1433
|
|
|
1434
|
-
var _sfc_main$
|
|
1434
|
+
var _sfc_main$n = defineComponent({
|
|
1435
1435
|
...{
|
|
1436
1436
|
name: "DialogContainer",
|
|
1437
1437
|
inheritAttrs: true
|
|
@@ -1476,7 +1476,7 @@ var _sfc_main$m = defineComponent({
|
|
|
1476
1476
|
onClick: _cache[1] || (_cache[1] = withModifiers($event => {
|
|
1477
1477
|
__props.options.closeOnMask && unref(closePopup)();
|
|
1478
1478
|
}, ["self"]))
|
|
1479
|
-
}, [createVNode(_sfc_main$
|
|
1479
|
+
}, [createVNode(_sfc_main$o, mergeProps({
|
|
1480
1480
|
class: "dialog-body",
|
|
1481
1481
|
name: __props.options.name,
|
|
1482
1482
|
component: __props.options.component,
|
|
@@ -1491,7 +1491,7 @@ var _sfc_main$m = defineComponent({
|
|
|
1491
1491
|
}
|
|
1492
1492
|
});
|
|
1493
1493
|
|
|
1494
|
-
var _sfc_main$
|
|
1494
|
+
var _sfc_main$m = defineComponent({
|
|
1495
1495
|
...{
|
|
1496
1496
|
name: "FollowContainer",
|
|
1497
1497
|
inheritAttrs: true
|
|
@@ -1612,7 +1612,7 @@ var _sfc_main$l = defineComponent({
|
|
|
1612
1612
|
});
|
|
1613
1613
|
});
|
|
1614
1614
|
return (_ctx, _cache) => {
|
|
1615
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1615
|
+
return openBlock(), createBlock(_sfc_main$o, mergeProps({
|
|
1616
1616
|
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1617
1617
|
style: {
|
|
1618
1618
|
"z-index": __props.zIndex
|
|
@@ -1629,7 +1629,7 @@ var _sfc_main$l = defineComponent({
|
|
|
1629
1629
|
}
|
|
1630
1630
|
});
|
|
1631
1631
|
|
|
1632
|
-
var _sfc_main$
|
|
1632
|
+
var _sfc_main$l = defineComponent({
|
|
1633
1633
|
...{
|
|
1634
1634
|
name: "PopupContainer",
|
|
1635
1635
|
inheritAttrs: true
|
|
@@ -1649,7 +1649,7 @@ var _sfc_main$k = defineComponent({
|
|
|
1649
1649
|
model = shallowRef(void 0)
|
|
1650
1650
|
} = __props.options;
|
|
1651
1651
|
return (_ctx, _cache) => {
|
|
1652
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1652
|
+
return openBlock(), createBlock(_sfc_main$o, mergeProps({
|
|
1653
1653
|
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1654
1654
|
style: {
|
|
1655
1655
|
"z-index": __props.zIndex
|
|
@@ -1667,12 +1667,12 @@ var _sfc_main$k = defineComponent({
|
|
|
1667
1667
|
}
|
|
1668
1668
|
});
|
|
1669
1669
|
|
|
1670
|
-
const _hoisted_1$
|
|
1670
|
+
const _hoisted_1$b = {
|
|
1671
1671
|
key: 1,
|
|
1672
1672
|
class: "icon"
|
|
1673
1673
|
};
|
|
1674
|
-
const _hoisted_2$
|
|
1675
|
-
var _sfc_main$
|
|
1674
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
1675
|
+
var _sfc_main$k = defineComponent({
|
|
1676
1676
|
...{
|
|
1677
1677
|
name: "ToastContainer",
|
|
1678
1678
|
inheritAttrs: true
|
|
@@ -1710,7 +1710,7 @@ var _sfc_main$j = defineComponent({
|
|
|
1710
1710
|
}),
|
|
1711
1711
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1712
1712
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1713
|
-
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
1713
|
+
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$y, {
|
|
1714
1714
|
key: 0,
|
|
1715
1715
|
class: "close-icon",
|
|
1716
1716
|
type: "close",
|
|
@@ -1721,21 +1721,21 @@ var _sfc_main$j = defineComponent({
|
|
|
1721
1721
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1722
1722
|
unref(closePopup)();
|
|
1723
1723
|
})
|
|
1724
|
-
}, null, 8, ["fill"])) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1724
|
+
}, null, 8, ["fill"])) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$b, [createVNode(_sfc_main$y, {
|
|
1725
1725
|
type: unref(props).type,
|
|
1726
1726
|
fill: "#707070",
|
|
1727
1727
|
size: 20
|
|
1728
1728
|
}, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
|
|
1729
1729
|
class: "message",
|
|
1730
1730
|
innerHTML: unref(props).message
|
|
1731
|
-
}, null, 8, _hoisted_2$
|
|
1731
|
+
}, null, 8, _hoisted_2$7)], 38);
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
1734
|
});
|
|
1735
1735
|
|
|
1736
1736
|
function usePopup() {
|
|
1737
1737
|
function popup(options) {
|
|
1738
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1738
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$l, options);
|
|
1739
1739
|
return addScope2Scopes(scope);
|
|
1740
1740
|
}
|
|
1741
1741
|
function dialog(options) {
|
|
@@ -1768,7 +1768,7 @@ function usePopup() {
|
|
|
1768
1768
|
},
|
|
1769
1769
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1770
1770
|
});
|
|
1771
|
-
const descriptor = openPopup(_sfc_main$
|
|
1771
|
+
const descriptor = openPopup(_sfc_main$n, options, extOptions);
|
|
1772
1772
|
scope = useAsyncScope(deferred.promise);
|
|
1773
1773
|
monitorDialog(descriptor, scope, deferred);
|
|
1774
1774
|
}
|
|
@@ -1786,14 +1786,14 @@ function usePopup() {
|
|
|
1786
1786
|
inPopup: "follow",
|
|
1787
1787
|
target
|
|
1788
1788
|
};
|
|
1789
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1789
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$m, options, extOptions);
|
|
1790
1790
|
}
|
|
1791
1791
|
return addScope2Scopes(scope);
|
|
1792
1792
|
}
|
|
1793
1793
|
function confirm(title, message, options) {
|
|
1794
1794
|
options = options || Object.create(null);
|
|
1795
1795
|
return dialog({
|
|
1796
|
-
component: _sfc_main$
|
|
1796
|
+
component: _sfc_main$q,
|
|
1797
1797
|
closeOnEscape: true,
|
|
1798
1798
|
props: {
|
|
1799
1799
|
...options,
|
|
@@ -1803,7 +1803,7 @@ function usePopup() {
|
|
|
1803
1803
|
});
|
|
1804
1804
|
}
|
|
1805
1805
|
function toast(type, message, options) {
|
|
1806
|
-
return popupInCustomContainer(_sfc_main$
|
|
1806
|
+
return popupInCustomContainer(_sfc_main$k, {
|
|
1807
1807
|
url: "#ToastContainer",
|
|
1808
1808
|
props: {
|
|
1809
1809
|
...(options || Object.create(null)),
|
|
@@ -1836,7 +1836,7 @@ function usePopup() {
|
|
|
1836
1836
|
},
|
|
1837
1837
|
...extOptions
|
|
1838
1838
|
});
|
|
1839
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1839
|
+
const descriptor = openPopup(container || _sfc_main$l, options, extOptions);
|
|
1840
1840
|
const scope = useAsyncScope(deferred.promise);
|
|
1841
1841
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1842
1842
|
return scope;
|
|
@@ -1974,12 +1974,12 @@ function getNoDataBase64Image() {
|
|
|
1974
1974
|
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==";
|
|
1975
1975
|
}
|
|
1976
1976
|
|
|
1977
|
-
const _hoisted_1$
|
|
1977
|
+
const _hoisted_1$a = {
|
|
1978
1978
|
class: "snail-empty"
|
|
1979
1979
|
};
|
|
1980
|
-
const _hoisted_2$
|
|
1981
|
-
const _hoisted_3$
|
|
1982
|
-
var _sfc_main$
|
|
1980
|
+
const _hoisted_2$6 = ["src"];
|
|
1981
|
+
const _hoisted_3$6 = ["textContent"];
|
|
1982
|
+
var _sfc_main$j = defineComponent({
|
|
1983
1983
|
...{
|
|
1984
1984
|
name: "Empty",
|
|
1985
1985
|
inheritAttrs: true
|
|
@@ -1992,23 +1992,23 @@ var _sfc_main$i = defineComponent({
|
|
|
1992
1992
|
setup(__props) {
|
|
1993
1993
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1994
1994
|
return (_ctx, _cache) => {
|
|
1995
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1995
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("img", {
|
|
1996
1996
|
src: __props.imageUrl || unref(defaultImageBase64)
|
|
1997
|
-
}, null, 8, _hoisted_2$
|
|
1997
|
+
}, null, 8, _hoisted_2$6), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
|
|
1998
1998
|
class: "message",
|
|
1999
1999
|
textContent: toDisplayString(__props.message || "无数据")
|
|
2000
|
-
}, null, 8, _hoisted_3$
|
|
2000
|
+
}, null, 8, _hoisted_3$6)])]);
|
|
2001
2001
|
};
|
|
2002
2002
|
}
|
|
2003
2003
|
});
|
|
2004
2004
|
|
|
2005
|
-
const _hoisted_1$
|
|
2006
|
-
const _hoisted_2$
|
|
2007
|
-
const _hoisted_3$
|
|
2005
|
+
const _hoisted_1$9 = ["title"];
|
|
2006
|
+
const _hoisted_2$5 = ["textContent"];
|
|
2007
|
+
const _hoisted_3$5 = {
|
|
2008
2008
|
key: 1,
|
|
2009
2009
|
class: "select-status"
|
|
2010
2010
|
};
|
|
2011
|
-
var _sfc_main$
|
|
2011
|
+
var _sfc_main$i = defineComponent({
|
|
2012
2012
|
...{
|
|
2013
2013
|
name: "SelectNode",
|
|
2014
2014
|
inheritAttrs: true
|
|
@@ -2053,15 +2053,15 @@ var _sfc_main$h = defineComponent({
|
|
|
2053
2053
|
}, [createElementVNode("div", {
|
|
2054
2054
|
class: "item-text ellipsis",
|
|
2055
2055
|
textContent: toDisplayString(__props.item.text)
|
|
2056
|
-
}, null, 8, _hoisted_2$
|
|
2056
|
+
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$y, {
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
type: "arrow",
|
|
2059
2059
|
color: "#8a9099"
|
|
2060
|
-
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2060
|
+
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$y, {
|
|
2061
2061
|
type: "success",
|
|
2062
2062
|
color: "white",
|
|
2063
2063
|
size: 12
|
|
2064
|
-
})])) : createCommentVNode("", true)], 42, _hoisted_1$
|
|
2064
|
+
})])) : createCommentVNode("", true)], 42, _hoisted_1$9)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
|
|
2065
2065
|
key: 1
|
|
2066
2066
|
}, renderList(unref(showChildrenRef), child => {
|
|
2067
2067
|
return openBlock(), createBlock(_component_SelectNode, {
|
|
@@ -2078,7 +2078,7 @@ var _sfc_main$h = defineComponent({
|
|
|
2078
2078
|
}
|
|
2079
2079
|
});
|
|
2080
2080
|
|
|
2081
|
-
var _sfc_main$
|
|
2081
|
+
var _sfc_main$h = defineComponent({
|
|
2082
2082
|
...{
|
|
2083
2083
|
name: "Select2Popup",
|
|
2084
2084
|
inheritAttrs: true
|
|
@@ -2250,13 +2250,13 @@ var _sfc_main$g = defineComponent({
|
|
|
2250
2250
|
key: 0
|
|
2251
2251
|
}, [createTextVNode(" 暂无选项 ")], 64)) : (openBlock(), createElementBlock(Fragment, {
|
|
2252
2252
|
key: 1
|
|
2253
|
-
}, [__props.search ? (openBlock(), createBlock(_sfc_main$
|
|
2253
|
+
}, [__props.search ? (openBlock(), createBlock(_sfc_main$r, mergeProps({
|
|
2254
2254
|
key: 0
|
|
2255
2255
|
}, __props.search, {
|
|
2256
2256
|
onSearch,
|
|
2257
2257
|
key: "select-search"
|
|
2258
2258
|
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
2259
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2259
|
+
return openBlock(), createBlock(_sfc_main$i, {
|
|
2260
2260
|
key: unref(context).getKey(item),
|
|
2261
2261
|
multiple: __props.multiple,
|
|
2262
2262
|
item,
|
|
@@ -2265,7 +2265,7 @@ var _sfc_main$g = defineComponent({
|
|
|
2265
2265
|
onEnter: onEnterSelectNode,
|
|
2266
2266
|
onClick: onClickSelectNode
|
|
2267
2267
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2268
|
-
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2268
|
+
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$j, {
|
|
2269
2269
|
key: 1,
|
|
2270
2270
|
message: "无结果"
|
|
2271
2271
|
})) : createCommentVNode("", true), showClearButtonRef.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -2277,20 +2277,20 @@ var _sfc_main$g = defineComponent({
|
|
|
2277
2277
|
}
|
|
2278
2278
|
});
|
|
2279
2279
|
|
|
2280
|
-
const _hoisted_1$
|
|
2280
|
+
const _hoisted_1$8 = {
|
|
2281
2281
|
key: 0,
|
|
2282
2282
|
class: "select-result"
|
|
2283
2283
|
};
|
|
2284
|
-
const _hoisted_2$
|
|
2285
|
-
const _hoisted_3$
|
|
2286
|
-
const _hoisted_4$
|
|
2284
|
+
const _hoisted_2$4 = ["title", "textContent"];
|
|
2285
|
+
const _hoisted_3$4 = ["textContent"];
|
|
2286
|
+
const _hoisted_4$4 = {
|
|
2287
2287
|
key: 1,
|
|
2288
2288
|
class: "placeholder"
|
|
2289
2289
|
};
|
|
2290
2290
|
onAppCreated((app, type) => {
|
|
2291
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2291
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$h);
|
|
2292
2292
|
});
|
|
2293
|
-
var _sfc_main$
|
|
2293
|
+
var _sfc_main$g = defineComponent({
|
|
2294
2294
|
...{
|
|
2295
2295
|
name: "Select",
|
|
2296
2296
|
inheritAttrs: true
|
|
@@ -2422,15 +2422,15 @@ var _sfc_main$f = defineComponent({
|
|
|
2422
2422
|
ref: "select"
|
|
2423
2423
|
}, [__props.items && __props.items.length ? (openBlock(), createElementBlock(Fragment, {
|
|
2424
2424
|
key: 0
|
|
2425
|
-
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2425
|
+
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$8, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
|
|
2426
2426
|
class: "select-text ellipsis",
|
|
2427
2427
|
title: selectedTextRef.value,
|
|
2428
2428
|
textContent: toDisplayString(selectedTextRef.value)
|
|
2429
|
-
}, null, 8, _hoisted_2$
|
|
2429
|
+
}, null, 8, _hoisted_2$4)])])) : (openBlock(), createElementBlock("div", {
|
|
2430
2430
|
key: 1,
|
|
2431
2431
|
class: "placeholder",
|
|
2432
2432
|
textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2433
|
-
}, null, 8, _hoisted_3$
|
|
2433
|
+
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$y, {
|
|
2434
2434
|
key: 2,
|
|
2435
2435
|
type: "arrow",
|
|
2436
2436
|
size: 24,
|
|
@@ -2438,12 +2438,12 @@ var _sfc_main$f = defineComponent({
|
|
|
2438
2438
|
style: {
|
|
2439
2439
|
"transform": "rotate(90deg)"
|
|
2440
2440
|
}
|
|
2441
|
-
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2441
|
+
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
|
|
2442
2442
|
};
|
|
2443
2443
|
}
|
|
2444
2444
|
});
|
|
2445
2445
|
|
|
2446
|
-
var _sfc_main$
|
|
2446
|
+
var _sfc_main$f = defineComponent({
|
|
2447
2447
|
...{
|
|
2448
2448
|
name: "Switch",
|
|
2449
2449
|
inheritAttrs: true
|
|
@@ -2492,8 +2492,8 @@ var _sfc_main$e = defineComponent({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
});
|
|
2494
2494
|
|
|
2495
|
-
const _hoisted_1$
|
|
2496
|
-
var _sfc_main$
|
|
2495
|
+
const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
|
|
2496
|
+
var _sfc_main$e = defineComponent({
|
|
2497
2497
|
...{
|
|
2498
2498
|
name: "Textarea"
|
|
2499
2499
|
},
|
|
@@ -2553,25 +2553,25 @@ var _sfc_main$d = defineComponent({
|
|
|
2553
2553
|
onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
|
|
2554
2554
|
onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
|
|
2555
2555
|
onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
|
|
2556
|
-
}), null, 16, _hoisted_1$
|
|
2556
|
+
}), null, 16, _hoisted_1$7)), [[vModelText, valueModel.value]]);
|
|
2557
2557
|
};
|
|
2558
2558
|
}
|
|
2559
2559
|
});
|
|
2560
2560
|
|
|
2561
|
-
const _hoisted_1$
|
|
2561
|
+
const _hoisted_1$6 = {
|
|
2562
2562
|
class: "fold-header"
|
|
2563
2563
|
};
|
|
2564
|
-
const _hoisted_2$
|
|
2565
|
-
const _hoisted_3$
|
|
2566
|
-
const _hoisted_4$
|
|
2564
|
+
const _hoisted_2$3 = ["textContent"];
|
|
2565
|
+
const _hoisted_3$3 = ["textContent"];
|
|
2566
|
+
const _hoisted_4$3 = {
|
|
2567
2567
|
key: 1,
|
|
2568
2568
|
class: "status"
|
|
2569
2569
|
};
|
|
2570
|
-
const _hoisted_5$
|
|
2570
|
+
const _hoisted_5$2 = {
|
|
2571
2571
|
class: "fold-body",
|
|
2572
2572
|
ref: "foldBody"
|
|
2573
2573
|
};
|
|
2574
|
-
var _sfc_main$
|
|
2574
|
+
var _sfc_main$d = defineComponent({
|
|
2575
2575
|
...{
|
|
2576
2576
|
name: "Fold",
|
|
2577
2577
|
inheritAttrs: true
|
|
@@ -2641,23 +2641,23 @@ var _sfc_main$c = defineComponent({
|
|
|
2641
2641
|
return (_ctx, _cache) => {
|
|
2642
2642
|
return openBlock(), createElementBlock("div", {
|
|
2643
2643
|
class: normalizeClass(["snail-fold", statusModel.value])
|
|
2644
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2644
|
+
}, [createElementVNode("div", _hoisted_1$6, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", {
|
|
2645
2645
|
class: "title ellipsis",
|
|
2646
2646
|
textContent: toDisplayString(__props.title)
|
|
2647
|
-
}, null, 8, _hoisted_2$
|
|
2647
|
+
}, null, 8, _hoisted_2$3), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
2648
2648
|
key: 0,
|
|
2649
2649
|
class: "subtitle ellipsis",
|
|
2650
2650
|
textContent: toDisplayString(__props.subtitle)
|
|
2651
|
-
}, null, 8, _hoisted_3$
|
|
2651
|
+
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$y, {
|
|
2652
2652
|
type: "arrow",
|
|
2653
2653
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2654
2654
|
onClick: onStatusClick
|
|
2655
|
-
}, null, 8, ["title"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$
|
|
2655
|
+
}, null, 8, ["title"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
2658
|
});
|
|
2659
2659
|
|
|
2660
|
-
var _sfc_main$
|
|
2660
|
+
var _sfc_main$c = defineComponent({
|
|
2661
2661
|
...{
|
|
2662
2662
|
name: "Scroll",
|
|
2663
2663
|
inheritAttrs: true
|
|
@@ -2787,11 +2787,11 @@ var _sfc_main$b = defineComponent({
|
|
|
2787
2787
|
}
|
|
2788
2788
|
});
|
|
2789
2789
|
|
|
2790
|
-
var _sfc_main$
|
|
2790
|
+
var _sfc_main$b = defineComponent({
|
|
2791
2791
|
__name: "layout",
|
|
2792
2792
|
props: {
|
|
2793
2793
|
mode: {},
|
|
2794
|
-
|
|
2794
|
+
main: {},
|
|
2795
2795
|
left: {},
|
|
2796
2796
|
right: {},
|
|
2797
2797
|
top: {},
|
|
@@ -2801,8 +2801,8 @@ var _sfc_main$a = defineComponent({
|
|
|
2801
2801
|
const props = __props;
|
|
2802
2802
|
const areaMap = computed(() => {
|
|
2803
2803
|
const map = Object.create(null);
|
|
2804
|
-
map.
|
|
2805
|
-
scrollable: props.
|
|
2804
|
+
map.main = {
|
|
2805
|
+
scrollable: props.main && props.main.scroll != void 0,
|
|
2806
2806
|
class: "main-area",
|
|
2807
2807
|
style: void 0
|
|
2808
2808
|
};
|
|
@@ -2848,12 +2848,12 @@ var _sfc_main$a = defineComponent({
|
|
|
2848
2848
|
return (_ctx, _cache) => {
|
|
2849
2849
|
return openBlock(), createElementBlock("div", {
|
|
2850
2850
|
class: normalizeClass(["snail-layout", __props.mode])
|
|
2851
|
-
}, [(openBlock(), createElementBlock(Fragment, null, renderList(["top", "left", "
|
|
2851
|
+
}, [(openBlock(), createElementBlock(Fragment, null, renderList(["top", "left", "main", "right", "bottom"], item => {
|
|
2852
2852
|
return openBlock(), createElementBlock(Fragment, {
|
|
2853
2853
|
key: item
|
|
2854
2854
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (openBlock(), createElementBlock(Fragment, {
|
|
2855
2855
|
key: 0
|
|
2856
|
-
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$
|
|
2856
|
+
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$c, mergeProps({
|
|
2857
2857
|
key: 0,
|
|
2858
2858
|
class: areaMap.value[item].class,
|
|
2859
2859
|
style: areaMap.value[item].style
|
|
@@ -2872,7 +2872,7 @@ var _sfc_main$a = defineComponent({
|
|
|
2872
2872
|
}
|
|
2873
2873
|
});
|
|
2874
2874
|
|
|
2875
|
-
var _sfc_main$
|
|
2875
|
+
var _sfc_main$a = defineComponent({
|
|
2876
2876
|
...{
|
|
2877
2877
|
name: "Sort",
|
|
2878
2878
|
inheritAttrs: true
|
|
@@ -2973,10 +2973,10 @@ var _sfc_main$9 = defineComponent({
|
|
|
2973
2973
|
}
|
|
2974
2974
|
});
|
|
2975
2975
|
|
|
2976
|
-
const _hoisted_1$
|
|
2976
|
+
const _hoisted_1$5 = {
|
|
2977
2977
|
class: "table-body"
|
|
2978
2978
|
};
|
|
2979
|
-
var _sfc_main$
|
|
2979
|
+
var _sfc_main$9 = defineComponent({
|
|
2980
2980
|
...{
|
|
2981
2981
|
name: "Table",
|
|
2982
2982
|
inheritAttrs: true
|
|
@@ -3001,7 +3001,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3001
3001
|
const hStyleRef = computed(() => css.buildStyle(props.headerStyle));
|
|
3002
3002
|
const fStyleRef = computed(() => css.buildStyle(props.footerStyle));
|
|
3003
3003
|
return (_ctx, _cache) => {
|
|
3004
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3004
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
3005
3005
|
class: normalizeClass(["snail-table", {
|
|
3006
3006
|
"start-border": __props.border == true
|
|
3007
3007
|
}]),
|
|
@@ -3011,7 +3011,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3011
3011
|
default: withCtx(() => [createElementVNode("div", {
|
|
3012
3012
|
class: "table-header",
|
|
3013
3013
|
style: normalizeStyle(hStyleRef.value)
|
|
3014
|
-
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$
|
|
3014
|
+
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$5, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
|
|
3015
3015
|
class: "table-footer",
|
|
3016
3016
|
style: normalizeStyle(fStyleRef.value)
|
|
3017
3017
|
}, [renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -3021,7 +3021,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3021
3021
|
}
|
|
3022
3022
|
});
|
|
3023
3023
|
|
|
3024
|
-
var _sfc_main$
|
|
3024
|
+
var _sfc_main$8 = defineComponent({
|
|
3025
3025
|
...{
|
|
3026
3026
|
name: "TableRow",
|
|
3027
3027
|
inheritAttrs: true
|
|
@@ -3044,7 +3044,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
3044
3044
|
}
|
|
3045
3045
|
});
|
|
3046
3046
|
|
|
3047
|
-
var _sfc_main$
|
|
3047
|
+
var _sfc_main$7 = defineComponent({
|
|
3048
3048
|
...{
|
|
3049
3049
|
name: "TableCol",
|
|
3050
3050
|
inheritAttrs: true
|
|
@@ -3090,7 +3090,7 @@ var _sfc_main$6 = defineComponent({
|
|
|
3090
3090
|
}
|
|
3091
3091
|
});
|
|
3092
3092
|
|
|
3093
|
-
var _sfc_main$
|
|
3093
|
+
var _sfc_main$6 = defineComponent({
|
|
3094
3094
|
__name: "transitions",
|
|
3095
3095
|
props: {
|
|
3096
3096
|
group: {
|
|
@@ -3130,20 +3130,20 @@ var _sfc_main$5 = defineComponent({
|
|
|
3130
3130
|
}
|
|
3131
3131
|
});
|
|
3132
3132
|
|
|
3133
|
-
const _hoisted_1$
|
|
3133
|
+
const _hoisted_1$4 = {
|
|
3134
3134
|
key: 0,
|
|
3135
3135
|
class: "node-fold"
|
|
3136
3136
|
};
|
|
3137
|
-
const _hoisted_2$
|
|
3138
|
-
const _hoisted_3$
|
|
3137
|
+
const _hoisted_2$2 = ["title", "textContent"];
|
|
3138
|
+
const _hoisted_3$2 = {
|
|
3139
3139
|
class: "node-slot ellipsis"
|
|
3140
3140
|
};
|
|
3141
|
-
const _hoisted_4$
|
|
3141
|
+
const _hoisted_4$2 = {
|
|
3142
3142
|
key: 1,
|
|
3143
3143
|
class: "snail-tree-children hidden",
|
|
3144
3144
|
ref: "children"
|
|
3145
3145
|
};
|
|
3146
|
-
var _sfc_main$
|
|
3146
|
+
var _sfc_main$5 = defineComponent({
|
|
3147
3147
|
...{
|
|
3148
3148
|
name: "TreeNode",
|
|
3149
3149
|
inheritAttrs: true
|
|
@@ -3261,7 +3261,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
3261
3261
|
key: 1
|
|
3262
3262
|
}, [_cache[4] || (_cache[4] = createElementVNode("div", {
|
|
3263
3263
|
class: "indent"
|
|
3264
|
-
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3264
|
+
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$4, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$y, {
|
|
3265
3265
|
key: 0,
|
|
3266
3266
|
class: normalizeClass(statusRef.value),
|
|
3267
3267
|
type: "custom",
|
|
@@ -3273,7 +3273,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
3273
3273
|
class: "node-text ellipsis",
|
|
3274
3274
|
title: __props.node.text,
|
|
3275
3275
|
textContent: toDisplayString(__props.node.text)
|
|
3276
|
-
}, null, 8, _hoisted_2$
|
|
3276
|
+
}, null, 8, _hoisted_2$2), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34)) : createCommentVNode("", true), showRef.value && showChildrenRef.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.node.children, child => {
|
|
3277
3277
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
3278
3278
|
key: __props.context.getKey(child),
|
|
3279
3279
|
node: child,
|
|
@@ -3293,10 +3293,10 @@ var _sfc_main$4 = defineComponent({
|
|
|
3293
3293
|
}
|
|
3294
3294
|
});
|
|
3295
3295
|
|
|
3296
|
-
const _hoisted_1$
|
|
3296
|
+
const _hoisted_1$3 = {
|
|
3297
3297
|
class: "snail-tree"
|
|
3298
3298
|
};
|
|
3299
|
-
var _sfc_main$
|
|
3299
|
+
var _sfc_main$4 = defineComponent({
|
|
3300
3300
|
...{
|
|
3301
3301
|
name: "Tree",
|
|
3302
3302
|
inheritAttrs: true
|
|
@@ -3330,15 +3330,15 @@ var _sfc_main$3 = defineComponent({
|
|
|
3330
3330
|
emits("click", node, parents);
|
|
3331
3331
|
}
|
|
3332
3332
|
return (_ctx, _cache) => {
|
|
3333
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3333
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [__props.search ? (openBlock(), createBlock(_sfc_main$r, mergeProps({
|
|
3334
3334
|
key: 0
|
|
3335
3335
|
}, __props.search, {
|
|
3336
3336
|
onSearch
|
|
3337
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3337
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$c, {
|
|
3338
3338
|
"scroll-y": true
|
|
3339
3339
|
}, {
|
|
3340
3340
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
|
|
3341
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3341
|
+
return openBlock(), createBlock(_sfc_main$5, {
|
|
3342
3342
|
key: unref(context).getKey(node),
|
|
3343
3343
|
node,
|
|
3344
3344
|
parent: void 0,
|
|
@@ -3359,7 +3359,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
3359
3359
|
}
|
|
3360
3360
|
});
|
|
3361
3361
|
|
|
3362
|
-
var _sfc_main$
|
|
3362
|
+
var _sfc_main$3 = defineComponent({
|
|
3363
3363
|
__name: "wrapper",
|
|
3364
3364
|
props: {
|
|
3365
3365
|
readonly: {
|
|
@@ -3381,14 +3381,14 @@ var _sfc_main$2 = defineComponent({
|
|
|
3381
3381
|
return (_ctx, _cache) => {
|
|
3382
3382
|
return openBlock(), createElementBlock("div", {
|
|
3383
3383
|
class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
3384
|
-
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3384
|
+
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$u, mergeProps({
|
|
3385
3385
|
key: 0
|
|
3386
3386
|
}, __props.header || {
|
|
3387
3387
|
useTo: "dialog",
|
|
3388
3388
|
title: "对话框"
|
|
3389
3389
|
}, {
|
|
3390
3390
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3391
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3391
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$c, mergeProps({
|
|
3392
3392
|
class: "wrapper-body"
|
|
3393
3393
|
}, __props.content || {
|
|
3394
3394
|
scrollX: false,
|
|
@@ -3396,7 +3396,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
3396
3396
|
}), {
|
|
3397
3397
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3398
3398
|
_: 3
|
|
3399
|
-
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3399
|
+
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$v, mergeProps({
|
|
3400
3400
|
key: 1
|
|
3401
3401
|
}, __props.footer || {}, {
|
|
3402
3402
|
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
@@ -3410,7 +3410,7 @@ function mount(target, options, onDestroyed) {
|
|
|
3410
3410
|
mustObject(options, "options");
|
|
3411
3411
|
target instanceof HTMLElement || throwError("target must be a HTMLElement");
|
|
3412
3412
|
target.classList.add("snail-app");
|
|
3413
|
-
const app = createApp(_sfc_main$
|
|
3413
|
+
const app = createApp(_sfc_main$o, options);
|
|
3414
3414
|
triggerAppCreated(app);
|
|
3415
3415
|
app.mount(target);
|
|
3416
3416
|
const scope = useScope().onDestroy(() => app.unmount());
|
|
@@ -3418,36 +3418,182 @@ function mount(target, options, onDestroyed) {
|
|
|
3418
3418
|
return scope;
|
|
3419
3419
|
}
|
|
3420
3420
|
|
|
3421
|
-
|
|
3421
|
+
function initStepByFormat(format) {
|
|
3422
|
+
switch (format) {
|
|
3423
|
+
case "yyyy":
|
|
3424
|
+
return "year";
|
|
3425
|
+
case "yyyy-MM":
|
|
3426
|
+
return "month";
|
|
3427
|
+
default:
|
|
3428
|
+
return "day";
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
function electDateValue(min, max) {
|
|
3432
|
+
return getDateValue(new Date());
|
|
3433
|
+
}
|
|
3434
|
+
function buildYearItems(year, min, max) {
|
|
3435
|
+
year = year - 10;
|
|
3436
|
+
const items = new Array(18);
|
|
3437
|
+
for (var index = 0; index < items.length; index++) {
|
|
3438
|
+
year += 1;
|
|
3439
|
+
items[index] = Object.freeze({
|
|
3440
|
+
year,
|
|
3441
|
+
disabled: min && min.year != void 0 && year < min.year || max && max.year != void 0 && year > max.year
|
|
3442
|
+
});
|
|
3443
|
+
}
|
|
3444
|
+
return items;
|
|
3445
|
+
}
|
|
3446
|
+
function buildMonthItems(yearItem, min, max) {
|
|
3447
|
+
const minDate = new Date(formatDateValue(min, "yyyy-MM"));
|
|
3448
|
+
const maxDate = new Date(formatDateValue(max, "yyyy-MM"));
|
|
3449
|
+
const items = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
3450
|
+
return items.map((item, index) => {
|
|
3451
|
+
const mi = {
|
|
3452
|
+
text: item,
|
|
3453
|
+
month: index + 1,
|
|
3454
|
+
year: yearItem.year,
|
|
3455
|
+
disabled: yearItem.disabled
|
|
3456
|
+
};
|
|
3457
|
+
if (mi.disabled != true) {
|
|
3458
|
+
const date = new Date(formatDateValue(mi, "yyyy-MM"));
|
|
3459
|
+
mi.disabled = minDate != void 0 && date < minDate || maxDate != void 0 && date > maxDate;
|
|
3460
|
+
}
|
|
3461
|
+
return Object.freeze(mi);
|
|
3462
|
+
});
|
|
3463
|
+
}
|
|
3464
|
+
function buildDayItems(monthItem, min, max) {
|
|
3465
|
+
const minDate = new Date(formatDateValue(min, "yyyy-MM-dd"));
|
|
3466
|
+
const maxDate = new Date(formatDateValue(max, "yyyy-MM-dd"));
|
|
3467
|
+
const date = new Date(monthItem.year, monthItem.month - 1);
|
|
3468
|
+
date.setDate(date.getDate() - (date.getDay() || 7) - 1);
|
|
3469
|
+
const items = new Array(42);
|
|
3470
|
+
for (var index = 0; index < items.length; index++) {
|
|
3471
|
+
date.setDate(date.getDate() + 1);
|
|
3472
|
+
const item = {
|
|
3473
|
+
day: date.getDate(),
|
|
3474
|
+
month: date.getMonth() + 1,
|
|
3475
|
+
year: date.getFullYear(),
|
|
3476
|
+
disabled: monthItem.disabled
|
|
3477
|
+
};
|
|
3478
|
+
if (item.disabled != true) {
|
|
3479
|
+
const date2 = new Date(formatDateValue(item, "yyyy-MM-dd"));
|
|
3480
|
+
item.disabled = minDate != void 0 && date2 < minDate || maxDate != void 0 && date2 > maxDate;
|
|
3481
|
+
}
|
|
3482
|
+
items[index] = Object.freeze(item);
|
|
3483
|
+
}
|
|
3484
|
+
return items;
|
|
3485
|
+
}
|
|
3486
|
+
function buildHourItems(min, max) {
|
|
3487
|
+
const items = new Array(24);
|
|
3488
|
+
for (var index = 0; index < items.length; index++) {
|
|
3489
|
+
items[index] = Object.freeze({
|
|
3490
|
+
hour: index,
|
|
3491
|
+
disabled: min && min.hour != void 0 && index < min.hour || max && max.hour != void 0 && index > max.hour
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3494
|
+
return items;
|
|
3495
|
+
}
|
|
3496
|
+
function buildMinuteItems(hourItem, min, max) {
|
|
3497
|
+
const items = new Array(60);
|
|
3498
|
+
const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, 0) : void 0;
|
|
3499
|
+
const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, 0) : void 0;
|
|
3500
|
+
for (let index = 0; index < items.length; index++) {
|
|
3501
|
+
const item = {
|
|
3502
|
+
minute: index,
|
|
3503
|
+
hour: hourItem.hour,
|
|
3504
|
+
disabled: hourItem.disabled
|
|
3505
|
+
};
|
|
3506
|
+
if (item.disabled != true) {
|
|
3507
|
+
const number = getTimeNumber(item.hour, item.minute, 0);
|
|
3508
|
+
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3509
|
+
}
|
|
3510
|
+
items[index] = Object.freeze(item);
|
|
3511
|
+
}
|
|
3512
|
+
return items;
|
|
3513
|
+
}
|
|
3514
|
+
function buildSecondItems(minuteItem, min, max) {
|
|
3515
|
+
const items = new Array(60);
|
|
3516
|
+
const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, min.second) : void 0;
|
|
3517
|
+
const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, max.second) : void 0;
|
|
3518
|
+
for (let index = 0; index < items.length; index++) {
|
|
3519
|
+
const item = {
|
|
3520
|
+
second: index,
|
|
3521
|
+
minute: minuteItem.minute,
|
|
3522
|
+
hour: minuteItem.hour,
|
|
3523
|
+
disabled: minuteItem.disabled
|
|
3524
|
+
};
|
|
3525
|
+
if (item.disabled != true) {
|
|
3526
|
+
const number = getTimeNumber(item.hour, item.minute, item.second);
|
|
3527
|
+
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3528
|
+
}
|
|
3529
|
+
items[index] = Object.freeze(item);
|
|
3530
|
+
}
|
|
3531
|
+
return items;
|
|
3532
|
+
}
|
|
3533
|
+
function getTimeNumber(hour, minute, second) {
|
|
3534
|
+
return (hour || 0) * 1e4 + (minute || 0) * 100 + (second || 0);
|
|
3535
|
+
}
|
|
3536
|
+
function isValidTime(format, time, min, max) {
|
|
3537
|
+
time = correctTimeValue(time);
|
|
3538
|
+
if (time) {
|
|
3539
|
+
min = correctTimeValue({
|
|
3540
|
+
...min
|
|
3541
|
+
});
|
|
3542
|
+
const timeNumber = getTimeNumber(time.hour, time.minute, format == "HH:mm" ? 0 : time.second);
|
|
3543
|
+
if (min != void 0) {
|
|
3544
|
+
const minNumber = getTimeNumber(min.hour, min.minute, format == "HH:mm" ? 0 : max.second);
|
|
3545
|
+
if (timeNumber < minNumber) {
|
|
3546
|
+
return false;
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
max = correctTimeValue({
|
|
3550
|
+
...max
|
|
3551
|
+
});
|
|
3552
|
+
if (max != void 0) {
|
|
3553
|
+
const maxNumber = getTimeNumber(max.hour, max.minute, format == "HH:mm" ? 0 : max.second);
|
|
3554
|
+
if (timeNumber > maxNumber) {
|
|
3555
|
+
return false;
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
return true;
|
|
3559
|
+
}
|
|
3560
|
+
return false;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
const _hoisted_1$2 = {
|
|
3422
3564
|
class: "tz-item",
|
|
3423
3565
|
ref: "hour-items"
|
|
3424
3566
|
};
|
|
3425
|
-
const _hoisted_2 = ["textContent", "onClick"];
|
|
3426
|
-
const _hoisted_3 = {
|
|
3567
|
+
const _hoisted_2$1 = ["textContent", "onClick"];
|
|
3568
|
+
const _hoisted_3$1 = {
|
|
3427
3569
|
class: "tz-item",
|
|
3428
3570
|
ref: "minute-items"
|
|
3429
3571
|
};
|
|
3430
|
-
const _hoisted_4 = ["textContent", "onClick"];
|
|
3431
|
-
const _hoisted_5 = {
|
|
3572
|
+
const _hoisted_4$1 = ["textContent", "onClick"];
|
|
3573
|
+
const _hoisted_5$1 = {
|
|
3432
3574
|
key: 0,
|
|
3433
3575
|
class: "tz-item",
|
|
3434
3576
|
ref: "second-items"
|
|
3435
3577
|
};
|
|
3436
|
-
const _hoisted_6 = ["textContent", "onClick"];
|
|
3437
|
-
var _sfc_main$
|
|
3578
|
+
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
3579
|
+
var _sfc_main$2 = defineComponent({
|
|
3438
3580
|
__name: "time-pc",
|
|
3439
3581
|
props: {
|
|
3440
3582
|
value: {},
|
|
3441
|
-
|
|
3583
|
+
format: {},
|
|
3584
|
+
min: {},
|
|
3585
|
+
max: {},
|
|
3586
|
+
toolbarDisabled: {
|
|
3442
3587
|
type: Boolean
|
|
3443
3588
|
},
|
|
3444
3589
|
nowDisabled: {
|
|
3445
3590
|
type: Boolean
|
|
3446
3591
|
},
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3592
|
+
clearDisabled: {
|
|
3593
|
+
type: Boolean
|
|
3594
|
+
},
|
|
3595
|
+
popup: {},
|
|
3596
|
+
picker: {},
|
|
3451
3597
|
inPopup: {},
|
|
3452
3598
|
closePopup: {
|
|
3453
3599
|
type: Function
|
|
@@ -3465,203 +3611,543 @@ var _sfc_main$1 = defineComponent({
|
|
|
3465
3611
|
} = _ref;
|
|
3466
3612
|
const props = __props;
|
|
3467
3613
|
const emits = __emit;
|
|
3468
|
-
const
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
const
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
const {
|
|
3477
|
-
inPopup,
|
|
3478
|
-
closePopup
|
|
3479
|
-
} = props;
|
|
3480
|
-
const secondDisabled = tm.format == "HH:mm";
|
|
3481
|
-
const tvRef = ref();
|
|
3614
|
+
const format = props.format == "HH:mm" ? "HH:mm" : "HH:mm:ss";
|
|
3615
|
+
const min = parseTimeValue(props.min);
|
|
3616
|
+
const max = parseTimeValue(props.max);
|
|
3617
|
+
const timeRef = ref(parseTimeValue(props.value) || getTimeValue(new Date()));
|
|
3618
|
+
const isValidTimeRef = computed(() => format == "HH:mm" ? minuteItems.value && minuteItems.value[timeRef.value.minute].disabled != true : secondItems.value && secondItems.value[timeRef.value.second].disabled != true);
|
|
3619
|
+
const hourItems = shallowRef(buildHourItems(min, max));
|
|
3620
|
+
const minuteItems = shallowRef();
|
|
3621
|
+
const secondItems = shallowRef();
|
|
3482
3622
|
const hItemsDom = useTemplateRef("hour-items");
|
|
3483
3623
|
const mItemsDom = useTemplateRef("minute-items");
|
|
3484
3624
|
const sItemsDom = useTemplateRef("second-items");
|
|
3485
|
-
function
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
return {
|
|
3494
|
-
active: tvRef.value.minute == value,
|
|
3495
|
-
disabled: tm.validateHHmm(tvRef.value.hour, value) == false
|
|
3496
|
-
};
|
|
3497
|
-
case "second":
|
|
3498
|
-
return {
|
|
3499
|
-
active: tvRef.value.second == value,
|
|
3500
|
-
disabled: tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value) == false
|
|
3501
|
-
};
|
|
3502
|
-
}
|
|
3625
|
+
async function rebuildItems(time) {
|
|
3626
|
+
time != void 0 && (timeRef.value = time);
|
|
3627
|
+
minuteItems.value = buildMinuteItems(hourItems.value[timeRef.value.hour], min, max);
|
|
3628
|
+
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
3629
|
+
await nextTick();
|
|
3630
|
+
scrollIntoView(hItemsDom.value);
|
|
3631
|
+
scrollIntoView(mItemsDom.value);
|
|
3632
|
+
scrollIntoView(sItemsDom.value);
|
|
3503
3633
|
}
|
|
3504
3634
|
function scrollIntoView(items) {
|
|
3505
|
-
let activeIndex = void 0
|
|
3506
|
-
firstValidIndex;
|
|
3635
|
+
let activeIndex = void 0;
|
|
3507
3636
|
for (var index = 0; index < (items ? items.children.length : 0); index++) {
|
|
3508
3637
|
const ele = items.children[index];
|
|
3509
|
-
if (ele.classList.contains("disabled") == true) {
|
|
3510
|
-
continue;
|
|
3511
|
-
}
|
|
3512
|
-
if (firstValidIndex == void 0) {
|
|
3513
|
-
firstValidIndex = index;
|
|
3514
|
-
}
|
|
3515
3638
|
if (ele.classList.contains("active") == true) {
|
|
3516
3639
|
activeIndex = index;
|
|
3517
3640
|
break;
|
|
3518
3641
|
}
|
|
3519
3642
|
}
|
|
3520
|
-
|
|
3521
|
-
if (activeIndex == void 0) {
|
|
3522
|
-
if (firstValidIndex != void 0) {
|
|
3523
|
-
showIndex = firstValidIndex;
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
showIndex != void 0 && items.children[showIndex].scrollIntoView({
|
|
3643
|
+
activeIndex != void 0 && items.children[activeIndex].scrollIntoView({
|
|
3527
3644
|
behavior: "smooth",
|
|
3528
3645
|
block: "center"
|
|
3529
3646
|
});
|
|
3530
3647
|
}
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
await nextTick();
|
|
3537
|
-
scrollIntoView(mItemsDom.value);
|
|
3538
|
-
}
|
|
3539
|
-
break;
|
|
3540
|
-
case "minute":
|
|
3541
|
-
if (tm.validateHHmm(tvRef.value.hour, value)) {
|
|
3542
|
-
tvRef.value.minute = value;
|
|
3543
|
-
await nextTick();
|
|
3544
|
-
scrollIntoView(sItemsDom.value);
|
|
3545
|
-
}
|
|
3546
|
-
break;
|
|
3547
|
-
case "second":
|
|
3548
|
-
if (tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value)) {
|
|
3549
|
-
tvRef.value.second = value;
|
|
3550
|
-
}
|
|
3551
|
-
break;
|
|
3648
|
+
function onHourClick(item) {
|
|
3649
|
+
if (item.disabled != true && timeRef.value.hour != item.hour) {
|
|
3650
|
+
timeRef.value.hour = item.hour;
|
|
3651
|
+
minuteItems.value = buildMinuteItems(item, min, max);
|
|
3652
|
+
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
3552
3653
|
}
|
|
3553
3654
|
}
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3655
|
+
function onMinuteClick(item) {
|
|
3656
|
+
if (item.disabled != true) {
|
|
3657
|
+
if (format == "HH:mm") {
|
|
3658
|
+
const value = formatTimeValue(item, "HH:mm");
|
|
3659
|
+
emits("confirm", value);
|
|
3660
|
+
props.inPopup && props.closePopup(value);
|
|
3661
|
+
} else if (timeRef.value.minute != item.minute) {
|
|
3662
|
+
timeRef.value.minute = item.minute;
|
|
3663
|
+
secondItems.value = buildSecondItems(item, min, max);
|
|
3664
|
+
}
|
|
3561
3665
|
}
|
|
3562
3666
|
}
|
|
3563
|
-
function
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
}
|
|
3568
|
-
if (secondDisabled != true && tvRef.value.minute == void 0) {
|
|
3569
|
-
return toast("error", "请选选择时间");
|
|
3667
|
+
function onSecondClick(item) {
|
|
3668
|
+
if (item.disabled != true) {
|
|
3669
|
+
timeRef.value.second = item.second;
|
|
3670
|
+
onConfirm();
|
|
3570
3671
|
}
|
|
3571
|
-
const value = tm.toString(tvRef.value);
|
|
3572
|
-
emits("confirm", value);
|
|
3573
|
-
inPopup && closePopup(value);
|
|
3574
3672
|
}
|
|
3575
|
-
{
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3673
|
+
function onConfirm() {
|
|
3674
|
+
if (isValidTimeRef.value == true) {
|
|
3675
|
+
const value = formatTimeValue(timeRef.value, format);
|
|
3676
|
+
emits("confirm", value);
|
|
3677
|
+
props.inPopup && props.closePopup(value);
|
|
3678
|
+
}
|
|
3579
3679
|
}
|
|
3580
|
-
onMounted(
|
|
3581
|
-
await nextTick();
|
|
3582
|
-
scrollIntoView(hItemsDom.value);
|
|
3583
|
-
scrollIntoView(mItemsDom.value);
|
|
3584
|
-
scrollIntoView(sItemsDom.value);
|
|
3585
|
-
});
|
|
3680
|
+
onMounted(rebuildItems);
|
|
3586
3681
|
return (_ctx, _cache) => {
|
|
3587
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3588
|
-
class: normalizeClass(["
|
|
3589
|
-
"second-disabled":
|
|
3682
|
+
return openBlock(), createBlock(_sfc_main$b, {
|
|
3683
|
+
class: normalizeClass(["time-picker pc", {
|
|
3684
|
+
"second-disabled": unref(format) != "HH:mm:ss"
|
|
3590
3685
|
}]),
|
|
3591
3686
|
mode: "vertical"
|
|
3592
|
-
}, {
|
|
3593
|
-
|
|
3687
|
+
}, createSlots({
|
|
3688
|
+
main: withCtx(() => [createVNode(_sfc_main$6, {
|
|
3594
3689
|
group: true,
|
|
3595
3690
|
effect: "down-up"
|
|
3596
3691
|
}, {
|
|
3597
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
3692
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(hourItems.value, item => {
|
|
3598
3693
|
return openBlock(), createElementBlock("div", {
|
|
3599
|
-
class: normalizeClass(["tzi-number",
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3694
|
+
class: normalizeClass(["tzi-number", {
|
|
3695
|
+
active: item.hour == timeRef.value.hour,
|
|
3696
|
+
disabled: item.disabled
|
|
3697
|
+
}]),
|
|
3698
|
+
key: item.hour,
|
|
3699
|
+
textContent: toDisplayString(unref(padStart)(item.hour, 2, "0")),
|
|
3700
|
+
onClick: $event => onHourClick(item)
|
|
3701
|
+
}, null, 10, _hoisted_2$1);
|
|
3702
|
+
}), 128))], 512), createElementVNode("div", _hoisted_3$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(minuteItems.value, item => {
|
|
3604
3703
|
return openBlock(), createElementBlock("div", {
|
|
3605
|
-
class: normalizeClass(["tzi-number",
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3704
|
+
class: normalizeClass(["tzi-number", {
|
|
3705
|
+
active: item.minute == timeRef.value.minute,
|
|
3706
|
+
disabled: item.disabled
|
|
3707
|
+
}]),
|
|
3708
|
+
key: `${item.hour}:${item.minute}`,
|
|
3709
|
+
textContent: toDisplayString(unref(padStart)(item.minute, 2, "0")),
|
|
3710
|
+
onClick: $event => onMinuteClick(item)
|
|
3711
|
+
}, null, 10, _hoisted_4$1);
|
|
3712
|
+
}), 128))], 512), unref(format) == "HH:mm:ss" ? (openBlock(), createElementBlock("div", _hoisted_5$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(secondItems.value, item => {
|
|
3610
3713
|
return openBlock(), createElementBlock("div", {
|
|
3611
|
-
class: normalizeClass(["tzi-number",
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), unref(inPopup) && unref(closePopup)("")))
|
|
3621
|
-
}), unref(tm).validate(unref(getTimeNow)()) ? (openBlock(), createBlock(_sfc_main$y, {
|
|
3622
|
-
key: 0,
|
|
3623
|
-
type: "link",
|
|
3624
|
-
size: "small",
|
|
3625
|
-
textContent: "现在",
|
|
3626
|
-
onClick: onNow
|
|
3627
|
-
})) : createCommentVNode("", true), createVNode(_sfc_main$y, {
|
|
3628
|
-
type: "link",
|
|
3629
|
-
size: "small",
|
|
3630
|
-
textContent: "确定",
|
|
3631
|
-
onClick: onConfirm
|
|
3632
|
-
})]),
|
|
3714
|
+
class: normalizeClass(["tzi-number", {
|
|
3715
|
+
active: item.second == timeRef.value.second,
|
|
3716
|
+
disabled: item.disabled
|
|
3717
|
+
}]),
|
|
3718
|
+
key: `${item.hour}:${item.minute}:${item.second}`,
|
|
3719
|
+
textContent: toDisplayString(unref(padStart)(item.second, 2, "0")),
|
|
3720
|
+
onClick: $event => onSecondClick(item)
|
|
3721
|
+
}, null, 10, _hoisted_6$1);
|
|
3722
|
+
}), 128))], 512)) : createCommentVNode("", true)]),
|
|
3633
3723
|
_: 1
|
|
3634
3724
|
})]),
|
|
3635
|
-
_:
|
|
3636
|
-
},
|
|
3725
|
+
_: 2
|
|
3726
|
+
}, [__props.toolbarDisabled != true ? {
|
|
3727
|
+
name: "bottom",
|
|
3728
|
+
fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
3729
|
+
key: 0,
|
|
3730
|
+
type: "link",
|
|
3731
|
+
size: "small",
|
|
3732
|
+
textContent: "清空",
|
|
3733
|
+
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
|
|
3734
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
3735
|
+
key: 1,
|
|
3736
|
+
type: "link",
|
|
3737
|
+
size: "small",
|
|
3738
|
+
textContent: "现在",
|
|
3739
|
+
onClick: _cache[1] || (_cache[1] = $event => rebuildItems(unref(getTimeValue)(new Date())))
|
|
3740
|
+
})) : createCommentVNode("", true), createVNode(_sfc_main$z, {
|
|
3741
|
+
type: "link",
|
|
3742
|
+
size: "small",
|
|
3743
|
+
textContent: "确定",
|
|
3744
|
+
class: normalizeClass({
|
|
3745
|
+
disabled: isValidTimeRef.value != true
|
|
3746
|
+
}),
|
|
3747
|
+
onClick: onConfirm
|
|
3748
|
+
}, null, 8, ["class"])]),
|
|
3749
|
+
key: "0"
|
|
3750
|
+
} : void 0]), 1032, ["class"]);
|
|
3751
|
+
};
|
|
3752
|
+
}
|
|
3753
|
+
});
|
|
3754
|
+
|
|
3755
|
+
const _hoisted_1$1 = ["textContent"];
|
|
3756
|
+
const _hoisted_2 = ["textContent"];
|
|
3757
|
+
const _hoisted_3 = ["textContent"];
|
|
3758
|
+
const _hoisted_4 = ["textContent", "onClick"];
|
|
3759
|
+
const _hoisted_5 = ["textContent", "onClick"];
|
|
3760
|
+
const _hoisted_6 = ["textContent"];
|
|
3761
|
+
const _hoisted_7 = ["textContent", "onClick"];
|
|
3762
|
+
const _hoisted_8 = ["textContent"];
|
|
3763
|
+
var _sfc_main$1 = defineComponent({
|
|
3764
|
+
__name: "date-pc",
|
|
3765
|
+
props: {
|
|
3766
|
+
value: {},
|
|
3767
|
+
format: {},
|
|
3768
|
+
min: {},
|
|
3769
|
+
max: {},
|
|
3770
|
+
minPickTime: {},
|
|
3771
|
+
maxPickTime: {},
|
|
3772
|
+
toolbarDisabled: {
|
|
3773
|
+
type: Boolean
|
|
3774
|
+
},
|
|
3775
|
+
nowDisabled: {
|
|
3776
|
+
type: Boolean
|
|
3777
|
+
},
|
|
3778
|
+
clearDisabled: {
|
|
3779
|
+
type: Boolean
|
|
3780
|
+
},
|
|
3781
|
+
popup: {},
|
|
3782
|
+
picker: {},
|
|
3783
|
+
popupStatus: {},
|
|
3784
|
+
target: {},
|
|
3785
|
+
followX: {},
|
|
3786
|
+
followY: {},
|
|
3787
|
+
pinned: {},
|
|
3788
|
+
inPopup: {},
|
|
3789
|
+
closePopup: {
|
|
3790
|
+
type: Function
|
|
3791
|
+
}
|
|
3792
|
+
},
|
|
3793
|
+
emits: ["clear", "confirm"],
|
|
3794
|
+
setup(__props, _ref) {
|
|
3795
|
+
let {
|
|
3796
|
+
emit: __emit
|
|
3797
|
+
} = _ref;
|
|
3798
|
+
const props = __props;
|
|
3799
|
+
const emits = __emit;
|
|
3800
|
+
const {
|
|
3801
|
+
inPopup
|
|
3802
|
+
} = props;
|
|
3803
|
+
const dateRef = ref(parseDateValue(props.value));
|
|
3804
|
+
const format = correctDateFormat(props.format, "yyyy-MM-dd");
|
|
3805
|
+
const min = Object.freeze(parseDateValue(props.min));
|
|
3806
|
+
const max = Object.freeze(parseDateValue(props.max));
|
|
3807
|
+
const endStep = initStepByFormat(format);
|
|
3808
|
+
const stepRef = shallowRef(endStep);
|
|
3809
|
+
const yearItems = shallowRef();
|
|
3810
|
+
const monthItems = shallowRef();
|
|
3811
|
+
const dayItemsRef = shallowRef([]);
|
|
3812
|
+
const isValidDateRef = computed(validateDate);
|
|
3813
|
+
const minPickTime = Object.freeze(parseTimeValue(props.minPickTime));
|
|
3814
|
+
const maxPickTime = Object.freeze(parseTimeValue(props.maxPickTime));
|
|
3815
|
+
const timeFormat = format == "yyyy-MM-dd HH:mm" ? "HH:mm" : format == "yyyy-MM-dd HH:mm:ss" ? "HH:mm:ss" : void 0;
|
|
3816
|
+
const timeAreaDom = timeFormat ? useTemplateRef("time-area") : void 0;
|
|
3817
|
+
function validateDate() {
|
|
3818
|
+
switch (format) {
|
|
3819
|
+
case "yyyy":
|
|
3820
|
+
{
|
|
3821
|
+
const item = yearItems.value.find(item2 => item2.year == dateRef.value.year);
|
|
3822
|
+
return item && item.disabled != true;
|
|
3823
|
+
}
|
|
3824
|
+
case "yyyy-MM":
|
|
3825
|
+
{
|
|
3826
|
+
const item = monthItems.value.find(item2 => item2.year == dateRef.value.year && item2.month == dateRef.value.month);
|
|
3827
|
+
return item && item.disabled != true;
|
|
3828
|
+
}
|
|
3829
|
+
case "yyyy-MM-dd":
|
|
3830
|
+
{
|
|
3831
|
+
const item = dayItemsRef.value.find(item2 => item2.year == dateRef.value.year && item2.month == dateRef.value.month && item2.day == dateRef.value.day);
|
|
3832
|
+
return item ? item.disabled != true : false;
|
|
3833
|
+
}
|
|
3834
|
+
case "yyyy-MM-dd HH:mm":
|
|
3835
|
+
case "yyyy-MM-dd HH:mm:ss":
|
|
3836
|
+
{
|
|
3837
|
+
if (isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
|
|
3838
|
+
const date = getDateByValue(dateRef.value);
|
|
3839
|
+
const disabled = min && date < getDateByValue(min) || max && date > getDateByValue(max);
|
|
3840
|
+
return disabled != true;
|
|
3841
|
+
}
|
|
3842
|
+
return false;
|
|
3843
|
+
}
|
|
3844
|
+
default:
|
|
3845
|
+
return false;
|
|
3846
|
+
}
|
|
3847
|
+
}
|
|
3848
|
+
function buildPickerItems(step, basis) {
|
|
3849
|
+
switch (step) {
|
|
3850
|
+
case "year":
|
|
3851
|
+
{
|
|
3852
|
+
dateRef.value.year += basis * 18;
|
|
3853
|
+
yearItems.value = buildYearItems(dateRef.value.year, min, max);
|
|
3854
|
+
if (basis != 0) {
|
|
3855
|
+
dateRef.value.month = 1;
|
|
3856
|
+
dateRef.value.day = 1;
|
|
3857
|
+
}
|
|
3858
|
+
break;
|
|
3859
|
+
}
|
|
3860
|
+
case "month":
|
|
3861
|
+
{
|
|
3862
|
+
dateRef.value.year += basis;
|
|
3863
|
+
let yearItem = (yearItems.value || []).find(item => item.year == dateRef.value.year);
|
|
3864
|
+
if (yearItem == void 0) {
|
|
3865
|
+
buildPickerItems("year", 0);
|
|
3866
|
+
yearItem = yearItems.value[9];
|
|
3867
|
+
}
|
|
3868
|
+
monthItems.value = buildMonthItems(yearItem, min, max);
|
|
3869
|
+
basis != 0 && (dateRef.value.day = 1);
|
|
3870
|
+
break;
|
|
3871
|
+
}
|
|
3872
|
+
case "day":
|
|
3873
|
+
{
|
|
3874
|
+
const date = new Date(dateRef.value.year, dateRef.value.month - 1, 1);
|
|
3875
|
+
date.setMonth(date.getMonth() + basis);
|
|
3876
|
+
dateRef.value.year = date.getFullYear();
|
|
3877
|
+
dateRef.value.month = date.getMonth() + 1;
|
|
3878
|
+
let monthItem = (monthItems.value || []).find(item => item.year == dateRef.value.year && item.month == dateRef.value.month);
|
|
3879
|
+
if (monthItem == void 0) {
|
|
3880
|
+
buildPickerItems("month", 0);
|
|
3881
|
+
monthItem = monthItems.value[dateRef.value.month - 1];
|
|
3882
|
+
}
|
|
3883
|
+
dayItemsRef.value = buildDayItems(monthItem, min, max);
|
|
3884
|
+
basis != 0 && (dateRef.value.day = 1);
|
|
3885
|
+
break;
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
function onSwitchStepClick(newValue) {
|
|
3890
|
+
setTimeout(() => stepRef.value = newValue);
|
|
3891
|
+
}
|
|
3892
|
+
function onYearItemClick(item) {
|
|
3893
|
+
if (item.disabled != true) {
|
|
3894
|
+
dateRef.value.year = item.year;
|
|
3895
|
+
if (format == "yyyy") {
|
|
3896
|
+
const value = String(dateRef.value.year).padStart(4, "0");
|
|
3897
|
+
emits("confirm", value);
|
|
3898
|
+
props.inPopup && props.closePopup(value);
|
|
3899
|
+
} else {
|
|
3900
|
+
dateRef.value.month = 1;
|
|
3901
|
+
monthItems.value = buildMonthItems(item, min, max);
|
|
3902
|
+
onSwitchStepClick("month");
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
function onMonthItemClick(item) {
|
|
3907
|
+
if (item.disabled != true) {
|
|
3908
|
+
dateRef.value.year = item.year;
|
|
3909
|
+
dateRef.value.month = item.month;
|
|
3910
|
+
if (format == "yyyy-MM") {
|
|
3911
|
+
const value = formatDateValue(dateRef.value, "yyyy-MM");
|
|
3912
|
+
emits("confirm", value);
|
|
3913
|
+
props.inPopup && props.closePopup(value);
|
|
3914
|
+
} else {
|
|
3915
|
+
dateRef.value.day = 1;
|
|
3916
|
+
dayItemsRef.value = buildDayItems(item, min, max);
|
|
3917
|
+
onSwitchStepClick("day");
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
function onDayItemClick(item) {
|
|
3922
|
+
if (item.disabled != true) {
|
|
3923
|
+
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
3924
|
+
Object.assign(dateRef.value, {
|
|
3925
|
+
year: item.year,
|
|
3926
|
+
month: item.month,
|
|
3927
|
+
day: item.day
|
|
3928
|
+
});
|
|
3929
|
+
if (format == "yyyy-MM-dd") {
|
|
3930
|
+
const value = formatDateValue(dateRef.value, "yyyy-MM-dd");
|
|
3931
|
+
emits("confirm", value);
|
|
3932
|
+
props.inPopup && props.closePopup(value);
|
|
3933
|
+
} else {
|
|
3934
|
+
isNowMonth || buildPickerItems("day", 0);
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
}
|
|
3938
|
+
async function onSelectTime() {
|
|
3939
|
+
if (props.picker == void 0 || timeAreaDom.value == void 0 || props.pinned.value == true) {
|
|
3940
|
+
return;
|
|
3941
|
+
}
|
|
3942
|
+
props.pinned.value = true;
|
|
3943
|
+
const task = props.picker.showTime(timeAreaDom.value, {
|
|
3944
|
+
format: timeFormat,
|
|
3945
|
+
value: formatTimeValue(dateRef.value, timeFormat),
|
|
3946
|
+
min: props.minPickTime,
|
|
3947
|
+
max: props.minPickTime,
|
|
3948
|
+
followX: "start",
|
|
3949
|
+
followY: "before",
|
|
3950
|
+
spaceX: -2,
|
|
3951
|
+
spaceY: 4
|
|
3952
|
+
});
|
|
3953
|
+
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
3954
|
+
if (text != void 0) {
|
|
3955
|
+
const time = parseTimeValue(text) || Object.create(null);
|
|
3956
|
+
dateRef.value.hour = time.hour;
|
|
3957
|
+
dateRef.value.minute = time.minute;
|
|
3958
|
+
dateRef.value.second = time.second;
|
|
3959
|
+
}
|
|
3960
|
+
}, reason => {
|
|
3961
|
+
console.error(reason);
|
|
3962
|
+
});
|
|
3963
|
+
}
|
|
3964
|
+
function onNow() {
|
|
3965
|
+
stepRef.value = initStepByFormat(format);
|
|
3966
|
+
dateRef.value = getDateValue(new Date());
|
|
3967
|
+
buildPickerItems(stepRef.value, 0);
|
|
3968
|
+
}
|
|
3969
|
+
function onConfirm() {
|
|
3970
|
+
if (isValidDateRef.value == true) {
|
|
3971
|
+
const value = formatDateValue(dateRef.value, format);
|
|
3972
|
+
emits("confirm", value);
|
|
3973
|
+
props.inPopup && props.closePopup(value);
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
3977
|
+
buildPickerItems(stepRef.value, 0);
|
|
3978
|
+
return (_ctx, _cache) => {
|
|
3979
|
+
return openBlock(), createBlock(_sfc_main$b, {
|
|
3980
|
+
class: normalizeClass(["date-picker pc", {
|
|
3981
|
+
"time-now": __props.pinned && __props.pinned.value == true
|
|
3982
|
+
}]),
|
|
3983
|
+
mode: "vertical",
|
|
3984
|
+
top: {
|
|
3985
|
+
height: "40px"
|
|
3986
|
+
},
|
|
3987
|
+
bottom: {
|
|
3988
|
+
height: "30px"
|
|
3989
|
+
}
|
|
3990
|
+
}, createSlots({
|
|
3991
|
+
top: withCtx(() => [createVNode(_sfc_main$y, {
|
|
3992
|
+
type: "arrow",
|
|
3993
|
+
rotate: 180,
|
|
3994
|
+
size: 26,
|
|
3995
|
+
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
3996
|
+
}), createElementVNode("div", {
|
|
3997
|
+
class: normalizeClass(["header-content", stepRef.value])
|
|
3998
|
+
}, [stepRef.value == "year" ? (openBlock(), createElementBlock("div", {
|
|
3999
|
+
key: 0,
|
|
4000
|
+
textContent: toDisplayString(`${yearItems.value[0].year}年 - ${unref(getFromArray)(yearItems.value, -1).year}年`)
|
|
4001
|
+
}, null, 8, _hoisted_1$1)) : (openBlock(), createElementBlock(Fragment, {
|
|
4002
|
+
key: 1
|
|
4003
|
+
}, [createElementVNode("div", {
|
|
4004
|
+
textContent: toDisplayString(`${dateRef.value.year}年`),
|
|
4005
|
+
onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
|
|
4006
|
+
}, null, 8, _hoisted_2), stepRef.value == "day" ? (openBlock(), createElementBlock("div", {
|
|
4007
|
+
key: 0,
|
|
4008
|
+
textContent: toDisplayString(`${dateRef.value.month}月`),
|
|
4009
|
+
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4010
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$y, {
|
|
4011
|
+
type: "arrow",
|
|
4012
|
+
size: 26,
|
|
4013
|
+
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4014
|
+
})]),
|
|
4015
|
+
main: withCtx(() => [stepRef.value == "year" ? (openBlock(true), createElementBlock(Fragment, {
|
|
4016
|
+
key: 0
|
|
4017
|
+
}, renderList(yearItems.value, item => {
|
|
4018
|
+
return openBlock(), createElementBlock("div", {
|
|
4019
|
+
class: normalizeClass(["year-item", {
|
|
4020
|
+
"active": dateRef.value.year == item.year,
|
|
4021
|
+
"disabled": item.disabled
|
|
4022
|
+
}]),
|
|
4023
|
+
key: item.year
|
|
4024
|
+
}, [createElementVNode("span", {
|
|
4025
|
+
textContent: toDisplayString(item.year),
|
|
4026
|
+
onClick: $event => onYearItemClick(item)
|
|
4027
|
+
}, null, 8, _hoisted_4)], 2);
|
|
4028
|
+
}), 128)) : stepRef.value == "month" ? (openBlock(true), createElementBlock(Fragment, {
|
|
4029
|
+
key: 1
|
|
4030
|
+
}, renderList(monthItems.value, item => {
|
|
4031
|
+
return openBlock(), createElementBlock("div", {
|
|
4032
|
+
class: normalizeClass(["month-item", {
|
|
4033
|
+
"active": dateRef.value.month == item.month,
|
|
4034
|
+
"disabled": item.disabled
|
|
4035
|
+
}]),
|
|
4036
|
+
key: `${item.year}-${item.month}`
|
|
4037
|
+
}, [createElementVNode("span", {
|
|
4038
|
+
textContent: toDisplayString(item.text),
|
|
4039
|
+
onClick: $event => onMonthItemClick(item)
|
|
4040
|
+
}, null, 8, _hoisted_5)], 2);
|
|
4041
|
+
}), 128)) : (openBlock(), createElementBlock(Fragment, {
|
|
4042
|
+
key: 2
|
|
4043
|
+
}, [(openBlock(), createElementBlock(Fragment, null, renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
|
|
4044
|
+
return createElementVNode("div", {
|
|
4045
|
+
class: "day-item week",
|
|
4046
|
+
key: item,
|
|
4047
|
+
textContent: toDisplayString(item)
|
|
4048
|
+
}, null, 8, _hoisted_6);
|
|
4049
|
+
}), 64)), (openBlock(true), createElementBlock(Fragment, null, renderList(dayItemsRef.value, item => {
|
|
4050
|
+
return openBlock(), createElementBlock("div", {
|
|
4051
|
+
class: normalizeClass(["day-item", {
|
|
4052
|
+
"active": dateRef.value.year == item.year && dateRef.value.month == item.month && dateRef.value.day == item.day,
|
|
4053
|
+
"now-month": dateRef.value.year == item.year && dateRef.value.month == item.month,
|
|
4054
|
+
"disabled": item.disabled
|
|
4055
|
+
}]),
|
|
4056
|
+
key: `${item.year}-${item.month}-${item.day}`
|
|
4057
|
+
}, [createElementVNode("span", {
|
|
4058
|
+
textContent: toDisplayString(item.day),
|
|
4059
|
+
onClick: $event => onDayItemClick(item)
|
|
4060
|
+
}, null, 8, _hoisted_7)], 2);
|
|
4061
|
+
}), 128))], 64))]),
|
|
4062
|
+
_: 2
|
|
4063
|
+
}, [unref(endStep) == stepRef.value && (__props.toolbarDisabled != true || unref(timeFormat) != void 0) ? {
|
|
4064
|
+
name: "bottom",
|
|
4065
|
+
fn: withCtx(() => [unref(timeFormat) != void 0 ? (openBlock(), createElementBlock("div", {
|
|
4066
|
+
key: 0,
|
|
4067
|
+
class: normalizeClass(["time-area", {
|
|
4068
|
+
placeholder: dateRef.value.hour == void 0
|
|
4069
|
+
}]),
|
|
4070
|
+
ref: "time-area",
|
|
4071
|
+
textContent: toDisplayString(unref(formatTimeValue)(dateRef.value, unref(timeFormat)) || "选择时间"),
|
|
4072
|
+
onClick: onSelectTime
|
|
4073
|
+
}, null, 10, _hoisted_8)) : createCommentVNode("", true), __props.toolbarDisabled != true ? (openBlock(), createElementBlock(Fragment, {
|
|
4074
|
+
key: 1
|
|
4075
|
+
}, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
4076
|
+
key: 0,
|
|
4077
|
+
type: "link",
|
|
4078
|
+
size: "small",
|
|
4079
|
+
textContent: "清空",
|
|
4080
|
+
onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), unref(inPopup) && __props.closePopup("")))
|
|
4081
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
4082
|
+
key: 1,
|
|
4083
|
+
type: "link",
|
|
4084
|
+
size: "small",
|
|
4085
|
+
textContent: "现在",
|
|
4086
|
+
onClick: onNow
|
|
4087
|
+
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$z, {
|
|
4088
|
+
type: "link",
|
|
4089
|
+
size: "small",
|
|
4090
|
+
textContent: "确定",
|
|
4091
|
+
class: normalizeClass({
|
|
4092
|
+
"disabled": isValidDateRef.value != true
|
|
4093
|
+
}),
|
|
4094
|
+
onClick: onConfirm
|
|
4095
|
+
}, null, 8, ["class"])]),
|
|
4096
|
+
key: "0"
|
|
4097
|
+
} : void 0]), 1032, ["class"]);
|
|
3637
4098
|
};
|
|
3638
4099
|
}
|
|
3639
4100
|
});
|
|
3640
4101
|
|
|
3641
4102
|
function usePicker() {
|
|
3642
4103
|
const popup = usePopup();
|
|
4104
|
+
function showDate(target, options) {
|
|
4105
|
+
options = {
|
|
4106
|
+
...options
|
|
4107
|
+
};
|
|
4108
|
+
return showPicker(target, _sfc_main$1, options);
|
|
4109
|
+
}
|
|
3643
4110
|
function showTime(target, options) {
|
|
3644
4111
|
options = {
|
|
3645
4112
|
...options
|
|
3646
4113
|
};
|
|
3647
|
-
|
|
4114
|
+
return showPicker(target, _sfc_main$2, options);
|
|
4115
|
+
}
|
|
4116
|
+
function showPicker(target, component, options) {
|
|
4117
|
+
let popupOptions = Object.create(null);
|
|
4118
|
+
if (options != void 0) {
|
|
4119
|
+
popupOptions.followX = options.followX;
|
|
4120
|
+
popupOptions.followY = options.followY;
|
|
4121
|
+
popupOptions.spaceX = options.spaceX;
|
|
4122
|
+
popupOptions.spaceY = options.spaceY;
|
|
4123
|
+
popupOptions.spaceClient = options.spaceClien;
|
|
4124
|
+
delete options.followX;
|
|
4125
|
+
delete options.followY;
|
|
4126
|
+
delete options.spaceX;
|
|
4127
|
+
delete options.spaceY;
|
|
4128
|
+
delete options.spaceClient;
|
|
4129
|
+
}
|
|
3648
4130
|
return popup.follow(target, {
|
|
3649
|
-
component
|
|
3650
|
-
followX:
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
4131
|
+
component,
|
|
4132
|
+
followX: popupOptions.followX || "center",
|
|
4133
|
+
followY: popupOptions.followY,
|
|
4134
|
+
spaceX: correctNumber(popupOptions.spaceX, 2),
|
|
4135
|
+
spaceY: correctNumber(popupOptions.spaceY, 2),
|
|
4136
|
+
spaceClient: correctNumber(popupOptions.spaceClient, 10),
|
|
3654
4137
|
closeOnMask: true,
|
|
3655
|
-
props:
|
|
4138
|
+
props: {
|
|
4139
|
+
...options,
|
|
4140
|
+
picker: manager,
|
|
4141
|
+
popup
|
|
4142
|
+
}
|
|
3656
4143
|
});
|
|
3657
4144
|
}
|
|
3658
|
-
{
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
}
|
|
4145
|
+
const manager = Object.freeze(mountScope({
|
|
4146
|
+
showDate,
|
|
4147
|
+
showTime
|
|
4148
|
+
}, "IPickerManager"));
|
|
4149
|
+
manager.onDestroy(popup.destroy);
|
|
4150
|
+
return manager;
|
|
3665
4151
|
}
|
|
3666
4152
|
|
|
3667
4153
|
const _hoisted_1 = ["textContent"];
|
|
@@ -3749,12 +4235,12 @@ var _sfc_main = defineComponent({
|
|
|
3749
4235
|
onTouchstart: onStartDrag,
|
|
3750
4236
|
onTouchmove: onDragMove,
|
|
3751
4237
|
onTouchend: onDragEnd
|
|
3752
|
-
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$
|
|
4238
|
+
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$y, {
|
|
3753
4239
|
key: 0,
|
|
3754
4240
|
type: "success",
|
|
3755
4241
|
size: 20,
|
|
3756
4242
|
color: "white"
|
|
3757
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
4243
|
+
})) : (openBlock(), createBlock(_sfc_main$y, {
|
|
3758
4244
|
key: 1,
|
|
3759
4245
|
type: "custom",
|
|
3760
4246
|
size: 20,
|
|
@@ -3766,32 +4252,32 @@ var _sfc_main = defineComponent({
|
|
|
3766
4252
|
});
|
|
3767
4253
|
|
|
3768
4254
|
const components = {
|
|
3769
|
-
Button: _sfc_main$
|
|
3770
|
-
Choose: _sfc_main$
|
|
3771
|
-
DatePicker: _sfc_main$
|
|
3772
|
-
Footer: _sfc_main$
|
|
3773
|
-
Header: _sfc_main$
|
|
3774
|
-
Icon: _sfc_main$
|
|
3775
|
-
Input: _sfc_main$
|
|
3776
|
-
Number: _sfc_main$
|
|
3777
|
-
Search: _sfc_main$
|
|
3778
|
-
Select: _sfc_main$
|
|
3779
|
-
Switch: _sfc_main$
|
|
3780
|
-
Textarea: _sfc_main$
|
|
3781
|
-
Dynamic: _sfc_main$
|
|
3782
|
-
Fold: _sfc_main$
|
|
3783
|
-
Layout: _sfc_main$
|
|
3784
|
-
Scroll: _sfc_main$
|
|
3785
|
-
Sort: _sfc_main$
|
|
3786
|
-
Table: _sfc_main$
|
|
3787
|
-
TableRow: _sfc_main$
|
|
3788
|
-
TableCol: _sfc_main$
|
|
3789
|
-
Transitions: _sfc_main$
|
|
3790
|
-
Tree: _sfc_main$
|
|
3791
|
-
Wrapper: _sfc_main$
|
|
4255
|
+
Button: _sfc_main$z,
|
|
4256
|
+
Choose: _sfc_main$x,
|
|
4257
|
+
DatePicker: _sfc_main$w,
|
|
4258
|
+
Footer: _sfc_main$v,
|
|
4259
|
+
Header: _sfc_main$u,
|
|
4260
|
+
Icon: _sfc_main$y,
|
|
4261
|
+
Input: _sfc_main$t,
|
|
4262
|
+
Number: _sfc_main$s,
|
|
4263
|
+
Search: _sfc_main$r,
|
|
4264
|
+
Select: _sfc_main$g,
|
|
4265
|
+
Switch: _sfc_main$f,
|
|
4266
|
+
Textarea: _sfc_main$e,
|
|
4267
|
+
Dynamic: _sfc_main$o,
|
|
4268
|
+
Fold: _sfc_main$d,
|
|
4269
|
+
Layout: _sfc_main$b,
|
|
4270
|
+
Scroll: _sfc_main$c,
|
|
4271
|
+
Sort: _sfc_main$a,
|
|
4272
|
+
Table: _sfc_main$9,
|
|
4273
|
+
TableRow: _sfc_main$8,
|
|
4274
|
+
TableCol: _sfc_main$7,
|
|
4275
|
+
Transitions: _sfc_main$6,
|
|
4276
|
+
Tree: _sfc_main$4,
|
|
4277
|
+
Wrapper: _sfc_main$3,
|
|
3792
4278
|
DragVerify: _sfc_main,
|
|
3793
|
-
Empty: _sfc_main$
|
|
3794
|
-
Loading: _sfc_main$
|
|
4279
|
+
Empty: _sfc_main$j,
|
|
4280
|
+
Loading: _sfc_main$p
|
|
3795
4281
|
};
|
|
3796
4282
|
|
|
3797
4283
|
onMountScope(scope => {
|