snail.vue 2.0.13 → 2.0.16
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 +272 -468
- package/dist/snail.vue.js +590 -630
- package/dist/snail.vue.umd.js +593 -633
- package/dist/styles/snail.vue.vue.css +28 -30
- package/package.json +3 -4
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$l = ["title"];
|
|
9
|
+
var _sfc_main$A = vue.defineComponent({
|
|
10
10
|
...{
|
|
11
11
|
name: "Button",
|
|
12
12
|
inheritAttrs: true
|
|
@@ -22,16 +22,12 @@
|
|
|
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$l);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
addLink("/styles/snail.vue.vue.css");
|
|
33
|
-
|
|
34
|
-
function getSvgDraw(iconType, draw) {
|
|
30
|
+
function getBuiltinIcon(iconType) {
|
|
35
31
|
switch (iconType) {
|
|
36
32
|
case "success":
|
|
37
33
|
return ["M 102.272 613.285 a 48.9258 48.9258 0 0 1 -1.34967 -62.8444 l 26.0656 -31.2113 a 50.6129 50.6129 0 0 1 62.6756 -11.2192 l 199.583 121.218 c 19.4859 11.8097 49.0102 8.26677 65.9655 -8.01371 l 540.714 -519.625 a 40.3216 40.3216 0 0 1 57.9518 1.6871 l 37.9597 43.3583 a 47.5762 47.5762 0 0 1 -0.843545 62.4226 L 452.766 920.675 a 38.4658 38.4658 0 0 1 -56.8553 1.18097 L 102.272 613.285 Z"];
|
|
@@ -53,14 +49,14 @@
|
|
|
53
49
|
return ["M651.3 514.2c0 8.2-3.1 16.4-9.4 22.6L426.4 752.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L574 514.2 381.1 321.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l215.5 215.5c6.2 6.3 9.4 14.5 9.4 22.6z"];
|
|
54
50
|
case "datepicker":
|
|
55
51
|
return ["M848.9 118h-93.5c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8H363.3c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8h-96.6C98.8 118 37 179.8 37 256.1v599.8C37 932.2 98.8 994 175.1 994h673.7c76.3 0 138.1-61.8 138.1-138.1V256.1c0.1-76.3-61.7-138.1-138-138.1zM97 256.1c0-43.2 35-78.1 78.1-78.1h96.6c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h300.5c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h93.5c43.2 0 78.1 35 78.1 78.1v45.4c0 11.4-9.2 20.6-20.6 20.6H117.6c-11.4 0-20.6-9.2-20.6-20.6v-45.4zM927 856c0 43.2-35 78.1-78.1 78.1H175.1c-43.1 0-78.1-35-78.1-78.1V402.7c0-11.4 9.2-20.6 20.6-20.6h788.9c11.4 0 20.6 9.2 20.6 20.6L927 856z", "M240.3 586.1H306c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM479.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30 0.1 16.6 13.5 30 30 30zM718.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM312 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H312c16.5 0 30-13.4 30-30s-13.4-30-30-30zM551 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H551c16.5 0 30-13.4 30-30-0.1-16.6-13.5-30-30-30zM789.9 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30h65.7c16.5 0 30-13.4 30-30s-13.4-30-30-30z"];
|
|
52
|
+
case "timepicker":
|
|
53
|
+
return ["M511.3 926.5c-55.9 0-110.2-11-161.2-32.6-49.3-20.9-93.6-50.7-131.7-88.8-38-38-67.9-82.3-88.8-131.7C108 622.3 97 568.1 97 512.2S108 402 129.6 351c20.9-49.3 50.7-93.6 88.8-131.7 38-38 82.3-67.9 131.7-88.8C401.2 108.9 455.4 98 511.3 98s110.2 11 161.2 32.6c49.3 20.9 93.6 50.7 131.7 88.8 38 38 67.9 82.3 88.8 131.7 21.6 51.1 32.6 105.3 32.6 161.2s-11 110.2-32.6 161.2c-20.9 49.3-50.7 93.6-88.8 131.7s-82.3 67.9-131.7 88.8c-51 21.5-105.3 32.5-161.2 32.5z m0-768.5C316 158 157.1 316.9 157.1 512.2S316 866.5 511.3 866.5s354.2-158.9 354.2-354.2S706.7 158 511.3 158z", "M640.1 702.1c-7.7 0-15.3-2.9-21.2-8.8l-128-127.9c-5.6-5.6-8.8-13.3-8.8-21.2V288c0-16.6 13.4-30 30-30s30 13.4 30 30v243.8l119.2 119.1c11.7 11.7 11.7 30.7 0 42.4-5.8 5.9-13.5 8.8-21.2 8.8z"];
|
|
56
54
|
case "plus":
|
|
57
55
|
return ["M 768 469.333 h -213.333 V 256 c 0 -25.6 -17.0667 -42.6667 -42.6667 -42.6667 s -42.6667 17.0667 -42.6667 42.6667 v 213.333 H 256 c -25.6 0 -42.6667 17.0667 -42.6667 42.6667 s 17.0667 42.6667 42.6667 42.6667 h 213.333 v 213.333 c 0 25.6 17.0667 42.6667 42.6667 42.6667 s 42.6667 -17.0667 42.6667 -42.6667 v -213.333 h 213.333 c 25.6 0 42.6667 -17.0667 42.6667 -42.6667 s -17.0667 -42.6667 -42.6667 -42.6667 Z"];
|
|
58
56
|
case "subtract":
|
|
59
57
|
return ["M768 554.666667H256c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667h512c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666667z"];
|
|
60
58
|
case "grip":
|
|
61
59
|
return ["M 384 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z"];
|
|
62
|
-
case "custom":
|
|
63
|
-
return snail_core.isArrayNotEmpty(draw) ? draw : snail_core.isStringNotEmpty(draw) ? [draw] : snail_core.throwError("options.draw must be a non-empty string or string array");
|
|
64
60
|
default:
|
|
65
61
|
{
|
|
66
62
|
snail_core.throwError(`not support icon type: ${iconType}.`);
|
|
@@ -69,57 +65,82 @@
|
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
|
|
72
|
-
const _hoisted_1$
|
|
68
|
+
const _hoisted_1$k = ["viewBox"];
|
|
73
69
|
const _hoisted_2$c = ["textContent"];
|
|
74
|
-
const _hoisted_3$a = ["
|
|
75
|
-
var _sfc_main$
|
|
76
|
-
...{
|
|
77
|
-
name: "Icon",
|
|
78
|
-
inheritAttrs: true
|
|
79
|
-
},
|
|
70
|
+
const _hoisted_3$a = ["d"];
|
|
71
|
+
var _sfc_main$z = vue.defineComponent({
|
|
80
72
|
__name: "icon",
|
|
81
73
|
props: {
|
|
82
74
|
title: {},
|
|
75
|
+
custom: {
|
|
76
|
+
type: Boolean
|
|
77
|
+
},
|
|
83
78
|
type: {},
|
|
84
|
-
|
|
79
|
+
button: {
|
|
80
|
+
type: Boolean
|
|
81
|
+
},
|
|
82
|
+
size: {},
|
|
85
83
|
color: {},
|
|
86
84
|
hoverColor: {},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
strokeWidth: {},
|
|
90
|
-
draw: {},
|
|
91
|
-
rotate: {}
|
|
85
|
+
rotate: {},
|
|
86
|
+
viewBox: {}
|
|
92
87
|
},
|
|
93
88
|
setup(__props) {
|
|
89
|
+
const props = __props;
|
|
94
90
|
const isMouseEnterRef = vue.shallowRef(false);
|
|
91
|
+
const sizeRef = vue.computed(() => {
|
|
92
|
+
if (snail_core.isObject(props.size) == true) {
|
|
93
|
+
return {
|
|
94
|
+
width: snail_core.correctNumber(props.size.width, 24),
|
|
95
|
+
height: snail_core.correctNumber(props.size.height, 24)
|
|
96
|
+
};
|
|
97
|
+
} else {
|
|
98
|
+
const number = snail_core.correctNumber(props.size, 24);
|
|
99
|
+
return {
|
|
100
|
+
width: number,
|
|
101
|
+
height: number
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const styleRef = vue.computed(() => {
|
|
106
|
+
const style = Object.create(null);
|
|
107
|
+
let fill = isMouseEnterRef.value ? snail_core.correctString(props.hoverColor, props.color, true) : void 0;
|
|
108
|
+
fill == void 0 && (fill = snail_core.correctString(props.color, void 0, true));
|
|
109
|
+
fill && (style.fill = fill);
|
|
110
|
+
const rotate = snail_core.correctNumber(props.rotate, 0);
|
|
111
|
+
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
112
|
+
return style;
|
|
113
|
+
});
|
|
95
114
|
return (_ctx, _cache) => {
|
|
96
|
-
return vue.openBlock(), vue.createElementBlock("svg", {
|
|
97
|
-
class:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
return vue.openBlock(), vue.createElementBlock("svg", vue.mergeProps({
|
|
116
|
+
class: ["snail-icon", __props.type, {
|
|
117
|
+
button: __props.button
|
|
118
|
+
}],
|
|
119
|
+
viewBox: vue.unref(snail_core.correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
120
|
+
}, sizeRef.value, {
|
|
121
|
+
style: styleRef.value,
|
|
102
122
|
onMouseenter: _cache[0] || (_cache[0] = $event => isMouseEnterRef.value = true),
|
|
103
123
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
104
|
-
}, [vue.createElementVNode("title", {
|
|
124
|
+
}), [vue.createElementVNode("title", {
|
|
105
125
|
textContent: vue.toDisplayString(__props.title || "")
|
|
106
|
-
}, null, 8, _hoisted_2$c),
|
|
126
|
+
}, null, 8, _hoisted_2$c), __props.custom == true ? vue.renderSlot(_ctx.$slots, "default", {
|
|
127
|
+
key: 0
|
|
128
|
+
}) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
129
|
+
key: 1
|
|
130
|
+
}, vue.renderList(vue.unref(getBuiltinIcon)(__props.type), d => {
|
|
107
131
|
return vue.openBlock(), vue.createElementBlock("path", {
|
|
108
|
-
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
109
|
-
stroke: __props.stroke,
|
|
110
|
-
"stroke-width": __props.strokeWidth,
|
|
111
132
|
d
|
|
112
133
|
}, null, 8, _hoisted_3$a);
|
|
113
|
-
}), 256))],
|
|
134
|
+
}), 256))], 16, _hoisted_1$k);
|
|
114
135
|
};
|
|
115
136
|
}
|
|
116
137
|
});
|
|
117
138
|
|
|
118
|
-
const _hoisted_1$
|
|
139
|
+
const _hoisted_1$j = ["title", "onClick"];
|
|
119
140
|
const _hoisted_2$b = ["type", "checked"];
|
|
120
141
|
const _hoisted_3$9 = ["textContent"];
|
|
121
142
|
const _hoisted_4$7 = ["textContent"];
|
|
122
|
-
var _sfc_main$
|
|
143
|
+
var _sfc_main$y = vue.defineComponent({
|
|
123
144
|
...{
|
|
124
145
|
name: "Choose",
|
|
125
146
|
inheritAttrs: true
|
|
@@ -198,7 +219,7 @@
|
|
|
198
219
|
}, null, 8, _hoisted_2$b)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
199
220
|
key: 1,
|
|
200
221
|
class: vue.normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
201
|
-
}, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
222
|
+
}, [node.selected ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
202
223
|
key: 0,
|
|
203
224
|
type: "success",
|
|
204
225
|
size: 12,
|
|
@@ -211,168 +232,15 @@
|
|
|
211
232
|
key: 3,
|
|
212
233
|
class: "item-des",
|
|
213
234
|
textContent: vue.toDisplayString(node.item.description)
|
|
214
|
-
}, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$
|
|
235
|
+
}, null, 8, _hoisted_4$7)) : vue.createCommentVNode("", true)], 14, _hoisted_1$j);
|
|
215
236
|
}), 128))], 2);
|
|
216
237
|
};
|
|
217
238
|
}
|
|
218
239
|
});
|
|
219
240
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
props: {
|
|
224
|
-
type: {},
|
|
225
|
-
range: {
|
|
226
|
-
type: Boolean
|
|
227
|
-
},
|
|
228
|
-
format: {},
|
|
229
|
-
begin: {},
|
|
230
|
-
end: {},
|
|
231
|
-
min: {},
|
|
232
|
-
max: {},
|
|
233
|
-
zIndex: {},
|
|
234
|
-
timeDisabled: {
|
|
235
|
-
type: Boolean
|
|
236
|
-
},
|
|
237
|
-
secondDisabled: {
|
|
238
|
-
type: Boolean
|
|
239
|
-
},
|
|
240
|
-
cleanDisabled: {
|
|
241
|
-
type: Boolean
|
|
242
|
-
},
|
|
243
|
-
nowDisabled: {
|
|
244
|
-
type: Boolean
|
|
245
|
-
},
|
|
246
|
-
submitDisabled: {
|
|
247
|
-
type: Boolean
|
|
248
|
-
},
|
|
249
|
-
width: {},
|
|
250
|
-
height: {},
|
|
251
|
-
behindTop: {}
|
|
252
|
-
},
|
|
253
|
-
emits: ["change", "picker-focus", "picker-blur"],
|
|
254
|
-
setup(__props, _ref) {
|
|
255
|
-
let {
|
|
256
|
-
expose: __expose,
|
|
257
|
-
emit: __emit
|
|
258
|
-
} = _ref;
|
|
259
|
-
const props = __props;
|
|
260
|
-
const emits = __emit;
|
|
261
|
-
const {
|
|
262
|
-
onInterval,
|
|
263
|
-
onTimeout
|
|
264
|
-
} = snail_core.useTimer();
|
|
265
|
-
const {
|
|
266
|
-
range
|
|
267
|
-
} = props;
|
|
268
|
-
const format = props.format || "yyyy-MM-dd";
|
|
269
|
-
const id = `DP${snail_core.newId()}`.toUpperCase();
|
|
270
|
-
var pickerInitialTimer = void 0;
|
|
271
|
-
var pickerLastStatus = void 0;
|
|
272
|
-
var pickerStatusTimer = void 0;
|
|
273
|
-
const pickerStatusArray = [];
|
|
274
|
-
__expose({
|
|
275
|
-
showPicker
|
|
276
|
-
});
|
|
277
|
-
function initZanePopup(flag) {
|
|
278
|
-
const obj = window[flag] ? window[flag].$obj : void 0;
|
|
279
|
-
if (obj) {
|
|
280
|
-
obj.removeEventListener("mouseenter", onZanePopupFocus);
|
|
281
|
-
obj.removeEventListener("mouseleave", onZanePopupFocus);
|
|
282
|
-
obj.addEventListener("mouseenter", onZanePopupFocus);
|
|
283
|
-
obj.addEventListener("mouseleave", onZanePopupFocus);
|
|
284
|
-
return true;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
function destroyZanePopup(flag) {
|
|
288
|
-
if (window[flag]) {
|
|
289
|
-
window[flag].removeCalendar && window[flag].removeCalendar();
|
|
290
|
-
delete window[flag];
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
function showPicker(delay) {
|
|
294
|
-
const div = document.getElementById(id);
|
|
295
|
-
div && (delay > 0 ? onTimeout(() => div.click(), delay) : div.click());
|
|
296
|
-
}
|
|
297
|
-
function onClick() {
|
|
298
|
-
if (pickerInitialTimer && pickerInitialTimer.destroyed != true) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
pickerInitialTimer = onInterval(() => {
|
|
302
|
-
let counter = 0;
|
|
303
|
-
initZanePopup(id) && counter++;
|
|
304
|
-
range && initZanePopup(`${id}DOUBLE`) && counter++;
|
|
305
|
-
counter == (range ? 2 : 1) && pickerInitialTimer.destroy();
|
|
306
|
-
}, 10);
|
|
307
|
-
const timeoutScope = onTimeout(() => pickerInitialTimer.destroyed || pickerInitialTimer.destroy(), 5e3);
|
|
308
|
-
pickerInitialTimer.onDestroy(() => timeoutScope.destroyed || timeoutScope.destroy());
|
|
309
|
-
}
|
|
310
|
-
function onZaneMounted() {}
|
|
311
|
-
function onZanePopupFocus(e) {
|
|
312
|
-
const type = e.type == "mouseenter" ? "focus" : "blur";
|
|
313
|
-
pickerStatusArray.push(type);
|
|
314
|
-
pickerStatusTimer && pickerStatusTimer.destroy();
|
|
315
|
-
pickerStatusTimer = onTimeout(() => {
|
|
316
|
-
const lastStatus = snail_core.getFromArray(pickerStatusArray, -1);
|
|
317
|
-
lastStatus && pickerLastStatus != lastStatus && emits(`picker-${lastStatus}`);
|
|
318
|
-
pickerLastStatus = lastStatus;
|
|
319
|
-
pickerStatusTimer = void 0;
|
|
320
|
-
pickerStatusArray.splice(0);
|
|
321
|
-
}, 0);
|
|
322
|
-
}
|
|
323
|
-
function onZaneDone(full, begin, end) {
|
|
324
|
-
if (format.includes("-") == true) {
|
|
325
|
-
begin && (begin = begin.replaceAll("/", "-"));
|
|
326
|
-
end && (end = end.replaceAll("/", "-"));
|
|
327
|
-
}
|
|
328
|
-
emits("change", begin, end);
|
|
329
|
-
}
|
|
330
|
-
snail_view.link.register("/styles/zane-calendar.css");
|
|
331
|
-
vue.onMounted(() => {
|
|
332
|
-
snail_core.script.has("zane-calendar") || snail_core.throwError(`zane-calendar module unregistered.`);
|
|
333
|
-
const zaneOptions = {
|
|
334
|
-
elem: `#${id}`,
|
|
335
|
-
type: `${range ? "double" : ""}${props.type || "day"}`,
|
|
336
|
-
format,
|
|
337
|
-
begintime: props.begin || "",
|
|
338
|
-
endtime: props.end || "",
|
|
339
|
-
min: props.min || "1900-10-01",
|
|
340
|
-
max: props.max || "",
|
|
341
|
-
zindex: props.zIndex || 1e4,
|
|
342
|
-
showtime: props.timeDisabled != true,
|
|
343
|
-
showsecond: props.secondDisabled != true,
|
|
344
|
-
showclean: props.cleanDisabled != true,
|
|
345
|
-
shownow: props.nowDisabled != true,
|
|
346
|
-
showsubmit: props.submitDisabled != true,
|
|
347
|
-
width: props.width || 280,
|
|
348
|
-
height: props.height || 300,
|
|
349
|
-
behindTop: props.behindTop || 4,
|
|
350
|
-
lang: "cn",
|
|
351
|
-
event: "click",
|
|
352
|
-
position: "fixed",
|
|
353
|
-
haveBotBtns: true,
|
|
354
|
-
mounted: onZaneMounted,
|
|
355
|
-
done: onZaneDone
|
|
356
|
-
};
|
|
357
|
-
snail_core.script.load("zane-calendar").then(calendar => {
|
|
358
|
-
console.log(zaneOptions);
|
|
359
|
-
snail_core.isFunction(calendar) || snail_core.throwError("load zane-calendar failed: value is not a function.");
|
|
360
|
-
calendar(zaneOptions);
|
|
361
|
-
}, reason => snail_core.throwError(reason));
|
|
362
|
-
});
|
|
363
|
-
vue.onUnmounted(() => {
|
|
364
|
-
destroyZanePopup(id);
|
|
365
|
-
range && destroyZanePopup(`${id}DOUBLE`);
|
|
366
|
-
});
|
|
367
|
-
return (_ctx, _cache) => {
|
|
368
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
369
|
-
class: "snail-datepicker",
|
|
370
|
-
id: vue.unref(id),
|
|
371
|
-
onClick
|
|
372
|
-
}, null, 8, _hoisted_1$h);
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
});
|
|
241
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
242
|
+
|
|
243
|
+
addLink("/styles/snail.vue.vue.css");
|
|
376
244
|
|
|
377
245
|
var _sfc_main$x = vue.defineComponent({
|
|
378
246
|
...{
|
|
@@ -405,13 +273,13 @@
|
|
|
405
273
|
class: vue.normalizeClass(["snail-footer", {
|
|
406
274
|
"start-divider": __props.divider
|
|
407
275
|
}, __props.align || "right"])
|
|
408
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
276
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
409
277
|
key: 0,
|
|
410
278
|
size: "max",
|
|
411
279
|
type: "default",
|
|
412
280
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
413
281
|
textContent: vue.toDisplayString(__props.cancelName || "取消")
|
|
414
|
-
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
282
|
+
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
415
283
|
key: 1,
|
|
416
284
|
size: "max",
|
|
417
285
|
type: "primary",
|
|
@@ -422,7 +290,7 @@
|
|
|
422
290
|
}
|
|
423
291
|
});
|
|
424
292
|
|
|
425
|
-
const _hoisted_1$
|
|
293
|
+
const _hoisted_1$i = ["textContent"];
|
|
426
294
|
var _sfc_main$w = vue.defineComponent({
|
|
427
295
|
...{
|
|
428
296
|
name: "Header",
|
|
@@ -462,19 +330,20 @@
|
|
|
462
330
|
key: 0,
|
|
463
331
|
textContent: vue.toDisplayString(__props.title),
|
|
464
332
|
class: vue.normalizeClass(["header-title", __props.titleAlign])
|
|
465
|
-
}, null, 10, _hoisted_1$
|
|
333
|
+
}, null, 10, _hoisted_1$i)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
466
334
|
key: 1,
|
|
335
|
+
class: "close-icon",
|
|
467
336
|
type: "close",
|
|
337
|
+
button: "",
|
|
468
338
|
size: 22,
|
|
469
339
|
color: __props.useTo == "page" ? "#2e3033" : "#464953",
|
|
470
|
-
class: "close-icon",
|
|
471
340
|
onClick: _cache[0] || (_cache[0] = $event => emits("close"))
|
|
472
341
|
}, null, 8, ["color"])) : vue.createCommentVNode("", true)], 2);
|
|
473
342
|
};
|
|
474
343
|
}
|
|
475
344
|
});
|
|
476
345
|
|
|
477
|
-
const _hoisted_1$
|
|
346
|
+
const _hoisted_1$h = ["textContent"];
|
|
478
347
|
const _hoisted_2$a = {
|
|
479
348
|
key: 0,
|
|
480
349
|
class: "required",
|
|
@@ -537,7 +406,7 @@
|
|
|
537
406
|
}, [vue.createElementVNode("span", {
|
|
538
407
|
class: "text",
|
|
539
408
|
textContent: vue.toDisplayString(__props.title)
|
|
540
|
-
}, null, 8, _hoisted_1$
|
|
409
|
+
}, null, 8, _hoisted_1$h), __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", {
|
|
541
410
|
ref: "input-el",
|
|
542
411
|
type: __props.type || "text",
|
|
543
412
|
value: inputModel.value,
|
|
@@ -550,8 +419,9 @@
|
|
|
550
419
|
key: 0,
|
|
551
420
|
class: "validate",
|
|
552
421
|
title: validateRef.value
|
|
553
|
-
}, [vue.createVNode(_sfc_main$
|
|
422
|
+
}, [vue.createVNode(_sfc_main$z, {
|
|
554
423
|
type: "error",
|
|
424
|
+
button: "",
|
|
555
425
|
size: 16,
|
|
556
426
|
color: "red"
|
|
557
427
|
})], 8, _hoisted_5$4)) : vue.createCommentVNode("", true)])], 2);
|
|
@@ -759,7 +629,7 @@
|
|
|
759
629
|
return formatter;
|
|
760
630
|
}
|
|
761
631
|
|
|
762
|
-
const _hoisted_1$
|
|
632
|
+
const _hoisted_1$g = {
|
|
763
633
|
key: 0,
|
|
764
634
|
class: "number-prefix"
|
|
765
635
|
};
|
|
@@ -919,7 +789,7 @@
|
|
|
919
789
|
"has-prefix": vue.unref(hasPrefix),
|
|
920
790
|
"has-suffix": vue.unref(hasSuffix)
|
|
921
791
|
}])
|
|
922
|
-
}, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
792
|
+
}, [vue.unref(hasPrefix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [vue.createElementVNode("span", {
|
|
923
793
|
class: "ellipsis",
|
|
924
794
|
textContent: vue.toDisplayString(vue.unref(prefix))
|
|
925
795
|
}, null, 8, _hoisted_2$9)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
@@ -939,29 +809,33 @@
|
|
|
939
809
|
}, [vue.createElementVNode("div", {
|
|
940
810
|
class: "controls default subtract",
|
|
941
811
|
onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
|
|
942
|
-
}, [vue.createVNode(_sfc_main$
|
|
812
|
+
}, [vue.createVNode(_sfc_main$z, {
|
|
943
813
|
type: "subtract",
|
|
814
|
+
button: "",
|
|
944
815
|
size: 20
|
|
945
816
|
})]), vue.createElementVNode("div", {
|
|
946
817
|
class: "controls default plus",
|
|
947
818
|
onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
|
|
948
|
-
}, [vue.createVNode(_sfc_main$
|
|
819
|
+
}, [vue.createVNode(_sfc_main$z, {
|
|
949
820
|
type: "plus",
|
|
821
|
+
button: "",
|
|
950
822
|
size: 20
|
|
951
823
|
})])], 64)) : vue.unref(controls) == "right" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
952
824
|
key: 1
|
|
953
825
|
}, [vue.createElementVNode("div", {
|
|
954
826
|
class: "controls right plus",
|
|
955
827
|
onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
|
|
956
|
-
}, [vue.createVNode(_sfc_main$
|
|
828
|
+
}, [vue.createVNode(_sfc_main$z, {
|
|
957
829
|
type: "arrow",
|
|
830
|
+
button: "",
|
|
958
831
|
size: 20,
|
|
959
832
|
rotate: 270
|
|
960
833
|
})]), vue.createElementVNode("div", {
|
|
961
834
|
class: "controls right subtract",
|
|
962
835
|
onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
|
|
963
|
-
}, [vue.createVNode(_sfc_main$
|
|
836
|
+
}, [vue.createVNode(_sfc_main$z, {
|
|
964
837
|
type: "arrow",
|
|
838
|
+
button: "",
|
|
965
839
|
size: 20,
|
|
966
840
|
rotate: 90
|
|
967
841
|
})])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [vue.createElementVNode("span", {
|
|
@@ -982,8 +856,7 @@
|
|
|
982
856
|
}
|
|
983
857
|
});
|
|
984
858
|
|
|
985
|
-
const _hoisted_1$
|
|
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";
|
|
859
|
+
const _hoisted_1$f = ["placeholder", "readonly"];
|
|
987
860
|
var _sfc_main$t = vue.defineComponent({
|
|
988
861
|
...{
|
|
989
862
|
name: "Search",
|
|
@@ -1029,15 +902,19 @@
|
|
|
1029
902
|
readonly: __props.readonly,
|
|
1030
903
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
1031
904
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
1032
|
-
}, null, 40, _hoisted_1$
|
|
905
|
+
}, null, 40, _hoisted_1$f), [[vue.vModelText, textModel.value, void 0, {
|
|
1033
906
|
trim: true
|
|
1034
|
-
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$
|
|
907
|
+
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$z, {
|
|
1035
908
|
class: "search-button",
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
size: 24,
|
|
909
|
+
custom: "",
|
|
910
|
+
button: "",
|
|
1039
911
|
color: "#707070",
|
|
1040
912
|
onClick: _cache[2] || (_cache[2] = $event => onSearch(void 0))
|
|
913
|
+
}, {
|
|
914
|
+
default: vue.withCtx(() => [...(_cache[3] || (_cache[3] = [vue.createElementVNode("path", {
|
|
915
|
+
d: "M 860.16 824.32 l -163.84 -163.84 c 102.4 -120.32 97.28 -302.08 -17.92 -414.72 c -120.32 -120.32 -314.88 -120.32 -435.2 0 c -120.32 120.32 -120.32 314.88 0 435.2 c 112.64 112.64 294.4 120.32 414.72 17.92 l 163.84 163.84 c 10.24 10.24 25.6 10.24 35.84 0 c 12.8 -12.8 12.8 -28.16 2.56 -38.4 Z M 281.6 642.56 C 181.76 542.72 181.76 381.44 281.6 281.6 c 99.84 -99.84 261.12 -99.84 360.96 0 c 99.84 99.84 99.84 261.12 0 360.96 c -99.84 102.4 -261.12 102.4 -360.96 0 Z"
|
|
916
|
+
}, null, -1)]))]),
|
|
917
|
+
_: 1
|
|
1041
918
|
})])], 2);
|
|
1042
919
|
};
|
|
1043
920
|
}
|
|
@@ -1252,7 +1129,7 @@
|
|
|
1252
1129
|
}
|
|
1253
1130
|
}
|
|
1254
1131
|
|
|
1255
|
-
const _hoisted_1$
|
|
1132
|
+
const _hoisted_1$e = {
|
|
1256
1133
|
class: "snail-confirm flex-column"
|
|
1257
1134
|
};
|
|
1258
1135
|
const _hoisted_2$8 = ["innerHTML"];
|
|
@@ -1284,7 +1161,7 @@
|
|
|
1284
1161
|
},
|
|
1285
1162
|
setup(__props) {
|
|
1286
1163
|
return (_ctx, _cache) => {
|
|
1287
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1164
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createVNode(_sfc_main$w, {
|
|
1288
1165
|
"use-to": "dialog",
|
|
1289
1166
|
title: __props.title || "提示",
|
|
1290
1167
|
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
@@ -1304,7 +1181,104 @@
|
|
|
1304
1181
|
}
|
|
1305
1182
|
});
|
|
1306
1183
|
|
|
1184
|
+
const MOTION = Object.freeze({
|
|
1185
|
+
"fade": {
|
|
1186
|
+
enter: "fade-in",
|
|
1187
|
+
leave: "fade-out"
|
|
1188
|
+
},
|
|
1189
|
+
"scale": {
|
|
1190
|
+
enter: "scale-in",
|
|
1191
|
+
leave: "scale-out"
|
|
1192
|
+
},
|
|
1193
|
+
"rotate": {
|
|
1194
|
+
enter: "rotate-in",
|
|
1195
|
+
leave: "rotate-out"
|
|
1196
|
+
},
|
|
1197
|
+
"top": {
|
|
1198
|
+
enter: "top-in",
|
|
1199
|
+
leave: "top-out"
|
|
1200
|
+
},
|
|
1201
|
+
"topBottom": {
|
|
1202
|
+
enter: "top-in",
|
|
1203
|
+
leave: "bottom-out"
|
|
1204
|
+
},
|
|
1205
|
+
"bottom": {
|
|
1206
|
+
enter: "bottom-in",
|
|
1207
|
+
leave: "bottom-out"
|
|
1208
|
+
},
|
|
1209
|
+
"bottomTop": {
|
|
1210
|
+
enter: "bottom-in",
|
|
1211
|
+
leave: "top-out"
|
|
1212
|
+
},
|
|
1213
|
+
"left": {
|
|
1214
|
+
enter: "left-in",
|
|
1215
|
+
leave: "left-out"
|
|
1216
|
+
},
|
|
1217
|
+
"leftRight": {
|
|
1218
|
+
enter: "left-in",
|
|
1219
|
+
leave: "right-out"
|
|
1220
|
+
},
|
|
1221
|
+
"right": {
|
|
1222
|
+
enter: "right-in",
|
|
1223
|
+
leave: "right-out"
|
|
1224
|
+
},
|
|
1225
|
+
"rightLeft": {
|
|
1226
|
+
enter: "right-in",
|
|
1227
|
+
leave: "left-out"
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
for (var key in MOTION) snail_core.hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
|
|
1231
|
+
|
|
1307
1232
|
var _sfc_main$r = vue.defineComponent({
|
|
1233
|
+
__name: "motion",
|
|
1234
|
+
props: {
|
|
1235
|
+
multiple: {
|
|
1236
|
+
type: Boolean
|
|
1237
|
+
},
|
|
1238
|
+
effect: {},
|
|
1239
|
+
duration: {},
|
|
1240
|
+
mode: {}
|
|
1241
|
+
},
|
|
1242
|
+
setup(__props) {
|
|
1243
|
+
const props = __props;
|
|
1244
|
+
const durationRef = vue.computed(() => {
|
|
1245
|
+
const number = snail_core.correctNumber(props.duration, 200);
|
|
1246
|
+
return number > 0 ? number : 0;
|
|
1247
|
+
});
|
|
1248
|
+
const motionClassRef = vue.computed(buildMotionClass);
|
|
1249
|
+
function buildMotionClass() {
|
|
1250
|
+
const effectClass = Object.create(null);
|
|
1251
|
+
if (durationRef.value > 0) {
|
|
1252
|
+
if (snail_core.isString(props.effect) == false) {
|
|
1253
|
+
const effect = props.effect || MOTION.fade;
|
|
1254
|
+
effectClass.enterActiveClass = effect.enter;
|
|
1255
|
+
effectClass.leaveActiveClass = effect.leave;
|
|
1256
|
+
} else if (props.effect.length > 0) {
|
|
1257
|
+
effectClass.enterActiveClass = `${props.effect} enter-active`;
|
|
1258
|
+
effectClass.enterFromClass = `${props.effect} enter-from`;
|
|
1259
|
+
effectClass.enterToClass = `${props.effect} enter-to`;
|
|
1260
|
+
effectClass.leaveActiveClass = `${props.effect} leave-active`;
|
|
1261
|
+
effectClass.leaveFromClass = `${props.effect} leave-from`;
|
|
1262
|
+
effectClass.leaveToClass = `${props.effect} leave-to`;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
return effectClass;
|
|
1266
|
+
}
|
|
1267
|
+
return (_ctx, _cache) => {
|
|
1268
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.multiple ? vue.TransitionGroup : vue.Transition), vue.mergeProps({
|
|
1269
|
+
appear: "",
|
|
1270
|
+
duration: durationRef.value
|
|
1271
|
+
}, __props.multiple ? void 0 : {
|
|
1272
|
+
mode: __props.mode
|
|
1273
|
+
}, motionClassRef.value), {
|
|
1274
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
1275
|
+
_: 3
|
|
1276
|
+
}, 16, ["duration"]);
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
});
|
|
1280
|
+
|
|
1281
|
+
var _sfc_main$q = vue.defineComponent({
|
|
1308
1282
|
...{
|
|
1309
1283
|
name: "Loading",
|
|
1310
1284
|
inheritAttrs: true
|
|
@@ -1328,8 +1302,8 @@
|
|
|
1328
1302
|
},
|
|
1329
1303
|
setup(__props) {
|
|
1330
1304
|
return (_ctx, _cache) => {
|
|
1331
|
-
return vue.openBlock(), vue.createBlock(
|
|
1332
|
-
|
|
1305
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$r, {
|
|
1306
|
+
effect: vue.unref(MOTION).fade
|
|
1333
1307
|
}, {
|
|
1334
1308
|
default: vue.withCtx(() => [__props.show ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1335
1309
|
key: 0,
|
|
@@ -1338,12 +1312,12 @@
|
|
|
1338
1312
|
}, __props.rootClass])
|
|
1339
1313
|
}, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)))], 2)) : vue.createCommentVNode("", true)]),
|
|
1340
1314
|
_: 3
|
|
1341
|
-
}, 8, ["
|
|
1315
|
+
}, 8, ["effect"]);
|
|
1342
1316
|
};
|
|
1343
1317
|
}
|
|
1344
1318
|
});
|
|
1345
1319
|
|
|
1346
|
-
var _sfc_main$
|
|
1320
|
+
var _sfc_main$p = vue.defineComponent({
|
|
1347
1321
|
...{
|
|
1348
1322
|
name: "Dynamic",
|
|
1349
1323
|
inheritAttrs: false
|
|
@@ -1367,7 +1341,7 @@
|
|
|
1367
1341
|
const loadingComponent = vue.defineComponent({
|
|
1368
1342
|
inheritAttrs: false,
|
|
1369
1343
|
components: {
|
|
1370
|
-
Loading: _sfc_main$
|
|
1344
|
+
Loading: _sfc_main$q
|
|
1371
1345
|
},
|
|
1372
1346
|
template: "<Loading :mask-disabled='true' />"
|
|
1373
1347
|
});
|
|
@@ -1434,7 +1408,7 @@
|
|
|
1434
1408
|
}
|
|
1435
1409
|
});
|
|
1436
1410
|
|
|
1437
|
-
var _sfc_main$
|
|
1411
|
+
var _sfc_main$o = vue.defineComponent({
|
|
1438
1412
|
...{
|
|
1439
1413
|
name: "DialogContainer",
|
|
1440
1414
|
inheritAttrs: true
|
|
@@ -1479,7 +1453,7 @@
|
|
|
1479
1453
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
|
|
1480
1454
|
__props.options.closeOnMask && vue.unref(closePopup)();
|
|
1481
1455
|
}, ["self"]))
|
|
1482
|
-
}, [vue.createVNode(_sfc_main$
|
|
1456
|
+
}, [vue.createVNode(_sfc_main$p, vue.mergeProps({
|
|
1483
1457
|
class: "dialog-body",
|
|
1484
1458
|
name: __props.options.name,
|
|
1485
1459
|
component: __props.options.component,
|
|
@@ -1494,7 +1468,7 @@
|
|
|
1494
1468
|
}
|
|
1495
1469
|
});
|
|
1496
1470
|
|
|
1497
|
-
var _sfc_main$
|
|
1471
|
+
var _sfc_main$n = vue.defineComponent({
|
|
1498
1472
|
...{
|
|
1499
1473
|
name: "FollowContainer",
|
|
1500
1474
|
inheritAttrs: true
|
|
@@ -1615,7 +1589,7 @@
|
|
|
1615
1589
|
});
|
|
1616
1590
|
});
|
|
1617
1591
|
return (_ctx, _cache) => {
|
|
1618
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1592
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
|
|
1619
1593
|
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1620
1594
|
style: {
|
|
1621
1595
|
"z-index": __props.zIndex
|
|
@@ -1632,7 +1606,7 @@
|
|
|
1632
1606
|
}
|
|
1633
1607
|
});
|
|
1634
1608
|
|
|
1635
|
-
var _sfc_main$
|
|
1609
|
+
var _sfc_main$m = vue.defineComponent({
|
|
1636
1610
|
...{
|
|
1637
1611
|
name: "PopupContainer",
|
|
1638
1612
|
inheritAttrs: true
|
|
@@ -1652,7 +1626,7 @@
|
|
|
1652
1626
|
model = vue.shallowRef(void 0)
|
|
1653
1627
|
} = __props.options;
|
|
1654
1628
|
return (_ctx, _cache) => {
|
|
1655
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1629
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
|
|
1656
1630
|
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1657
1631
|
style: {
|
|
1658
1632
|
"z-index": __props.zIndex
|
|
@@ -1670,12 +1644,12 @@
|
|
|
1670
1644
|
}
|
|
1671
1645
|
});
|
|
1672
1646
|
|
|
1673
|
-
const _hoisted_1$
|
|
1647
|
+
const _hoisted_1$d = {
|
|
1674
1648
|
key: 1,
|
|
1675
1649
|
class: "icon"
|
|
1676
1650
|
};
|
|
1677
1651
|
const _hoisted_2$7 = ["innerHTML"];
|
|
1678
|
-
var _sfc_main$
|
|
1652
|
+
var _sfc_main$l = vue.defineComponent({
|
|
1679
1653
|
...{
|
|
1680
1654
|
name: "ToastContainer",
|
|
1681
1655
|
inheritAttrs: true
|
|
@@ -1698,7 +1672,6 @@
|
|
|
1698
1672
|
closePopup
|
|
1699
1673
|
} = __props.extOptions;
|
|
1700
1674
|
const duration = props.duration > 0 ? props.duration : 1500;
|
|
1701
|
-
const closeFillRef = vue.ref("#707070");
|
|
1702
1675
|
var destroyTimer;
|
|
1703
1676
|
function onMouseEvent(isLeave) {
|
|
1704
1677
|
destroyTimer && destroyTimer.destroy();
|
|
@@ -1711,22 +1684,22 @@
|
|
|
1711
1684
|
style: vue.normalizeStyle({
|
|
1712
1685
|
"z-index": __props.zIndex
|
|
1713
1686
|
}),
|
|
1714
|
-
onMouseenter: _cache[
|
|
1715
|
-
onMouseleave: _cache[
|
|
1716
|
-
}, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1687
|
+
onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
|
|
1688
|
+
onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
|
|
1689
|
+
}, [vue.unref(props).closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
1717
1690
|
key: 0,
|
|
1718
1691
|
class: "close-icon",
|
|
1719
1692
|
type: "close",
|
|
1720
|
-
|
|
1693
|
+
button: "",
|
|
1721
1694
|
size: 20,
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
onClick: _cache[
|
|
1695
|
+
color: "#707070",
|
|
1696
|
+
"hover-color": "red",
|
|
1697
|
+
onClick: _cache[0] || (_cache[0] = $event => {
|
|
1725
1698
|
vue.unref(closePopup)();
|
|
1726
1699
|
})
|
|
1727
|
-
}
|
|
1700
|
+
})) : vue.createCommentVNode("", true), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [vue.createVNode(_sfc_main$z, {
|
|
1728
1701
|
type: vue.unref(props).type,
|
|
1729
|
-
|
|
1702
|
+
color: "#707070",
|
|
1730
1703
|
size: 20
|
|
1731
1704
|
}, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
1732
1705
|
class: "message",
|
|
@@ -1738,7 +1711,7 @@
|
|
|
1738
1711
|
|
|
1739
1712
|
function usePopup() {
|
|
1740
1713
|
function popup(options) {
|
|
1741
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1714
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$m, options);
|
|
1742
1715
|
return addScope2Scopes(scope);
|
|
1743
1716
|
}
|
|
1744
1717
|
function dialog(options) {
|
|
@@ -1771,7 +1744,7 @@
|
|
|
1771
1744
|
},
|
|
1772
1745
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1773
1746
|
});
|
|
1774
|
-
const descriptor = openPopup(_sfc_main$
|
|
1747
|
+
const descriptor = openPopup(_sfc_main$o, options, extOptions);
|
|
1775
1748
|
scope = snail_core.useAsyncScope(deferred.promise);
|
|
1776
1749
|
monitorDialog(descriptor, scope, deferred);
|
|
1777
1750
|
}
|
|
@@ -1789,7 +1762,7 @@
|
|
|
1789
1762
|
inPopup: "follow",
|
|
1790
1763
|
target
|
|
1791
1764
|
};
|
|
1792
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1765
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$n, options, extOptions);
|
|
1793
1766
|
}
|
|
1794
1767
|
return addScope2Scopes(scope);
|
|
1795
1768
|
}
|
|
@@ -1806,7 +1779,7 @@
|
|
|
1806
1779
|
});
|
|
1807
1780
|
}
|
|
1808
1781
|
function toast(type, message, options) {
|
|
1809
|
-
return popupInCustomContainer(_sfc_main$
|
|
1782
|
+
return popupInCustomContainer(_sfc_main$l, {
|
|
1810
1783
|
url: "#ToastContainer",
|
|
1811
1784
|
props: {
|
|
1812
1785
|
...(options || Object.create(null)),
|
|
@@ -1839,7 +1812,7 @@
|
|
|
1839
1812
|
},
|
|
1840
1813
|
...extOptions
|
|
1841
1814
|
});
|
|
1842
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1815
|
+
const descriptor = openPopup(container || _sfc_main$m, options, extOptions);
|
|
1843
1816
|
const scope = snail_core.useAsyncScope(deferred.promise);
|
|
1844
1817
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1845
1818
|
return scope;
|
|
@@ -1970,19 +1943,16 @@
|
|
|
1970
1943
|
return Object.freeze(context);
|
|
1971
1944
|
}
|
|
1972
1945
|
|
|
1973
|
-
function getTwoArrowIconDraw() {
|
|
1974
|
-
return "M759.467 533.333L469.333 243.2l29.867-29.867 320 320-320 320-29.867-29.866 290.134-290.134z m-298.667 0L170.667 243.2l29.866-29.867 320 320-320 320-29.866-29.866L460.8 533.333z";
|
|
1975
|
-
}
|
|
1976
1946
|
function getNoDataBase64Image() {
|
|
1977
1947
|
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==";
|
|
1978
1948
|
}
|
|
1979
1949
|
|
|
1980
|
-
const _hoisted_1$
|
|
1950
|
+
const _hoisted_1$c = {
|
|
1981
1951
|
class: "snail-empty"
|
|
1982
1952
|
};
|
|
1983
1953
|
const _hoisted_2$6 = ["src"];
|
|
1984
1954
|
const _hoisted_3$6 = ["textContent"];
|
|
1985
|
-
var _sfc_main$
|
|
1955
|
+
var _sfc_main$k = vue.defineComponent({
|
|
1986
1956
|
...{
|
|
1987
1957
|
name: "Empty",
|
|
1988
1958
|
inheritAttrs: true
|
|
@@ -1995,7 +1965,7 @@
|
|
|
1995
1965
|
setup(__props) {
|
|
1996
1966
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1997
1967
|
return (_ctx, _cache) => {
|
|
1998
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1968
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createElementVNode("img", {
|
|
1999
1969
|
src: __props.imageUrl || vue.unref(defaultImageBase64)
|
|
2000
1970
|
}, null, 8, _hoisted_2$6), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
|
|
2001
1971
|
class: "message",
|
|
@@ -2005,13 +1975,13 @@
|
|
|
2005
1975
|
}
|
|
2006
1976
|
});
|
|
2007
1977
|
|
|
2008
|
-
const _hoisted_1$
|
|
1978
|
+
const _hoisted_1$b = ["title"];
|
|
2009
1979
|
const _hoisted_2$5 = ["textContent"];
|
|
2010
1980
|
const _hoisted_3$5 = {
|
|
2011
1981
|
key: 1,
|
|
2012
1982
|
class: "select-status"
|
|
2013
1983
|
};
|
|
2014
|
-
var _sfc_main$
|
|
1984
|
+
var _sfc_main$j = vue.defineComponent({
|
|
2015
1985
|
...{
|
|
2016
1986
|
name: "SelectNode",
|
|
2017
1987
|
inheritAttrs: true
|
|
@@ -2056,15 +2026,15 @@
|
|
|
2056
2026
|
}, [vue.createElementVNode("div", {
|
|
2057
2027
|
class: "item-text ellipsis",
|
|
2058
2028
|
textContent: vue.toDisplayString(__props.item.text)
|
|
2059
|
-
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2029
|
+
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
2060
2030
|
key: 0,
|
|
2061
|
-
type: "arrow"
|
|
2062
|
-
|
|
2063
|
-
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$A, {
|
|
2031
|
+
type: "arrow"
|
|
2032
|
+
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [vue.createVNode(_sfc_main$z, {
|
|
2064
2033
|
type: "success",
|
|
2065
|
-
|
|
2066
|
-
size: 12
|
|
2067
|
-
|
|
2034
|
+
button: "",
|
|
2035
|
+
size: 12,
|
|
2036
|
+
color: "white"
|
|
2037
|
+
})])) : vue.createCommentVNode("", true)], 42, _hoisted_1$b)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
2068
2038
|
key: 1
|
|
2069
2039
|
}, vue.renderList(vue.unref(showChildrenRef), child => {
|
|
2070
2040
|
return vue.openBlock(), vue.createBlock(_component_SelectNode, {
|
|
@@ -2081,7 +2051,7 @@
|
|
|
2081
2051
|
}
|
|
2082
2052
|
});
|
|
2083
2053
|
|
|
2084
|
-
var _sfc_main$
|
|
2054
|
+
var _sfc_main$i = vue.defineComponent({
|
|
2085
2055
|
...{
|
|
2086
2056
|
name: "Select2Popup",
|
|
2087
2057
|
inheritAttrs: true
|
|
@@ -2259,7 +2229,7 @@
|
|
|
2259
2229
|
onSearch,
|
|
2260
2230
|
key: "select-search"
|
|
2261
2231
|
}), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
|
|
2262
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2232
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
2263
2233
|
key: vue.unref(context).getKey(item),
|
|
2264
2234
|
multiple: __props.multiple,
|
|
2265
2235
|
item,
|
|
@@ -2268,7 +2238,7 @@
|
|
|
2268
2238
|
onEnter: onEnterSelectNode,
|
|
2269
2239
|
onClick: onClickSelectNode
|
|
2270
2240
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2271
|
-
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2241
|
+
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
2272
2242
|
key: 1,
|
|
2273
2243
|
message: "无结果"
|
|
2274
2244
|
})) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -2280,7 +2250,7 @@
|
|
|
2280
2250
|
}
|
|
2281
2251
|
});
|
|
2282
2252
|
|
|
2283
|
-
const _hoisted_1$
|
|
2253
|
+
const _hoisted_1$a = {
|
|
2284
2254
|
key: 0,
|
|
2285
2255
|
class: "select-result"
|
|
2286
2256
|
};
|
|
@@ -2291,9 +2261,9 @@
|
|
|
2291
2261
|
class: "placeholder"
|
|
2292
2262
|
};
|
|
2293
2263
|
onAppCreated((app, type) => {
|
|
2294
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2264
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$i);
|
|
2295
2265
|
});
|
|
2296
|
-
var _sfc_main$
|
|
2266
|
+
var _sfc_main$h = vue.defineComponent({
|
|
2297
2267
|
...{
|
|
2298
2268
|
name: "Select",
|
|
2299
2269
|
inheritAttrs: true
|
|
@@ -2425,7 +2395,7 @@
|
|
|
2425
2395
|
ref: "select"
|
|
2426
2396
|
}, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2427
2397
|
key: 0
|
|
2428
|
-
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2398
|
+
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
|
|
2429
2399
|
class: "select-text ellipsis",
|
|
2430
2400
|
title: selectedTextRef.value,
|
|
2431
2401
|
textContent: vue.toDisplayString(selectedTextRef.value)
|
|
@@ -2433,20 +2403,18 @@
|
|
|
2433
2403
|
key: 1,
|
|
2434
2404
|
class: "placeholder",
|
|
2435
2405
|
textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2436
|
-
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2406
|
+
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
2437
2407
|
key: 2,
|
|
2438
2408
|
type: "arrow",
|
|
2409
|
+
button: "",
|
|
2439
2410
|
size: 24,
|
|
2440
|
-
|
|
2441
|
-
style: {
|
|
2442
|
-
"transform": "rotate(90deg)"
|
|
2443
|
-
}
|
|
2411
|
+
rotate: 90
|
|
2444
2412
|
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
|
|
2445
2413
|
};
|
|
2446
2414
|
}
|
|
2447
2415
|
});
|
|
2448
2416
|
|
|
2449
|
-
var _sfc_main$
|
|
2417
|
+
var _sfc_main$g = vue.defineComponent({
|
|
2450
2418
|
...{
|
|
2451
2419
|
name: "Switch",
|
|
2452
2420
|
inheritAttrs: true
|
|
@@ -2495,8 +2463,8 @@
|
|
|
2495
2463
|
}
|
|
2496
2464
|
});
|
|
2497
2465
|
|
|
2498
|
-
const _hoisted_1$
|
|
2499
|
-
var _sfc_main$
|
|
2466
|
+
const _hoisted_1$9 = ["readonly", "placeholder", "rows"];
|
|
2467
|
+
var _sfc_main$f = vue.defineComponent({
|
|
2500
2468
|
...{
|
|
2501
2469
|
name: "Textarea"
|
|
2502
2470
|
},
|
|
@@ -2556,87 +2524,12 @@
|
|
|
2556
2524
|
onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
|
|
2557
2525
|
onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
|
|
2558
2526
|
onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
|
|
2559
|
-
}), null, 16, _hoisted_1$
|
|
2560
|
-
};
|
|
2561
|
-
}
|
|
2562
|
-
});
|
|
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"]);
|
|
2527
|
+
}), null, 16, _hoisted_1$9)), [[vue.vModelText, valueModel.value]]);
|
|
2600
2528
|
};
|
|
2601
2529
|
}
|
|
2602
2530
|
});
|
|
2603
2531
|
|
|
2604
|
-
|
|
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 = {
|
|
2532
|
+
const _hoisted_1$8 = {
|
|
2640
2533
|
class: "fold-header"
|
|
2641
2534
|
};
|
|
2642
2535
|
const _hoisted_2$3 = ["textContent"];
|
|
@@ -2649,7 +2542,7 @@
|
|
|
2649
2542
|
class: "fold-body",
|
|
2650
2543
|
ref: "foldBody"
|
|
2651
2544
|
};
|
|
2652
|
-
var _sfc_main$
|
|
2545
|
+
var _sfc_main$e = vue.defineComponent({
|
|
2653
2546
|
...{
|
|
2654
2547
|
name: "Fold",
|
|
2655
2548
|
inheritAttrs: true
|
|
@@ -2719,23 +2612,26 @@
|
|
|
2719
2612
|
return (_ctx, _cache) => {
|
|
2720
2613
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2721
2614
|
class: vue.normalizeClass(["snail-fold", statusModel.value])
|
|
2722
|
-
}, [vue.createElementVNode("div", _hoisted_1$
|
|
2615
|
+
}, [vue.createElementVNode("div", _hoisted_1$8, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
|
|
2723
2616
|
class: "title ellipsis",
|
|
2724
2617
|
textContent: vue.toDisplayString(__props.title)
|
|
2725
2618
|
}, null, 8, _hoisted_2$3), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2726
2619
|
key: 0,
|
|
2727
2620
|
class: "subtitle ellipsis",
|
|
2728
2621
|
textContent: vue.toDisplayString(__props.subtitle)
|
|
2729
|
-
}, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$
|
|
2622
|
+
}, null, 8, _hoisted_3$3)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [vue.createVNode(_sfc_main$z, {
|
|
2623
|
+
custom: false,
|
|
2730
2624
|
type: "arrow",
|
|
2625
|
+
button: "",
|
|
2731
2626
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2627
|
+
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
2732
2628
|
onClick: onStatusClick
|
|
2733
|
-
}, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5$2, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2629
|
+
}, null, 8, ["title", "rotate"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5$2, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2734
2630
|
};
|
|
2735
2631
|
}
|
|
2736
2632
|
});
|
|
2737
2633
|
|
|
2738
|
-
var _sfc_main$
|
|
2634
|
+
var _sfc_main$d = vue.defineComponent({
|
|
2739
2635
|
...{
|
|
2740
2636
|
name: "Scroll",
|
|
2741
2637
|
inheritAttrs: true
|
|
@@ -2865,7 +2761,7 @@
|
|
|
2865
2761
|
}
|
|
2866
2762
|
});
|
|
2867
2763
|
|
|
2868
|
-
var _sfc_main$
|
|
2764
|
+
var _sfc_main$c = vue.defineComponent({
|
|
2869
2765
|
__name: "layout",
|
|
2870
2766
|
props: {
|
|
2871
2767
|
mode: {},
|
|
@@ -2931,7 +2827,7 @@
|
|
|
2931
2827
|
key: item
|
|
2932
2828
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2933
2829
|
key: 0
|
|
2934
|
-
}, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2830
|
+
}, [areaMap.value[item].scrollable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, vue.mergeProps({
|
|
2935
2831
|
key: 0,
|
|
2936
2832
|
class: areaMap.value[item].class,
|
|
2937
2833
|
style: areaMap.value[item].style
|
|
@@ -2950,37 +2846,7 @@
|
|
|
2950
2846
|
}
|
|
2951
2847
|
});
|
|
2952
2848
|
|
|
2953
|
-
var _sfc_main$
|
|
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
|
-
|
|
2983
|
-
var _sfc_main$9 = vue.defineComponent({
|
|
2849
|
+
var _sfc_main$b = vue.defineComponent({
|
|
2984
2850
|
...{
|
|
2985
2851
|
name: "Sort",
|
|
2986
2852
|
inheritAttrs: true
|
|
@@ -3081,10 +2947,10 @@
|
|
|
3081
2947
|
}
|
|
3082
2948
|
});
|
|
3083
2949
|
|
|
3084
|
-
const _hoisted_1$
|
|
2950
|
+
const _hoisted_1$7 = {
|
|
3085
2951
|
class: "table-body"
|
|
3086
2952
|
};
|
|
3087
|
-
var _sfc_main$
|
|
2953
|
+
var _sfc_main$a = vue.defineComponent({
|
|
3088
2954
|
...{
|
|
3089
2955
|
name: "Table",
|
|
3090
2956
|
inheritAttrs: true
|
|
@@ -3109,7 +2975,7 @@
|
|
|
3109
2975
|
const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
|
|
3110
2976
|
const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
|
|
3111
2977
|
return (_ctx, _cache) => {
|
|
3112
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2978
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$d, {
|
|
3113
2979
|
class: vue.normalizeClass(["snail-table", {
|
|
3114
2980
|
"start-border": __props.border == true
|
|
3115
2981
|
}]),
|
|
@@ -3119,7 +2985,7 @@
|
|
|
3119
2985
|
default: vue.withCtx(() => [vue.createElementVNode("div", {
|
|
3120
2986
|
class: "table-header",
|
|
3121
2987
|
style: vue.normalizeStyle(hStyleRef.value)
|
|
3122
|
-
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$
|
|
2988
|
+
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$7, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
|
|
3123
2989
|
class: "table-footer",
|
|
3124
2990
|
style: vue.normalizeStyle(fStyleRef.value)
|
|
3125
2991
|
}, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -3129,7 +2995,7 @@
|
|
|
3129
2995
|
}
|
|
3130
2996
|
});
|
|
3131
2997
|
|
|
3132
|
-
var _sfc_main$
|
|
2998
|
+
var _sfc_main$9 = vue.defineComponent({
|
|
3133
2999
|
...{
|
|
3134
3000
|
name: "TableRow",
|
|
3135
3001
|
inheritAttrs: true
|
|
@@ -3152,7 +3018,7 @@
|
|
|
3152
3018
|
}
|
|
3153
3019
|
});
|
|
3154
3020
|
|
|
3155
|
-
var _sfc_main$
|
|
3021
|
+
var _sfc_main$8 = vue.defineComponent({
|
|
3156
3022
|
...{
|
|
3157
3023
|
name: "TableCol",
|
|
3158
3024
|
inheritAttrs: true
|
|
@@ -3198,7 +3064,7 @@
|
|
|
3198
3064
|
}
|
|
3199
3065
|
});
|
|
3200
3066
|
|
|
3201
|
-
const _hoisted_1$
|
|
3067
|
+
const _hoisted_1$6 = {
|
|
3202
3068
|
key: 0,
|
|
3203
3069
|
class: "node-fold"
|
|
3204
3070
|
};
|
|
@@ -3207,11 +3073,10 @@
|
|
|
3207
3073
|
class: "node-slot ellipsis"
|
|
3208
3074
|
};
|
|
3209
3075
|
const _hoisted_4$2 = {
|
|
3210
|
-
|
|
3211
|
-
class: "snail-tree-children hidden",
|
|
3076
|
+
class: "snail-tree-children",
|
|
3212
3077
|
ref: "children"
|
|
3213
3078
|
};
|
|
3214
|
-
var _sfc_main$
|
|
3079
|
+
var _sfc_main$7 = vue.defineComponent({
|
|
3215
3080
|
...{
|
|
3216
3081
|
name: "TreeNode",
|
|
3217
3082
|
inheritAttrs: true
|
|
@@ -3236,10 +3101,6 @@
|
|
|
3236
3101
|
const {
|
|
3237
3102
|
transition
|
|
3238
3103
|
} = snail_view.useAnimation();
|
|
3239
|
-
const {
|
|
3240
|
-
watcher
|
|
3241
|
-
} = useReactive();
|
|
3242
|
-
const treeNodeDom = vue.useTemplateRef("tree-node");
|
|
3243
3104
|
const isHoveredRef = vue.shallowRef(false);
|
|
3244
3105
|
const showRef = vue.computed(() => __props.context.isShow(__props.node, true));
|
|
3245
3106
|
const showChildrenRef = vue.computed(() => __props.context.isShowChildren(__props.node, true));
|
|
@@ -3296,28 +3157,22 @@
|
|
|
3296
3157
|
parents = __props.parent ? [__props.parent, ...parents] : parents;
|
|
3297
3158
|
emits("click", child, parents);
|
|
3298
3159
|
}
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
newValue && treeNodeDom.value.classList.add("hovered");
|
|
3302
|
-
});
|
|
3303
|
-
watcher(() => __props.context.isActived(__props.node), newValue => {
|
|
3304
|
-
if (treeNodeDom.value) {
|
|
3305
|
-
treeNodeDom.value.classList.remove("actived");
|
|
3306
|
-
newValue && treeNodeDom.value.classList.add("actived");
|
|
3307
|
-
}
|
|
3308
|
-
});
|
|
3309
|
-
vue.onMounted(() => {
|
|
3160
|
+
vue.onMounted(async () => {
|
|
3161
|
+
await vue.nextTick();
|
|
3310
3162
|
if (childrenDom.value) {
|
|
3311
3163
|
__props.options.expandLevel != void 0 && __props.options.expandLevel < nextLevel && toggleFold();
|
|
3312
|
-
childrenDom.value && childrenDom.value.classList.remove("hidden");
|
|
3313
3164
|
nodeEmitsDisabled = false;
|
|
3314
3165
|
}
|
|
3315
3166
|
});
|
|
3167
|
+
vue.onActivated(() => {});
|
|
3316
3168
|
return (_ctx, _cache) => {
|
|
3317
3169
|
const _component_TreeNode = vue.resolveComponent("TreeNode", true);
|
|
3318
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3319
|
-
|
|
3320
|
-
|
|
3170
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [vue.withDirectives(vue.createElementVNode("div", {
|
|
3171
|
+
class: vue.normalizeClass(["snail-tree-node", `level-${__props.level}`, {
|
|
3172
|
+
clickable: __props.node.clickable,
|
|
3173
|
+
hovered: isHoveredRef.value,
|
|
3174
|
+
actived: __props.context.isActived(__props.node)
|
|
3175
|
+
}]),
|
|
3321
3176
|
ref: "tree-node",
|
|
3322
3177
|
onMouseenter: _cache[0] || (_cache[0] = $event => isHoveredRef.value = true),
|
|
3323
3178
|
onMouseleave: _cache[1] || (_cache[1] = $event => isHoveredRef.value = false),
|
|
@@ -3327,21 +3182,24 @@
|
|
|
3327
3182
|
key: 0
|
|
3328
3183
|
}, vue.unref(slotOptions)))) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
3329
3184
|
key: 1
|
|
3330
|
-
}, [_cache[
|
|
3185
|
+
}, [_cache[5] || (_cache[5] = vue.createElementVNode("div", {
|
|
3331
3186
|
class: "indent"
|
|
3332
|
-
}, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3187
|
+
}, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
3333
3188
|
key: 0,
|
|
3334
3189
|
class: vue.normalizeClass(statusRef.value),
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
color: "#8a8099",
|
|
3338
|
-
draw: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z",
|
|
3190
|
+
custom: "",
|
|
3191
|
+
button: "",
|
|
3339
3192
|
onClick: toggleFold
|
|
3340
|
-
},
|
|
3193
|
+
}, {
|
|
3194
|
+
default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [vue.createElementVNode("path", {
|
|
3195
|
+
d: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z"
|
|
3196
|
+
}, null, -1)]))]),
|
|
3197
|
+
_: 1
|
|
3198
|
+
}, 8, ["class"])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
3341
3199
|
class: "node-text ellipsis",
|
|
3342
3200
|
title: __props.node.text,
|
|
3343
3201
|
textContent: vue.toDisplayString(__props.node.text)
|
|
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)
|
|
3202
|
+
}, 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.vShow, showRef.value]]), vue.withDirectives(vue.createElementVNode("div", _hoisted_4$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
|
|
3345
3203
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
3346
3204
|
key: __props.context.getKey(child),
|
|
3347
3205
|
node: child,
|
|
@@ -3356,15 +3214,15 @@
|
|
|
3356
3214
|
}, slotProps))]),
|
|
3357
3215
|
_: 3
|
|
3358
3216
|
}, 8, ["node", "parent", "options", "context"]);
|
|
3359
|
-
}), 128))], 512)
|
|
3217
|
+
}), 128))], 512), [[vue.vShow, showRef.value && showChildrenRef.value]])], 64);
|
|
3360
3218
|
};
|
|
3361
3219
|
}
|
|
3362
3220
|
});
|
|
3363
3221
|
|
|
3364
|
-
const _hoisted_1$
|
|
3222
|
+
const _hoisted_1$5 = {
|
|
3365
3223
|
class: "snail-tree"
|
|
3366
3224
|
};
|
|
3367
|
-
var _sfc_main$
|
|
3225
|
+
var _sfc_main$6 = vue.defineComponent({
|
|
3368
3226
|
...{
|
|
3369
3227
|
name: "Tree",
|
|
3370
3228
|
inheritAttrs: true
|
|
@@ -3398,15 +3256,15 @@
|
|
|
3398
3256
|
emits("click", node, parents);
|
|
3399
3257
|
}
|
|
3400
3258
|
return (_ctx, _cache) => {
|
|
3401
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3259
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$t, vue.mergeProps({
|
|
3402
3260
|
key: 0
|
|
3403
3261
|
}, __props.search, {
|
|
3404
3262
|
onSearch
|
|
3405
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3263
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$d, {
|
|
3406
3264
|
"scroll-y": true
|
|
3407
3265
|
}, {
|
|
3408
3266
|
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
|
|
3409
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3267
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$7, {
|
|
3410
3268
|
key: vue.unref(context).getKey(node),
|
|
3411
3269
|
node,
|
|
3412
3270
|
parent: void 0,
|
|
@@ -3427,7 +3285,7 @@
|
|
|
3427
3285
|
}
|
|
3428
3286
|
});
|
|
3429
3287
|
|
|
3430
|
-
var _sfc_main$
|
|
3288
|
+
var _sfc_main$5 = vue.defineComponent({
|
|
3431
3289
|
__name: "wrapper",
|
|
3432
3290
|
props: {
|
|
3433
3291
|
readonly: {
|
|
@@ -3456,7 +3314,7 @@
|
|
|
3456
3314
|
title: "对话框"
|
|
3457
3315
|
}, {
|
|
3458
3316
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3459
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3317
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$d, vue.mergeProps({
|
|
3460
3318
|
class: "wrapper-body"
|
|
3461
3319
|
}, __props.content || {
|
|
3462
3320
|
scrollX: false,
|
|
@@ -3478,7 +3336,7 @@
|
|
|
3478
3336
|
snail_core.mustObject(options, "options");
|
|
3479
3337
|
target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
|
|
3480
3338
|
target.classList.add("snail-app");
|
|
3481
|
-
const app = vue.createApp(_sfc_main$
|
|
3339
|
+
const app = vue.createApp(_sfc_main$p, options);
|
|
3482
3340
|
triggerAppCreated(app);
|
|
3483
3341
|
app.mount(target);
|
|
3484
3342
|
const scope = snail_core.useScope().onDestroy(() => app.unmount());
|
|
@@ -3486,54 +3344,6 @@
|
|
|
3486
3344
|
return scope;
|
|
3487
3345
|
}
|
|
3488
3346
|
|
|
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
3347
|
function initStepByFormat(format) {
|
|
3538
3348
|
switch (format) {
|
|
3539
3349
|
case "yyyy":
|
|
@@ -3560,8 +3370,8 @@
|
|
|
3560
3370
|
return items;
|
|
3561
3371
|
}
|
|
3562
3372
|
function buildMonthItems(yearItem, min, max) {
|
|
3563
|
-
const minDate =
|
|
3564
|
-
const maxDate =
|
|
3373
|
+
const minDate = snail_core.parseDate(snail_core.formatDateValue(min, "yyyy-MM"), "min");
|
|
3374
|
+
const maxDate = snail_core.parseDate(snail_core.formatDateValue(max, "yyyy-MM"), "max");
|
|
3565
3375
|
const items = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
3566
3376
|
return items.map((item, index) => {
|
|
3567
3377
|
const mi = {
|
|
@@ -3571,16 +3381,19 @@
|
|
|
3571
3381
|
disabled: yearItem.disabled
|
|
3572
3382
|
};
|
|
3573
3383
|
if (mi.disabled != true) {
|
|
3574
|
-
const date =
|
|
3384
|
+
const date = snail_core.getDateByValue(mi);
|
|
3575
3385
|
mi.disabled = minDate != void 0 && date < minDate || maxDate != void 0 && date > maxDate;
|
|
3576
3386
|
}
|
|
3577
3387
|
return Object.freeze(mi);
|
|
3578
3388
|
});
|
|
3579
3389
|
}
|
|
3580
3390
|
function buildDayItems(monthItem, min, max) {
|
|
3581
|
-
const minDate =
|
|
3582
|
-
const maxDate =
|
|
3583
|
-
const date =
|
|
3391
|
+
const minDate = snail_core.parseDate(snail_core.formatDateValue(min, "yyyy-MM-dd"), "min");
|
|
3392
|
+
const maxDate = snail_core.parseDate(snail_core.formatDateValue(max, "yyyy-MM-dd"), "max");
|
|
3393
|
+
const date = snail_core.getDateByValue({
|
|
3394
|
+
...monthItem,
|
|
3395
|
+
day: 1
|
|
3396
|
+
});
|
|
3584
3397
|
date.setDate(date.getDate() - (date.getDay() || 7) - 1);
|
|
3585
3398
|
const items = new Array(42);
|
|
3586
3399
|
for (var index = 0; index < items.length; index++) {
|
|
@@ -3592,7 +3405,7 @@
|
|
|
3592
3405
|
disabled: monthItem.disabled
|
|
3593
3406
|
};
|
|
3594
3407
|
if (item.disabled != true) {
|
|
3595
|
-
const date2 =
|
|
3408
|
+
const date2 = snail_core.getDateByValue(item);
|
|
3596
3409
|
item.disabled = minDate != void 0 && date2 < minDate || maxDate != void 0 && date2 > maxDate;
|
|
3597
3410
|
}
|
|
3598
3411
|
items[index] = Object.freeze(item);
|
|
@@ -3610,9 +3423,9 @@
|
|
|
3610
3423
|
return items;
|
|
3611
3424
|
}
|
|
3612
3425
|
function buildMinuteItems(hourItem, min, max) {
|
|
3426
|
+
const minNumber = min && min.minute != void 0 ? snail_core.getTimeNumber(min.hour, min.minute, 0) : void 0;
|
|
3427
|
+
const maxNumber = max && max.minute != void 0 ? snail_core.getTimeNumber(max.hour, max.minute, 0) : void 0;
|
|
3613
3428
|
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
3429
|
for (let index = 0; index < items.length; index++) {
|
|
3617
3430
|
const item = {
|
|
3618
3431
|
minute: index,
|
|
@@ -3620,7 +3433,7 @@
|
|
|
3620
3433
|
disabled: hourItem.disabled
|
|
3621
3434
|
};
|
|
3622
3435
|
if (item.disabled != true) {
|
|
3623
|
-
const number = getTimeNumber(item.hour, item.minute, 0);
|
|
3436
|
+
const number = snail_core.getTimeNumber(item.hour, item.minute, 0);
|
|
3624
3437
|
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3625
3438
|
}
|
|
3626
3439
|
items[index] = Object.freeze(item);
|
|
@@ -3629,8 +3442,8 @@
|
|
|
3629
3442
|
}
|
|
3630
3443
|
function buildSecondItems(minuteItem, min, max) {
|
|
3631
3444
|
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;
|
|
3445
|
+
const minNumber = min && min.minute != void 0 ? snail_core.getTimeNumber(min.hour, min.minute, min.second) : void 0;
|
|
3446
|
+
const maxNumber = max && max.minute != void 0 ? snail_core.getTimeNumber(max.hour, max.minute, max.second) : void 0;
|
|
3634
3447
|
for (let index = 0; index < items.length; index++) {
|
|
3635
3448
|
const item = {
|
|
3636
3449
|
second: index,
|
|
@@ -3639,44 +3452,15 @@
|
|
|
3639
3452
|
disabled: minuteItem.disabled
|
|
3640
3453
|
};
|
|
3641
3454
|
if (item.disabled != true) {
|
|
3642
|
-
const number = getTimeNumber(item.hour, item.minute, item.second);
|
|
3455
|
+
const number = snail_core.getTimeNumber(item.hour, item.minute, item.second);
|
|
3643
3456
|
item.disabled = minNumber != void 0 && number < minNumber || maxNumber != void 0 && number > maxNumber;
|
|
3644
3457
|
}
|
|
3645
3458
|
items[index] = Object.freeze(item);
|
|
3646
3459
|
}
|
|
3647
3460
|
return items;
|
|
3648
3461
|
}
|
|
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
3462
|
|
|
3679
|
-
const _hoisted_1$
|
|
3463
|
+
const _hoisted_1$4 = {
|
|
3680
3464
|
class: "tz-item",
|
|
3681
3465
|
ref: "hour-items"
|
|
3682
3466
|
};
|
|
@@ -3692,7 +3476,7 @@
|
|
|
3692
3476
|
ref: "second-items"
|
|
3693
3477
|
};
|
|
3694
3478
|
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
3695
|
-
var _sfc_main$
|
|
3479
|
+
var _sfc_main$4 = vue.defineComponent({
|
|
3696
3480
|
__name: "time-pc",
|
|
3697
3481
|
props: {
|
|
3698
3482
|
value: {},
|
|
@@ -3728,9 +3512,9 @@
|
|
|
3728
3512
|
const props = __props;
|
|
3729
3513
|
const emits = __emit;
|
|
3730
3514
|
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()));
|
|
3515
|
+
const min = snail_core.parseTimeValue(props.min, "min");
|
|
3516
|
+
const max = snail_core.parseTimeValue(props.max, "max");
|
|
3517
|
+
const timeRef = vue.ref(snail_core.parseTimeValue(props.value, "min") || snail_core.getTimeValue(new Date()));
|
|
3734
3518
|
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
3519
|
const hourItems = vue.shallowRef(buildHourItems(min, max));
|
|
3736
3520
|
const minuteItems = vue.shallowRef();
|
|
@@ -3795,17 +3579,17 @@
|
|
|
3795
3579
|
}
|
|
3796
3580
|
vue.onMounted(rebuildItems);
|
|
3797
3581
|
return (_ctx, _cache) => {
|
|
3798
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3582
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$c, {
|
|
3799
3583
|
class: vue.normalizeClass(["time-picker pc", {
|
|
3800
3584
|
"second-disabled": vue.unref(format) != "HH:mm:ss"
|
|
3801
3585
|
}]),
|
|
3802
3586
|
mode: "vertical"
|
|
3803
3587
|
}, vue.createSlots({
|
|
3804
|
-
main: vue.withCtx(() => [vue.createVNode(_sfc_main$
|
|
3805
|
-
|
|
3806
|
-
effect:
|
|
3588
|
+
main: vue.withCtx(() => [vue.createVNode(_sfc_main$r, {
|
|
3589
|
+
multiple: "",
|
|
3590
|
+
effect: vue.unref(MOTION).top
|
|
3807
3591
|
}, {
|
|
3808
|
-
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$
|
|
3592
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(hourItems.value, item => {
|
|
3809
3593
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3810
3594
|
class: vue.normalizeClass(["tzi-number", {
|
|
3811
3595
|
active: item.hour == timeRef.value.hour,
|
|
@@ -3837,23 +3621,23 @@
|
|
|
3837
3621
|
}, null, 10, _hoisted_6$1);
|
|
3838
3622
|
}), 128))], 512)) : vue.createCommentVNode("", true)]),
|
|
3839
3623
|
_: 1
|
|
3840
|
-
})]),
|
|
3624
|
+
}, 8, ["effect"])]),
|
|
3841
3625
|
_: 2
|
|
3842
3626
|
}, [__props.toolbarDisabled != true ? {
|
|
3843
3627
|
name: "bottom",
|
|
3844
|
-
fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3628
|
+
fn: vue.withCtx(() => [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
3845
3629
|
key: 0,
|
|
3846
3630
|
type: "link",
|
|
3847
3631
|
size: "small",
|
|
3848
3632
|
textContent: "清空",
|
|
3849
3633
|
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$
|
|
3634
|
+
})) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
3851
3635
|
key: 1,
|
|
3852
3636
|
type: "link",
|
|
3853
3637
|
size: "small",
|
|
3854
3638
|
textContent: "现在",
|
|
3855
3639
|
onClick: _cache[1] || (_cache[1] = $event => rebuildItems(vue.unref(snail_core.getTimeValue)(new Date())))
|
|
3856
|
-
})) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3640
|
+
})) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$A, {
|
|
3857
3641
|
type: "link",
|
|
3858
3642
|
size: "small",
|
|
3859
3643
|
textContent: "确定",
|
|
@@ -3868,7 +3652,7 @@
|
|
|
3868
3652
|
}
|
|
3869
3653
|
});
|
|
3870
3654
|
|
|
3871
|
-
const _hoisted_1$
|
|
3655
|
+
const _hoisted_1$3 = ["textContent"];
|
|
3872
3656
|
const _hoisted_2 = ["textContent"];
|
|
3873
3657
|
const _hoisted_3 = ["textContent"];
|
|
3874
3658
|
const _hoisted_4 = ["textContent", "onClick"];
|
|
@@ -3876,7 +3660,7 @@
|
|
|
3876
3660
|
const _hoisted_6 = ["textContent"];
|
|
3877
3661
|
const _hoisted_7 = ["textContent", "onClick"];
|
|
3878
3662
|
const _hoisted_8 = ["textContent"];
|
|
3879
|
-
var _sfc_main$
|
|
3663
|
+
var _sfc_main$3 = vue.defineComponent({
|
|
3880
3664
|
__name: "date-pc",
|
|
3881
3665
|
props: {
|
|
3882
3666
|
value: {},
|
|
@@ -3916,18 +3700,18 @@
|
|
|
3916
3700
|
const {
|
|
3917
3701
|
inPopup
|
|
3918
3702
|
} = props;
|
|
3919
|
-
const dateRef = vue.ref(snail_core.parseDateValue(props.value));
|
|
3703
|
+
const dateRef = vue.ref(snail_core.parseDateValue(props.value, "min"));
|
|
3920
3704
|
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));
|
|
3705
|
+
const min = Object.freeze(snail_core.parseDateValue(props.min, "min"));
|
|
3706
|
+
const max = Object.freeze(snail_core.parseDateValue(props.max, "max"));
|
|
3923
3707
|
const endStep = initStepByFormat(format);
|
|
3924
3708
|
const stepRef = vue.shallowRef(endStep);
|
|
3925
3709
|
const yearItems = vue.shallowRef();
|
|
3926
3710
|
const monthItems = vue.shallowRef();
|
|
3927
3711
|
const dayItemsRef = vue.shallowRef([]);
|
|
3928
3712
|
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));
|
|
3713
|
+
const minPickTime = Object.freeze(snail_core.parseTimeValue(props.minPickTime, "min"));
|
|
3714
|
+
const maxPickTime = Object.freeze(snail_core.parseTimeValue(props.maxPickTime, "max"));
|
|
3931
3715
|
const timeFormat = format == "yyyy-MM-dd HH:mm" ? "HH:mm" : format == "yyyy-MM-dd HH:mm:ss" ? "HH:mm:ss" : void 0;
|
|
3932
3716
|
const timeAreaDom = timeFormat ? vue.useTemplateRef("time-area") : void 0;
|
|
3933
3717
|
function validateDate() {
|
|
@@ -3950,7 +3734,7 @@
|
|
|
3950
3734
|
case "yyyy-MM-dd HH:mm":
|
|
3951
3735
|
case "yyyy-MM-dd HH:mm:ss":
|
|
3952
3736
|
{
|
|
3953
|
-
if (isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
|
|
3737
|
+
if (snail_core.isValidTime(timeFormat, dateRef.value, minPickTime, maxPickTime) == true) {
|
|
3954
3738
|
const date = snail_core.getDateByValue(dateRef.value);
|
|
3955
3739
|
const disabled = min && date < snail_core.getDateByValue(min) || max && date > snail_core.getDateByValue(max);
|
|
3956
3740
|
return disabled != true;
|
|
@@ -3987,7 +3771,7 @@
|
|
|
3987
3771
|
}
|
|
3988
3772
|
case "day":
|
|
3989
3773
|
{
|
|
3990
|
-
const date =
|
|
3774
|
+
const date = snail_core.getDateByValue(dateRef.value);
|
|
3991
3775
|
date.setMonth(date.getMonth() + basis);
|
|
3992
3776
|
dateRef.value.year = date.getFullYear();
|
|
3993
3777
|
dateRef.value.month = date.getMonth() + 1;
|
|
@@ -4052,30 +3836,33 @@
|
|
|
4052
3836
|
}
|
|
4053
3837
|
}
|
|
4054
3838
|
async function onSelectTime() {
|
|
4055
|
-
if (props.picker
|
|
4056
|
-
|
|
3839
|
+
if (props.picker != void 0 && timeAreaDom.value != void 0 && props.pinned.value != true) {
|
|
3840
|
+
props.pinned.value = true;
|
|
3841
|
+
const task = props.picker.showTime(timeAreaDom.value, {
|
|
3842
|
+
format: timeFormat,
|
|
3843
|
+
value: snail_core.formatTimeValue(dateRef.value, timeFormat),
|
|
3844
|
+
min: props.minPickTime,
|
|
3845
|
+
max: props.minPickTime,
|
|
3846
|
+
nowDisabled: props.nowDisabled,
|
|
3847
|
+
clearDisabled: props.clearDisabled,
|
|
3848
|
+
toolbarDisabled: props.toolbarDisabled
|
|
3849
|
+
}, {
|
|
3850
|
+
followX: "start",
|
|
3851
|
+
followY: "before",
|
|
3852
|
+
spaceX: -2,
|
|
3853
|
+
spaceY: 4
|
|
3854
|
+
});
|
|
3855
|
+
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
3856
|
+
if (text != void 0) {
|
|
3857
|
+
const time = snail_core.parseTimeValue(text, "min") || Object.create(null);
|
|
3858
|
+
dateRef.value.hour = time.hour;
|
|
3859
|
+
dateRef.value.minute = time.minute;
|
|
3860
|
+
dateRef.value.second = time.second;
|
|
3861
|
+
}
|
|
3862
|
+
}, reason => {
|
|
3863
|
+
console.error(reason);
|
|
3864
|
+
});
|
|
4057
3865
|
}
|
|
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
3866
|
}
|
|
4080
3867
|
function onNow() {
|
|
4081
3868
|
stepRef.value = initStepByFormat(format);
|
|
@@ -4092,7 +3879,7 @@
|
|
|
4092
3879
|
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
4093
3880
|
buildPickerItems(stepRef.value, 0);
|
|
4094
3881
|
return (_ctx, _cache) => {
|
|
4095
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3882
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$c, {
|
|
4096
3883
|
class: vue.normalizeClass(["date-picker pc", {
|
|
4097
3884
|
"time-now": __props.pinned && __props.pinned.value == true
|
|
4098
3885
|
}]),
|
|
@@ -4104,8 +3891,9 @@
|
|
|
4104
3891
|
height: "30px"
|
|
4105
3892
|
}
|
|
4106
3893
|
}, vue.createSlots({
|
|
4107
|
-
top: vue.withCtx(() => [vue.createVNode(_sfc_main$
|
|
3894
|
+
top: vue.withCtx(() => [vue.createVNode(_sfc_main$z, {
|
|
4108
3895
|
type: "arrow",
|
|
3896
|
+
button: "",
|
|
4109
3897
|
rotate: 180,
|
|
4110
3898
|
size: 26,
|
|
4111
3899
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
@@ -4114,7 +3902,7 @@
|
|
|
4114
3902
|
}, [stepRef.value == "year" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4115
3903
|
key: 0,
|
|
4116
3904
|
textContent: vue.toDisplayString(`${yearItems.value[0].year}年 - ${vue.unref(snail_core.getFromArray)(yearItems.value, -1).year}年`)
|
|
4117
|
-
}, null, 8, _hoisted_1$
|
|
3905
|
+
}, null, 8, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4118
3906
|
key: 1
|
|
4119
3907
|
}, [vue.createElementVNode("div", {
|
|
4120
3908
|
textContent: vue.toDisplayString(`${dateRef.value.year}年`),
|
|
@@ -4123,8 +3911,9 @@
|
|
|
4123
3911
|
key: 0,
|
|
4124
3912
|
textContent: vue.toDisplayString(`${dateRef.value.month}月`),
|
|
4125
3913
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4126
|
-
}, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$
|
|
3914
|
+
}, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)], 64))], 2), vue.createVNode(_sfc_main$z, {
|
|
4127
3915
|
type: "arrow",
|
|
3916
|
+
button: "",
|
|
4128
3917
|
size: 26,
|
|
4129
3918
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4130
3919
|
})]),
|
|
@@ -4188,19 +3977,19 @@
|
|
|
4188
3977
|
onClick: onSelectTime
|
|
4189
3978
|
}, null, 10, _hoisted_8)) : vue.createCommentVNode("", true), __props.toolbarDisabled != true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4190
3979
|
key: 1
|
|
4191
|
-
}, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3980
|
+
}, [__props.clearDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
4192
3981
|
key: 0,
|
|
4193
3982
|
type: "link",
|
|
4194
3983
|
size: "small",
|
|
4195
3984
|
textContent: "清空",
|
|
4196
3985
|
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$
|
|
3986
|
+
})) : vue.createCommentVNode("", true), __props.nowDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
4198
3987
|
key: 1,
|
|
4199
3988
|
type: "link",
|
|
4200
3989
|
size: "small",
|
|
4201
3990
|
textContent: "现在",
|
|
4202
3991
|
onClick: onNow
|
|
4203
|
-
})) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
3992
|
+
})) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$A, {
|
|
4204
3993
|
type: "link",
|
|
4205
3994
|
size: "small",
|
|
4206
3995
|
textContent: "确定",
|
|
@@ -4217,40 +4006,32 @@
|
|
|
4217
4006
|
|
|
4218
4007
|
function usePicker() {
|
|
4219
4008
|
const popup = usePopup();
|
|
4220
|
-
function showDate(target, options) {
|
|
4009
|
+
function showDate(target, options, popupOptions) {
|
|
4221
4010
|
options = {
|
|
4222
4011
|
...options
|
|
4223
4012
|
};
|
|
4224
|
-
return showPicker(target, _sfc_main$
|
|
4013
|
+
return showPicker(target, _sfc_main$3, options, popupOptions);
|
|
4225
4014
|
}
|
|
4226
|
-
function showTime(target, options) {
|
|
4015
|
+
function showTime(target, options, popupOptions) {
|
|
4227
4016
|
options = {
|
|
4228
4017
|
...options
|
|
4229
4018
|
};
|
|
4230
|
-
return showPicker(target, _sfc_main$
|
|
4019
|
+
return showPicker(target, _sfc_main$4, options, popupOptions);
|
|
4231
4020
|
}
|
|
4232
|
-
function showPicker(target, component, options) {
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
popupOptions.
|
|
4238
|
-
popupOptions.
|
|
4239
|
-
popupOptions.
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
delete options.spaceX;
|
|
4243
|
-
delete options.spaceY;
|
|
4244
|
-
delete options.spaceClient;
|
|
4021
|
+
function showPicker(target, component, options, popupOptions) {
|
|
4022
|
+
{
|
|
4023
|
+
popupOptions = {
|
|
4024
|
+
...popupOptions
|
|
4025
|
+
};
|
|
4026
|
+
popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
|
|
4027
|
+
popupOptions.spaceX = snail_core.correctNumber(popupOptions.spaceX, 2);
|
|
4028
|
+
popupOptions.spaceY = snail_core.correctNumber(popupOptions.spaceY, 2);
|
|
4029
|
+
popupOptions.spaceClient = snail_core.correctNumber(popupOptions.spaceClient, 10);
|
|
4030
|
+
popupOptions.closeOnMask = popupOptions.closeOnMask == void 0 ? true : popupOptions.closeOnMask;
|
|
4245
4031
|
}
|
|
4246
4032
|
return popup.follow(target, {
|
|
4033
|
+
...popupOptions,
|
|
4247
4034
|
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),
|
|
4253
|
-
closeOnMask: true,
|
|
4254
4035
|
props: {
|
|
4255
4036
|
...options,
|
|
4256
4037
|
picker: manager,
|
|
@@ -4266,6 +4047,180 @@
|
|
|
4266
4047
|
return manager;
|
|
4267
4048
|
}
|
|
4268
4049
|
|
|
4050
|
+
const _hoisted_1$2 = ["title"];
|
|
4051
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
4052
|
+
__name: "date-picker",
|
|
4053
|
+
props: {
|
|
4054
|
+
readonly: {
|
|
4055
|
+
type: Boolean
|
|
4056
|
+
},
|
|
4057
|
+
value: {},
|
|
4058
|
+
format: {},
|
|
4059
|
+
min: {},
|
|
4060
|
+
max: {},
|
|
4061
|
+
minPickTime: {},
|
|
4062
|
+
maxPickTime: {},
|
|
4063
|
+
toolbarDisabled: {
|
|
4064
|
+
type: Boolean
|
|
4065
|
+
},
|
|
4066
|
+
nowDisabled: {
|
|
4067
|
+
type: Boolean
|
|
4068
|
+
},
|
|
4069
|
+
clearDisabled: {
|
|
4070
|
+
type: Boolean
|
|
4071
|
+
}
|
|
4072
|
+
},
|
|
4073
|
+
emits: ["change"],
|
|
4074
|
+
setup(__props, _ref) {
|
|
4075
|
+
let {
|
|
4076
|
+
emit: __emit
|
|
4077
|
+
} = _ref;
|
|
4078
|
+
const props = __props;
|
|
4079
|
+
const emits = __emit;
|
|
4080
|
+
const pickerDom = vue.useTemplateRef("datepicker");
|
|
4081
|
+
const {
|
|
4082
|
+
showDate
|
|
4083
|
+
} = usePicker();
|
|
4084
|
+
const {
|
|
4085
|
+
watcher
|
|
4086
|
+
} = useReactive();
|
|
4087
|
+
const valueRef = vue.shallowRef();
|
|
4088
|
+
let pickerScope;
|
|
4089
|
+
function resetDateValue(value) {
|
|
4090
|
+
const dateValue = snail_core.parseDateValue(value, "min");
|
|
4091
|
+
valueRef.value = snail_core.formatDateValue(dateValue, props.format);
|
|
4092
|
+
}
|
|
4093
|
+
async function showPicker(evt) {
|
|
4094
|
+
if (props.readonly != true && pickerScope == void 0) {
|
|
4095
|
+
pickerScope = showDate(pickerDom.value, {
|
|
4096
|
+
...props,
|
|
4097
|
+
value: valueRef.value
|
|
4098
|
+
}, {
|
|
4099
|
+
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4100
|
+
closeOnTarget: true
|
|
4101
|
+
});
|
|
4102
|
+
const dateText = await pickerScope;
|
|
4103
|
+
pickerScope = void 0;
|
|
4104
|
+
if (dateText !== void 0 && dateText != valueRef.value) {
|
|
4105
|
+
const oldText = valueRef.value;
|
|
4106
|
+
valueRef.value = dateText;
|
|
4107
|
+
emits("change", dateText, oldText);
|
|
4108
|
+
}
|
|
4109
|
+
}
|
|
4110
|
+
}
|
|
4111
|
+
snail_core.isStringNotEmpty(props.value) && resetDateValue(props.value);
|
|
4112
|
+
watcher(() => props.value, newValue => newValue !== valueRef.value && resetDateValue(newValue));
|
|
4113
|
+
return (_ctx, _cache) => {
|
|
4114
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4115
|
+
class: vue.normalizeClass(["snail-datepicker", {
|
|
4116
|
+
readonly: __props.readonly
|
|
4117
|
+
}]),
|
|
4118
|
+
ref: "datepicker",
|
|
4119
|
+
title: valueRef.value,
|
|
4120
|
+
onClick: showPicker
|
|
4121
|
+
}, [vue.withDirectives(vue.createElementVNode("input", {
|
|
4122
|
+
class: "wh-fill",
|
|
4123
|
+
type: "text",
|
|
4124
|
+
readonly: "",
|
|
4125
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4126
|
+
}, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
4127
|
+
key: 0,
|
|
4128
|
+
type: "datepicker",
|
|
4129
|
+
button: "",
|
|
4130
|
+
size: 16,
|
|
4131
|
+
color: "#aeb6c2",
|
|
4132
|
+
"hover-color": "#279bf1"
|
|
4133
|
+
})) : vue.createCommentVNode("", true)], 10, _hoisted_1$2);
|
|
4134
|
+
};
|
|
4135
|
+
}
|
|
4136
|
+
});
|
|
4137
|
+
|
|
4138
|
+
const _hoisted_1$1 = ["title"];
|
|
4139
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
4140
|
+
__name: "time-picker",
|
|
4141
|
+
props: {
|
|
4142
|
+
readonly: {
|
|
4143
|
+
type: Boolean
|
|
4144
|
+
},
|
|
4145
|
+
value: {},
|
|
4146
|
+
format: {},
|
|
4147
|
+
min: {},
|
|
4148
|
+
max: {},
|
|
4149
|
+
toolbarDisabled: {
|
|
4150
|
+
type: Boolean
|
|
4151
|
+
},
|
|
4152
|
+
nowDisabled: {
|
|
4153
|
+
type: Boolean
|
|
4154
|
+
},
|
|
4155
|
+
clearDisabled: {
|
|
4156
|
+
type: Boolean
|
|
4157
|
+
}
|
|
4158
|
+
},
|
|
4159
|
+
emits: ["change"],
|
|
4160
|
+
setup(__props, _ref) {
|
|
4161
|
+
let {
|
|
4162
|
+
emit: __emit
|
|
4163
|
+
} = _ref;
|
|
4164
|
+
const props = __props;
|
|
4165
|
+
const emits = __emit;
|
|
4166
|
+
const pickerDom = vue.useTemplateRef("timepicker");
|
|
4167
|
+
const {
|
|
4168
|
+
showTime
|
|
4169
|
+
} = usePicker();
|
|
4170
|
+
const {
|
|
4171
|
+
watcher
|
|
4172
|
+
} = useReactive();
|
|
4173
|
+
const valueRef = vue.shallowRef();
|
|
4174
|
+
let pickerScope;
|
|
4175
|
+
function resetTimeValue(value) {
|
|
4176
|
+
const timeValue = snail_core.parseTimeValue(value, "min");
|
|
4177
|
+
valueRef.value = snail_core.formatTimeValue(timeValue, props.format);
|
|
4178
|
+
}
|
|
4179
|
+
async function showPicker(evt) {
|
|
4180
|
+
if (props.readonly != true && pickerScope == void 0) {
|
|
4181
|
+
pickerScope = showTime(pickerDom.value, {
|
|
4182
|
+
...props,
|
|
4183
|
+
value: valueRef.value
|
|
4184
|
+
}, {
|
|
4185
|
+
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4186
|
+
closeOnTarget: true
|
|
4187
|
+
});
|
|
4188
|
+
const timeText = await pickerScope;
|
|
4189
|
+
pickerScope = void 0;
|
|
4190
|
+
if (timeText !== void 0 && timeText != valueRef.value) {
|
|
4191
|
+
const oldText = valueRef.value;
|
|
4192
|
+
valueRef.value = timeText;
|
|
4193
|
+
emits("change", timeText, oldText);
|
|
4194
|
+
}
|
|
4195
|
+
}
|
|
4196
|
+
}
|
|
4197
|
+
snail_core.isStringNotEmpty(props.value) && resetTimeValue(props.value);
|
|
4198
|
+
watcher(() => props.value, newValue => newValue !== valueRef.value && resetTimeValue(newValue));
|
|
4199
|
+
return (_ctx, _cache) => {
|
|
4200
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4201
|
+
class: vue.normalizeClass(["snail-timepicker", {
|
|
4202
|
+
readonly: __props.readonly
|
|
4203
|
+
}]),
|
|
4204
|
+
ref: "timepicker",
|
|
4205
|
+
title: valueRef.value,
|
|
4206
|
+
onClick: showPicker
|
|
4207
|
+
}, [vue.withDirectives(vue.createElementVNode("input", {
|
|
4208
|
+
class: "wh-fill",
|
|
4209
|
+
type: "text",
|
|
4210
|
+
readonly: "",
|
|
4211
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4212
|
+
}, null, 512), [[vue.vModelText, valueRef.value]]), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
4213
|
+
key: 0,
|
|
4214
|
+
type: "timepicker",
|
|
4215
|
+
button: "",
|
|
4216
|
+
size: 20,
|
|
4217
|
+
color: "#aeb6c2",
|
|
4218
|
+
"hover-color": "#279bf1"
|
|
4219
|
+
})) : vue.createCommentVNode("", true)], 10, _hoisted_1$1);
|
|
4220
|
+
};
|
|
4221
|
+
}
|
|
4222
|
+
});
|
|
4223
|
+
|
|
4269
4224
|
const _hoisted_1 = ["textContent"];
|
|
4270
4225
|
var _sfc_main = vue.defineComponent({
|
|
4271
4226
|
...{
|
|
@@ -4295,7 +4250,6 @@
|
|
|
4295
4250
|
endX: 0,
|
|
4296
4251
|
distance: 0
|
|
4297
4252
|
});
|
|
4298
|
-
const towArrowIcon = getTwoArrowIconDraw();
|
|
4299
4253
|
function getMaxDistance() {
|
|
4300
4254
|
return dragHandleDom.value.parentElement.getBoundingClientRect().width - dragHandleDom.value.getBoundingClientRect().width;
|
|
4301
4255
|
}
|
|
@@ -4351,51 +4305,57 @@
|
|
|
4351
4305
|
onTouchstart: onStartDrag,
|
|
4352
4306
|
onTouchmove: onDragMove,
|
|
4353
4307
|
onTouchend: onDragEnd
|
|
4354
|
-
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4308
|
+
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
4355
4309
|
key: 0,
|
|
4356
4310
|
type: "success",
|
|
4357
4311
|
size: 20,
|
|
4358
4312
|
color: "white"
|
|
4359
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4313
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
4360
4314
|
key: 1,
|
|
4361
|
-
|
|
4315
|
+
custom: "",
|
|
4362
4316
|
size: 20,
|
|
4363
|
-
color: "#
|
|
4364
|
-
|
|
4365
|
-
|
|
4317
|
+
color: "#948d8d",
|
|
4318
|
+
style: {
|
|
4319
|
+
"cursor": "move"
|
|
4320
|
+
}
|
|
4321
|
+
}, {
|
|
4322
|
+
default: vue.withCtx(() => [...(_cache[0] || (_cache[0] = [vue.createElementVNode("path", {
|
|
4323
|
+
d: "M759.467 533.333L469.333 243.2l29.867-29.867 320 320-320 320-29.867-29.866 290.134-290.134z m-298.667 0L170.667 243.2l29.866-29.867 320 320-320 320-29.866-29.866L460.8 533.333z"
|
|
4324
|
+
}, null, -1)]))]),
|
|
4325
|
+
_: 1
|
|
4326
|
+
}))], 36)], 2);
|
|
4366
4327
|
};
|
|
4367
4328
|
}
|
|
4368
4329
|
});
|
|
4369
4330
|
|
|
4370
4331
|
const components = {
|
|
4371
|
-
Button: _sfc_main$
|
|
4372
|
-
Choose: _sfc_main$
|
|
4373
|
-
DatePicker: _sfc_main$y,
|
|
4332
|
+
Button: _sfc_main$A,
|
|
4333
|
+
Choose: _sfc_main$y,
|
|
4374
4334
|
Footer: _sfc_main$x,
|
|
4375
4335
|
Header: _sfc_main$w,
|
|
4376
|
-
Icon: _sfc_main$
|
|
4336
|
+
Icon: _sfc_main$z,
|
|
4377
4337
|
Input: _sfc_main$v,
|
|
4378
4338
|
Number: _sfc_main$u,
|
|
4379
4339
|
Search: _sfc_main$t,
|
|
4380
|
-
Select: _sfc_main$
|
|
4381
|
-
Switch: _sfc_main$
|
|
4382
|
-
Textarea: _sfc_main$
|
|
4383
|
-
Dynamic: _sfc_main$
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4340
|
+
Select: _sfc_main$h,
|
|
4341
|
+
Switch: _sfc_main$g,
|
|
4342
|
+
Textarea: _sfc_main$f,
|
|
4343
|
+
Dynamic: _sfc_main$p,
|
|
4344
|
+
Fold: _sfc_main$e,
|
|
4345
|
+
Motion: _sfc_main$r,
|
|
4346
|
+
Layout: _sfc_main$c,
|
|
4347
|
+
Scroll: _sfc_main$d,
|
|
4348
|
+
Sort: _sfc_main$b,
|
|
4349
|
+
Table: _sfc_main$a,
|
|
4350
|
+
TableRow: _sfc_main$9,
|
|
4351
|
+
TableCol: _sfc_main$8,
|
|
4352
|
+
Tree: _sfc_main$6,
|
|
4353
|
+
Wrapper: _sfc_main$5,
|
|
4354
|
+
DatePicker: _sfc_main$2,
|
|
4355
|
+
TimePicker: _sfc_main$1,
|
|
4396
4356
|
DragVerify: _sfc_main,
|
|
4397
|
-
Empty: _sfc_main$
|
|
4398
|
-
Loading: _sfc_main$
|
|
4357
|
+
Empty: _sfc_main$k,
|
|
4358
|
+
Loading: _sfc_main$q
|
|
4399
4359
|
};
|
|
4400
4360
|
|
|
4401
4361
|
snail_core.onMountScope(scope => {
|
|
@@ -4404,7 +4364,7 @@
|
|
|
4404
4364
|
|
|
4405
4365
|
exports.MOTION = MOTION;
|
|
4406
4366
|
exports.components = components;
|
|
4407
|
-
exports.
|
|
4367
|
+
exports.getBuiltinIcon = getBuiltinIcon;
|
|
4408
4368
|
exports.mount = mount;
|
|
4409
4369
|
exports.onAppCreated = onAppCreated;
|
|
4410
4370
|
exports.triggerAppCreated = triggerAppCreated;
|