vant 4.9.3 → 4.9.5
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/calendar/Calendar.mjs +5 -3
- package/es/calendar/index.css +1 -1
- package/es/calendar/types.d.ts +2 -2
- package/es/field/Field.d.ts +8 -0
- package/es/field/Field.mjs +8 -1
- package/es/field/index.d.ts +4 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +1 -1
- package/es/locale/lang/kk-KZ.d.ts +63 -0
- package/es/locale/lang/kk-KZ.mjs +81 -0
- package/es/overlay/Overlay.d.ts +3 -0
- package/es/overlay/Overlay.mjs +19 -8
- package/es/overlay/index.d.ts +2 -0
- package/es/search/Search.d.ts +6 -0
- package/es/search/index.d.ts +4 -0
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/swipe-cell/SwipeCell.mjs +7 -3
- package/lib/calendar/Calendar.js +5 -3
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/types.d.ts +2 -2
- package/lib/field/Field.d.ts +8 -0
- package/lib/field/Field.js +7 -0
- package/lib/field/index.d.ts +4 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +1 -1
- package/lib/locale/lang/kk-KZ.d.ts +63 -0
- package/lib/locale/lang/kk-KZ.js +100 -0
- package/lib/overlay/Overlay.d.ts +3 -0
- package/lib/overlay/Overlay.js +18 -7
- package/lib/overlay/index.d.ts +2 -0
- package/lib/search/Search.d.ts +6 -0
- package/lib/search/index.d.ts +4 -0
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/swipe-cell/SwipeCell.js +7 -3
- package/lib/vant.cjs.js +38 -14
- package/lib/vant.es.js +39 -15
- package/lib/vant.js +38 -14
- package/lib/vant.min.js +2 -2
- package/lib/web-types.json +1 -1
- package/package.json +8 -8
package/lib/vant.js
CHANGED
@@ -1668,7 +1668,8 @@
|
|
1668
1668
|
className: unknownProp,
|
1669
1669
|
lockScroll: truthProp,
|
1670
1670
|
lazyRender: truthProp,
|
1671
|
-
customStyle: Object
|
1671
|
+
customStyle: Object,
|
1672
|
+
teleport: [String, Object]
|
1672
1673
|
};
|
1673
1674
|
var stdin_default$1L = vue.defineComponent({
|
1674
1675
|
name: name$1C,
|
@@ -1698,12 +1699,22 @@
|
|
1698
1699
|
useEventListener("touchmove", onTouchMove, {
|
1699
1700
|
target: root
|
1700
1701
|
});
|
1701
|
-
return () =>
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1702
|
+
return () => {
|
1703
|
+
const Content = vue.createVNode(vue.Transition, {
|
1704
|
+
"name": "van-fade",
|
1705
|
+
"appear": true
|
1706
|
+
}, {
|
1707
|
+
default: renderOverlay
|
1708
|
+
});
|
1709
|
+
if (props2.teleport) {
|
1710
|
+
return vue.createVNode(vue.Teleport, {
|
1711
|
+
"to": props2.teleport
|
1712
|
+
}, {
|
1713
|
+
default: () => [Content]
|
1714
|
+
});
|
1715
|
+
}
|
1716
|
+
return Content;
|
1717
|
+
};
|
1707
1718
|
}
|
1708
1719
|
});
|
1709
1720
|
const Overlay = withInstall(stdin_default$1L);
|
@@ -4532,6 +4543,8 @@
|
|
4532
4543
|
autofocus: Boolean,
|
4533
4544
|
clearable: Boolean,
|
4534
4545
|
maxlength: numericProp,
|
4546
|
+
max: Number,
|
4547
|
+
min: Number,
|
4535
4548
|
formatter: Function,
|
4536
4549
|
clearIcon: makeStringProp("clear"),
|
4537
4550
|
modelValue: makeNumericProp(""),
|
@@ -4729,12 +4742,17 @@
|
|
4729
4742
|
return value;
|
4730
4743
|
};
|
4731
4744
|
const updateValue = (value, trigger = "onChange") => {
|
4745
|
+
var _a, _b;
|
4732
4746
|
const originalValue = value;
|
4733
4747
|
value = limitValueLength(value);
|
4734
4748
|
const limitDiffLen = getStringLength(originalValue) - getStringLength(value);
|
4735
4749
|
if (props2.type === "number" || props2.type === "digit") {
|
4736
4750
|
const isNumber = props2.type === "number";
|
4737
4751
|
value = formatNumber(value, isNumber, isNumber);
|
4752
|
+
if (trigger === "onBlur" && value !== "") {
|
4753
|
+
const adjustedValue = clamp(+value, (_a = props2.min) != null ? _a : -Infinity, (_b = props2.max) != null ? _b : Infinity);
|
4754
|
+
value = adjustedValue.toString();
|
4755
|
+
}
|
4738
4756
|
}
|
4739
4757
|
let formatterDiffLen = 0;
|
4740
4758
|
if (props2.formatter && trigger === props2.formatTrigger) {
|
@@ -7385,6 +7403,9 @@
|
|
7385
7403
|
if (!Array.isArray(defaultDate)) {
|
7386
7404
|
defaultDate = [];
|
7387
7405
|
}
|
7406
|
+
if (defaultDate.length === 1 && compareDay(defaultDate[0], now) === 1) {
|
7407
|
+
defaultDate = [];
|
7408
|
+
}
|
7388
7409
|
const min = minDate.value;
|
7389
7410
|
const max = maxDate.value;
|
7390
7411
|
const start2 = limitDateRange(defaultDate[0] || now, min, max ? allowSameDay ? max : getPrevDay(max) : void 0);
|
@@ -7700,9 +7721,8 @@
|
|
7700
7721
|
};
|
7701
7722
|
vue.watch(() => props2.show, init);
|
7702
7723
|
vue.watch(() => [props2.type, props2.minDate, props2.maxDate, props2.switchMode], () => reset(getInitialDate(currentDate.value)));
|
7703
|
-
vue.watch(() => props2.defaultDate, (value
|
7704
|
-
|
7705
|
-
scrollToCurrentDate();
|
7724
|
+
vue.watch(() => props2.defaultDate, (value) => {
|
7725
|
+
reset(value);
|
7706
7726
|
});
|
7707
7727
|
useExpose({
|
7708
7728
|
reset,
|
@@ -16197,7 +16217,7 @@
|
|
16197
16217
|
}, 0);
|
16198
16218
|
}
|
16199
16219
|
};
|
16200
|
-
const onClick = (position = "outside") => {
|
16220
|
+
const onClick = (position = "outside", event) => {
|
16201
16221
|
if (isInBeforeClosing)
|
16202
16222
|
return;
|
16203
16223
|
emit("click", position);
|
@@ -16205,6 +16225,7 @@
|
|
16205
16225
|
isInBeforeClosing = true;
|
16206
16226
|
callInterceptor(props2.beforeClose, {
|
16207
16227
|
args: [{
|
16228
|
+
event,
|
16208
16229
|
name: props2.name,
|
16209
16230
|
position
|
16210
16231
|
}],
|
@@ -16221,7 +16242,10 @@
|
|
16221
16242
|
if (stop) {
|
16222
16243
|
event.stopPropagation();
|
16223
16244
|
}
|
16224
|
-
|
16245
|
+
if (lockClick2) {
|
16246
|
+
return;
|
16247
|
+
}
|
16248
|
+
onClick(position, event);
|
16225
16249
|
};
|
16226
16250
|
const renderSideContent = (side, ref2) => {
|
16227
16251
|
const contentSlot = slots[side];
|
@@ -16237,7 +16261,7 @@
|
|
16237
16261
|
open,
|
16238
16262
|
close
|
16239
16263
|
});
|
16240
|
-
useClickAway(root, () => onClick("outside"), {
|
16264
|
+
useClickAway(root, (event) => onClick("outside", event), {
|
16241
16265
|
eventName: "touchstart"
|
16242
16266
|
});
|
16243
16267
|
useEventListener("touchmove", onTouchMove, {
|
@@ -18258,7 +18282,7 @@
|
|
18258
18282
|
});
|
18259
18283
|
}
|
18260
18284
|
};
|
18261
|
-
const version = "4.9.
|
18285
|
+
const version = "4.9.5";
|
18262
18286
|
function install(app) {
|
18263
18287
|
const components = [
|
18264
18288
|
ActionBar,
|