@varlet/ui 1.27.6 → 1.27.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/varlet.esm.js CHANGED
@@ -134,7 +134,7 @@ function kebabCase(str) {
134
134
  var ret = str.replace(/([A-Z])/g, " $1").trim();
135
135
  return ret.split(" ").join("-").toLowerCase();
136
136
  }
137
- function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
137
+ function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
138
138
  try {
139
139
  var info = gen[key](arg);
140
140
  var value = info.value;
@@ -148,16 +148,16 @@ function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
148
148
  Promise.resolve(value).then(_next, _throw);
149
149
  }
150
150
  }
151
- function _asyncToGenerator$b(fn) {
151
+ function _asyncToGenerator$c(fn) {
152
152
  return function() {
153
153
  var self = this, args = arguments;
154
154
  return new Promise(function(resolve, reject) {
155
155
  var gen = fn.apply(self, args);
156
156
  function _next(value) {
157
- asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "next", value);
157
+ asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "next", value);
158
158
  }
159
159
  function _throw(err) {
160
- asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "throw", err);
160
+ asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "throw", err);
161
161
  }
162
162
  _next(void 0);
163
163
  });
@@ -187,7 +187,7 @@ function inViewport(_x) {
187
187
  return _inViewport.apply(this, arguments);
188
188
  }
189
189
  function _inViewport() {
190
- _inViewport = _asyncToGenerator$b(function* (element) {
190
+ _inViewport = _asyncToGenerator$c(function* (element) {
191
191
  yield doubleRaf();
192
192
  var {
193
193
  top,
@@ -335,7 +335,7 @@ function supportTouch() {
335
335
  return inBrowser2 && "ontouchstart" in window;
336
336
  }
337
337
  var _excluded = ["collect", "clear"];
338
- function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
338
+ function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
339
339
  try {
340
340
  var info = gen[key](arg);
341
341
  var value = info.value;
@@ -349,16 +349,16 @@ function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
349
349
  Promise.resolve(value).then(_next, _throw);
350
350
  }
351
351
  }
352
- function _asyncToGenerator$a(fn) {
352
+ function _asyncToGenerator$b(fn) {
353
353
  return function() {
354
354
  var self = this, args = arguments;
355
355
  return new Promise(function(resolve, reject) {
356
356
  var gen = fn.apply(self, args);
357
357
  function _next(value) {
358
- asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "next", value);
358
+ asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "next", value);
359
359
  }
360
360
  function _throw(err) {
361
- asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "throw", err);
361
+ asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "throw", err);
362
362
  }
363
363
  _next(void 0);
364
364
  });
@@ -545,7 +545,7 @@ function keyInProvides(key) {
545
545
  function useValidation() {
546
546
  var errorMessage = ref("");
547
547
  var validate = /* @__PURE__ */ function() {
548
- var _ref = _asyncToGenerator$a(function* (rules, value, apis) {
548
+ var _ref = _asyncToGenerator$b(function* (rules, value, apis) {
549
549
  if (!isArray(rules) || !rules.length) {
550
550
  return true;
551
551
  }
@@ -566,7 +566,7 @@ function useValidation() {
566
566
  errorMessage.value = "";
567
567
  };
568
568
  var validateWithTrigger = /* @__PURE__ */ function() {
569
- var _ref2 = _asyncToGenerator$a(function* (validateTrigger, trigger, rules, value, apis) {
569
+ var _ref2 = _asyncToGenerator$b(function* (validateTrigger, trigger, rules, value, apis) {
570
570
  if (validateTrigger.includes(trigger)) {
571
571
  (yield validate(rules, value, apis)) && (errorMessage.value = "");
572
572
  }
@@ -1090,7 +1090,7 @@ var props$T = {
1090
1090
  type: Function
1091
1091
  }
1092
1092
  };
1093
- function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
1093
+ function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
1094
1094
  try {
1095
1095
  var info = gen[key](arg);
1096
1096
  var value = info.value;
@@ -1104,16 +1104,16 @@ function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
1104
1104
  Promise.resolve(value).then(_next, _throw);
1105
1105
  }
1106
1106
  }
1107
- function _asyncToGenerator$9(fn) {
1107
+ function _asyncToGenerator$a(fn) {
1108
1108
  return function() {
1109
1109
  var self = this, args = arguments;
1110
1110
  return new Promise(function(resolve, reject) {
1111
1111
  var gen = fn.apply(self, args);
1112
1112
  function _next(value) {
1113
- asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "next", value);
1113
+ asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "next", value);
1114
1114
  }
1115
1115
  function _throw(err) {
1116
- asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "throw", err);
1116
+ asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "throw", err);
1117
1117
  }
1118
1118
  _next(void 0);
1119
1119
  });
@@ -1145,7 +1145,7 @@ var Icon = defineComponent({
1145
1145
  var nextName = ref("");
1146
1146
  var shrinking = ref(false);
1147
1147
  var handleNameChange = /* @__PURE__ */ function() {
1148
- var _ref = _asyncToGenerator$9(function* (newName, oldName) {
1148
+ var _ref = _asyncToGenerator$a(function* (newName, oldName) {
1149
1149
  var {
1150
1150
  transition
1151
1151
  } = props2;
@@ -1673,7 +1673,10 @@ function render$W(_ctx, _cache) {
1673
1673
  }, [_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
1674
1674
  key: 0,
1675
1675
  class: normalizeClass(_ctx.classes(_ctx.n("content"), [_ctx.loading, _ctx.n("content--active")]))
1676
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true), _ctx.isShow ? (openBlock(), createElementBlock("div", {
1676
+ }, [renderSlot(_ctx.$slots, "default"), _ctx.loading ? (openBlock(), createElementBlock("div", {
1677
+ key: 0,
1678
+ class: normalizeClass(_ctx.n("content-mask"))
1679
+ }, null, 2)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true), _ctx.isShow ? (openBlock(), createElementBlock("div", {
1677
1680
  key: 1,
1678
1681
  class: normalizeClass(_ctx.classes("var--box", _ctx.n("body"), [_ctx.$slots.default, _ctx.n("inside")]))
1679
1682
  }, [_ctx.type === "circle" ? (openBlock(), createElementBlock("div", {
@@ -8670,7 +8673,7 @@ var props$w = {
8670
8673
  default: false
8671
8674
  }
8672
8675
  };
8673
- function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
8676
+ function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
8674
8677
  try {
8675
8678
  var info = gen[key](arg);
8676
8679
  var value = info.value;
@@ -8684,16 +8687,16 @@ function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
8684
8687
  Promise.resolve(value).then(_next, _throw);
8685
8688
  }
8686
8689
  }
8687
- function _asyncToGenerator$8(fn) {
8690
+ function _asyncToGenerator$9(fn) {
8688
8691
  return function() {
8689
8692
  var self = this, args = arguments;
8690
8693
  return new Promise(function(resolve, reject) {
8691
8694
  var gen = fn.apply(self, args);
8692
8695
  function _next(value) {
8693
- asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "next", value);
8696
+ asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "next", value);
8694
8697
  }
8695
8698
  function _throw(err) {
8696
- asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "throw", err);
8699
+ asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "throw", err);
8697
8700
  }
8698
8701
  _next(void 0);
8699
8702
  });
@@ -8719,7 +8722,7 @@ var Form = defineComponent({
8719
8722
  bindFormItems
8720
8723
  } = useFormItems();
8721
8724
  var validate = /* @__PURE__ */ function() {
8722
- var _ref = _asyncToGenerator$8(function* () {
8725
+ var _ref = _asyncToGenerator$9(function* () {
8723
8726
  var res = yield Promise.all(formItems.map((_ref2) => {
8724
8727
  var {
8725
8728
  validate: validate2
@@ -8760,7 +8763,7 @@ var Form = defineComponent({
8760
8763
  Form.install = function(app) {
8761
8764
  app.component(Form.name, Form);
8762
8765
  };
8763
- function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
8766
+ function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
8764
8767
  try {
8765
8768
  var info = gen[key](arg);
8766
8769
  var value = info.value;
@@ -8774,16 +8777,16 @@ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
8774
8777
  Promise.resolve(value).then(_next, _throw);
8775
8778
  }
8776
8779
  }
8777
- function _asyncToGenerator$7(fn) {
8780
+ function _asyncToGenerator$8(fn) {
8778
8781
  return function() {
8779
8782
  var self = this, args = arguments;
8780
8783
  return new Promise(function(resolve, reject) {
8781
8784
  var gen = fn.apply(self, args);
8782
8785
  function _next(value) {
8783
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
8786
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "next", value);
8784
8787
  }
8785
8788
  function _throw(err) {
8786
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
8789
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "throw", err);
8787
8790
  }
8788
8791
  _next(void 0);
8789
8792
  });
@@ -8916,7 +8919,7 @@ function check(_x) {
8916
8919
  return _check.apply(this, arguments);
8917
8920
  }
8918
8921
  function _check() {
8919
- _check = _asyncToGenerator$7(function* (el) {
8922
+ _check = _asyncToGenerator$8(function* (el) {
8920
8923
  (yield inViewport(el)) && attemptLoad(el);
8921
8924
  });
8922
8925
  return _check.apply(this, arguments);
@@ -8928,7 +8931,7 @@ function add(_x2) {
8928
8931
  return _add.apply(this, arguments);
8929
8932
  }
8930
8933
  function _add() {
8931
- _add = _asyncToGenerator$7(function* (el) {
8934
+ _add = _asyncToGenerator$8(function* (el) {
8932
8935
  !lazyElements.includes(el) && lazyElements.push(el);
8933
8936
  getAllParentScroller(el).forEach(bindEvents);
8934
8937
  yield check(el);
@@ -8950,7 +8953,7 @@ function mounted(_x3, _x4) {
8950
8953
  return _mounted.apply(this, arguments);
8951
8954
  }
8952
8955
  function _mounted() {
8953
- _mounted = _asyncToGenerator$7(function* (el, binding) {
8956
+ _mounted = _asyncToGenerator$8(function* (el, binding) {
8954
8957
  createLazy(el, binding);
8955
8958
  yield add(el);
8956
8959
  });
@@ -8960,7 +8963,7 @@ function updated(_x5, _x6) {
8960
8963
  return _updated.apply(this, arguments);
8961
8964
  }
8962
8965
  function _updated() {
8963
- _updated = _asyncToGenerator$7(function* (el, binding) {
8966
+ _updated = _asyncToGenerator$8(function* (el, binding) {
8964
8967
  if (!diff(el, binding)) {
8965
8968
  lazyElements.includes(el) && (yield check(el));
8966
8969
  return;
@@ -9199,7 +9202,7 @@ var props$u = {
9199
9202
  type: Function
9200
9203
  }
9201
9204
  };
9202
- function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
9205
+ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
9203
9206
  try {
9204
9207
  var info = gen[key](arg);
9205
9208
  var value = info.value;
@@ -9213,16 +9216,16 @@ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
9213
9216
  Promise.resolve(value).then(_next, _throw);
9214
9217
  }
9215
9218
  }
9216
- function _asyncToGenerator$6(fn) {
9219
+ function _asyncToGenerator$7(fn) {
9217
9220
  return function() {
9218
9221
  var self = this, args = arguments;
9219
9222
  return new Promise(function(resolve, reject) {
9220
9223
  var gen = fn.apply(self, args);
9221
9224
  function _next(value) {
9222
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
9225
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
9223
9226
  }
9224
9227
  function _throw(err) {
9225
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
9228
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
9226
9229
  }
9227
9230
  _next(void 0);
9228
9231
  });
@@ -9537,7 +9540,7 @@ var Swipe = defineComponent({
9537
9540
  vertical
9538
9541
  };
9539
9542
  bindSwipeItems(swipeProvider);
9540
- watch(() => length.value, /* @__PURE__ */ _asyncToGenerator$6(function* () {
9543
+ watch(() => length.value, /* @__PURE__ */ _asyncToGenerator$7(function* () {
9541
9544
  yield doubleRaf();
9542
9545
  initialIndex();
9543
9546
  resize();
@@ -10045,7 +10048,7 @@ var props$s = {
10045
10048
  type: Function
10046
10049
  }
10047
10050
  };
10048
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
10051
+ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
10049
10052
  try {
10050
10053
  var info = gen[key](arg);
10051
10054
  var value = info.value;
@@ -10059,16 +10062,16 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
10059
10062
  Promise.resolve(value).then(_next, _throw);
10060
10063
  }
10061
10064
  }
10062
- function _asyncToGenerator$5(fn) {
10065
+ function _asyncToGenerator$6(fn) {
10063
10066
  return function() {
10064
10067
  var self = this, args = arguments;
10065
10068
  return new Promise(function(resolve, reject) {
10066
10069
  var gen = fn.apply(self, args);
10067
10070
  function _next(value) {
10068
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
10071
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
10069
10072
  }
10070
10073
  function _throw(err) {
10071
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
10074
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
10072
10075
  }
10073
10076
  _next(void 0);
10074
10077
  });
@@ -10118,7 +10121,7 @@ var Sticky = defineComponent({
10118
10121
  var enableCSSMode = computed(() => !props2.disabled && props2.cssMode);
10119
10122
  var enableFixedMode = computed(() => !props2.disabled && isFixed.value);
10120
10123
  var offsetTop = computed(() => toPxNum(props2.offsetTop));
10121
- var scroller2;
10124
+ var scroller;
10122
10125
  var handleScroll = () => {
10123
10126
  var {
10124
10127
  onScroll,
@@ -10129,10 +10132,10 @@ var Sticky = defineComponent({
10129
10132
  return;
10130
10133
  }
10131
10134
  var scrollerTop = 0;
10132
- if (scroller2 !== window) {
10135
+ if (scroller !== window) {
10133
10136
  var {
10134
10137
  top
10135
- } = scroller2.getBoundingClientRect();
10138
+ } = scroller.getBoundingClientRect();
10136
10139
  scrollerTop = top;
10137
10140
  }
10138
10141
  var wrapper3 = wrapperEl.value;
@@ -10159,10 +10162,10 @@ var Sticky = defineComponent({
10159
10162
  }
10160
10163
  };
10161
10164
  var addScrollListener = /* @__PURE__ */ function() {
10162
- var _ref = _asyncToGenerator$5(function* () {
10165
+ var _ref = _asyncToGenerator$6(function* () {
10163
10166
  yield doubleRaf();
10164
- scroller2 = getParentScroller(stickyEl.value);
10165
- scroller2 !== window && scroller2.addEventListener("scroll", handleScroll);
10167
+ scroller = getParentScroller(stickyEl.value);
10168
+ scroller !== window && scroller.addEventListener("scroll", handleScroll);
10166
10169
  window.addEventListener("scroll", handleScroll);
10167
10170
  handleScroll();
10168
10171
  });
@@ -10171,7 +10174,7 @@ var Sticky = defineComponent({
10171
10174
  };
10172
10175
  }();
10173
10176
  var removeScrollListener = () => {
10174
- scroller2 !== window && scroller2.removeEventListener("scroll", handleScroll);
10177
+ scroller !== window && scroller.removeEventListener("scroll", handleScroll);
10175
10178
  window.removeEventListener("scroll", handleScroll);
10176
10179
  };
10177
10180
  watch(() => props2.disabled, handleScroll);
@@ -10351,7 +10354,7 @@ var props$q = {
10351
10354
  type: Function
10352
10355
  }
10353
10356
  };
10354
- function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
10357
+ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
10355
10358
  try {
10356
10359
  var info = gen[key](arg);
10357
10360
  var value = info.value;
@@ -10365,16 +10368,16 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
10365
10368
  Promise.resolve(value).then(_next, _throw);
10366
10369
  }
10367
10370
  }
10368
- function _asyncToGenerator$4(fn) {
10371
+ function _asyncToGenerator$5(fn) {
10369
10372
  return function() {
10370
10373
  var self = this, args = arguments;
10371
10374
  return new Promise(function(resolve, reject) {
10372
10375
  var gen = fn.apply(self, args);
10373
10376
  function _next(value) {
10374
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
10377
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
10375
10378
  }
10376
10379
  function _throw(err) {
10377
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
10380
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
10378
10381
  }
10379
10382
  _next(void 0);
10380
10383
  });
@@ -10417,7 +10420,7 @@ var IndexBar = defineComponent({
10417
10420
  bindIndexAnchors
10418
10421
  } = useIndexAnchors();
10419
10422
  var clickedName = ref("");
10420
- var scroller2 = ref(null);
10423
+ var scroller = ref(null);
10421
10424
  var barEl = ref(null);
10422
10425
  var anchorNameList = ref([]);
10423
10426
  var active = ref();
@@ -10441,8 +10444,8 @@ var IndexBar = defineComponent({
10441
10444
  call(props2.onChange, anchorName);
10442
10445
  };
10443
10446
  var handleScroll = () => {
10444
- var scrollTop = getScrollTop(scroller2.value);
10445
- var scrollHeight = scroller2.value === window ? document.body.scrollHeight : scroller2.value.scrollHeight;
10447
+ var scrollTop = getScrollTop(scroller.value);
10448
+ var scrollHeight = scroller.value === window ? document.body.scrollHeight : scroller.value.scrollHeight;
10446
10449
  var {
10447
10450
  offsetTop
10448
10451
  } = barEl.value;
@@ -10460,7 +10463,7 @@ var IndexBar = defineComponent({
10460
10463
  });
10461
10464
  };
10462
10465
  var anchorClick = /* @__PURE__ */ function() {
10463
- var _ref = _asyncToGenerator$4(function* (anchorName, manualCall) {
10466
+ var _ref = _asyncToGenerator$5(function* (anchorName, manualCall) {
10464
10467
  var {
10465
10468
  offsetTop
10466
10469
  } = barEl.value;
@@ -10477,10 +10480,10 @@ var IndexBar = defineComponent({
10477
10480
  if (!indexAnchor)
10478
10481
  return;
10479
10482
  var top = indexAnchor.ownTop.value - stickyOffsetTop.value + offsetTop;
10480
- var left = getScrollLeft(scroller2.value);
10483
+ var left = getScrollLeft(scroller.value);
10481
10484
  clickedName.value = anchorName;
10482
10485
  emitEvent(anchorName);
10483
- yield scrollTo(scroller2.value, {
10486
+ yield scrollTo(scroller.value, {
10484
10487
  left,
10485
10488
  top,
10486
10489
  animation: easeInOutCubic,
@@ -10497,7 +10500,7 @@ var IndexBar = defineComponent({
10497
10500
  var scrollTo$1 = (index) => {
10498
10501
  requestAnimationFrame(() => anchorClick(index, true));
10499
10502
  };
10500
- watch(() => length.value, /* @__PURE__ */ _asyncToGenerator$4(function* () {
10503
+ watch(() => length.value, /* @__PURE__ */ _asyncToGenerator$5(function* () {
10501
10504
  yield doubleRaf();
10502
10505
  indexAnchors.forEach((_ref4) => {
10503
10506
  var {
@@ -10509,13 +10512,13 @@ var IndexBar = defineComponent({
10509
10512
  setOwnTop();
10510
10513
  });
10511
10514
  }));
10512
- onMounted(/* @__PURE__ */ _asyncToGenerator$4(function* () {
10515
+ onMounted(/* @__PURE__ */ _asyncToGenerator$5(function* () {
10513
10516
  yield doubleRaf();
10514
- scroller2.value = getParentScroller(barEl.value);
10515
- scroller2.value.addEventListener("scroll", handleScroll);
10517
+ scroller.value = getParentScroller(barEl.value);
10518
+ scroller.value.addEventListener("scroll", handleScroll);
10516
10519
  }));
10517
10520
  onBeforeUnmount(() => {
10518
- call(scroller2.value.removeEventListener, "scroll", handleScroll);
10521
+ call(scroller.value.removeEventListener, "scroll", handleScroll);
10519
10522
  });
10520
10523
  return {
10521
10524
  n: n$u,
@@ -10540,6 +10543,10 @@ var props$p = {
10540
10543
  modelValue: {
10541
10544
  type: String
10542
10545
  },
10546
+ modelModifiers: {
10547
+ type: Object,
10548
+ default: () => ({})
10549
+ },
10543
10550
  type: {
10544
10551
  type: String,
10545
10552
  default: "text",
@@ -10804,6 +10811,7 @@ var Input = defineComponent({
10804
10811
  var {
10805
10812
  value
10806
10813
  } = e.target;
10814
+ value = withTrim(value);
10807
10815
  call(props2["onUpdate:modelValue"], value);
10808
10816
  call(props2.onInput, value, e);
10809
10817
  validateWithTrigger("onInput");
@@ -10812,7 +10820,7 @@ var Input = defineComponent({
10812
10820
  var {
10813
10821
  value
10814
10822
  } = e.target;
10815
- call(props2.onChange, value, e);
10823
+ call(props2.onChange, withTrim(value), e);
10816
10824
  validateWithTrigger("onChange");
10817
10825
  };
10818
10826
  var handleClear = () => {
@@ -10840,6 +10848,7 @@ var Input = defineComponent({
10840
10848
  call(onClick, e);
10841
10849
  validateWithTrigger("onClick");
10842
10850
  };
10851
+ var withTrim = (value) => props2.modelModifiers.trim ? value.trim() : value;
10843
10852
  var reset = () => {
10844
10853
  call(props2["onUpdate:modelValue"], "");
10845
10854
  resetValidation();
@@ -10926,7 +10935,7 @@ var props$o = {
10926
10935
  type: Function
10927
10936
  }
10928
10937
  };
10929
- function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
10938
+ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
10930
10939
  try {
10931
10940
  var info = gen[key](arg);
10932
10941
  var value = info.value;
@@ -10940,16 +10949,16 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
10940
10949
  Promise.resolve(value).then(_next, _throw);
10941
10950
  }
10942
10951
  }
10943
- function _asyncToGenerator$3(fn) {
10952
+ function _asyncToGenerator$4(fn) {
10944
10953
  return function() {
10945
10954
  var self = this, args = arguments;
10946
10955
  return new Promise(function(resolve, reject) {
10947
10956
  var gen = fn.apply(self, args);
10948
10957
  function _next(value) {
10949
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
10958
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
10950
10959
  }
10951
10960
  function _throw(err) {
10952
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
10961
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
10953
10962
  }
10954
10963
  _next(void 0);
10955
10964
  });
@@ -11003,21 +11012,21 @@ var List = defineComponent({
11003
11012
  setup(props2) {
11004
11013
  var listEl = ref(null);
11005
11014
  var detectorEl = ref(null);
11006
- var scroller2;
11015
+ var scroller;
11007
11016
  var load = () => {
11008
11017
  call(props2["onUpdate:error"], false);
11009
11018
  call(props2["onUpdate:loading"], true);
11010
11019
  call(props2.onLoad);
11011
11020
  };
11012
11021
  var isReachBottom = () => {
11013
- var containerBottom = scroller2 === window ? window.innerHeight : scroller2.getBoundingClientRect().bottom;
11022
+ var containerBottom = scroller === window ? window.innerHeight : scroller.getBoundingClientRect().bottom;
11014
11023
  var {
11015
11024
  bottom: detectorBottom
11016
11025
  } = detectorEl.value.getBoundingClientRect();
11017
11026
  return Math.floor(detectorBottom) - toPxNum(props2.offset) <= containerBottom;
11018
11027
  };
11019
11028
  var check2 = /* @__PURE__ */ function() {
11020
- var _ref = _asyncToGenerator$3(function* () {
11029
+ var _ref = _asyncToGenerator$4(function* () {
11021
11030
  yield nextTick();
11022
11031
  var {
11023
11032
  loading: loading2,
@@ -11033,12 +11042,12 @@ var List = defineComponent({
11033
11042
  };
11034
11043
  }();
11035
11044
  onMounted(() => {
11036
- scroller2 = getParentScroller(listEl.value);
11045
+ scroller = getParentScroller(listEl.value);
11037
11046
  props2.immediateCheck && check2();
11038
- scroller2.addEventListener("scroll", check2);
11047
+ scroller.addEventListener("scroll", check2);
11039
11048
  });
11040
11049
  onUnmounted(() => {
11041
- scroller2.removeEventListener("scroll", check2);
11050
+ scroller.removeEventListener("scroll", check2);
11042
11051
  });
11043
11052
  return {
11044
11053
  pack,
@@ -11097,7 +11106,7 @@ var props$n = {
11097
11106
  type: Function
11098
11107
  }
11099
11108
  };
11100
- function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
11109
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
11101
11110
  try {
11102
11111
  var info = gen[key](arg);
11103
11112
  var value = info.value;
@@ -11111,16 +11120,16 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
11111
11120
  Promise.resolve(value).then(_next, _throw);
11112
11121
  }
11113
11122
  }
11114
- function _asyncToGenerator$2(fn) {
11123
+ function _asyncToGenerator$3(fn) {
11115
11124
  return function() {
11116
11125
  var self = this, args = arguments;
11117
11126
  return new Promise(function(resolve, reject) {
11118
11127
  var gen = fn.apply(self, args);
11119
11128
  function _next(value) {
11120
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
11129
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
11121
11130
  }
11122
11131
  function _throw(err) {
11123
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
11132
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
11124
11133
  }
11125
11134
  _next(void 0);
11126
11135
  });
@@ -11195,7 +11204,7 @@ var Menu = defineComponent({
11195
11204
  });
11196
11205
  watch(() => props2.alignment, resize);
11197
11206
  watch(() => props2.show, /* @__PURE__ */ function() {
11198
- var _ref2 = _asyncToGenerator$2(function* (newValue) {
11207
+ var _ref2 = _asyncToGenerator$3(function* (newValue) {
11199
11208
  var {
11200
11209
  onOpen,
11201
11210
  onClose
@@ -12394,13 +12403,42 @@ var props$i = {
12394
12403
  type: Function
12395
12404
  }
12396
12405
  };
12406
+ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
12407
+ try {
12408
+ var info = gen[key](arg);
12409
+ var value = info.value;
12410
+ } catch (error) {
12411
+ reject(error);
12412
+ return;
12413
+ }
12414
+ if (info.done) {
12415
+ resolve(value);
12416
+ } else {
12417
+ Promise.resolve(value).then(_next, _throw);
12418
+ }
12419
+ }
12420
+ function _asyncToGenerator$2(fn) {
12421
+ return function() {
12422
+ var self = this, args = arguments;
12423
+ return new Promise(function(resolve, reject) {
12424
+ var gen = fn.apply(self, args);
12425
+ function _next(value) {
12426
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
12427
+ }
12428
+ function _throw(err) {
12429
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
12430
+ }
12431
+ _next(void 0);
12432
+ });
12433
+ };
12434
+ }
12397
12435
  var {
12398
12436
  n: n$m,
12399
12437
  classes: classes$h
12400
12438
  } = createNamespace("pull-refresh");
12401
12439
  var MAX_DISTANCE = 100;
12402
12440
  var CONTROL_POSITION = -50;
12403
- var scroller;
12441
+ var ICON_TRANSITION = 150;
12404
12442
  function render$k(_ctx, _cache) {
12405
12443
  var _component_var_icon = resolveComponent("var-icon");
12406
12444
  return openBlock(), createElementBlock("div", {
@@ -12423,10 +12461,10 @@ function render$k(_ctx, _cache) {
12423
12461
  style: normalizeStyle(_ctx.controlStyle)
12424
12462
  }, [createVNode(_component_var_icon, {
12425
12463
  name: _ctx.iconName,
12426
- transition: 200,
12427
- class: normalizeClass(_ctx.classes(_ctx.n("icon"), [_ctx.refreshStatus === "loading", _ctx.n("animation")])),
12464
+ transition: _ctx.ICON_TRANSITION,
12465
+ class: normalizeClass(_ctx.classes(_ctx.n("icon"), [_ctx.refreshStatus === "loading" && _ctx.iconHasChanged, _ctx.n("animation")])),
12428
12466
  "var-pull-refresh-cover": ""
12429
- }, null, 8, ["name", "class"])], 6), renderSlot(_ctx.$slots, "default")], 34);
12467
+ }, null, 8, ["name", "transition", "class"])], 6), renderSlot(_ctx.$slots, "default")], 34);
12430
12468
  }
12431
12469
  var PullRefresh = defineComponent({
12432
12470
  render: render$k,
@@ -12436,12 +12474,15 @@ var PullRefresh = defineComponent({
12436
12474
  },
12437
12475
  props: props$i,
12438
12476
  setup(props2) {
12477
+ var scroller;
12478
+ var changing;
12439
12479
  var freshNode = ref(null);
12440
12480
  var startPosition = ref(0);
12441
12481
  var distance = ref(CONTROL_POSITION);
12442
12482
  var iconName = ref("arrow-down");
12443
12483
  var refreshStatus = ref("default");
12444
12484
  var isEnd = ref(false);
12485
+ var iconHasChanged = ref(true);
12445
12486
  var isTouchable = computed(() => refreshStatus.value !== "loading" && refreshStatus.value !== "success" && !props2.disabled);
12446
12487
  var controlStyle = computed(() => ({
12447
12488
  transform: "translate3d(0px, " + distance.value + "px, 0px) translate(-50%, 0)",
@@ -12450,6 +12491,14 @@ var PullRefresh = defineComponent({
12450
12491
  color: props2.successColor || props2.color
12451
12492
  }));
12452
12493
  var isSuccess = computed(() => refreshStatus.value === "success");
12494
+ var changeIcon = () => {
12495
+ return new Promise((resolve) => {
12496
+ window.setTimeout(() => {
12497
+ iconHasChanged.value = true;
12498
+ resolve();
12499
+ }, ICON_TRANSITION);
12500
+ });
12501
+ };
12453
12502
  var touchStart = (event) => {
12454
12503
  if (!isTouchable.value)
12455
12504
  return;
@@ -12464,27 +12513,39 @@ var PullRefresh = defineComponent({
12464
12513
  event.cancelable && event.preventDefault();
12465
12514
  var moveDistance = (event.touches[0].clientY - startPosition.value) / 2 + CONTROL_POSITION;
12466
12515
  distance.value = moveDistance >= MAX_DISTANCE ? MAX_DISTANCE : moveDistance;
12467
- iconName.value = distance.value >= MAX_DISTANCE * 0.2 ? "refresh" : "arrow-down";
12468
- };
12469
- var touchEnd = () => {
12470
- if (!isTouchable.value)
12471
- return;
12472
- isEnd.value = true;
12473
12516
  if (distance.value >= MAX_DISTANCE * 0.2) {
12474
- var _props$onUpdateModel;
12475
- refreshStatus.value = "loading";
12476
- distance.value = MAX_DISTANCE * 0.3;
12477
- (_props$onUpdateModel = props2["onUpdate:modelValue"]) == null ? void 0 : _props$onUpdateModel.call(props2, true);
12478
- props2.onRefresh == null ? void 0 : props2.onRefresh();
12517
+ iconHasChanged.value = false;
12518
+ iconName.value = "refresh";
12519
+ changing = changeIcon();
12479
12520
  } else {
12480
- refreshStatus.value = "loosing";
12481
12521
  iconName.value = "arrow-down";
12482
- distance.value = CONTROL_POSITION;
12483
- setTimeout(() => {
12484
- isEnd.value = false;
12485
- }, toNumber(props2.animationDuration));
12486
12522
  }
12487
12523
  };
12524
+ var touchEnd = /* @__PURE__ */ function() {
12525
+ var _ref = _asyncToGenerator$2(function* () {
12526
+ if (!isTouchable.value)
12527
+ return;
12528
+ isEnd.value = true;
12529
+ if (distance.value >= MAX_DISTANCE * 0.2) {
12530
+ var _props$onUpdateModel;
12531
+ yield changing;
12532
+ refreshStatus.value = "loading";
12533
+ distance.value = MAX_DISTANCE * 0.3;
12534
+ (_props$onUpdateModel = props2["onUpdate:modelValue"]) == null ? void 0 : _props$onUpdateModel.call(props2, true);
12535
+ props2.onRefresh == null ? void 0 : props2.onRefresh();
12536
+ } else {
12537
+ refreshStatus.value = "loosing";
12538
+ iconName.value = "arrow-down";
12539
+ distance.value = CONTROL_POSITION;
12540
+ setTimeout(() => {
12541
+ isEnd.value = false;
12542
+ }, toNumber(props2.animationDuration));
12543
+ }
12544
+ });
12545
+ return function touchEnd2() {
12546
+ return _ref.apply(this, arguments);
12547
+ };
12548
+ }();
12488
12549
  var reset = () => {
12489
12550
  setTimeout(() => {
12490
12551
  refreshStatus.value = "default";
@@ -12509,6 +12570,8 @@ var PullRefresh = defineComponent({
12509
12570
  return {
12510
12571
  n: n$m,
12511
12572
  classes: classes$h,
12573
+ iconHasChanged,
12574
+ ICON_TRANSITION,
12512
12575
  refreshStatus,
12513
12576
  freshNode,
12514
12577
  touchStart,
@@ -15715,17 +15778,17 @@ var Tabs = defineComponent({
15715
15778
  if (!scrollable.value) {
15716
15779
  return;
15717
15780
  }
15718
- var scroller2 = scrollerEl.value;
15781
+ var scroller = scrollerEl.value;
15719
15782
  var el = element.value;
15720
15783
  if (props2.layoutDirection === "horizontal") {
15721
- var left = el.offsetLeft + el.offsetWidth / 2 - scroller2.offsetWidth / 2;
15722
- scrollTo(scroller2, {
15784
+ var left = el.offsetLeft + el.offsetWidth / 2 - scroller.offsetWidth / 2;
15785
+ scrollTo(scroller, {
15723
15786
  left,
15724
15787
  animation: linear
15725
15788
  });
15726
15789
  } else {
15727
- var top = el.offsetTop + el.offsetHeight / 2 - scroller2.offsetHeight / 2;
15728
- scrollTo(scroller2, {
15790
+ var top = el.offsetTop + el.offsetHeight / 2 - scroller.offsetHeight / 2;
15791
+ scrollTo(scroller, {
15729
15792
  top,
15730
15793
  animation: linear
15731
15794
  });