vant 3.3.6 → 3.3.7
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/badge/Badge.d.ts +12 -0
- package/es/badge/Badge.js +4 -3
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +8 -1
- package/es/badge/index.less +22 -1
- package/es/calendar/Calendar.d.ts +2 -2
- package/es/calendar/index.d.ts +2 -2
- package/es/datetime-picker/DatePicker.js +2 -2
- package/es/datetime-picker/TimePicker.js +2 -2
- package/es/datetime-picker/utils.d.ts +2 -0
- package/es/datetime-picker/utils.js +17 -1
- package/es/field/Field.js +5 -5
- package/es/field/utils.d.ts +2 -0
- package/es/field/utils.js +9 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/pagination/Pagination.js +3 -3
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/index.d.ts +2 -2
- package/es/toast/Toast.d.ts +2 -2
- package/lib/badge/Badge.d.ts +12 -0
- package/lib/badge/Badge.js +4 -3
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +8 -1
- package/lib/badge/index.less +22 -1
- package/lib/calendar/Calendar.d.ts +2 -2
- package/lib/calendar/index.d.ts +2 -2
- package/lib/datetime-picker/DatePicker.js +1 -1
- package/lib/datetime-picker/TimePicker.js +1 -1
- package/lib/datetime-picker/utils.d.ts +2 -0
- package/lib/datetime-picker/utils.js +22 -3
- package/lib/field/Field.js +4 -4
- package/lib/field/utils.d.ts +2 -0
- package/lib/field/utils.js +13 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/pagination/Pagination.js +3 -3
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/index.d.ts +2 -2
- package/lib/toast/Toast.d.ts +2 -2
- package/lib/vant.cjs.js +34 -13
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +34 -13
- package/lib/vant.es.min.js +34 -13
- package/lib/vant.js +202 -55
- package/lib/vant.min.js +1 -1
- package/package.json +14 -12
- package/vetur/attributes.json +89 -85
- package/vetur/tags.json +26 -25
- package/vetur/web-types.json +217 -207
package/lib/vant.js
CHANGED
@@ -49,7 +49,7 @@
|
|
49
49
|
type: String,
|
50
50
|
default: defaultVal
|
51
51
|
});
|
52
|
-
|
52
|
+
var inBrowser = typeof window !== "undefined";
|
53
53
|
function raf(fn) {
|
54
54
|
return inBrowser ? requestAnimationFrame(fn) : -1;
|
55
55
|
}
|
@@ -61,8 +61,8 @@
|
|
61
61
|
function doubleRaf(fn) {
|
62
62
|
raf(() => raf(fn));
|
63
63
|
}
|
64
|
-
|
65
|
-
|
64
|
+
var isWindow = (val) => val === window;
|
65
|
+
var makeDOMRect = (width2, height2) => ({
|
66
66
|
top: 0,
|
67
67
|
left: 0,
|
68
68
|
right: width2,
|
@@ -70,7 +70,7 @@
|
|
70
70
|
width: width2,
|
71
71
|
height: height2
|
72
72
|
});
|
73
|
-
|
73
|
+
var useRect = (elementOrRef) => {
|
74
74
|
const element = vue.unref(elementOrRef);
|
75
75
|
if (isWindow(element)) {
|
76
76
|
const width2 = element.innerWidth;
|
@@ -167,10 +167,10 @@
|
|
167
167
|
linkChildren
|
168
168
|
};
|
169
169
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
170
|
+
var SECOND = 1e3;
|
171
|
+
var MINUTE = 60 * SECOND;
|
172
|
+
var HOUR = 60 * MINUTE;
|
173
|
+
var DAY = 24 * HOUR;
|
174
174
|
function parseTime(time) {
|
175
175
|
const days = Math.floor(time / DAY);
|
176
176
|
const hours = Math.floor(time % DAY / HOUR);
|
@@ -332,8 +332,8 @@
|
|
332
332
|
};
|
333
333
|
useEventListener(eventName, onClick, { target: document });
|
334
334
|
}
|
335
|
-
|
336
|
-
|
335
|
+
var width;
|
336
|
+
var height;
|
337
337
|
function useWindowSize() {
|
338
338
|
if (!width) {
|
339
339
|
width = vue.ref(0);
|
@@ -350,8 +350,8 @@
|
|
350
350
|
}
|
351
351
|
return { width, height };
|
352
352
|
}
|
353
|
-
|
354
|
-
|
353
|
+
var overflowScrollReg = /scroll|auto/i;
|
354
|
+
var defaultRoot = inBrowser ? window : void 0;
|
355
355
|
function isElement$1(node) {
|
356
356
|
const ELEMENT_NODE_TYPE = 1;
|
357
357
|
return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
|
@@ -376,7 +376,7 @@
|
|
376
376
|
});
|
377
377
|
return scrollParent;
|
378
378
|
}
|
379
|
-
|
379
|
+
var visibility;
|
380
380
|
function usePageVisibility() {
|
381
381
|
if (!visibility) {
|
382
382
|
visibility = vue.ref("visible");
|
@@ -390,7 +390,7 @@
|
|
390
390
|
}
|
391
391
|
return visibility;
|
392
392
|
}
|
393
|
-
|
393
|
+
var CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
|
394
394
|
function useCustomFieldValue(customValue) {
|
395
395
|
const field = vue.inject(CUSTOM_FIELD_INJECTION_KEY, null);
|
396
396
|
if (field && !field.customValue.value) {
|
@@ -829,7 +829,8 @@
|
|
829
829
|
color: String,
|
830
830
|
offset: Array,
|
831
831
|
content: numericProp,
|
832
|
-
showZero: truthProp
|
832
|
+
showZero: truthProp,
|
833
|
+
position: makeStringProp("top-right")
|
833
834
|
};
|
834
835
|
var _Badge = vue.defineComponent({
|
835
836
|
name: name$1t,
|
@@ -887,10 +888,10 @@
|
|
887
888
|
var renderBadge = () => {
|
888
889
|
if (hasContent() || props.dot) {
|
889
890
|
return vue.createVNode("div", {
|
890
|
-
"class": bem$1p({
|
891
|
+
"class": bem$1p([props.position, {
|
891
892
|
dot: props.dot,
|
892
893
|
fixed: !!slots.default
|
893
|
-
}),
|
894
|
+
}]),
|
894
895
|
"style": style.value
|
895
896
|
}, [renderContent()]);
|
896
897
|
}
|
@@ -2906,6 +2907,12 @@
|
|
2906
2907
|
type
|
2907
2908
|
};
|
2908
2909
|
}
|
2910
|
+
function getStringLength(str) {
|
2911
|
+
return [...str].length;
|
2912
|
+
}
|
2913
|
+
function cutString(str, maxlength) {
|
2914
|
+
return [...str].slice(0, maxlength).join("");
|
2915
|
+
}
|
2909
2916
|
var current = 0;
|
2910
2917
|
function useId() {
|
2911
2918
|
var vm = vue.getCurrentInstance();
|
@@ -3080,12 +3087,12 @@
|
|
3080
3087
|
var {
|
3081
3088
|
maxlength
|
3082
3089
|
} = props;
|
3083
|
-
if (isDef(maxlength) && value
|
3090
|
+
if (isDef(maxlength) && getStringLength(value) > maxlength) {
|
3084
3091
|
var modelValue = getModelValue();
|
3085
|
-
if (modelValue && modelValue
|
3092
|
+
if (modelValue && getStringLength(modelValue) === +maxlength) {
|
3086
3093
|
return modelValue;
|
3087
3094
|
}
|
3088
|
-
return value
|
3095
|
+
return cutString(value, +maxlength);
|
3089
3096
|
}
|
3090
3097
|
return value;
|
3091
3098
|
};
|
@@ -3249,7 +3256,7 @@
|
|
3249
3256
|
};
|
3250
3257
|
var renderWordLimit = () => {
|
3251
3258
|
if (props.showWordLimit && props.maxlength) {
|
3252
|
-
var count = getModelValue()
|
3259
|
+
var count = getStringLength(getModelValue());
|
3253
3260
|
return vue.createVNode("div", {
|
3254
3261
|
"class": bem$1a("word-limit")
|
3255
3262
|
}, [vue.createVNode("span", {
|
@@ -4575,6 +4582,20 @@
|
|
4575
4582
|
return parseInt(value, 10);
|
4576
4583
|
}
|
4577
4584
|
var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
4585
|
+
var proxyPickerMethods = (picker, callback) => {
|
4586
|
+
var methods = ["setValues", "setIndexes", "setColumnIndex", "setColumnValue"];
|
4587
|
+
return new Proxy(picker, {
|
4588
|
+
get: (target, prop) => {
|
4589
|
+
if (methods.includes(prop)) {
|
4590
|
+
return function() {
|
4591
|
+
target[prop](...arguments);
|
4592
|
+
callback();
|
4593
|
+
};
|
4594
|
+
}
|
4595
|
+
return target[prop];
|
4596
|
+
}
|
4597
|
+
});
|
4598
|
+
};
|
4578
4599
|
var useHeight = (element) => {
|
4579
4600
|
var height2 = vue.ref();
|
4580
4601
|
vue.onMounted(() => vue.nextTick(() => {
|
@@ -7139,7 +7160,7 @@
|
|
7139
7160
|
var CheckboxGroup = withInstall(_CheckboxGroup);
|
7140
7161
|
var [name$P, bem$O] = createNamespace("circle");
|
7141
7162
|
var uid = 0;
|
7142
|
-
var format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
7163
|
+
var format$1 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
7143
7164
|
function getPath(clockwise, viewBoxSize) {
|
7144
7165
|
var sweepFlag = clockwise ? 1 : 0;
|
7145
7166
|
return "M " + viewBoxSize / 2 + " " + viewBoxSize / 2 + " m 0, -500 a 500, 500 0 1, " + sweepFlag + " 0, 1000 a 500, 500 0 1, " + sweepFlag + " 0, -1000";
|
@@ -7188,13 +7209,13 @@
|
|
7188
7209
|
var rafId;
|
7189
7210
|
var startTime = Date.now();
|
7190
7211
|
var startRate = props.currentRate;
|
7191
|
-
var endRate = format(rate);
|
7212
|
+
var endRate = format$1(rate);
|
7192
7213
|
var duration = Math.abs((startRate - endRate) * 1e3 / +props.speed);
|
7193
7214
|
var animate = () => {
|
7194
7215
|
var now = Date.now();
|
7195
7216
|
var progress = Math.min((now - startTime) / duration, 1);
|
7196
7217
|
var rate2 = progress * (endRate - startRate) + startRate;
|
7197
|
-
emit("update:currentRate", format(parseFloat(rate2.toFixed(1))));
|
7218
|
+
emit("update:currentRate", format$1(parseFloat(rate2.toFixed(1))));
|
7198
7219
|
if (endRate > startRate ? rate2 < endRate : rate2 > endRate) {
|
7199
7220
|
rafId = raf(animate);
|
7200
7221
|
}
|
@@ -8309,7 +8330,7 @@
|
|
8309
8330
|
}
|
8310
8331
|
});
|
8311
8332
|
useExpose({
|
8312
|
-
getPicker: () => picker.value
|
8333
|
+
getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
|
8313
8334
|
});
|
8314
8335
|
return () => vue.createVNode(Picker, vue.mergeProps({
|
8315
8336
|
"ref": picker,
|
@@ -8552,7 +8573,7 @@
|
|
8552
8573
|
}
|
8553
8574
|
});
|
8554
8575
|
useExpose({
|
8555
|
-
getPicker: () => picker.value
|
8576
|
+
getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
|
8556
8577
|
});
|
8557
8578
|
return () => vue.createVNode(Picker, vue.mergeProps({
|
8558
8579
|
"ref": picker,
|
@@ -11992,7 +12013,7 @@
|
|
11992
12013
|
}, [vue.createVNode("button", {
|
11993
12014
|
"type": "button",
|
11994
12015
|
"disabled": disabled,
|
11995
|
-
"onClick": () => updateModelValue(modelValue - 1)
|
12016
|
+
"onClick": () => updateModelValue(modelValue - 1, true)
|
11996
12017
|
}, [slot ? slot() : props.prevText || t$5("prev")])]);
|
11997
12018
|
};
|
11998
12019
|
var renderNextButton = () => {
|
@@ -12011,7 +12032,7 @@
|
|
12011
12032
|
}, [vue.createVNode("button", {
|
12012
12033
|
"type": "button",
|
12013
12034
|
"disabled": disabled,
|
12014
|
-
"onClick": () => updateModelValue(modelValue + 1)
|
12035
|
+
"onClick": () => updateModelValue(modelValue + 1, true)
|
12015
12036
|
}, [slot ? slot() : props.nextText || t$5("next")])]);
|
12016
12037
|
};
|
12017
12038
|
var renderPages = () => pages.value.map((page) => vue.createVNode("li", {
|
@@ -12022,7 +12043,7 @@
|
|
12022
12043
|
}, [vue.createVNode("button", {
|
12023
12044
|
"type": "button",
|
12024
12045
|
"aria-current": page.active || void 0,
|
12025
|
-
"onClick": () => updateModelValue(page.number)
|
12046
|
+
"onClick": () => updateModelValue(page.number, true)
|
12026
12047
|
}, [slots.page ? slots.page(page) : page.text])]));
|
12027
12048
|
return () => vue.createVNode("nav", {
|
12028
12049
|
"role": "navigation",
|
@@ -12366,20 +12387,100 @@
|
|
12366
12387
|
}));
|
12367
12388
|
}, []);
|
12368
12389
|
}
|
12369
|
-
function debounce(
|
12390
|
+
function debounce(fn2) {
|
12370
12391
|
var pending;
|
12371
12392
|
return function() {
|
12372
12393
|
if (!pending) {
|
12373
12394
|
pending = new Promise(function(resolve) {
|
12374
12395
|
Promise.resolve().then(function() {
|
12375
12396
|
pending = void 0;
|
12376
|
-
resolve(
|
12397
|
+
resolve(fn2());
|
12377
12398
|
});
|
12378
12399
|
});
|
12379
12400
|
}
|
12380
12401
|
return pending;
|
12381
12402
|
};
|
12382
12403
|
}
|
12404
|
+
function format(str) {
|
12405
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
12406
|
+
args[_key - 1] = arguments[_key];
|
12407
|
+
}
|
12408
|
+
return [].concat(args).reduce(function(p, c) {
|
12409
|
+
return p.replace(/%s/, c);
|
12410
|
+
}, str);
|
12411
|
+
}
|
12412
|
+
var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
|
12413
|
+
var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
|
12414
|
+
var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
12415
|
+
function validateModifiers(modifiers) {
|
12416
|
+
modifiers.forEach(function(modifier) {
|
12417
|
+
[].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index2, self2) {
|
12418
|
+
return self2.indexOf(value) === index2;
|
12419
|
+
}).forEach(function(key) {
|
12420
|
+
switch (key) {
|
12421
|
+
case "name":
|
12422
|
+
if (typeof modifier.name !== "string") {
|
12423
|
+
console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
|
12424
|
+
}
|
12425
|
+
break;
|
12426
|
+
case "enabled":
|
12427
|
+
if (typeof modifier.enabled !== "boolean") {
|
12428
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
|
12429
|
+
}
|
12430
|
+
break;
|
12431
|
+
case "phase":
|
12432
|
+
if (modifierPhases.indexOf(modifier.phase) < 0) {
|
12433
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
|
12434
|
+
}
|
12435
|
+
break;
|
12436
|
+
case "fn":
|
12437
|
+
if (typeof modifier.fn !== "function") {
|
12438
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
|
12439
|
+
}
|
12440
|
+
break;
|
12441
|
+
case "effect":
|
12442
|
+
if (modifier.effect != null && typeof modifier.effect !== "function") {
|
12443
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
|
12444
|
+
}
|
12445
|
+
break;
|
12446
|
+
case "requires":
|
12447
|
+
if (modifier.requires != null && !Array.isArray(modifier.requires)) {
|
12448
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
|
12449
|
+
}
|
12450
|
+
break;
|
12451
|
+
case "requiresIfExists":
|
12452
|
+
if (!Array.isArray(modifier.requiresIfExists)) {
|
12453
|
+
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
|
12454
|
+
}
|
12455
|
+
break;
|
12456
|
+
case "options":
|
12457
|
+
case "data":
|
12458
|
+
break;
|
12459
|
+
default:
|
12460
|
+
console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
|
12461
|
+
return '"' + s + '"';
|
12462
|
+
}).join(", ") + '; but "' + key + '" was provided.');
|
12463
|
+
}
|
12464
|
+
modifier.requires && modifier.requires.forEach(function(requirement) {
|
12465
|
+
if (modifiers.find(function(mod) {
|
12466
|
+
return mod.name === requirement;
|
12467
|
+
}) == null) {
|
12468
|
+
console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
|
12469
|
+
}
|
12470
|
+
});
|
12471
|
+
});
|
12472
|
+
});
|
12473
|
+
}
|
12474
|
+
function uniqueBy(arr, fn2) {
|
12475
|
+
var identifiers = new Set();
|
12476
|
+
return arr.filter(function(item) {
|
12477
|
+
var identifier = fn2(item);
|
12478
|
+
if (!identifiers.has(identifier)) {
|
12479
|
+
identifiers.add(identifier);
|
12480
|
+
return true;
|
12481
|
+
}
|
12482
|
+
});
|
12483
|
+
}
|
12383
12484
|
function getBasePlacement(placement) {
|
12384
12485
|
return placement.split("-")[0];
|
12385
12486
|
}
|
@@ -12455,6 +12556,8 @@
|
|
12455
12556
|
}
|
12456
12557
|
return offsets;
|
12457
12558
|
}
|
12559
|
+
var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
|
12560
|
+
var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.";
|
12458
12561
|
var DEFAULT_OPTIONS = {
|
12459
12562
|
placement: "bottom",
|
12460
12563
|
modifiers: [],
|
@@ -12505,6 +12608,28 @@
|
|
12505
12608
|
state.orderedModifiers = orderedModifiers.filter(function(m) {
|
12506
12609
|
return m.enabled;
|
12507
12610
|
});
|
12611
|
+
{
|
12612
|
+
var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
|
12613
|
+
var name2 = _ref.name;
|
12614
|
+
return name2;
|
12615
|
+
});
|
12616
|
+
validateModifiers(modifiers);
|
12617
|
+
if (getBasePlacement(state.options.placement) === auto) {
|
12618
|
+
var flipModifier = state.orderedModifiers.find(function(_ref2) {
|
12619
|
+
var name2 = _ref2.name;
|
12620
|
+
return name2 === "flip";
|
12621
|
+
});
|
12622
|
+
if (!flipModifier) {
|
12623
|
+
console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
12624
|
+
}
|
12625
|
+
}
|
12626
|
+
var _getComputedStyle = getComputedStyle(popper), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
|
12627
|
+
if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
|
12628
|
+
return parseFloat(margin);
|
12629
|
+
})) {
|
12630
|
+
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
|
12631
|
+
}
|
12632
|
+
}
|
12508
12633
|
runModifierEffects();
|
12509
12634
|
return instance2.update();
|
12510
12635
|
},
|
@@ -12514,6 +12639,9 @@
|
|
12514
12639
|
}
|
12515
12640
|
var _state$elements = state.elements, reference2 = _state$elements.reference, popper2 = _state$elements.popper;
|
12516
12641
|
if (!areValidElements(reference2, popper2)) {
|
12642
|
+
{
|
12643
|
+
console.error(INVALID_ELEMENT_ERROR);
|
12644
|
+
}
|
12517
12645
|
return;
|
12518
12646
|
}
|
12519
12647
|
state.rects = {
|
@@ -12525,15 +12653,23 @@
|
|
12525
12653
|
state.orderedModifiers.forEach(function(modifier) {
|
12526
12654
|
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
12527
12655
|
});
|
12656
|
+
var __debug_loops__ = 0;
|
12528
12657
|
for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {
|
12658
|
+
{
|
12659
|
+
__debug_loops__ += 1;
|
12660
|
+
if (__debug_loops__ > 100) {
|
12661
|
+
console.error(INFINITE_LOOP_ERROR);
|
12662
|
+
break;
|
12663
|
+
}
|
12664
|
+
}
|
12529
12665
|
if (state.reset === true) {
|
12530
12666
|
state.reset = false;
|
12531
12667
|
index2 = -1;
|
12532
12668
|
continue;
|
12533
12669
|
}
|
12534
|
-
var _state$orderedModifie = state.orderedModifiers[index2],
|
12535
|
-
if (typeof
|
12536
|
-
state =
|
12670
|
+
var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name2 = _state$orderedModifie.name;
|
12671
|
+
if (typeof fn2 === "function") {
|
12672
|
+
state = fn2({
|
12537
12673
|
state,
|
12538
12674
|
options: _options,
|
12539
12675
|
name: name2,
|
@@ -12554,6 +12690,9 @@
|
|
12554
12690
|
}
|
12555
12691
|
};
|
12556
12692
|
if (!areValidElements(reference, popper)) {
|
12693
|
+
{
|
12694
|
+
console.error(INVALID_ELEMENT_ERROR);
|
12695
|
+
}
|
12557
12696
|
return instance2;
|
12558
12697
|
}
|
12559
12698
|
instance2.setOptions(options).then(function(state2) {
|
@@ -12563,9 +12702,9 @@
|
|
12563
12702
|
});
|
12564
12703
|
function runModifierEffects() {
|
12565
12704
|
state.orderedModifiers.forEach(function(_ref3) {
|
12566
|
-
var name2 = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options,
|
12567
|
-
if (typeof
|
12568
|
-
var cleanupFn =
|
12705
|
+
var name2 = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect3 = _ref3.effect;
|
12706
|
+
if (typeof effect3 === "function") {
|
12707
|
+
var cleanupFn = effect3({
|
12569
12708
|
state,
|
12570
12709
|
name: name2,
|
12571
12710
|
instance: instance2,
|
@@ -12578,8 +12717,8 @@
|
|
12578
12717
|
});
|
12579
12718
|
}
|
12580
12719
|
function cleanupModifierEffects() {
|
12581
|
-
effectCleanupFns.forEach(function(
|
12582
|
-
return
|
12720
|
+
effectCleanupFns.forEach(function(fn2) {
|
12721
|
+
return fn2();
|
12583
12722
|
});
|
12584
12723
|
effectCleanupFns = [];
|
12585
12724
|
}
|
@@ -12589,7 +12728,7 @@
|
|
12589
12728
|
var passive = {
|
12590
12729
|
passive: true
|
12591
12730
|
};
|
12592
|
-
function effect
|
12731
|
+
function effect(_ref) {
|
12593
12732
|
var state = _ref.state, instance2 = _ref.instance, options = _ref.options;
|
12594
12733
|
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;
|
12595
12734
|
var window2 = getWindow(state.elements.popper);
|
@@ -12613,13 +12752,13 @@
|
|
12613
12752
|
}
|
12614
12753
|
};
|
12615
12754
|
}
|
12616
|
-
var
|
12755
|
+
var eventListeners_default = {
|
12617
12756
|
name: "eventListeners",
|
12618
12757
|
enabled: true,
|
12619
12758
|
phase: "write",
|
12620
12759
|
fn: function fn() {
|
12621
12760
|
},
|
12622
|
-
effect
|
12761
|
+
effect,
|
12623
12762
|
data: {}
|
12624
12763
|
};
|
12625
12764
|
function popperOffsets(_ref) {
|
@@ -12631,7 +12770,7 @@
|
|
12631
12770
|
placement: state.placement
|
12632
12771
|
});
|
12633
12772
|
}
|
12634
|
-
var
|
12773
|
+
var popperOffsets_default = {
|
12635
12774
|
name: "popperOffsets",
|
12636
12775
|
enabled: true,
|
12637
12776
|
phase: "read",
|
@@ -12697,6 +12836,14 @@
|
|
12697
12836
|
function computeStyles(_ref4) {
|
12698
12837
|
var state = _ref4.state, options = _ref4.options;
|
12699
12838
|
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;
|
12839
|
+
{
|
12840
|
+
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || "";
|
12841
|
+
if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
|
12842
|
+
return transitionProperty.indexOf(property) >= 0;
|
12843
|
+
})) {
|
12844
|
+
console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
|
12845
|
+
}
|
12846
|
+
}
|
12700
12847
|
var commonStyles = {
|
12701
12848
|
placement: getBasePlacement(state.placement),
|
12702
12849
|
variation: getVariation(state.placement),
|
@@ -12724,7 +12871,7 @@
|
|
12724
12871
|
"data-popper-placement": state.placement
|
12725
12872
|
});
|
12726
12873
|
}
|
12727
|
-
var
|
12874
|
+
var computeStyles_default = {
|
12728
12875
|
name: "computeStyles",
|
12729
12876
|
enabled: true,
|
12730
12877
|
phase: "beforeWrite",
|
@@ -12741,17 +12888,17 @@
|
|
12741
12888
|
return;
|
12742
12889
|
}
|
12743
12890
|
Object.assign(element.style, style);
|
12744
|
-
Object.keys(attributes).forEach(function(
|
12745
|
-
var value = attributes[
|
12891
|
+
Object.keys(attributes).forEach(function(name22) {
|
12892
|
+
var value = attributes[name22];
|
12746
12893
|
if (value === false) {
|
12747
|
-
element.removeAttribute(
|
12894
|
+
element.removeAttribute(name22);
|
12748
12895
|
} else {
|
12749
|
-
element.setAttribute(
|
12896
|
+
element.setAttribute(name22, value === true ? "" : value);
|
12750
12897
|
}
|
12751
12898
|
});
|
12752
12899
|
});
|
12753
12900
|
}
|
12754
|
-
function
|
12901
|
+
function effect2(_ref2) {
|
12755
12902
|
var state = _ref2.state;
|
12756
12903
|
var initialStyles = {
|
12757
12904
|
popper: {
|
@@ -12789,15 +12936,15 @@
|
|
12789
12936
|
});
|
12790
12937
|
};
|
12791
12938
|
}
|
12792
|
-
var
|
12939
|
+
var applyStyles_default = {
|
12793
12940
|
name: "applyStyles",
|
12794
12941
|
enabled: true,
|
12795
12942
|
phase: "write",
|
12796
12943
|
fn: applyStyles,
|
12797
|
-
effect,
|
12944
|
+
effect: effect2,
|
12798
12945
|
requires: ["computeStyles"]
|
12799
12946
|
};
|
12800
|
-
var defaultModifiers = [
|
12947
|
+
var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default];
|
12801
12948
|
var createPopper = /* @__PURE__ */ popperGenerator({
|
12802
12949
|
defaultModifiers
|
12803
12950
|
});
|
@@ -12831,7 +12978,7 @@
|
|
12831
12978
|
}
|
12832
12979
|
state.modifiersData[name2] = data;
|
12833
12980
|
}
|
12834
|
-
var
|
12981
|
+
var offset_default = {
|
12835
12982
|
name: "offset",
|
12836
12983
|
enabled: true,
|
12837
12984
|
phase: "main",
|
@@ -12887,7 +13034,7 @@
|
|
12887
13034
|
adaptive: false,
|
12888
13035
|
gpuAcceleration: false
|
12889
13036
|
}
|
12890
|
-
}, extend({},
|
13037
|
+
}, extend({}, offset_default, {
|
12891
13038
|
options: {
|
12892
13039
|
offset: props.offset
|
12893
13040
|
}
|
@@ -15392,7 +15539,7 @@
|
|
15392
15539
|
}
|
15393
15540
|
});
|
15394
15541
|
var Uploader = withInstall(_Uploader);
|
15395
|
-
var version = "3.3.
|
15542
|
+
var version = "3.3.7";
|
15396
15543
|
function install(app) {
|
15397
15544
|
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];
|
15398
15545
|
components.forEach((item) => {
|