vant 3.2.7 → 3.2.8
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/cascader/Cascader.js +7 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/index.d.ts +1 -1
- package/es/password-input/PasswordInput.d.ts +20 -0
- package/es/password-input/PasswordInput.js +10 -9
- package/es/password-input/index.d.ts +1 -0
- package/es/progress/Progress.js +2 -2
- package/es/submit-bar/SubmitBar.d.ts +4 -3
- package/es/submit-bar/index.d.ts +3 -2
- package/es/tabs/Tabs.js +7 -6
- package/lib/cascader/Cascader.js +7 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/password-input/PasswordInput.d.ts +20 -0
- package/lib/password-input/PasswordInput.js +10 -9
- package/lib/password-input/index.d.ts +1 -0
- package/lib/progress/Progress.js +2 -2
- package/lib/submit-bar/SubmitBar.d.ts +4 -3
- package/lib/submit-bar/index.d.ts +3 -2
- package/lib/tabs/Tabs.js +7 -6
- package/lib/vant.es.js +234 -159
- package/lib/vant.es.min.js +234 -159
- package/lib/vant.js +234 -159
- package/lib/vant.min.js +1 -1
- package/package.json +7 -4
- package/vetur/attributes.json +344 -344
- package/vetur/tags.json +119 -119
- package/vetur/web-types.json +1149 -1145
package/lib/vant.js
CHANGED
@@ -64,31 +64,37 @@
|
|
64
64
|
function isWindow(val) {
|
65
65
|
return val === window;
|
66
66
|
}
|
67
|
-
function makeDOMRect(
|
67
|
+
function makeDOMRect(width2, height2) {
|
68
68
|
return {
|
69
69
|
top: 0,
|
70
70
|
left: 0,
|
71
|
-
right:
|
72
|
-
bottom:
|
73
|
-
width,
|
74
|
-
height
|
71
|
+
right: width2,
|
72
|
+
bottom: height2,
|
73
|
+
width: width2,
|
74
|
+
height: height2
|
75
75
|
};
|
76
76
|
}
|
77
77
|
var useRect = (elementOrRef) => {
|
78
78
|
var element = vue.unref(elementOrRef);
|
79
79
|
if (isWindow(element)) {
|
80
|
-
var
|
81
|
-
var
|
82
|
-
return makeDOMRect(
|
80
|
+
var width2 = element.innerWidth;
|
81
|
+
var height2 = element.innerHeight;
|
82
|
+
return makeDOMRect(width2, height2);
|
83
83
|
}
|
84
84
|
if (element && element.getBoundingClientRect) {
|
85
85
|
return element.getBoundingClientRect();
|
86
86
|
}
|
87
87
|
return makeDOMRect(0, 0);
|
88
88
|
};
|
89
|
-
function useToggle(defaultValue
|
89
|
+
function useToggle(defaultValue) {
|
90
|
+
if (defaultValue === void 0) {
|
91
|
+
defaultValue = false;
|
92
|
+
}
|
90
93
|
var state = vue.ref(defaultValue);
|
91
|
-
var toggle = (value
|
94
|
+
var toggle = function(value) {
|
95
|
+
if (value === void 0) {
|
96
|
+
value = !state.value;
|
97
|
+
}
|
92
98
|
state.value = value;
|
93
99
|
};
|
94
100
|
return [state, toggle];
|
@@ -257,7 +263,10 @@
|
|
257
263
|
tick();
|
258
264
|
}
|
259
265
|
};
|
260
|
-
var reset = (totalTime
|
266
|
+
var reset = function(totalTime) {
|
267
|
+
if (totalTime === void 0) {
|
268
|
+
totalTime = options.time;
|
269
|
+
}
|
261
270
|
pause();
|
262
271
|
remain.value = totalTime;
|
263
272
|
};
|
@@ -296,7 +305,10 @@
|
|
296
305
|
}
|
297
306
|
});
|
298
307
|
}
|
299
|
-
function useEventListener(type, listener, options
|
308
|
+
function useEventListener(type, listener, options) {
|
309
|
+
if (options === void 0) {
|
310
|
+
options = {};
|
311
|
+
}
|
300
312
|
if (!inBrowser) {
|
301
313
|
return;
|
302
314
|
}
|
@@ -333,7 +345,10 @@
|
|
333
345
|
});
|
334
346
|
}
|
335
347
|
}
|
336
|
-
function useClickAway(target, listener, options
|
348
|
+
function useClickAway(target, listener, options) {
|
349
|
+
if (options === void 0) {
|
350
|
+
options = {};
|
351
|
+
}
|
337
352
|
if (!inBrowser) {
|
338
353
|
return;
|
339
354
|
}
|
@@ -350,15 +365,22 @@
|
|
350
365
|
target: document
|
351
366
|
});
|
352
367
|
}
|
368
|
+
var width;
|
369
|
+
var height;
|
353
370
|
function useWindowSize() {
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
371
|
+
if (!width) {
|
372
|
+
width = vue.ref(0);
|
373
|
+
height = vue.ref(0);
|
374
|
+
var update = () => {
|
375
|
+
if (inBrowser) {
|
376
|
+
width.value = window.innerWidth;
|
377
|
+
height.value = window.innerHeight;
|
378
|
+
}
|
379
|
+
};
|
380
|
+
update();
|
381
|
+
useEventListener("resize", update);
|
382
|
+
useEventListener("orientationchange", update);
|
383
|
+
}
|
362
384
|
return {
|
363
385
|
width,
|
364
386
|
height
|
@@ -370,7 +392,10 @@
|
|
370
392
|
var ELEMENT_NODE_TYPE = 1;
|
371
393
|
return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
|
372
394
|
}
|
373
|
-
function getScrollParent$1(el, root
|
395
|
+
function getScrollParent$1(el, root) {
|
396
|
+
if (root === void 0) {
|
397
|
+
root = defaultRoot;
|
398
|
+
}
|
374
399
|
var node = el;
|
375
400
|
while (node && node !== root && isElement$1(node)) {
|
376
401
|
var {
|
@@ -383,7 +408,10 @@
|
|
383
408
|
}
|
384
409
|
return root;
|
385
410
|
}
|
386
|
-
function useScrollParent(el, root
|
411
|
+
function useScrollParent(el, root) {
|
412
|
+
if (root === void 0) {
|
413
|
+
root = defaultRoot;
|
414
|
+
}
|
387
415
|
var scrollParent = vue.ref();
|
388
416
|
vue.onMounted(() => {
|
389
417
|
if (el.value) {
|
@@ -2742,21 +2770,21 @@
|
|
2742
2770
|
function resizeTextarea(input, autosize) {
|
2743
2771
|
var scrollTop = getRootScrollTop();
|
2744
2772
|
input.style.height = "auto";
|
2745
|
-
var
|
2773
|
+
var height2 = input.scrollHeight;
|
2746
2774
|
if (isObject$1(autosize)) {
|
2747
2775
|
var {
|
2748
2776
|
maxHeight,
|
2749
2777
|
minHeight
|
2750
2778
|
} = autosize;
|
2751
2779
|
if (maxHeight !== void 0) {
|
2752
|
-
|
2780
|
+
height2 = Math.min(height2, maxHeight);
|
2753
2781
|
}
|
2754
2782
|
if (minHeight !== void 0) {
|
2755
|
-
|
2783
|
+
height2 = Math.max(height2, minHeight);
|
2756
2784
|
}
|
2757
2785
|
}
|
2758
|
-
if (
|
2759
|
-
input.style.height =
|
2786
|
+
if (height2) {
|
2787
|
+
input.style.height = height2 + "px";
|
2760
2788
|
setRootScrollTop(scrollTop);
|
2761
2789
|
}
|
2762
2790
|
}
|
@@ -4449,11 +4477,11 @@
|
|
4449
4477
|
}
|
4450
4478
|
var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
4451
4479
|
var useHeight = (element) => {
|
4452
|
-
var
|
4480
|
+
var height2 = vue.ref();
|
4453
4481
|
vue.onMounted(() => vue.nextTick(() => {
|
4454
|
-
|
4482
|
+
height2.value = useRect(element).height;
|
4455
4483
|
}));
|
4456
|
-
return
|
4484
|
+
return height2;
|
4457
4485
|
};
|
4458
4486
|
var [name$14] = createNamespace("calendar-day");
|
4459
4487
|
var CalendarDay = vue.defineComponent({
|
@@ -4603,7 +4631,7 @@
|
|
4603
4631
|
var [visible, setVisible] = useToggle();
|
4604
4632
|
var daysRef = vue.ref();
|
4605
4633
|
var monthRef = vue.ref();
|
4606
|
-
var
|
4634
|
+
var height2 = useHeight(monthRef);
|
4607
4635
|
var title = vue.computed(() => formatMonthTitle(props.date));
|
4608
4636
|
var rowHeight = vue.computed(() => addUnit(props.rowHeight));
|
4609
4637
|
var offset2 = vue.computed(() => {
|
@@ -4758,7 +4786,7 @@
|
|
4758
4786
|
}, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
4759
4787
|
useExpose({
|
4760
4788
|
getTitle,
|
4761
|
-
getHeight: () =>
|
4789
|
+
getHeight: () => height2.value,
|
4762
4790
|
setVisible,
|
4763
4791
|
scrollIntoView,
|
4764
4792
|
disabledDays
|
@@ -4960,12 +4988,12 @@
|
|
4960
4988
|
if (bottom2 > heightSum && top2 > 0) {
|
4961
4989
|
return;
|
4962
4990
|
}
|
4963
|
-
var
|
4991
|
+
var height2 = 0;
|
4964
4992
|
var currentMonth;
|
4965
4993
|
var visibleRange = [-1, -1];
|
4966
4994
|
for (var i = 0; i < months.value.length; i++) {
|
4967
4995
|
var month = monthRefs.value[i];
|
4968
|
-
var visible =
|
4996
|
+
var visible = height2 <= bottom2 && height2 + heights[i] >= top2;
|
4969
4997
|
if (visible) {
|
4970
4998
|
visibleRange[1] = i;
|
4971
4999
|
if (!currentMonth) {
|
@@ -4980,7 +5008,7 @@
|
|
4980
5008
|
});
|
4981
5009
|
}
|
4982
5010
|
}
|
4983
|
-
|
5011
|
+
height2 += heights[i];
|
4984
5012
|
}
|
4985
5013
|
months.value.forEach((month2, index2) => {
|
4986
5014
|
var visible2 = index2 >= visibleRange[0] - 1 && index2 <= visibleRange[1] + 1;
|
@@ -5563,13 +5591,13 @@
|
|
5563
5591
|
var rootStyle = vue.computed(() => {
|
5564
5592
|
var {
|
5565
5593
|
fixed,
|
5566
|
-
height,
|
5567
|
-
width
|
5594
|
+
height: height2,
|
5595
|
+
width: width2
|
5568
5596
|
} = state;
|
5569
5597
|
if (fixed) {
|
5570
5598
|
return {
|
5571
|
-
width:
|
5572
|
-
height:
|
5599
|
+
width: width2 + "px",
|
5600
|
+
height: height2 + "px"
|
5573
5601
|
};
|
5574
5602
|
}
|
5575
5603
|
});
|
@@ -6223,9 +6251,9 @@
|
|
6223
6251
|
lineStyle.transitionDuration = props.duration + "s";
|
6224
6252
|
}
|
6225
6253
|
if (isDef(lineHeight)) {
|
6226
|
-
var
|
6227
|
-
lineStyle.height =
|
6228
|
-
lineStyle.borderRadius =
|
6254
|
+
var height2 = addUnit(lineHeight);
|
6255
|
+
lineStyle.height = height2;
|
6256
|
+
lineStyle.borderRadius = height2;
|
6229
6257
|
}
|
6230
6258
|
state.lineStyle = lineStyle;
|
6231
6259
|
});
|
@@ -6281,12 +6309,6 @@
|
|
6281
6309
|
disabled
|
6282
6310
|
} = children[index2];
|
6283
6311
|
var name2 = getTabName(children[index2], index2);
|
6284
|
-
emit("click-tab", {
|
6285
|
-
name: name2,
|
6286
|
-
title,
|
6287
|
-
event,
|
6288
|
-
disabled
|
6289
|
-
});
|
6290
6312
|
if (disabled) {
|
6291
6313
|
emit("disabled", name2, title);
|
6292
6314
|
} else {
|
@@ -6300,6 +6322,12 @@
|
|
6300
6322
|
emit("click", name2, title);
|
6301
6323
|
route(item);
|
6302
6324
|
}
|
6325
|
+
emit("click-tab", {
|
6326
|
+
name: name2,
|
6327
|
+
title,
|
6328
|
+
event,
|
6329
|
+
disabled
|
6330
|
+
});
|
6303
6331
|
};
|
6304
6332
|
var onStickyScroll = (params) => {
|
6305
6333
|
stickyFixed = params.isFixed;
|
@@ -6756,6 +6784,7 @@
|
|
6756
6784
|
"class": bem$T("options")
|
6757
6785
|
}, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
|
6758
6786
|
var renderTab = (tab, tabIndex) => {
|
6787
|
+
var _slots$optionsTop, _slots$optionsBottom;
|
6759
6788
|
var {
|
6760
6789
|
options,
|
6761
6790
|
selected
|
@@ -6768,9 +6797,11 @@
|
|
6768
6797
|
unselected: !selected
|
6769
6798
|
})
|
6770
6799
|
}, {
|
6771
|
-
default: () => [slots["options-top"] ? slots
|
6772
|
-
tabIndex
|
6773
|
-
})
|
6800
|
+
default: () => [(_slots$optionsTop = slots["options-top"]) == null ? void 0 : _slots$optionsTop.call(slots, {
|
6801
|
+
tabIndex
|
6802
|
+
}), renderOptions(options, selected, tabIndex), (_slots$optionsBottom = slots["options-bottom"]) == null ? void 0 : _slots$optionsBottom.call(slots, {
|
6803
|
+
tabIndex
|
6804
|
+
})]
|
6774
6805
|
});
|
6775
6806
|
};
|
6776
6807
|
var renderTabs = () => vue.createVNode(Tabs, {
|
@@ -8732,7 +8763,7 @@
|
|
8732
8763
|
};
|
8733
8764
|
return () => {
|
8734
8765
|
var {
|
8735
|
-
width,
|
8766
|
+
width: width2,
|
8736
8767
|
title,
|
8737
8768
|
theme,
|
8738
8769
|
message,
|
@@ -8742,7 +8773,7 @@
|
|
8742
8773
|
"role": "dialog",
|
8743
8774
|
"class": [bem$B([theme]), className],
|
8744
8775
|
"style": {
|
8745
|
-
width: addUnit(
|
8776
|
+
width: addUnit(width2)
|
8746
8777
|
},
|
8747
8778
|
"aria-labelledby": title || message,
|
8748
8779
|
"onUpdate:show": updateShow
|
@@ -10235,7 +10266,12 @@
|
|
10235
10266
|
}
|
10236
10267
|
return bestSelectedSrc;
|
10237
10268
|
}
|
10238
|
-
var getDPR = (scale
|
10269
|
+
var getDPR = function(scale) {
|
10270
|
+
if (scale === void 0) {
|
10271
|
+
scale = 1;
|
10272
|
+
}
|
10273
|
+
return inBrowser ? window.devicePixelRatio || scale : scale;
|
10274
|
+
};
|
10239
10275
|
function supportWebp() {
|
10240
10276
|
if (!inBrowser)
|
10241
10277
|
return false;
|
@@ -10253,7 +10289,10 @@
|
|
10253
10289
|
function throttle(action, delay) {
|
10254
10290
|
var timeout = null;
|
10255
10291
|
var lastRun = 0;
|
10256
|
-
return function(
|
10292
|
+
return function() {
|
10293
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
10294
|
+
args[_key] = arguments[_key];
|
10295
|
+
}
|
10257
10296
|
if (timeout) {
|
10258
10297
|
return;
|
10259
10298
|
}
|
@@ -10302,9 +10341,10 @@
|
|
10302
10341
|
function noop() {
|
10303
10342
|
}
|
10304
10343
|
class ImageCache {
|
10305
|
-
constructor({
|
10306
|
-
|
10307
|
-
|
10344
|
+
constructor(_ref) {
|
10345
|
+
var {
|
10346
|
+
max
|
10347
|
+
} = _ref;
|
10308
10348
|
this.options = {
|
10309
10349
|
max: max || 100
|
10310
10350
|
};
|
@@ -10326,18 +10366,19 @@
|
|
10326
10366
|
}
|
10327
10367
|
}
|
10328
10368
|
class ReactiveListener {
|
10329
|
-
constructor({
|
10330
|
-
|
10331
|
-
|
10332
|
-
|
10333
|
-
|
10334
|
-
|
10335
|
-
|
10336
|
-
|
10337
|
-
|
10338
|
-
|
10339
|
-
|
10340
|
-
|
10369
|
+
constructor(_ref) {
|
10370
|
+
var {
|
10371
|
+
el,
|
10372
|
+
src,
|
10373
|
+
error,
|
10374
|
+
loading,
|
10375
|
+
bindType,
|
10376
|
+
$parent,
|
10377
|
+
options,
|
10378
|
+
cors,
|
10379
|
+
elRenderer,
|
10380
|
+
imageCache
|
10381
|
+
} = _ref;
|
10341
10382
|
this.el = el;
|
10342
10383
|
this.src = src;
|
10343
10384
|
this.error = error;
|
@@ -10376,11 +10417,12 @@
|
|
10376
10417
|
record(event) {
|
10377
10418
|
this.performanceData[event] = Date.now();
|
10378
10419
|
}
|
10379
|
-
update({
|
10380
|
-
|
10381
|
-
|
10382
|
-
|
10383
|
-
|
10420
|
+
update(_ref2) {
|
10421
|
+
var {
|
10422
|
+
src,
|
10423
|
+
loading,
|
10424
|
+
error
|
10425
|
+
} = _ref2;
|
10384
10426
|
var oldSrc = this.src;
|
10385
10427
|
this.src = src;
|
10386
10428
|
this.loading = loading;
|
@@ -10417,7 +10459,10 @@
|
|
10417
10459
|
this.state.loading = false;
|
10418
10460
|
});
|
10419
10461
|
}
|
10420
|
-
load(onFinish
|
10462
|
+
load(onFinish) {
|
10463
|
+
if (onFinish === void 0) {
|
10464
|
+
onFinish = noop;
|
10465
|
+
}
|
10421
10466
|
if (this.attempt > this.options.attempt - 1 && this.state.error) {
|
10422
10467
|
onFinish();
|
10423
10468
|
return;
|
@@ -10491,22 +10536,23 @@
|
|
10491
10536
|
};
|
10492
10537
|
function Lazy() {
|
10493
10538
|
return class Lazy {
|
10494
|
-
constructor({
|
10495
|
-
|
10496
|
-
|
10497
|
-
|
10498
|
-
|
10499
|
-
|
10500
|
-
|
10501
|
-
|
10502
|
-
|
10503
|
-
|
10504
|
-
|
10505
|
-
|
10506
|
-
|
10507
|
-
|
10508
|
-
|
10509
|
-
|
10539
|
+
constructor(_ref) {
|
10540
|
+
var {
|
10541
|
+
preLoad,
|
10542
|
+
error,
|
10543
|
+
throttleWait,
|
10544
|
+
preLoadTop,
|
10545
|
+
dispatchEvent,
|
10546
|
+
loading,
|
10547
|
+
attempt,
|
10548
|
+
silent = true,
|
10549
|
+
scale,
|
10550
|
+
listenEvents,
|
10551
|
+
filter,
|
10552
|
+
adapter,
|
10553
|
+
observer,
|
10554
|
+
observerOptions
|
10555
|
+
} = _ref;
|
10510
10556
|
this.mode = modeType.event;
|
10511
10557
|
this.ListenerQueue = [];
|
10512
10558
|
this.TargetIndex = 0;
|
@@ -10536,7 +10582,10 @@
|
|
10536
10582
|
this.lazyLoadHandler = throttle(this._lazyLoadHandler.bind(this), this.options.throttleWait);
|
10537
10583
|
this.setMode(this.options.observer ? modeType.observer : modeType.event);
|
10538
10584
|
}
|
10539
|
-
config(options
|
10585
|
+
config(options) {
|
10586
|
+
if (options === void 0) {
|
10587
|
+
options = {};
|
10588
|
+
}
|
10540
10589
|
Object.assign(this.options, options);
|
10541
10590
|
}
|
10542
10591
|
performance() {
|
@@ -10695,6 +10744,7 @@
|
|
10695
10744
|
this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
|
10696
10745
|
}
|
10697
10746
|
_initEvent() {
|
10747
|
+
var _this = this;
|
10698
10748
|
this.Event = {
|
10699
10749
|
listeners: {
|
10700
10750
|
loading: [],
|
@@ -10708,9 +10758,12 @@
|
|
10708
10758
|
this.Event.listeners[event].push(func);
|
10709
10759
|
};
|
10710
10760
|
this.$once = (event, func) => {
|
10711
|
-
var on2 = (
|
10712
|
-
|
10713
|
-
|
10761
|
+
var on2 = function() {
|
10762
|
+
_this.$off(event, on2);
|
10763
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
10764
|
+
args[_key] = arguments[_key];
|
10765
|
+
}
|
10766
|
+
func.apply(_this, args);
|
10714
10767
|
};
|
10715
10768
|
this.$on(event, on2);
|
10716
10769
|
};
|
@@ -10877,12 +10930,13 @@
|
|
10877
10930
|
selector: "img"
|
10878
10931
|
};
|
10879
10932
|
class LazyContainer {
|
10880
|
-
constructor({
|
10881
|
-
|
10882
|
-
|
10883
|
-
|
10884
|
-
|
10885
|
-
|
10933
|
+
constructor(_ref) {
|
10934
|
+
var {
|
10935
|
+
el,
|
10936
|
+
binding,
|
10937
|
+
vnode,
|
10938
|
+
lazy
|
10939
|
+
} = _ref;
|
10886
10940
|
this.el = null;
|
10887
10941
|
this.vnode = vnode;
|
10888
10942
|
this.binding = binding;
|
@@ -10894,10 +10948,11 @@
|
|
10894
10948
|
binding
|
10895
10949
|
});
|
10896
10950
|
}
|
10897
|
-
update({
|
10898
|
-
|
10899
|
-
|
10900
|
-
|
10951
|
+
update(_ref2) {
|
10952
|
+
var {
|
10953
|
+
el,
|
10954
|
+
binding
|
10955
|
+
} = _ref2;
|
10901
10956
|
this.el = el;
|
10902
10957
|
this.options = Object.assign({}, defaultOptions, binding.value);
|
10903
10958
|
var imgs = this.getImgs();
|
@@ -10923,9 +10978,10 @@
|
|
10923
10978
|
}
|
10924
10979
|
}
|
10925
10980
|
class LazyContainerManager {
|
10926
|
-
constructor({
|
10927
|
-
|
10928
|
-
|
10981
|
+
constructor(_ref3) {
|
10982
|
+
var {
|
10983
|
+
lazy
|
10984
|
+
} = _ref3;
|
10929
10985
|
this.lazy = lazy;
|
10930
10986
|
this._queue = [];
|
10931
10987
|
}
|
@@ -11028,7 +11084,10 @@
|
|
11028
11084
|
this.getRect();
|
11029
11085
|
return inBrowser && this.rect.top < window.innerHeight * lazyManager.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * lazyManager.options.preLoad && this.rect.right > 0;
|
11030
11086
|
},
|
11031
|
-
load(onFinish
|
11087
|
+
load(onFinish) {
|
11088
|
+
if (onFinish === void 0) {
|
11089
|
+
onFinish = noop;
|
11090
|
+
}
|
11032
11091
|
if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
|
11033
11092
|
onFinish();
|
11034
11093
|
return;
|
@@ -11038,9 +11097,10 @@
|
|
11038
11097
|
} = this.options;
|
11039
11098
|
loadImageAsync({
|
11040
11099
|
src
|
11041
|
-
}, ({
|
11042
|
-
|
11043
|
-
|
11100
|
+
}, (_ref) => {
|
11101
|
+
var {
|
11102
|
+
src: src2
|
11103
|
+
} = _ref;
|
11044
11104
|
this.renderSrc = src2;
|
11045
11105
|
this.state.loaded = true;
|
11046
11106
|
}, () => {
|
@@ -11052,7 +11112,10 @@
|
|
11052
11112
|
}
|
11053
11113
|
});
|
11054
11114
|
var Lazyload = {
|
11055
|
-
install(app, options
|
11115
|
+
install(app, options) {
|
11116
|
+
if (options === void 0) {
|
11117
|
+
options = {};
|
11118
|
+
}
|
11056
11119
|
var LazyClass = Lazy();
|
11057
11120
|
var lazy = new LazyClass(options);
|
11058
11121
|
var lazyContainer = new LazyContainerManager({
|
@@ -11205,11 +11268,11 @@
|
|
11205
11268
|
});
|
11206
11269
|
var List = withInstall(_List);
|
11207
11270
|
function usePlaceholder(contentRef, bem2) {
|
11208
|
-
var
|
11271
|
+
var height2 = useHeight(contentRef);
|
11209
11272
|
return (renderContent) => vue.createVNode("div", {
|
11210
11273
|
"class": bem2("placeholder"),
|
11211
11274
|
"style": {
|
11212
|
-
height:
|
11275
|
+
height: height2.value ? height2.value + "px" : void 0
|
11213
11276
|
}
|
11214
11277
|
}, [renderContent()]);
|
11215
11278
|
}
|
@@ -11978,17 +12041,18 @@
|
|
11978
12041
|
});
|
11979
12042
|
var Pagination = withInstall(_Pagination);
|
11980
12043
|
var [name$j, bem$j] = createNamespace("password-input");
|
12044
|
+
var passwordInputProps = {
|
12045
|
+
info: String,
|
12046
|
+
mask: truthProp,
|
12047
|
+
value: makeStringProp(""),
|
12048
|
+
gutter: numericProp,
|
12049
|
+
length: makeNumericProp(6),
|
12050
|
+
focused: Boolean,
|
12051
|
+
errorInfo: String
|
12052
|
+
};
|
11981
12053
|
var _PasswordInput = vue.defineComponent({
|
11982
12054
|
name: name$j,
|
11983
|
-
props:
|
11984
|
-
info: String,
|
11985
|
-
mask: truthProp,
|
11986
|
-
value: makeStringProp(""),
|
11987
|
-
gutter: numericProp,
|
11988
|
-
length: makeNumericProp(6),
|
11989
|
-
focused: Boolean,
|
11990
|
-
errorInfo: String
|
11991
|
-
},
|
12055
|
+
props: passwordInputProps,
|
11992
12056
|
emits: ["focus"],
|
11993
12057
|
setup(props, _ref) {
|
11994
12058
|
var {
|
@@ -12050,17 +12114,19 @@
|
|
12050
12114
|
}
|
12051
12115
|
});
|
12052
12116
|
var PasswordInput = withInstall(_PasswordInput);
|
12053
|
-
function getBoundingClientRect(element) {
|
12117
|
+
function getBoundingClientRect(element, includeScale) {
|
12054
12118
|
var rect = element.getBoundingClientRect();
|
12119
|
+
var scaleX = 1;
|
12120
|
+
var scaleY = 1;
|
12055
12121
|
return {
|
12056
|
-
width: rect.width,
|
12057
|
-
height: rect.height,
|
12058
|
-
top: rect.top,
|
12059
|
-
right: rect.right,
|
12060
|
-
bottom: rect.bottom,
|
12061
|
-
left: rect.left,
|
12062
|
-
x: rect.left,
|
12063
|
-
y: rect.top
|
12122
|
+
width: rect.width / scaleX,
|
12123
|
+
height: rect.height / scaleY,
|
12124
|
+
top: rect.top / scaleY,
|
12125
|
+
right: rect.right / scaleX,
|
12126
|
+
bottom: rect.bottom / scaleY,
|
12127
|
+
left: rect.left / scaleX,
|
12128
|
+
x: rect.left / scaleX,
|
12129
|
+
y: rect.top / scaleY
|
12064
12130
|
};
|
12065
12131
|
}
|
12066
12132
|
function getWindow(node) {
|
@@ -12126,13 +12192,20 @@
|
|
12126
12192
|
var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
|
12127
12193
|
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
12128
12194
|
}
|
12195
|
+
function isElementScaled(element) {
|
12196
|
+
var rect = element.getBoundingClientRect();
|
12197
|
+
var scaleX = rect.width / element.offsetWidth || 1;
|
12198
|
+
var scaleY = rect.height / element.offsetHeight || 1;
|
12199
|
+
return scaleX !== 1 || scaleY !== 1;
|
12200
|
+
}
|
12129
12201
|
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
12130
12202
|
if (isFixed === void 0) {
|
12131
12203
|
isFixed = false;
|
12132
12204
|
}
|
12205
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
12206
|
+
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
12133
12207
|
var documentElement = getDocumentElement(offsetParent);
|
12134
12208
|
var rect = getBoundingClientRect(elementOrVirtualElement);
|
12135
|
-
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
12136
12209
|
var scroll = {
|
12137
12210
|
scrollLeft: 0,
|
12138
12211
|
scrollTop: 0
|
@@ -12162,19 +12235,19 @@
|
|
12162
12235
|
}
|
12163
12236
|
function getLayoutRect(element) {
|
12164
12237
|
var clientRect = getBoundingClientRect(element);
|
12165
|
-
var
|
12166
|
-
var
|
12167
|
-
if (Math.abs(clientRect.width -
|
12168
|
-
|
12238
|
+
var width2 = element.offsetWidth;
|
12239
|
+
var height2 = element.offsetHeight;
|
12240
|
+
if (Math.abs(clientRect.width - width2) <= 1) {
|
12241
|
+
width2 = clientRect.width;
|
12169
12242
|
}
|
12170
|
-
if (Math.abs(clientRect.height -
|
12171
|
-
|
12243
|
+
if (Math.abs(clientRect.height - height2) <= 1) {
|
12244
|
+
height2 = clientRect.height;
|
12172
12245
|
}
|
12173
12246
|
return {
|
12174
12247
|
x: element.offsetLeft,
|
12175
12248
|
y: element.offsetTop,
|
12176
|
-
width,
|
12177
|
-
height
|
12249
|
+
width: width2,
|
12250
|
+
height: height2
|
12178
12251
|
};
|
12179
12252
|
}
|
12180
12253
|
function getParentNode(element) {
|
@@ -12427,7 +12500,8 @@
|
|
12427
12500
|
var isDestroyed = false;
|
12428
12501
|
var instance2 = {
|
12429
12502
|
state,
|
12430
|
-
setOptions: function setOptions(
|
12503
|
+
setOptions: function setOptions(setOptionsAction) {
|
12504
|
+
var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
|
12431
12505
|
cleanupModifierEffects();
|
12432
12506
|
state.options = Object.assign({}, defaultOptions2, state.options, options2);
|
12433
12507
|
state.scrollParents = {
|
@@ -12522,7 +12596,7 @@
|
|
12522
12596
|
var passive = {
|
12523
12597
|
passive: true
|
12524
12598
|
};
|
12525
|
-
function effect(_ref) {
|
12599
|
+
function effect$1(_ref) {
|
12526
12600
|
var state = _ref.state, instance2 = _ref.instance, options = _ref.options;
|
12527
12601
|
var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
|
12528
12602
|
var window2 = getWindow(state.elements.popper);
|
@@ -12552,7 +12626,7 @@
|
|
12552
12626
|
phase: "write",
|
12553
12627
|
fn: function fn() {
|
12554
12628
|
},
|
12555
|
-
effect,
|
12629
|
+
effect: effect$1,
|
12556
12630
|
data: {}
|
12557
12631
|
};
|
12558
12632
|
function popperOffsets(_ref) {
|
@@ -12588,7 +12662,7 @@
|
|
12588
12662
|
}
|
12589
12663
|
function mapToStyles(_ref2) {
|
12590
12664
|
var _Object$assign2;
|
12591
|
-
var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets;
|
12665
|
+
var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets;
|
12592
12666
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y;
|
12593
12667
|
var hasX = offsets.hasOwnProperty("x");
|
12594
12668
|
var hasY = offsets.hasOwnProperty("y");
|
@@ -12601,18 +12675,18 @@
|
|
12601
12675
|
var widthProp = "clientWidth";
|
12602
12676
|
if (offsetParent === getWindow(popper)) {
|
12603
12677
|
offsetParent = getDocumentElement(popper);
|
12604
|
-
if (getComputedStyle(offsetParent).position !== "static") {
|
12678
|
+
if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
|
12605
12679
|
heightProp = "scrollHeight";
|
12606
12680
|
widthProp = "scrollWidth";
|
12607
12681
|
}
|
12608
12682
|
}
|
12609
12683
|
offsetParent = offsetParent;
|
12610
|
-
if (placement === top) {
|
12684
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
12611
12685
|
sideY = bottom;
|
12612
12686
|
y -= offsetParent[heightProp] - popperRect.height;
|
12613
12687
|
y *= gpuAcceleration ? 1 : -1;
|
12614
12688
|
}
|
12615
|
-
if (placement === left) {
|
12689
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
12616
12690
|
sideX = right;
|
12617
12691
|
x -= offsetParent[widthProp] - popperRect.width;
|
12618
12692
|
x *= gpuAcceleration ? 1 : -1;
|
@@ -12623,7 +12697,7 @@
|
|
12623
12697
|
}, adaptive && unsetSides);
|
12624
12698
|
if (gpuAcceleration) {
|
12625
12699
|
var _Object$assign;
|
12626
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1)
|
12700
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
12627
12701
|
}
|
12628
12702
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
12629
12703
|
}
|
@@ -12632,6 +12706,7 @@
|
|
12632
12706
|
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
12633
12707
|
var commonStyles = {
|
12634
12708
|
placement: getBasePlacement(state.placement),
|
12709
|
+
variation: getVariation(state.placement),
|
12635
12710
|
popper: state.elements.popper,
|
12636
12711
|
popperRect: state.rects.popper,
|
12637
12712
|
gpuAcceleration
|
@@ -12683,7 +12758,7 @@
|
|
12683
12758
|
});
|
12684
12759
|
});
|
12685
12760
|
}
|
12686
|
-
function effect
|
12761
|
+
function effect(_ref2) {
|
12687
12762
|
var state = _ref2.state;
|
12688
12763
|
var initialStyles = {
|
12689
12764
|
popper: {
|
@@ -12726,7 +12801,7 @@
|
|
12726
12801
|
enabled: true,
|
12727
12802
|
phase: "write",
|
12728
12803
|
fn: applyStyles,
|
12729
|
-
effect
|
12804
|
+
effect,
|
12730
12805
|
requires: ["computeStyles"]
|
12731
12806
|
};
|
12732
12807
|
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
|
@@ -12981,8 +13056,8 @@
|
|
12981
13056
|
height: addUnit(strokeWidth)
|
12982
13057
|
};
|
12983
13058
|
var portionStyle = {
|
12984
|
-
|
12985
|
-
|
13059
|
+
width: percentage + "%",
|
13060
|
+
background: background.value
|
12986
13061
|
};
|
12987
13062
|
return vue.createVNode("div", {
|
12988
13063
|
"class": bem$h(),
|
@@ -14512,8 +14587,8 @@
|
|
14512
14587
|
var offset2 = Math.abs(state.offset);
|
14513
14588
|
var THRESHOLD = 0.15;
|
14514
14589
|
var threshold = opened ? 1 - THRESHOLD : THRESHOLD;
|
14515
|
-
var
|
14516
|
-
if (
|
14590
|
+
var width2 = side === "left" ? leftWidth.value : rightWidth.value;
|
14591
|
+
if (width2 && offset2 > width2 * threshold) {
|
14517
14592
|
open(side);
|
14518
14593
|
} else {
|
14519
14594
|
close(side);
|
@@ -15287,7 +15362,7 @@
|
|
15287
15362
|
}
|
15288
15363
|
});
|
15289
15364
|
var Uploader = withInstall(_Uploader);
|
15290
|
-
var version = "3.2.
|
15365
|
+
var version = "3.2.8";
|
15291
15366
|
function install(app) {
|
15292
15367
|
var components = [ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1, ImagePreview, IndexAnchor, IndexBar, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
|
15293
15368
|
components.forEach((item) => {
|