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/lib/vant.es.js CHANGED
@@ -61,31 +61,37 @@ function doubleRaf(fn2) {
61
61
  function isWindow(val) {
62
62
  return val === window;
63
63
  }
64
- function makeDOMRect(width, height) {
64
+ function makeDOMRect(width2, height2) {
65
65
  return {
66
66
  top: 0,
67
67
  left: 0,
68
- right: width,
69
- bottom: height,
70
- width,
71
- height
68
+ right: width2,
69
+ bottom: height2,
70
+ width: width2,
71
+ height: height2
72
72
  };
73
73
  }
74
74
  var useRect = (elementOrRef) => {
75
75
  var element = unref(elementOrRef);
76
76
  if (isWindow(element)) {
77
- var width = element.innerWidth;
78
- var height = element.innerHeight;
79
- return makeDOMRect(width, height);
77
+ var width2 = element.innerWidth;
78
+ var height2 = element.innerHeight;
79
+ return makeDOMRect(width2, height2);
80
80
  }
81
81
  if (element && element.getBoundingClientRect) {
82
82
  return element.getBoundingClientRect();
83
83
  }
84
84
  return makeDOMRect(0, 0);
85
85
  };
86
- function useToggle(defaultValue = false) {
86
+ function useToggle(defaultValue) {
87
+ if (defaultValue === void 0) {
88
+ defaultValue = false;
89
+ }
87
90
  var state = ref(defaultValue);
88
- var toggle = (value = !state.value) => {
91
+ var toggle = function(value) {
92
+ if (value === void 0) {
93
+ value = !state.value;
94
+ }
89
95
  state.value = value;
90
96
  };
91
97
  return [state, toggle];
@@ -254,7 +260,10 @@ function useCountDown(options) {
254
260
  tick();
255
261
  }
256
262
  };
257
- var reset = (totalTime = options.time) => {
263
+ var reset = function(totalTime) {
264
+ if (totalTime === void 0) {
265
+ totalTime = options.time;
266
+ }
258
267
  pause();
259
268
  remain.value = totalTime;
260
269
  };
@@ -293,7 +302,10 @@ function onMountedOrActivated(hook) {
293
302
  }
294
303
  });
295
304
  }
296
- function useEventListener(type, listener, options = {}) {
305
+ function useEventListener(type, listener, options) {
306
+ if (options === void 0) {
307
+ options = {};
308
+ }
297
309
  if (!inBrowser) {
298
310
  return;
299
311
  }
@@ -330,7 +342,10 @@ function useEventListener(type, listener, options = {}) {
330
342
  });
331
343
  }
332
344
  }
333
- function useClickAway(target, listener, options = {}) {
345
+ function useClickAway(target, listener, options) {
346
+ if (options === void 0) {
347
+ options = {};
348
+ }
334
349
  if (!inBrowser) {
335
350
  return;
336
351
  }
@@ -347,15 +362,22 @@ function useClickAway(target, listener, options = {}) {
347
362
  target: document
348
363
  });
349
364
  }
365
+ var width;
366
+ var height;
350
367
  function useWindowSize() {
351
- var width = ref(inBrowser ? window.innerWidth : 0);
352
- var height = ref(inBrowser ? window.innerHeight : 0);
353
- var onResize = () => {
354
- width.value = window.innerWidth;
355
- height.value = window.innerHeight;
356
- };
357
- useEventListener("resize", onResize);
358
- useEventListener("orientationchange", onResize);
368
+ if (!width) {
369
+ width = ref(0);
370
+ height = ref(0);
371
+ var update = () => {
372
+ if (inBrowser) {
373
+ width.value = window.innerWidth;
374
+ height.value = window.innerHeight;
375
+ }
376
+ };
377
+ update();
378
+ useEventListener("resize", update);
379
+ useEventListener("orientationchange", update);
380
+ }
359
381
  return {
360
382
  width,
361
383
  height
@@ -367,7 +389,10 @@ function isElement$1(node) {
367
389
  var ELEMENT_NODE_TYPE = 1;
368
390
  return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
369
391
  }
370
- function getScrollParent$1(el, root = defaultRoot) {
392
+ function getScrollParent$1(el, root) {
393
+ if (root === void 0) {
394
+ root = defaultRoot;
395
+ }
371
396
  var node = el;
372
397
  while (node && node !== root && isElement$1(node)) {
373
398
  var {
@@ -380,7 +405,10 @@ function getScrollParent$1(el, root = defaultRoot) {
380
405
  }
381
406
  return root;
382
407
  }
383
- function useScrollParent(el, root = defaultRoot) {
408
+ function useScrollParent(el, root) {
409
+ if (root === void 0) {
410
+ root = defaultRoot;
411
+ }
384
412
  var scrollParent = ref();
385
413
  onMounted(() => {
386
414
  if (el.value) {
@@ -2739,21 +2767,21 @@ function endComposing(_ref2) {
2739
2767
  function resizeTextarea(input, autosize) {
2740
2768
  var scrollTop = getRootScrollTop();
2741
2769
  input.style.height = "auto";
2742
- var height = input.scrollHeight;
2770
+ var height2 = input.scrollHeight;
2743
2771
  if (isObject$1(autosize)) {
2744
2772
  var {
2745
2773
  maxHeight,
2746
2774
  minHeight
2747
2775
  } = autosize;
2748
2776
  if (maxHeight !== void 0) {
2749
- height = Math.min(height, maxHeight);
2777
+ height2 = Math.min(height2, maxHeight);
2750
2778
  }
2751
2779
  if (minHeight !== void 0) {
2752
- height = Math.max(height, minHeight);
2780
+ height2 = Math.max(height2, minHeight);
2753
2781
  }
2754
2782
  }
2755
- if (height) {
2756
- input.style.height = height + "px";
2783
+ if (height2) {
2784
+ input.style.height = height2 + "px";
2757
2785
  setRootScrollTop(scrollTop);
2758
2786
  }
2759
2787
  }
@@ -4446,11 +4474,11 @@ function getTrueValue(value) {
4446
4474
  }
4447
4475
  var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
4448
4476
  var useHeight = (element) => {
4449
- var height = ref();
4477
+ var height2 = ref();
4450
4478
  onMounted(() => nextTick(() => {
4451
- height.value = useRect(element).height;
4479
+ height2.value = useRect(element).height;
4452
4480
  }));
4453
- return height;
4481
+ return height2;
4454
4482
  };
4455
4483
  var [name$14] = createNamespace("calendar-day");
4456
4484
  var CalendarDay = defineComponent({
@@ -4600,7 +4628,7 @@ var CalendarMonth = defineComponent({
4600
4628
  var [visible, setVisible] = useToggle();
4601
4629
  var daysRef = ref();
4602
4630
  var monthRef = ref();
4603
- var height = useHeight(monthRef);
4631
+ var height2 = useHeight(monthRef);
4604
4632
  var title = computed(() => formatMonthTitle(props.date));
4605
4633
  var rowHeight = computed(() => addUnit(props.rowHeight));
4606
4634
  var offset2 = computed(() => {
@@ -4755,7 +4783,7 @@ var CalendarMonth = defineComponent({
4755
4783
  }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
4756
4784
  useExpose({
4757
4785
  getTitle,
4758
- getHeight: () => height.value,
4786
+ getHeight: () => height2.value,
4759
4787
  setVisible,
4760
4788
  scrollIntoView,
4761
4789
  disabledDays
@@ -4957,12 +4985,12 @@ var _Calendar = defineComponent({
4957
4985
  if (bottom2 > heightSum && top2 > 0) {
4958
4986
  return;
4959
4987
  }
4960
- var height = 0;
4988
+ var height2 = 0;
4961
4989
  var currentMonth;
4962
4990
  var visibleRange = [-1, -1];
4963
4991
  for (var i = 0; i < months.value.length; i++) {
4964
4992
  var month = monthRefs.value[i];
4965
- var visible = height <= bottom2 && height + heights[i] >= top2;
4993
+ var visible = height2 <= bottom2 && height2 + heights[i] >= top2;
4966
4994
  if (visible) {
4967
4995
  visibleRange[1] = i;
4968
4996
  if (!currentMonth) {
@@ -4977,7 +5005,7 @@ var _Calendar = defineComponent({
4977
5005
  });
4978
5006
  }
4979
5007
  }
4980
- height += heights[i];
5008
+ height2 += heights[i];
4981
5009
  }
4982
5010
  months.value.forEach((month2, index2) => {
4983
5011
  var visible2 = index2 >= visibleRange[0] - 1 && index2 <= visibleRange[1] + 1;
@@ -5560,13 +5588,13 @@ var _Sticky = defineComponent({
5560
5588
  var rootStyle = computed(() => {
5561
5589
  var {
5562
5590
  fixed,
5563
- height,
5564
- width
5591
+ height: height2,
5592
+ width: width2
5565
5593
  } = state;
5566
5594
  if (fixed) {
5567
5595
  return {
5568
- width: width + "px",
5569
- height: height + "px"
5596
+ width: width2 + "px",
5597
+ height: height2 + "px"
5570
5598
  };
5571
5599
  }
5572
5600
  });
@@ -6220,9 +6248,9 @@ var _Tabs = defineComponent({
6220
6248
  lineStyle.transitionDuration = props.duration + "s";
6221
6249
  }
6222
6250
  if (isDef(lineHeight)) {
6223
- var height = addUnit(lineHeight);
6224
- lineStyle.height = height;
6225
- lineStyle.borderRadius = height;
6251
+ var height2 = addUnit(lineHeight);
6252
+ lineStyle.height = height2;
6253
+ lineStyle.borderRadius = height2;
6226
6254
  }
6227
6255
  state.lineStyle = lineStyle;
6228
6256
  });
@@ -6278,12 +6306,6 @@ var _Tabs = defineComponent({
6278
6306
  disabled
6279
6307
  } = children[index2];
6280
6308
  var name2 = getTabName(children[index2], index2);
6281
- emit("click-tab", {
6282
- name: name2,
6283
- title,
6284
- event,
6285
- disabled
6286
- });
6287
6309
  if (disabled) {
6288
6310
  emit("disabled", name2, title);
6289
6311
  } else {
@@ -6297,6 +6319,12 @@ var _Tabs = defineComponent({
6297
6319
  emit("click", name2, title);
6298
6320
  route(item);
6299
6321
  }
6322
+ emit("click-tab", {
6323
+ name: name2,
6324
+ title,
6325
+ event,
6326
+ disabled
6327
+ });
6300
6328
  };
6301
6329
  var onStickyScroll = (params) => {
6302
6330
  stickyFixed = params.isFixed;
@@ -6753,6 +6781,7 @@ var _Cascader = defineComponent({
6753
6781
  "class": bem$T("options")
6754
6782
  }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
6755
6783
  var renderTab = (tab, tabIndex) => {
6784
+ var _slots$optionsTop, _slots$optionsBottom;
6756
6785
  var {
6757
6786
  options,
6758
6787
  selected
@@ -6765,9 +6794,11 @@ var _Cascader = defineComponent({
6765
6794
  unselected: !selected
6766
6795
  })
6767
6796
  }, {
6768
- default: () => [slots["options-top"] ? slots["options-top"]({
6769
- tabIndex: activeTab.value
6770
- }) : null, renderOptions(options, selected, tabIndex)]
6797
+ default: () => [(_slots$optionsTop = slots["options-top"]) == null ? void 0 : _slots$optionsTop.call(slots, {
6798
+ tabIndex
6799
+ }), renderOptions(options, selected, tabIndex), (_slots$optionsBottom = slots["options-bottom"]) == null ? void 0 : _slots$optionsBottom.call(slots, {
6800
+ tabIndex
6801
+ })]
6771
6802
  });
6772
6803
  };
6773
6804
  var renderTabs = () => createVNode(Tabs, {
@@ -8729,7 +8760,7 @@ var VanDialog = defineComponent({
8729
8760
  };
8730
8761
  return () => {
8731
8762
  var {
8732
- width,
8763
+ width: width2,
8733
8764
  title,
8734
8765
  theme,
8735
8766
  message,
@@ -8739,7 +8770,7 @@ var VanDialog = defineComponent({
8739
8770
  "role": "dialog",
8740
8771
  "class": [bem$B([theme]), className],
8741
8772
  "style": {
8742
- width: addUnit(width)
8773
+ width: addUnit(width2)
8743
8774
  },
8744
8775
  "aria-labelledby": title || message,
8745
8776
  "onUpdate:show": updateShow
@@ -10232,7 +10263,12 @@ function getBestSelectionFromSrcset(el, scale) {
10232
10263
  }
10233
10264
  return bestSelectedSrc;
10234
10265
  }
10235
- var getDPR = (scale = 1) => inBrowser ? window.devicePixelRatio || scale : scale;
10266
+ var getDPR = function(scale) {
10267
+ if (scale === void 0) {
10268
+ scale = 1;
10269
+ }
10270
+ return inBrowser ? window.devicePixelRatio || scale : scale;
10271
+ };
10236
10272
  function supportWebp() {
10237
10273
  if (!inBrowser)
10238
10274
  return false;
@@ -10250,7 +10286,10 @@ function supportWebp() {
10250
10286
  function throttle(action, delay) {
10251
10287
  var timeout = null;
10252
10288
  var lastRun = 0;
10253
- return function(...args) {
10289
+ return function() {
10290
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10291
+ args[_key] = arguments[_key];
10292
+ }
10254
10293
  if (timeout) {
10255
10294
  return;
10256
10295
  }
@@ -10299,9 +10338,10 @@ function isObject(obj) {
10299
10338
  function noop() {
10300
10339
  }
10301
10340
  class ImageCache {
10302
- constructor({
10303
- max
10304
- }) {
10341
+ constructor(_ref) {
10342
+ var {
10343
+ max
10344
+ } = _ref;
10305
10345
  this.options = {
10306
10346
  max: max || 100
10307
10347
  };
@@ -10323,18 +10363,19 @@ class ImageCache {
10323
10363
  }
10324
10364
  }
10325
10365
  class ReactiveListener {
10326
- constructor({
10327
- el,
10328
- src,
10329
- error,
10330
- loading,
10331
- bindType,
10332
- $parent,
10333
- options,
10334
- cors,
10335
- elRenderer,
10336
- imageCache
10337
- }) {
10366
+ constructor(_ref) {
10367
+ var {
10368
+ el,
10369
+ src,
10370
+ error,
10371
+ loading,
10372
+ bindType,
10373
+ $parent,
10374
+ options,
10375
+ cors,
10376
+ elRenderer,
10377
+ imageCache
10378
+ } = _ref;
10338
10379
  this.el = el;
10339
10380
  this.src = src;
10340
10381
  this.error = error;
@@ -10373,11 +10414,12 @@ class ReactiveListener {
10373
10414
  record(event) {
10374
10415
  this.performanceData[event] = Date.now();
10375
10416
  }
10376
- update({
10377
- src,
10378
- loading,
10379
- error
10380
- }) {
10417
+ update(_ref2) {
10418
+ var {
10419
+ src,
10420
+ loading,
10421
+ error
10422
+ } = _ref2;
10381
10423
  var oldSrc = this.src;
10382
10424
  this.src = src;
10383
10425
  this.loading = loading;
@@ -10414,7 +10456,10 @@ class ReactiveListener {
10414
10456
  this.state.loading = false;
10415
10457
  });
10416
10458
  }
10417
- load(onFinish = noop) {
10459
+ load(onFinish) {
10460
+ if (onFinish === void 0) {
10461
+ onFinish = noop;
10462
+ }
10418
10463
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
10419
10464
  onFinish();
10420
10465
  return;
@@ -10488,22 +10533,23 @@ var DEFAULT_OBSERVER_OPTIONS = {
10488
10533
  };
10489
10534
  function Lazy() {
10490
10535
  return class Lazy {
10491
- constructor({
10492
- preLoad,
10493
- error,
10494
- throttleWait,
10495
- preLoadTop,
10496
- dispatchEvent,
10497
- loading,
10498
- attempt,
10499
- silent = true,
10500
- scale,
10501
- listenEvents,
10502
- filter,
10503
- adapter,
10504
- observer,
10505
- observerOptions
10506
- }) {
10536
+ constructor(_ref) {
10537
+ var {
10538
+ preLoad,
10539
+ error,
10540
+ throttleWait,
10541
+ preLoadTop,
10542
+ dispatchEvent,
10543
+ loading,
10544
+ attempt,
10545
+ silent = true,
10546
+ scale,
10547
+ listenEvents,
10548
+ filter,
10549
+ adapter,
10550
+ observer,
10551
+ observerOptions
10552
+ } = _ref;
10507
10553
  this.mode = modeType.event;
10508
10554
  this.ListenerQueue = [];
10509
10555
  this.TargetIndex = 0;
@@ -10533,7 +10579,10 @@ function Lazy() {
10533
10579
  this.lazyLoadHandler = throttle(this._lazyLoadHandler.bind(this), this.options.throttleWait);
10534
10580
  this.setMode(this.options.observer ? modeType.observer : modeType.event);
10535
10581
  }
10536
- config(options = {}) {
10582
+ config(options) {
10583
+ if (options === void 0) {
10584
+ options = {};
10585
+ }
10537
10586
  Object.assign(this.options, options);
10538
10587
  }
10539
10588
  performance() {
@@ -10692,6 +10741,7 @@ function Lazy() {
10692
10741
  this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
10693
10742
  }
10694
10743
  _initEvent() {
10744
+ var _this = this;
10695
10745
  this.Event = {
10696
10746
  listeners: {
10697
10747
  loading: [],
@@ -10705,9 +10755,12 @@ function Lazy() {
10705
10755
  this.Event.listeners[event].push(func);
10706
10756
  };
10707
10757
  this.$once = (event, func) => {
10708
- var on2 = (...args) => {
10709
- this.$off(event, on2);
10710
- func.apply(this, args);
10758
+ var on2 = function() {
10759
+ _this.$off(event, on2);
10760
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10761
+ args[_key] = arguments[_key];
10762
+ }
10763
+ func.apply(_this, args);
10711
10764
  };
10712
10765
  this.$on(event, on2);
10713
10766
  };
@@ -10874,12 +10927,13 @@ var defaultOptions = {
10874
10927
  selector: "img"
10875
10928
  };
10876
10929
  class LazyContainer {
10877
- constructor({
10878
- el,
10879
- binding,
10880
- vnode,
10881
- lazy
10882
- }) {
10930
+ constructor(_ref) {
10931
+ var {
10932
+ el,
10933
+ binding,
10934
+ vnode,
10935
+ lazy
10936
+ } = _ref;
10883
10937
  this.el = null;
10884
10938
  this.vnode = vnode;
10885
10939
  this.binding = binding;
@@ -10891,10 +10945,11 @@ class LazyContainer {
10891
10945
  binding
10892
10946
  });
10893
10947
  }
10894
- update({
10895
- el,
10896
- binding
10897
- }) {
10948
+ update(_ref2) {
10949
+ var {
10950
+ el,
10951
+ binding
10952
+ } = _ref2;
10898
10953
  this.el = el;
10899
10954
  this.options = Object.assign({}, defaultOptions, binding.value);
10900
10955
  var imgs = this.getImgs();
@@ -10920,9 +10975,10 @@ class LazyContainer {
10920
10975
  }
10921
10976
  }
10922
10977
  class LazyContainerManager {
10923
- constructor({
10924
- lazy
10925
- }) {
10978
+ constructor(_ref3) {
10979
+ var {
10980
+ lazy
10981
+ } = _ref3;
10926
10982
  this.lazy = lazy;
10927
10983
  this._queue = [];
10928
10984
  }
@@ -11025,7 +11081,10 @@ var LazyImage = (lazyManager) => ({
11025
11081
  this.getRect();
11026
11082
  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;
11027
11083
  },
11028
- load(onFinish = noop) {
11084
+ load(onFinish) {
11085
+ if (onFinish === void 0) {
11086
+ onFinish = noop;
11087
+ }
11029
11088
  if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
11030
11089
  onFinish();
11031
11090
  return;
@@ -11035,9 +11094,10 @@ var LazyImage = (lazyManager) => ({
11035
11094
  } = this.options;
11036
11095
  loadImageAsync({
11037
11096
  src
11038
- }, ({
11039
- src: src2
11040
- }) => {
11097
+ }, (_ref) => {
11098
+ var {
11099
+ src: src2
11100
+ } = _ref;
11041
11101
  this.renderSrc = src2;
11042
11102
  this.state.loaded = true;
11043
11103
  }, () => {
@@ -11049,7 +11109,10 @@ var LazyImage = (lazyManager) => ({
11049
11109
  }
11050
11110
  });
11051
11111
  var Lazyload = {
11052
- install(app, options = {}) {
11112
+ install(app, options) {
11113
+ if (options === void 0) {
11114
+ options = {};
11115
+ }
11053
11116
  var LazyClass = Lazy();
11054
11117
  var lazy = new LazyClass(options);
11055
11118
  var lazyContainer = new LazyContainerManager({
@@ -11202,11 +11265,11 @@ var _List = defineComponent({
11202
11265
  });
11203
11266
  var List = withInstall(_List);
11204
11267
  function usePlaceholder(contentRef, bem2) {
11205
- var height = useHeight(contentRef);
11268
+ var height2 = useHeight(contentRef);
11206
11269
  return (renderContent) => createVNode("div", {
11207
11270
  "class": bem2("placeholder"),
11208
11271
  "style": {
11209
- height: height.value ? height.value + "px" : void 0
11272
+ height: height2.value ? height2.value + "px" : void 0
11210
11273
  }
11211
11274
  }, [renderContent()]);
11212
11275
  }
@@ -11975,17 +12038,18 @@ var _Pagination = defineComponent({
11975
12038
  });
11976
12039
  var Pagination = withInstall(_Pagination);
11977
12040
  var [name$j, bem$j] = createNamespace("password-input");
12041
+ var passwordInputProps = {
12042
+ info: String,
12043
+ mask: truthProp,
12044
+ value: makeStringProp(""),
12045
+ gutter: numericProp,
12046
+ length: makeNumericProp(6),
12047
+ focused: Boolean,
12048
+ errorInfo: String
12049
+ };
11978
12050
  var _PasswordInput = defineComponent({
11979
12051
  name: name$j,
11980
- props: {
11981
- info: String,
11982
- mask: truthProp,
11983
- value: makeStringProp(""),
11984
- gutter: numericProp,
11985
- length: makeNumericProp(6),
11986
- focused: Boolean,
11987
- errorInfo: String
11988
- },
12052
+ props: passwordInputProps,
11989
12053
  emits: ["focus"],
11990
12054
  setup(props, _ref) {
11991
12055
  var {
@@ -12047,17 +12111,19 @@ var _PasswordInput = defineComponent({
12047
12111
  }
12048
12112
  });
12049
12113
  var PasswordInput = withInstall(_PasswordInput);
12050
- function getBoundingClientRect(element) {
12114
+ function getBoundingClientRect(element, includeScale) {
12051
12115
  var rect = element.getBoundingClientRect();
12116
+ var scaleX = 1;
12117
+ var scaleY = 1;
12052
12118
  return {
12053
- width: rect.width,
12054
- height: rect.height,
12055
- top: rect.top,
12056
- right: rect.right,
12057
- bottom: rect.bottom,
12058
- left: rect.left,
12059
- x: rect.left,
12060
- y: rect.top
12119
+ width: rect.width / scaleX,
12120
+ height: rect.height / scaleY,
12121
+ top: rect.top / scaleY,
12122
+ right: rect.right / scaleX,
12123
+ bottom: rect.bottom / scaleY,
12124
+ left: rect.left / scaleX,
12125
+ x: rect.left / scaleX,
12126
+ y: rect.top / scaleY
12061
12127
  };
12062
12128
  }
12063
12129
  function getWindow(node) {
@@ -12123,13 +12189,20 @@ function isScrollParent(element) {
12123
12189
  var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
12124
12190
  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
12125
12191
  }
12192
+ function isElementScaled(element) {
12193
+ var rect = element.getBoundingClientRect();
12194
+ var scaleX = rect.width / element.offsetWidth || 1;
12195
+ var scaleY = rect.height / element.offsetHeight || 1;
12196
+ return scaleX !== 1 || scaleY !== 1;
12197
+ }
12126
12198
  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
12127
12199
  if (isFixed === void 0) {
12128
12200
  isFixed = false;
12129
12201
  }
12202
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
12203
+ isHTMLElement(offsetParent) && isElementScaled(offsetParent);
12130
12204
  var documentElement = getDocumentElement(offsetParent);
12131
12205
  var rect = getBoundingClientRect(elementOrVirtualElement);
12132
- var isOffsetParentAnElement = isHTMLElement(offsetParent);
12133
12206
  var scroll = {
12134
12207
  scrollLeft: 0,
12135
12208
  scrollTop: 0
@@ -12159,19 +12232,19 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
12159
12232
  }
12160
12233
  function getLayoutRect(element) {
12161
12234
  var clientRect = getBoundingClientRect(element);
12162
- var width = element.offsetWidth;
12163
- var height = element.offsetHeight;
12164
- if (Math.abs(clientRect.width - width) <= 1) {
12165
- width = clientRect.width;
12235
+ var width2 = element.offsetWidth;
12236
+ var height2 = element.offsetHeight;
12237
+ if (Math.abs(clientRect.width - width2) <= 1) {
12238
+ width2 = clientRect.width;
12166
12239
  }
12167
- if (Math.abs(clientRect.height - height) <= 1) {
12168
- height = clientRect.height;
12240
+ if (Math.abs(clientRect.height - height2) <= 1) {
12241
+ height2 = clientRect.height;
12169
12242
  }
12170
12243
  return {
12171
12244
  x: element.offsetLeft,
12172
12245
  y: element.offsetTop,
12173
- width,
12174
- height
12246
+ width: width2,
12247
+ height: height2
12175
12248
  };
12176
12249
  }
12177
12250
  function getParentNode(element) {
@@ -12424,7 +12497,8 @@ function popperGenerator(generatorOptions) {
12424
12497
  var isDestroyed = false;
12425
12498
  var instance2 = {
12426
12499
  state,
12427
- setOptions: function setOptions(options2) {
12500
+ setOptions: function setOptions(setOptionsAction) {
12501
+ var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
12428
12502
  cleanupModifierEffects();
12429
12503
  state.options = Object.assign({}, defaultOptions2, state.options, options2);
12430
12504
  state.scrollParents = {
@@ -12519,7 +12593,7 @@ function popperGenerator(generatorOptions) {
12519
12593
  var passive = {
12520
12594
  passive: true
12521
12595
  };
12522
- function effect(_ref) {
12596
+ function effect$1(_ref) {
12523
12597
  var state = _ref.state, instance2 = _ref.instance, options = _ref.options;
12524
12598
  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;
12525
12599
  var window2 = getWindow(state.elements.popper);
@@ -12549,7 +12623,7 @@ var eventListeners = {
12549
12623
  phase: "write",
12550
12624
  fn: function fn() {
12551
12625
  },
12552
- effect,
12626
+ effect: effect$1,
12553
12627
  data: {}
12554
12628
  };
12555
12629
  function popperOffsets(_ref) {
@@ -12585,7 +12659,7 @@ function roundOffsetsByDPR(_ref) {
12585
12659
  }
12586
12660
  function mapToStyles(_ref2) {
12587
12661
  var _Object$assign2;
12588
- 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;
12662
+ 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;
12589
12663
  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;
12590
12664
  var hasX = offsets.hasOwnProperty("x");
12591
12665
  var hasY = offsets.hasOwnProperty("y");
@@ -12598,18 +12672,18 @@ function mapToStyles(_ref2) {
12598
12672
  var widthProp = "clientWidth";
12599
12673
  if (offsetParent === getWindow(popper)) {
12600
12674
  offsetParent = getDocumentElement(popper);
12601
- if (getComputedStyle(offsetParent).position !== "static") {
12675
+ if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
12602
12676
  heightProp = "scrollHeight";
12603
12677
  widthProp = "scrollWidth";
12604
12678
  }
12605
12679
  }
12606
12680
  offsetParent = offsetParent;
12607
- if (placement === top) {
12681
+ if (placement === top || (placement === left || placement === right) && variation === end) {
12608
12682
  sideY = bottom;
12609
12683
  y -= offsetParent[heightProp] - popperRect.height;
12610
12684
  y *= gpuAcceleration ? 1 : -1;
12611
12685
  }
12612
- if (placement === left) {
12686
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
12613
12687
  sideX = right;
12614
12688
  x -= offsetParent[widthProp] - popperRect.width;
12615
12689
  x *= gpuAcceleration ? 1 : -1;
@@ -12620,7 +12694,7 @@ function mapToStyles(_ref2) {
12620
12694
  }, adaptive && unsetSides);
12621
12695
  if (gpuAcceleration) {
12622
12696
  var _Object$assign;
12623
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
12697
+ 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));
12624
12698
  }
12625
12699
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
12626
12700
  }
@@ -12629,6 +12703,7 @@ function computeStyles(_ref4) {
12629
12703
  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;
12630
12704
  var commonStyles = {
12631
12705
  placement: getBasePlacement(state.placement),
12706
+ variation: getVariation(state.placement),
12632
12707
  popper: state.elements.popper,
12633
12708
  popperRect: state.rects.popper,
12634
12709
  gpuAcceleration
@@ -12680,7 +12755,7 @@ function applyStyles(_ref) {
12680
12755
  });
12681
12756
  });
12682
12757
  }
12683
- function effect$1(_ref2) {
12758
+ function effect(_ref2) {
12684
12759
  var state = _ref2.state;
12685
12760
  var initialStyles = {
12686
12761
  popper: {
@@ -12723,7 +12798,7 @@ var applyStyles$1 = {
12723
12798
  enabled: true,
12724
12799
  phase: "write",
12725
12800
  fn: applyStyles,
12726
- effect: effect$1,
12801
+ effect,
12727
12802
  requires: ["computeStyles"]
12728
12803
  };
12729
12804
  var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
@@ -12978,8 +13053,8 @@ var _Progress = defineComponent({
12978
13053
  height: addUnit(strokeWidth)
12979
13054
  };
12980
13055
  var portionStyle = {
12981
- background: background.value,
12982
- transform: "scaleX(" + +percentage / 100 + ")"
13056
+ width: percentage + "%",
13057
+ background: background.value
12983
13058
  };
12984
13059
  return createVNode("div", {
12985
13060
  "class": bem$h(),
@@ -14509,8 +14584,8 @@ var _SwipeCell = defineComponent({
14509
14584
  var offset2 = Math.abs(state.offset);
14510
14585
  var THRESHOLD = 0.15;
14511
14586
  var threshold = opened ? 1 - THRESHOLD : THRESHOLD;
14512
- var width = side === "left" ? leftWidth.value : rightWidth.value;
14513
- if (width && offset2 > width * threshold) {
14587
+ var width2 = side === "left" ? leftWidth.value : rightWidth.value;
14588
+ if (width2 && offset2 > width2 * threshold) {
14514
14589
  open(side);
14515
14590
  } else {
14516
14591
  close(side);
@@ -15284,7 +15359,7 @@ var _Uploader = defineComponent({
15284
15359
  }
15285
15360
  });
15286
15361
  var Uploader = withInstall(_Uploader);
15287
- var version = "3.2.7";
15362
+ var version = "3.2.8";
15288
15363
  function install(app) {
15289
15364
  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];
15290
15365
  components.forEach((item) => {