vant 4.9.20 → 4.9.22
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/README.md +2 -2
- package/es/action-bar-button/index.css +1 -1
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/address-list/AddressListItem.d.ts +1 -1
- package/es/area/Area.d.ts +1 -1
- package/es/area/index.d.ts +1 -1
- package/es/calendar/index.css +1 -1
- package/es/checkbox/Checker.mjs +1 -1
- package/es/composables/on-popup-reopen.mjs +1 -1
- package/es/composables/use-tab-status.d.ts +3 -0
- package/es/composables/use-tab-status.mjs +17 -2
- package/es/composables/use-touch.mjs +4 -4
- package/es/date-picker/DatePicker.d.ts +1 -1
- package/es/date-picker/index.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -1
- package/es/field/Field.d.ts +5 -5
- package/es/field/Field.mjs +3 -3
- package/es/field/index.d.ts +3 -3
- package/es/field/types.d.ts +1 -0
- package/es/floating-bubble/FloatingBubble.d.ts +3 -22
- package/es/floating-bubble/FloatingBubble.mjs +3 -9
- package/es/floating-bubble/index.d.ts +2 -15
- package/es/floating-panel/FloatingPanel.d.ts +13 -0
- package/es/floating-panel/FloatingPanel.mjs +14 -2
- package/es/floating-panel/index.d.ts +9 -0
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/List.d.ts +13 -3
- package/es/list/List.mjs +7 -4
- package/es/list/index.d.ts +9 -2
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/progress/Progress.mjs +6 -3
- package/es/search/Search.d.ts +4 -4
- package/es/search/Search.mjs +1 -0
- package/es/search/index.d.ts +3 -3
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/stepper/Stepper.mjs +3 -0
- package/es/tab/Tab.mjs +3 -3
- package/es/tab/index.d.ts +1 -0
- package/es/tab/index.mjs +4 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +1 -1
- package/es/time-picker/TimePicker.mjs +1 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/utils/constant.mjs +1 -1
- package/lib/action-bar-button/index.css +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/address-list/AddressListItem.d.ts +1 -1
- package/lib/area/Area.d.ts +1 -1
- package/lib/area/index.d.ts +1 -1
- package/lib/calendar/index.css +1 -1
- package/lib/checkbox/Checker.js +1 -1
- package/lib/composables/on-popup-reopen.js +1 -1
- package/lib/composables/use-tab-status.d.ts +3 -0
- package/lib/composables/use-tab-status.js +16 -1
- package/lib/composables/use-touch.js +4 -4
- package/lib/date-picker/DatePicker.d.ts +1 -1
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/field/Field.d.ts +5 -5
- package/lib/field/Field.js +3 -3
- package/lib/field/index.d.ts +3 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +3 -22
- package/lib/floating-bubble/FloatingBubble.js +3 -9
- package/lib/floating-bubble/index.d.ts +2 -15
- package/lib/floating-panel/FloatingPanel.d.ts +13 -0
- package/lib/floating-panel/FloatingPanel.js +14 -2
- package/lib/floating-panel/index.d.ts +9 -0
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.d.ts +13 -3
- package/lib/list/List.js +6 -3
- package/lib/list/index.d.ts +9 -2
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/progress/Progress.js +6 -3
- package/lib/search/Search.d.ts +4 -4
- package/lib/search/Search.js +1 -0
- package/lib/search/index.d.ts +3 -3
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/stepper/Stepper.js +3 -0
- package/lib/tab/Tab.js +1 -1
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +4 -1
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/time-picker/TimePicker.d.ts +1 -1
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/utils/constant.js +1 -1
- package/lib/vant.cjs.js +57 -27
- package/lib/vant.es.js +57 -27
- package/lib/vant.js +65 -35
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +12 -12
package/lib/vant.es.js
CHANGED
|
@@ -389,7 +389,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
389
389
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
390
390
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
391
391
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
392
|
-
const FORM_KEY = Symbol("van-form");
|
|
392
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
393
393
|
const LONG_PRESS_START_TIME = 500;
|
|
394
394
|
const TAP_OFFSET = 5;
|
|
395
395
|
function callInterceptor(interceptor, {
|
|
@@ -432,7 +432,7 @@ function closest(arr, target) {
|
|
|
432
432
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
435
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
436
436
|
function onPopupReopen(callback) {
|
|
437
437
|
const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
|
|
438
438
|
if (popupToggleStatus) {
|
|
@@ -2983,8 +2983,20 @@ var stdin_default$1D = defineComponent({
|
|
|
2983
2983
|
})]);
|
|
2984
2984
|
}
|
|
2985
2985
|
});
|
|
2986
|
-
const TAB_STATUS_KEY = Symbol();
|
|
2986
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2987
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2987
2988
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
|
2989
|
+
const useAllTabStatus = () => inject(ALL_TAB_STATUS_KEY, null);
|
|
2990
|
+
const useProvideTabStatus = (status) => {
|
|
2991
|
+
const allTabStatus = useAllTabStatus();
|
|
2992
|
+
provide(TAB_STATUS_KEY, status);
|
|
2993
|
+
provide(
|
|
2994
|
+
ALL_TAB_STATUS_KEY,
|
|
2995
|
+
computed(() => {
|
|
2996
|
+
return (allTabStatus == null || allTabStatus.value) && status.value;
|
|
2997
|
+
})
|
|
2998
|
+
);
|
|
2999
|
+
};
|
|
2988
3000
|
const [name$1s, bem$1o] = createNamespace("tab");
|
|
2989
3001
|
const TabTitle = defineComponent({
|
|
2990
3002
|
name: name$1s,
|
|
@@ -3231,7 +3243,7 @@ var stdin_default$1B = defineComponent({
|
|
|
3231
3243
|
parent.setLine();
|
|
3232
3244
|
parent.scrollIntoView();
|
|
3233
3245
|
});
|
|
3234
|
-
|
|
3246
|
+
useProvideTabStatus(active);
|
|
3235
3247
|
useExpose({
|
|
3236
3248
|
id,
|
|
3237
3249
|
renderTitle
|
|
@@ -4292,7 +4304,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4292
4304
|
var _a, _b;
|
|
4293
4305
|
const originalValue = value;
|
|
4294
4306
|
value = limitValueLength(value);
|
|
4295
|
-
const limitDiffLen =
|
|
4307
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4296
4308
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4297
4309
|
const isNumber = props2.type === "number";
|
|
4298
4310
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4318,7 +4330,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4318
4330
|
selectionEnd
|
|
4319
4331
|
} = inputRef.value;
|
|
4320
4332
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4321
|
-
formatterDiffLen =
|
|
4333
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4322
4334
|
}
|
|
4323
4335
|
}
|
|
4324
4336
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4329,7 +4341,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4329
4341
|
} = inputRef.value;
|
|
4330
4342
|
inputRef.value.value = value;
|
|
4331
4343
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4332
|
-
const valueLen =
|
|
4344
|
+
const valueLen = value.length;
|
|
4333
4345
|
if (limitDiffLen) {
|
|
4334
4346
|
selectionStart -= limitDiffLen;
|
|
4335
4347
|
selectionEnd -= limitDiffLen;
|
|
@@ -5555,7 +5567,7 @@ var stdin_default$1n = defineComponent({
|
|
|
5555
5567
|
const direction = computed(() => getParentProp("direction"));
|
|
5556
5568
|
const iconStyle = computed(() => {
|
|
5557
5569
|
const checkedColor = props2.checkedColor || getParentProp("checkedColor");
|
|
5558
|
-
if (checkedColor && props2.checked && !disabled.value) {
|
|
5570
|
+
if (checkedColor && (props2.checked || props2.indeterminate) && !disabled.value) {
|
|
5559
5571
|
return {
|
|
5560
5572
|
borderColor: checkedColor,
|
|
5561
5573
|
backgroundColor: checkedColor
|
|
@@ -10167,13 +10179,7 @@ const floatingBubbleProps = {
|
|
|
10167
10179
|
icon: String,
|
|
10168
10180
|
axis: makeStringProp("y"),
|
|
10169
10181
|
magnetic: String,
|
|
10170
|
-
offset:
|
|
10171
|
-
type: Object,
|
|
10172
|
-
default: () => ({
|
|
10173
|
-
x: -1,
|
|
10174
|
-
y: -1
|
|
10175
|
-
})
|
|
10176
|
-
},
|
|
10182
|
+
offset: Object,
|
|
10177
10183
|
teleport: {
|
|
10178
10184
|
type: [String, Object],
|
|
10179
10185
|
default: "body"
|
|
@@ -10227,8 +10233,8 @@ var stdin_default$S = defineComponent({
|
|
|
10227
10233
|
offset
|
|
10228
10234
|
} = props2;
|
|
10229
10235
|
state.value = {
|
|
10230
|
-
x: offset
|
|
10231
|
-
y: offset
|
|
10236
|
+
x: offset ? offset.x : windowWidth.value - width - gapX.value,
|
|
10237
|
+
y: offset ? offset.y : windowHeight.value - height - gapY.value,
|
|
10232
10238
|
width,
|
|
10233
10239
|
height
|
|
10234
10240
|
};
|
|
@@ -10334,6 +10340,7 @@ const floatingPanelProps = {
|
|
|
10334
10340
|
height: makeNumericProp(0),
|
|
10335
10341
|
anchors: makeArrayProp(),
|
|
10336
10342
|
duration: makeNumericProp(0.3),
|
|
10343
|
+
magnetic: truthProp,
|
|
10337
10344
|
contentDraggable: truthProp,
|
|
10338
10345
|
lockScroll: Boolean,
|
|
10339
10346
|
safeAreaInsetBottom: truthProp
|
|
@@ -10410,7 +10417,15 @@ var stdin_default$R = defineComponent({
|
|
|
10410
10417
|
const onTouchend = () => {
|
|
10411
10418
|
maxScroll = -1;
|
|
10412
10419
|
dragging.value = false;
|
|
10413
|
-
|
|
10420
|
+
if (props2.magnetic) {
|
|
10421
|
+
height.value = closest(anchors.value, height.value);
|
|
10422
|
+
} else {
|
|
10423
|
+
const {
|
|
10424
|
+
min,
|
|
10425
|
+
max
|
|
10426
|
+
} = boundary.value;
|
|
10427
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10428
|
+
}
|
|
10414
10429
|
if (height.value !== -startY) {
|
|
10415
10430
|
emit("heightChange", {
|
|
10416
10431
|
height: height.value
|
|
@@ -10449,7 +10464,10 @@ var stdin_default$R = defineComponent({
|
|
|
10449
10464
|
"onTouchcancel": onTouchend
|
|
10450
10465
|
}, [renderHeader(), createVNode("div", {
|
|
10451
10466
|
"class": bem$I("content"),
|
|
10452
|
-
"ref": contentRef
|
|
10467
|
+
"ref": contentRef,
|
|
10468
|
+
"style": {
|
|
10469
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10470
|
+
}
|
|
10453
10471
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10454
10472
|
};
|
|
10455
10473
|
}
|
|
@@ -11637,7 +11655,10 @@ const listProps = {
|
|
|
11637
11655
|
scroller: Object,
|
|
11638
11656
|
errorText: String,
|
|
11639
11657
|
direction: makeStringProp("down"),
|
|
11640
|
-
loadingText:
|
|
11658
|
+
loadingText: {
|
|
11659
|
+
type: String,
|
|
11660
|
+
default: ""
|
|
11661
|
+
},
|
|
11641
11662
|
finishedText: String,
|
|
11642
11663
|
immediateCheck: truthProp
|
|
11643
11664
|
};
|
|
@@ -11652,7 +11673,7 @@ var stdin_default$J = defineComponent({
|
|
|
11652
11673
|
const loading = ref(props2.loading);
|
|
11653
11674
|
const root = ref();
|
|
11654
11675
|
const placeholder = ref();
|
|
11655
|
-
const tabStatus =
|
|
11676
|
+
const tabStatus = useAllTabStatus();
|
|
11656
11677
|
const scrollParent = useScrollParent(root);
|
|
11657
11678
|
const scroller = computed(() => props2.scroller || scrollParent.value);
|
|
11658
11679
|
const check = () => {
|
|
@@ -11714,7 +11735,7 @@ var stdin_default$J = defineComponent({
|
|
|
11714
11735
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
11715
11736
|
return createVNode("div", {
|
|
11716
11737
|
"class": bem$A("loading")
|
|
11717
|
-
}, [slots.loading ? slots.loading() : createVNode(Loading, {
|
|
11738
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && createVNode(Loading, {
|
|
11718
11739
|
"class": bem$A("loading-icon")
|
|
11719
11740
|
}, {
|
|
11720
11741
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -12852,6 +12873,7 @@ var stdin_default$A = defineComponent({
|
|
|
12852
12873
|
props: progressProps,
|
|
12853
12874
|
setup(props2) {
|
|
12854
12875
|
const background = computed(() => props2.inactive ? void 0 : props2.color);
|
|
12876
|
+
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
12855
12877
|
const renderPivot = () => {
|
|
12856
12878
|
const {
|
|
12857
12879
|
textColor,
|
|
@@ -12859,12 +12881,13 @@ var stdin_default$A = defineComponent({
|
|
|
12859
12881
|
pivotColor,
|
|
12860
12882
|
percentage
|
|
12861
12883
|
} = props2;
|
|
12884
|
+
const safePercentage = format2(percentage);
|
|
12862
12885
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
|
12863
12886
|
if (props2.showPivot && text) {
|
|
12864
12887
|
const style = {
|
|
12865
12888
|
color: textColor,
|
|
12866
|
-
left: `${
|
|
12867
|
-
transform: `translate(-${
|
|
12889
|
+
left: `${safePercentage}%`,
|
|
12890
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
|
12868
12891
|
background: pivotColor || background.value
|
|
12869
12892
|
};
|
|
12870
12893
|
return createVNode("span", {
|
|
@@ -12881,12 +12904,13 @@ var stdin_default$A = defineComponent({
|
|
|
12881
12904
|
percentage,
|
|
12882
12905
|
strokeWidth
|
|
12883
12906
|
} = props2;
|
|
12907
|
+
const safePercentage = format2(percentage);
|
|
12884
12908
|
const rootStyle = {
|
|
12885
12909
|
background: trackColor,
|
|
12886
12910
|
height: addUnit(strokeWidth)
|
|
12887
12911
|
};
|
|
12888
12912
|
const portionStyle = {
|
|
12889
|
-
width: `${
|
|
12913
|
+
width: `${safePercentage}%`,
|
|
12890
12914
|
background: background.value
|
|
12891
12915
|
};
|
|
12892
12916
|
return createVNode("div", {
|
|
@@ -13511,6 +13535,7 @@ var stdin_default$v = defineComponent({
|
|
|
13511
13535
|
"with-message": fieldAttrs.errorMessage
|
|
13512
13536
|
}),
|
|
13513
13537
|
"border": false,
|
|
13538
|
+
"labelAlign": "left",
|
|
13514
13539
|
"onBlur": onBlur,
|
|
13515
13540
|
"onFocus": onFocus,
|
|
13516
13541
|
"onClear": onClear,
|
|
@@ -14626,6 +14651,9 @@ var stdin_default$e = defineComponent({
|
|
|
14626
14651
|
if (allowEmpty && value === "") {
|
|
14627
14652
|
return value;
|
|
14628
14653
|
}
|
|
14654
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
14655
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
14656
|
+
}
|
|
14629
14657
|
value = formatNumber(String(value), !props2.integer);
|
|
14630
14658
|
value = value === "" ? 0 : +value;
|
|
14631
14659
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -15536,7 +15564,7 @@ var stdin_default$8 = defineComponent({
|
|
|
15536
15564
|
return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
15537
15565
|
default:
|
|
15538
15566
|
if (process.env.NODE_ENV !== "production") {
|
|
15539
|
-
throw new Error(`[Vant]
|
|
15567
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
15540
15568
|
}
|
|
15541
15569
|
return [];
|
|
15542
15570
|
}
|
|
@@ -17099,7 +17127,7 @@ const Lazyload = {
|
|
|
17099
17127
|
});
|
|
17100
17128
|
}
|
|
17101
17129
|
};
|
|
17102
|
-
const version = "4.9.
|
|
17130
|
+
const version = "4.9.22";
|
|
17103
17131
|
function install(app) {
|
|
17104
17132
|
const components = [
|
|
17105
17133
|
ActionBar,
|
|
@@ -17435,7 +17463,9 @@ export {
|
|
|
17435
17463
|
toastProps,
|
|
17436
17464
|
treeSelectProps,
|
|
17437
17465
|
uploaderProps,
|
|
17466
|
+
useAllTabStatus,
|
|
17438
17467
|
useCurrentLang,
|
|
17468
|
+
useTabStatus,
|
|
17439
17469
|
version,
|
|
17440
17470
|
watermarkProps
|
|
17441
17471
|
};
|
package/lib/vant.js
CHANGED
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
746
746
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
747
747
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
748
|
-
const FORM_KEY = Symbol("van-form");
|
|
748
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
749
749
|
const LONG_PRESS_START_TIME = 500;
|
|
750
750
|
const TAP_OFFSET = 5;
|
|
751
751
|
function callInterceptor(interceptor, {
|
|
@@ -788,7 +788,7 @@
|
|
|
788
788
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
789
789
|
);
|
|
790
790
|
}
|
|
791
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
791
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
792
792
|
function onPopupReopen(callback) {
|
|
793
793
|
const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
|
|
794
794
|
if (popupToggleStatus) {
|
|
@@ -2353,7 +2353,7 @@
|
|
|
2353
2353
|
return propRef;
|
|
2354
2354
|
};
|
|
2355
2355
|
/**
|
|
2356
|
-
* @vue/shared v3.5.
|
|
2356
|
+
* @vue/shared v3.5.25
|
|
2357
2357
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2358
2358
|
* @license MIT
|
|
2359
2359
|
**/
|
|
@@ -3418,8 +3418,20 @@
|
|
|
3418
3418
|
})]);
|
|
3419
3419
|
}
|
|
3420
3420
|
});
|
|
3421
|
-
const TAB_STATUS_KEY = Symbol();
|
|
3421
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
3422
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
3422
3423
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
|
3424
|
+
const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
|
|
3425
|
+
const useProvideTabStatus = (status) => {
|
|
3426
|
+
const allTabStatus = useAllTabStatus();
|
|
3427
|
+
vue.provide(TAB_STATUS_KEY, status);
|
|
3428
|
+
vue.provide(
|
|
3429
|
+
ALL_TAB_STATUS_KEY,
|
|
3430
|
+
vue.computed(() => {
|
|
3431
|
+
return (allTabStatus == null || allTabStatus.value) && status.value;
|
|
3432
|
+
})
|
|
3433
|
+
);
|
|
3434
|
+
};
|
|
3423
3435
|
const [name$1s, bem$1o] = createNamespace("tab");
|
|
3424
3436
|
const TabTitle = vue.defineComponent({
|
|
3425
3437
|
name: name$1s,
|
|
@@ -3660,7 +3672,7 @@
|
|
|
3660
3672
|
parent.setLine();
|
|
3661
3673
|
parent.scrollIntoView();
|
|
3662
3674
|
});
|
|
3663
|
-
|
|
3675
|
+
useProvideTabStatus(active);
|
|
3664
3676
|
useExpose({
|
|
3665
3677
|
id,
|
|
3666
3678
|
renderTitle
|
|
@@ -4721,7 +4733,7 @@
|
|
|
4721
4733
|
var _a, _b;
|
|
4722
4734
|
const originalValue = value;
|
|
4723
4735
|
value = limitValueLength(value);
|
|
4724
|
-
const limitDiffLen =
|
|
4736
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4725
4737
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4726
4738
|
const isNumber = props2.type === "number";
|
|
4727
4739
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4747,7 +4759,7 @@
|
|
|
4747
4759
|
selectionEnd
|
|
4748
4760
|
} = inputRef.value;
|
|
4749
4761
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4750
|
-
formatterDiffLen =
|
|
4762
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4751
4763
|
}
|
|
4752
4764
|
}
|
|
4753
4765
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4758,7 +4770,7 @@
|
|
|
4758
4770
|
} = inputRef.value;
|
|
4759
4771
|
inputRef.value.value = value;
|
|
4760
4772
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4761
|
-
const valueLen =
|
|
4773
|
+
const valueLen = value.length;
|
|
4762
4774
|
if (limitDiffLen) {
|
|
4763
4775
|
selectionStart -= limitDiffLen;
|
|
4764
4776
|
selectionEnd -= limitDiffLen;
|
|
@@ -5984,7 +5996,7 @@
|
|
|
5984
5996
|
const direction = vue.computed(() => getParentProp("direction"));
|
|
5985
5997
|
const iconStyle = vue.computed(() => {
|
|
5986
5998
|
const checkedColor = props2.checkedColor || getParentProp("checkedColor");
|
|
5987
|
-
if (checkedColor && props2.checked && !disabled.value) {
|
|
5999
|
+
if (checkedColor && (props2.checked || props2.indeterminate) && !disabled.value) {
|
|
5988
6000
|
return {
|
|
5989
6001
|
borderColor: checkedColor,
|
|
5990
6002
|
backgroundColor: checkedColor
|
|
@@ -10570,13 +10582,7 @@
|
|
|
10570
10582
|
icon: String,
|
|
10571
10583
|
axis: makeStringProp("y"),
|
|
10572
10584
|
magnetic: String,
|
|
10573
|
-
offset:
|
|
10574
|
-
type: Object,
|
|
10575
|
-
default: () => ({
|
|
10576
|
-
x: -1,
|
|
10577
|
-
y: -1
|
|
10578
|
-
})
|
|
10579
|
-
},
|
|
10585
|
+
offset: Object,
|
|
10580
10586
|
teleport: {
|
|
10581
10587
|
type: [String, Object],
|
|
10582
10588
|
default: "body"
|
|
@@ -10630,8 +10636,8 @@
|
|
|
10630
10636
|
offset
|
|
10631
10637
|
} = props2;
|
|
10632
10638
|
state.value = {
|
|
10633
|
-
x: offset
|
|
10634
|
-
y: offset
|
|
10639
|
+
x: offset ? offset.x : windowWidth.value - width - gapX.value,
|
|
10640
|
+
y: offset ? offset.y : windowHeight.value - height - gapY.value,
|
|
10635
10641
|
width,
|
|
10636
10642
|
height
|
|
10637
10643
|
};
|
|
@@ -10737,6 +10743,7 @@
|
|
|
10737
10743
|
height: makeNumericProp(0),
|
|
10738
10744
|
anchors: makeArrayProp(),
|
|
10739
10745
|
duration: makeNumericProp(0.3),
|
|
10746
|
+
magnetic: truthProp,
|
|
10740
10747
|
contentDraggable: truthProp,
|
|
10741
10748
|
lockScroll: Boolean,
|
|
10742
10749
|
safeAreaInsetBottom: truthProp
|
|
@@ -10813,7 +10820,15 @@
|
|
|
10813
10820
|
const onTouchend = () => {
|
|
10814
10821
|
maxScroll = -1;
|
|
10815
10822
|
dragging.value = false;
|
|
10816
|
-
|
|
10823
|
+
if (props2.magnetic) {
|
|
10824
|
+
height.value = closest(anchors.value, height.value);
|
|
10825
|
+
} else {
|
|
10826
|
+
const {
|
|
10827
|
+
min,
|
|
10828
|
+
max
|
|
10829
|
+
} = boundary.value;
|
|
10830
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10831
|
+
}
|
|
10817
10832
|
if (height.value !== -startY) {
|
|
10818
10833
|
emit("heightChange", {
|
|
10819
10834
|
height: height.value
|
|
@@ -10852,7 +10867,10 @@
|
|
|
10852
10867
|
"onTouchcancel": onTouchend
|
|
10853
10868
|
}, [renderHeader(), vue.createVNode("div", {
|
|
10854
10869
|
"class": bem$I("content"),
|
|
10855
|
-
"ref": contentRef
|
|
10870
|
+
"ref": contentRef,
|
|
10871
|
+
"style": {
|
|
10872
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10873
|
+
}
|
|
10856
10874
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10857
10875
|
};
|
|
10858
10876
|
}
|
|
@@ -12034,7 +12052,10 @@
|
|
|
12034
12052
|
scroller: Object,
|
|
12035
12053
|
errorText: String,
|
|
12036
12054
|
direction: makeStringProp("down"),
|
|
12037
|
-
loadingText:
|
|
12055
|
+
loadingText: {
|
|
12056
|
+
type: String,
|
|
12057
|
+
default: ""
|
|
12058
|
+
},
|
|
12038
12059
|
finishedText: String,
|
|
12039
12060
|
immediateCheck: truthProp
|
|
12040
12061
|
};
|
|
@@ -12049,7 +12070,7 @@
|
|
|
12049
12070
|
const loading = vue.ref(props2.loading);
|
|
12050
12071
|
const root = vue.ref();
|
|
12051
12072
|
const placeholder = vue.ref();
|
|
12052
|
-
const tabStatus =
|
|
12073
|
+
const tabStatus = useAllTabStatus();
|
|
12053
12074
|
const scrollParent = useScrollParent(root);
|
|
12054
12075
|
const scroller = vue.computed(() => props2.scroller || scrollParent.value);
|
|
12055
12076
|
const check = () => {
|
|
@@ -12111,7 +12132,7 @@
|
|
|
12111
12132
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
12112
12133
|
return vue.createVNode("div", {
|
|
12113
12134
|
"class": bem$A("loading")
|
|
12114
|
-
}, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
|
|
12135
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
|
|
12115
12136
|
"class": bem$A("loading-icon")
|
|
12116
12137
|
}, {
|
|
12117
12138
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -13554,7 +13575,7 @@
|
|
|
13554
13575
|
}
|
|
13555
13576
|
return offsets;
|
|
13556
13577
|
}
|
|
13557
|
-
function
|
|
13578
|
+
function popperOffsets(_ref) {
|
|
13558
13579
|
var state = _ref.state, name2 = _ref.name;
|
|
13559
13580
|
state.modifiersData[name2] = computeOffsets({
|
|
13560
13581
|
reference: state.rects.reference,
|
|
@@ -13562,11 +13583,11 @@
|
|
|
13562
13583
|
placement: state.placement
|
|
13563
13584
|
});
|
|
13564
13585
|
}
|
|
13565
|
-
const
|
|
13586
|
+
const modifiers_popperOffsets = {
|
|
13566
13587
|
name: "popperOffsets",
|
|
13567
13588
|
enabled: true,
|
|
13568
13589
|
phase: "read",
|
|
13569
|
-
fn:
|
|
13590
|
+
fn: popperOffsets,
|
|
13570
13591
|
data: {}
|
|
13571
13592
|
};
|
|
13572
13593
|
var unsetSides = {
|
|
@@ -13643,7 +13664,7 @@
|
|
|
13643
13664
|
}
|
|
13644
13665
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
|
13645
13666
|
}
|
|
13646
|
-
function
|
|
13667
|
+
function computeStyles(_ref5) {
|
|
13647
13668
|
var state = _ref5.state, options = _ref5.options;
|
|
13648
13669
|
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = void 0 === _options$gpuAccelerat ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = void 0 === _options$adaptive ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = void 0 === _options$roundOffsets ? true : _options$roundOffsets;
|
|
13649
13670
|
var commonStyles = {
|
|
@@ -13670,11 +13691,11 @@
|
|
|
13670
13691
|
"data-popper-placement": state.placement
|
|
13671
13692
|
});
|
|
13672
13693
|
}
|
|
13673
|
-
const
|
|
13694
|
+
const modifiers_computeStyles = {
|
|
13674
13695
|
name: "computeStyles",
|
|
13675
13696
|
enabled: true,
|
|
13676
13697
|
phase: "beforeWrite",
|
|
13677
|
-
fn:
|
|
13698
|
+
fn: computeStyles,
|
|
13678
13699
|
data: {}
|
|
13679
13700
|
};
|
|
13680
13701
|
function applyStyles(_ref) {
|
|
@@ -13738,8 +13759,8 @@
|
|
|
13738
13759
|
};
|
|
13739
13760
|
var popper_lite_defaultModifiers = [
|
|
13740
13761
|
eventListeners,
|
|
13741
|
-
|
|
13742
|
-
|
|
13762
|
+
modifiers_popperOffsets,
|
|
13763
|
+
modifiers_computeStyles,
|
|
13743
13764
|
modifiers_applyStyles
|
|
13744
13765
|
];
|
|
13745
13766
|
var popper_lite_createPopper = /* @__PURE__ */ popperGenerator({
|
|
@@ -14000,6 +14021,7 @@
|
|
|
14000
14021
|
props: progressProps,
|
|
14001
14022
|
setup(props2) {
|
|
14002
14023
|
const background = vue.computed(() => props2.inactive ? void 0 : props2.color);
|
|
14024
|
+
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
14003
14025
|
const renderPivot = () => {
|
|
14004
14026
|
const {
|
|
14005
14027
|
textColor,
|
|
@@ -14007,12 +14029,13 @@
|
|
|
14007
14029
|
pivotColor,
|
|
14008
14030
|
percentage
|
|
14009
14031
|
} = props2;
|
|
14032
|
+
const safePercentage = format2(percentage);
|
|
14010
14033
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
|
14011
14034
|
if (props2.showPivot && text) {
|
|
14012
14035
|
const style = {
|
|
14013
14036
|
color: textColor,
|
|
14014
|
-
left: `${
|
|
14015
|
-
transform: `translate(-${
|
|
14037
|
+
left: `${safePercentage}%`,
|
|
14038
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
|
14016
14039
|
background: pivotColor || background.value
|
|
14017
14040
|
};
|
|
14018
14041
|
return vue.createVNode("span", {
|
|
@@ -14029,12 +14052,13 @@
|
|
|
14029
14052
|
percentage,
|
|
14030
14053
|
strokeWidth
|
|
14031
14054
|
} = props2;
|
|
14055
|
+
const safePercentage = format2(percentage);
|
|
14032
14056
|
const rootStyle = {
|
|
14033
14057
|
background: trackColor,
|
|
14034
14058
|
height: addUnit(strokeWidth)
|
|
14035
14059
|
};
|
|
14036
14060
|
const portionStyle = {
|
|
14037
|
-
width: `${
|
|
14061
|
+
width: `${safePercentage}%`,
|
|
14038
14062
|
background: background.value
|
|
14039
14063
|
};
|
|
14040
14064
|
return vue.createVNode("div", {
|
|
@@ -14659,6 +14683,7 @@
|
|
|
14659
14683
|
"with-message": fieldAttrs.errorMessage
|
|
14660
14684
|
}),
|
|
14661
14685
|
"border": false,
|
|
14686
|
+
"labelAlign": "left",
|
|
14662
14687
|
"onBlur": onBlur,
|
|
14663
14688
|
"onFocus": onFocus,
|
|
14664
14689
|
"onClear": onClear,
|
|
@@ -15768,6 +15793,9 @@
|
|
|
15768
15793
|
if (allowEmpty && value === "") {
|
|
15769
15794
|
return value;
|
|
15770
15795
|
}
|
|
15796
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
15797
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
15798
|
+
}
|
|
15771
15799
|
value = formatNumber(String(value), !props2.integer);
|
|
15772
15800
|
value = value === "" ? 0 : +value;
|
|
15773
15801
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -18218,7 +18246,7 @@
|
|
|
18218
18246
|
});
|
|
18219
18247
|
}
|
|
18220
18248
|
};
|
|
18221
|
-
const version = "4.9.
|
|
18249
|
+
const version = "4.9.22";
|
|
18222
18250
|
function install(app) {
|
|
18223
18251
|
const components = [
|
|
18224
18252
|
ActionBar,
|
|
@@ -18553,7 +18581,9 @@
|
|
|
18553
18581
|
exports2.toastProps = toastProps;
|
|
18554
18582
|
exports2.treeSelectProps = treeSelectProps;
|
|
18555
18583
|
exports2.uploaderProps = uploaderProps;
|
|
18584
|
+
exports2.useAllTabStatus = useAllTabStatus;
|
|
18556
18585
|
exports2.useCurrentLang = useCurrentLang;
|
|
18586
|
+
exports2.useTabStatus = useTabStatus;
|
|
18557
18587
|
exports2.version = version;
|
|
18558
18588
|
exports2.watermarkProps = watermarkProps;
|
|
18559
18589
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|