snail.vue 2.0.11 → 2.0.13
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 +326 -41
- package/dist/snail.vue.js +986 -384
- package/dist/snail.vue.umd.js +984 -381
- package/dist/styles/snail.vue.vue.css +27 -21
- package/package.json +3 -3
package/dist/snail.vue.umd.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SnailVue = global.SnailVue || {}, global.Vue, global.Snail, global.SnailView));
|
|
6
6
|
})(this, (function (exports, vue, snail_core, snail_view) { 'use strict';
|
|
7
7
|
|
|
8
|
-
const _hoisted_1$
|
|
9
|
-
var _sfc_main$
|
|
8
|
+
const _hoisted_1$k = ["title"];
|
|
9
|
+
var _sfc_main$B = vue.defineComponent({
|
|
10
10
|
...{
|
|
11
11
|
name: "Button",
|
|
12
12
|
inheritAttrs: true
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
23
23
|
class: vue.normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
24
24
|
title: __props.title
|
|
25
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$
|
|
25
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$k);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
const _hoisted_1$
|
|
73
|
-
const _hoisted_2$
|
|
74
|
-
const _hoisted_3$
|
|
75
|
-
var _sfc_main$
|
|
72
|
+
const _hoisted_1$j = ["viewBox", "width", "height"];
|
|
73
|
+
const _hoisted_2$c = ["textContent"];
|
|
74
|
+
const _hoisted_3$a = ["fill", "stroke", "stroke-width", "d"];
|
|
75
|
+
var _sfc_main$A = vue.defineComponent({
|
|
76
76
|
...{
|
|
77
77
|
name: "Icon",
|
|
78
78
|
inheritAttrs: true
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
props: {
|
|
82
82
|
title: {},
|
|
83
83
|
type: {},
|
|
84
|
+
viewBox: {},
|
|
84
85
|
color: {},
|
|
85
86
|
hoverColor: {},
|
|
86
87
|
size: {},
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
return (_ctx, _cache) => {
|
|
95
96
|
return vue.openBlock(), vue.createElementBlock("svg", {
|
|
96
97
|
class: vue.normalizeClass(["snail-icon", __props.type]),
|
|
97
|
-
viewBox: "0 0 1024 1024",
|
|
98
|
+
viewBox: vue.unref(snail_core.correctString)(__props.viewBox, "0 0 1024 1024", false),
|
|
98
99
|
style: vue.normalizeStyle(__props.rotate ? `transform: rotate(${__props.rotate}deg);` : ""),
|
|
99
100
|
width: __props.size || 24,
|
|
100
101
|
height: __props.size || 24,
|
|
@@ -102,23 +103,23 @@
|
|
|
102
103
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
103
104
|
}, [vue.createElementVNode("title", {
|
|
104
105
|
textContent: vue.toDisplayString(__props.title || "")
|
|
105
|
-
}, null, 8, _hoisted_2$
|
|
106
|
+
}, null, 8, _hoisted_2$c), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSvgDraw)(__props.type, __props.draw), d => {
|
|
106
107
|
return vue.openBlock(), vue.createElementBlock("path", {
|
|
107
108
|
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
108
109
|
stroke: __props.stroke,
|
|
109
110
|
"stroke-width": __props.strokeWidth,
|
|
110
111
|
d
|
|
111
|
-
}, null, 8, _hoisted_3$
|
|
112
|
-
}), 256))], 46, _hoisted_1$
|
|
112
|
+
}, null, 8, _hoisted_3$a);
|
|
113
|
+
}), 256))], 46, _hoisted_1$j);
|
|
113
114
|
};
|
|
114
115
|
}
|
|
115
116
|
});
|
|
116
117
|
|
|
117
|
-
const _hoisted_1$
|
|
118
|
-
const _hoisted_2$
|
|
119
|
-
const _hoisted_3$
|
|
120
|
-
const _hoisted_4$
|
|
121
|
-
var _sfc_main$
|
|
118
|
+
const _hoisted_1$i = ["title", "onClick"];
|
|
119
|
+
const _hoisted_2$b = ["type", "checked"];
|
|
120
|
+
const _hoisted_3$9 = ["textContent"];
|
|
121
|
+
const _hoisted_4$7 = ["textContent"];
|
|
122
|
+
var _sfc_main$z = vue.defineComponent({
|
|
122
123
|
...{
|
|
123
124
|
name: "Choose",
|
|
124
125
|
inheritAttrs: true
|
|
@@ -194,10 +195,10 @@
|
|
|
194
195
|
key: 0,
|
|
195
196
|
type: vue.unref(type),
|
|
196
197
|
checked: node.selected
|
|
197
|
-
}, null, 8, _hoisted_2$
|
|
198
|
+
}, null, 8, _hoisted_2$b)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
198
199
|
key: 1,
|
|
199
200
|
class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
200
|
-
}, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
201
|
+
}, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
201
202
|
key: 0,
|
|
202
203
|
type: "success",
|
|
203
204
|
size: 12,
|
|
@@ -206,18 +207,18 @@
|
|
|
206
207
|
key: 2,
|
|
207
208
|
class: "item-text",
|
|
208
209
|
textContent: vue.toDisplayString(node.item.text)
|
|
209
|
-
}, null, 8, _hoisted_3$
|
|
210
|
+
}, null, 8, _hoisted_3$9)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
210
211
|
key: 3,
|
|
211
212
|
class: "item-des",
|
|
212
213
|
textContent: vue.toDisplayString(node.item.description)
|
|
213
|
-
}, null, 8, _hoisted_4$
|
|
214
|
+
}, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$i);
|
|
214
215
|
}), 128))], 2);
|
|
215
216
|
};
|
|
216
217
|
}
|
|
217
218
|
});
|
|
218
219
|
|
|
219
|
-
const _hoisted_1$
|
|
220
|
-
var _sfc_main$
|
|
220
|
+
const _hoisted_1$h = ["id"];
|
|
221
|
+
var _sfc_main$y = vue.defineComponent({
|
|
221
222
|
__name: "datepicker",
|
|
222
223
|
props: {
|
|
223
224
|
type: {},
|
|
@@ -368,12 +369,12 @@
|
|
|
368
369
|
class: "snail-datepicker",
|
|
369
370
|
id: vue.unref(id),
|
|
370
371
|
onClick
|
|
371
|
-
}, null, 8, _hoisted_1$
|
|
372
|
+
}, null, 8, _hoisted_1$h);
|
|
372
373
|
};
|
|
373
374
|
}
|
|
374
375
|
});
|
|
375
376
|
|
|
376
|
-
var _sfc_main$
|
|
377
|
+
var _sfc_main$x = vue.defineComponent({
|
|
377
378
|
...{
|
|
378
379
|
name: "Footer",
|
|
379
380
|
inheritAttrs: true
|
|
@@ -404,13 +405,13 @@
|
|
|
404
405
|
class: vue.normalizeClass(["snail-footer", {
|
|
405
406
|
"start-divider": __props.divider
|
|
406
407
|
}, __props.align || "right"])
|
|
407
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
408
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
408
409
|
key: 0,
|
|
409
410
|
size: "max",
|
|
410
411
|
type: "default",
|
|
411
412
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
412
413
|
textContent: vue.toDisplayString(__props.cancelName || "取消")
|
|
413
|
-
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
414
|
+
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
414
415
|
key: 1,
|
|
415
416
|
size: "max",
|
|
416
417
|
type: "primary",
|
|
@@ -421,8 +422,8 @@
|
|
|
421
422
|
}
|
|
422
423
|
});
|
|
423
424
|
|
|
424
|
-
const _hoisted_1$
|
|
425
|
-
var _sfc_main$
|
|
425
|
+
const _hoisted_1$g = ["textContent"];
|
|
426
|
+
var _sfc_main$w = vue.defineComponent({
|
|
426
427
|
...{
|
|
427
428
|
name: "Header",
|
|
428
429
|
inheritAttrs: true
|
|
@@ -461,7 +462,7 @@
|
|
|
461
462
|
key: 0,
|
|
462
463
|
textContent: vue.toDisplayString(__props.title),
|
|
463
464
|
class: vue.normalizeClass(["header-title", __props.titleAlign])
|
|
464
|
-
}, null, 10, _hoisted_1$
|
|
465
|
+
}, null, 10, _hoisted_1$g)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
465
466
|
key: 1,
|
|
466
467
|
type: "close",
|
|
467
468
|
size: 22,
|
|
@@ -473,18 +474,18 @@
|
|
|
473
474
|
}
|
|
474
475
|
});
|
|
475
476
|
|
|
476
|
-
const _hoisted_1$
|
|
477
|
-
const _hoisted_2$
|
|
477
|
+
const _hoisted_1$f = ["textContent"];
|
|
478
|
+
const _hoisted_2$a = {
|
|
478
479
|
key: 0,
|
|
479
480
|
class: "required",
|
|
480
481
|
textContent: "*"
|
|
481
482
|
};
|
|
482
|
-
const _hoisted_3$
|
|
483
|
+
const _hoisted_3$8 = {
|
|
483
484
|
class: "input-body"
|
|
484
485
|
};
|
|
485
|
-
const _hoisted_4$
|
|
486
|
-
const _hoisted_5$
|
|
487
|
-
var _sfc_main$
|
|
486
|
+
const _hoisted_4$6 = ["type", "value", "readonly", "placeholder", "title"];
|
|
487
|
+
const _hoisted_5$4 = ["title"];
|
|
488
|
+
var _sfc_main$v = vue.defineComponent({
|
|
488
489
|
...{
|
|
489
490
|
name: "Input",
|
|
490
491
|
inheritAttrs: true
|
|
@@ -536,7 +537,7 @@
|
|
|
536
537
|
}, [vue.createElementVNode("span", {
|
|
537
538
|
class: "text",
|
|
538
539
|
textContent: vue.toDisplayString(__props.title)
|
|
539
|
-
}, null, 8, _hoisted_1$
|
|
540
|
+
}, null, 8, _hoisted_1$f), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$a)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$8, [vue.createElementVNode("input", {
|
|
540
541
|
ref: "input-el",
|
|
541
542
|
type: __props.type || "text",
|
|
542
543
|
value: inputModel.value,
|
|
@@ -545,15 +546,15 @@
|
|
|
545
546
|
title: inputModel.value,
|
|
546
547
|
onChange: onValueChange,
|
|
547
548
|
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
548
|
-
}, null, 40, _hoisted_4$
|
|
549
|
+
}, null, 40, _hoisted_4$6), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
549
550
|
key: 0,
|
|
550
551
|
class: "validate",
|
|
551
552
|
title: validateRef.value
|
|
552
|
-
}, [vue.createVNode(_sfc_main$
|
|
553
|
+
}, [vue.createVNode(_sfc_main$A, {
|
|
553
554
|
type: "error",
|
|
554
555
|
size: 16,
|
|
555
556
|
color: "red"
|
|
556
|
-
})], 8, _hoisted_5$
|
|
557
|
+
})], 8, _hoisted_5$4)) : vue.createCommentVNode("", true)])], 2);
|
|
557
558
|
};
|
|
558
559
|
}
|
|
559
560
|
});
|
|
@@ -758,20 +759,20 @@
|
|
|
758
759
|
return formatter;
|
|
759
760
|
}
|
|
760
761
|
|
|
761
|
-
const _hoisted_1$
|
|
762
|
+
const _hoisted_1$e = {
|
|
762
763
|
key: 0,
|
|
763
764
|
class: "number-prefix"
|
|
764
765
|
};
|
|
765
|
-
const _hoisted_2$
|
|
766
|
-
const _hoisted_3$
|
|
767
|
-
const _hoisted_4$
|
|
766
|
+
const _hoisted_2$9 = ["textContent"];
|
|
767
|
+
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
768
|
+
const _hoisted_4$5 = {
|
|
768
769
|
key: 1,
|
|
769
770
|
class: "number-suffix"
|
|
770
771
|
};
|
|
771
|
-
const _hoisted_5$
|
|
772
|
-
const _hoisted_6$
|
|
773
|
-
const _hoisted_7 = ["title", "textContent"];
|
|
774
|
-
var _sfc_main$
|
|
772
|
+
const _hoisted_5$3 = ["textContent"];
|
|
773
|
+
const _hoisted_6$2 = ["title", "textContent"];
|
|
774
|
+
const _hoisted_7$1 = ["title", "textContent"];
|
|
775
|
+
var _sfc_main$u = vue.defineComponent({
|
|
775
776
|
__name: "number",
|
|
776
777
|
props: vue.mergeModels({
|
|
777
778
|
placeholder: {},
|
|
@@ -918,10 +919,10 @@
|
|
|
918
919
|
"has-prefix": vue.unref(hasPrefix),
|
|
919
920
|
"has-suffix": vue.unref(hasSuffix)
|
|
920
921
|
}])
|
|
921
|
-
}, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
922
|
+
}, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createElementVNode("span", {
|
|
922
923
|
class: "ellipsis",
|
|
923
924
|
textContent: vue.toDisplayString(vue.unref(prefix))
|
|
924
|
-
}, null, 8, _hoisted_2$
|
|
925
|
+
}, null, 8, _hoisted_2$9)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
925
926
|
class: vue.normalizeClass(["input-panel", vue.unref(controls)])
|
|
926
927
|
}, [vue.withDirectives(vue.createElementVNode("input", {
|
|
927
928
|
type: "text",
|
|
@@ -933,18 +934,18 @@
|
|
|
933
934
|
onFocus: _cache[1] || (_cache[1] = $event => vue.isRef(needBackSection) ? needBackSection.value = true : needBackSection = true),
|
|
934
935
|
onPaste: _cache[2] || (_cache[2] = $event => vue.isRef(needBackSection) ? needBackSection.value = false : needBackSection = false),
|
|
935
936
|
onBlur: _cache[3] || (_cache[3] = $event => formatOnEnd(true))
|
|
936
|
-
}, null, 40, _hoisted_3$
|
|
937
|
+
}, null, 40, _hoisted_3$7), [[vue.vModelText, displayValueRef.value]]), vue.unref(controls) == "default" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
937
938
|
key: 0
|
|
938
939
|
}, [vue.createElementVNode("div", {
|
|
939
940
|
class: "controls default subtract",
|
|
940
941
|
onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
|
|
941
|
-
}, [vue.createVNode(_sfc_main$
|
|
942
|
+
}, [vue.createVNode(_sfc_main$A, {
|
|
942
943
|
type: "subtract",
|
|
943
944
|
size: 20
|
|
944
945
|
})]), vue.createElementVNode("div", {
|
|
945
946
|
class: "controls default plus",
|
|
946
947
|
onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
|
|
947
|
-
}, [vue.createVNode(_sfc_main$
|
|
948
|
+
}, [vue.createVNode(_sfc_main$A, {
|
|
948
949
|
type: "plus",
|
|
949
950
|
size: 20
|
|
950
951
|
})])], 64)) : vue.unref(controls) == "right" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
@@ -952,38 +953,38 @@
|
|
|
952
953
|
}, [vue.createElementVNode("div", {
|
|
953
954
|
class: "controls right plus",
|
|
954
955
|
onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
|
|
955
|
-
}, [vue.createVNode(_sfc_main$
|
|
956
|
+
}, [vue.createVNode(_sfc_main$A, {
|
|
956
957
|
type: "arrow",
|
|
957
958
|
size: 20,
|
|
958
959
|
rotate: 270
|
|
959
960
|
})]), vue.createElementVNode("div", {
|
|
960
961
|
class: "controls right subtract",
|
|
961
962
|
onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
|
|
962
|
-
}, [vue.createVNode(_sfc_main$
|
|
963
|
+
}, [vue.createVNode(_sfc_main$A, {
|
|
963
964
|
type: "arrow",
|
|
964
965
|
size: 20,
|
|
965
966
|
rotate: 90
|
|
966
|
-
})])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
967
|
+
})])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [vue.createElementVNode("span", {
|
|
967
968
|
class: "ellipsis",
|
|
968
969
|
textContent: vue.toDisplayString(vue.unref(suffix))
|
|
969
|
-
}, null, 8, _hoisted_5$
|
|
970
|
+
}, null, 8, _hoisted_5$3)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
970
971
|
key: 2,
|
|
971
972
|
class: "number-util ellipsis",
|
|
972
973
|
title: upperTextRef.value,
|
|
973
974
|
textContent: vue.toDisplayString(`大写:${upperTextRef.value || ""}`)
|
|
974
|
-
}, null, 8, _hoisted_6$
|
|
975
|
+
}, null, 8, _hoisted_6$2)) : vue.createCommentVNode("", true), vue.unref(thousands) == "below" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
975
976
|
key: 3,
|
|
976
977
|
class: "number-util ellipsis",
|
|
977
978
|
title: thousandsTextRef.value,
|
|
978
979
|
textContent: vue.toDisplayString(`千分位:${thousandsTextRef.value || ""}`)
|
|
979
|
-
}, null, 8, _hoisted_7)) : vue.createCommentVNode("", true)], 2);
|
|
980
|
+
}, null, 8, _hoisted_7$1)) : vue.createCommentVNode("", true)], 2);
|
|
980
981
|
};
|
|
981
982
|
}
|
|
982
983
|
});
|
|
983
984
|
|
|
984
|
-
const _hoisted_1$
|
|
985
|
+
const _hoisted_1$d = ["placeholder", "readonly"];
|
|
985
986
|
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";
|
|
986
|
-
var _sfc_main$
|
|
987
|
+
var _sfc_main$t = vue.defineComponent({
|
|
987
988
|
...{
|
|
988
989
|
name: "Search",
|
|
989
990
|
inheritAttrs: true
|
|
@@ -1028,9 +1029,9 @@
|
|
|
1028
1029
|
readonly: __props.readonly,
|
|
1029
1030
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
1030
1031
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
1031
|
-
}, null, 40, _hoisted_1$
|
|
1032
|
+
}, null, 40, _hoisted_1$d), [[vue.vModelText, textModel.value, void 0, {
|
|
1032
1033
|
trim: true
|
|
1033
|
-
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$
|
|
1034
|
+
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$A, {
|
|
1034
1035
|
class: "search-button",
|
|
1035
1036
|
type: "custom",
|
|
1036
1037
|
draw: searchIon,
|
|
@@ -1251,11 +1252,11 @@
|
|
|
1251
1252
|
}
|
|
1252
1253
|
}
|
|
1253
1254
|
|
|
1254
|
-
const _hoisted_1$
|
|
1255
|
+
const _hoisted_1$c = {
|
|
1255
1256
|
class: "snail-confirm flex-column"
|
|
1256
1257
|
};
|
|
1257
|
-
const _hoisted_2$
|
|
1258
|
-
var _sfc_main$
|
|
1258
|
+
const _hoisted_2$8 = ["innerHTML"];
|
|
1259
|
+
var _sfc_main$s = vue.defineComponent({
|
|
1259
1260
|
...{
|
|
1260
1261
|
name: "ConfirmContainer",
|
|
1261
1262
|
inheritAttrs: true
|
|
@@ -1283,14 +1284,14 @@
|
|
|
1283
1284
|
},
|
|
1284
1285
|
setup(__props) {
|
|
1285
1286
|
return (_ctx, _cache) => {
|
|
1286
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1287
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createVNode(_sfc_main$w, {
|
|
1287
1288
|
"use-to": "dialog",
|
|
1288
1289
|
title: __props.title || "提示",
|
|
1289
1290
|
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
1290
1291
|
}, null, 8, ["title"]), vue.createElementVNode("div", {
|
|
1291
1292
|
class: "confirm-body",
|
|
1292
1293
|
innerHTML: __props.message || "请确认?"
|
|
1293
|
-
}, null, 8, _hoisted_2$
|
|
1294
|
+
}, null, 8, _hoisted_2$8), vue.createVNode(_sfc_main$x, {
|
|
1294
1295
|
align: "right",
|
|
1295
1296
|
"cancel-name": __props.cancelName,
|
|
1296
1297
|
"cancel-disabled": __props.cancelDisabled,
|
|
@@ -1303,7 +1304,7 @@
|
|
|
1303
1304
|
}
|
|
1304
1305
|
});
|
|
1305
1306
|
|
|
1306
|
-
var _sfc_main$
|
|
1307
|
+
var _sfc_main$r = vue.defineComponent({
|
|
1307
1308
|
...{
|
|
1308
1309
|
name: "Loading",
|
|
1309
1310
|
inheritAttrs: true
|
|
@@ -1342,7 +1343,7 @@
|
|
|
1342
1343
|
}
|
|
1343
1344
|
});
|
|
1344
1345
|
|
|
1345
|
-
var _sfc_main$
|
|
1346
|
+
var _sfc_main$q = vue.defineComponent({
|
|
1346
1347
|
...{
|
|
1347
1348
|
name: "Dynamic",
|
|
1348
1349
|
inheritAttrs: false
|
|
@@ -1366,7 +1367,7 @@
|
|
|
1366
1367
|
const loadingComponent = vue.defineComponent({
|
|
1367
1368
|
inheritAttrs: false,
|
|
1368
1369
|
components: {
|
|
1369
|
-
Loading: _sfc_main$
|
|
1370
|
+
Loading: _sfc_main$r
|
|
1370
1371
|
},
|
|
1371
1372
|
template: "<Loading :mask-disabled='true' />"
|
|
1372
1373
|
});
|
|
@@ -1433,7 +1434,7 @@
|
|
|
1433
1434
|
}
|
|
1434
1435
|
});
|
|
1435
1436
|
|
|
1436
|
-
var _sfc_main$
|
|
1437
|
+
var _sfc_main$p = vue.defineComponent({
|
|
1437
1438
|
...{
|
|
1438
1439
|
name: "DialogContainer",
|
|
1439
1440
|
inheritAttrs: true
|
|
@@ -1478,7 +1479,7 @@
|
|
|
1478
1479
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
|
|
1479
1480
|
__props.options.closeOnMask && vue.unref(closePopup)();
|
|
1480
1481
|
}, ["self"]))
|
|
1481
|
-
}, [vue.createVNode(_sfc_main$
|
|
1482
|
+
}, [vue.createVNode(_sfc_main$q, vue.mergeProps({
|
|
1482
1483
|
class: "dialog-body",
|
|
1483
1484
|
name: __props.options.name,
|
|
1484
1485
|
component: __props.options.component,
|
|
@@ -1493,7 +1494,7 @@
|
|
|
1493
1494
|
}
|
|
1494
1495
|
});
|
|
1495
1496
|
|
|
1496
|
-
var _sfc_main$
|
|
1497
|
+
var _sfc_main$o = vue.defineComponent({
|
|
1497
1498
|
...{
|
|
1498
1499
|
name: "FollowContainer",
|
|
1499
1500
|
inheritAttrs: true
|
|
@@ -1614,7 +1615,7 @@
|
|
|
1614
1615
|
});
|
|
1615
1616
|
});
|
|
1616
1617
|
return (_ctx, _cache) => {
|
|
1617
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1618
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
|
|
1618
1619
|
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1619
1620
|
style: {
|
|
1620
1621
|
"z-index": __props.zIndex
|
|
@@ -1631,7 +1632,7 @@
|
|
|
1631
1632
|
}
|
|
1632
1633
|
});
|
|
1633
1634
|
|
|
1634
|
-
var _sfc_main$
|
|
1635
|
+
var _sfc_main$n = vue.defineComponent({
|
|
1635
1636
|
...{
|
|
1636
1637
|
name: "PopupContainer",
|
|
1637
1638
|
inheritAttrs: true
|
|
@@ -1651,7 +1652,7 @@
|
|
|
1651
1652
|
model = vue.shallowRef(void 0)
|
|
1652
1653
|
} = __props.options;
|
|
1653
1654
|
return (_ctx, _cache) => {
|
|
1654
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1655
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
|
|
1655
1656
|
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1656
1657
|
style: {
|
|
1657
1658
|
"z-index": __props.zIndex
|
|
@@ -1669,12 +1670,12 @@
|
|
|
1669
1670
|
}
|
|
1670
1671
|
});
|
|
1671
1672
|
|
|
1672
|
-
const _hoisted_1$
|
|
1673
|
+
const _hoisted_1$b = {
|
|
1673
1674
|
key: 1,
|
|
1674
1675
|
class: "icon"
|
|
1675
1676
|
};
|
|
1676
|
-
const _hoisted_2$
|
|
1677
|
-
var _sfc_main$
|
|
1677
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
1678
|
+
var _sfc_main$m = vue.defineComponent({
|
|
1678
1679
|
...{
|
|
1679
1680
|
name: "ToastContainer",
|
|
1680
1681
|
inheritAttrs: true
|
|
@@ -1712,7 +1713,7 @@
|
|
|
1712
1713
|
}),
|
|
1713
1714
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1714
1715
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1715
|
-
}, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1716
|
+
}, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
1716
1717
|
key: 0,
|
|
1717
1718
|
class: "close-icon",
|
|
1718
1719
|
type: "close",
|
|
@@ -1723,21 +1724,21 @@
|
|
|
1723
1724
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1724
1725
|
vue.unref(closePopup)();
|
|
1725
1726
|
})
|
|
1726
|
-
}, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1727
|
+
}, null, 8, ["fill"])) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [vue.createVNode(_sfc_main$A, {
|
|
1727
1728
|
type: vue.unref(props).type,
|
|
1728
1729
|
fill: "#707070",
|
|
1729
1730
|
size: 20
|
|
1730
1731
|
}, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
1731
1732
|
class: "message",
|
|
1732
1733
|
innerHTML: vue.unref(props).message
|
|
1733
|
-
}, null, 8, _hoisted_2$
|
|
1734
|
+
}, null, 8, _hoisted_2$7)], 38);
|
|
1734
1735
|
};
|
|
1735
1736
|
}
|
|
1736
1737
|
});
|
|
1737
1738
|
|
|
1738
1739
|
function usePopup() {
|
|
1739
1740
|
function popup(options) {
|
|
1740
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1741
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$n, options);
|
|
1741
1742
|
return addScope2Scopes(scope);
|
|
1742
1743
|
}
|
|
1743
1744
|
function dialog(options) {
|
|
@@ -1770,7 +1771,7 @@
|
|
|
1770
1771
|
},
|
|
1771
1772
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1772
1773
|
});
|
|
1773
|
-
const descriptor = openPopup(_sfc_main$
|
|
1774
|
+
const descriptor = openPopup(_sfc_main$p, options, extOptions);
|
|
1774
1775
|
scope = snail_core.useAsyncScope(deferred.promise);
|
|
1775
1776
|
monitorDialog(descriptor, scope, deferred);
|
|
1776
1777
|
}
|
|
@@ -1788,14 +1789,14 @@
|
|
|
1788
1789
|
inPopup: "follow",
|
|
1789
1790
|
target
|
|
1790
1791
|
};
|
|
1791
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1792
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$o, options, extOptions);
|
|
1792
1793
|
}
|
|
1793
1794
|
return addScope2Scopes(scope);
|
|
1794
1795
|
}
|
|
1795
1796
|
function confirm(title, message, options) {
|
|
1796
1797
|
options = options || Object.create(null);
|
|
1797
1798
|
return dialog({
|
|
1798
|
-
component: _sfc_main$
|
|
1799
|
+
component: _sfc_main$s,
|
|
1799
1800
|
closeOnEscape: true,
|
|
1800
1801
|
props: {
|
|
1801
1802
|
...options,
|
|
@@ -1805,7 +1806,7 @@
|
|
|
1805
1806
|
});
|
|
1806
1807
|
}
|
|
1807
1808
|
function toast(type, message, options) {
|
|
1808
|
-
return popupInCustomContainer(_sfc_main$
|
|
1809
|
+
return popupInCustomContainer(_sfc_main$m, {
|
|
1809
1810
|
url: "#ToastContainer",
|
|
1810
1811
|
props: {
|
|
1811
1812
|
...(options || Object.create(null)),
|
|
@@ -1838,7 +1839,7 @@
|
|
|
1838
1839
|
},
|
|
1839
1840
|
...extOptions
|
|
1840
1841
|
});
|
|
1841
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1842
|
+
const descriptor = openPopup(container || _sfc_main$n, options, extOptions);
|
|
1842
1843
|
const scope = snail_core.useAsyncScope(deferred.promise);
|
|
1843
1844
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1844
1845
|
return scope;
|
|
@@ -1976,12 +1977,12 @@
|
|
|
1976
1977
|
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==";
|
|
1977
1978
|
}
|
|
1978
1979
|
|
|
1979
|
-
const _hoisted_1$
|
|
1980
|
+
const _hoisted_1$a = {
|
|
1980
1981
|
class: "snail-empty"
|
|
1981
1982
|
};
|
|
1982
|
-
const _hoisted_2$
|
|
1983
|
-
const _hoisted_3$
|
|
1984
|
-
var _sfc_main$
|
|
1983
|
+
const _hoisted_2$6 = ["src"];
|
|
1984
|
+
const _hoisted_3$6 = ["textContent"];
|
|
1985
|
+
var _sfc_main$l = vue.defineComponent({
|
|
1985
1986
|
...{
|
|
1986
1987
|
name: "Empty",
|
|
1987
1988
|
inheritAttrs: true
|
|
@@ -1994,23 +1995,23 @@
|
|
|
1994
1995
|
setup(__props) {
|
|
1995
1996
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1996
1997
|
return (_ctx, _cache) => {
|
|
1997
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1998
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("img", {
|
|
1998
1999
|
src: __props.imageUrl || vue.unref(defaultImageBase64)
|
|
1999
|
-
}, null, 8, _hoisted_2$
|
|
2000
|
+
}, null, 8, _hoisted_2$6), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
|
|
2000
2001
|
class: "message",
|
|
2001
2002
|
textContent: vue.toDisplayString(__props.message || "无数据")
|
|
2002
|
-
}, null, 8, _hoisted_3$
|
|
2003
|
+
}, null, 8, _hoisted_3$6)])]);
|
|
2003
2004
|
};
|
|
2004
2005
|
}
|
|
2005
2006
|
});
|
|
2006
2007
|
|
|
2007
|
-
const _hoisted_1$
|
|
2008
|
-
const _hoisted_2$
|
|
2009
|
-
const _hoisted_3$
|
|
2008
|
+
const _hoisted_1$9 = ["title"];
|
|
2009
|
+
const _hoisted_2$5 = ["textContent"];
|
|
2010
|
+
const _hoisted_3$5 = {
|
|
2010
2011
|
key: 1,
|
|
2011
2012
|
class: "select-status"
|
|
2012
2013
|
};
|
|
2013
|
-
var _sfc_main$
|
|
2014
|
+
var _sfc_main$k = vue.defineComponent({
|
|
2014
2015
|
...{
|
|
2015
2016
|
name: "SelectNode",
|
|
2016
2017
|
inheritAttrs: true
|
|
@@ -2055,15 +2056,15 @@
|
|
|
2055
2056
|
}, [vue.createElementVNode("div", {
|
|
2056
2057
|
class: "item-text ellipsis",
|
|
2057
2058
|
textContent: vue.toDisplayString(__props.item.text)
|
|
2058
|
-
}, null, 8, _hoisted_2$
|
|
2059
|
+
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
2059
2060
|
key: 0,
|
|
2060
2061
|
type: "arrow",
|
|
2061
2062
|
color: "#8a9099"
|
|
2062
|
-
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
2063
|
+
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$A, {
|
|
2063
2064
|
type: "success",
|
|
2064
2065
|
color: "white",
|
|
2065
2066
|
size: 12
|
|
2066
|
-
})])) : vue.createCommentVNode("", true)], 42, _hoisted_1$
|
|
2067
|
+
})])) : vue.createCommentVNode("", true)], 42, _hoisted_1$9)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
2067
2068
|
key: 1
|
|
2068
2069
|
}, vue.renderList(vue.unref(showChildrenRef), child => {
|
|
2069
2070
|
return vue.openBlock(), vue.createBlock(_component_SelectNode, {
|
|
@@ -2080,7 +2081,7 @@
|
|
|
2080
2081
|
}
|
|
2081
2082
|
});
|
|
2082
2083
|
|
|
2083
|
-
var _sfc_main$
|
|
2084
|
+
var _sfc_main$j = vue.defineComponent({
|
|
2084
2085
|
...{
|
|
2085
2086
|
name: "Select2Popup",
|
|
2086
2087
|
inheritAttrs: true
|
|
@@ -2252,13 +2253,13 @@
|
|
|
2252
2253
|
key: 0
|
|
2253
2254
|
}, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2254
2255
|
key: 1
|
|
2255
|
-
}, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2256
|
+
}, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
|
|
2256
2257
|
key: 0
|
|
2257
2258
|
}, __props.search, {
|
|
2258
2259
|
onSearch,
|
|
2259
2260
|
key: "select-search"
|
|
2260
2261
|
}), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
|
|
2261
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2262
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
2262
2263
|
key: vue.unref(context).getKey(item),
|
|
2263
2264
|
multiple: __props.multiple,
|
|
2264
2265
|
item,
|
|
@@ -2267,7 +2268,7 @@
|
|
|
2267
2268
|
onEnter: onEnterSelectNode,
|
|
2268
2269
|
onClick: onClickSelectNode
|
|
2269
2270
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2270
|
-
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2271
|
+
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
2271
2272
|
key: 1,
|
|
2272
2273
|
message: "无结果"
|
|
2273
2274
|
})) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -2279,20 +2280,20 @@
|
|
|
2279
2280
|
}
|
|
2280
2281
|
});
|
|
2281
2282
|
|
|
2282
|
-
const _hoisted_1$
|
|
2283
|
+
const _hoisted_1$8 = {
|
|
2283
2284
|
key: 0,
|
|
2284
2285
|
class: "select-result"
|
|
2285
2286
|
};
|
|
2286
|
-
const _hoisted_2$
|
|
2287
|
-
const _hoisted_3$
|
|
2288
|
-
const _hoisted_4$
|
|
2287
|
+
const _hoisted_2$4 = ["title", "textContent"];
|
|
2288
|
+
const _hoisted_3$4 = ["textContent"];
|
|
2289
|
+
const _hoisted_4$4 = {
|
|
2289
2290
|
key: 1,
|
|
2290
2291
|
class: "placeholder"
|
|
2291
2292
|
};
|
|
2292
2293
|
onAppCreated((app, type) => {
|
|
2293
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2294
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$j);
|
|
2294
2295
|
});
|
|
2295
|
-
var _sfc_main$
|
|
2296
|
+
var _sfc_main$i = vue.defineComponent({
|
|
2296
2297
|
...{
|
|
2297
2298
|
name: "Select",
|
|
2298
2299
|
inheritAttrs: true
|
|
@@ -2424,15 +2425,15 @@
|
|
|
2424
2425
|
ref: "select"
|
|
2425
2426
|
}, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2426
2427
|
key: 0
|
|
2427
|
-
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2428
|
+
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
|
|
2428
2429
|
class: "select-text ellipsis",
|
|
2429
2430
|
title: selectedTextRef.value,
|
|
2430
2431
|
textContent: vue.toDisplayString(selectedTextRef.value)
|
|
2431
|
-
}, null, 8, _hoisted_2$
|
|
2432
|
+
}, null, 8, _hoisted_2$4)])])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
2432
2433
|
key: 1,
|
|
2433
2434
|
class: "placeholder",
|
|
2434
2435
|
textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2435
|
-
}, null, 8, _hoisted_3$
|
|
2436
|
+
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
2436
2437
|
key: 2,
|
|
2437
2438
|
type: "arrow",
|
|
2438
2439
|
size: 24,
|
|
@@ -2440,12 +2441,12 @@
|
|
|
2440
2441
|
style: {
|
|
2441
2442
|
"transform": "rotate(90deg)"
|
|
2442
2443
|
}
|
|
2443
|
-
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
2444
|
+
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
|
|
2444
2445
|
};
|
|
2445
2446
|
}
|
|
2446
2447
|
});
|
|
2447
2448
|
|
|
2448
|
-
var _sfc_main$
|
|
2449
|
+
var _sfc_main$h = vue.defineComponent({
|
|
2449
2450
|
...{
|
|
2450
2451
|
name: "Switch",
|
|
2451
2452
|
inheritAttrs: true
|
|
@@ -2494,8 +2495,8 @@
|
|
|
2494
2495
|
}
|
|
2495
2496
|
});
|
|
2496
2497
|
|
|
2497
|
-
const _hoisted_1$
|
|
2498
|
-
var _sfc_main$
|
|
2498
|
+
const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
|
|
2499
|
+
var _sfc_main$g = vue.defineComponent({
|
|
2499
2500
|
...{
|
|
2500
2501
|
name: "Textarea"
|
|
2501
2502
|
},
|
|
@@ -2555,25 +2556,100 @@
|
|
|
2555
2556
|
onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
|
|
2556
2557
|
onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
|
|
2557
2558
|
onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
|
|
2558
|
-
}), null, 16, _hoisted_1$
|
|
2559
|
+
}), null, 16, _hoisted_1$7)), [[vue.vModelText, valueModel.value]]);
|
|
2559
2560
|
};
|
|
2560
2561
|
}
|
|
2561
2562
|
});
|
|
2562
2563
|
|
|
2563
|
-
|
|
2564
|
+
var _sfc_main$f = vue.defineComponent({
|
|
2565
|
+
__name: "transitions",
|
|
2566
|
+
props: {
|
|
2567
|
+
group: {
|
|
2568
|
+
type: Boolean
|
|
2569
|
+
},
|
|
2570
|
+
duration: {},
|
|
2571
|
+
customClass: {},
|
|
2572
|
+
effect: {}
|
|
2573
|
+
},
|
|
2574
|
+
setup(__props) {
|
|
2575
|
+
const props = __props;
|
|
2576
|
+
const classNames = vue.computed(() => {
|
|
2577
|
+
const array = [props.customClass || "snail-transition"];
|
|
2578
|
+
if (snail_core.isArray(props.effect)) {
|
|
2579
|
+
props.effect.length > 0 ? array.push(...props.effect) : array.push("fade");
|
|
2580
|
+
} else {
|
|
2581
|
+
array.push(props.effect || "fade");
|
|
2582
|
+
}
|
|
2583
|
+
props.duration === 0 && array.push("no-duration");
|
|
2584
|
+
return array.join(" ");
|
|
2585
|
+
});
|
|
2586
|
+
return (_ctx, _cache) => {
|
|
2587
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.group ? vue.TransitionGroup : vue.Transition), {
|
|
2588
|
+
appear: "",
|
|
2589
|
+
duration: __props.duration,
|
|
2590
|
+
"enter-active-class": `${classNames.value} enter-active`,
|
|
2591
|
+
"enter-from-class": `${classNames.value} enter-from`,
|
|
2592
|
+
"enter-to-class": `${classNames.value} enter-to`,
|
|
2593
|
+
"leave-active-class": `${classNames.value} leave-active`,
|
|
2594
|
+
"leave-from-class": `${classNames.value} leave-from`,
|
|
2595
|
+
"leave-to-class": `${classNames.value} leave-to`
|
|
2596
|
+
}, {
|
|
2597
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
2598
|
+
_: 3
|
|
2599
|
+
}, 8, ["duration", "enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
|
|
2600
|
+
};
|
|
2601
|
+
}
|
|
2602
|
+
});
|
|
2603
|
+
|
|
2604
|
+
var _sfc_main$e = vue.defineComponent({
|
|
2605
|
+
__name: "element",
|
|
2606
|
+
props: {
|
|
2607
|
+
tag: {},
|
|
2608
|
+
show: {
|
|
2609
|
+
type: Boolean
|
|
2610
|
+
},
|
|
2611
|
+
showMode: {},
|
|
2612
|
+
transition: {},
|
|
2613
|
+
children: {}
|
|
2614
|
+
},
|
|
2615
|
+
setup(__props) {
|
|
2616
|
+
return (_ctx, _cache) => {
|
|
2617
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
|
|
2618
|
+
group: false
|
|
2619
|
+
}, __props.transition, {
|
|
2620
|
+
duration: __props.transition ? __props.transition.duration : 0
|
|
2621
|
+
}), {
|
|
2622
|
+
default: vue.withCtx(() => [(__props.showMode == "vShow" ? true : __props.show) ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(snail_core.correctString)(__props.tag, "div", true)), {
|
|
2623
|
+
key: 0
|
|
2624
|
+
}, {
|
|
2625
|
+
default: vue.withCtx(() => [vue.createVNode(_sfc_main$f, vue.mergeProps(__props.children, {
|
|
2626
|
+
duration: __props.children ? __props.children.duration : 0
|
|
2627
|
+
}), {
|
|
2628
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
2629
|
+
_: 3
|
|
2630
|
+
}, 16, ["duration"])]),
|
|
2631
|
+
_: 3
|
|
2632
|
+
}, 512)), [[vue.vShow, __props.showMode == "vShow" ? __props.show : true]]) : vue.createCommentVNode("", true)]),
|
|
2633
|
+
_: 3
|
|
2634
|
+
}, 16, ["duration"]);
|
|
2635
|
+
};
|
|
2636
|
+
}
|
|
2637
|
+
});
|
|
2638
|
+
|
|
2639
|
+
const _hoisted_1$6 = {
|
|
2564
2640
|
class: "fold-header"
|
|
2565
2641
|
};
|
|
2566
|
-
const _hoisted_2$
|
|
2567
|
-
const _hoisted_3$
|
|
2568
|
-
const _hoisted_4$
|
|
2642
|
+
const _hoisted_2$3 = ["textContent"];
|
|
2643
|
+
const _hoisted_3$3 = ["textContent"];
|
|
2644
|
+
const _hoisted_4$3 = {
|
|
2569
2645
|
key: 1,
|
|
2570
2646
|
class: "status"
|
|
2571
2647
|
};
|
|
2572
|
-
const _hoisted_5$
|
|
2648
|
+
const _hoisted_5$2 = {
|
|
2573
2649
|
class: "fold-body",
|
|
2574
2650
|
ref: "foldBody"
|
|
2575
2651
|
};
|
|
2576
|
-
var _sfc_main$
|
|
2652
|
+
var _sfc_main$d = vue.defineComponent({
|
|
2577
2653
|
...{
|
|
2578
2654
|
name: "Fold",
|
|
2579
2655
|
inheritAttrs: true
|
|
@@ -2643,23 +2719,23 @@
|
|
|
2643
2719
|
return (_ctx, _cache) => {
|
|
2644
2720
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2645
2721
|
class: vue.normalizeClass(["snail-fold", statusModel.value])
|
|
2646
|
-
}, [vue.createElementVNode("div", _hoisted_1$
|
|
2722
|
+
}, [vue.createElementVNode("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
|
|
2647
2723
|
class: "title ellipsis",
|
|
2648
2724
|
textContent: vue.toDisplayString(__props.title)
|
|
2649
|
-
}, null, 8, _hoisted_2$
|
|
2725
|
+
}, null, 8, _hoisted_2$3), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2650
2726
|
key: 0,
|
|
2651
2727
|
class: "subtitle ellipsis",
|
|
2652
2728
|
textContent: vue.toDisplayString(__props.subtitle)
|
|
2653
|
-
}, null, 8, _hoisted_3$
|
|
2729
|
+
}, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$A, {
|
|
2654
2730
|
type: "arrow",
|
|
2655
2731
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2656
2732
|
onClick: onStatusClick
|
|
2657
|
-
}, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5$
|
|
2733
|
+
}, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5$2, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2658
2734
|
};
|
|
2659
2735
|
}
|
|
2660
2736
|
});
|
|
2661
2737
|
|
|
2662
|
-
var _sfc_main$
|
|
2738
|
+
var _sfc_main$c = vue.defineComponent({
|
|
2663
2739
|
...{
|
|
2664
2740
|
name: "Scroll",
|
|
2665
2741
|
inheritAttrs: true
|
|
@@ -2789,11 +2865,11 @@
|
|
|
2789
2865
|
}
|
|
2790
2866
|
});
|
|
2791
2867
|
|
|
2792
|
-
var _sfc_main$
|
|
2868
|
+
var _sfc_main$b = vue.defineComponent({
|
|
2793
2869
|
__name: "layout",
|
|
2794
2870
|
props: {
|
|
2795
2871
|
mode: {},
|
|
2796
|
-
|
|
2872
|
+
main: {},
|
|
2797
2873
|
left: {},
|
|
2798
2874
|
right: {},
|
|
2799
2875
|
top: {},
|
|
@@ -2803,8 +2879,8 @@
|
|
|
2803
2879
|
const props = __props;
|
|
2804
2880
|
const areaMap = vue.computed(() => {
|
|
2805
2881
|
const map = Object.create(null);
|
|
2806
|
-
map.
|
|
2807
|
-
scrollable: props.
|
|
2882
|
+
map.main = {
|
|
2883
|
+
scrollable: props.main && props.main.scroll != void 0,
|
|
2808
2884
|
class: "main-area",
|
|
2809
2885
|
style: void 0
|
|
2810
2886
|
};
|
|
@@ -2850,12 +2926,12 @@
|
|
|
2850
2926
|
return (_ctx, _cache) => {
|
|
2851
2927
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2852
2928
|
class: vue.normalizeClass(["snail-layout", __props.mode])
|
|
2853
|
-
}, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["top", "left", "
|
|
2929
|
+
}, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["top", "left", "main", "right", "bottom"], item => {
|
|
2854
2930
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2855
2931
|
key: item
|
|
2856
2932
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2857
2933
|
key: 0
|
|
2858
|
-
}, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2934
|
+
}, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$c, vue.mergeProps({
|
|
2859
2935
|
key: 0,
|
|
2860
2936
|
class: areaMap.value[item].class,
|
|
2861
2937
|
style: areaMap.value[item].style
|
|
@@ -2874,6 +2950,36 @@
|
|
|
2874
2950
|
}
|
|
2875
2951
|
});
|
|
2876
2952
|
|
|
2953
|
+
var _sfc_main$a = vue.defineComponent({
|
|
2954
|
+
__name: "motion",
|
|
2955
|
+
props: {
|
|
2956
|
+
enter: {},
|
|
2957
|
+
leave: {},
|
|
2958
|
+
multiple: {
|
|
2959
|
+
type: Boolean
|
|
2960
|
+
},
|
|
2961
|
+
duration: {},
|
|
2962
|
+
mode: {}
|
|
2963
|
+
},
|
|
2964
|
+
setup(__props) {
|
|
2965
|
+
const props = __props;
|
|
2966
|
+
const duration = snail_core.correctNumber(props.duration, 200);
|
|
2967
|
+
return (_ctx, _cache) => {
|
|
2968
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.multiple ? vue.TransitionGroup : vue.Transition), {
|
|
2969
|
+
appear: "",
|
|
2970
|
+
type: "animation",
|
|
2971
|
+
duration: vue.unref(duration),
|
|
2972
|
+
mode: __props.mode,
|
|
2973
|
+
"enter-active-class": vue.unref(snail_core.correctString)(props.enter, "fade-in", true),
|
|
2974
|
+
"leave-active-class": vue.unref(snail_core.correctString)(props.leave, "fade-out", true)
|
|
2975
|
+
}, {
|
|
2976
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
2977
|
+
_: 3
|
|
2978
|
+
}, 8, ["duration", "mode", "enter-active-class", "leave-active-class"]);
|
|
2979
|
+
};
|
|
2980
|
+
}
|
|
2981
|
+
});
|
|
2982
|
+
|
|
2877
2983
|
var _sfc_main$9 = vue.defineComponent({
|
|
2878
2984
|
...{
|
|
2879
2985
|
name: "Sort",
|
|
@@ -2975,7 +3081,7 @@
|
|
|
2975
3081
|
}
|
|
2976
3082
|
});
|
|
2977
3083
|
|
|
2978
|
-
const _hoisted_1$
|
|
3084
|
+
const _hoisted_1$5 = {
|
|
2979
3085
|
class: "table-body"
|
|
2980
3086
|
};
|
|
2981
3087
|
var _sfc_main$8 = vue.defineComponent({
|
|
@@ -3003,7 +3109,7 @@
|
|
|
3003
3109
|
const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
|
|
3004
3110
|
const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
|
|
3005
3111
|
return (_ctx, _cache) => {
|
|
3006
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3112
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$c, {
|
|
3007
3113
|
class: vue.normalizeClass(["snail-table", {
|
|
3008
3114
|
"start-border": __props.border == true
|
|
3009
3115
|
}]),
|
|
@@ -3013,7 +3119,7 @@
|
|
|
3013
3119
|
default: vue.withCtx(() => [vue.createElementVNode("div", {
|
|
3014
3120
|
class: "table-header",
|
|
3015
3121
|
style: vue.normalizeStyle(hStyleRef.value)
|
|
3016
|
-
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$
|
|
3122
|
+
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$5, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
|
|
3017
3123
|
class: "table-footer",
|
|
3018
3124
|
style: vue.normalizeStyle(fStyleRef.value)
|
|
3019
3125
|
}, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -3092,60 +3198,20 @@
|
|
|
3092
3198
|
}
|
|
3093
3199
|
});
|
|
3094
3200
|
|
|
3095
|
-
|
|
3096
|
-
__name: "transitions",
|
|
3097
|
-
props: {
|
|
3098
|
-
group: {
|
|
3099
|
-
type: Boolean
|
|
3100
|
-
},
|
|
3101
|
-
duration: {},
|
|
3102
|
-
customClass: {},
|
|
3103
|
-
effect: {}
|
|
3104
|
-
},
|
|
3105
|
-
setup(__props) {
|
|
3106
|
-
const props = __props;
|
|
3107
|
-
const classNames = vue.computed(() => {
|
|
3108
|
-
const array = [props.customClass || "snail-transition"];
|
|
3109
|
-
if (snail_core.isArray(props.effect)) {
|
|
3110
|
-
props.effect.length > 0 ? array.push(...props.effect) : array.push("fade");
|
|
3111
|
-
} else {
|
|
3112
|
-
array.push(props.effect || "fade");
|
|
3113
|
-
}
|
|
3114
|
-
console.log(array);
|
|
3115
|
-
return array.join(" ");
|
|
3116
|
-
});
|
|
3117
|
-
return (_ctx, _cache) => {
|
|
3118
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.group ? vue.TransitionGroup : vue.Transition), vue.mergeProps(_ctx.$attrs, {
|
|
3119
|
-
appear: "",
|
|
3120
|
-
duration: __props.duration,
|
|
3121
|
-
"enter-active-class": `${classNames.value} enter-active`,
|
|
3122
|
-
"enter-from-class": `${classNames.value} enter-from`,
|
|
3123
|
-
"enter-to-class": `${classNames.value} enter-to`,
|
|
3124
|
-
"leave-active-class": `${classNames.value} leave-active`,
|
|
3125
|
-
"leave-from-class": `${classNames.value} leave-from`,
|
|
3126
|
-
"leave-to-class": `${classNames.value} leave-to`
|
|
3127
|
-
}), {
|
|
3128
|
-
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
3129
|
-
_: 3
|
|
3130
|
-
}, 16, ["duration", "enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
|
|
3131
|
-
};
|
|
3132
|
-
}
|
|
3133
|
-
});
|
|
3134
|
-
|
|
3135
|
-
const _hoisted_1$3 = {
|
|
3201
|
+
const _hoisted_1$4 = {
|
|
3136
3202
|
key: 0,
|
|
3137
3203
|
class: "node-fold"
|
|
3138
3204
|
};
|
|
3139
|
-
const _hoisted_2$
|
|
3140
|
-
const _hoisted_3$
|
|
3205
|
+
const _hoisted_2$2 = ["title", "textContent"];
|
|
3206
|
+
const _hoisted_3$2 = {
|
|
3141
3207
|
class: "node-slot ellipsis"
|
|
3142
3208
|
};
|
|
3143
|
-
const _hoisted_4$
|
|
3209
|
+
const _hoisted_4$2 = {
|
|
3144
3210
|
key: 1,
|
|
3145
3211
|
class: "snail-tree-children hidden",
|
|
3146
3212
|
ref: "children"
|
|
3147
3213
|
};
|
|
3148
|
-
var _sfc_main$
|
|
3214
|
+
var _sfc_main$5 = vue.defineComponent({
|
|
3149
3215
|
...{
|
|
3150
3216
|
name: "TreeNode",
|
|
3151
3217
|
inheritAttrs: true
|
|
@@ -3263,7 +3329,7 @@
|
|
|
3263
3329
|
key: 1
|
|
3264
3330
|
}, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
|
|
3265
3331
|
class: "indent"
|
|
3266
|
-
}, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3332
|
+
}, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
3267
3333
|
key: 0,
|
|
3268
3334
|
class: vue.normalizeClass(statusRef.value),
|
|
3269
3335
|
type: "custom",
|
|
@@ -3275,7 +3341,7 @@
|
|
|
3275
3341
|
class: "node-text ellipsis",
|
|
3276
3342
|
title: __props.node.text,
|
|
3277
3343
|
textContent: vue.toDisplayString(__props.node.text)
|
|
3278
|
-
}, null, 8, _hoisted_2$
|
|
3344
|
+
}, null, 8, _hoisted_2$2), vue.createElementVNode("div", _hoisted_3$2, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34)) : vue.createCommentVNode("", true), showRef.value && showChildrenRef.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
|
|
3279
3345
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
3280
3346
|
key: __props.context.getKey(child),
|
|
3281
3347
|
node: child,
|
|
@@ -3295,10 +3361,10 @@
|
|
|
3295
3361
|
}
|
|
3296
3362
|
});
|
|
3297
3363
|
|
|
3298
|
-
const _hoisted_1$
|
|
3364
|
+
const _hoisted_1$3 = {
|
|
3299
3365
|
class: "snail-tree"
|
|
3300
3366
|
};
|
|
3301
|
-
var _sfc_main$
|
|
3367
|
+
var _sfc_main$4 = vue.defineComponent({
|
|
3302
3368
|
...{
|
|
3303
3369
|
name: "Tree",
|
|
3304
3370
|
inheritAttrs: true
|
|
@@ -3332,15 +3398,15 @@
|
|
|
3332
3398
|
emits("click", node, parents);
|
|
3333
3399
|
}
|
|
3334
3400
|
return (_ctx, _cache) => {
|
|
3335
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3401
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
|
|
3336
3402
|
key: 0
|
|
3337
3403
|
}, __props.search, {
|
|
3338
3404
|
onSearch
|
|
3339
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3405
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$c, {
|
|
3340
3406
|
"scroll-y": true
|
|
3341
3407
|
}, {
|
|
3342
3408
|
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
|
|
3343
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3409
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$5, {
|
|
3344
3410
|
key: vue.unref(context).getKey(node),
|
|
3345
3411
|
node,
|
|
3346
3412
|
parent: void 0,
|
|
@@ -3361,7 +3427,7 @@
|
|
|
3361
3427
|
}
|
|
3362
3428
|
});
|
|
3363
3429
|
|
|
3364
|
-
var _sfc_main$
|
|
3430
|
+
var _sfc_main$3 = vue.defineComponent({
|
|
3365
3431
|
__name: "wrapper",
|
|
3366
3432
|
props: {
|
|
3367
3433
|
readonly: {
|
|
@@ -3383,14 +3449,14 @@
|
|
|
3383
3449
|
return (_ctx, _cache) => {
|
|
3384
3450
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3385
3451
|
class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
3386
|
-
}, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3452
|
+
}, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$w, vue.mergeProps({
|
|
3387
3453
|
key: 0
|
|
3388
3454
|
}, __props.header || {
|
|
3389
3455
|
useTo: "dialog",
|
|
3390
3456
|
title: "对话框"
|
|
3391
3457
|
}, {
|
|
3392
3458
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3393
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3459
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$c, vue.mergeProps({
|
|
3394
3460
|
class: "wrapper-body"
|
|
3395
3461
|
}, __props.content || {
|
|
3396
3462
|
scrollX: false,
|
|
@@ -3398,7 +3464,7 @@
|
|
|
3398
3464
|
}), {
|
|
3399
3465
|
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
3400
3466
|
_: 3
|
|
3401
|
-
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3467
|
+
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$x, vue.mergeProps({
|
|
3402
3468
|
key: 1
|
|
3403
3469
|
}, __props.footer || {}, {
|
|
3404
3470
|
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
@@ -3412,7 +3478,7 @@
|
|
|
3412
3478
|
snail_core.mustObject(options, "options");
|
|
3413
3479
|
target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
|
|
3414
3480
|
target.classList.add("snail-app");
|
|
3415
|
-
const app = vue.createApp(_sfc_main$
|
|
3481
|
+
const app = vue.createApp(_sfc_main$q, options);
|
|
3416
3482
|
triggerAppCreated(app);
|
|
3417
3483
|
app.mount(target);
|
|
3418
3484
|
const scope = snail_core.useScope().onDestroy(() => app.unmount());
|
|
@@ -3420,36 +3486,230 @@
|
|
|
3420
3486
|
return scope;
|
|
3421
3487
|
}
|
|
3422
3488
|
|
|
3423
|
-
const
|
|
3489
|
+
const MOTION = Object.freeze({
|
|
3490
|
+
"fade": {
|
|
3491
|
+
enter: "fade-in",
|
|
3492
|
+
leave: "fade-out"
|
|
3493
|
+
},
|
|
3494
|
+
"scale": {
|
|
3495
|
+
enter: "scale-in",
|
|
3496
|
+
leave: "scale-out"
|
|
3497
|
+
},
|
|
3498
|
+
"rotate": {
|
|
3499
|
+
enter: "rotate-in",
|
|
3500
|
+
leave: "rotate-out"
|
|
3501
|
+
},
|
|
3502
|
+
"top": {
|
|
3503
|
+
enter: "top-in",
|
|
3504
|
+
leave: "top-out"
|
|
3505
|
+
},
|
|
3506
|
+
"topBottom": {
|
|
3507
|
+
enter: "top-in",
|
|
3508
|
+
leave: "bottom-out"
|
|
3509
|
+
},
|
|
3510
|
+
"bottom": {
|
|
3511
|
+
enter: "bottom-in",
|
|
3512
|
+
leave: "bottom-out"
|
|
3513
|
+
},
|
|
3514
|
+
"bottomTop": {
|
|
3515
|
+
enter: "bottom-in",
|
|
3516
|
+
leave: "top-out"
|
|
3517
|
+
},
|
|
3518
|
+
"left": {
|
|
3519
|
+
enter: "left-in",
|
|
3520
|
+
leave: "left-out"
|
|
3521
|
+
},
|
|
3522
|
+
"leftRight": {
|
|
3523
|
+
enter: "left-in",
|
|
3524
|
+
leave: "right-out"
|
|
3525
|
+
},
|
|
3526
|
+
"right": {
|
|
3527
|
+
enter: "right-in",
|
|
3528
|
+
leave: "right-out"
|
|
3529
|
+
},
|
|
3530
|
+
"rightLeft": {
|
|
3531
|
+
enter: "right-in",
|
|
3532
|
+
leave: "left-out"
|
|
3533
|
+
}
|
|
3534
|
+
});
|
|
3535
|
+
for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
|
|
3536
|
+
|
|
3537
|
+
function initStepByFormat(format) {
|
|
3538
|
+
switch (format) {
|
|
3539
|
+
case "yyyy":
|
|
3540
|
+
return "year";
|
|
3541
|
+
case "yyyy-MM":
|
|
3542
|
+
return "month";
|
|
3543
|
+
default:
|
|
3544
|
+
return "day";
|
|
3545
|
+
}
|
|
3546
|
+
}
|
|
3547
|
+
function electDateValue(min, max) {
|
|
3548
|
+
return snail_core.getDateValue(new Date());
|
|
3549
|
+
}
|
|
3550
|
+
function buildYearItems(year, min, max) {
|
|
3551
|
+
year = year - 10;
|
|
3552
|
+
const items = new Array(18);
|
|
3553
|
+
for (var index = 0; index < items.length; index++) {
|
|
3554
|
+
year += 1;
|
|
3555
|
+
items[index] = Object.freeze({
|
|
3556
|
+
year,
|
|
3557
|
+
disabled: min && min.year != void 0 && year < min.year || max && max.year != void 0 && year > max.year
|
|
3558
|
+
});
|
|
3559
|
+
}
|
|
3560
|
+
return items;
|
|
3561
|
+
}
|
|
3562
|
+
function buildMonthItems(yearItem, min, max) {
|
|
3563
|
+
const minDate = new Date(snail_core.formatDateValue(min, "yyyy-MM"));
|
|
3564
|
+
const maxDate = new Date(snail_core.formatDateValue(max, "yyyy-MM"));
|
|
3565
|
+
const items = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
3566
|
+
return items.map((item, index) => {
|
|
3567
|
+
const mi = {
|
|
3568
|
+
text: item,
|
|
3569
|
+
month: index + 1,
|
|
3570
|
+
year: yearItem.year,
|
|
3571
|
+
disabled: yearItem.disabled
|
|
3572
|
+
};
|
|
3573
|
+
if (mi.disabled != true) {
|
|
3574
|
+
const date = new Date(snail_core.formatDateValue(mi, "yyyy-MM"));
|
|
3575
|
+
mi.disabled = minDate != void 0 && date < minDate || maxDate != void 0 && date > maxDate;
|
|
3576
|
+
}
|
|
3577
|
+
return Object.freeze(mi);
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
function buildDayItems(monthItem, min, max) {
|
|
3581
|
+
const minDate = new Date(snail_core.formatDateValue(min, "yyyy-MM-dd"));
|
|
3582
|
+
const maxDate = new Date(snail_core.formatDateValue(max, "yyyy-MM-dd"));
|
|
3583
|
+
const date = new Date(monthItem.year, monthItem.month - 1);
|
|
3584
|
+
date.setDate(date.getDate() - (date.getDay() || 7) - 1);
|
|
3585
|
+
const items = new Array(42);
|
|
3586
|
+
for (var index = 0; index < items.length; index++) {
|
|
3587
|
+
date.setDate(date.getDate() + 1);
|
|
3588
|
+
const item = {
|
|
3589
|
+
day: date.getDate(),
|
|
3590
|
+
month: date.getMonth() + 1,
|
|
3591
|
+
year: date.getFullYear(),
|
|
3592
|
+
disabled: monthItem.disabled
|
|
3593
|
+
};
|
|
3594
|
+
if (item.disabled != true) {
|
|
3595
|
+
const date2 = new Date(snail_core.formatDateValue(item, "yyyy-MM-dd"));
|
|
3596
|
+
item.disabled = minDate != void 0 && date2 < minDate || maxDate != void 0 && date2 > maxDate;
|
|
3597
|
+
}
|
|
3598
|
+
items[index] = Object.freeze(item);
|
|
3599
|
+
}
|
|
3600
|
+
return items;
|
|
3601
|
+
}
|
|
3602
|
+
function buildHourItems(min, max) {
|
|
3603
|
+
const items = new Array(24);
|
|
3604
|
+
for (var index = 0; index < items.length; index++) {
|
|
3605
|
+
items[index] = Object.freeze({
|
|
3606
|
+
hour: index,
|
|
3607
|
+
disabled: min && min.hour != void 0 && index < min.hour || max && max.hour != void 0 && index > max.hour
|
|
3608
|
+
});
|
|
3609
|
+
}
|
|
3610
|
+
return items;
|
|
3611
|
+
}
|
|
3612
|
+
function buildMinuteItems(hourItem, min, max) {
|
|
3613
|
+
const items = new Array(60);
|
|
3614
|
+
const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, 0) : void 0;
|
|
3615
|
+
const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, 0) : void 0;
|
|
3616
|
+
for (let index = 0; index < items.length; index++) {
|
|
3617
|
+
const item = {
|
|
3618
|
+
minute: index,
|
|
3619
|
+
hour: hourItem.hour,
|
|
3620
|
+
disabled: hourItem.disabled
|
|
3621
|
+
};
|
|
3622
|
+
if (item.disabled != true) {
|
|
3623
|
+
const number = getTimeNumber(item.hour, item.minute, 0);
|
|
3624
|
+
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3625
|
+
}
|
|
3626
|
+
items[index] = Object.freeze(item);
|
|
3627
|
+
}
|
|
3628
|
+
return items;
|
|
3629
|
+
}
|
|
3630
|
+
function buildSecondItems(minuteItem, min, max) {
|
|
3631
|
+
const items = new Array(60);
|
|
3632
|
+
const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, min.second) : void 0;
|
|
3633
|
+
const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, max.second) : void 0;
|
|
3634
|
+
for (let index = 0; index < items.length; index++) {
|
|
3635
|
+
const item = {
|
|
3636
|
+
second: index,
|
|
3637
|
+
minute: minuteItem.minute,
|
|
3638
|
+
hour: minuteItem.hour,
|
|
3639
|
+
disabled: minuteItem.disabled
|
|
3640
|
+
};
|
|
3641
|
+
if (item.disabled != true) {
|
|
3642
|
+
const number = getTimeNumber(item.hour, item.minute, item.second);
|
|
3643
|
+
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3644
|
+
}
|
|
3645
|
+
items[index] = Object.freeze(item);
|
|
3646
|
+
}
|
|
3647
|
+
return items;
|
|
3648
|
+
}
|
|
3649
|
+
function getTimeNumber(hour, minute, second) {
|
|
3650
|
+
return (hour || 0) * 1e4 + (minute || 0) * 100 + (second || 0);
|
|
3651
|
+
}
|
|
3652
|
+
function isValidTime(format, time, min, max) {
|
|
3653
|
+
time = snail_core.correctTimeValue(time);
|
|
3654
|
+
if (time) {
|
|
3655
|
+
min = snail_core.correctTimeValue({
|
|
3656
|
+
...min
|
|
3657
|
+
});
|
|
3658
|
+
const timeNumber = getTimeNumber(time.hour, time.minute, format == "HH:mm" ? 0 : time.second);
|
|
3659
|
+
if (min != void 0) {
|
|
3660
|
+
const minNumber = getTimeNumber(min.hour, min.minute, format == "HH:mm" ? 0 : max.second);
|
|
3661
|
+
if (timeNumber < minNumber) {
|
|
3662
|
+
return false;
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
max = snail_core.correctTimeValue({
|
|
3666
|
+
...max
|
|
3667
|
+
});
|
|
3668
|
+
if (max != void 0) {
|
|
3669
|
+
const maxNumber = getTimeNumber(max.hour, max.minute, format == "HH:mm" ? 0 : max.second);
|
|
3670
|
+
if (timeNumber > maxNumber) {
|
|
3671
|
+
return false;
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
return true;
|
|
3675
|
+
}
|
|
3676
|
+
return false;
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3679
|
+
const _hoisted_1$2 = {
|
|
3424
3680
|
class: "tz-item",
|
|
3425
3681
|
ref: "hour-items"
|
|
3426
3682
|
};
|
|
3427
|
-
const _hoisted_2 = ["textContent", "onClick"];
|
|
3428
|
-
const _hoisted_3 = {
|
|
3683
|
+
const _hoisted_2$1 = ["textContent", "onClick"];
|
|
3684
|
+
const _hoisted_3$1 = {
|
|
3429
3685
|
class: "tz-item",
|
|
3430
3686
|
ref: "minute-items"
|
|
3431
3687
|
};
|
|
3432
|
-
const _hoisted_4 = ["textContent", "onClick"];
|
|
3433
|
-
const _hoisted_5 = {
|
|
3688
|
+
const _hoisted_4$1 = ["textContent", "onClick"];
|
|
3689
|
+
const _hoisted_5$1 = {
|
|
3434
3690
|
key: 0,
|
|
3435
3691
|
class: "tz-item",
|
|
3436
3692
|
ref: "second-items"
|
|
3437
3693
|
};
|
|
3438
|
-
const _hoisted_6 = ["textContent", "onClick"];
|
|
3439
|
-
var _sfc_main$
|
|
3694
|
+
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
3695
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
3440
3696
|
__name: "time-pc",
|
|
3441
3697
|
props: {
|
|
3442
3698
|
value: {},
|
|
3443
|
-
|
|
3699
|
+
format: {},
|
|
3700
|
+
min: {},
|
|
3701
|
+
max: {},
|
|
3702
|
+
toolbarDisabled: {
|
|
3444
3703
|
type: Boolean
|
|
3445
3704
|
},
|
|
3446
3705
|
nowDisabled: {
|
|
3447
3706
|
type: Boolean
|
|
3448
3707
|
},
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3708
|
+
clearDisabled: {
|
|
3709
|
+
type: Boolean
|
|
3710
|
+
},
|
|
3711
|
+
popup: {},
|
|
3712
|
+
picker: {},
|
|
3453
3713
|
inPopup: {},
|
|
3454
3714
|
closePopup: {
|
|
3455
3715
|
type: Function
|
|
@@ -3467,203 +3727,543 @@
|
|
|
3467
3727
|
} = _ref;
|
|
3468
3728
|
const props = __props;
|
|
3469
3729
|
const emits = __emit;
|
|
3470
|
-
const
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
const
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
const {
|
|
3479
|
-
inPopup,
|
|
3480
|
-
closePopup
|
|
3481
|
-
} = props;
|
|
3482
|
-
const secondDisabled = tm.format == "HH:mm";
|
|
3483
|
-
const tvRef = vue.ref();
|
|
3730
|
+
const format = props.format == "HH:mm" ? "HH:mm" : "HH:mm:ss";
|
|
3731
|
+
const min = snail_core.parseTimeValue(props.min);
|
|
3732
|
+
const max = snail_core.parseTimeValue(props.max);
|
|
3733
|
+
const timeRef = vue.ref(snail_core.parseTimeValue(props.value) || snail_core.getTimeValue(new Date()));
|
|
3734
|
+
const isValidTimeRef = vue.computed(() => format == "HH:mm" ? minuteItems.value && minuteItems.value[timeRef.value.minute].disabled != true : secondItems.value && secondItems.value[timeRef.value.second].disabled != true);
|
|
3735
|
+
const hourItems = vue.shallowRef(buildHourItems(min, max));
|
|
3736
|
+
const minuteItems = vue.shallowRef();
|
|
3737
|
+
const secondItems = vue.shallowRef();
|
|
3484
3738
|
const hItemsDom = vue.useTemplateRef("hour-items");
|
|
3485
3739
|
const mItemsDom = vue.useTemplateRef("minute-items");
|
|
3486
3740
|
const sItemsDom = vue.useTemplateRef("second-items");
|
|
3487
|
-
function
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
return {
|
|
3496
|
-
active: tvRef.value.minute == value,
|
|
3497
|
-
disabled: tm.validateHHmm(tvRef.value.hour, value) == false
|
|
3498
|
-
};
|
|
3499
|
-
case "second":
|
|
3500
|
-
return {
|
|
3501
|
-
active: tvRef.value.second == value,
|
|
3502
|
-
disabled: tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value) == false
|
|
3503
|
-
};
|
|
3504
|
-
}
|
|
3741
|
+
async function rebuildItems(time) {
|
|
3742
|
+
time != void 0 && (timeRef.value = time);
|
|
3743
|
+
minuteItems.value = buildMinuteItems(hourItems.value[timeRef.value.hour], min, max);
|
|
3744
|
+
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
3745
|
+
await vue.nextTick();
|
|
3746
|
+
scrollIntoView(hItemsDom.value);
|
|
3747
|
+
scrollIntoView(mItemsDom.value);
|
|
3748
|
+
scrollIntoView(sItemsDom.value);
|
|
3505
3749
|
}
|
|
3506
3750
|
function scrollIntoView(items) {
|
|
3507
|
-
let activeIndex = void 0
|
|
3508
|
-
firstValidIndex;
|
|
3751
|
+
let activeIndex = void 0;
|
|
3509
3752
|
for (var index = 0; index < (items ? items.children.length : 0); index++) {
|
|
3510
3753
|
const ele = items.children[index];
|
|
3511
|
-
if (ele.classList.contains("disabled") == true) {
|
|
3512
|
-
continue;
|
|
3513
|
-
}
|
|
3514
|
-
if (firstValidIndex == void 0) {
|
|
3515
|
-
firstValidIndex = index;
|
|
3516
|
-
}
|
|
3517
3754
|
if (ele.classList.contains("active") == true) {
|
|
3518
3755
|
activeIndex = index;
|
|
3519
3756
|
break;
|
|
3520
3757
|
}
|
|
3521
3758
|
}
|
|
3522
|
-
|
|
3523
|
-
if (activeIndex == void 0) {
|
|
3524
|
-
if (firstValidIndex != void 0) {
|
|
3525
|
-
showIndex = firstValidIndex;
|
|
3526
|
-
}
|
|
3527
|
-
}
|
|
3528
|
-
showIndex != void 0 && items.children[showIndex].scrollIntoView({
|
|
3759
|
+
activeIndex != void 0 && items.children[activeIndex].scrollIntoView({
|
|
3529
3760
|
behavior: "smooth",
|
|
3530
3761
|
block: "center"
|
|
3531
3762
|
});
|
|
3532
3763
|
}
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
await vue.nextTick();
|
|
3539
|
-
scrollIntoView(mItemsDom.value);
|
|
3540
|
-
}
|
|
3541
|
-
break;
|
|
3542
|
-
case "minute":
|
|
3543
|
-
if (tm.validateHHmm(tvRef.value.hour, value)) {
|
|
3544
|
-
tvRef.value.minute = value;
|
|
3545
|
-
await vue.nextTick();
|
|
3546
|
-
scrollIntoView(sItemsDom.value);
|
|
3547
|
-
}
|
|
3548
|
-
break;
|
|
3549
|
-
case "second":
|
|
3550
|
-
if (tm.validateHHmmss(tvRef.value.hour, tvRef.value.minute, value)) {
|
|
3551
|
-
tvRef.value.second = value;
|
|
3552
|
-
}
|
|
3553
|
-
break;
|
|
3764
|
+
function onHourClick(item) {
|
|
3765
|
+
if (item.disabled != true && timeRef.value.hour != item.hour) {
|
|
3766
|
+
timeRef.value.hour = item.hour;
|
|
3767
|
+
minuteItems.value = buildMinuteItems(item, min, max);
|
|
3768
|
+
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
3554
3769
|
}
|
|
3555
3770
|
}
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3771
|
+
function onMinuteClick(item) {
|
|
3772
|
+
if (item.disabled != true) {
|
|
3773
|
+
if (format == "HH:mm") {
|
|
3774
|
+
const value = snail_core.formatTimeValue(item, "HH:mm");
|
|
3775
|
+
emits("confirm", value);
|
|
3776
|
+
props.inPopup && props.closePopup(value);
|
|
3777
|
+
} else if (timeRef.value.minute != item.minute) {
|
|
3778
|
+
timeRef.value.minute = item.minute;
|
|
3779
|
+
secondItems.value = buildSecondItems(item, min, max);
|
|
3780
|
+
}
|
|
3563
3781
|
}
|
|
3564
3782
|
}
|
|
3565
|
-
function
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
}
|
|
3570
|
-
if (secondDisabled != true && tvRef.value.minute == void 0) {
|
|
3571
|
-
return toast("error", "请选选择时间");
|
|
3783
|
+
function onSecondClick(item) {
|
|
3784
|
+
if (item.disabled != true) {
|
|
3785
|
+
timeRef.value.second = item.second;
|
|
3786
|
+
onConfirm();
|
|
3572
3787
|
}
|
|
3573
|
-
const value = tm.toString(tvRef.value);
|
|
3574
|
-
emits("confirm", value);
|
|
3575
|
-
inPopup && closePopup(value);
|
|
3576
3788
|
}
|
|
3577
|
-
{
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3789
|
+
function onConfirm() {
|
|
3790
|
+
if (isValidTimeRef.value == true) {
|
|
3791
|
+
const value = snail_core.formatTimeValue(timeRef.value, format);
|
|
3792
|
+
emits("confirm", value);
|
|
3793
|
+
props.inPopup && props.closePopup(value);
|
|
3794
|
+
}
|
|
3581
3795
|
}
|
|
3582
|
-
vue.onMounted(
|
|
3583
|
-
await vue.nextTick();
|
|
3584
|
-
scrollIntoView(hItemsDom.value);
|
|
3585
|
-
scrollIntoView(mItemsDom.value);
|
|
3586
|
-
scrollIntoView(sItemsDom.value);
|
|
3587
|
-
});
|
|
3796
|
+
vue.onMounted(rebuildItems);
|
|
3588
3797
|
return (_ctx, _cache) => {
|
|
3589
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3590
|
-
class: vue.normalizeClass(["
|
|
3591
|
-
"second-disabled":
|
|
3798
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$b, {
|
|
3799
|
+
class: vue.normalizeClass(["time-picker pc", {
|
|
3800
|
+
"second-disabled": vue.unref(format) != "HH:mm:ss"
|
|
3592
3801
|
}]),
|
|
3593
3802
|
mode: "vertical"
|
|
3594
|
-
}, {
|
|
3595
|
-
|
|
3803
|
+
}, vue.createSlots({
|
|
3804
|
+
main: vue.withCtx(() => [vue.createVNode(_sfc_main$f, {
|
|
3596
3805
|
group: true,
|
|
3597
3806
|
effect: "down-up"
|
|
3598
3807
|
}, {
|
|
3599
|
-
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$
|
|
3808
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
|
|
3600
3809
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3601
|
-
class: vue.normalizeClass(["tzi-number",
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3810
|
+
class: vue.normalizeClass(["tzi-number", {
|
|
3811
|
+
active: item.hour == timeRef.value.hour,
|
|
3812
|
+
disabled: item.disabled
|
|
3813
|
+
}]),
|
|
3814
|
+
key: item.hour,
|
|
3815
|
+
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.hour, 2, "0")),
|
|
3816
|
+
onClick: $event => onHourClick(item)
|
|
3817
|
+
}, null, 10, _hoisted_2$1);
|
|
3818
|
+
}), 128))], 512), vue.createElementVNode("div", _hoisted_3$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(minuteItems.value, item => {
|
|
3606
3819
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3607
|
-
class: vue.normalizeClass(["tzi-number",
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3820
|
+
class: vue.normalizeClass(["tzi-number", {
|
|
3821
|
+
active: item.minute == timeRef.value.minute,
|
|
3822
|
+
disabled: item.disabled
|
|
3823
|
+
}]),
|
|
3824
|
+
key: `${item.hour}:${item.minute}`,
|
|
3825
|
+
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.minute, 2, "0")),
|
|
3826
|
+
onClick: $event => onMinuteClick(item)
|
|
3827
|
+
}, null, 10, _hoisted_4$1);
|
|
3828
|
+
}), 128))], 512), vue.unref(format) == "HH:mm:ss" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(secondItems.value, item => {
|
|
3612
3829
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3613
|
-
class: vue.normalizeClass(["tzi-number",
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), vue.unref(inPopup) && vue.unref(closePopup)("")))
|
|
3623
|
-
}), vue.unref(tm).validate(vue.unref(snail_core.getTimeNow)()) ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
3624
|
-
key: 0,
|
|
3625
|
-
type: "link",
|
|
3626
|
-
size: "small",
|
|
3627
|
-
textContent: "现在",
|
|
3628
|
-
onClick: onNow
|
|
3629
|
-
})) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$y, {
|
|
3630
|
-
type: "link",
|
|
3631
|
-
size: "small",
|
|
3632
|
-
textContent: "确定",
|
|
3633
|
-
onClick: onConfirm
|
|
3634
|
-
})]),
|
|
3830
|
+
class: vue.normalizeClass(["tzi-number", {
|
|
3831
|
+
active: item.second == timeRef.value.second,
|
|
3832
|
+
disabled: item.disabled
|
|
3833
|
+
}]),
|
|
3834
|
+
key: `${item.hour}:${item.minute}:${item.second}`,
|
|
3835
|
+
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.second, 2, "0")),
|
|
3836
|
+
onClick: $event => onSecondClick(item)
|
|
3837
|
+
}, null, 10, _hoisted_6$1);
|
|
3838
|
+
}), 128))], 512)) : vue.createCommentVNode("", true)]),
|
|
3635
3839
|
_: 1
|
|
3636
3840
|
})]),
|
|
3637
|
-
_:
|
|
3638
|
-
},
|
|
3841
|
+
_: 2
|
|
3842
|
+
}, [__props.toolbarDisabled != true ? {
|
|
3843
|
+
name: "bottom",
|
|
3844
|
+
fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
3845
|
+
key: 0,
|
|
3846
|
+
type: "link",
|
|
3847
|
+
size: "small",
|
|
3848
|
+
textContent: "清空",
|
|
3849
|
+
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
|
|
3850
|
+
})) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
3851
|
+
key: 1,
|
|
3852
|
+
type: "link",
|
|
3853
|
+
size: "small",
|
|
3854
|
+
textContent: "现在",
|
|
3855
|
+
onClick: _cache[1] || (_cache[1] = $event => rebuildItems(vue.unref(snail_core.getTimeValue)(new Date())))
|
|
3856
|
+
})) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$B, {
|
|
3857
|
+
type: "link",
|
|
3858
|
+
size: "small",
|
|
3859
|
+
textContent: "确定",
|
|
3860
|
+
class: vue.normalizeClass({
|
|
3861
|
+
disabled: isValidTimeRef.value != true
|
|
3862
|
+
}),
|
|
3863
|
+
onClick: onConfirm
|
|
3864
|
+
}, null, 8, ["class"])]),
|
|
3865
|
+
key: "0"
|
|
3866
|
+
} : void 0]), 1032, ["class"]);
|
|
3867
|
+
};
|
|
3868
|
+
}
|
|
3869
|
+
});
|
|
3870
|
+
|
|
3871
|
+
const _hoisted_1$1 = ["textContent"];
|
|
3872
|
+
const _hoisted_2 = ["textContent"];
|
|
3873
|
+
const _hoisted_3 = ["textContent"];
|
|
3874
|
+
const _hoisted_4 = ["textContent", "onClick"];
|
|
3875
|
+
const _hoisted_5 = ["textContent", "onClick"];
|
|
3876
|
+
const _hoisted_6 = ["textContent"];
|
|
3877
|
+
const _hoisted_7 = ["textContent", "onClick"];
|
|
3878
|
+
const _hoisted_8 = ["textContent"];
|
|
3879
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
3880
|
+
__name: "date-pc",
|
|
3881
|
+
props: {
|
|
3882
|
+
value: {},
|
|
3883
|
+
format: {},
|
|
3884
|
+
min: {},
|
|
3885
|
+
max: {},
|
|
3886
|
+
minPickTime: {},
|
|
3887
|
+
maxPickTime: {},
|
|
3888
|
+
toolbarDisabled: {
|
|
3889
|
+
type: Boolean
|
|
3890
|
+
},
|
|
3891
|
+
nowDisabled: {
|
|
3892
|
+
type: Boolean
|
|
3893
|
+
},
|
|
3894
|
+
clearDisabled: {
|
|
3895
|
+
type: Boolean
|
|
3896
|
+
},
|
|
3897
|
+
popup: {},
|
|
3898
|
+
picker: {},
|
|
3899
|
+
popupStatus: {},
|
|
3900
|
+
target: {},
|
|
3901
|
+
followX: {},
|
|
3902
|
+
followY: {},
|
|
3903
|
+
pinned: {},
|
|
3904
|
+
inPopup: {},
|
|
3905
|
+
closePopup: {
|
|
3906
|
+
type: Function
|
|
3907
|
+
}
|
|
3908
|
+
},
|
|
3909
|
+
emits: ["clear", "confirm"],
|
|
3910
|
+
setup(__props, _ref) {
|
|
3911
|
+
let {
|
|
3912
|
+
emit: __emit
|
|
3913
|
+
} = _ref;
|
|
3914
|
+
const props = __props;
|
|
3915
|
+
const emits = __emit;
|
|
3916
|
+
const {
|
|
3917
|
+
inPopup
|
|
3918
|
+
} = props;
|
|
3919
|
+
const dateRef = vue.ref(snail_core.parseDateValue(props.value));
|
|
3920
|
+
const format = snail_core.correctDateFormat(props.format, "yyyy-MM-dd");
|
|
3921
|
+
const min = Object.freeze(snail_core.parseDateValue(props.min));
|
|
3922
|
+
const max = Object.freeze(snail_core.parseDateValue(props.max));
|
|
3923
|
+
const endStep = initStepByFormat(format);
|
|
3924
|
+
const stepRef = vue.shallowRef(endStep);
|
|
3925
|
+
const yearItems = vue.shallowRef();
|
|
3926
|
+
const monthItems = vue.shallowRef();
|
|
3927
|
+
const dayItemsRef = vue.shallowRef([]);
|
|
3928
|
+
const isValidDateRef = vue.computed(validateDate);
|
|
3929
|
+
const minPickTime = Object.freeze(snail_core.parseTimeValue(props.minPickTime));
|
|
3930
|
+
const maxPickTime = Object.freeze(snail_core.parseTimeValue(props.maxPickTime));
|
|
3931
|
+
const timeFormat = format == "yyyy-MM-dd HH:mm" ? "HH:mm" : format == "yyyy-MM-dd HH:mm:ss" ? "HH:mm:ss" : void 0;
|
|
3932
|
+
const timeAreaDom = timeFormat ? vue.useTemplateRef("time-area") : void 0;
|
|
3933
|
+
function validateDate() {
|
|
3934
|
+
switch (format) {
|
|
3935
|
+
case "yyyy":
|
|
3936
|
+
{
|
|
3937
|
+
const item = yearItems.value.find(item2 => item2.year == dateRef.value.year);
|
|
3938
|
+
return item && item.disabled != true;
|
|
3939
|
+
}
|
|
3940
|
+
case "yyyy-MM":
|
|
3941
|
+
{
|
|
3942
|
+
const item = monthItems.value.find(item2 => item2.year == dateRef.value.year && item2.month == dateRef.value.month);
|
|
3943
|
+
return item && item.disabled != true;
|
|
3944
|
+
}
|
|
3945
|
+
case "yyyy-MM-dd":
|
|
3946
|
+
{
|
|
3947
|
+
const item = dayItemsRef.value.find(item2 => item2.year == dateRef.value.year && item2.month == dateRef.value.month && item2.day == dateRef.value.day);
|
|
3948
|
+
return item ? item.disabled != true : false;
|
|
3949
|
+
}
|
|
3950
|
+
case "yyyy-MM-dd HH:mm":
|
|
3951
|
+
case "yyyy-MM-dd HH:mm:ss":
|
|
3952
|
+
{
|
|
3953
|
+
if (isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
|
|
3954
|
+
const date = snail_core.getDateByValue(dateRef.value);
|
|
3955
|
+
const disabled = min && date < snail_core.getDateByValue(min) || max && date > snail_core.getDateByValue(max);
|
|
3956
|
+
return disabled != true;
|
|
3957
|
+
}
|
|
3958
|
+
return false;
|
|
3959
|
+
}
|
|
3960
|
+
default:
|
|
3961
|
+
return false;
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
function buildPickerItems(step, basis) {
|
|
3965
|
+
switch (step) {
|
|
3966
|
+
case "year":
|
|
3967
|
+
{
|
|
3968
|
+
dateRef.value.year += basis * 18;
|
|
3969
|
+
yearItems.value = buildYearItems(dateRef.value.year, min, max);
|
|
3970
|
+
if (basis != 0) {
|
|
3971
|
+
dateRef.value.month = 1;
|
|
3972
|
+
dateRef.value.day = 1;
|
|
3973
|
+
}
|
|
3974
|
+
break;
|
|
3975
|
+
}
|
|
3976
|
+
case "month":
|
|
3977
|
+
{
|
|
3978
|
+
dateRef.value.year += basis;
|
|
3979
|
+
let yearItem = (yearItems.value || []).find(item => item.year == dateRef.value.year);
|
|
3980
|
+
if (yearItem == void 0) {
|
|
3981
|
+
buildPickerItems("year", 0);
|
|
3982
|
+
yearItem = yearItems.value[9];
|
|
3983
|
+
}
|
|
3984
|
+
monthItems.value = buildMonthItems(yearItem, min, max);
|
|
3985
|
+
basis != 0 && (dateRef.value.day = 1);
|
|
3986
|
+
break;
|
|
3987
|
+
}
|
|
3988
|
+
case "day":
|
|
3989
|
+
{
|
|
3990
|
+
const date = new Date(dateRef.value.year, dateRef.value.month - 1, 1);
|
|
3991
|
+
date.setMonth(date.getMonth() + basis);
|
|
3992
|
+
dateRef.value.year = date.getFullYear();
|
|
3993
|
+
dateRef.value.month = date.getMonth() + 1;
|
|
3994
|
+
let monthItem = (monthItems.value || []).find(item => item.year == dateRef.value.year && item.month == dateRef.value.month);
|
|
3995
|
+
if (monthItem == void 0) {
|
|
3996
|
+
buildPickerItems("month", 0);
|
|
3997
|
+
monthItem = monthItems.value[dateRef.value.month - 1];
|
|
3998
|
+
}
|
|
3999
|
+
dayItemsRef.value = buildDayItems(monthItem, min, max);
|
|
4000
|
+
basis != 0 && (dateRef.value.day = 1);
|
|
4001
|
+
break;
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
function onSwitchStepClick(newValue) {
|
|
4006
|
+
setTimeout(() => stepRef.value = newValue);
|
|
4007
|
+
}
|
|
4008
|
+
function onYearItemClick(item) {
|
|
4009
|
+
if (item.disabled != true) {
|
|
4010
|
+
dateRef.value.year = item.year;
|
|
4011
|
+
if (format == "yyyy") {
|
|
4012
|
+
const value = String(dateRef.value.year).padStart(4, "0");
|
|
4013
|
+
emits("confirm", value);
|
|
4014
|
+
props.inPopup && props.closePopup(value);
|
|
4015
|
+
} else {
|
|
4016
|
+
dateRef.value.month = 1;
|
|
4017
|
+
monthItems.value = buildMonthItems(item, min, max);
|
|
4018
|
+
onSwitchStepClick("month");
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
function onMonthItemClick(item) {
|
|
4023
|
+
if (item.disabled != true) {
|
|
4024
|
+
dateRef.value.year = item.year;
|
|
4025
|
+
dateRef.value.month = item.month;
|
|
4026
|
+
if (format == "yyyy-MM") {
|
|
4027
|
+
const value = snail_core.formatDateValue(dateRef.value, "yyyy-MM");
|
|
4028
|
+
emits("confirm", value);
|
|
4029
|
+
props.inPopup && props.closePopup(value);
|
|
4030
|
+
} else {
|
|
4031
|
+
dateRef.value.day = 1;
|
|
4032
|
+
dayItemsRef.value = buildDayItems(item, min, max);
|
|
4033
|
+
onSwitchStepClick("day");
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
function onDayItemClick(item) {
|
|
4038
|
+
if (item.disabled != true) {
|
|
4039
|
+
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4040
|
+
Object.assign(dateRef.value, {
|
|
4041
|
+
year: item.year,
|
|
4042
|
+
month: item.month,
|
|
4043
|
+
day: item.day
|
|
4044
|
+
});
|
|
4045
|
+
if (format == "yyyy-MM-dd") {
|
|
4046
|
+
const value = snail_core.formatDateValue(dateRef.value, "yyyy-MM-dd");
|
|
4047
|
+
emits("confirm", value);
|
|
4048
|
+
props.inPopup && props.closePopup(value);
|
|
4049
|
+
} else {
|
|
4050
|
+
isNowMonth || buildPickerItems("day", 0);
|
|
4051
|
+
}
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
async function onSelectTime() {
|
|
4055
|
+
if (props.picker == void 0 || timeAreaDom.value == void 0 || props.pinned.value == true) {
|
|
4056
|
+
return;
|
|
4057
|
+
}
|
|
4058
|
+
props.pinned.value = true;
|
|
4059
|
+
const task = props.picker.showTime(timeAreaDom.value, {
|
|
4060
|
+
format: timeFormat,
|
|
4061
|
+
value: snail_core.formatTimeValue(dateRef.value, timeFormat),
|
|
4062
|
+
min: props.minPickTime,
|
|
4063
|
+
max: props.minPickTime,
|
|
4064
|
+
followX: "start",
|
|
4065
|
+
followY: "before",
|
|
4066
|
+
spaceX: -2,
|
|
4067
|
+
spaceY: 4
|
|
4068
|
+
});
|
|
4069
|
+
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
4070
|
+
if (text != void 0) {
|
|
4071
|
+
const time = snail_core.parseTimeValue(text) || Object.create(null);
|
|
4072
|
+
dateRef.value.hour = time.hour;
|
|
4073
|
+
dateRef.value.minute = time.minute;
|
|
4074
|
+
dateRef.value.second = time.second;
|
|
4075
|
+
}
|
|
4076
|
+
}, reason => {
|
|
4077
|
+
console.error(reason);
|
|
4078
|
+
});
|
|
4079
|
+
}
|
|
4080
|
+
function onNow() {
|
|
4081
|
+
stepRef.value = initStepByFormat(format);
|
|
4082
|
+
dateRef.value = snail_core.getDateValue(new Date());
|
|
4083
|
+
buildPickerItems(stepRef.value, 0);
|
|
4084
|
+
}
|
|
4085
|
+
function onConfirm() {
|
|
4086
|
+
if (isValidDateRef.value == true) {
|
|
4087
|
+
const value = snail_core.formatDateValue(dateRef.value, format);
|
|
4088
|
+
emits("confirm", value);
|
|
4089
|
+
props.inPopup && props.closePopup(value);
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
4093
|
+
buildPickerItems(stepRef.value, 0);
|
|
4094
|
+
return (_ctx, _cache) => {
|
|
4095
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$b, {
|
|
4096
|
+
class: vue.normalizeClass(["date-picker pc", {
|
|
4097
|
+
"time-now": __props.pinned && __props.pinned.value == true
|
|
4098
|
+
}]),
|
|
4099
|
+
mode: "vertical",
|
|
4100
|
+
top: {
|
|
4101
|
+
height: "40px"
|
|
4102
|
+
},
|
|
4103
|
+
bottom: {
|
|
4104
|
+
height: "30px"
|
|
4105
|
+
}
|
|
4106
|
+
}, vue.createSlots({
|
|
4107
|
+
top: vue.withCtx(() => [vue.createVNode(_sfc_main$A, {
|
|
4108
|
+
type: "arrow",
|
|
4109
|
+
rotate: 180,
|
|
4110
|
+
size: 26,
|
|
4111
|
+
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
4112
|
+
}), vue.createElementVNode("div", {
|
|
4113
|
+
class: vue.normalizeClass(["header-content", stepRef.value])
|
|
4114
|
+
}, [stepRef.value == "year" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4115
|
+
key: 0,
|
|
4116
|
+
textContent: vue.toDisplayString(`${yearItems.value[0].year}年 - ${vue.unref(snail_core.getFromArray)(yearItems.value, -1).year}年`)
|
|
4117
|
+
}, null, 8, _hoisted_1$1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4118
|
+
key: 1
|
|
4119
|
+
}, [vue.createElementVNode("div", {
|
|
4120
|
+
textContent: vue.toDisplayString(`${dateRef.value.year}年`),
|
|
4121
|
+
onClick: _cache[1] || (_cache[1] = $event => onSwitchStepClick("year"))
|
|
4122
|
+
}, null, 8, _hoisted_2), stepRef.value == "day" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4123
|
+
key: 0,
|
|
4124
|
+
textContent: vue.toDisplayString(`${dateRef.value.month}月`),
|
|
4125
|
+
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4126
|
+
}, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$A, {
|
|
4127
|
+
type: "arrow",
|
|
4128
|
+
size: 26,
|
|
4129
|
+
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4130
|
+
})]),
|
|
4131
|
+
main: vue.withCtx(() => [stepRef.value == "year" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
4132
|
+
key: 0
|
|
4133
|
+
}, vue.renderList(yearItems.value, item => {
|
|
4134
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4135
|
+
class: vue.normalizeClass(["year-item", {
|
|
4136
|
+
"active": dateRef.value.year == item.year,
|
|
4137
|
+
"disabled": item.disabled
|
|
4138
|
+
}]),
|
|
4139
|
+
key: item.year
|
|
4140
|
+
}, [vue.createElementVNode("span", {
|
|
4141
|
+
textContent: vue.toDisplayString(item.year),
|
|
4142
|
+
onClick: $event => onYearItemClick(item)
|
|
4143
|
+
}, null, 8, _hoisted_4)], 2);
|
|
4144
|
+
}), 128)) : stepRef.value == "month" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
4145
|
+
key: 1
|
|
4146
|
+
}, vue.renderList(monthItems.value, item => {
|
|
4147
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4148
|
+
class: vue.normalizeClass(["month-item", {
|
|
4149
|
+
"active": dateRef.value.month == item.month,
|
|
4150
|
+
"disabled": item.disabled
|
|
4151
|
+
}]),
|
|
4152
|
+
key: `${item.year}-${item.month}`
|
|
4153
|
+
}, [vue.createElementVNode("span", {
|
|
4154
|
+
textContent: vue.toDisplayString(item.text),
|
|
4155
|
+
onClick: $event => onMonthItemClick(item)
|
|
4156
|
+
}, null, 8, _hoisted_5)], 2);
|
|
4157
|
+
}), 128)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4158
|
+
key: 2
|
|
4159
|
+
}, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
|
|
4160
|
+
return vue.createElementVNode("div", {
|
|
4161
|
+
class: "day-item week",
|
|
4162
|
+
key: item,
|
|
4163
|
+
textContent: vue.toDisplayString(item)
|
|
4164
|
+
}, null, 8, _hoisted_6);
|
|
4165
|
+
}), 64)), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(dayItemsRef.value, item => {
|
|
4166
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4167
|
+
class: vue.normalizeClass(["day-item", {
|
|
4168
|
+
"active": dateRef.value.year == item.year && dateRef.value.month == item.month && dateRef.value.day == item.day,
|
|
4169
|
+
"now-month": dateRef.value.year == item.year && dateRef.value.month == item.month,
|
|
4170
|
+
"disabled": item.disabled
|
|
4171
|
+
}]),
|
|
4172
|
+
key: `${item.year}-${item.month}-${item.day}`
|
|
4173
|
+
}, [vue.createElementVNode("span", {
|
|
4174
|
+
textContent: vue.toDisplayString(item.day),
|
|
4175
|
+
onClick: $event => onDayItemClick(item)
|
|
4176
|
+
}, null, 8, _hoisted_7)], 2);
|
|
4177
|
+
}), 128))], 64))]),
|
|
4178
|
+
_: 2
|
|
4179
|
+
}, [vue.unref(endStep) == stepRef.value && (__props.toolbarDisabled != true || vue.unref(timeFormat) != void 0) ? {
|
|
4180
|
+
name: "bottom",
|
|
4181
|
+
fn: vue.withCtx(() => [vue.unref(timeFormat) != void 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4182
|
+
key: 0,
|
|
4183
|
+
class: vue.normalizeClass(["time-area", {
|
|
4184
|
+
placeholder: dateRef.value.hour == void 0
|
|
4185
|
+
}]),
|
|
4186
|
+
ref: "time-area",
|
|
4187
|
+
textContent: vue.toDisplayString(vue.unref(snail_core.formatTimeValue)(dateRef.value, vue.unref(timeFormat)) || "选择时间"),
|
|
4188
|
+
onClick: onSelectTime
|
|
4189
|
+
}, null, 10, _hoisted_8)) : vue.createCommentVNode("", true), __props.toolbarDisabled != true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4190
|
+
key: 1
|
|
4191
|
+
}, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
4192
|
+
key: 0,
|
|
4193
|
+
type: "link",
|
|
4194
|
+
size: "small",
|
|
4195
|
+
textContent: "清空",
|
|
4196
|
+
onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), vue.unref(inPopup) && __props.closePopup("")))
|
|
4197
|
+
})) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
4198
|
+
key: 1,
|
|
4199
|
+
type: "link",
|
|
4200
|
+
size: "small",
|
|
4201
|
+
textContent: "现在",
|
|
4202
|
+
onClick: onNow
|
|
4203
|
+
})) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$B, {
|
|
4204
|
+
type: "link",
|
|
4205
|
+
size: "small",
|
|
4206
|
+
textContent: "确定",
|
|
4207
|
+
class: vue.normalizeClass({
|
|
4208
|
+
"disabled": isValidDateRef.value != true
|
|
4209
|
+
}),
|
|
4210
|
+
onClick: onConfirm
|
|
4211
|
+
}, null, 8, ["class"])]),
|
|
4212
|
+
key: "0"
|
|
4213
|
+
} : void 0]), 1032, ["class"]);
|
|
3639
4214
|
};
|
|
3640
4215
|
}
|
|
3641
4216
|
});
|
|
3642
4217
|
|
|
3643
4218
|
function usePicker() {
|
|
3644
4219
|
const popup = usePopup();
|
|
4220
|
+
function showDate(target, options) {
|
|
4221
|
+
options = {
|
|
4222
|
+
...options
|
|
4223
|
+
};
|
|
4224
|
+
return showPicker(target, _sfc_main$1, options);
|
|
4225
|
+
}
|
|
3645
4226
|
function showTime(target, options) {
|
|
3646
4227
|
options = {
|
|
3647
4228
|
...options
|
|
3648
4229
|
};
|
|
3649
|
-
|
|
4230
|
+
return showPicker(target, _sfc_main$2, options);
|
|
4231
|
+
}
|
|
4232
|
+
function showPicker(target, component, options) {
|
|
4233
|
+
let popupOptions = Object.create(null);
|
|
4234
|
+
if (options != void 0) {
|
|
4235
|
+
popupOptions.followX = options.followX;
|
|
4236
|
+
popupOptions.followY = options.followY;
|
|
4237
|
+
popupOptions.spaceX = options.spaceX;
|
|
4238
|
+
popupOptions.spaceY = options.spaceY;
|
|
4239
|
+
popupOptions.spaceClient = options.spaceClien;
|
|
4240
|
+
delete options.followX;
|
|
4241
|
+
delete options.followY;
|
|
4242
|
+
delete options.spaceX;
|
|
4243
|
+
delete options.spaceY;
|
|
4244
|
+
delete options.spaceClient;
|
|
4245
|
+
}
|
|
3650
4246
|
return popup.follow(target, {
|
|
3651
|
-
component
|
|
3652
|
-
followX:
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
4247
|
+
component,
|
|
4248
|
+
followX: popupOptions.followX || "center",
|
|
4249
|
+
followY: popupOptions.followY,
|
|
4250
|
+
spaceX: snail_core.correctNumber(popupOptions.spaceX, 2),
|
|
4251
|
+
spaceY: snail_core.correctNumber(popupOptions.spaceY, 2),
|
|
4252
|
+
spaceClient: snail_core.correctNumber(popupOptions.spaceClient, 10),
|
|
3656
4253
|
closeOnMask: true,
|
|
3657
|
-
props:
|
|
4254
|
+
props: {
|
|
4255
|
+
...options,
|
|
4256
|
+
picker: manager,
|
|
4257
|
+
popup
|
|
4258
|
+
}
|
|
3658
4259
|
});
|
|
3659
4260
|
}
|
|
3660
|
-
{
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
}
|
|
4261
|
+
const manager = Object.freeze(snail_core.mountScope({
|
|
4262
|
+
showDate,
|
|
4263
|
+
showTime
|
|
4264
|
+
}, "IPickerManager"));
|
|
4265
|
+
manager.onDestroy(popup.destroy);
|
|
4266
|
+
return manager;
|
|
3667
4267
|
}
|
|
3668
4268
|
|
|
3669
4269
|
const _hoisted_1 = ["textContent"];
|
|
@@ -3751,12 +4351,12 @@
|
|
|
3751
4351
|
onTouchstart: onStartDrag,
|
|
3752
4352
|
onTouchmove: onDragMove,
|
|
3753
4353
|
onTouchend: onDragEnd
|
|
3754
|
-
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4354
|
+
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
3755
4355
|
key: 0,
|
|
3756
4356
|
type: "success",
|
|
3757
4357
|
size: 20,
|
|
3758
4358
|
color: "white"
|
|
3759
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4359
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
3760
4360
|
key: 1,
|
|
3761
4361
|
type: "custom",
|
|
3762
4362
|
size: 20,
|
|
@@ -3768,38 +4368,41 @@
|
|
|
3768
4368
|
});
|
|
3769
4369
|
|
|
3770
4370
|
const components = {
|
|
3771
|
-
Button: _sfc_main$
|
|
3772
|
-
Choose: _sfc_main$
|
|
3773
|
-
DatePicker: _sfc_main$
|
|
3774
|
-
Footer: _sfc_main$
|
|
3775
|
-
Header: _sfc_main$
|
|
3776
|
-
Icon: _sfc_main$
|
|
3777
|
-
Input: _sfc_main$
|
|
3778
|
-
Number: _sfc_main$
|
|
3779
|
-
Search: _sfc_main$
|
|
3780
|
-
Select: _sfc_main$
|
|
3781
|
-
Switch: _sfc_main$
|
|
3782
|
-
Textarea: _sfc_main$
|
|
3783
|
-
Dynamic: _sfc_main$
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
4371
|
+
Button: _sfc_main$B,
|
|
4372
|
+
Choose: _sfc_main$z,
|
|
4373
|
+
DatePicker: _sfc_main$y,
|
|
4374
|
+
Footer: _sfc_main$x,
|
|
4375
|
+
Header: _sfc_main$w,
|
|
4376
|
+
Icon: _sfc_main$A,
|
|
4377
|
+
Input: _sfc_main$v,
|
|
4378
|
+
Number: _sfc_main$u,
|
|
4379
|
+
Search: _sfc_main$t,
|
|
4380
|
+
Select: _sfc_main$i,
|
|
4381
|
+
Switch: _sfc_main$h,
|
|
4382
|
+
Textarea: _sfc_main$g,
|
|
4383
|
+
Dynamic: _sfc_main$q,
|
|
4384
|
+
Element: _sfc_main$e,
|
|
4385
|
+
Fold: _sfc_main$d,
|
|
4386
|
+
Motion: _sfc_main$a,
|
|
4387
|
+
Layout: _sfc_main$b,
|
|
4388
|
+
Scroll: _sfc_main$c,
|
|
3787
4389
|
Sort: _sfc_main$9,
|
|
3788
4390
|
Table: _sfc_main$8,
|
|
3789
4391
|
TableRow: _sfc_main$7,
|
|
3790
4392
|
TableCol: _sfc_main$6,
|
|
3791
|
-
Transitions: _sfc_main$
|
|
3792
|
-
Tree: _sfc_main$
|
|
3793
|
-
Wrapper: _sfc_main$
|
|
4393
|
+
Transitions: _sfc_main$f,
|
|
4394
|
+
Tree: _sfc_main$4,
|
|
4395
|
+
Wrapper: _sfc_main$3,
|
|
3794
4396
|
DragVerify: _sfc_main,
|
|
3795
|
-
Empty: _sfc_main$
|
|
3796
|
-
Loading: _sfc_main$
|
|
4397
|
+
Empty: _sfc_main$l,
|
|
4398
|
+
Loading: _sfc_main$r
|
|
3797
4399
|
};
|
|
3798
4400
|
|
|
3799
4401
|
snail_core.onMountScope(scope => {
|
|
3800
4402
|
vue.getCurrentScope() && vue.onScopeDispose(scope.destroy);
|
|
3801
4403
|
});
|
|
3802
4404
|
|
|
4405
|
+
exports.MOTION = MOTION;
|
|
3803
4406
|
exports.components = components;
|
|
3804
4407
|
exports.getSvgDraw = getSvgDraw;
|
|
3805
4408
|
exports.mount = mount;
|