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.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef,
|
|
3
|
-
import { throwError,
|
|
4
|
-
import {
|
|
2
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, computed, mergeProps, unref, createElementVNode, toDisplayString, Fragment, renderList, mergeModels, useModel, normalizeStyle, createCommentVNode, createBlock, nextTick, useTemplateRef, createVNode, watch, withDirectives, isRef, vModelText, withCtx, createApp, resolveDynamicComponent, TransitionGroup, Transition, normalizeProps, guardReactiveProps, ref, onErrorCaptured, createSlots, onMounted, withModifiers, getCurrentInstance, resolveComponent, onBeforeUnmount, onActivated, vShow, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
|
+
import { throwError, isObject, correctNumber, correctString, useKey, isArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isNumberNotNaN, isStringNotEmpty, hasAny, mustFunction, useScope, removeFromArray, mustObject, isArrayNotEmpty, hasOwnProperty, isString, script, delay, useTimer, defer, useAsyncScope, useHook, newId, throwIfTrue, isFunction, getTimeNumber, getDateValue, parseDate, formatDateValue, getDateByValue, parseTimeValue, getTimeValue, padStart, formatTimeValue, parseDateValue, correctDateFormat, isValidTime, getFromArray, onMountScope } from 'snail.core';
|
|
4
|
+
import { css, link, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1$
|
|
7
|
-
var _sfc_main$
|
|
6
|
+
const _hoisted_1$l = ["title"];
|
|
7
|
+
var _sfc_main$A = defineComponent({
|
|
8
8
|
...{
|
|
9
9
|
name: "Button",
|
|
10
10
|
inheritAttrs: true
|
|
@@ -20,16 +20,12 @@ var _sfc_main$B = defineComponent({
|
|
|
20
20
|
return openBlock(), createElementBlock("div", {
|
|
21
21
|
class: normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
22
22
|
title: __props.title
|
|
23
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$
|
|
23
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$l);
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
addLink("/styles/snail.vue.vue.css");
|
|
31
|
-
|
|
32
|
-
function getSvgDraw(iconType, draw) {
|
|
28
|
+
function getBuiltinIcon(iconType) {
|
|
33
29
|
switch (iconType) {
|
|
34
30
|
case "success":
|
|
35
31
|
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"];
|
|
@@ -51,14 +47,14 @@ function getSvgDraw(iconType, draw) {
|
|
|
51
47
|
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"];
|
|
52
48
|
case "datepicker":
|
|
53
49
|
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"];
|
|
50
|
+
case "timepicker":
|
|
51
|
+
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"];
|
|
54
52
|
case "plus":
|
|
55
53
|
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"];
|
|
56
54
|
case "subtract":
|
|
57
55
|
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"];
|
|
58
56
|
case "grip":
|
|
59
57
|
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"];
|
|
60
|
-
case "custom":
|
|
61
|
-
return isArrayNotEmpty(draw) ? draw : isStringNotEmpty(draw) ? [draw] : throwError("options.draw must be a non-empty string or string array");
|
|
62
58
|
default:
|
|
63
59
|
{
|
|
64
60
|
throwError(`not support icon type: ${iconType}.`);
|
|
@@ -67,57 +63,82 @@ function getSvgDraw(iconType, draw) {
|
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
|
|
70
|
-
const _hoisted_1$
|
|
66
|
+
const _hoisted_1$k = ["viewBox"];
|
|
71
67
|
const _hoisted_2$c = ["textContent"];
|
|
72
|
-
const _hoisted_3$a = ["
|
|
73
|
-
var _sfc_main$
|
|
74
|
-
...{
|
|
75
|
-
name: "Icon",
|
|
76
|
-
inheritAttrs: true
|
|
77
|
-
},
|
|
68
|
+
const _hoisted_3$a = ["d"];
|
|
69
|
+
var _sfc_main$z = defineComponent({
|
|
78
70
|
__name: "icon",
|
|
79
71
|
props: {
|
|
80
72
|
title: {},
|
|
73
|
+
custom: {
|
|
74
|
+
type: Boolean
|
|
75
|
+
},
|
|
81
76
|
type: {},
|
|
82
|
-
|
|
77
|
+
button: {
|
|
78
|
+
type: Boolean
|
|
79
|
+
},
|
|
80
|
+
size: {},
|
|
83
81
|
color: {},
|
|
84
82
|
hoverColor: {},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
strokeWidth: {},
|
|
88
|
-
draw: {},
|
|
89
|
-
rotate: {}
|
|
83
|
+
rotate: {},
|
|
84
|
+
viewBox: {}
|
|
90
85
|
},
|
|
91
86
|
setup(__props) {
|
|
87
|
+
const props = __props;
|
|
92
88
|
const isMouseEnterRef = shallowRef(false);
|
|
89
|
+
const sizeRef = computed(() => {
|
|
90
|
+
if (isObject(props.size) == true) {
|
|
91
|
+
return {
|
|
92
|
+
width: correctNumber(props.size.width, 24),
|
|
93
|
+
height: correctNumber(props.size.height, 24)
|
|
94
|
+
};
|
|
95
|
+
} else {
|
|
96
|
+
const number = correctNumber(props.size, 24);
|
|
97
|
+
return {
|
|
98
|
+
width: number,
|
|
99
|
+
height: number
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const styleRef = computed(() => {
|
|
104
|
+
const style = Object.create(null);
|
|
105
|
+
let fill = isMouseEnterRef.value ? correctString(props.hoverColor, props.color, true) : void 0;
|
|
106
|
+
fill == void 0 && (fill = correctString(props.color, void 0, true));
|
|
107
|
+
fill && (style.fill = fill);
|
|
108
|
+
const rotate = correctNumber(props.rotate, 0);
|
|
109
|
+
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
110
|
+
return style;
|
|
111
|
+
});
|
|
93
112
|
return (_ctx, _cache) => {
|
|
94
|
-
return openBlock(), createElementBlock("svg", {
|
|
95
|
-
class:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
113
|
+
return openBlock(), createElementBlock("svg", mergeProps({
|
|
114
|
+
class: ["snail-icon", __props.type, {
|
|
115
|
+
button: __props.button
|
|
116
|
+
}],
|
|
117
|
+
viewBox: unref(correctString)(__props.viewBox, "0 0 1024 1024", false)
|
|
118
|
+
}, sizeRef.value, {
|
|
119
|
+
style: styleRef.value,
|
|
100
120
|
onMouseenter: _cache[0] || (_cache[0] = $event => isMouseEnterRef.value = true),
|
|
101
121
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
102
|
-
}, [createElementVNode("title", {
|
|
122
|
+
}), [createElementVNode("title", {
|
|
103
123
|
textContent: toDisplayString(__props.title || "")
|
|
104
|
-
}, null, 8, _hoisted_2$c),
|
|
124
|
+
}, null, 8, _hoisted_2$c), __props.custom == true ? renderSlot(_ctx.$slots, "default", {
|
|
125
|
+
key: 0
|
|
126
|
+
}) : (openBlock(true), createElementBlock(Fragment, {
|
|
127
|
+
key: 1
|
|
128
|
+
}, renderList(unref(getBuiltinIcon)(__props.type), d => {
|
|
105
129
|
return openBlock(), createElementBlock("path", {
|
|
106
|
-
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
107
|
-
stroke: __props.stroke,
|
|
108
|
-
"stroke-width": __props.strokeWidth,
|
|
109
130
|
d
|
|
110
131
|
}, null, 8, _hoisted_3$a);
|
|
111
|
-
}), 256))],
|
|
132
|
+
}), 256))], 16, _hoisted_1$k);
|
|
112
133
|
};
|
|
113
134
|
}
|
|
114
135
|
});
|
|
115
136
|
|
|
116
|
-
const _hoisted_1$
|
|
137
|
+
const _hoisted_1$j = ["title", "onClick"];
|
|
117
138
|
const _hoisted_2$b = ["type", "checked"];
|
|
118
139
|
const _hoisted_3$9 = ["textContent"];
|
|
119
140
|
const _hoisted_4$7 = ["textContent"];
|
|
120
|
-
var _sfc_main$
|
|
141
|
+
var _sfc_main$y = defineComponent({
|
|
121
142
|
...{
|
|
122
143
|
name: "Choose",
|
|
123
144
|
inheritAttrs: true
|
|
@@ -196,7 +217,7 @@ var _sfc_main$z = defineComponent({
|
|
|
196
217
|
}, null, 8, _hoisted_2$b)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
197
218
|
key: 1,
|
|
198
219
|
class: normalizeClass(["status", [node.selected ? "selected" : ""]])
|
|
199
|
-
}, [node.selected ? (openBlock(), createBlock(_sfc_main$
|
|
220
|
+
}, [node.selected ? (openBlock(), createBlock(_sfc_main$z, {
|
|
200
221
|
key: 0,
|
|
201
222
|
type: "success",
|
|
202
223
|
size: 12,
|
|
@@ -209,168 +230,15 @@ var _sfc_main$z = defineComponent({
|
|
|
209
230
|
key: 3,
|
|
210
231
|
class: "item-des",
|
|
211
232
|
textContent: toDisplayString(node.item.description)
|
|
212
|
-
}, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
233
|
+
}, null, 8, _hoisted_4$7)) : createCommentVNode("", true)], 14, _hoisted_1$j);
|
|
213
234
|
}), 128))], 2);
|
|
214
235
|
};
|
|
215
236
|
}
|
|
216
237
|
});
|
|
217
238
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
props: {
|
|
222
|
-
type: {},
|
|
223
|
-
range: {
|
|
224
|
-
type: Boolean
|
|
225
|
-
},
|
|
226
|
-
format: {},
|
|
227
|
-
begin: {},
|
|
228
|
-
end: {},
|
|
229
|
-
min: {},
|
|
230
|
-
max: {},
|
|
231
|
-
zIndex: {},
|
|
232
|
-
timeDisabled: {
|
|
233
|
-
type: Boolean
|
|
234
|
-
},
|
|
235
|
-
secondDisabled: {
|
|
236
|
-
type: Boolean
|
|
237
|
-
},
|
|
238
|
-
cleanDisabled: {
|
|
239
|
-
type: Boolean
|
|
240
|
-
},
|
|
241
|
-
nowDisabled: {
|
|
242
|
-
type: Boolean
|
|
243
|
-
},
|
|
244
|
-
submitDisabled: {
|
|
245
|
-
type: Boolean
|
|
246
|
-
},
|
|
247
|
-
width: {},
|
|
248
|
-
height: {},
|
|
249
|
-
behindTop: {}
|
|
250
|
-
},
|
|
251
|
-
emits: ["change", "picker-focus", "picker-blur"],
|
|
252
|
-
setup(__props, _ref) {
|
|
253
|
-
let {
|
|
254
|
-
expose: __expose,
|
|
255
|
-
emit: __emit
|
|
256
|
-
} = _ref;
|
|
257
|
-
const props = __props;
|
|
258
|
-
const emits = __emit;
|
|
259
|
-
const {
|
|
260
|
-
onInterval,
|
|
261
|
-
onTimeout
|
|
262
|
-
} = useTimer();
|
|
263
|
-
const {
|
|
264
|
-
range
|
|
265
|
-
} = props;
|
|
266
|
-
const format = props.format || "yyyy-MM-dd";
|
|
267
|
-
const id = `DP${newId()}`.toUpperCase();
|
|
268
|
-
var pickerInitialTimer = void 0;
|
|
269
|
-
var pickerLastStatus = void 0;
|
|
270
|
-
var pickerStatusTimer = void 0;
|
|
271
|
-
const pickerStatusArray = [];
|
|
272
|
-
__expose({
|
|
273
|
-
showPicker
|
|
274
|
-
});
|
|
275
|
-
function initZanePopup(flag) {
|
|
276
|
-
const obj = window[flag] ? window[flag].$obj : void 0;
|
|
277
|
-
if (obj) {
|
|
278
|
-
obj.removeEventListener("mouseenter", onZanePopupFocus);
|
|
279
|
-
obj.removeEventListener("mouseleave", onZanePopupFocus);
|
|
280
|
-
obj.addEventListener("mouseenter", onZanePopupFocus);
|
|
281
|
-
obj.addEventListener("mouseleave", onZanePopupFocus);
|
|
282
|
-
return true;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
function destroyZanePopup(flag) {
|
|
286
|
-
if (window[flag]) {
|
|
287
|
-
window[flag].removeCalendar && window[flag].removeCalendar();
|
|
288
|
-
delete window[flag];
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
function showPicker(delay) {
|
|
292
|
-
const div = document.getElementById(id);
|
|
293
|
-
div && (delay > 0 ? onTimeout(() => div.click(), delay) : div.click());
|
|
294
|
-
}
|
|
295
|
-
function onClick() {
|
|
296
|
-
if (pickerInitialTimer && pickerInitialTimer.destroyed != true) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
pickerInitialTimer = onInterval(() => {
|
|
300
|
-
let counter = 0;
|
|
301
|
-
initZanePopup(id) && counter++;
|
|
302
|
-
range && initZanePopup(`${id}DOUBLE`) && counter++;
|
|
303
|
-
counter == (range ? 2 : 1) && pickerInitialTimer.destroy();
|
|
304
|
-
}, 10);
|
|
305
|
-
const timeoutScope = onTimeout(() => pickerInitialTimer.destroyed || pickerInitialTimer.destroy(), 5e3);
|
|
306
|
-
pickerInitialTimer.onDestroy(() => timeoutScope.destroyed || timeoutScope.destroy());
|
|
307
|
-
}
|
|
308
|
-
function onZaneMounted() {}
|
|
309
|
-
function onZanePopupFocus(e) {
|
|
310
|
-
const type = e.type == "mouseenter" ? "focus" : "blur";
|
|
311
|
-
pickerStatusArray.push(type);
|
|
312
|
-
pickerStatusTimer && pickerStatusTimer.destroy();
|
|
313
|
-
pickerStatusTimer = onTimeout(() => {
|
|
314
|
-
const lastStatus = getFromArray(pickerStatusArray, -1);
|
|
315
|
-
lastStatus && pickerLastStatus != lastStatus && emits(`picker-${lastStatus}`);
|
|
316
|
-
pickerLastStatus = lastStatus;
|
|
317
|
-
pickerStatusTimer = void 0;
|
|
318
|
-
pickerStatusArray.splice(0);
|
|
319
|
-
}, 0);
|
|
320
|
-
}
|
|
321
|
-
function onZaneDone(full, begin, end) {
|
|
322
|
-
if (format.includes("-") == true) {
|
|
323
|
-
begin && (begin = begin.replaceAll("/", "-"));
|
|
324
|
-
end && (end = end.replaceAll("/", "-"));
|
|
325
|
-
}
|
|
326
|
-
emits("change", begin, end);
|
|
327
|
-
}
|
|
328
|
-
link.register("/styles/zane-calendar.css");
|
|
329
|
-
onMounted(() => {
|
|
330
|
-
script.has("zane-calendar") || throwError(`zane-calendar module unregistered.`);
|
|
331
|
-
const zaneOptions = {
|
|
332
|
-
elem: `#${id}`,
|
|
333
|
-
type: `${range ? "double" : ""}${props.type || "day"}`,
|
|
334
|
-
format,
|
|
335
|
-
begintime: props.begin || "",
|
|
336
|
-
endtime: props.end || "",
|
|
337
|
-
min: props.min || "1900-10-01",
|
|
338
|
-
max: props.max || "",
|
|
339
|
-
zindex: props.zIndex || 1e4,
|
|
340
|
-
showtime: props.timeDisabled != true,
|
|
341
|
-
showsecond: props.secondDisabled != true,
|
|
342
|
-
showclean: props.cleanDisabled != true,
|
|
343
|
-
shownow: props.nowDisabled != true,
|
|
344
|
-
showsubmit: props.submitDisabled != true,
|
|
345
|
-
width: props.width || 280,
|
|
346
|
-
height: props.height || 300,
|
|
347
|
-
behindTop: props.behindTop || 4,
|
|
348
|
-
lang: "cn",
|
|
349
|
-
event: "click",
|
|
350
|
-
position: "fixed",
|
|
351
|
-
haveBotBtns: true,
|
|
352
|
-
mounted: onZaneMounted,
|
|
353
|
-
done: onZaneDone
|
|
354
|
-
};
|
|
355
|
-
script.load("zane-calendar").then(calendar => {
|
|
356
|
-
console.log(zaneOptions);
|
|
357
|
-
isFunction(calendar) || throwError("load zane-calendar failed: value is not a function.");
|
|
358
|
-
calendar(zaneOptions);
|
|
359
|
-
}, reason => throwError(reason));
|
|
360
|
-
});
|
|
361
|
-
onUnmounted(() => {
|
|
362
|
-
destroyZanePopup(id);
|
|
363
|
-
range && destroyZanePopup(`${id}DOUBLE`);
|
|
364
|
-
});
|
|
365
|
-
return (_ctx, _cache) => {
|
|
366
|
-
return openBlock(), createElementBlock("div", {
|
|
367
|
-
class: "snail-datepicker",
|
|
368
|
-
id: unref(id),
|
|
369
|
-
onClick
|
|
370
|
-
}, null, 8, _hoisted_1$h);
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
});
|
|
239
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
240
|
+
|
|
241
|
+
addLink("/styles/snail.vue.vue.css");
|
|
374
242
|
|
|
375
243
|
var _sfc_main$x = defineComponent({
|
|
376
244
|
...{
|
|
@@ -403,13 +271,13 @@ var _sfc_main$x = defineComponent({
|
|
|
403
271
|
class: normalizeClass(["snail-footer", {
|
|
404
272
|
"start-divider": __props.divider
|
|
405
273
|
}, __props.align || "right"])
|
|
406
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
274
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
407
275
|
key: 0,
|
|
408
276
|
size: "max",
|
|
409
277
|
type: "default",
|
|
410
278
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
411
279
|
textContent: toDisplayString(__props.cancelName || "取消")
|
|
412
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
280
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true), __props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
413
281
|
key: 1,
|
|
414
282
|
size: "max",
|
|
415
283
|
type: "primary",
|
|
@@ -420,7 +288,7 @@ var _sfc_main$x = defineComponent({
|
|
|
420
288
|
}
|
|
421
289
|
});
|
|
422
290
|
|
|
423
|
-
const _hoisted_1$
|
|
291
|
+
const _hoisted_1$i = ["textContent"];
|
|
424
292
|
var _sfc_main$w = defineComponent({
|
|
425
293
|
...{
|
|
426
294
|
name: "Header",
|
|
@@ -460,19 +328,20 @@ var _sfc_main$w = defineComponent({
|
|
|
460
328
|
key: 0,
|
|
461
329
|
textContent: toDisplayString(__props.title),
|
|
462
330
|
class: normalizeClass(["header-title", __props.titleAlign])
|
|
463
|
-
}, null, 10, _hoisted_1$
|
|
331
|
+
}, null, 10, _hoisted_1$i)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
464
332
|
key: 1,
|
|
333
|
+
class: "close-icon",
|
|
465
334
|
type: "close",
|
|
335
|
+
button: "",
|
|
466
336
|
size: 22,
|
|
467
337
|
color: __props.useTo == "page" ? "#2e3033" : "#464953",
|
|
468
|
-
class: "close-icon",
|
|
469
338
|
onClick: _cache[0] || (_cache[0] = $event => emits("close"))
|
|
470
339
|
}, null, 8, ["color"])) : createCommentVNode("", true)], 2);
|
|
471
340
|
};
|
|
472
341
|
}
|
|
473
342
|
});
|
|
474
343
|
|
|
475
|
-
const _hoisted_1$
|
|
344
|
+
const _hoisted_1$h = ["textContent"];
|
|
476
345
|
const _hoisted_2$a = {
|
|
477
346
|
key: 0,
|
|
478
347
|
class: "required",
|
|
@@ -535,7 +404,7 @@ var _sfc_main$v = defineComponent({
|
|
|
535
404
|
}, [createElementVNode("span", {
|
|
536
405
|
class: "text",
|
|
537
406
|
textContent: toDisplayString(__props.title)
|
|
538
|
-
}, null, 8, _hoisted_1$
|
|
407
|
+
}, null, 8, _hoisted_1$h), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$a)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$8, [createElementVNode("input", {
|
|
539
408
|
ref: "input-el",
|
|
540
409
|
type: __props.type || "text",
|
|
541
410
|
value: inputModel.value,
|
|
@@ -548,8 +417,9 @@ var _sfc_main$v = defineComponent({
|
|
|
548
417
|
key: 0,
|
|
549
418
|
class: "validate",
|
|
550
419
|
title: validateRef.value
|
|
551
|
-
}, [createVNode(_sfc_main$
|
|
420
|
+
}, [createVNode(_sfc_main$z, {
|
|
552
421
|
type: "error",
|
|
422
|
+
button: "",
|
|
553
423
|
size: 16,
|
|
554
424
|
color: "red"
|
|
555
425
|
})], 8, _hoisted_5$4)) : createCommentVNode("", true)])], 2);
|
|
@@ -757,7 +627,7 @@ function useFormatter(options) {
|
|
|
757
627
|
return formatter;
|
|
758
628
|
}
|
|
759
629
|
|
|
760
|
-
const _hoisted_1$
|
|
630
|
+
const _hoisted_1$g = {
|
|
761
631
|
key: 0,
|
|
762
632
|
class: "number-prefix"
|
|
763
633
|
};
|
|
@@ -917,7 +787,7 @@ var _sfc_main$u = defineComponent({
|
|
|
917
787
|
"has-prefix": unref(hasPrefix),
|
|
918
788
|
"has-suffix": unref(hasSuffix)
|
|
919
789
|
}])
|
|
920
|
-
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
790
|
+
}, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$g, [createElementVNode("span", {
|
|
921
791
|
class: "ellipsis",
|
|
922
792
|
textContent: toDisplayString(unref(prefix))
|
|
923
793
|
}, null, 8, _hoisted_2$9)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
@@ -937,29 +807,33 @@ var _sfc_main$u = defineComponent({
|
|
|
937
807
|
}, [createElementVNode("div", {
|
|
938
808
|
class: "controls default subtract",
|
|
939
809
|
onClick: _cache[4] || (_cache[4] = $event => onStepClick(false))
|
|
940
|
-
}, [createVNode(_sfc_main$
|
|
810
|
+
}, [createVNode(_sfc_main$z, {
|
|
941
811
|
type: "subtract",
|
|
812
|
+
button: "",
|
|
942
813
|
size: 20
|
|
943
814
|
})]), createElementVNode("div", {
|
|
944
815
|
class: "controls default plus",
|
|
945
816
|
onClick: _cache[5] || (_cache[5] = $event => onStepClick(true))
|
|
946
|
-
}, [createVNode(_sfc_main$
|
|
817
|
+
}, [createVNode(_sfc_main$z, {
|
|
947
818
|
type: "plus",
|
|
819
|
+
button: "",
|
|
948
820
|
size: 20
|
|
949
821
|
})])], 64)) : unref(controls) == "right" ? (openBlock(), createElementBlock(Fragment, {
|
|
950
822
|
key: 1
|
|
951
823
|
}, [createElementVNode("div", {
|
|
952
824
|
class: "controls right plus",
|
|
953
825
|
onClick: _cache[6] || (_cache[6] = $event => onStepClick(true))
|
|
954
|
-
}, [createVNode(_sfc_main$
|
|
826
|
+
}, [createVNode(_sfc_main$z, {
|
|
955
827
|
type: "arrow",
|
|
828
|
+
button: "",
|
|
956
829
|
size: 20,
|
|
957
830
|
rotate: 270
|
|
958
831
|
})]), createElementVNode("div", {
|
|
959
832
|
class: "controls right subtract",
|
|
960
833
|
onClick: _cache[7] || (_cache[7] = $event => onStepClick(false))
|
|
961
|
-
}, [createVNode(_sfc_main$
|
|
834
|
+
}, [createVNode(_sfc_main$z, {
|
|
962
835
|
type: "arrow",
|
|
836
|
+
button: "",
|
|
963
837
|
size: 20,
|
|
964
838
|
rotate: 90
|
|
965
839
|
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createElementVNode("span", {
|
|
@@ -980,8 +854,7 @@ var _sfc_main$u = defineComponent({
|
|
|
980
854
|
}
|
|
981
855
|
});
|
|
982
856
|
|
|
983
|
-
const _hoisted_1$
|
|
984
|
-
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";
|
|
857
|
+
const _hoisted_1$f = ["placeholder", "readonly"];
|
|
985
858
|
var _sfc_main$t = defineComponent({
|
|
986
859
|
...{
|
|
987
860
|
name: "Search",
|
|
@@ -1027,15 +900,19 @@ var _sfc_main$t = defineComponent({
|
|
|
1027
900
|
readonly: __props.readonly,
|
|
1028
901
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
1029
902
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
1030
|
-
}, null, 40, _hoisted_1$
|
|
903
|
+
}, null, 40, _hoisted_1$f), [[vModelText, textModel.value, void 0, {
|
|
1031
904
|
trim: true
|
|
1032
|
-
}]]), createElementVNode("div", null, [createVNode(_sfc_main$
|
|
905
|
+
}]]), createElementVNode("div", null, [createVNode(_sfc_main$z, {
|
|
1033
906
|
class: "search-button",
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
size: 24,
|
|
907
|
+
custom: "",
|
|
908
|
+
button: "",
|
|
1037
909
|
color: "#707070",
|
|
1038
910
|
onClick: _cache[2] || (_cache[2] = $event => onSearch(void 0))
|
|
911
|
+
}, {
|
|
912
|
+
default: withCtx(() => [...(_cache[3] || (_cache[3] = [createElementVNode("path", {
|
|
913
|
+
d: "M 860.16 824.32 l -163.84 -163.84 c 102.4 -120.32 97.28 -302.08 -17.92 -414.72 c -120.32 -120.32 -314.88 -120.32 -435.2 0 c -120.32 120.32 -120.32 314.88 0 435.2 c 112.64 112.64 294.4 120.32 414.72 17.92 l 163.84 163.84 c 10.24 10.24 25.6 10.24 35.84 0 c 12.8 -12.8 12.8 -28.16 2.56 -38.4 Z M 281.6 642.56 C 181.76 542.72 181.76 381.44 281.6 281.6 c 99.84 -99.84 261.12 -99.84 360.96 0 c 99.84 99.84 99.84 261.12 0 360.96 c -99.84 102.4 -261.12 102.4 -360.96 0 Z"
|
|
914
|
+
}, null, -1)]))]),
|
|
915
|
+
_: 1
|
|
1039
916
|
})])], 2);
|
|
1040
917
|
};
|
|
1041
918
|
}
|
|
@@ -1250,7 +1127,7 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
|
|
|
1250
1127
|
}
|
|
1251
1128
|
}
|
|
1252
1129
|
|
|
1253
|
-
const _hoisted_1$
|
|
1130
|
+
const _hoisted_1$e = {
|
|
1254
1131
|
class: "snail-confirm flex-column"
|
|
1255
1132
|
};
|
|
1256
1133
|
const _hoisted_2$8 = ["innerHTML"];
|
|
@@ -1282,7 +1159,7 @@ var _sfc_main$s = defineComponent({
|
|
|
1282
1159
|
},
|
|
1283
1160
|
setup(__props) {
|
|
1284
1161
|
return (_ctx, _cache) => {
|
|
1285
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1162
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [createVNode(_sfc_main$w, {
|
|
1286
1163
|
"use-to": "dialog",
|
|
1287
1164
|
title: __props.title || "提示",
|
|
1288
1165
|
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
@@ -1302,7 +1179,104 @@ var _sfc_main$s = defineComponent({
|
|
|
1302
1179
|
}
|
|
1303
1180
|
});
|
|
1304
1181
|
|
|
1182
|
+
const MOTION = Object.freeze({
|
|
1183
|
+
"fade": {
|
|
1184
|
+
enter: "fade-in",
|
|
1185
|
+
leave: "fade-out"
|
|
1186
|
+
},
|
|
1187
|
+
"scale": {
|
|
1188
|
+
enter: "scale-in",
|
|
1189
|
+
leave: "scale-out"
|
|
1190
|
+
},
|
|
1191
|
+
"rotate": {
|
|
1192
|
+
enter: "rotate-in",
|
|
1193
|
+
leave: "rotate-out"
|
|
1194
|
+
},
|
|
1195
|
+
"top": {
|
|
1196
|
+
enter: "top-in",
|
|
1197
|
+
leave: "top-out"
|
|
1198
|
+
},
|
|
1199
|
+
"topBottom": {
|
|
1200
|
+
enter: "top-in",
|
|
1201
|
+
leave: "bottom-out"
|
|
1202
|
+
},
|
|
1203
|
+
"bottom": {
|
|
1204
|
+
enter: "bottom-in",
|
|
1205
|
+
leave: "bottom-out"
|
|
1206
|
+
},
|
|
1207
|
+
"bottomTop": {
|
|
1208
|
+
enter: "bottom-in",
|
|
1209
|
+
leave: "top-out"
|
|
1210
|
+
},
|
|
1211
|
+
"left": {
|
|
1212
|
+
enter: "left-in",
|
|
1213
|
+
leave: "left-out"
|
|
1214
|
+
},
|
|
1215
|
+
"leftRight": {
|
|
1216
|
+
enter: "left-in",
|
|
1217
|
+
leave: "right-out"
|
|
1218
|
+
},
|
|
1219
|
+
"right": {
|
|
1220
|
+
enter: "right-in",
|
|
1221
|
+
leave: "right-out"
|
|
1222
|
+
},
|
|
1223
|
+
"rightLeft": {
|
|
1224
|
+
enter: "right-in",
|
|
1225
|
+
leave: "left-out"
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
for (var key in MOTION) hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
|
|
1229
|
+
|
|
1305
1230
|
var _sfc_main$r = defineComponent({
|
|
1231
|
+
__name: "motion",
|
|
1232
|
+
props: {
|
|
1233
|
+
multiple: {
|
|
1234
|
+
type: Boolean
|
|
1235
|
+
},
|
|
1236
|
+
effect: {},
|
|
1237
|
+
duration: {},
|
|
1238
|
+
mode: {}
|
|
1239
|
+
},
|
|
1240
|
+
setup(__props) {
|
|
1241
|
+
const props = __props;
|
|
1242
|
+
const durationRef = computed(() => {
|
|
1243
|
+
const number = correctNumber(props.duration, 200);
|
|
1244
|
+
return number > 0 ? number : 0;
|
|
1245
|
+
});
|
|
1246
|
+
const motionClassRef = computed(buildMotionClass);
|
|
1247
|
+
function buildMotionClass() {
|
|
1248
|
+
const effectClass = Object.create(null);
|
|
1249
|
+
if (durationRef.value > 0) {
|
|
1250
|
+
if (isString(props.effect) == false) {
|
|
1251
|
+
const effect = props.effect || MOTION.fade;
|
|
1252
|
+
effectClass.enterActiveClass = effect.enter;
|
|
1253
|
+
effectClass.leaveActiveClass = effect.leave;
|
|
1254
|
+
} else if (props.effect.length > 0) {
|
|
1255
|
+
effectClass.enterActiveClass = `${props.effect} enter-active`;
|
|
1256
|
+
effectClass.enterFromClass = `${props.effect} enter-from`;
|
|
1257
|
+
effectClass.enterToClass = `${props.effect} enter-to`;
|
|
1258
|
+
effectClass.leaveActiveClass = `${props.effect} leave-active`;
|
|
1259
|
+
effectClass.leaveFromClass = `${props.effect} leave-from`;
|
|
1260
|
+
effectClass.leaveToClass = `${props.effect} leave-to`;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
return effectClass;
|
|
1264
|
+
}
|
|
1265
|
+
return (_ctx, _cache) => {
|
|
1266
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.multiple ? TransitionGroup : Transition), mergeProps({
|
|
1267
|
+
appear: "",
|
|
1268
|
+
duration: durationRef.value
|
|
1269
|
+
}, __props.multiple ? void 0 : {
|
|
1270
|
+
mode: __props.mode
|
|
1271
|
+
}, motionClassRef.value), {
|
|
1272
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1273
|
+
_: 3
|
|
1274
|
+
}, 16, ["duration"]);
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
|
|
1279
|
+
var _sfc_main$q = defineComponent({
|
|
1306
1280
|
...{
|
|
1307
1281
|
name: "Loading",
|
|
1308
1282
|
inheritAttrs: true
|
|
@@ -1326,8 +1300,8 @@ var _sfc_main$r = defineComponent({
|
|
|
1326
1300
|
},
|
|
1327
1301
|
setup(__props) {
|
|
1328
1302
|
return (_ctx, _cache) => {
|
|
1329
|
-
return openBlock(), createBlock(
|
|
1330
|
-
|
|
1303
|
+
return openBlock(), createBlock(_sfc_main$r, {
|
|
1304
|
+
effect: unref(MOTION).fade
|
|
1331
1305
|
}, {
|
|
1332
1306
|
default: withCtx(() => [__props.show ? (openBlock(), createElementBlock("div", {
|
|
1333
1307
|
key: 0,
|
|
@@ -1336,12 +1310,12 @@ var _sfc_main$r = defineComponent({
|
|
|
1336
1310
|
}, __props.rootClass])
|
|
1337
1311
|
}, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$attrs)))], 2)) : createCommentVNode("", true)]),
|
|
1338
1312
|
_: 3
|
|
1339
|
-
}, 8, ["
|
|
1313
|
+
}, 8, ["effect"]);
|
|
1340
1314
|
};
|
|
1341
1315
|
}
|
|
1342
1316
|
});
|
|
1343
1317
|
|
|
1344
|
-
var _sfc_main$
|
|
1318
|
+
var _sfc_main$p = defineComponent({
|
|
1345
1319
|
...{
|
|
1346
1320
|
name: "Dynamic",
|
|
1347
1321
|
inheritAttrs: false
|
|
@@ -1365,7 +1339,7 @@ var _sfc_main$q = defineComponent({
|
|
|
1365
1339
|
const loadingComponent = defineComponent({
|
|
1366
1340
|
inheritAttrs: false,
|
|
1367
1341
|
components: {
|
|
1368
|
-
Loading: _sfc_main$
|
|
1342
|
+
Loading: _sfc_main$q
|
|
1369
1343
|
},
|
|
1370
1344
|
template: "<Loading :mask-disabled='true' />"
|
|
1371
1345
|
});
|
|
@@ -1432,7 +1406,7 @@ var _sfc_main$q = defineComponent({
|
|
|
1432
1406
|
}
|
|
1433
1407
|
});
|
|
1434
1408
|
|
|
1435
|
-
var _sfc_main$
|
|
1409
|
+
var _sfc_main$o = defineComponent({
|
|
1436
1410
|
...{
|
|
1437
1411
|
name: "DialogContainer",
|
|
1438
1412
|
inheritAttrs: true
|
|
@@ -1477,7 +1451,7 @@ var _sfc_main$p = defineComponent({
|
|
|
1477
1451
|
onClick: _cache[1] || (_cache[1] = withModifiers($event => {
|
|
1478
1452
|
__props.options.closeOnMask && unref(closePopup)();
|
|
1479
1453
|
}, ["self"]))
|
|
1480
|
-
}, [createVNode(_sfc_main$
|
|
1454
|
+
}, [createVNode(_sfc_main$p, mergeProps({
|
|
1481
1455
|
class: "dialog-body",
|
|
1482
1456
|
name: __props.options.name,
|
|
1483
1457
|
component: __props.options.component,
|
|
@@ -1492,7 +1466,7 @@ var _sfc_main$p = defineComponent({
|
|
|
1492
1466
|
}
|
|
1493
1467
|
});
|
|
1494
1468
|
|
|
1495
|
-
var _sfc_main$
|
|
1469
|
+
var _sfc_main$n = defineComponent({
|
|
1496
1470
|
...{
|
|
1497
1471
|
name: "FollowContainer",
|
|
1498
1472
|
inheritAttrs: true
|
|
@@ -1613,7 +1587,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1613
1587
|
});
|
|
1614
1588
|
});
|
|
1615
1589
|
return (_ctx, _cache) => {
|
|
1616
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1590
|
+
return openBlock(), createBlock(_sfc_main$p, mergeProps({
|
|
1617
1591
|
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1618
1592
|
style: {
|
|
1619
1593
|
"z-index": __props.zIndex
|
|
@@ -1630,7 +1604,7 @@ var _sfc_main$o = defineComponent({
|
|
|
1630
1604
|
}
|
|
1631
1605
|
});
|
|
1632
1606
|
|
|
1633
|
-
var _sfc_main$
|
|
1607
|
+
var _sfc_main$m = defineComponent({
|
|
1634
1608
|
...{
|
|
1635
1609
|
name: "PopupContainer",
|
|
1636
1610
|
inheritAttrs: true
|
|
@@ -1650,7 +1624,7 @@ var _sfc_main$n = defineComponent({
|
|
|
1650
1624
|
model = shallowRef(void 0)
|
|
1651
1625
|
} = __props.options;
|
|
1652
1626
|
return (_ctx, _cache) => {
|
|
1653
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1627
|
+
return openBlock(), createBlock(_sfc_main$p, mergeProps({
|
|
1654
1628
|
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1655
1629
|
style: {
|
|
1656
1630
|
"z-index": __props.zIndex
|
|
@@ -1668,12 +1642,12 @@ var _sfc_main$n = defineComponent({
|
|
|
1668
1642
|
}
|
|
1669
1643
|
});
|
|
1670
1644
|
|
|
1671
|
-
const _hoisted_1$
|
|
1645
|
+
const _hoisted_1$d = {
|
|
1672
1646
|
key: 1,
|
|
1673
1647
|
class: "icon"
|
|
1674
1648
|
};
|
|
1675
1649
|
const _hoisted_2$7 = ["innerHTML"];
|
|
1676
|
-
var _sfc_main$
|
|
1650
|
+
var _sfc_main$l = defineComponent({
|
|
1677
1651
|
...{
|
|
1678
1652
|
name: "ToastContainer",
|
|
1679
1653
|
inheritAttrs: true
|
|
@@ -1696,7 +1670,6 @@ var _sfc_main$m = defineComponent({
|
|
|
1696
1670
|
closePopup
|
|
1697
1671
|
} = __props.extOptions;
|
|
1698
1672
|
const duration = props.duration > 0 ? props.duration : 1500;
|
|
1699
|
-
const closeFillRef = ref("#707070");
|
|
1700
1673
|
var destroyTimer;
|
|
1701
1674
|
function onMouseEvent(isLeave) {
|
|
1702
1675
|
destroyTimer && destroyTimer.destroy();
|
|
@@ -1709,22 +1682,22 @@ var _sfc_main$m = defineComponent({
|
|
|
1709
1682
|
style: normalizeStyle({
|
|
1710
1683
|
"z-index": __props.zIndex
|
|
1711
1684
|
}),
|
|
1712
|
-
onMouseenter: _cache[
|
|
1713
|
-
onMouseleave: _cache[
|
|
1714
|
-
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
1685
|
+
onMouseenter: _cache[1] || (_cache[1] = $event => onMouseEvent(false)),
|
|
1686
|
+
onMouseleave: _cache[2] || (_cache[2] = $event => onMouseEvent(true))
|
|
1687
|
+
}, [unref(props).closeDisabled != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
1715
1688
|
key: 0,
|
|
1716
1689
|
class: "close-icon",
|
|
1717
1690
|
type: "close",
|
|
1718
|
-
|
|
1691
|
+
button: "",
|
|
1719
1692
|
size: 20,
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
onClick: _cache[
|
|
1693
|
+
color: "#707070",
|
|
1694
|
+
"hover-color": "red",
|
|
1695
|
+
onClick: _cache[0] || (_cache[0] = $event => {
|
|
1723
1696
|
unref(closePopup)();
|
|
1724
1697
|
})
|
|
1725
|
-
}
|
|
1698
|
+
})) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$d, [createVNode(_sfc_main$z, {
|
|
1726
1699
|
type: unref(props).type,
|
|
1727
|
-
|
|
1700
|
+
color: "#707070",
|
|
1728
1701
|
size: 20
|
|
1729
1702
|
}, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
|
|
1730
1703
|
class: "message",
|
|
@@ -1736,7 +1709,7 @@ var _sfc_main$m = defineComponent({
|
|
|
1736
1709
|
|
|
1737
1710
|
function usePopup() {
|
|
1738
1711
|
function popup(options) {
|
|
1739
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1712
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$m, options);
|
|
1740
1713
|
return addScope2Scopes(scope);
|
|
1741
1714
|
}
|
|
1742
1715
|
function dialog(options) {
|
|
@@ -1769,7 +1742,7 @@ function usePopup() {
|
|
|
1769
1742
|
},
|
|
1770
1743
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1771
1744
|
});
|
|
1772
|
-
const descriptor = openPopup(_sfc_main$
|
|
1745
|
+
const descriptor = openPopup(_sfc_main$o, options, extOptions);
|
|
1773
1746
|
scope = useAsyncScope(deferred.promise);
|
|
1774
1747
|
monitorDialog(descriptor, scope, deferred);
|
|
1775
1748
|
}
|
|
@@ -1787,7 +1760,7 @@ function usePopup() {
|
|
|
1787
1760
|
inPopup: "follow",
|
|
1788
1761
|
target
|
|
1789
1762
|
};
|
|
1790
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1763
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$n, options, extOptions);
|
|
1791
1764
|
}
|
|
1792
1765
|
return addScope2Scopes(scope);
|
|
1793
1766
|
}
|
|
@@ -1804,7 +1777,7 @@ function usePopup() {
|
|
|
1804
1777
|
});
|
|
1805
1778
|
}
|
|
1806
1779
|
function toast(type, message, options) {
|
|
1807
|
-
return popupInCustomContainer(_sfc_main$
|
|
1780
|
+
return popupInCustomContainer(_sfc_main$l, {
|
|
1808
1781
|
url: "#ToastContainer",
|
|
1809
1782
|
props: {
|
|
1810
1783
|
...(options || Object.create(null)),
|
|
@@ -1837,7 +1810,7 @@ function usePopup() {
|
|
|
1837
1810
|
},
|
|
1838
1811
|
...extOptions
|
|
1839
1812
|
});
|
|
1840
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1813
|
+
const descriptor = openPopup(container || _sfc_main$m, options, extOptions);
|
|
1841
1814
|
const scope = useAsyncScope(deferred.promise);
|
|
1842
1815
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1843
1816
|
return scope;
|
|
@@ -1968,19 +1941,16 @@ function useSelectContext(items, selectsRef, separator) {
|
|
|
1968
1941
|
return Object.freeze(context);
|
|
1969
1942
|
}
|
|
1970
1943
|
|
|
1971
|
-
function getTwoArrowIconDraw() {
|
|
1972
|
-
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";
|
|
1973
|
-
}
|
|
1974
1944
|
function getNoDataBase64Image() {
|
|
1975
1945
|
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyREREODhFQ0M5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyREREODhFREM5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJEREQ4OEVBQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJEREQ4OEVCQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++keGxAAAA5lJREFUeNrsmktoE0EYx3eSTdpsk2abvnwcFBVp8QFqVPDgQaGgIogIoictelKKVhARBA8q+KAVrFqooh4qXgRfiHpTEHqw9iCKXqQHSVstpqlt0yabrP9p52K1yW72GTMf/JhZMrM7/3l+37REVVWhlMwjlJhxwVwwF8wFc8FcMBfsnIlGKg98TxRa9RbYAFYXUnl+XbjoRpiKXVXMU9qns3xK76CC/YC4QfA1MAg26aiTZGlQQ9la8AZ0g3VuENwLqsArsFVnXW+e30PgKVgGnoA+Nwi+Cw6DAHgGdmqoMwJoXJrJUcYPHoGN4C3Yl6e8rWv4Nmhma/kh2J6n/HW2JsdylLkKtoAPYAeYcPxYmmX32AjcAVHwPEfZFxreR2fAJ9Z5CbMaSYzceMxxDtN198vKo8Vt57ClYh0d4f/OtTTgOjpquaa8WEhldISM5DRYWYCXZdTS4DVoR9tSegdI9y6Nl1KBL5k/7JRto99HW/ZAtGralJ7DTtCPEUKUmqqKPlH0rtXgMZk2utms2jk0PEqPqt3gEOiybJdGjy5BcobmI7LUC7HrbRQ7HaR4PORoOBRoY+f0RbSp3spjqQNIPtEb8/vEqFMnixTwH0T6gPnwbZYIRk/uZWtHqApLQzaP7GyL1kSCPUinqIuKtjWZKhgvpFt1O82X+cXPXq9njdNHD2ZZC/aRTvZ4A20sN3OEz7IgXJDDkls8laV11aEBpHGaB62mCEbPNSA5QvNYO+88hDS6xcHABtbq9XiusMdTYJ4ZI3yBORdKZTBQ6zKnqq62OiQh7WdByzmjgqlzsWs6BAqW9xAiLHJdMECEY36f9zJ7pLt3oxHH4/j0O4kwWREoW8BuKvSYxG4utFoWjOoVHZErlg/+GP2I7ApwkgnXHy1h/VLntNJA76sROfgFI9CgoXh8OD72OJ3OHDA46Am4m3KhU7rSyJfRl2QiOaXVE3oPsU0mzPKw3RcAf5iiZEPaOkf9KsxcyVq7s1vu7SsZEQ5/LO81ydhk3I5Q05Y/tcQTExKLY/+9U2XV++PJVLMtZ7cdH0mlFfnnyPgIpm3s758y3Qj3NiNfY8sxlmeXNt2NhC/ej0grllXVdHIyVY/RbTD7G9iliZkXAIZsKqUspjjmjgolZlwwF1xigr8VoaYBI4I7ilBwl5Hw8JIwcx3aAha6XCj9t4ub4HzBjgfftLhgLpgL5oK5YC6YC+aCuWDt9luAAQC2EPxjL8cUkwAAAABJRU5ErkJggg==";
|
|
1976
1946
|
}
|
|
1977
1947
|
|
|
1978
|
-
const _hoisted_1$
|
|
1948
|
+
const _hoisted_1$c = {
|
|
1979
1949
|
class: "snail-empty"
|
|
1980
1950
|
};
|
|
1981
1951
|
const _hoisted_2$6 = ["src"];
|
|
1982
1952
|
const _hoisted_3$6 = ["textContent"];
|
|
1983
|
-
var _sfc_main$
|
|
1953
|
+
var _sfc_main$k = defineComponent({
|
|
1984
1954
|
...{
|
|
1985
1955
|
name: "Empty",
|
|
1986
1956
|
inheritAttrs: true
|
|
@@ -1993,7 +1963,7 @@ var _sfc_main$l = defineComponent({
|
|
|
1993
1963
|
setup(__props) {
|
|
1994
1964
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1995
1965
|
return (_ctx, _cache) => {
|
|
1996
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1966
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [createElementVNode("img", {
|
|
1997
1967
|
src: __props.imageUrl || unref(defaultImageBase64)
|
|
1998
1968
|
}, null, 8, _hoisted_2$6), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
|
|
1999
1969
|
class: "message",
|
|
@@ -2003,13 +1973,13 @@ var _sfc_main$l = defineComponent({
|
|
|
2003
1973
|
}
|
|
2004
1974
|
});
|
|
2005
1975
|
|
|
2006
|
-
const _hoisted_1$
|
|
1976
|
+
const _hoisted_1$b = ["title"];
|
|
2007
1977
|
const _hoisted_2$5 = ["textContent"];
|
|
2008
1978
|
const _hoisted_3$5 = {
|
|
2009
1979
|
key: 1,
|
|
2010
1980
|
class: "select-status"
|
|
2011
1981
|
};
|
|
2012
|
-
var _sfc_main$
|
|
1982
|
+
var _sfc_main$j = defineComponent({
|
|
2013
1983
|
...{
|
|
2014
1984
|
name: "SelectNode",
|
|
2015
1985
|
inheritAttrs: true
|
|
@@ -2054,15 +2024,15 @@ var _sfc_main$k = defineComponent({
|
|
|
2054
2024
|
}, [createElementVNode("div", {
|
|
2055
2025
|
class: "item-text ellipsis",
|
|
2056
2026
|
textContent: toDisplayString(__props.item.text)
|
|
2057
|
-
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$
|
|
2027
|
+
}, null, 8, _hoisted_2$5), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$z, {
|
|
2058
2028
|
key: 0,
|
|
2059
|
-
type: "arrow"
|
|
2060
|
-
|
|
2061
|
-
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$A, {
|
|
2029
|
+
type: "arrow"
|
|
2030
|
+
})) : __props.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_sfc_main$z, {
|
|
2062
2031
|
type: "success",
|
|
2063
|
-
|
|
2064
|
-
size: 12
|
|
2065
|
-
|
|
2032
|
+
button: "",
|
|
2033
|
+
size: 12,
|
|
2034
|
+
color: "white"
|
|
2035
|
+
})])) : createCommentVNode("", true)], 42, _hoisted_1$b)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
|
|
2066
2036
|
key: 1
|
|
2067
2037
|
}, renderList(unref(showChildrenRef), child => {
|
|
2068
2038
|
return openBlock(), createBlock(_component_SelectNode, {
|
|
@@ -2079,7 +2049,7 @@ var _sfc_main$k = defineComponent({
|
|
|
2079
2049
|
}
|
|
2080
2050
|
});
|
|
2081
2051
|
|
|
2082
|
-
var _sfc_main$
|
|
2052
|
+
var _sfc_main$i = defineComponent({
|
|
2083
2053
|
...{
|
|
2084
2054
|
name: "Select2Popup",
|
|
2085
2055
|
inheritAttrs: true
|
|
@@ -2257,7 +2227,7 @@ var _sfc_main$j = defineComponent({
|
|
|
2257
2227
|
onSearch,
|
|
2258
2228
|
key: "select-search"
|
|
2259
2229
|
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
2260
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2230
|
+
return openBlock(), createBlock(_sfc_main$j, {
|
|
2261
2231
|
key: unref(context).getKey(item),
|
|
2262
2232
|
multiple: __props.multiple,
|
|
2263
2233
|
item,
|
|
@@ -2266,7 +2236,7 @@ var _sfc_main$j = defineComponent({
|
|
|
2266
2236
|
onEnter: onEnterSelectNode,
|
|
2267
2237
|
onClick: onClickSelectNode
|
|
2268
2238
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2269
|
-
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2239
|
+
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$k, {
|
|
2270
2240
|
key: 1,
|
|
2271
2241
|
message: "无结果"
|
|
2272
2242
|
})) : createCommentVNode("", true), showClearButtonRef.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -2278,7 +2248,7 @@ var _sfc_main$j = defineComponent({
|
|
|
2278
2248
|
}
|
|
2279
2249
|
});
|
|
2280
2250
|
|
|
2281
|
-
const _hoisted_1$
|
|
2251
|
+
const _hoisted_1$a = {
|
|
2282
2252
|
key: 0,
|
|
2283
2253
|
class: "select-result"
|
|
2284
2254
|
};
|
|
@@ -2289,9 +2259,9 @@ const _hoisted_4$4 = {
|
|
|
2289
2259
|
class: "placeholder"
|
|
2290
2260
|
};
|
|
2291
2261
|
onAppCreated((app, type) => {
|
|
2292
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2262
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$i);
|
|
2293
2263
|
});
|
|
2294
|
-
var _sfc_main$
|
|
2264
|
+
var _sfc_main$h = defineComponent({
|
|
2295
2265
|
...{
|
|
2296
2266
|
name: "Select",
|
|
2297
2267
|
inheritAttrs: true
|
|
@@ -2423,7 +2393,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2423
2393
|
ref: "select"
|
|
2424
2394
|
}, [__props.items && __props.items.length ? (openBlock(), createElementBlock(Fragment, {
|
|
2425
2395
|
key: 0
|
|
2426
|
-
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2396
|
+
}, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$a, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
|
|
2427
2397
|
class: "select-text ellipsis",
|
|
2428
2398
|
title: selectedTextRef.value,
|
|
2429
2399
|
textContent: toDisplayString(selectedTextRef.value)
|
|
@@ -2431,20 +2401,18 @@ var _sfc_main$i = defineComponent({
|
|
|
2431
2401
|
key: 1,
|
|
2432
2402
|
class: "placeholder",
|
|
2433
2403
|
textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2434
|
-
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$
|
|
2404
|
+
}, null, 8, _hoisted_3$4)), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
2435
2405
|
key: 2,
|
|
2436
2406
|
type: "arrow",
|
|
2407
|
+
button: "",
|
|
2437
2408
|
size: 24,
|
|
2438
|
-
|
|
2439
|
-
style: {
|
|
2440
|
-
"transform": "rotate(90deg)"
|
|
2441
|
-
}
|
|
2409
|
+
rotate: 90
|
|
2442
2410
|
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$4, "暂无可选项"))], 2);
|
|
2443
2411
|
};
|
|
2444
2412
|
}
|
|
2445
2413
|
});
|
|
2446
2414
|
|
|
2447
|
-
var _sfc_main$
|
|
2415
|
+
var _sfc_main$g = defineComponent({
|
|
2448
2416
|
...{
|
|
2449
2417
|
name: "Switch",
|
|
2450
2418
|
inheritAttrs: true
|
|
@@ -2493,8 +2461,8 @@ var _sfc_main$h = defineComponent({
|
|
|
2493
2461
|
}
|
|
2494
2462
|
});
|
|
2495
2463
|
|
|
2496
|
-
const _hoisted_1$
|
|
2497
|
-
var _sfc_main$
|
|
2464
|
+
const _hoisted_1$9 = ["readonly", "placeholder", "rows"];
|
|
2465
|
+
var _sfc_main$f = defineComponent({
|
|
2498
2466
|
...{
|
|
2499
2467
|
name: "Textarea"
|
|
2500
2468
|
},
|
|
@@ -2554,87 +2522,12 @@ var _sfc_main$g = defineComponent({
|
|
|
2554
2522
|
onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
|
|
2555
2523
|
onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
|
|
2556
2524
|
onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
|
|
2557
|
-
}), null, 16, _hoisted_1$
|
|
2525
|
+
}), null, 16, _hoisted_1$9)), [[vModelText, valueModel.value]]);
|
|
2558
2526
|
};
|
|
2559
2527
|
}
|
|
2560
2528
|
});
|
|
2561
2529
|
|
|
2562
|
-
|
|
2563
|
-
__name: "transitions",
|
|
2564
|
-
props: {
|
|
2565
|
-
group: {
|
|
2566
|
-
type: Boolean
|
|
2567
|
-
},
|
|
2568
|
-
duration: {},
|
|
2569
|
-
customClass: {},
|
|
2570
|
-
effect: {}
|
|
2571
|
-
},
|
|
2572
|
-
setup(__props) {
|
|
2573
|
-
const props = __props;
|
|
2574
|
-
const classNames = computed(() => {
|
|
2575
|
-
const array = [props.customClass || "snail-transition"];
|
|
2576
|
-
if (isArray(props.effect)) {
|
|
2577
|
-
props.effect.length > 0 ? array.push(...props.effect) : array.push("fade");
|
|
2578
|
-
} else {
|
|
2579
|
-
array.push(props.effect || "fade");
|
|
2580
|
-
}
|
|
2581
|
-
props.duration === 0 && array.push("no-duration");
|
|
2582
|
-
return array.join(" ");
|
|
2583
|
-
});
|
|
2584
|
-
return (_ctx, _cache) => {
|
|
2585
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.group ? TransitionGroup : Transition), {
|
|
2586
|
-
appear: "",
|
|
2587
|
-
duration: __props.duration,
|
|
2588
|
-
"enter-active-class": `${classNames.value} enter-active`,
|
|
2589
|
-
"enter-from-class": `${classNames.value} enter-from`,
|
|
2590
|
-
"enter-to-class": `${classNames.value} enter-to`,
|
|
2591
|
-
"leave-active-class": `${classNames.value} leave-active`,
|
|
2592
|
-
"leave-from-class": `${classNames.value} leave-from`,
|
|
2593
|
-
"leave-to-class": `${classNames.value} leave-to`
|
|
2594
|
-
}, {
|
|
2595
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2596
|
-
_: 3
|
|
2597
|
-
}, 8, ["duration", "enter-active-class", "enter-from-class", "enter-to-class", "leave-active-class", "leave-from-class", "leave-to-class"]);
|
|
2598
|
-
};
|
|
2599
|
-
}
|
|
2600
|
-
});
|
|
2601
|
-
|
|
2602
|
-
var _sfc_main$e = defineComponent({
|
|
2603
|
-
__name: "element",
|
|
2604
|
-
props: {
|
|
2605
|
-
tag: {},
|
|
2606
|
-
show: {
|
|
2607
|
-
type: Boolean
|
|
2608
|
-
},
|
|
2609
|
-
showMode: {},
|
|
2610
|
-
transition: {},
|
|
2611
|
-
children: {}
|
|
2612
|
-
},
|
|
2613
|
-
setup(__props) {
|
|
2614
|
-
return (_ctx, _cache) => {
|
|
2615
|
-
return openBlock(), createBlock(_sfc_main$f, mergeProps({
|
|
2616
|
-
group: false
|
|
2617
|
-
}, __props.transition, {
|
|
2618
|
-
duration: __props.transition ? __props.transition.duration : 0
|
|
2619
|
-
}), {
|
|
2620
|
-
default: withCtx(() => [(__props.showMode == "vShow" ? true : __props.show) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(correctString)(__props.tag, "div", true)), {
|
|
2621
|
-
key: 0
|
|
2622
|
-
}, {
|
|
2623
|
-
default: withCtx(() => [createVNode(_sfc_main$f, mergeProps(__props.children, {
|
|
2624
|
-
duration: __props.children ? __props.children.duration : 0
|
|
2625
|
-
}), {
|
|
2626
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2627
|
-
_: 3
|
|
2628
|
-
}, 16, ["duration"])]),
|
|
2629
|
-
_: 3
|
|
2630
|
-
}, 512)), [[vShow, __props.showMode == "vShow" ? __props.show : true]]) : createCommentVNode("", true)]),
|
|
2631
|
-
_: 3
|
|
2632
|
-
}, 16, ["duration"]);
|
|
2633
|
-
};
|
|
2634
|
-
}
|
|
2635
|
-
});
|
|
2636
|
-
|
|
2637
|
-
const _hoisted_1$6 = {
|
|
2530
|
+
const _hoisted_1$8 = {
|
|
2638
2531
|
class: "fold-header"
|
|
2639
2532
|
};
|
|
2640
2533
|
const _hoisted_2$3 = ["textContent"];
|
|
@@ -2647,7 +2540,7 @@ const _hoisted_5$2 = {
|
|
|
2647
2540
|
class: "fold-body",
|
|
2648
2541
|
ref: "foldBody"
|
|
2649
2542
|
};
|
|
2650
|
-
var _sfc_main$
|
|
2543
|
+
var _sfc_main$e = defineComponent({
|
|
2651
2544
|
...{
|
|
2652
2545
|
name: "Fold",
|
|
2653
2546
|
inheritAttrs: true
|
|
@@ -2717,23 +2610,26 @@ var _sfc_main$d = defineComponent({
|
|
|
2717
2610
|
return (_ctx, _cache) => {
|
|
2718
2611
|
return openBlock(), createElementBlock("div", {
|
|
2719
2612
|
class: normalizeClass(["snail-fold", statusModel.value])
|
|
2720
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2613
|
+
}, [createElementVNode("div", _hoisted_1$8, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", {
|
|
2721
2614
|
class: "title ellipsis",
|
|
2722
2615
|
textContent: toDisplayString(__props.title)
|
|
2723
2616
|
}, null, 8, _hoisted_2$3), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
2724
2617
|
key: 0,
|
|
2725
2618
|
class: "subtitle ellipsis",
|
|
2726
2619
|
textContent: toDisplayString(__props.subtitle)
|
|
2727
|
-
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$
|
|
2620
|
+
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_sfc_main$z, {
|
|
2621
|
+
custom: false,
|
|
2728
2622
|
type: "arrow",
|
|
2623
|
+
button: "",
|
|
2729
2624
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2625
|
+
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
2730
2626
|
onClick: onStatusClick
|
|
2731
|
-
}, null, 8, ["title"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2627
|
+
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2732
2628
|
};
|
|
2733
2629
|
}
|
|
2734
2630
|
});
|
|
2735
2631
|
|
|
2736
|
-
var _sfc_main$
|
|
2632
|
+
var _sfc_main$d = defineComponent({
|
|
2737
2633
|
...{
|
|
2738
2634
|
name: "Scroll",
|
|
2739
2635
|
inheritAttrs: true
|
|
@@ -2863,7 +2759,7 @@ var _sfc_main$c = defineComponent({
|
|
|
2863
2759
|
}
|
|
2864
2760
|
});
|
|
2865
2761
|
|
|
2866
|
-
var _sfc_main$
|
|
2762
|
+
var _sfc_main$c = defineComponent({
|
|
2867
2763
|
__name: "layout",
|
|
2868
2764
|
props: {
|
|
2869
2765
|
mode: {},
|
|
@@ -2929,7 +2825,7 @@ var _sfc_main$b = defineComponent({
|
|
|
2929
2825
|
key: item
|
|
2930
2826
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (openBlock(), createElementBlock(Fragment, {
|
|
2931
2827
|
key: 0
|
|
2932
|
-
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$
|
|
2828
|
+
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$d, mergeProps({
|
|
2933
2829
|
key: 0,
|
|
2934
2830
|
class: areaMap.value[item].class,
|
|
2935
2831
|
style: areaMap.value[item].style
|
|
@@ -2948,37 +2844,7 @@ var _sfc_main$b = defineComponent({
|
|
|
2948
2844
|
}
|
|
2949
2845
|
});
|
|
2950
2846
|
|
|
2951
|
-
var _sfc_main$
|
|
2952
|
-
__name: "motion",
|
|
2953
|
-
props: {
|
|
2954
|
-
enter: {},
|
|
2955
|
-
leave: {},
|
|
2956
|
-
multiple: {
|
|
2957
|
-
type: Boolean
|
|
2958
|
-
},
|
|
2959
|
-
duration: {},
|
|
2960
|
-
mode: {}
|
|
2961
|
-
},
|
|
2962
|
-
setup(__props) {
|
|
2963
|
-
const props = __props;
|
|
2964
|
-
const duration = correctNumber(props.duration, 200);
|
|
2965
|
-
return (_ctx, _cache) => {
|
|
2966
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.multiple ? TransitionGroup : Transition), {
|
|
2967
|
-
appear: "",
|
|
2968
|
-
type: "animation",
|
|
2969
|
-
duration: unref(duration),
|
|
2970
|
-
mode: __props.mode,
|
|
2971
|
-
"enter-active-class": unref(correctString)(props.enter, "fade-in", true),
|
|
2972
|
-
"leave-active-class": unref(correctString)(props.leave, "fade-out", true)
|
|
2973
|
-
}, {
|
|
2974
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2975
|
-
_: 3
|
|
2976
|
-
}, 8, ["duration", "mode", "enter-active-class", "leave-active-class"]);
|
|
2977
|
-
};
|
|
2978
|
-
}
|
|
2979
|
-
});
|
|
2980
|
-
|
|
2981
|
-
var _sfc_main$9 = defineComponent({
|
|
2847
|
+
var _sfc_main$b = defineComponent({
|
|
2982
2848
|
...{
|
|
2983
2849
|
name: "Sort",
|
|
2984
2850
|
inheritAttrs: true
|
|
@@ -3079,10 +2945,10 @@ var _sfc_main$9 = defineComponent({
|
|
|
3079
2945
|
}
|
|
3080
2946
|
});
|
|
3081
2947
|
|
|
3082
|
-
const _hoisted_1$
|
|
2948
|
+
const _hoisted_1$7 = {
|
|
3083
2949
|
class: "table-body"
|
|
3084
2950
|
};
|
|
3085
|
-
var _sfc_main$
|
|
2951
|
+
var _sfc_main$a = defineComponent({
|
|
3086
2952
|
...{
|
|
3087
2953
|
name: "Table",
|
|
3088
2954
|
inheritAttrs: true
|
|
@@ -3107,7 +2973,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3107
2973
|
const hStyleRef = computed(() => css.buildStyle(props.headerStyle));
|
|
3108
2974
|
const fStyleRef = computed(() => css.buildStyle(props.footerStyle));
|
|
3109
2975
|
return (_ctx, _cache) => {
|
|
3110
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2976
|
+
return openBlock(), createBlock(_sfc_main$d, {
|
|
3111
2977
|
class: normalizeClass(["snail-table", {
|
|
3112
2978
|
"start-border": __props.border == true
|
|
3113
2979
|
}]),
|
|
@@ -3117,7 +2983,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3117
2983
|
default: withCtx(() => [createElementVNode("div", {
|
|
3118
2984
|
class: "table-header",
|
|
3119
2985
|
style: normalizeStyle(hStyleRef.value)
|
|
3120
|
-
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$
|
|
2986
|
+
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$7, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
|
|
3121
2987
|
class: "table-footer",
|
|
3122
2988
|
style: normalizeStyle(fStyleRef.value)
|
|
3123
2989
|
}, [renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -3127,7 +2993,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3127
2993
|
}
|
|
3128
2994
|
});
|
|
3129
2995
|
|
|
3130
|
-
var _sfc_main$
|
|
2996
|
+
var _sfc_main$9 = defineComponent({
|
|
3131
2997
|
...{
|
|
3132
2998
|
name: "TableRow",
|
|
3133
2999
|
inheritAttrs: true
|
|
@@ -3150,7 +3016,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
3150
3016
|
}
|
|
3151
3017
|
});
|
|
3152
3018
|
|
|
3153
|
-
var _sfc_main$
|
|
3019
|
+
var _sfc_main$8 = defineComponent({
|
|
3154
3020
|
...{
|
|
3155
3021
|
name: "TableCol",
|
|
3156
3022
|
inheritAttrs: true
|
|
@@ -3196,7 +3062,7 @@ var _sfc_main$6 = defineComponent({
|
|
|
3196
3062
|
}
|
|
3197
3063
|
});
|
|
3198
3064
|
|
|
3199
|
-
const _hoisted_1$
|
|
3065
|
+
const _hoisted_1$6 = {
|
|
3200
3066
|
key: 0,
|
|
3201
3067
|
class: "node-fold"
|
|
3202
3068
|
};
|
|
@@ -3205,11 +3071,10 @@ const _hoisted_3$2 = {
|
|
|
3205
3071
|
class: "node-slot ellipsis"
|
|
3206
3072
|
};
|
|
3207
3073
|
const _hoisted_4$2 = {
|
|
3208
|
-
|
|
3209
|
-
class: "snail-tree-children hidden",
|
|
3074
|
+
class: "snail-tree-children",
|
|
3210
3075
|
ref: "children"
|
|
3211
3076
|
};
|
|
3212
|
-
var _sfc_main$
|
|
3077
|
+
var _sfc_main$7 = defineComponent({
|
|
3213
3078
|
...{
|
|
3214
3079
|
name: "TreeNode",
|
|
3215
3080
|
inheritAttrs: true
|
|
@@ -3234,10 +3099,6 @@ var _sfc_main$5 = defineComponent({
|
|
|
3234
3099
|
const {
|
|
3235
3100
|
transition
|
|
3236
3101
|
} = useAnimation();
|
|
3237
|
-
const {
|
|
3238
|
-
watcher
|
|
3239
|
-
} = useReactive();
|
|
3240
|
-
const treeNodeDom = useTemplateRef("tree-node");
|
|
3241
3102
|
const isHoveredRef = shallowRef(false);
|
|
3242
3103
|
const showRef = computed(() => __props.context.isShow(__props.node, true));
|
|
3243
3104
|
const showChildrenRef = computed(() => __props.context.isShowChildren(__props.node, true));
|
|
@@ -3294,28 +3155,22 @@ var _sfc_main$5 = defineComponent({
|
|
|
3294
3155
|
parents = __props.parent ? [__props.parent, ...parents] : parents;
|
|
3295
3156
|
emits("click", child, parents);
|
|
3296
3157
|
}
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
newValue && treeNodeDom.value.classList.add("hovered");
|
|
3300
|
-
});
|
|
3301
|
-
watcher(() => __props.context.isActived(__props.node), newValue => {
|
|
3302
|
-
if (treeNodeDom.value) {
|
|
3303
|
-
treeNodeDom.value.classList.remove("actived");
|
|
3304
|
-
newValue && treeNodeDom.value.classList.add("actived");
|
|
3305
|
-
}
|
|
3306
|
-
});
|
|
3307
|
-
onMounted(() => {
|
|
3158
|
+
onMounted(async () => {
|
|
3159
|
+
await nextTick();
|
|
3308
3160
|
if (childrenDom.value) {
|
|
3309
3161
|
__props.options.expandLevel != void 0 && __props.options.expandLevel < nextLevel && toggleFold();
|
|
3310
|
-
childrenDom.value && childrenDom.value.classList.remove("hidden");
|
|
3311
3162
|
nodeEmitsDisabled = false;
|
|
3312
3163
|
}
|
|
3313
3164
|
});
|
|
3165
|
+
onActivated(() => {});
|
|
3314
3166
|
return (_ctx, _cache) => {
|
|
3315
3167
|
const _component_TreeNode = resolveComponent("TreeNode", true);
|
|
3316
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
3317
|
-
|
|
3318
|
-
|
|
3168
|
+
return openBlock(), createElementBlock(Fragment, null, [withDirectives(createElementVNode("div", {
|
|
3169
|
+
class: normalizeClass(["snail-tree-node", `level-${__props.level}`, {
|
|
3170
|
+
clickable: __props.node.clickable,
|
|
3171
|
+
hovered: isHoveredRef.value,
|
|
3172
|
+
actived: __props.context.isActived(__props.node)
|
|
3173
|
+
}]),
|
|
3319
3174
|
ref: "tree-node",
|
|
3320
3175
|
onMouseenter: _cache[0] || (_cache[0] = $event => isHoveredRef.value = true),
|
|
3321
3176
|
onMouseleave: _cache[1] || (_cache[1] = $event => isHoveredRef.value = false),
|
|
@@ -3325,21 +3180,24 @@ var _sfc_main$5 = defineComponent({
|
|
|
3325
3180
|
key: 0
|
|
3326
3181
|
}, unref(slotOptions)))) : (openBlock(), createElementBlock(Fragment, {
|
|
3327
3182
|
key: 1
|
|
3328
|
-
}, [_cache[
|
|
3183
|
+
}, [_cache[5] || (_cache[5] = createElementVNode("div", {
|
|
3329
3184
|
class: "indent"
|
|
3330
|
-
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3185
|
+
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$6, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$z, {
|
|
3331
3186
|
key: 0,
|
|
3332
3187
|
class: normalizeClass(statusRef.value),
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
color: "#8a8099",
|
|
3336
|
-
draw: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z",
|
|
3188
|
+
custom: "",
|
|
3189
|
+
button: "",
|
|
3337
3190
|
onClick: toggleFold
|
|
3338
|
-
},
|
|
3191
|
+
}, {
|
|
3192
|
+
default: withCtx(() => [...(_cache[4] || (_cache[4] = [createElementVNode("path", {
|
|
3193
|
+
d: "M 298.667 426.667 l 213.333 256 l 213.333 -256 Z"
|
|
3194
|
+
}, null, -1)]))]),
|
|
3195
|
+
_: 1
|
|
3196
|
+
}, 8, ["class"])) : createCommentVNode("", true)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
3339
3197
|
class: "node-text ellipsis",
|
|
3340
3198
|
title: __props.node.text,
|
|
3341
3199
|
textContent: toDisplayString(__props.node.text)
|
|
3342
|
-
}, null, 8, _hoisted_2$2), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34)
|
|
3200
|
+
}, null, 8, _hoisted_2$2), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 34), [[vShow, showRef.value]]), withDirectives(createElementVNode("div", _hoisted_4$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.node.children, child => {
|
|
3343
3201
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
3344
3202
|
key: __props.context.getKey(child),
|
|
3345
3203
|
node: child,
|
|
@@ -3354,15 +3212,15 @@ var _sfc_main$5 = defineComponent({
|
|
|
3354
3212
|
}, slotProps))]),
|
|
3355
3213
|
_: 3
|
|
3356
3214
|
}, 8, ["node", "parent", "options", "context"]);
|
|
3357
|
-
}), 128))], 512)
|
|
3215
|
+
}), 128))], 512), [[vShow, showRef.value && showChildrenRef.value]])], 64);
|
|
3358
3216
|
};
|
|
3359
3217
|
}
|
|
3360
3218
|
});
|
|
3361
3219
|
|
|
3362
|
-
const _hoisted_1$
|
|
3220
|
+
const _hoisted_1$5 = {
|
|
3363
3221
|
class: "snail-tree"
|
|
3364
3222
|
};
|
|
3365
|
-
var _sfc_main$
|
|
3223
|
+
var _sfc_main$6 = defineComponent({
|
|
3366
3224
|
...{
|
|
3367
3225
|
name: "Tree",
|
|
3368
3226
|
inheritAttrs: true
|
|
@@ -3396,15 +3254,15 @@ var _sfc_main$4 = defineComponent({
|
|
|
3396
3254
|
emits("click", node, parents);
|
|
3397
3255
|
}
|
|
3398
3256
|
return (_ctx, _cache) => {
|
|
3399
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3257
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [__props.search ? (openBlock(), createBlock(_sfc_main$t, mergeProps({
|
|
3400
3258
|
key: 0
|
|
3401
3259
|
}, __props.search, {
|
|
3402
3260
|
onSearch
|
|
3403
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3261
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$d, {
|
|
3404
3262
|
"scroll-y": true
|
|
3405
3263
|
}, {
|
|
3406
3264
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
|
|
3407
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3265
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
3408
3266
|
key: unref(context).getKey(node),
|
|
3409
3267
|
node,
|
|
3410
3268
|
parent: void 0,
|
|
@@ -3425,7 +3283,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
3425
3283
|
}
|
|
3426
3284
|
});
|
|
3427
3285
|
|
|
3428
|
-
var _sfc_main$
|
|
3286
|
+
var _sfc_main$5 = defineComponent({
|
|
3429
3287
|
__name: "wrapper",
|
|
3430
3288
|
props: {
|
|
3431
3289
|
readonly: {
|
|
@@ -3454,7 +3312,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
3454
3312
|
title: "对话框"
|
|
3455
3313
|
}, {
|
|
3456
3314
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3457
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3315
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$d, mergeProps({
|
|
3458
3316
|
class: "wrapper-body"
|
|
3459
3317
|
}, __props.content || {
|
|
3460
3318
|
scrollX: false,
|
|
@@ -3476,7 +3334,7 @@ function mount(target, options, onDestroyed) {
|
|
|
3476
3334
|
mustObject(options, "options");
|
|
3477
3335
|
target instanceof HTMLElement || throwError("target must be a HTMLElement");
|
|
3478
3336
|
target.classList.add("snail-app");
|
|
3479
|
-
const app = createApp(_sfc_main$
|
|
3337
|
+
const app = createApp(_sfc_main$p, options);
|
|
3480
3338
|
triggerAppCreated(app);
|
|
3481
3339
|
app.mount(target);
|
|
3482
3340
|
const scope = useScope().onDestroy(() => app.unmount());
|
|
@@ -3484,54 +3342,6 @@ function mount(target, options, onDestroyed) {
|
|
|
3484
3342
|
return scope;
|
|
3485
3343
|
}
|
|
3486
3344
|
|
|
3487
|
-
const MOTION = Object.freeze({
|
|
3488
|
-
"fade": {
|
|
3489
|
-
enter: "fade-in",
|
|
3490
|
-
leave: "fade-out"
|
|
3491
|
-
},
|
|
3492
|
-
"scale": {
|
|
3493
|
-
enter: "scale-in",
|
|
3494
|
-
leave: "scale-out"
|
|
3495
|
-
},
|
|
3496
|
-
"rotate": {
|
|
3497
|
-
enter: "rotate-in",
|
|
3498
|
-
leave: "rotate-out"
|
|
3499
|
-
},
|
|
3500
|
-
"top": {
|
|
3501
|
-
enter: "top-in",
|
|
3502
|
-
leave: "top-out"
|
|
3503
|
-
},
|
|
3504
|
-
"topBottom": {
|
|
3505
|
-
enter: "top-in",
|
|
3506
|
-
leave: "bottom-out"
|
|
3507
|
-
},
|
|
3508
|
-
"bottom": {
|
|
3509
|
-
enter: "bottom-in",
|
|
3510
|
-
leave: "bottom-out"
|
|
3511
|
-
},
|
|
3512
|
-
"bottomTop": {
|
|
3513
|
-
enter: "bottom-in",
|
|
3514
|
-
leave: "top-out"
|
|
3515
|
-
},
|
|
3516
|
-
"left": {
|
|
3517
|
-
enter: "left-in",
|
|
3518
|
-
leave: "left-out"
|
|
3519
|
-
},
|
|
3520
|
-
"leftRight": {
|
|
3521
|
-
enter: "left-in",
|
|
3522
|
-
leave: "right-out"
|
|
3523
|
-
},
|
|
3524
|
-
"right": {
|
|
3525
|
-
enter: "right-in",
|
|
3526
|
-
leave: "right-out"
|
|
3527
|
-
},
|
|
3528
|
-
"rightLeft": {
|
|
3529
|
-
enter: "right-in",
|
|
3530
|
-
leave: "left-out"
|
|
3531
|
-
}
|
|
3532
|
-
});
|
|
3533
|
-
for (var key in MOTION) hasOwnProperty(MOTION, key) && Object.freeze(MOTION[key]);
|
|
3534
|
-
|
|
3535
3345
|
function initStepByFormat(format) {
|
|
3536
3346
|
switch (format) {
|
|
3537
3347
|
case "yyyy":
|
|
@@ -3558,8 +3368,8 @@ function buildYearItems(year, min, max) {
|
|
|
3558
3368
|
return items;
|
|
3559
3369
|
}
|
|
3560
3370
|
function buildMonthItems(yearItem, min, max) {
|
|
3561
|
-
const minDate =
|
|
3562
|
-
const maxDate =
|
|
3371
|
+
const minDate = parseDate(formatDateValue(min, "yyyy-MM"), "min");
|
|
3372
|
+
const maxDate = parseDate(formatDateValue(max, "yyyy-MM"), "max");
|
|
3563
3373
|
const items = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
3564
3374
|
return items.map((item, index) => {
|
|
3565
3375
|
const mi = {
|
|
@@ -3569,16 +3379,19 @@ function buildMonthItems(yearItem, min, max) {
|
|
|
3569
3379
|
disabled: yearItem.disabled
|
|
3570
3380
|
};
|
|
3571
3381
|
if (mi.disabled != true) {
|
|
3572
|
-
const date =
|
|
3382
|
+
const date = getDateByValue(mi);
|
|
3573
3383
|
mi.disabled = minDate != void 0 && date < minDate || maxDate != void 0 && date > maxDate;
|
|
3574
3384
|
}
|
|
3575
3385
|
return Object.freeze(mi);
|
|
3576
3386
|
});
|
|
3577
3387
|
}
|
|
3578
3388
|
function buildDayItems(monthItem, min, max) {
|
|
3579
|
-
const minDate =
|
|
3580
|
-
const maxDate =
|
|
3581
|
-
const date =
|
|
3389
|
+
const minDate = parseDate(formatDateValue(min, "yyyy-MM-dd"), "min");
|
|
3390
|
+
const maxDate = parseDate(formatDateValue(max, "yyyy-MM-dd"), "max");
|
|
3391
|
+
const date = getDateByValue({
|
|
3392
|
+
...monthItem,
|
|
3393
|
+
day: 1
|
|
3394
|
+
});
|
|
3582
3395
|
date.setDate(date.getDate() - (date.getDay() || 7) - 1);
|
|
3583
3396
|
const items = new Array(42);
|
|
3584
3397
|
for (var index = 0; index < items.length; index++) {
|
|
@@ -3590,7 +3403,7 @@ function buildDayItems(monthItem, min, max) {
|
|
|
3590
3403
|
disabled: monthItem.disabled
|
|
3591
3404
|
};
|
|
3592
3405
|
if (item.disabled != true) {
|
|
3593
|
-
const date2 =
|
|
3406
|
+
const date2 = getDateByValue(item);
|
|
3594
3407
|
item.disabled = minDate != void 0 && date2 < minDate || maxDate != void 0 && date2 > maxDate;
|
|
3595
3408
|
}
|
|
3596
3409
|
items[index] = Object.freeze(item);
|
|
@@ -3608,9 +3421,9 @@ function buildHourItems(min, max) {
|
|
|
3608
3421
|
return items;
|
|
3609
3422
|
}
|
|
3610
3423
|
function buildMinuteItems(hourItem, min, max) {
|
|
3611
|
-
const items = new Array(60);
|
|
3612
3424
|
const minNumber = min && min.minute != void 0 ? getTimeNumber(min.hour, min.minute, 0) : void 0;
|
|
3613
3425
|
const maxNumber = max && max.minute != void 0 ? getTimeNumber(max.hour, max.minute, 0) : void 0;
|
|
3426
|
+
const items = new Array(60);
|
|
3614
3427
|
for (let index = 0; index < items.length; index++) {
|
|
3615
3428
|
const item = {
|
|
3616
3429
|
minute: index,
|
|
@@ -3644,37 +3457,8 @@ function buildSecondItems(minuteItem, min, max) {
|
|
|
3644
3457
|
}
|
|
3645
3458
|
return items;
|
|
3646
3459
|
}
|
|
3647
|
-
function getTimeNumber(hour, minute, second) {
|
|
3648
|
-
return (hour || 0) * 1e4 + (minute || 0) * 100 + (second || 0);
|
|
3649
|
-
}
|
|
3650
|
-
function isValidTime(format, time, min, max) {
|
|
3651
|
-
time = correctTimeValue(time);
|
|
3652
|
-
if (time) {
|
|
3653
|
-
min = correctTimeValue({
|
|
3654
|
-
...min
|
|
3655
|
-
});
|
|
3656
|
-
const timeNumber = getTimeNumber(time.hour, time.minute, format == "HH:mm" ? 0 : time.second);
|
|
3657
|
-
if (min != void 0) {
|
|
3658
|
-
const minNumber = getTimeNumber(min.hour, min.minute, format == "HH:mm" ? 0 : max.second);
|
|
3659
|
-
if (timeNumber < minNumber) {
|
|
3660
|
-
return false;
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
max = correctTimeValue({
|
|
3664
|
-
...max
|
|
3665
|
-
});
|
|
3666
|
-
if (max != void 0) {
|
|
3667
|
-
const maxNumber = getTimeNumber(max.hour, max.minute, format == "HH:mm" ? 0 : max.second);
|
|
3668
|
-
if (timeNumber > maxNumber) {
|
|
3669
|
-
return false;
|
|
3670
|
-
}
|
|
3671
|
-
}
|
|
3672
|
-
return true;
|
|
3673
|
-
}
|
|
3674
|
-
return false;
|
|
3675
|
-
}
|
|
3676
3460
|
|
|
3677
|
-
const _hoisted_1$
|
|
3461
|
+
const _hoisted_1$4 = {
|
|
3678
3462
|
class: "tz-item",
|
|
3679
3463
|
ref: "hour-items"
|
|
3680
3464
|
};
|
|
@@ -3690,7 +3474,7 @@ const _hoisted_5$1 = {
|
|
|
3690
3474
|
ref: "second-items"
|
|
3691
3475
|
};
|
|
3692
3476
|
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
3693
|
-
var _sfc_main$
|
|
3477
|
+
var _sfc_main$4 = defineComponent({
|
|
3694
3478
|
__name: "time-pc",
|
|
3695
3479
|
props: {
|
|
3696
3480
|
value: {},
|
|
@@ -3726,9 +3510,9 @@ var _sfc_main$2 = defineComponent({
|
|
|
3726
3510
|
const props = __props;
|
|
3727
3511
|
const emits = __emit;
|
|
3728
3512
|
const format = props.format == "HH:mm" ? "HH:mm" : "HH:mm:ss";
|
|
3729
|
-
const min = parseTimeValue(props.min);
|
|
3730
|
-
const max = parseTimeValue(props.max);
|
|
3731
|
-
const timeRef = ref(parseTimeValue(props.value) || getTimeValue(new Date()));
|
|
3513
|
+
const min = parseTimeValue(props.min, "min");
|
|
3514
|
+
const max = parseTimeValue(props.max, "max");
|
|
3515
|
+
const timeRef = ref(parseTimeValue(props.value, "min") || getTimeValue(new Date()));
|
|
3732
3516
|
const isValidTimeRef = computed(() => format == "HH:mm" ? minuteItems.value && minuteItems.value[timeRef.value.minute].disabled != true : secondItems.value && secondItems.value[timeRef.value.second].disabled != true);
|
|
3733
3517
|
const hourItems = shallowRef(buildHourItems(min, max));
|
|
3734
3518
|
const minuteItems = shallowRef();
|
|
@@ -3793,17 +3577,17 @@ var _sfc_main$2 = defineComponent({
|
|
|
3793
3577
|
}
|
|
3794
3578
|
onMounted(rebuildItems);
|
|
3795
3579
|
return (_ctx, _cache) => {
|
|
3796
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3580
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
3797
3581
|
class: normalizeClass(["time-picker pc", {
|
|
3798
3582
|
"second-disabled": unref(format) != "HH:mm:ss"
|
|
3799
3583
|
}]),
|
|
3800
3584
|
mode: "vertical"
|
|
3801
3585
|
}, createSlots({
|
|
3802
|
-
main: withCtx(() => [createVNode(_sfc_main$
|
|
3803
|
-
|
|
3804
|
-
effect:
|
|
3586
|
+
main: withCtx(() => [createVNode(_sfc_main$r, {
|
|
3587
|
+
multiple: "",
|
|
3588
|
+
effect: unref(MOTION).top
|
|
3805
3589
|
}, {
|
|
3806
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
3590
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(hourItems.value, item => {
|
|
3807
3591
|
return openBlock(), createElementBlock("div", {
|
|
3808
3592
|
class: normalizeClass(["tzi-number", {
|
|
3809
3593
|
active: item.hour == timeRef.value.hour,
|
|
@@ -3835,23 +3619,23 @@ var _sfc_main$2 = defineComponent({
|
|
|
3835
3619
|
}, null, 10, _hoisted_6$1);
|
|
3836
3620
|
}), 128))], 512)) : createCommentVNode("", true)]),
|
|
3837
3621
|
_: 1
|
|
3838
|
-
})]),
|
|
3622
|
+
}, 8, ["effect"])]),
|
|
3839
3623
|
_: 2
|
|
3840
3624
|
}, [__props.toolbarDisabled != true ? {
|
|
3841
3625
|
name: "bottom",
|
|
3842
|
-
fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3626
|
+
fn: withCtx(() => [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
3843
3627
|
key: 0,
|
|
3844
3628
|
type: "link",
|
|
3845
3629
|
size: "small",
|
|
3846
3630
|
textContent: "清空",
|
|
3847
3631
|
onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), __props.inPopup && __props.closePopup("")))
|
|
3848
|
-
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3632
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
3849
3633
|
key: 1,
|
|
3850
3634
|
type: "link",
|
|
3851
3635
|
size: "small",
|
|
3852
3636
|
textContent: "现在",
|
|
3853
3637
|
onClick: _cache[1] || (_cache[1] = $event => rebuildItems(unref(getTimeValue)(new Date())))
|
|
3854
|
-
})) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3638
|
+
})) : createCommentVNode("", true), createVNode(_sfc_main$A, {
|
|
3855
3639
|
type: "link",
|
|
3856
3640
|
size: "small",
|
|
3857
3641
|
textContent: "确定",
|
|
@@ -3866,7 +3650,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
3866
3650
|
}
|
|
3867
3651
|
});
|
|
3868
3652
|
|
|
3869
|
-
const _hoisted_1$
|
|
3653
|
+
const _hoisted_1$3 = ["textContent"];
|
|
3870
3654
|
const _hoisted_2 = ["textContent"];
|
|
3871
3655
|
const _hoisted_3 = ["textContent"];
|
|
3872
3656
|
const _hoisted_4 = ["textContent", "onClick"];
|
|
@@ -3874,7 +3658,7 @@ const _hoisted_5 = ["textContent", "onClick"];
|
|
|
3874
3658
|
const _hoisted_6 = ["textContent"];
|
|
3875
3659
|
const _hoisted_7 = ["textContent", "onClick"];
|
|
3876
3660
|
const _hoisted_8 = ["textContent"];
|
|
3877
|
-
var _sfc_main$
|
|
3661
|
+
var _sfc_main$3 = defineComponent({
|
|
3878
3662
|
__name: "date-pc",
|
|
3879
3663
|
props: {
|
|
3880
3664
|
value: {},
|
|
@@ -3914,18 +3698,18 @@ var _sfc_main$1 = defineComponent({
|
|
|
3914
3698
|
const {
|
|
3915
3699
|
inPopup
|
|
3916
3700
|
} = props;
|
|
3917
|
-
const dateRef = ref(parseDateValue(props.value));
|
|
3701
|
+
const dateRef = ref(parseDateValue(props.value, "min"));
|
|
3918
3702
|
const format = correctDateFormat(props.format, "yyyy-MM-dd");
|
|
3919
|
-
const min = Object.freeze(parseDateValue(props.min));
|
|
3920
|
-
const max = Object.freeze(parseDateValue(props.max));
|
|
3703
|
+
const min = Object.freeze(parseDateValue(props.min, "min"));
|
|
3704
|
+
const max = Object.freeze(parseDateValue(props.max, "max"));
|
|
3921
3705
|
const endStep = initStepByFormat(format);
|
|
3922
3706
|
const stepRef = shallowRef(endStep);
|
|
3923
3707
|
const yearItems = shallowRef();
|
|
3924
3708
|
const monthItems = shallowRef();
|
|
3925
3709
|
const dayItemsRef = shallowRef([]);
|
|
3926
3710
|
const isValidDateRef = computed(validateDate);
|
|
3927
|
-
const minPickTime = Object.freeze(parseTimeValue(props.minPickTime));
|
|
3928
|
-
const maxPickTime = Object.freeze(parseTimeValue(props.maxPickTime));
|
|
3711
|
+
const minPickTime = Object.freeze(parseTimeValue(props.minPickTime, "min"));
|
|
3712
|
+
const maxPickTime = Object.freeze(parseTimeValue(props.maxPickTime, "max"));
|
|
3929
3713
|
const timeFormat = format == "yyyy-MM-dd HH:mm" ? "HH:mm" : format == "yyyy-MM-dd HH:mm:ss" ? "HH:mm:ss" : void 0;
|
|
3930
3714
|
const timeAreaDom = timeFormat ? useTemplateRef("time-area") : void 0;
|
|
3931
3715
|
function validateDate() {
|
|
@@ -3985,7 +3769,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
3985
3769
|
}
|
|
3986
3770
|
case "day":
|
|
3987
3771
|
{
|
|
3988
|
-
const date =
|
|
3772
|
+
const date = getDateByValue(dateRef.value);
|
|
3989
3773
|
date.setMonth(date.getMonth() + basis);
|
|
3990
3774
|
dateRef.value.year = date.getFullYear();
|
|
3991
3775
|
dateRef.value.month = date.getMonth() + 1;
|
|
@@ -4050,30 +3834,33 @@ var _sfc_main$1 = defineComponent({
|
|
|
4050
3834
|
}
|
|
4051
3835
|
}
|
|
4052
3836
|
async function onSelectTime() {
|
|
4053
|
-
if (props.picker
|
|
4054
|
-
|
|
3837
|
+
if (props.picker != void 0 && timeAreaDom.value != void 0 && props.pinned.value != true) {
|
|
3838
|
+
props.pinned.value = true;
|
|
3839
|
+
const task = props.picker.showTime(timeAreaDom.value, {
|
|
3840
|
+
format: timeFormat,
|
|
3841
|
+
value: formatTimeValue(dateRef.value, timeFormat),
|
|
3842
|
+
min: props.minPickTime,
|
|
3843
|
+
max: props.minPickTime,
|
|
3844
|
+
nowDisabled: props.nowDisabled,
|
|
3845
|
+
clearDisabled: props.clearDisabled,
|
|
3846
|
+
toolbarDisabled: props.toolbarDisabled
|
|
3847
|
+
}, {
|
|
3848
|
+
followX: "start",
|
|
3849
|
+
followY: "before",
|
|
3850
|
+
spaceX: -2,
|
|
3851
|
+
spaceY: 4
|
|
3852
|
+
});
|
|
3853
|
+
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
3854
|
+
if (text != void 0) {
|
|
3855
|
+
const time = parseTimeValue(text, "min") || Object.create(null);
|
|
3856
|
+
dateRef.value.hour = time.hour;
|
|
3857
|
+
dateRef.value.minute = time.minute;
|
|
3858
|
+
dateRef.value.second = time.second;
|
|
3859
|
+
}
|
|
3860
|
+
}, reason => {
|
|
3861
|
+
console.error(reason);
|
|
3862
|
+
});
|
|
4055
3863
|
}
|
|
4056
|
-
props.pinned.value = true;
|
|
4057
|
-
const task = props.picker.showTime(timeAreaDom.value, {
|
|
4058
|
-
format: timeFormat,
|
|
4059
|
-
value: formatTimeValue(dateRef.value, timeFormat),
|
|
4060
|
-
min: props.minPickTime,
|
|
4061
|
-
max: props.minPickTime,
|
|
4062
|
-
followX: "start",
|
|
4063
|
-
followY: "before",
|
|
4064
|
-
spaceX: -2,
|
|
4065
|
-
spaceY: 4
|
|
4066
|
-
});
|
|
4067
|
-
task.finally(() => setTimeout(() => props.pinned.value = false)).then(text => {
|
|
4068
|
-
if (text != void 0) {
|
|
4069
|
-
const time = parseTimeValue(text) || Object.create(null);
|
|
4070
|
-
dateRef.value.hour = time.hour;
|
|
4071
|
-
dateRef.value.minute = time.minute;
|
|
4072
|
-
dateRef.value.second = time.second;
|
|
4073
|
-
}
|
|
4074
|
-
}, reason => {
|
|
4075
|
-
console.error(reason);
|
|
4076
|
-
});
|
|
4077
3864
|
}
|
|
4078
3865
|
function onNow() {
|
|
4079
3866
|
stepRef.value = initStepByFormat(format);
|
|
@@ -4090,7 +3877,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4090
3877
|
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
4091
3878
|
buildPickerItems(stepRef.value, 0);
|
|
4092
3879
|
return (_ctx, _cache) => {
|
|
4093
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3880
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
4094
3881
|
class: normalizeClass(["date-picker pc", {
|
|
4095
3882
|
"time-now": __props.pinned && __props.pinned.value == true
|
|
4096
3883
|
}]),
|
|
@@ -4102,8 +3889,9 @@ var _sfc_main$1 = defineComponent({
|
|
|
4102
3889
|
height: "30px"
|
|
4103
3890
|
}
|
|
4104
3891
|
}, createSlots({
|
|
4105
|
-
top: withCtx(() => [createVNode(_sfc_main$
|
|
3892
|
+
top: withCtx(() => [createVNode(_sfc_main$z, {
|
|
4106
3893
|
type: "arrow",
|
|
3894
|
+
button: "",
|
|
4107
3895
|
rotate: 180,
|
|
4108
3896
|
size: 26,
|
|
4109
3897
|
onClick: _cache[0] || (_cache[0] = $event => buildPickerItems(stepRef.value, -1))
|
|
@@ -4112,7 +3900,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
4112
3900
|
}, [stepRef.value == "year" ? (openBlock(), createElementBlock("div", {
|
|
4113
3901
|
key: 0,
|
|
4114
3902
|
textContent: toDisplayString(`${yearItems.value[0].year}年 - ${unref(getFromArray)(yearItems.value, -1).year}年`)
|
|
4115
|
-
}, null, 8, _hoisted_1$
|
|
3903
|
+
}, null, 8, _hoisted_1$3)) : (openBlock(), createElementBlock(Fragment, {
|
|
4116
3904
|
key: 1
|
|
4117
3905
|
}, [createElementVNode("div", {
|
|
4118
3906
|
textContent: toDisplayString(`${dateRef.value.year}年`),
|
|
@@ -4121,8 +3909,9 @@ var _sfc_main$1 = defineComponent({
|
|
|
4121
3909
|
key: 0,
|
|
4122
3910
|
textContent: toDisplayString(`${dateRef.value.month}月`),
|
|
4123
3911
|
onClick: _cache[2] || (_cache[2] = $event => onSwitchStepClick("month"))
|
|
4124
|
-
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$
|
|
3912
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("", true)], 64))], 2), createVNode(_sfc_main$z, {
|
|
4125
3913
|
type: "arrow",
|
|
3914
|
+
button: "",
|
|
4126
3915
|
size: 26,
|
|
4127
3916
|
onClick: _cache[3] || (_cache[3] = $event => buildPickerItems(stepRef.value, 1))
|
|
4128
3917
|
})]),
|
|
@@ -4186,19 +3975,19 @@ var _sfc_main$1 = defineComponent({
|
|
|
4186
3975
|
onClick: onSelectTime
|
|
4187
3976
|
}, null, 10, _hoisted_8)) : createCommentVNode("", true), __props.toolbarDisabled != true ? (openBlock(), createElementBlock(Fragment, {
|
|
4188
3977
|
key: 1
|
|
4189
|
-
}, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3978
|
+
}, [__props.clearDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
4190
3979
|
key: 0,
|
|
4191
3980
|
type: "link",
|
|
4192
3981
|
size: "small",
|
|
4193
3982
|
textContent: "清空",
|
|
4194
3983
|
onClick: _cache[4] || (_cache[4] = $event => (emits("clear"), unref(inPopup) && __props.closePopup("")))
|
|
4195
|
-
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
3984
|
+
})) : createCommentVNode("", true), __props.nowDisabled != true ? (openBlock(), createBlock(_sfc_main$A, {
|
|
4196
3985
|
key: 1,
|
|
4197
3986
|
type: "link",
|
|
4198
3987
|
size: "small",
|
|
4199
3988
|
textContent: "现在",
|
|
4200
3989
|
onClick: onNow
|
|
4201
|
-
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3990
|
+
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_sfc_main$A, {
|
|
4202
3991
|
type: "link",
|
|
4203
3992
|
size: "small",
|
|
4204
3993
|
textContent: "确定",
|
|
@@ -4215,40 +4004,32 @@ var _sfc_main$1 = defineComponent({
|
|
|
4215
4004
|
|
|
4216
4005
|
function usePicker() {
|
|
4217
4006
|
const popup = usePopup();
|
|
4218
|
-
function showDate(target, options) {
|
|
4007
|
+
function showDate(target, options, popupOptions) {
|
|
4219
4008
|
options = {
|
|
4220
4009
|
...options
|
|
4221
4010
|
};
|
|
4222
|
-
return showPicker(target, _sfc_main$
|
|
4011
|
+
return showPicker(target, _sfc_main$3, options, popupOptions);
|
|
4223
4012
|
}
|
|
4224
|
-
function showTime(target, options) {
|
|
4013
|
+
function showTime(target, options, popupOptions) {
|
|
4225
4014
|
options = {
|
|
4226
4015
|
...options
|
|
4227
4016
|
};
|
|
4228
|
-
return showPicker(target, _sfc_main$
|
|
4017
|
+
return showPicker(target, _sfc_main$4, options, popupOptions);
|
|
4229
4018
|
}
|
|
4230
|
-
function showPicker(target, component, options) {
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
popupOptions.
|
|
4236
|
-
popupOptions.
|
|
4237
|
-
popupOptions.
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
delete options.spaceX;
|
|
4241
|
-
delete options.spaceY;
|
|
4242
|
-
delete options.spaceClient;
|
|
4019
|
+
function showPicker(target, component, options, popupOptions) {
|
|
4020
|
+
{
|
|
4021
|
+
popupOptions = {
|
|
4022
|
+
...popupOptions
|
|
4023
|
+
};
|
|
4024
|
+
popupOptions.followX = popupOptions.followX || ["start", "end", "center"];
|
|
4025
|
+
popupOptions.spaceX = correctNumber(popupOptions.spaceX, 2);
|
|
4026
|
+
popupOptions.spaceY = correctNumber(popupOptions.spaceY, 2);
|
|
4027
|
+
popupOptions.spaceClient = correctNumber(popupOptions.spaceClient, 10);
|
|
4028
|
+
popupOptions.closeOnMask = popupOptions.closeOnMask == void 0 ? true : popupOptions.closeOnMask;
|
|
4243
4029
|
}
|
|
4244
4030
|
return popup.follow(target, {
|
|
4031
|
+
...popupOptions,
|
|
4245
4032
|
component,
|
|
4246
|
-
followX: popupOptions.followX || "center",
|
|
4247
|
-
followY: popupOptions.followY,
|
|
4248
|
-
spaceX: correctNumber(popupOptions.spaceX, 2),
|
|
4249
|
-
spaceY: correctNumber(popupOptions.spaceY, 2),
|
|
4250
|
-
spaceClient: correctNumber(popupOptions.spaceClient, 10),
|
|
4251
|
-
closeOnMask: true,
|
|
4252
4033
|
props: {
|
|
4253
4034
|
...options,
|
|
4254
4035
|
picker: manager,
|
|
@@ -4264,6 +4045,180 @@ function usePicker() {
|
|
|
4264
4045
|
return manager;
|
|
4265
4046
|
}
|
|
4266
4047
|
|
|
4048
|
+
const _hoisted_1$2 = ["title"];
|
|
4049
|
+
var _sfc_main$2 = defineComponent({
|
|
4050
|
+
__name: "date-picker",
|
|
4051
|
+
props: {
|
|
4052
|
+
readonly: {
|
|
4053
|
+
type: Boolean
|
|
4054
|
+
},
|
|
4055
|
+
value: {},
|
|
4056
|
+
format: {},
|
|
4057
|
+
min: {},
|
|
4058
|
+
max: {},
|
|
4059
|
+
minPickTime: {},
|
|
4060
|
+
maxPickTime: {},
|
|
4061
|
+
toolbarDisabled: {
|
|
4062
|
+
type: Boolean
|
|
4063
|
+
},
|
|
4064
|
+
nowDisabled: {
|
|
4065
|
+
type: Boolean
|
|
4066
|
+
},
|
|
4067
|
+
clearDisabled: {
|
|
4068
|
+
type: Boolean
|
|
4069
|
+
}
|
|
4070
|
+
},
|
|
4071
|
+
emits: ["change"],
|
|
4072
|
+
setup(__props, _ref) {
|
|
4073
|
+
let {
|
|
4074
|
+
emit: __emit
|
|
4075
|
+
} = _ref;
|
|
4076
|
+
const props = __props;
|
|
4077
|
+
const emits = __emit;
|
|
4078
|
+
const pickerDom = useTemplateRef("datepicker");
|
|
4079
|
+
const {
|
|
4080
|
+
showDate
|
|
4081
|
+
} = usePicker();
|
|
4082
|
+
const {
|
|
4083
|
+
watcher
|
|
4084
|
+
} = useReactive();
|
|
4085
|
+
const valueRef = shallowRef();
|
|
4086
|
+
let pickerScope;
|
|
4087
|
+
function resetDateValue(value) {
|
|
4088
|
+
const dateValue = parseDateValue(value, "min");
|
|
4089
|
+
valueRef.value = formatDateValue(dateValue, props.format);
|
|
4090
|
+
}
|
|
4091
|
+
async function showPicker(evt) {
|
|
4092
|
+
if (props.readonly != true && pickerScope == void 0) {
|
|
4093
|
+
pickerScope = showDate(pickerDom.value, {
|
|
4094
|
+
...props,
|
|
4095
|
+
value: valueRef.value
|
|
4096
|
+
}, {
|
|
4097
|
+
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4098
|
+
closeOnTarget: true
|
|
4099
|
+
});
|
|
4100
|
+
const dateText = await pickerScope;
|
|
4101
|
+
pickerScope = void 0;
|
|
4102
|
+
if (dateText !== void 0 && dateText != valueRef.value) {
|
|
4103
|
+
const oldText = valueRef.value;
|
|
4104
|
+
valueRef.value = dateText;
|
|
4105
|
+
emits("change", dateText, oldText);
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
}
|
|
4109
|
+
isStringNotEmpty(props.value) && resetDateValue(props.value);
|
|
4110
|
+
watcher(() => props.value, newValue => newValue !== valueRef.value && resetDateValue(newValue));
|
|
4111
|
+
return (_ctx, _cache) => {
|
|
4112
|
+
return openBlock(), createElementBlock("div", {
|
|
4113
|
+
class: normalizeClass(["snail-datepicker", {
|
|
4114
|
+
readonly: __props.readonly
|
|
4115
|
+
}]),
|
|
4116
|
+
ref: "datepicker",
|
|
4117
|
+
title: valueRef.value,
|
|
4118
|
+
onClick: showPicker
|
|
4119
|
+
}, [withDirectives(createElementVNode("input", {
|
|
4120
|
+
class: "wh-fill",
|
|
4121
|
+
type: "text",
|
|
4122
|
+
readonly: "",
|
|
4123
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4124
|
+
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
4125
|
+
key: 0,
|
|
4126
|
+
type: "datepicker",
|
|
4127
|
+
button: "",
|
|
4128
|
+
size: 16,
|
|
4129
|
+
color: "#aeb6c2",
|
|
4130
|
+
"hover-color": "#279bf1"
|
|
4131
|
+
})) : createCommentVNode("", true)], 10, _hoisted_1$2);
|
|
4132
|
+
};
|
|
4133
|
+
}
|
|
4134
|
+
});
|
|
4135
|
+
|
|
4136
|
+
const _hoisted_1$1 = ["title"];
|
|
4137
|
+
var _sfc_main$1 = defineComponent({
|
|
4138
|
+
__name: "time-picker",
|
|
4139
|
+
props: {
|
|
4140
|
+
readonly: {
|
|
4141
|
+
type: Boolean
|
|
4142
|
+
},
|
|
4143
|
+
value: {},
|
|
4144
|
+
format: {},
|
|
4145
|
+
min: {},
|
|
4146
|
+
max: {},
|
|
4147
|
+
toolbarDisabled: {
|
|
4148
|
+
type: Boolean
|
|
4149
|
+
},
|
|
4150
|
+
nowDisabled: {
|
|
4151
|
+
type: Boolean
|
|
4152
|
+
},
|
|
4153
|
+
clearDisabled: {
|
|
4154
|
+
type: Boolean
|
|
4155
|
+
}
|
|
4156
|
+
},
|
|
4157
|
+
emits: ["change"],
|
|
4158
|
+
setup(__props, _ref) {
|
|
4159
|
+
let {
|
|
4160
|
+
emit: __emit
|
|
4161
|
+
} = _ref;
|
|
4162
|
+
const props = __props;
|
|
4163
|
+
const emits = __emit;
|
|
4164
|
+
const pickerDom = useTemplateRef("timepicker");
|
|
4165
|
+
const {
|
|
4166
|
+
showTime
|
|
4167
|
+
} = usePicker();
|
|
4168
|
+
const {
|
|
4169
|
+
watcher
|
|
4170
|
+
} = useReactive();
|
|
4171
|
+
const valueRef = shallowRef();
|
|
4172
|
+
let pickerScope;
|
|
4173
|
+
function resetTimeValue(value) {
|
|
4174
|
+
const timeValue = parseTimeValue(value, "min");
|
|
4175
|
+
valueRef.value = formatTimeValue(timeValue, props.format);
|
|
4176
|
+
}
|
|
4177
|
+
async function showPicker(evt) {
|
|
4178
|
+
if (props.readonly != true && pickerScope == void 0) {
|
|
4179
|
+
pickerScope = showTime(pickerDom.value, {
|
|
4180
|
+
...props,
|
|
4181
|
+
value: valueRef.value
|
|
4182
|
+
}, {
|
|
4183
|
+
followX: evt.target.tagName == "svg" ? ["end"] : void 0,
|
|
4184
|
+
closeOnTarget: true
|
|
4185
|
+
});
|
|
4186
|
+
const timeText = await pickerScope;
|
|
4187
|
+
pickerScope = void 0;
|
|
4188
|
+
if (timeText !== void 0 && timeText != valueRef.value) {
|
|
4189
|
+
const oldText = valueRef.value;
|
|
4190
|
+
valueRef.value = timeText;
|
|
4191
|
+
emits("change", timeText, oldText);
|
|
4192
|
+
}
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
isStringNotEmpty(props.value) && resetTimeValue(props.value);
|
|
4196
|
+
watcher(() => props.value, newValue => newValue !== valueRef.value && resetTimeValue(newValue));
|
|
4197
|
+
return (_ctx, _cache) => {
|
|
4198
|
+
return openBlock(), createElementBlock("div", {
|
|
4199
|
+
class: normalizeClass(["snail-timepicker", {
|
|
4200
|
+
readonly: __props.readonly
|
|
4201
|
+
}]),
|
|
4202
|
+
ref: "timepicker",
|
|
4203
|
+
title: valueRef.value,
|
|
4204
|
+
onClick: showPicker
|
|
4205
|
+
}, [withDirectives(createElementVNode("input", {
|
|
4206
|
+
class: "wh-fill",
|
|
4207
|
+
type: "text",
|
|
4208
|
+
readonly: "",
|
|
4209
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => valueRef.value = $event)
|
|
4210
|
+
}, null, 512), [[vModelText, valueRef.value]]), __props.readonly != true ? (openBlock(), createBlock(_sfc_main$z, {
|
|
4211
|
+
key: 0,
|
|
4212
|
+
type: "timepicker",
|
|
4213
|
+
button: "",
|
|
4214
|
+
size: 20,
|
|
4215
|
+
color: "#aeb6c2",
|
|
4216
|
+
"hover-color": "#279bf1"
|
|
4217
|
+
})) : createCommentVNode("", true)], 10, _hoisted_1$1);
|
|
4218
|
+
};
|
|
4219
|
+
}
|
|
4220
|
+
});
|
|
4221
|
+
|
|
4267
4222
|
const _hoisted_1 = ["textContent"];
|
|
4268
4223
|
var _sfc_main = defineComponent({
|
|
4269
4224
|
...{
|
|
@@ -4293,7 +4248,6 @@ var _sfc_main = defineComponent({
|
|
|
4293
4248
|
endX: 0,
|
|
4294
4249
|
distance: 0
|
|
4295
4250
|
});
|
|
4296
|
-
const towArrowIcon = getTwoArrowIconDraw();
|
|
4297
4251
|
function getMaxDistance() {
|
|
4298
4252
|
return dragHandleDom.value.parentElement.getBoundingClientRect().width - dragHandleDom.value.getBoundingClientRect().width;
|
|
4299
4253
|
}
|
|
@@ -4349,55 +4303,61 @@ var _sfc_main = defineComponent({
|
|
|
4349
4303
|
onTouchstart: onStartDrag,
|
|
4350
4304
|
onTouchmove: onDragMove,
|
|
4351
4305
|
onTouchend: onDragEnd
|
|
4352
|
-
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$
|
|
4306
|
+
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$z, {
|
|
4353
4307
|
key: 0,
|
|
4354
4308
|
type: "success",
|
|
4355
4309
|
size: 20,
|
|
4356
4310
|
color: "white"
|
|
4357
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
4311
|
+
})) : (openBlock(), createBlock(_sfc_main$z, {
|
|
4358
4312
|
key: 1,
|
|
4359
|
-
|
|
4313
|
+
custom: "",
|
|
4360
4314
|
size: 20,
|
|
4361
|
-
color: "#
|
|
4362
|
-
|
|
4363
|
-
|
|
4315
|
+
color: "#948d8d",
|
|
4316
|
+
style: {
|
|
4317
|
+
"cursor": "move"
|
|
4318
|
+
}
|
|
4319
|
+
}, {
|
|
4320
|
+
default: withCtx(() => [...(_cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
4321
|
+
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"
|
|
4322
|
+
}, null, -1)]))]),
|
|
4323
|
+
_: 1
|
|
4324
|
+
}))], 36)], 2);
|
|
4364
4325
|
};
|
|
4365
4326
|
}
|
|
4366
4327
|
});
|
|
4367
4328
|
|
|
4368
4329
|
const components = {
|
|
4369
|
-
Button: _sfc_main$
|
|
4370
|
-
Choose: _sfc_main$
|
|
4371
|
-
DatePicker: _sfc_main$y,
|
|
4330
|
+
Button: _sfc_main$A,
|
|
4331
|
+
Choose: _sfc_main$y,
|
|
4372
4332
|
Footer: _sfc_main$x,
|
|
4373
4333
|
Header: _sfc_main$w,
|
|
4374
|
-
Icon: _sfc_main$
|
|
4334
|
+
Icon: _sfc_main$z,
|
|
4375
4335
|
Input: _sfc_main$v,
|
|
4376
4336
|
Number: _sfc_main$u,
|
|
4377
4337
|
Search: _sfc_main$t,
|
|
4378
|
-
Select: _sfc_main$
|
|
4379
|
-
Switch: _sfc_main$
|
|
4380
|
-
Textarea: _sfc_main$
|
|
4381
|
-
Dynamic: _sfc_main$
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4338
|
+
Select: _sfc_main$h,
|
|
4339
|
+
Switch: _sfc_main$g,
|
|
4340
|
+
Textarea: _sfc_main$f,
|
|
4341
|
+
Dynamic: _sfc_main$p,
|
|
4342
|
+
Fold: _sfc_main$e,
|
|
4343
|
+
Motion: _sfc_main$r,
|
|
4344
|
+
Layout: _sfc_main$c,
|
|
4345
|
+
Scroll: _sfc_main$d,
|
|
4346
|
+
Sort: _sfc_main$b,
|
|
4347
|
+
Table: _sfc_main$a,
|
|
4348
|
+
TableRow: _sfc_main$9,
|
|
4349
|
+
TableCol: _sfc_main$8,
|
|
4350
|
+
Tree: _sfc_main$6,
|
|
4351
|
+
Wrapper: _sfc_main$5,
|
|
4352
|
+
DatePicker: _sfc_main$2,
|
|
4353
|
+
TimePicker: _sfc_main$1,
|
|
4394
4354
|
DragVerify: _sfc_main,
|
|
4395
|
-
Empty: _sfc_main$
|
|
4396
|
-
Loading: _sfc_main$
|
|
4355
|
+
Empty: _sfc_main$k,
|
|
4356
|
+
Loading: _sfc_main$q
|
|
4397
4357
|
};
|
|
4398
4358
|
|
|
4399
4359
|
onMountScope(scope => {
|
|
4400
4360
|
getCurrentScope() && onScopeDispose(scope.destroy);
|
|
4401
4361
|
});
|
|
4402
4362
|
|
|
4403
|
-
export { MOTION, components,
|
|
4363
|
+
export { MOTION, components, getBuiltinIcon, mount, onAppCreated, triggerAppCreated, usePicker, usePopup, useReactive, useTreeContext };
|