vant 4.0.0-rc.4 → 4.0.0-rc.6
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 +10 -3
- package/es/calendar/CalendarHeader.d.ts +2 -0
- package/es/calendar/CalendarHeader.mjs +5 -1
- package/es/cell/Cell.d.ts +17 -0
- package/es/cell/Cell.mjs +11 -4
- package/es/cell/index.d.ts +9 -0
- package/es/collapse-item/CollapseItem.d.ts +13 -0
- package/es/collapse-item/index.d.ts +9 -0
- package/es/coupon/index.css +1 -1
- package/es/coupon-list/index.css +1 -1
- package/es/date-picker/DatePicker.mjs +4 -1
- package/es/date-picker/utils.d.ts +1 -0
- package/es/date-picker/utils.mjs +11 -0
- package/es/field/Field.d.ts +13 -0
- package/es/field/Field.mjs +3 -3
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +9 -0
- package/es/field/types.d.ts +1 -1
- package/es/image-preview/ImagePreview.mjs +3 -1
- package/es/image-preview/ImagePreviewItem.mjs +7 -2
- package/es/image-preview/index.css +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/loading/Loading.mjs +8 -4
- package/es/nav-bar/NavBar.d.ts +13 -0
- package/es/nav-bar/NavBar.mjs +4 -3
- package/es/nav-bar/index.d.ts +9 -0
- package/es/stepper/Stepper.d.ts +13 -0
- package/es/stepper/Stepper.mjs +4 -3
- package/es/stepper/index.d.ts +9 -0
- package/es/swipe/Swipe.mjs +1 -1
- package/es/tabs/Tabs.mjs +44 -41
- package/es/time-picker/TimePicker.mjs +4 -3
- package/es/toast/Toast.d.ts +4 -1
- package/es/toast/Toast.mjs +2 -1
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +3 -1
- package/es/toast/types.d.ts +2 -0
- package/lib/calendar/Calendar.js +10 -3
- package/lib/calendar/CalendarHeader.d.ts +2 -0
- package/lib/calendar/CalendarHeader.js +5 -1
- package/lib/cell/Cell.d.ts +17 -0
- package/lib/cell/Cell.js +10 -3
- package/lib/cell/index.d.ts +9 -0
- package/lib/collapse-item/CollapseItem.d.ts +13 -0
- package/lib/collapse-item/index.d.ts +9 -0
- package/lib/coupon/index.css +1 -1
- package/lib/coupon-list/index.css +1 -1
- package/lib/date-picker/DatePicker.js +3 -0
- package/lib/date-picker/utils.d.ts +1 -0
- package/lib/date-picker/utils.js +11 -0
- package/lib/field/Field.d.ts +13 -0
- package/lib/field/Field.js +3 -3
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +9 -0
- package/lib/field/types.d.ts +1 -1
- package/lib/image-preview/ImagePreview.js +3 -1
- package/lib/image-preview/ImagePreviewItem.js +7 -2
- package/lib/image-preview/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/loading/Loading.js +8 -4
- package/lib/nav-bar/NavBar.d.ts +13 -0
- package/lib/nav-bar/NavBar.js +4 -3
- package/lib/nav-bar/index.d.ts +9 -0
- package/lib/stepper/Stepper.d.ts +13 -0
- package/lib/stepper/Stepper.js +4 -3
- package/lib/stepper/index.d.ts +9 -0
- package/lib/swipe/Swipe.js +1 -1
- package/lib/tabs/Tabs.js +44 -41
- package/lib/time-picker/TimePicker.js +3 -2
- package/lib/toast/Toast.d.ts +4 -1
- package/lib/toast/Toast.js +2 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +3 -1
- package/lib/toast/types.d.ts +2 -0
- package/lib/vant.cjs.js +118 -69
- package/lib/vant.es.js +118 -69
- package/lib/vant.js +118 -69
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +671 -633
- package/package.json +2 -2
- package/changelog.generated.md +0 -59
package/lib/vant.cjs.js
CHANGED
@@ -739,6 +739,13 @@ var stdin_default$1z = vue.defineComponent({
|
|
739
739
|
const spinnerStyle = vue.computed(() => extend({
|
740
740
|
color: props.color
|
741
741
|
}, getSizeStyle(props.size)));
|
742
|
+
const renderIcon = () => {
|
743
|
+
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
744
|
+
return vue.createVNode("span", {
|
745
|
+
"class": bem$1n("spinner", props.type),
|
746
|
+
"style": spinnerStyle.value
|
747
|
+
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
748
|
+
};
|
742
749
|
const renderText = () => {
|
743
750
|
var _a;
|
744
751
|
if (slots.default) {
|
@@ -762,10 +769,7 @@ var stdin_default$1z = vue.defineComponent({
|
|
762
769
|
}]),
|
763
770
|
"aria-live": "polite",
|
764
771
|
"aria-busy": true
|
765
|
-
}, [
|
766
|
-
"class": bem$1n("spinner", type),
|
767
|
-
"style": spinnerStyle.value
|
768
|
-
}, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
|
772
|
+
}, [renderIcon(), renderText()]);
|
769
773
|
};
|
770
774
|
}
|
771
775
|
});
|
@@ -2152,7 +2156,7 @@ var stdin_default$1o = vue.defineComponent({
|
|
2152
2156
|
}
|
2153
2157
|
return 0;
|
2154
2158
|
});
|
2155
|
-
const maxCount = vue.computed(() => Math.ceil(Math.abs(minOffset.value) / size.value));
|
2159
|
+
const maxCount = vue.computed(() => size.value ? Math.ceil(Math.abs(minOffset.value) / size.value) : count.value);
|
2156
2160
|
const trackSize = vue.computed(() => count.value * size.value);
|
2157
2161
|
const activeIndicator = vue.computed(() => (state.active + count.value) % count.value);
|
2158
2162
|
const isCorrectDirection = vue.computed(() => {
|
@@ -2643,17 +2647,19 @@ var stdin_default$1m = vue.defineComponent({
|
|
2643
2647
|
const newTab = children[newIndex];
|
2644
2648
|
const newName = getTabName(newTab, newIndex);
|
2645
2649
|
const shouldEmitChange = state.currentIndex !== null;
|
2646
|
-
state.currentIndex
|
2650
|
+
if (state.currentIndex !== newIndex) {
|
2651
|
+
state.currentIndex = newIndex;
|
2652
|
+
if (!skipScrollIntoView) {
|
2653
|
+
scrollIntoView();
|
2654
|
+
}
|
2655
|
+
setLine();
|
2656
|
+
}
|
2647
2657
|
if (newName !== props.active) {
|
2648
2658
|
emit("update:active", newName);
|
2649
2659
|
if (shouldEmitChange) {
|
2650
2660
|
emit("change", newName, newTab.title);
|
2651
2661
|
}
|
2652
2662
|
}
|
2653
|
-
if (!skipScrollIntoView) {
|
2654
|
-
scrollIntoView();
|
2655
|
-
}
|
2656
|
-
setLine();
|
2657
2663
|
if (stickyFixed && !props.scrollspy) {
|
2658
2664
|
setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
|
2659
2665
|
}
|
@@ -2752,13 +2758,14 @@ var stdin_default$1m = vue.defineComponent({
|
|
2752
2758
|
}
|
2753
2759
|
};
|
2754
2760
|
const renderHeader = () => {
|
2755
|
-
var _a, _b;
|
2761
|
+
var _a, _b, _c;
|
2756
2762
|
const {
|
2757
2763
|
type,
|
2758
|
-
border
|
2764
|
+
border,
|
2765
|
+
sticky
|
2759
2766
|
} = props;
|
2760
|
-
|
2761
|
-
"ref": wrapRef,
|
2767
|
+
const Header = [vue.createVNode("div", {
|
2768
|
+
"ref": sticky ? void 0 : wrapRef,
|
2762
2769
|
"class": [bem$1a("wrap"), {
|
2763
2770
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
2764
2771
|
}]
|
@@ -2771,7 +2778,13 @@ var stdin_default$1m = vue.defineComponent({
|
|
2771
2778
|
}]),
|
2772
2779
|
"style": navStyle.value,
|
2773
2780
|
"aria-orientation": "horizontal"
|
2774
|
-
}, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), renderNav(), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]);
|
2781
|
+
}, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), renderNav(), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]), (_c = slots["nav-bottom"]) == null ? void 0 : _c.call(slots)];
|
2782
|
+
if (sticky) {
|
2783
|
+
return vue.createVNode("div", {
|
2784
|
+
"ref": wrapRef
|
2785
|
+
}, [Header]);
|
2786
|
+
}
|
2787
|
+
return Header;
|
2775
2788
|
};
|
2776
2789
|
vue.watch([() => props.color, windowWidth], setLine);
|
2777
2790
|
vue.watch(() => props.active, (value) => {
|
@@ -2825,37 +2838,31 @@ var stdin_default$1m = vue.defineComponent({
|
|
2825
2838
|
currentName,
|
2826
2839
|
scrollIntoView
|
2827
2840
|
});
|
2828
|
-
return () => {
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2853
|
-
default: () => {
|
2854
|
-
var _a2;
|
2855
|
-
return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
|
2856
|
-
}
|
2857
|
-
})]);
|
2858
|
-
};
|
2841
|
+
return () => vue.createVNode("div", {
|
2842
|
+
"ref": root,
|
2843
|
+
"class": bem$1a([props.type])
|
2844
|
+
}, [props.sticky ? vue.createVNode(Sticky, {
|
2845
|
+
"container": root.value,
|
2846
|
+
"offsetTop": offsetTopPx.value,
|
2847
|
+
"onScroll": onStickyScroll
|
2848
|
+
}, {
|
2849
|
+
default: () => [renderHeader()]
|
2850
|
+
}) : renderHeader(), vue.createVNode(stdin_default$1n, {
|
2851
|
+
"ref": contentRef,
|
2852
|
+
"count": children.length,
|
2853
|
+
"inited": state.inited,
|
2854
|
+
"animated": props.animated,
|
2855
|
+
"duration": props.duration,
|
2856
|
+
"swipeable": props.swipeable,
|
2857
|
+
"lazyRender": props.lazyRender,
|
2858
|
+
"currentIndex": state.currentIndex,
|
2859
|
+
"onChange": setCurrentIndex
|
2860
|
+
}, {
|
2861
|
+
default: () => {
|
2862
|
+
var _a;
|
2863
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
2864
|
+
}
|
2865
|
+
})]);
|
2859
2866
|
}
|
2860
2867
|
});
|
2861
2868
|
const TAB_STATUS_KEY = Symbol();
|
@@ -3427,6 +3434,7 @@ var stdin_default$1h = vue.defineComponent({
|
|
3427
3434
|
const Area = withInstall(stdin_default$1h);
|
3428
3435
|
const [name$19, bem$15] = createNamespace("cell");
|
3429
3436
|
const cellSharedProps = {
|
3437
|
+
tag: makeStringProp("div"),
|
3430
3438
|
icon: String,
|
3431
3439
|
size: String,
|
3432
3440
|
title: numericProp,
|
@@ -3505,8 +3513,9 @@ var stdin_default$1g = vue.defineComponent({
|
|
3505
3513
|
}
|
3506
3514
|
};
|
3507
3515
|
return () => {
|
3508
|
-
var _a
|
3516
|
+
var _a;
|
3509
3517
|
const {
|
3518
|
+
tag,
|
3510
3519
|
size,
|
3511
3520
|
center,
|
3512
3521
|
border,
|
@@ -3523,12 +3532,17 @@ var stdin_default$1g = vue.defineComponent({
|
|
3523
3532
|
if (size) {
|
3524
3533
|
classes[size] = !!size;
|
3525
3534
|
}
|
3526
|
-
return vue.createVNode(
|
3535
|
+
return vue.createVNode(tag, {
|
3527
3536
|
"class": bem$15(classes),
|
3528
3537
|
"role": clickable ? "button" : void 0,
|
3529
3538
|
"tabindex": clickable ? 0 : void 0,
|
3530
3539
|
"onClick": route2
|
3531
|
-
},
|
3540
|
+
}, {
|
3541
|
+
default: () => {
|
3542
|
+
var _a2;
|
3543
|
+
return [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_a2 = slots.extra) == null ? void 0 : _a2.call(slots)];
|
3544
|
+
}
|
3545
|
+
});
|
3532
3546
|
};
|
3533
3547
|
}
|
3534
3548
|
});
|
@@ -4191,9 +4205,9 @@ var stdin_default$1e = vue.defineComponent({
|
|
4191
4205
|
const labelAlign = getProp("labelAlign");
|
4192
4206
|
const Label = renderLabel();
|
4193
4207
|
const LeftIcon = renderLeftIcon();
|
4208
|
+
const renderTitle = () => labelAlign === "top" ? [LeftIcon, Label] : Label;
|
4194
4209
|
return vue.createVNode(Cell, {
|
4195
4210
|
"size": props.size,
|
4196
|
-
"icon": props.leftIcon,
|
4197
4211
|
"class": bem$13({
|
4198
4212
|
error: showError.value,
|
4199
4213
|
disabled,
|
@@ -4210,8 +4224,8 @@ var stdin_default$1e = vue.defineComponent({
|
|
4210
4224
|
}]), props.labelClass],
|
4211
4225
|
"arrowDirection": props.arrowDirection
|
4212
4226
|
}, {
|
4213
|
-
icon: LeftIcon ? () => LeftIcon : null,
|
4214
|
-
title: Label
|
4227
|
+
icon: LeftIcon && labelAlign !== "top" ? () => LeftIcon : null,
|
4228
|
+
title: Label || labelAlign === "top" ? renderTitle : null,
|
4215
4229
|
value: renderFieldBody,
|
4216
4230
|
extra: slots.extra
|
4217
4231
|
});
|
@@ -4245,6 +4259,7 @@ const toastProps = {
|
|
4245
4259
|
duration: makeNumberProp(2e3),
|
4246
4260
|
position: makeStringProp("middle"),
|
4247
4261
|
teleport: [String, Object],
|
4262
|
+
wordBreak: String,
|
4248
4263
|
className: unknownProp,
|
4249
4264
|
iconPrefix: String,
|
4250
4265
|
transition: makeStringProp("van-fade"),
|
@@ -4336,7 +4351,7 @@ var stdin_default$1d = vue.defineComponent({
|
|
4336
4351
|
vue.onMounted(toggleClickable);
|
4337
4352
|
vue.onUnmounted(toggleClickable);
|
4338
4353
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
4339
|
-
"class": [bem$12([props.position, {
|
4354
|
+
"class": [bem$12([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
4340
4355
|
[props.type]: !props.icon
|
4341
4356
|
}]), props.className],
|
4342
4357
|
"lockScroll": false,
|
@@ -5399,6 +5414,16 @@ const genOptions = (min, max, type, formatter, filter) => {
|
|
5399
5414
|
});
|
5400
5415
|
return filter ? filter(type, options) : options;
|
5401
5416
|
};
|
5417
|
+
const formatValueRange = (values, columns) => values.map((value, index) => {
|
5418
|
+
const column = columns[index];
|
5419
|
+
if (column.length) {
|
5420
|
+
const maxValue = +column[column.length - 1].value;
|
5421
|
+
if (+value > maxValue) {
|
5422
|
+
return String(maxValue);
|
5423
|
+
}
|
5424
|
+
}
|
5425
|
+
return value;
|
5426
|
+
});
|
5402
5427
|
const [name$Y] = createNamespace("calendar-day");
|
5403
5428
|
var stdin_default$13 = vue.defineComponent({
|
5404
5429
|
name: name$Y,
|
@@ -5721,6 +5746,7 @@ const [name$W] = createNamespace("calendar-header");
|
|
5721
5746
|
var stdin_default$11 = vue.defineComponent({
|
5722
5747
|
name: name$W,
|
5723
5748
|
props: {
|
5749
|
+
date: Date,
|
5724
5750
|
title: String,
|
5725
5751
|
subtitle: String,
|
5726
5752
|
showTitle: Boolean,
|
@@ -5744,7 +5770,10 @@ var stdin_default$11 = vue.defineComponent({
|
|
5744
5770
|
const onClickSubtitle = (event) => emit("clickSubtitle", event);
|
5745
5771
|
const renderSubtitle = () => {
|
5746
5772
|
if (props.showSubtitle) {
|
5747
|
-
const title = slots.subtitle ? slots.subtitle(
|
5773
|
+
const title = slots.subtitle ? slots.subtitle({
|
5774
|
+
date: props.date,
|
5775
|
+
text: props.subtitle
|
5776
|
+
}) : props.subtitle;
|
5748
5777
|
return vue.createVNode("div", {
|
5749
5778
|
"class": bem$V("header-subtitle"),
|
5750
5779
|
"onClick": onClickSubtitle
|
@@ -5864,7 +5893,10 @@ var stdin_default$10 = vue.defineComponent({
|
|
5864
5893
|
};
|
5865
5894
|
let bodyHeight;
|
5866
5895
|
const bodyRef = vue.ref();
|
5867
|
-
const subtitle = vue.ref(
|
5896
|
+
const subtitle = vue.ref({
|
5897
|
+
text: "",
|
5898
|
+
date: void 0
|
5899
|
+
});
|
5868
5900
|
const currentDate = vue.ref(getInitialDate());
|
5869
5901
|
const [monthRefs, setMonthRefs] = useRefs();
|
5870
5902
|
const dayOffset = vue.computed(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
|
@@ -5925,7 +5957,10 @@ var stdin_default$10 = vue.defineComponent({
|
|
5925
5957
|
monthRefs.value[index].setVisible(visible);
|
5926
5958
|
});
|
5927
5959
|
if (currentMonth) {
|
5928
|
-
subtitle.value =
|
5960
|
+
subtitle.value = {
|
5961
|
+
text: currentMonth.getTitle(),
|
5962
|
+
date: currentMonth.date
|
5963
|
+
};
|
5929
5964
|
}
|
5930
5965
|
};
|
5931
5966
|
const scrollToDate = (targetDate) => {
|
@@ -6115,8 +6150,9 @@ var stdin_default$10 = vue.defineComponent({
|
|
6115
6150
|
const renderCalendar = () => vue.createVNode("div", {
|
6116
6151
|
"class": bem$V()
|
6117
6152
|
}, [vue.createVNode(stdin_default$11, {
|
6153
|
+
"date": subtitle.value.date,
|
6118
6154
|
"title": props.title,
|
6119
|
-
"subtitle": subtitle.value,
|
6155
|
+
"subtitle": subtitle.value.text,
|
6120
6156
|
"showTitle": props.showTitle,
|
6121
6157
|
"showSubtitle": props.showSubtitle,
|
6122
6158
|
"firstDayOfWeek": dayOffset.value,
|
@@ -8334,9 +8370,12 @@ var stdin_default$I = vue.defineComponent({
|
|
8334
8370
|
}
|
8335
8371
|
});
|
8336
8372
|
vue.watch(() => props.modelValue, (newValues) => {
|
8373
|
+
newValues = formatValueRange(newValues, columns.value);
|
8337
8374
|
if (!isSameValue(newValues, currentValues.value)) {
|
8338
8375
|
currentValues.value = newValues;
|
8339
8376
|
}
|
8377
|
+
}, {
|
8378
|
+
immediate: true
|
8340
8379
|
});
|
8341
8380
|
const onChange = (...args) => emit("change", ...args);
|
8342
8381
|
const onCancel = (...args) => emit("cancel", ...args);
|
@@ -9144,7 +9183,8 @@ var stdin_default$B = vue.defineComponent({
|
|
9144
9183
|
},
|
9145
9184
|
emits: ["scale", "close"],
|
9146
9185
|
setup(props, {
|
9147
|
-
emit
|
9186
|
+
emit,
|
9187
|
+
slots
|
9148
9188
|
}) {
|
9149
9189
|
const state = vue.reactive({
|
9150
9190
|
scale: 1,
|
@@ -9362,7 +9402,11 @@ var stdin_default$B = vue.defineComponent({
|
|
9362
9402
|
"onTouchend": onTouchEnd,
|
9363
9403
|
"onTouchcancel": onTouchEnd
|
9364
9404
|
}, {
|
9365
|
-
default: () => [vue.createVNode(
|
9405
|
+
default: () => [slots.image ? vue.createVNode("div", {
|
9406
|
+
"class": bem$v("image-wrap")
|
9407
|
+
}, [slots.image({
|
9408
|
+
src: props.src
|
9409
|
+
})]) : vue.createVNode(Image$1, {
|
9366
9410
|
"src": props.src,
|
9367
9411
|
"fit": "contain",
|
9368
9412
|
"class": bem$v("image", {
|
@@ -9471,7 +9515,9 @@ var stdin_default$A = vue.defineComponent({
|
|
9471
9515
|
"rootHeight": state.rootHeight,
|
9472
9516
|
"onScale": emitScale,
|
9473
9517
|
"onClose": emitClose
|
9474
|
-
},
|
9518
|
+
}, {
|
9519
|
+
image: slots.image
|
9520
|
+
}))]
|
9475
9521
|
});
|
9476
9522
|
const renderClose = () => {
|
9477
9523
|
if (props.closeable) {
|
@@ -10017,7 +10063,8 @@ const navBarProps = {
|
|
10017
10063
|
rightText: String,
|
10018
10064
|
leftArrow: Boolean,
|
10019
10065
|
placeholder: Boolean,
|
10020
|
-
safeAreaInsetTop: Boolean
|
10066
|
+
safeAreaInsetTop: Boolean,
|
10067
|
+
clickable: truthProp
|
10021
10068
|
};
|
10022
10069
|
var stdin_default$w = vue.defineComponent({
|
10023
10070
|
name: name$r,
|
@@ -10072,12 +10119,12 @@ var stdin_default$w = vue.defineComponent({
|
|
10072
10119
|
}, [vue.createVNode("div", {
|
10073
10120
|
"class": bem$q("content")
|
10074
10121
|
}, [hasLeft && vue.createVNode("div", {
|
10075
|
-
"class": [bem$q("left"), HAPTICS_FEEDBACK],
|
10122
|
+
"class": [bem$q("left"), props.clickable ? HAPTICS_FEEDBACK : ""],
|
10076
10123
|
"onClick": onClickLeft
|
10077
10124
|
}, [renderLeft()]), vue.createVNode("div", {
|
10078
10125
|
"class": [bem$q("title"), "van-ellipsis"]
|
10079
10126
|
}, [slots.title ? slots.title() : title]), hasRight && vue.createVNode("div", {
|
10080
|
-
"class": [bem$q("right"), HAPTICS_FEEDBACK],
|
10127
|
+
"class": [bem$q("right"), props.clickable ? HAPTICS_FEEDBACK : ""],
|
10081
10128
|
"onClick": onClickRight
|
10082
10129
|
}, [renderRight()])])]);
|
10083
10130
|
};
|
@@ -12410,6 +12457,7 @@ const stepperProps = {
|
|
12410
12457
|
showMinus: truthProp,
|
12411
12458
|
showInput: truthProp,
|
12412
12459
|
longPress: truthProp,
|
12460
|
+
autoFixed: truthProp,
|
12413
12461
|
allowEmpty: Boolean,
|
12414
12462
|
modelValue: numericProp,
|
12415
12463
|
inputWidth: numericProp,
|
@@ -12429,7 +12477,7 @@ var stdin_default$c = vue.defineComponent({
|
|
12429
12477
|
setup(props, {
|
12430
12478
|
emit
|
12431
12479
|
}) {
|
12432
|
-
const format2 = (value) => {
|
12480
|
+
const format2 = (value, autoFixed = true) => {
|
12433
12481
|
const {
|
12434
12482
|
min,
|
12435
12483
|
max,
|
@@ -12442,7 +12490,7 @@ var stdin_default$c = vue.defineComponent({
|
|
12442
12490
|
value = formatNumber(String(value), !props.integer);
|
12443
12491
|
value = value === "" ? 0 : +value;
|
12444
12492
|
value = Number.isNaN(value) ? +min : value;
|
12445
|
-
value = Math.max(Math.min(+max, value), +min);
|
12493
|
+
value = autoFixed ? Math.max(Math.min(+max, value), +min) : value;
|
12446
12494
|
if (isDef(decimalLength)) {
|
12447
12495
|
value = value.toFixed(+decimalLength);
|
12448
12496
|
}
|
@@ -12526,7 +12574,7 @@ var stdin_default$c = vue.defineComponent({
|
|
12526
12574
|
};
|
12527
12575
|
const onBlur = (event) => {
|
12528
12576
|
const input = event.target;
|
12529
|
-
const value = format2(input.value);
|
12577
|
+
const value = format2(input.value, props.autoFixed);
|
12530
12578
|
input.value = String(value);
|
12531
12579
|
current2.value = value;
|
12532
12580
|
vue.nextTick(() => {
|
@@ -13125,13 +13173,14 @@ var stdin_default$7 = vue.defineComponent({
|
|
13125
13173
|
if (!isSameValue(newValues, props.modelValue)) {
|
13126
13174
|
emit("update:modelValue", newValues);
|
13127
13175
|
}
|
13128
|
-
}, {
|
13129
|
-
immediate: true
|
13130
13176
|
});
|
13131
13177
|
vue.watch(() => props.modelValue, (newValues) => {
|
13178
|
+
newValues = formatValueRange(newValues, columns.value);
|
13132
13179
|
if (!isSameValue(newValues, currentValues.value)) {
|
13133
13180
|
currentValues.value = newValues;
|
13134
13181
|
}
|
13182
|
+
}, {
|
13183
|
+
immediate: true
|
13135
13184
|
});
|
13136
13185
|
const onChange = (...args) => emit("change", ...args);
|
13137
13186
|
const onCancel = (...args) => emit("cancel", ...args);
|
@@ -14552,7 +14601,7 @@ const Lazyload = {
|
|
14552
14601
|
});
|
14553
14602
|
}
|
14554
14603
|
};
|
14555
|
-
const version = "4.0.0-rc.
|
14604
|
+
const version = "4.0.0-rc.6";
|
14556
14605
|
function install(app) {
|
14557
14606
|
const components = [
|
14558
14607
|
ActionBar,
|