@varlet/ui 2.15.0 → 2.15.2-alpha.1693502641730
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/es/card/Card.mjs +2 -1
- package/es/col/col.css +1 -1
- package/es/collapse-item/CollapseItem.mjs +43 -35
- package/es/countdown/Countdown.mjs +1 -2
- package/es/date-picker/DatePicker.mjs +13 -8
- package/es/drag/Drag.mjs +2 -2
- package/es/field-decorator/FieldDecorator.mjs +2 -3
- package/es/index-bar/IndexBar.mjs +4 -5
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/lazy/index.mjs +2 -2
- package/es/list/List.mjs +2 -2
- package/es/loading-bar/LoadingBar.mjs +1 -1
- package/es/locale/index.mjs +1 -1
- package/es/menu/usePopover.mjs +2 -1
- package/es/option/Option.mjs +2 -2
- package/es/pull-refresh/PullRefresh.mjs +2 -2
- package/es/result/Result.mjs +5 -5
- package/es/ripple/index.mjs +1 -1
- package/es/slider/Slider.mjs +4 -4
- package/es/snackbar/Snackbar.mjs +1 -1
- package/es/step/Step.mjs +1 -1
- package/es/sticky/Sticky.mjs +2 -2
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +73 -59
- package/es/table/table.css +1 -1
- package/es/tabs/Tabs.mjs +2 -2
- package/es/tabs-items/TabsItems.mjs +1 -1
- package/es/time-picker/TimePicker.mjs +2 -3
- package/es/time-picker/clock.mjs +2 -3
- package/es/utils/elements.mjs +1 -71
- package/es/utils/shared.mjs +0 -5
- package/es/utils/test.mjs +1 -2
- package/es/varlet.esm.js +4009 -3988
- package/es/watermark/Watermark.mjs +1 -1
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +497 -453
- package/package.json +6 -6
- package/umd/varlet.js +5 -5
package/lib/varlet.cjs.js
CHANGED
|
@@ -23,6 +23,7 @@ const isURL = (val) => {
|
|
|
23
23
|
};
|
|
24
24
|
const isEmpty = (val) => val === void 0 || val === null || val === "" || Array.isArray(val) && !val.length;
|
|
25
25
|
const isWindow = (val) => val === window;
|
|
26
|
+
const supportTouch = () => inBrowser() && "ontouchstart" in window;
|
|
26
27
|
const toNumber = (val) => {
|
|
27
28
|
if (val == null)
|
|
28
29
|
return 0;
|
|
@@ -86,92 +87,37 @@ const find = (arr, callback, from = "start") => {
|
|
|
86
87
|
const normalizeToArray = (value) => isArray(value) ? value : [value];
|
|
87
88
|
const clamp$1 = (num, min2, max2) => Math.min(max2, Math.max(min2, num));
|
|
88
89
|
const clampArrayRange = (index, arr) => clamp$1(index, 0, arr.length - 1);
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
return val.startsWith("data:image") || /\.(png|jpg|gif|jpeg|svg|webp)$/.test(val);
|
|
94
|
-
};
|
|
95
|
-
var isHTMLSupportVideo = (val) => {
|
|
96
|
-
if (val == null) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
return val.startsWith("data:video") || /\.(mp4|webm|ogg)$/.test(val);
|
|
100
|
-
};
|
|
101
|
-
var createCache = (max2) => {
|
|
102
|
-
var cache = [];
|
|
103
|
-
return {
|
|
104
|
-
cache,
|
|
105
|
-
has(key) {
|
|
106
|
-
return this.cache.includes(key);
|
|
107
|
-
},
|
|
108
|
-
add(key) {
|
|
109
|
-
if (this.has(key)) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.cache.length === max2 && cache.shift();
|
|
113
|
-
this.cache.push(key);
|
|
114
|
-
},
|
|
115
|
-
remove(key) {
|
|
116
|
-
this.has(key) && removeItem(this.cache, key);
|
|
117
|
-
},
|
|
118
|
-
clear() {
|
|
119
|
-
this.cache.length = 0;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
var linear = (value) => value;
|
|
124
|
-
var cubic = (value) => Math.pow(value, 3);
|
|
125
|
-
var easeInOutCubic = (value) => value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2;
|
|
126
|
-
var dt = (value, defaultText) => value == null ? defaultText : value;
|
|
127
|
-
var getGlobalThis = () => {
|
|
128
|
-
if (typeof globalThis !== "undefined")
|
|
90
|
+
const getGlobalThis = () => {
|
|
91
|
+
if (typeof globalThis !== "undefined") {
|
|
129
92
|
return globalThis;
|
|
130
|
-
|
|
93
|
+
}
|
|
94
|
+
if (inBrowser()) {
|
|
131
95
|
return window;
|
|
96
|
+
}
|
|
132
97
|
return typeof global !== "undefined" ? global : self;
|
|
133
98
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
if (fillString === void 0) {
|
|
139
|
-
fillString = "";
|
|
140
|
-
}
|
|
141
|
-
if (str.length >= maxLength)
|
|
142
|
-
return str;
|
|
143
|
-
var len = maxLength - str.length;
|
|
144
|
-
var repeatCount = Math.floor(len / fillString.length);
|
|
145
|
-
return fillString.repeat(repeatCount) + fillString.slice(0, len % fillString.length) + str;
|
|
99
|
+
const requestAnimationFrame$1 = (fn2) => {
|
|
100
|
+
const globalThis2 = getGlobalThis();
|
|
101
|
+
return globalThis2.requestAnimationFrame ? globalThis2.requestAnimationFrame(fn2) : globalThis2.setTimeout(fn2);
|
|
146
102
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return target;
|
|
164
|
-
};
|
|
165
|
-
return _extends$r.apply(this, arguments);
|
|
166
|
-
}
|
|
167
|
-
function getStyle$1(element) {
|
|
168
|
-
return window.getComputedStyle(element);
|
|
169
|
-
}
|
|
170
|
-
function getRect(element) {
|
|
103
|
+
const cancelAnimationFrame = (handle) => {
|
|
104
|
+
const globalThis2 = getGlobalThis();
|
|
105
|
+
globalThis2.cancelAnimationFrame ? globalThis2.cancelAnimationFrame(handle) : globalThis2.clearTimeout(handle);
|
|
106
|
+
};
|
|
107
|
+
const raf = () => new Promise((resolve) => {
|
|
108
|
+
requestAnimationFrame$1(resolve);
|
|
109
|
+
});
|
|
110
|
+
const doubleRaf = () => new Promise((resolve) => {
|
|
111
|
+
requestAnimationFrame$1(() => {
|
|
112
|
+
requestAnimationFrame$1(resolve);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
const getStyle$1 = (element) => window.getComputedStyle(element);
|
|
116
|
+
const getRect = (element) => {
|
|
171
117
|
if (isWindow(element)) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
118
|
+
const width = element.innerWidth;
|
|
119
|
+
const height = element.innerHeight;
|
|
120
|
+
const rect = {
|
|
175
121
|
x: 0,
|
|
176
122
|
y: 0,
|
|
177
123
|
top: 0,
|
|
@@ -181,241 +127,17 @@ function getRect(element) {
|
|
|
181
127
|
width,
|
|
182
128
|
height
|
|
183
129
|
};
|
|
184
|
-
return
|
|
185
|
-
toJSON: () => rect
|
|
186
|
-
});
|
|
130
|
+
return Object.assign(Object.assign({}, rect), { toJSON: () => rect });
|
|
187
131
|
}
|
|
188
132
|
return element.getBoundingClientRect();
|
|
189
|
-
}
|
|
190
|
-
function getLeft(element) {
|
|
191
|
-
var {
|
|
192
|
-
left: left2
|
|
193
|
-
} = getRect(element);
|
|
194
|
-
return left2 + (document.body.scrollLeft || document.documentElement.scrollLeft);
|
|
195
|
-
}
|
|
196
|
-
function getTop$1(element) {
|
|
197
|
-
var {
|
|
198
|
-
top: top2
|
|
199
|
-
} = getRect(element);
|
|
200
|
-
return top2 + (document.body.scrollTop || document.documentElement.scrollTop);
|
|
201
|
-
}
|
|
202
|
-
function getScrollTop(element) {
|
|
203
|
-
var top2 = "scrollTop" in element ? element.scrollTop : element.pageYOffset;
|
|
204
|
-
return Math.max(top2, 0);
|
|
205
|
-
}
|
|
206
|
-
function getScrollLeft(element) {
|
|
207
|
-
var left2 = "scrollLeft" in element ? element.scrollLeft : element.pageXOffset;
|
|
208
|
-
return Math.max(left2, 0);
|
|
209
|
-
}
|
|
210
|
-
function inViewport(element) {
|
|
211
|
-
var {
|
|
212
|
-
top: top2,
|
|
213
|
-
bottom: bottom2,
|
|
214
|
-
left: left2,
|
|
215
|
-
right: right2
|
|
216
|
-
} = getRect(element);
|
|
217
|
-
var {
|
|
218
|
-
width,
|
|
219
|
-
height
|
|
220
|
-
} = getRect(window);
|
|
221
|
-
var xInViewport = left2 <= width && right2 >= 0;
|
|
222
|
-
var yInViewport = top2 <= height && bottom2 >= 0;
|
|
223
|
-
return xInViewport && yInViewport;
|
|
224
|
-
}
|
|
225
|
-
function getTranslateY(el) {
|
|
226
|
-
var {
|
|
227
|
-
transform
|
|
228
|
-
} = getStyle$1(el);
|
|
229
|
-
return +transform.slice(transform.lastIndexOf(",") + 2, transform.length - 1);
|
|
230
|
-
}
|
|
231
|
-
function getParentScroller(el) {
|
|
232
|
-
var element = el;
|
|
233
|
-
while (element) {
|
|
234
|
-
if (!element.parentNode) {
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
element = element.parentNode;
|
|
238
|
-
if (element === document.body || element === document.documentElement) {
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
var scrollRE = /(scroll|auto)/;
|
|
242
|
-
var {
|
|
243
|
-
overflowY,
|
|
244
|
-
overflow
|
|
245
|
-
} = getStyle$1(element);
|
|
246
|
-
if (scrollRE.test(overflowY) || scrollRE.test(overflow)) {
|
|
247
|
-
return element;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return window;
|
|
251
|
-
}
|
|
252
|
-
function getAllParentScroller(el) {
|
|
253
|
-
var allParentScroller = [];
|
|
254
|
-
var element = el;
|
|
255
|
-
while (!isWindow(element)) {
|
|
256
|
-
element = getParentScroller(element);
|
|
257
|
-
allParentScroller.push(element);
|
|
258
|
-
}
|
|
259
|
-
return allParentScroller;
|
|
260
|
-
}
|
|
261
|
-
function getTarget(target, componentName) {
|
|
262
|
-
if (isString(target)) {
|
|
263
|
-
var el = document.querySelector(target);
|
|
264
|
-
if (!el) {
|
|
265
|
-
error$1(componentName, "target element cannot found");
|
|
266
|
-
}
|
|
267
|
-
return el;
|
|
268
|
-
}
|
|
269
|
-
if (isObject(target))
|
|
270
|
-
return target;
|
|
271
|
-
error$1(componentName, 'type of prop "target" should be a selector or an element object');
|
|
272
|
-
}
|
|
273
|
-
function getViewportSize() {
|
|
274
|
-
var {
|
|
275
|
-
width,
|
|
276
|
-
height
|
|
277
|
-
} = getRect(window);
|
|
278
|
-
return {
|
|
279
|
-
vw: width,
|
|
280
|
-
vh: height,
|
|
281
|
-
vMin: Math.min(width, height),
|
|
282
|
-
vMax: Math.max(width, height)
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
var isRem = (value) => isString(value) && value.endsWith("rem");
|
|
286
|
-
var isEm = (value) => isString(value) && value.endsWith("em") && !value.endsWith("rem");
|
|
287
|
-
var isPx = (value) => isString(value) && value.endsWith("px") || isNumber(value);
|
|
288
|
-
var isPercent = (value) => isString(value) && value.endsWith("%");
|
|
289
|
-
var isVw = (value) => isString(value) && value.endsWith("vw");
|
|
290
|
-
var isVh = (value) => isString(value) && value.endsWith("vh");
|
|
291
|
-
var isVMin = (value) => isString(value) && value.endsWith("vmin");
|
|
292
|
-
var isVMax = (value) => isString(value) && value.endsWith("vmax");
|
|
293
|
-
var isCalc = (value) => isString(value) && value.startsWith("calc(");
|
|
294
|
-
var isVar = (value) => isString(value) && value.startsWith("var(");
|
|
295
|
-
var toPxNum = (value) => {
|
|
296
|
-
if (isNumber(value)) {
|
|
297
|
-
return value;
|
|
298
|
-
}
|
|
299
|
-
if (isPx(value)) {
|
|
300
|
-
return +value.replace("px", "");
|
|
301
|
-
}
|
|
302
|
-
if (!inBrowser()) {
|
|
303
|
-
return 0;
|
|
304
|
-
}
|
|
305
|
-
var {
|
|
306
|
-
vw,
|
|
307
|
-
vh,
|
|
308
|
-
vMin,
|
|
309
|
-
vMax
|
|
310
|
-
} = getViewportSize();
|
|
311
|
-
if (isVw(value)) {
|
|
312
|
-
return +value.replace("vw", "") * vw / 100;
|
|
313
|
-
}
|
|
314
|
-
if (isVh(value)) {
|
|
315
|
-
return +value.replace("vh", "") * vh / 100;
|
|
316
|
-
}
|
|
317
|
-
if (isVMin(value)) {
|
|
318
|
-
return +value.replace("vmin", "") * vMin / 100;
|
|
319
|
-
}
|
|
320
|
-
if (isVMax(value)) {
|
|
321
|
-
return +value.replace("vmax", "") * vMax / 100;
|
|
322
|
-
}
|
|
323
|
-
if (isRem(value)) {
|
|
324
|
-
var num = +value.replace("rem", "");
|
|
325
|
-
var rootFontSize = getStyle$1(document.documentElement).fontSize;
|
|
326
|
-
return num * parseFloat(rootFontSize);
|
|
327
|
-
}
|
|
328
|
-
if (isString(value)) {
|
|
329
|
-
return toNumber(value);
|
|
330
|
-
}
|
|
331
|
-
return 0;
|
|
332
133
|
};
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
return toPxNum(value) + "px";
|
|
341
|
-
};
|
|
342
|
-
var multiplySizeUnit = function(value, quantity) {
|
|
343
|
-
if (quantity === void 0) {
|
|
344
|
-
quantity = 1;
|
|
345
|
-
}
|
|
346
|
-
if (value == null) {
|
|
347
|
-
return void 0;
|
|
348
|
-
}
|
|
349
|
-
var legalSize = toSizeUnit(value);
|
|
350
|
-
var unit = legalSize.match(/(vh|%|r?em|px|vw|vmin|vmax)$/)[0];
|
|
351
|
-
return "" + parseFloat(legalSize) * quantity + unit;
|
|
134
|
+
const inViewport = (element) => {
|
|
135
|
+
const { top: top2, bottom: bottom2, left: left2, right: right2 } = getRect(element);
|
|
136
|
+
const { width, height } = getRect(window);
|
|
137
|
+
const xInViewport = left2 <= width && right2 >= 0;
|
|
138
|
+
const yInViewport = top2 <= height && bottom2 >= 0;
|
|
139
|
+
return xInViewport && yInViewport;
|
|
352
140
|
};
|
|
353
|
-
function requestAnimationFrame(fn2) {
|
|
354
|
-
var globalThis2 = getGlobalThis();
|
|
355
|
-
return globalThis2.requestAnimationFrame ? globalThis2.requestAnimationFrame(fn2) : globalThis2.setTimeout(fn2, 16);
|
|
356
|
-
}
|
|
357
|
-
function cancelAnimationFrame(handle) {
|
|
358
|
-
var globalThis2 = getGlobalThis();
|
|
359
|
-
globalThis2.cancelAnimationFrame ? globalThis2.cancelAnimationFrame(handle) : globalThis2.clearTimeout(handle);
|
|
360
|
-
}
|
|
361
|
-
function nextTickFrame(fn2) {
|
|
362
|
-
requestAnimationFrame(() => {
|
|
363
|
-
requestAnimationFrame(fn2);
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
function doubleRaf() {
|
|
367
|
-
return new Promise((resolve) => {
|
|
368
|
-
requestAnimationFrame(() => {
|
|
369
|
-
requestAnimationFrame(resolve);
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
function raf() {
|
|
374
|
-
return new Promise((resolve) => {
|
|
375
|
-
requestAnimationFrame(resolve);
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
function scrollTo(element, _ref) {
|
|
379
|
-
var {
|
|
380
|
-
top: top2 = 0,
|
|
381
|
-
left: left2 = 0,
|
|
382
|
-
duration = 300,
|
|
383
|
-
animation
|
|
384
|
-
} = _ref;
|
|
385
|
-
var startTime = Date.now();
|
|
386
|
-
var scrollTop = getScrollTop(element);
|
|
387
|
-
var scrollLeft = getScrollLeft(element);
|
|
388
|
-
return new Promise((resolve) => {
|
|
389
|
-
var frame = () => {
|
|
390
|
-
var progress2 = (Date.now() - startTime) / duration;
|
|
391
|
-
if (progress2 < 1) {
|
|
392
|
-
var nextTop = scrollTop + (top2 - scrollTop) * animation(progress2);
|
|
393
|
-
var nextLeft = scrollLeft + (left2 - scrollLeft) * animation(progress2);
|
|
394
|
-
element.scrollTo(nextLeft, nextTop);
|
|
395
|
-
requestAnimationFrame(frame);
|
|
396
|
-
} else {
|
|
397
|
-
element.scrollTo(left2, top2);
|
|
398
|
-
resolve();
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
requestAnimationFrame(frame);
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
function formatStyleVars(styleVars) {
|
|
405
|
-
return Object.entries(styleVars != null ? styleVars : {}).reduce((styles, _ref2) => {
|
|
406
|
-
var [key, value] = _ref2;
|
|
407
|
-
var cssVar = key.startsWith("--") ? key : "--" + kebabCase(key);
|
|
408
|
-
styles[cssVar] = value;
|
|
409
|
-
return styles;
|
|
410
|
-
}, {});
|
|
411
|
-
}
|
|
412
|
-
function supportTouch() {
|
|
413
|
-
var inBrowser2 = typeof window !== "undefined";
|
|
414
|
-
return inBrowser2 && "ontouchstart" in window;
|
|
415
|
-
}
|
|
416
|
-
function padStartFlex(style) {
|
|
417
|
-
return style === "start" || style === "end" ? "flex-" + style : style;
|
|
418
|
-
}
|
|
419
141
|
function onSmartMounted(hook) {
|
|
420
142
|
let isMounted = false;
|
|
421
143
|
vue.onMounted(() => {
|
|
@@ -716,7 +438,7 @@ function useTouch() {
|
|
|
716
438
|
endTouch
|
|
717
439
|
};
|
|
718
440
|
}
|
|
719
|
-
function asyncGeneratorStep$
|
|
441
|
+
function asyncGeneratorStep$h(gen, resolve, reject, _next, _throw, key, arg) {
|
|
720
442
|
try {
|
|
721
443
|
var info = gen[key](arg);
|
|
722
444
|
var value = info.value;
|
|
@@ -730,16 +452,16 @@ function asyncGeneratorStep$f(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
730
452
|
Promise.resolve(value).then(_next, _throw);
|
|
731
453
|
}
|
|
732
454
|
}
|
|
733
|
-
function _asyncToGenerator$
|
|
455
|
+
function _asyncToGenerator$h(fn2) {
|
|
734
456
|
return function() {
|
|
735
457
|
var self2 = this, args = arguments;
|
|
736
458
|
return new Promise(function(resolve, reject) {
|
|
737
459
|
var gen = fn2.apply(self2, args);
|
|
738
460
|
function _next(value) {
|
|
739
|
-
asyncGeneratorStep$
|
|
461
|
+
asyncGeneratorStep$h(gen, resolve, reject, _next, _throw, "next", value);
|
|
740
462
|
}
|
|
741
463
|
function _throw(err) {
|
|
742
|
-
asyncGeneratorStep$
|
|
464
|
+
asyncGeneratorStep$h(gen, resolve, reject, _next, _throw, "throw", err);
|
|
743
465
|
}
|
|
744
466
|
_next(void 0);
|
|
745
467
|
});
|
|
@@ -827,7 +549,7 @@ function flatFragment(vNodes) {
|
|
|
827
549
|
function useValidation() {
|
|
828
550
|
var errorMessage = vue.ref("");
|
|
829
551
|
var validate = /* @__PURE__ */ function() {
|
|
830
|
-
var _ref = _asyncToGenerator$
|
|
552
|
+
var _ref = _asyncToGenerator$h(function* (rules, value, apis) {
|
|
831
553
|
if (!isArray(rules) || !rules.length) {
|
|
832
554
|
return true;
|
|
833
555
|
}
|
|
@@ -848,7 +570,7 @@ function useValidation() {
|
|
|
848
570
|
errorMessage.value = "";
|
|
849
571
|
};
|
|
850
572
|
var validateWithTrigger = /* @__PURE__ */ function() {
|
|
851
|
-
var _ref2 = _asyncToGenerator$
|
|
573
|
+
var _ref2 = _asyncToGenerator$h(function* (validateTrigger, trigger, rules, value, apis) {
|
|
852
574
|
if (validateTrigger.includes(trigger)) {
|
|
853
575
|
(yield validate(rules, value, apis)) && (errorMessage.value = "");
|
|
854
576
|
}
|
|
@@ -1412,7 +1134,198 @@ var props$1b = {
|
|
|
1412
1134
|
animationClass: String,
|
|
1413
1135
|
onClick: defineListenerProp()
|
|
1414
1136
|
};
|
|
1415
|
-
function
|
|
1137
|
+
function error$1(source, message) {
|
|
1138
|
+
throw Error("Varlet [" + source + "]: " + message);
|
|
1139
|
+
}
|
|
1140
|
+
function warn(source, message) {
|
|
1141
|
+
console.warn("Varlet [" + source + "]: " + message);
|
|
1142
|
+
}
|
|
1143
|
+
function getLeft(element) {
|
|
1144
|
+
var {
|
|
1145
|
+
left: left2
|
|
1146
|
+
} = getRect(element);
|
|
1147
|
+
return left2 + (document.body.scrollLeft || document.documentElement.scrollLeft);
|
|
1148
|
+
}
|
|
1149
|
+
function getTop$1(element) {
|
|
1150
|
+
var {
|
|
1151
|
+
top: top2
|
|
1152
|
+
} = getRect(element);
|
|
1153
|
+
return top2 + (document.body.scrollTop || document.documentElement.scrollTop);
|
|
1154
|
+
}
|
|
1155
|
+
function getScrollTop(element) {
|
|
1156
|
+
var top2 = "scrollTop" in element ? element.scrollTop : element.pageYOffset;
|
|
1157
|
+
return Math.max(top2, 0);
|
|
1158
|
+
}
|
|
1159
|
+
function getScrollLeft(element) {
|
|
1160
|
+
var left2 = "scrollLeft" in element ? element.scrollLeft : element.pageXOffset;
|
|
1161
|
+
return Math.max(left2, 0);
|
|
1162
|
+
}
|
|
1163
|
+
function getTranslateY(el) {
|
|
1164
|
+
var {
|
|
1165
|
+
transform
|
|
1166
|
+
} = getStyle$1(el);
|
|
1167
|
+
return +transform.slice(transform.lastIndexOf(",") + 2, transform.length - 1);
|
|
1168
|
+
}
|
|
1169
|
+
function getParentScroller(el) {
|
|
1170
|
+
var element = el;
|
|
1171
|
+
while (element) {
|
|
1172
|
+
if (!element.parentNode) {
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
1175
|
+
element = element.parentNode;
|
|
1176
|
+
if (element === document.body || element === document.documentElement) {
|
|
1177
|
+
break;
|
|
1178
|
+
}
|
|
1179
|
+
var scrollRE = /(scroll|auto)/;
|
|
1180
|
+
var {
|
|
1181
|
+
overflowY,
|
|
1182
|
+
overflow
|
|
1183
|
+
} = getStyle$1(element);
|
|
1184
|
+
if (scrollRE.test(overflowY) || scrollRE.test(overflow)) {
|
|
1185
|
+
return element;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
return window;
|
|
1189
|
+
}
|
|
1190
|
+
function getAllParentScroller(el) {
|
|
1191
|
+
var allParentScroller = [];
|
|
1192
|
+
var element = el;
|
|
1193
|
+
while (!isWindow(element)) {
|
|
1194
|
+
element = getParentScroller(element);
|
|
1195
|
+
allParentScroller.push(element);
|
|
1196
|
+
}
|
|
1197
|
+
return allParentScroller;
|
|
1198
|
+
}
|
|
1199
|
+
function getTarget(target, componentName) {
|
|
1200
|
+
if (isString(target)) {
|
|
1201
|
+
var el = document.querySelector(target);
|
|
1202
|
+
if (!el) {
|
|
1203
|
+
error$1(componentName, "target element cannot found");
|
|
1204
|
+
}
|
|
1205
|
+
return el;
|
|
1206
|
+
}
|
|
1207
|
+
if (isObject(target))
|
|
1208
|
+
return target;
|
|
1209
|
+
error$1(componentName, 'type of prop "target" should be a selector or an element object');
|
|
1210
|
+
}
|
|
1211
|
+
function getViewportSize() {
|
|
1212
|
+
var {
|
|
1213
|
+
width,
|
|
1214
|
+
height
|
|
1215
|
+
} = getRect(window);
|
|
1216
|
+
return {
|
|
1217
|
+
vw: width,
|
|
1218
|
+
vh: height,
|
|
1219
|
+
vMin: Math.min(width, height),
|
|
1220
|
+
vMax: Math.max(width, height)
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
var isRem = (value) => isString(value) && value.endsWith("rem");
|
|
1224
|
+
var isEm = (value) => isString(value) && value.endsWith("em") && !value.endsWith("rem");
|
|
1225
|
+
var isPx = (value) => isString(value) && value.endsWith("px") || isNumber(value);
|
|
1226
|
+
var isPercent = (value) => isString(value) && value.endsWith("%");
|
|
1227
|
+
var isVw = (value) => isString(value) && value.endsWith("vw");
|
|
1228
|
+
var isVh = (value) => isString(value) && value.endsWith("vh");
|
|
1229
|
+
var isVMin = (value) => isString(value) && value.endsWith("vmin");
|
|
1230
|
+
var isVMax = (value) => isString(value) && value.endsWith("vmax");
|
|
1231
|
+
var isCalc = (value) => isString(value) && value.startsWith("calc(");
|
|
1232
|
+
var isVar = (value) => isString(value) && value.startsWith("var(");
|
|
1233
|
+
var toPxNum = (value) => {
|
|
1234
|
+
if (isNumber(value)) {
|
|
1235
|
+
return value;
|
|
1236
|
+
}
|
|
1237
|
+
if (isPx(value)) {
|
|
1238
|
+
return +value.replace("px", "");
|
|
1239
|
+
}
|
|
1240
|
+
if (!inBrowser()) {
|
|
1241
|
+
return 0;
|
|
1242
|
+
}
|
|
1243
|
+
var {
|
|
1244
|
+
vw,
|
|
1245
|
+
vh,
|
|
1246
|
+
vMin,
|
|
1247
|
+
vMax
|
|
1248
|
+
} = getViewportSize();
|
|
1249
|
+
if (isVw(value)) {
|
|
1250
|
+
return +value.replace("vw", "") * vw / 100;
|
|
1251
|
+
}
|
|
1252
|
+
if (isVh(value)) {
|
|
1253
|
+
return +value.replace("vh", "") * vh / 100;
|
|
1254
|
+
}
|
|
1255
|
+
if (isVMin(value)) {
|
|
1256
|
+
return +value.replace("vmin", "") * vMin / 100;
|
|
1257
|
+
}
|
|
1258
|
+
if (isVMax(value)) {
|
|
1259
|
+
return +value.replace("vmax", "") * vMax / 100;
|
|
1260
|
+
}
|
|
1261
|
+
if (isRem(value)) {
|
|
1262
|
+
var num = +value.replace("rem", "");
|
|
1263
|
+
var rootFontSize = getStyle$1(document.documentElement).fontSize;
|
|
1264
|
+
return num * parseFloat(rootFontSize);
|
|
1265
|
+
}
|
|
1266
|
+
if (isString(value)) {
|
|
1267
|
+
return toNumber(value);
|
|
1268
|
+
}
|
|
1269
|
+
return 0;
|
|
1270
|
+
};
|
|
1271
|
+
var toSizeUnit = (value) => {
|
|
1272
|
+
if (value == null) {
|
|
1273
|
+
return void 0;
|
|
1274
|
+
}
|
|
1275
|
+
if (isPercent(value) || isVw(value) || isVh(value) || isEm(value) || isRem(value) || isCalc(value) || isVar(value) || isVMin(value) || isVMax(value)) {
|
|
1276
|
+
return value;
|
|
1277
|
+
}
|
|
1278
|
+
return toPxNum(value) + "px";
|
|
1279
|
+
};
|
|
1280
|
+
var multiplySizeUnit = function(value, quantity) {
|
|
1281
|
+
if (quantity === void 0) {
|
|
1282
|
+
quantity = 1;
|
|
1283
|
+
}
|
|
1284
|
+
if (value == null) {
|
|
1285
|
+
return void 0;
|
|
1286
|
+
}
|
|
1287
|
+
var legalSize = toSizeUnit(value);
|
|
1288
|
+
var unit = legalSize.match(/(vh|%|r?em|px|vw|vmin|vmax)$/)[0];
|
|
1289
|
+
return "" + parseFloat(legalSize) * quantity + unit;
|
|
1290
|
+
};
|
|
1291
|
+
function scrollTo(element, _ref) {
|
|
1292
|
+
var {
|
|
1293
|
+
top: top2 = 0,
|
|
1294
|
+
left: left2 = 0,
|
|
1295
|
+
duration = 300,
|
|
1296
|
+
animation
|
|
1297
|
+
} = _ref;
|
|
1298
|
+
var startTime = Date.now();
|
|
1299
|
+
var scrollTop = getScrollTop(element);
|
|
1300
|
+
var scrollLeft = getScrollLeft(element);
|
|
1301
|
+
return new Promise((resolve) => {
|
|
1302
|
+
var frame = () => {
|
|
1303
|
+
var progress2 = (Date.now() - startTime) / duration;
|
|
1304
|
+
if (progress2 < 1) {
|
|
1305
|
+
var nextTop = scrollTop + (top2 - scrollTop) * animation(progress2);
|
|
1306
|
+
var nextLeft = scrollLeft + (left2 - scrollLeft) * animation(progress2);
|
|
1307
|
+
element.scrollTo(nextLeft, nextTop);
|
|
1308
|
+
requestAnimationFrame(frame);
|
|
1309
|
+
} else {
|
|
1310
|
+
element.scrollTo(left2, top2);
|
|
1311
|
+
resolve();
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
requestAnimationFrame(frame);
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
function formatStyleVars(styleVars) {
|
|
1318
|
+
return Object.entries(styleVars != null ? styleVars : {}).reduce((styles, _ref2) => {
|
|
1319
|
+
var [key, value] = _ref2;
|
|
1320
|
+
var cssVar = key.startsWith("--") ? key : "--" + kebabCase(key);
|
|
1321
|
+
styles[cssVar] = value;
|
|
1322
|
+
return styles;
|
|
1323
|
+
}, {});
|
|
1324
|
+
}
|
|
1325
|
+
function padStartFlex(style) {
|
|
1326
|
+
return style === "start" || style === "end" ? "flex-" + style : style;
|
|
1327
|
+
}
|
|
1328
|
+
function asyncGeneratorStep$g(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1416
1329
|
try {
|
|
1417
1330
|
var info = gen[key](arg);
|
|
1418
1331
|
var value = info.value;
|
|
@@ -1426,16 +1339,16 @@ function asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1426
1339
|
Promise.resolve(value).then(_next, _throw);
|
|
1427
1340
|
}
|
|
1428
1341
|
}
|
|
1429
|
-
function _asyncToGenerator$
|
|
1342
|
+
function _asyncToGenerator$g(fn2) {
|
|
1430
1343
|
return function() {
|
|
1431
1344
|
var self2 = this, args = arguments;
|
|
1432
1345
|
return new Promise(function(resolve, reject) {
|
|
1433
1346
|
var gen = fn2.apply(self2, args);
|
|
1434
1347
|
function _next(value) {
|
|
1435
|
-
asyncGeneratorStep$
|
|
1348
|
+
asyncGeneratorStep$g(gen, resolve, reject, _next, _throw, "next", value);
|
|
1436
1349
|
}
|
|
1437
1350
|
function _throw(err) {
|
|
1438
|
-
asyncGeneratorStep$
|
|
1351
|
+
asyncGeneratorStep$g(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1439
1352
|
}
|
|
1440
1353
|
_next(void 0);
|
|
1441
1354
|
});
|
|
@@ -1466,7 +1379,7 @@ var __sfc__$1j = vue.defineComponent({
|
|
|
1466
1379
|
var nextName = vue.ref("");
|
|
1467
1380
|
var animateInProgress = vue.ref(false);
|
|
1468
1381
|
var handleNameChange = /* @__PURE__ */ function() {
|
|
1469
|
-
var _ref = _asyncToGenerator$
|
|
1382
|
+
var _ref = _asyncToGenerator$g(function* (newName, oldName) {
|
|
1470
1383
|
var {
|
|
1471
1384
|
transition
|
|
1472
1385
|
} = props2;
|
|
@@ -1548,6 +1461,57 @@ var props$1a = _extends$n({
|
|
|
1548
1461
|
// internal for function call closes the dialog
|
|
1549
1462
|
"onRouteChange"
|
|
1550
1463
|
]));
|
|
1464
|
+
var isHTMLSupportImage = (val) => {
|
|
1465
|
+
if (val == null) {
|
|
1466
|
+
return false;
|
|
1467
|
+
}
|
|
1468
|
+
return val.startsWith("data:image") || /\.(png|jpg|gif|jpeg|svg|webp)$/.test(val);
|
|
1469
|
+
};
|
|
1470
|
+
var isHTMLSupportVideo = (val) => {
|
|
1471
|
+
if (val == null) {
|
|
1472
|
+
return false;
|
|
1473
|
+
}
|
|
1474
|
+
return val.startsWith("data:video") || /\.(mp4|webm|ogg)$/.test(val);
|
|
1475
|
+
};
|
|
1476
|
+
var createCache = (max2) => {
|
|
1477
|
+
var cache = [];
|
|
1478
|
+
return {
|
|
1479
|
+
cache,
|
|
1480
|
+
has(key) {
|
|
1481
|
+
return this.cache.includes(key);
|
|
1482
|
+
},
|
|
1483
|
+
add(key) {
|
|
1484
|
+
if (this.has(key)) {
|
|
1485
|
+
return;
|
|
1486
|
+
}
|
|
1487
|
+
this.cache.length === max2 && cache.shift();
|
|
1488
|
+
this.cache.push(key);
|
|
1489
|
+
},
|
|
1490
|
+
remove(key) {
|
|
1491
|
+
this.has(key) && removeItem(this.cache, key);
|
|
1492
|
+
},
|
|
1493
|
+
clear() {
|
|
1494
|
+
this.cache.length = 0;
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
};
|
|
1498
|
+
var linear = (value) => value;
|
|
1499
|
+
var cubic = (value) => Math.pow(value, 3);
|
|
1500
|
+
var easeInOutCubic = (value) => value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2;
|
|
1501
|
+
var dt = (value, defaultText) => value == null ? defaultText : value;
|
|
1502
|
+
var padStart$1 = function(str, maxLength, fillString) {
|
|
1503
|
+
if (str === void 0) {
|
|
1504
|
+
str = "";
|
|
1505
|
+
}
|
|
1506
|
+
if (fillString === void 0) {
|
|
1507
|
+
fillString = "";
|
|
1508
|
+
}
|
|
1509
|
+
if (str.length >= maxLength)
|
|
1510
|
+
return str;
|
|
1511
|
+
var len = maxLength - str.length;
|
|
1512
|
+
var repeatCount = Math.floor(len / fillString.length);
|
|
1513
|
+
return fillString.repeat(repeatCount) + fillString.slice(0, len % fillString.length) + str;
|
|
1514
|
+
};
|
|
1551
1515
|
const zhCN = {
|
|
1552
1516
|
// Dialog
|
|
1553
1517
|
dialogTitle: "提示",
|
|
@@ -2177,7 +2141,7 @@ __sfc__$1h.render = __render__$1g;
|
|
|
2177
2141
|
const AppBar = __sfc__$1h;
|
|
2178
2142
|
withInstall(AppBar);
|
|
2179
2143
|
var _AppBarComponent = AppBar;
|
|
2180
|
-
function asyncGeneratorStep$
|
|
2144
|
+
function asyncGeneratorStep$f(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2181
2145
|
try {
|
|
2182
2146
|
var info = gen[key](arg);
|
|
2183
2147
|
var value = info.value;
|
|
@@ -2191,16 +2155,16 @@ function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2191
2155
|
Promise.resolve(value).then(_next, _throw);
|
|
2192
2156
|
}
|
|
2193
2157
|
}
|
|
2194
|
-
function _asyncToGenerator$
|
|
2158
|
+
function _asyncToGenerator$f(fn2) {
|
|
2195
2159
|
return function() {
|
|
2196
2160
|
var self2 = this, args = arguments;
|
|
2197
2161
|
return new Promise(function(resolve, reject) {
|
|
2198
2162
|
var gen = fn2.apply(self2, args);
|
|
2199
2163
|
function _next(value) {
|
|
2200
|
-
asyncGeneratorStep$
|
|
2164
|
+
asyncGeneratorStep$f(gen, resolve, reject, _next, _throw, "next", value);
|
|
2201
2165
|
}
|
|
2202
2166
|
function _throw(err) {
|
|
2203
|
-
asyncGeneratorStep$
|
|
2167
|
+
asyncGeneratorStep$f(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2204
2168
|
}
|
|
2205
2169
|
_next(void 0);
|
|
2206
2170
|
});
|
|
@@ -2333,7 +2297,7 @@ function check(_x) {
|
|
|
2333
2297
|
return _check.apply(this, arguments);
|
|
2334
2298
|
}
|
|
2335
2299
|
function _check() {
|
|
2336
|
-
_check = _asyncToGenerator$
|
|
2300
|
+
_check = _asyncToGenerator$f(function* (el) {
|
|
2337
2301
|
yield doubleRaf();
|
|
2338
2302
|
if (inViewport(el)) {
|
|
2339
2303
|
attemptLoad(el);
|
|
@@ -2348,7 +2312,7 @@ function add$1(_x2) {
|
|
|
2348
2312
|
return _add.apply(this, arguments);
|
|
2349
2313
|
}
|
|
2350
2314
|
function _add() {
|
|
2351
|
-
_add = _asyncToGenerator$
|
|
2315
|
+
_add = _asyncToGenerator$f(function* (el) {
|
|
2352
2316
|
!lazyElements.includes(el) && lazyElements.push(el);
|
|
2353
2317
|
getAllParentScroller(el).forEach(bindEvents);
|
|
2354
2318
|
yield check(el);
|
|
@@ -2370,7 +2334,7 @@ function mounted$1(_x3, _x4) {
|
|
|
2370
2334
|
return _mounted.apply(this, arguments);
|
|
2371
2335
|
}
|
|
2372
2336
|
function _mounted() {
|
|
2373
|
-
_mounted = _asyncToGenerator$
|
|
2337
|
+
_mounted = _asyncToGenerator$f(function* (el, binding) {
|
|
2374
2338
|
createLazy(el, binding);
|
|
2375
2339
|
yield add$1(el);
|
|
2376
2340
|
});
|
|
@@ -2380,7 +2344,7 @@ function updated$1(_x5, _x6) {
|
|
|
2380
2344
|
return _updated.apply(this, arguments);
|
|
2381
2345
|
}
|
|
2382
2346
|
function _updated() {
|
|
2383
|
-
_updated = _asyncToGenerator$
|
|
2347
|
+
_updated = _asyncToGenerator$f(function* (el, binding) {
|
|
2384
2348
|
if (!diff(el, binding)) {
|
|
2385
2349
|
lazyElements.includes(el) && (yield check(el));
|
|
2386
2350
|
return;
|
|
@@ -4019,7 +3983,7 @@ var props$Y = {
|
|
|
4019
3983
|
onClick: defineListenerProp(),
|
|
4020
3984
|
"onUpdate:floating": defineListenerProp()
|
|
4021
3985
|
};
|
|
4022
|
-
function asyncGeneratorStep$
|
|
3986
|
+
function asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4023
3987
|
try {
|
|
4024
3988
|
var info = gen[key](arg);
|
|
4025
3989
|
var value = info.value;
|
|
@@ -4033,16 +3997,16 @@ function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4033
3997
|
Promise.resolve(value).then(_next, _throw);
|
|
4034
3998
|
}
|
|
4035
3999
|
}
|
|
4036
|
-
function _asyncToGenerator$
|
|
4000
|
+
function _asyncToGenerator$e(fn2) {
|
|
4037
4001
|
return function() {
|
|
4038
4002
|
var self2 = this, args = arguments;
|
|
4039
4003
|
return new Promise(function(resolve, reject) {
|
|
4040
4004
|
var gen = fn2.apply(self2, args);
|
|
4041
4005
|
function _next(value) {
|
|
4042
|
-
asyncGeneratorStep$
|
|
4006
|
+
asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, "next", value);
|
|
4043
4007
|
}
|
|
4044
4008
|
function _throw(err) {
|
|
4045
|
-
asyncGeneratorStep$
|
|
4009
|
+
asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4046
4010
|
}
|
|
4047
4011
|
_next(void 0);
|
|
4048
4012
|
});
|
|
@@ -4237,11 +4201,11 @@ var __sfc__$14 = vue.defineComponent({
|
|
|
4237
4201
|
var dropper = null;
|
|
4238
4202
|
var floater = vue.ref(null);
|
|
4239
4203
|
var floating = /* @__PURE__ */ function() {
|
|
4240
|
-
var _ref = _asyncToGenerator$
|
|
4204
|
+
var _ref = _asyncToGenerator$e(function* () {
|
|
4241
4205
|
clearTimeout(floater.value);
|
|
4242
4206
|
clearTimeout(dropper);
|
|
4243
4207
|
floater.value = null;
|
|
4244
|
-
floater.value = setTimeout(/* @__PURE__ */ _asyncToGenerator$
|
|
4208
|
+
floater.value = setTimeout(/* @__PURE__ */ _asyncToGenerator$e(function* () {
|
|
4245
4209
|
var {
|
|
4246
4210
|
width,
|
|
4247
4211
|
height,
|
|
@@ -5476,6 +5440,35 @@ var props$Q = {
|
|
|
5476
5440
|
},
|
|
5477
5441
|
disabled: Boolean
|
|
5478
5442
|
};
|
|
5443
|
+
function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5444
|
+
try {
|
|
5445
|
+
var info = gen[key](arg);
|
|
5446
|
+
var value = info.value;
|
|
5447
|
+
} catch (error2) {
|
|
5448
|
+
reject(error2);
|
|
5449
|
+
return;
|
|
5450
|
+
}
|
|
5451
|
+
if (info.done) {
|
|
5452
|
+
resolve(value);
|
|
5453
|
+
} else {
|
|
5454
|
+
Promise.resolve(value).then(_next, _throw);
|
|
5455
|
+
}
|
|
5456
|
+
}
|
|
5457
|
+
function _asyncToGenerator$d(fn2) {
|
|
5458
|
+
return function() {
|
|
5459
|
+
var self2 = this, args = arguments;
|
|
5460
|
+
return new Promise(function(resolve, reject) {
|
|
5461
|
+
var gen = fn2.apply(self2, args);
|
|
5462
|
+
function _next(value) {
|
|
5463
|
+
asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, "next", value);
|
|
5464
|
+
}
|
|
5465
|
+
function _throw(err) {
|
|
5466
|
+
asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5467
|
+
}
|
|
5468
|
+
_next(void 0);
|
|
5469
|
+
});
|
|
5470
|
+
};
|
|
5471
|
+
}
|
|
5479
5472
|
var {
|
|
5480
5473
|
n: n$X,
|
|
5481
5474
|
classes: classes$N
|
|
@@ -5594,13 +5587,14 @@ var __sfc__$Y = vue.defineComponent({
|
|
|
5594
5587
|
updateItem(props2.name || index.value, !isShow.value);
|
|
5595
5588
|
}
|
|
5596
5589
|
};
|
|
5597
|
-
var openPanel = ()
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5590
|
+
var openPanel = /* @__PURE__ */ function() {
|
|
5591
|
+
var _ref = _asyncToGenerator$d(function* () {
|
|
5592
|
+
if (!contentEl.value) {
|
|
5593
|
+
return;
|
|
5594
|
+
}
|
|
5595
|
+
contentEl.value.style.height = "";
|
|
5596
|
+
showContent.value = true;
|
|
5597
|
+
yield raf();
|
|
5604
5598
|
if (!contentEl.value) {
|
|
5605
5599
|
return;
|
|
5606
5600
|
}
|
|
@@ -5608,36 +5602,42 @@ var __sfc__$Y = vue.defineComponent({
|
|
|
5608
5602
|
offsetHeight
|
|
5609
5603
|
} = contentEl.value;
|
|
5610
5604
|
contentEl.value.style.height = "0px";
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
});
|
|
5624
|
-
});
|
|
5605
|
+
yield raf();
|
|
5606
|
+
if (!contentEl.value) {
|
|
5607
|
+
return;
|
|
5608
|
+
}
|
|
5609
|
+
contentEl.value.style.height = offsetHeight + "px";
|
|
5610
|
+
if (!isInitToTrigger) {
|
|
5611
|
+
return;
|
|
5612
|
+
}
|
|
5613
|
+
yield doubleRaf();
|
|
5614
|
+
if (isInitToTrigger) {
|
|
5615
|
+
transitionend();
|
|
5616
|
+
}
|
|
5625
5617
|
});
|
|
5626
|
-
|
|
5618
|
+
return function openPanel2() {
|
|
5619
|
+
return _ref.apply(this, arguments);
|
|
5620
|
+
};
|
|
5621
|
+
}();
|
|
5627
5622
|
var start2 = () => {
|
|
5628
5623
|
isInitToTrigger = false;
|
|
5629
5624
|
};
|
|
5630
|
-
var closePanel = ()
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5625
|
+
var closePanel = /* @__PURE__ */ function() {
|
|
5626
|
+
var _ref2 = _asyncToGenerator$d(function* () {
|
|
5627
|
+
if (!contentEl.value) {
|
|
5628
|
+
return;
|
|
5629
|
+
}
|
|
5630
|
+
var {
|
|
5631
|
+
offsetHeight
|
|
5632
|
+
} = contentEl.value;
|
|
5633
|
+
contentEl.value.style.height = offsetHeight + "px";
|
|
5634
|
+
yield raf();
|
|
5638
5635
|
contentEl.value.style.height = "0px";
|
|
5639
5636
|
});
|
|
5640
|
-
|
|
5637
|
+
return function closePanel2() {
|
|
5638
|
+
return _ref2.apply(this, arguments);
|
|
5639
|
+
};
|
|
5640
|
+
}();
|
|
5641
5641
|
var transitionend = () => {
|
|
5642
5642
|
if (!isShow.value) {
|
|
5643
5643
|
showContent.value = false;
|
|
@@ -5651,10 +5651,7 @@ var __sfc__$Y = vue.defineComponent({
|
|
|
5651
5651
|
};
|
|
5652
5652
|
bindCollapse(collapseItemProvider);
|
|
5653
5653
|
vue.watch(isShow, (value) => {
|
|
5654
|
-
|
|
5655
|
-
openPanel();
|
|
5656
|
-
else
|
|
5657
|
-
closePanel();
|
|
5654
|
+
value ? openPanel() : closePanel();
|
|
5658
5655
|
});
|
|
5659
5656
|
return {
|
|
5660
5657
|
n: n$X,
|
|
@@ -5790,7 +5787,7 @@ var __sfc__$X = vue.defineComponent({
|
|
|
5790
5787
|
return;
|
|
5791
5788
|
}
|
|
5792
5789
|
if (isStart) {
|
|
5793
|
-
handle = requestAnimationFrame(countdown2);
|
|
5790
|
+
handle = requestAnimationFrame$1(countdown2);
|
|
5794
5791
|
}
|
|
5795
5792
|
};
|
|
5796
5793
|
var start2 = function(resume) {
|
|
@@ -9945,6 +9942,35 @@ var __sfc__$S = vue.defineComponent({
|
|
|
9945
9942
|
});
|
|
9946
9943
|
__sfc__$S.render = __render__$R;
|
|
9947
9944
|
const DayPickerPanel = __sfc__$S;
|
|
9945
|
+
function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
9946
|
+
try {
|
|
9947
|
+
var info = gen[key](arg);
|
|
9948
|
+
var value = info.value;
|
|
9949
|
+
} catch (error2) {
|
|
9950
|
+
reject(error2);
|
|
9951
|
+
return;
|
|
9952
|
+
}
|
|
9953
|
+
if (info.done) {
|
|
9954
|
+
resolve(value);
|
|
9955
|
+
} else {
|
|
9956
|
+
Promise.resolve(value).then(_next, _throw);
|
|
9957
|
+
}
|
|
9958
|
+
}
|
|
9959
|
+
function _asyncToGenerator$c(fn2) {
|
|
9960
|
+
return function() {
|
|
9961
|
+
var self2 = this, args = arguments;
|
|
9962
|
+
return new Promise(function(resolve, reject) {
|
|
9963
|
+
var gen = fn2.apply(self2, args);
|
|
9964
|
+
function _next(value) {
|
|
9965
|
+
asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "next", value);
|
|
9966
|
+
}
|
|
9967
|
+
function _throw(err) {
|
|
9968
|
+
asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "throw", err);
|
|
9969
|
+
}
|
|
9970
|
+
_next(void 0);
|
|
9971
|
+
});
|
|
9972
|
+
};
|
|
9973
|
+
}
|
|
9948
9974
|
var {
|
|
9949
9975
|
n: n$Q,
|
|
9950
9976
|
classes: classes$I
|
|
@@ -10255,15 +10281,19 @@ var __sfc__$R = vue.defineComponent({
|
|
|
10255
10281
|
touchDirection = getDirection2(Math.abs(x), Math.abs(y));
|
|
10256
10282
|
checkType = x > 0 ? "prev" : "next";
|
|
10257
10283
|
};
|
|
10258
|
-
var handleTouchend = ()
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10284
|
+
var handleTouchend = /* @__PURE__ */ function() {
|
|
10285
|
+
var _ref = _asyncToGenerator$c(function* () {
|
|
10286
|
+
if (isUntouchable.value || touchDirection !== "x")
|
|
10287
|
+
return;
|
|
10288
|
+
var componentRef = getPanelType.value === "month" ? monthPanelEl : dayPanelEl;
|
|
10289
|
+
yield doubleRaf();
|
|
10263
10290
|
componentRef.value.forwardRef(checkType);
|
|
10264
10291
|
resetState();
|
|
10265
10292
|
});
|
|
10266
|
-
|
|
10293
|
+
return function handleTouchend2() {
|
|
10294
|
+
return _ref.apply(this, arguments);
|
|
10295
|
+
};
|
|
10296
|
+
}();
|
|
10267
10297
|
var updateRange = (date, type) => {
|
|
10268
10298
|
var rangeDate = type === "month" ? chooseRangeMonth : chooseRangeDay;
|
|
10269
10299
|
rangeDate.value = rangeDone.value ? [date, date] : [rangeDate.value[0], date];
|
|
@@ -13895,23 +13925,26 @@ var __sfc__$J = vue.defineComponent({
|
|
|
13895
13925
|
}
|
|
13896
13926
|
return clamp$1(index2, 0, length.value - 1);
|
|
13897
13927
|
};
|
|
13898
|
-
var fixPosition = (
|
|
13899
|
-
var
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
if (overLeft || overRight) {
|
|
13928
|
+
var fixPosition = /* @__PURE__ */ function() {
|
|
13929
|
+
var _ref2 = _asyncToGenerator$8(function* () {
|
|
13930
|
+
var overLeft = trackTranslate.value >= size.value;
|
|
13931
|
+
var overRight = trackTranslate.value <= -trackSize.value;
|
|
13932
|
+
var leftTranslate = 0;
|
|
13933
|
+
var rightTranslate = -(trackSize.value - size.value);
|
|
13905
13934
|
lockDuration.value = true;
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13935
|
+
if (overLeft || overRight) {
|
|
13936
|
+
lockDuration.value = true;
|
|
13937
|
+
trackTranslate.value = overRight ? leftTranslate : rightTranslate;
|
|
13938
|
+
findSwipeItem(0).setTranslate(0);
|
|
13939
|
+
findSwipeItem(length.value - 1).setTranslate(0);
|
|
13940
|
+
}
|
|
13941
|
+
yield doubleRaf();
|
|
13911
13942
|
lockDuration.value = false;
|
|
13912
|
-
call(fn2);
|
|
13913
13943
|
});
|
|
13914
|
-
|
|
13944
|
+
return function fixPosition2() {
|
|
13945
|
+
return _ref2.apply(this, arguments);
|
|
13946
|
+
};
|
|
13947
|
+
}();
|
|
13915
13948
|
var initialIndex = () => {
|
|
13916
13949
|
if (initializedIndex) {
|
|
13917
13950
|
return;
|
|
@@ -13939,16 +13972,20 @@ var __sfc__$J = vue.defineComponent({
|
|
|
13939
13972
|
trackTranslate.value = value;
|
|
13940
13973
|
dispatchSwipeItems();
|
|
13941
13974
|
};
|
|
13942
|
-
var handleTouchstart = (
|
|
13943
|
-
|
|
13944
|
-
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13975
|
+
var handleTouchstart = /* @__PURE__ */ function() {
|
|
13976
|
+
var _ref3 = _asyncToGenerator$8(function* (event) {
|
|
13977
|
+
if (length.value <= 1 || !props2.touchable) {
|
|
13978
|
+
return;
|
|
13979
|
+
}
|
|
13980
|
+
startTouch(event);
|
|
13981
|
+
stopAutoplay();
|
|
13982
|
+
yield fixPosition();
|
|
13949
13983
|
lockDuration.value = true;
|
|
13950
13984
|
});
|
|
13951
|
-
|
|
13985
|
+
return function handleTouchstart2(_x) {
|
|
13986
|
+
return _ref3.apply(this, arguments);
|
|
13987
|
+
};
|
|
13988
|
+
}();
|
|
13952
13989
|
var handleTouchmove = (event) => {
|
|
13953
13990
|
var {
|
|
13954
13991
|
touchable,
|
|
@@ -14003,21 +14040,22 @@ var __sfc__$J = vue.defineComponent({
|
|
|
14003
14040
|
lockDuration.value = false;
|
|
14004
14041
|
});
|
|
14005
14042
|
};
|
|
14006
|
-
var next = (
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14043
|
+
var next = /* @__PURE__ */ function() {
|
|
14044
|
+
var _ref4 = _asyncToGenerator$8(function* (options) {
|
|
14045
|
+
if (length.value <= 1) {
|
|
14046
|
+
return;
|
|
14047
|
+
}
|
|
14048
|
+
initialIndex();
|
|
14049
|
+
var {
|
|
14050
|
+
loop,
|
|
14051
|
+
onChange
|
|
14052
|
+
} = props2;
|
|
14053
|
+
var currentIndex = index.value;
|
|
14054
|
+
index.value = clampIndex(currentIndex + 1);
|
|
14055
|
+
if ((options == null ? void 0 : options.event) !== false) {
|
|
14056
|
+
call(onChange, index.value);
|
|
14057
|
+
}
|
|
14058
|
+
yield fixPosition();
|
|
14021
14059
|
if (currentIndex === length.value - 1 && loop) {
|
|
14022
14060
|
findSwipeItem(0).setTranslate(trackSize.value);
|
|
14023
14061
|
trackTranslate.value = length.value * -size.value;
|
|
@@ -14027,22 +14065,26 @@ var __sfc__$J = vue.defineComponent({
|
|
|
14027
14065
|
trackTranslate.value = index.value * -size.value;
|
|
14028
14066
|
}
|
|
14029
14067
|
});
|
|
14030
|
-
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14036
|
-
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14042
|
-
|
|
14043
|
-
|
|
14044
|
-
|
|
14045
|
-
|
|
14068
|
+
return function next2(_x2) {
|
|
14069
|
+
return _ref4.apply(this, arguments);
|
|
14070
|
+
};
|
|
14071
|
+
}();
|
|
14072
|
+
var prev = /* @__PURE__ */ function() {
|
|
14073
|
+
var _ref5 = _asyncToGenerator$8(function* (options) {
|
|
14074
|
+
if (length.value <= 1) {
|
|
14075
|
+
return;
|
|
14076
|
+
}
|
|
14077
|
+
initialIndex();
|
|
14078
|
+
var {
|
|
14079
|
+
loop,
|
|
14080
|
+
onChange
|
|
14081
|
+
} = props2;
|
|
14082
|
+
var currentIndex = index.value;
|
|
14083
|
+
index.value = clampIndex(currentIndex - 1);
|
|
14084
|
+
if ((options == null ? void 0 : options.event) !== false) {
|
|
14085
|
+
call(onChange, index.value);
|
|
14086
|
+
}
|
|
14087
|
+
yield fixPosition();
|
|
14046
14088
|
if (currentIndex === 0 && loop) {
|
|
14047
14089
|
findSwipeItem(length.value - 1).setTranslate(-trackSize.value);
|
|
14048
14090
|
trackTranslate.value = size.value;
|
|
@@ -14052,7 +14094,10 @@ var __sfc__$J = vue.defineComponent({
|
|
|
14052
14094
|
trackTranslate.value = index.value * -size.value;
|
|
14053
14095
|
}
|
|
14054
14096
|
});
|
|
14055
|
-
|
|
14097
|
+
return function prev2(_x3) {
|
|
14098
|
+
return _ref5.apply(this, arguments);
|
|
14099
|
+
};
|
|
14100
|
+
}();
|
|
14056
14101
|
var to = (idx, options) => {
|
|
14057
14102
|
if (length.value <= 1 || idx === index.value) {
|
|
14058
14103
|
return;
|
|
@@ -14082,7 +14127,7 @@ var __sfc__$J = vue.defineComponent({
|
|
|
14082
14127
|
}));
|
|
14083
14128
|
if (popup2) {
|
|
14084
14129
|
vue.watch(() => popup2.show.value, /* @__PURE__ */ function() {
|
|
14085
|
-
var
|
|
14130
|
+
var _ref7 = _asyncToGenerator$8(function* (show) {
|
|
14086
14131
|
if (show) {
|
|
14087
14132
|
yield doubleRaf();
|
|
14088
14133
|
resize();
|
|
@@ -14090,8 +14135,8 @@ var __sfc__$J = vue.defineComponent({
|
|
|
14090
14135
|
stopAutoplay();
|
|
14091
14136
|
}
|
|
14092
14137
|
});
|
|
14093
|
-
return function(
|
|
14094
|
-
return
|
|
14138
|
+
return function(_x4) {
|
|
14139
|
+
return _ref7.apply(this, arguments);
|
|
14095
14140
|
};
|
|
14096
14141
|
}());
|
|
14097
14142
|
}
|
|
@@ -15188,9 +15233,8 @@ var __sfc__$E = vue.defineComponent({
|
|
|
15188
15233
|
animation: easeInOutCubic,
|
|
15189
15234
|
duration: toNumber(props2.duration)
|
|
15190
15235
|
});
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
});
|
|
15236
|
+
yield doubleRaf();
|
|
15237
|
+
clickedName.value = "";
|
|
15194
15238
|
});
|
|
15195
15239
|
return function anchorClick2(_x) {
|
|
15196
15240
|
return _ref2.apply(this, arguments);
|
|
@@ -15212,7 +15256,7 @@ var __sfc__$E = vue.defineComponent({
|
|
|
15212
15256
|
scroller.removeEventListener("scroll", handleScroll);
|
|
15213
15257
|
};
|
|
15214
15258
|
var scrollTo$1 = (index, options) => {
|
|
15215
|
-
requestAnimationFrame(() => anchorClick({
|
|
15259
|
+
requestAnimationFrame$1(() => anchorClick({
|
|
15216
15260
|
anchorName: index,
|
|
15217
15261
|
options
|
|
15218
15262
|
}));
|
|
@@ -18949,19 +18993,6 @@ __sfc__$q.render = __render__$p;
|
|
|
18949
18993
|
const Rate = __sfc__$q;
|
|
18950
18994
|
withInstall(Rate);
|
|
18951
18995
|
var _RateComponent = Rate;
|
|
18952
|
-
var props$i = {
|
|
18953
|
-
imageSize: [String, Number],
|
|
18954
|
-
type: {
|
|
18955
|
-
type: String,
|
|
18956
|
-
default: "success"
|
|
18957
|
-
},
|
|
18958
|
-
title: String,
|
|
18959
|
-
description: String,
|
|
18960
|
-
animation: {
|
|
18961
|
-
type: Boolean,
|
|
18962
|
-
default: true
|
|
18963
|
-
}
|
|
18964
|
-
};
|
|
18965
18996
|
var _withScopeId$6 = (n2) => (vue.pushScopeId(""), n2 = n2(), vue.popScopeId(), n2);
|
|
18966
18997
|
var _hoisted_1$b = {
|
|
18967
18998
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19164,6 +19195,19 @@ function __render__$j(_ctx, _cache) {
|
|
|
19164
19195
|
var __sfc__$k = vue.defineComponent({});
|
|
19165
19196
|
__sfc__$k.render = __render__$j;
|
|
19166
19197
|
const Empty = __sfc__$k;
|
|
19198
|
+
var props$i = {
|
|
19199
|
+
imageSize: [String, Number],
|
|
19200
|
+
type: {
|
|
19201
|
+
type: String,
|
|
19202
|
+
default: "success"
|
|
19203
|
+
},
|
|
19204
|
+
title: String,
|
|
19205
|
+
description: String,
|
|
19206
|
+
animation: {
|
|
19207
|
+
type: Boolean,
|
|
19208
|
+
default: true
|
|
19209
|
+
}
|
|
19210
|
+
};
|
|
19167
19211
|
var {
|
|
19168
19212
|
n: n$k,
|
|
19169
19213
|
classes: classes$g
|
|
@@ -24431,7 +24475,7 @@ const uploader = "";
|
|
|
24431
24475
|
const UploaderSfc = "";
|
|
24432
24476
|
const watermark = "";
|
|
24433
24477
|
const WatermarkSfc = "";
|
|
24434
|
-
const version = "2.15.
|
|
24478
|
+
const version = "2.15.2-alpha.1693502641730";
|
|
24435
24479
|
function install(app) {
|
|
24436
24480
|
ActionSheet.install && app.use(ActionSheet);
|
|
24437
24481
|
AppBar.install && app.use(AppBar);
|