vant 4.9.21 → 4.9.23
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 -4
- package/es/action-bar-button/index.css +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +4 -0
- package/es/action-bar-icon/ActionBarIcon.mjs +12 -4
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.d.ts +3 -0
- 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/composables/on-popup-reopen.mjs +1 -1
- package/es/composables/use-tab-status.mjs +2 -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 +5 -4
- package/es/field/index.d.ts +3 -3
- package/es/field/types.d.ts +1 -0
- package/es/floating-panel/FloatingPanel.d.ts +26 -0
- package/es/floating-panel/FloatingPanel.mjs +26 -2
- package/es/floating-panel/index.css +1 -1
- package/es/floating-panel/index.d.ts +18 -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 +5 -2
- package/es/list/index.d.ts +9 -2
- package/es/locale/lang/ar-SA.d.ts +1 -0
- package/es/locale/lang/ar-SA.mjs +10 -1
- package/es/locale/lang/bg-BG.d.ts +1 -0
- package/es/locale/lang/bg-BG.mjs +1 -0
- package/es/locale/lang/bn-BD.d.ts +1 -0
- package/es/locale/lang/bn-BD.mjs +1 -0
- package/es/locale/lang/da-DK.d.ts +1 -0
- package/es/locale/lang/da-DK.mjs +1 -0
- package/es/locale/lang/de-DE-formal.d.ts +1 -0
- package/es/locale/lang/de-DE-formal.mjs +1 -0
- package/es/locale/lang/de-DE.d.ts +1 -0
- package/es/locale/lang/de-DE.mjs +1 -0
- package/es/locale/lang/el-GR.d.ts +1 -0
- package/es/locale/lang/el-GR.mjs +1 -0
- package/es/locale/lang/en-US.d.ts +1 -0
- package/es/locale/lang/en-US.mjs +1 -0
- package/es/locale/lang/eo-EO.d.ts +1 -0
- package/es/locale/lang/eo-EO.mjs +1 -0
- package/es/locale/lang/es-ES.d.ts +1 -0
- package/es/locale/lang/es-ES.mjs +1 -0
- package/es/locale/lang/fa-IR.d.ts +1 -0
- package/es/locale/lang/fa-IR.mjs +1 -0
- package/es/locale/lang/fr-FR.d.ts +1 -0
- package/es/locale/lang/fr-FR.mjs +1 -0
- package/es/locale/lang/he-IL.d.ts +1 -0
- package/es/locale/lang/he-IL.mjs +1 -0
- package/es/locale/lang/hi-IN.d.ts +1 -0
- package/es/locale/lang/hi-IN.mjs +1 -0
- package/es/locale/lang/id-ID.d.ts +1 -0
- package/es/locale/lang/id-ID.mjs +1 -0
- package/es/locale/lang/is-IS.d.ts +1 -0
- package/es/locale/lang/is-IS.mjs +1 -0
- package/es/locale/lang/it-IT.d.ts +1 -0
- package/es/locale/lang/it-IT.mjs +1 -0
- package/es/locale/lang/ja-JP.d.ts +1 -0
- package/es/locale/lang/ja-JP.mjs +1 -0
- package/es/locale/lang/kk-KZ.d.ts +1 -0
- package/es/locale/lang/kk-KZ.mjs +1 -0
- package/es/locale/lang/km-KH.d.ts +1 -0
- package/es/locale/lang/km-KH.mjs +1 -0
- package/es/locale/lang/ko-KR.d.ts +1 -0
- package/es/locale/lang/ko-KR.mjs +1 -0
- package/es/locale/lang/la-LA.d.ts +1 -0
- package/es/locale/lang/la-LA.mjs +1 -0
- package/es/locale/lang/mm-MN.d.ts +1 -0
- package/es/locale/lang/mm-MN.mjs +1 -0
- package/es/locale/lang/nb-NO.d.ts +1 -0
- package/es/locale/lang/nb-NO.mjs +1 -0
- package/es/locale/lang/nl-NL.d.ts +1 -0
- package/es/locale/lang/nl-NL.mjs +1 -0
- package/es/locale/lang/pl-PL.d.ts +1 -0
- package/es/locale/lang/pl-PL.mjs +1 -0
- package/es/locale/lang/pt-BR.d.ts +1 -0
- package/es/locale/lang/pt-BR.mjs +1 -0
- package/es/locale/lang/ro-RO.d.ts +1 -0
- package/es/locale/lang/ro-RO.mjs +1 -0
- package/es/locale/lang/ru-RU.d.ts +1 -0
- package/es/locale/lang/ru-RU.mjs +1 -0
- package/es/locale/lang/sr-RS.d.ts +1 -0
- package/es/locale/lang/sr-RS.mjs +1 -0
- package/es/locale/lang/sv-SE.d.ts +1 -0
- package/es/locale/lang/sv-SE.mjs +1 -0
- package/es/locale/lang/th-TH.d.ts +1 -0
- package/es/locale/lang/th-TH.mjs +1 -0
- package/es/locale/lang/tr-TR.d.ts +1 -0
- package/es/locale/lang/tr-TR.mjs +1 -0
- package/es/locale/lang/uk-UA.d.ts +1 -0
- package/es/locale/lang/uk-UA.mjs +1 -0
- package/es/locale/lang/vi-VN.d.ts +1 -0
- package/es/locale/lang/vi-VN.mjs +1 -0
- package/es/locale/lang/zh-CN.d.ts +1 -0
- package/es/locale/lang/zh-CN.mjs +1 -0
- package/es/locale/lang/zh-HK.d.ts +1 -0
- package/es/locale/lang/zh-HK.mjs +1 -0
- package/es/locale/lang/zh-TW.d.ts +1 -0
- package/es/locale/lang/zh-TW.mjs +1 -0
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/popup/index.d.ts +1 -0
- package/es/popup/index.mjs +7 -1
- package/es/progress/Progress.mjs +8 -4
- 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/signature/Signature.d.ts +16 -0
- package/es/signature/Signature.mjs +32 -1
- package/es/signature/index.d.ts +11 -0
- package/es/signature/types.d.ts +1 -0
- package/es/stepper/Stepper.mjs +3 -0
- package/es/swipe-cell/SwipeCell.d.ts +16 -0
- package/es/swipe-cell/SwipeCell.mjs +7 -2
- package/es/swipe-cell/index.d.ts +11 -0
- 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-bar-icon/ActionBarIcon.d.ts +4 -0
- package/lib/action-bar-icon/ActionBarIcon.js +12 -4
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.d.ts +3 -0
- 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/composables/on-popup-reopen.js +1 -1
- package/lib/composables/use-tab-status.js +2 -2
- 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 +5 -4
- package/lib/field/index.d.ts +3 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/floating-panel/FloatingPanel.d.ts +26 -0
- package/lib/floating-panel/FloatingPanel.js +26 -2
- package/lib/floating-panel/index.css +1 -1
- package/lib/floating-panel/index.d.ts +18 -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 +5 -2
- package/lib/list/index.d.ts +9 -2
- package/lib/locale/lang/ar-SA.d.ts +1 -0
- package/lib/locale/lang/ar-SA.js +10 -1
- package/lib/locale/lang/bg-BG.d.ts +1 -0
- package/lib/locale/lang/bg-BG.js +1 -0
- package/lib/locale/lang/bn-BD.d.ts +1 -0
- package/lib/locale/lang/bn-BD.js +1 -0
- package/lib/locale/lang/da-DK.d.ts +1 -0
- package/lib/locale/lang/da-DK.js +1 -0
- package/lib/locale/lang/de-DE-formal.d.ts +1 -0
- package/lib/locale/lang/de-DE-formal.js +1 -0
- package/lib/locale/lang/de-DE.d.ts +1 -0
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/el-GR.d.ts +1 -0
- package/lib/locale/lang/el-GR.js +1 -0
- package/lib/locale/lang/en-US.d.ts +1 -0
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/eo-EO.d.ts +1 -0
- package/lib/locale/lang/eo-EO.js +1 -0
- package/lib/locale/lang/es-ES.d.ts +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/fa-IR.d.ts +1 -0
- package/lib/locale/lang/fa-IR.js +1 -0
- package/lib/locale/lang/fr-FR.d.ts +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/he-IL.d.ts +1 -0
- package/lib/locale/lang/he-IL.js +1 -0
- package/lib/locale/lang/hi-IN.d.ts +1 -0
- package/lib/locale/lang/hi-IN.js +1 -0
- package/lib/locale/lang/id-ID.d.ts +1 -0
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/is-IS.d.ts +1 -0
- package/lib/locale/lang/is-IS.js +1 -0
- package/lib/locale/lang/it-IT.d.ts +1 -0
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/ja-JP.d.ts +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/kk-KZ.d.ts +1 -0
- package/lib/locale/lang/kk-KZ.js +1 -0
- package/lib/locale/lang/km-KH.d.ts +1 -0
- package/lib/locale/lang/km-KH.js +1 -0
- package/lib/locale/lang/ko-KR.d.ts +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/la-LA.d.ts +1 -0
- package/lib/locale/lang/la-LA.js +1 -0
- package/lib/locale/lang/mm-MN.d.ts +1 -0
- package/lib/locale/lang/mm-MN.js +1 -0
- package/lib/locale/lang/nb-NO.d.ts +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nl-NL.d.ts +1 -0
- package/lib/locale/lang/nl-NL.js +1 -0
- package/lib/locale/lang/pl-PL.d.ts +1 -0
- package/lib/locale/lang/pl-PL.js +1 -0
- package/lib/locale/lang/pt-BR.d.ts +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/ro-RO.d.ts +1 -0
- package/lib/locale/lang/ro-RO.js +1 -0
- package/lib/locale/lang/ru-RU.d.ts +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/sr-RS.d.ts +1 -0
- package/lib/locale/lang/sr-RS.js +1 -0
- package/lib/locale/lang/sv-SE.d.ts +1 -0
- package/lib/locale/lang/sv-SE.js +1 -0
- package/lib/locale/lang/th-TH.d.ts +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/tr-TR.d.ts +1 -0
- package/lib/locale/lang/tr-TR.js +1 -0
- package/lib/locale/lang/uk-UA.d.ts +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/vi-VN.d.ts +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/zh-CN.d.ts +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-HK.d.ts +1 -0
- package/lib/locale/lang/zh-HK.js +1 -0
- package/lib/locale/lang/zh-TW.d.ts +1 -0
- package/lib/locale/lang/zh-TW.js +1 -0
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/index.js +4 -1
- package/lib/progress/Progress.js +8 -4
- 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/signature/Signature.d.ts +16 -0
- package/lib/signature/Signature.js +32 -1
- package/lib/signature/index.d.ts +11 -0
- package/lib/signature/types.d.ts +1 -0
- package/lib/stepper/Stepper.js +3 -0
- package/lib/swipe-cell/SwipeCell.d.ts +16 -0
- package/lib/swipe-cell/SwipeCell.js +7 -2
- package/lib/swipe-cell/index.d.ts +11 -0
- 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 +108 -25
- package/lib/vant.es.js +108 -25
- package/lib/vant.js +118 -35
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +35 -35
package/lib/vant.js
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
type: String,
|
|
67
67
|
default: defaultVal
|
|
68
68
|
});
|
|
69
|
-
const inBrowser = "
|
|
69
|
+
const inBrowser = "u" > typeof window;
|
|
70
70
|
function raf(fn) {
|
|
71
71
|
return inBrowser ? requestAnimationFrame(fn) : -1;
|
|
72
72
|
}
|
|
@@ -617,6 +617,7 @@
|
|
|
617
617
|
tel: "电话",
|
|
618
618
|
save: "保存",
|
|
619
619
|
clear: "清空",
|
|
620
|
+
undo: "撤销",
|
|
620
621
|
cancel: "取消",
|
|
621
622
|
confirm: "确认",
|
|
622
623
|
delete: "删除",
|
|
@@ -745,7 +746,7 @@
|
|
|
745
746
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
746
747
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
747
748
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
748
|
-
const FORM_KEY = Symbol("van-form");
|
|
749
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
749
750
|
const LONG_PRESS_START_TIME = 500;
|
|
750
751
|
const TAP_OFFSET = 5;
|
|
751
752
|
function callInterceptor(interceptor, {
|
|
@@ -788,7 +789,7 @@
|
|
|
788
789
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
789
790
|
);
|
|
790
791
|
}
|
|
791
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
792
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
792
793
|
function onPopupReopen(callback) {
|
|
793
794
|
const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
|
|
794
795
|
if (popupToggleStatus) {
|
|
@@ -1416,7 +1417,8 @@
|
|
|
1416
1417
|
badge: numericProp,
|
|
1417
1418
|
iconClass: unknownProp,
|
|
1418
1419
|
badgeProps: Object,
|
|
1419
|
-
iconPrefix: String
|
|
1420
|
+
iconPrefix: String,
|
|
1421
|
+
disabled: Boolean
|
|
1420
1422
|
});
|
|
1421
1423
|
var stdin_default$1M = vue.defineComponent({
|
|
1422
1424
|
name: name$1D,
|
|
@@ -1456,11 +1458,18 @@
|
|
|
1456
1458
|
"classPrefix": iconPrefix
|
|
1457
1459
|
}, null);
|
|
1458
1460
|
};
|
|
1461
|
+
const onClick = () => {
|
|
1462
|
+
if (!props2.disabled) {
|
|
1463
|
+
route2();
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1459
1466
|
return () => vue.createVNode("div", {
|
|
1460
1467
|
"role": "button",
|
|
1461
|
-
"class": bem$1y(
|
|
1462
|
-
|
|
1463
|
-
|
|
1468
|
+
"class": bem$1y({
|
|
1469
|
+
disabled: props2.disabled
|
|
1470
|
+
}),
|
|
1471
|
+
"tabindex": props2.disabled ? -1 : 0,
|
|
1472
|
+
"onClick": onClick
|
|
1464
1473
|
}, [renderIcon(), slots.default ? slots.default() : props2.text]);
|
|
1465
1474
|
}
|
|
1466
1475
|
});
|
|
@@ -2353,7 +2362,7 @@
|
|
|
2353
2362
|
return propRef;
|
|
2354
2363
|
};
|
|
2355
2364
|
/**
|
|
2356
|
-
* @vue/shared v3.5.
|
|
2365
|
+
* @vue/shared v3.5.31
|
|
2357
2366
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2358
2367
|
* @license MIT
|
|
2359
2368
|
**/
|
|
@@ -3418,8 +3427,8 @@
|
|
|
3418
3427
|
})]);
|
|
3419
3428
|
}
|
|
3420
3429
|
});
|
|
3421
|
-
const TAB_STATUS_KEY = Symbol();
|
|
3422
|
-
const ALL_TAB_STATUS_KEY = Symbol();
|
|
3430
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
3431
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
3423
3432
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
|
3424
3433
|
const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
|
|
3425
3434
|
const useProvideTabStatus = (status) => {
|
|
@@ -4718,10 +4727,11 @@
|
|
|
4718
4727
|
if (modelValue && getStringLength(modelValue) === +maxlength) {
|
|
4719
4728
|
return modelValue;
|
|
4720
4729
|
}
|
|
4721
|
-
|
|
4730
|
+
let selectionEnd = (_a = inputRef.value) == null ? void 0 : _a.selectionEnd;
|
|
4722
4731
|
if (state.focused && selectionEnd) {
|
|
4723
4732
|
const valueArr = [...value];
|
|
4724
4733
|
const exceededLength = valueArr.length - +maxlength;
|
|
4734
|
+
selectionEnd = getStringLength(value.slice(0, selectionEnd));
|
|
4725
4735
|
valueArr.splice(selectionEnd - exceededLength, exceededLength);
|
|
4726
4736
|
return valueArr.join("");
|
|
4727
4737
|
}
|
|
@@ -4733,7 +4743,7 @@
|
|
|
4733
4743
|
var _a, _b;
|
|
4734
4744
|
const originalValue = value;
|
|
4735
4745
|
value = limitValueLength(value);
|
|
4736
|
-
const limitDiffLen =
|
|
4746
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4737
4747
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4738
4748
|
const isNumber = props2.type === "number";
|
|
4739
4749
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4759,7 +4769,7 @@
|
|
|
4759
4769
|
selectionEnd
|
|
4760
4770
|
} = inputRef.value;
|
|
4761
4771
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4762
|
-
formatterDiffLen =
|
|
4772
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4763
4773
|
}
|
|
4764
4774
|
}
|
|
4765
4775
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4770,7 +4780,7 @@
|
|
|
4770
4780
|
} = inputRef.value;
|
|
4771
4781
|
inputRef.value.value = value;
|
|
4772
4782
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4773
|
-
const valueLen =
|
|
4783
|
+
const valueLen = value.length;
|
|
4774
4784
|
if (limitDiffLen) {
|
|
4775
4785
|
selectionStart -= limitDiffLen;
|
|
4776
4786
|
selectionEnd -= limitDiffLen;
|
|
@@ -10743,6 +10753,8 @@
|
|
|
10743
10753
|
height: makeNumericProp(0),
|
|
10744
10754
|
anchors: makeArrayProp(),
|
|
10745
10755
|
duration: makeNumericProp(0.3),
|
|
10756
|
+
magnetic: truthProp,
|
|
10757
|
+
draggable: truthProp,
|
|
10746
10758
|
contentDraggable: truthProp,
|
|
10747
10759
|
lockScroll: Boolean,
|
|
10748
10760
|
safeAreaInsetBottom: truthProp
|
|
@@ -10792,6 +10804,7 @@
|
|
|
10792
10804
|
let maxScroll = -1;
|
|
10793
10805
|
const touch = useTouch();
|
|
10794
10806
|
const onTouchstart = (e) => {
|
|
10807
|
+
if (!props2.draggable) return;
|
|
10795
10808
|
touch.start(e);
|
|
10796
10809
|
dragging.value = true;
|
|
10797
10810
|
startY = -height.value;
|
|
@@ -10799,6 +10812,7 @@
|
|
|
10799
10812
|
};
|
|
10800
10813
|
const onTouchmove = (e) => {
|
|
10801
10814
|
var _a;
|
|
10815
|
+
if (!props2.draggable) return;
|
|
10802
10816
|
touch.move(e);
|
|
10803
10817
|
const target = e.target;
|
|
10804
10818
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
|
@@ -10818,8 +10832,22 @@
|
|
|
10818
10832
|
};
|
|
10819
10833
|
const onTouchend = () => {
|
|
10820
10834
|
maxScroll = -1;
|
|
10835
|
+
if (!dragging.value) {
|
|
10836
|
+
return;
|
|
10837
|
+
}
|
|
10821
10838
|
dragging.value = false;
|
|
10822
|
-
|
|
10839
|
+
if (!props2.draggable) {
|
|
10840
|
+
return;
|
|
10841
|
+
}
|
|
10842
|
+
if (props2.magnetic) {
|
|
10843
|
+
height.value = closest(anchors.value, height.value);
|
|
10844
|
+
} else {
|
|
10845
|
+
const {
|
|
10846
|
+
min,
|
|
10847
|
+
max
|
|
10848
|
+
} = boundary.value;
|
|
10849
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10850
|
+
}
|
|
10823
10851
|
if (height.value !== -startY) {
|
|
10824
10852
|
emit("heightChange", {
|
|
10825
10853
|
height: height.value
|
|
@@ -10839,6 +10867,9 @@
|
|
|
10839
10867
|
if (slots.header) {
|
|
10840
10868
|
return slots.header();
|
|
10841
10869
|
}
|
|
10870
|
+
if (!props2.draggable) {
|
|
10871
|
+
return null;
|
|
10872
|
+
}
|
|
10842
10873
|
return vue.createVNode("div", {
|
|
10843
10874
|
"class": bem$I("header")
|
|
10844
10875
|
}, [vue.createVNode("div", {
|
|
@@ -10858,7 +10889,10 @@
|
|
|
10858
10889
|
"onTouchcancel": onTouchend
|
|
10859
10890
|
}, [renderHeader(), vue.createVNode("div", {
|
|
10860
10891
|
"class": bem$I("content"),
|
|
10861
|
-
"ref": contentRef
|
|
10892
|
+
"ref": contentRef,
|
|
10893
|
+
"style": {
|
|
10894
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10895
|
+
}
|
|
10862
10896
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10863
10897
|
};
|
|
10864
10898
|
}
|
|
@@ -12040,7 +12074,10 @@
|
|
|
12040
12074
|
scroller: Object,
|
|
12041
12075
|
errorText: String,
|
|
12042
12076
|
direction: makeStringProp("down"),
|
|
12043
|
-
loadingText:
|
|
12077
|
+
loadingText: {
|
|
12078
|
+
type: String,
|
|
12079
|
+
default: ""
|
|
12080
|
+
},
|
|
12044
12081
|
finishedText: String,
|
|
12045
12082
|
immediateCheck: truthProp
|
|
12046
12083
|
};
|
|
@@ -12117,7 +12154,7 @@
|
|
|
12117
12154
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
12118
12155
|
return vue.createVNode("div", {
|
|
12119
12156
|
"class": bem$A("loading")
|
|
12120
|
-
}, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
|
|
12157
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
|
|
12121
12158
|
"class": bem$A("loading-icon")
|
|
12122
12159
|
}, {
|
|
12123
12160
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -13065,7 +13102,7 @@
|
|
|
13065
13102
|
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
13066
13103
|
}
|
|
13067
13104
|
function isShadowRoot(node) {
|
|
13068
|
-
if ("
|
|
13105
|
+
if ("u" < typeof ShadowRoot) return false;
|
|
13069
13106
|
var OwnElement = getWindow(node).ShadowRoot;
|
|
13070
13107
|
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
13071
13108
|
}
|
|
@@ -13560,7 +13597,7 @@
|
|
|
13560
13597
|
}
|
|
13561
13598
|
return offsets;
|
|
13562
13599
|
}
|
|
13563
|
-
function
|
|
13600
|
+
function popperOffsets(_ref) {
|
|
13564
13601
|
var state = _ref.state, name2 = _ref.name;
|
|
13565
13602
|
state.modifiersData[name2] = computeOffsets({
|
|
13566
13603
|
reference: state.rects.reference,
|
|
@@ -13568,11 +13605,11 @@
|
|
|
13568
13605
|
placement: state.placement
|
|
13569
13606
|
});
|
|
13570
13607
|
}
|
|
13571
|
-
const
|
|
13608
|
+
const modifiers_popperOffsets = {
|
|
13572
13609
|
name: "popperOffsets",
|
|
13573
13610
|
enabled: true,
|
|
13574
13611
|
phase: "read",
|
|
13575
|
-
fn:
|
|
13612
|
+
fn: popperOffsets,
|
|
13576
13613
|
data: {}
|
|
13577
13614
|
};
|
|
13578
13615
|
var unsetSides = {
|
|
@@ -13649,7 +13686,7 @@
|
|
|
13649
13686
|
}
|
|
13650
13687
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
|
13651
13688
|
}
|
|
13652
|
-
function
|
|
13689
|
+
function computeStyles(_ref5) {
|
|
13653
13690
|
var state = _ref5.state, options = _ref5.options;
|
|
13654
13691
|
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;
|
|
13655
13692
|
var commonStyles = {
|
|
@@ -13676,11 +13713,11 @@
|
|
|
13676
13713
|
"data-popper-placement": state.placement
|
|
13677
13714
|
});
|
|
13678
13715
|
}
|
|
13679
|
-
const
|
|
13716
|
+
const modifiers_computeStyles = {
|
|
13680
13717
|
name: "computeStyles",
|
|
13681
13718
|
enabled: true,
|
|
13682
13719
|
phase: "beforeWrite",
|
|
13683
|
-
fn:
|
|
13720
|
+
fn: computeStyles,
|
|
13684
13721
|
data: {}
|
|
13685
13722
|
};
|
|
13686
13723
|
function applyStyles(_ref) {
|
|
@@ -13744,8 +13781,8 @@
|
|
|
13744
13781
|
};
|
|
13745
13782
|
var popper_lite_defaultModifiers = [
|
|
13746
13783
|
eventListeners,
|
|
13747
|
-
|
|
13748
|
-
|
|
13784
|
+
modifiers_popperOffsets,
|
|
13785
|
+
modifiers_computeStyles,
|
|
13749
13786
|
modifiers_applyStyles
|
|
13750
13787
|
];
|
|
13751
13788
|
var popper_lite_createPopper = /* @__PURE__ */ popperGenerator({
|
|
@@ -14004,7 +14041,9 @@
|
|
|
14004
14041
|
var stdin_default$A = vue.defineComponent({
|
|
14005
14042
|
name: name$s,
|
|
14006
14043
|
props: progressProps,
|
|
14007
|
-
setup(props2
|
|
14044
|
+
setup(props2, {
|
|
14045
|
+
slots
|
|
14046
|
+
}) {
|
|
14008
14047
|
const background = vue.computed(() => props2.inactive ? void 0 : props2.color);
|
|
14009
14048
|
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
14010
14049
|
const renderPivot = () => {
|
|
@@ -14015,8 +14054,8 @@
|
|
|
14015
14054
|
percentage
|
|
14016
14055
|
} = props2;
|
|
14017
14056
|
const safePercentage = format2(percentage);
|
|
14018
|
-
const text = pivotText != null ? pivotText : `${
|
|
14019
|
-
if (props2.showPivot && text) {
|
|
14057
|
+
const text = pivotText != null ? pivotText : `${safePercentage}%`;
|
|
14058
|
+
if (props2.showPivot && (slots.pivot || text)) {
|
|
14020
14059
|
const style = {
|
|
14021
14060
|
color: textColor,
|
|
14022
14061
|
left: `${safePercentage}%`,
|
|
@@ -14028,7 +14067,9 @@
|
|
|
14028
14067
|
"class": bem$r("pivot", {
|
|
14029
14068
|
inactive: props2.inactive
|
|
14030
14069
|
})
|
|
14031
|
-
}, [
|
|
14070
|
+
}, [slots.pivot ? slots.pivot({
|
|
14071
|
+
percentage: safePercentage
|
|
14072
|
+
}) : text]);
|
|
14032
14073
|
}
|
|
14033
14074
|
};
|
|
14034
14075
|
return () => {
|
|
@@ -14668,6 +14709,7 @@
|
|
|
14668
14709
|
"with-message": fieldAttrs.errorMessage
|
|
14669
14710
|
}),
|
|
14670
14711
|
"border": false,
|
|
14712
|
+
"labelAlign": "left",
|
|
14671
14713
|
"onBlur": onBlur,
|
|
14672
14714
|
"onFocus": onFocus,
|
|
14673
14715
|
"onClear": onClear,
|
|
@@ -14916,6 +14958,8 @@
|
|
|
14916
14958
|
type: makeStringProp("png"),
|
|
14917
14959
|
penColor: makeStringProp("#000"),
|
|
14918
14960
|
lineWidth: makeNumberProp(3),
|
|
14961
|
+
historySize: makeNumberProp(20),
|
|
14962
|
+
undoButtonText: String,
|
|
14919
14963
|
clearButtonText: String,
|
|
14920
14964
|
backgroundColor: makeStringProp(""),
|
|
14921
14965
|
confirmButtonText: String
|
|
@@ -14943,6 +14987,15 @@
|
|
|
14943
14987
|
let canvasWidth = 0;
|
|
14944
14988
|
let canvasHeight = 0;
|
|
14945
14989
|
let canvasRect;
|
|
14990
|
+
const history = vue.ref([]);
|
|
14991
|
+
const saveState = () => {
|
|
14992
|
+
if (ctx.value && canvasWidth && canvasHeight) {
|
|
14993
|
+
if (history.value.length >= props2.historySize) {
|
|
14994
|
+
history.value.shift();
|
|
14995
|
+
}
|
|
14996
|
+
history.value.push(ctx.value.getImageData(0, 0, canvasWidth, canvasHeight));
|
|
14997
|
+
}
|
|
14998
|
+
};
|
|
14946
14999
|
const touchStart = () => {
|
|
14947
15000
|
if (!ctx.value) {
|
|
14948
15001
|
return false;
|
|
@@ -14969,6 +15022,7 @@
|
|
|
14969
15022
|
};
|
|
14970
15023
|
const touchEnd = (event) => {
|
|
14971
15024
|
preventDefault(event);
|
|
15025
|
+
saveState();
|
|
14972
15026
|
emit("end");
|
|
14973
15027
|
};
|
|
14974
15028
|
const isCanvasEmpty = (canvas) => {
|
|
@@ -15009,8 +15063,21 @@
|
|
|
15009
15063
|
ctx.value.closePath();
|
|
15010
15064
|
setCanvasBgColor(ctx.value);
|
|
15011
15065
|
}
|
|
15066
|
+
history.value = [];
|
|
15012
15067
|
emit("clear");
|
|
15013
15068
|
};
|
|
15069
|
+
const undo = () => {
|
|
15070
|
+
if (history.value.length) {
|
|
15071
|
+
history.value.pop();
|
|
15072
|
+
if (ctx.value) {
|
|
15073
|
+
ctx.value.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
15074
|
+
setCanvasBgColor(ctx.value);
|
|
15075
|
+
if (history.value.length) {
|
|
15076
|
+
ctx.value.putImageData(history.value[history.value.length - 1], 0, 0);
|
|
15077
|
+
}
|
|
15078
|
+
}
|
|
15079
|
+
}
|
|
15080
|
+
};
|
|
15014
15081
|
const initialize = () => {
|
|
15015
15082
|
var _a, _b, _c;
|
|
15016
15083
|
if (isRenderCanvas && canvasRef.value) {
|
|
@@ -15034,7 +15101,8 @@
|
|
|
15034
15101
|
useExpose({
|
|
15035
15102
|
resize,
|
|
15036
15103
|
clear,
|
|
15037
|
-
submit
|
|
15104
|
+
submit,
|
|
15105
|
+
undo
|
|
15038
15106
|
});
|
|
15039
15107
|
return () => vue.createVNode("div", {
|
|
15040
15108
|
"class": bem$i()
|
|
@@ -15053,6 +15121,11 @@
|
|
|
15053
15121
|
"onClick": clear
|
|
15054
15122
|
}, {
|
|
15055
15123
|
default: () => [props2.clearButtonText || t$2("clear")]
|
|
15124
|
+
}), vue.createVNode(Button, {
|
|
15125
|
+
"size": "small",
|
|
15126
|
+
"onClick": undo
|
|
15127
|
+
}, {
|
|
15128
|
+
default: () => [props2.undoButtonText || t$2("undo")]
|
|
15056
15129
|
}), vue.createVNode(Button, {
|
|
15057
15130
|
"type": "primary",
|
|
15058
15131
|
"size": "small",
|
|
@@ -15777,6 +15850,9 @@
|
|
|
15777
15850
|
if (allowEmpty && value === "") {
|
|
15778
15851
|
return value;
|
|
15779
15852
|
}
|
|
15853
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
15854
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
15855
|
+
}
|
|
15780
15856
|
value = formatNumber(String(value), !props2.integer);
|
|
15781
15857
|
value = value === "" ? 0 : +value;
|
|
15782
15858
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -16088,6 +16164,11 @@
|
|
|
16088
16164
|
disabled: Boolean,
|
|
16089
16165
|
leftWidth: numericProp,
|
|
16090
16166
|
rightWidth: numericProp,
|
|
16167
|
+
threshold: {
|
|
16168
|
+
type: numericProp,
|
|
16169
|
+
default: 0.15,
|
|
16170
|
+
validator: (value) => +value >= 0 && +value <= 1
|
|
16171
|
+
},
|
|
16091
16172
|
beforeClose: Function,
|
|
16092
16173
|
stopPropagation: Boolean
|
|
16093
16174
|
};
|
|
@@ -16136,8 +16217,8 @@
|
|
|
16136
16217
|
};
|
|
16137
16218
|
const toggle = (side) => {
|
|
16138
16219
|
const offset = Math.abs(state.offset);
|
|
16139
|
-
const
|
|
16140
|
-
const threshold = opened ? 1 -
|
|
16220
|
+
const thresholdValue = +props2.threshold;
|
|
16221
|
+
const threshold = opened ? 1 - thresholdValue : thresholdValue;
|
|
16141
16222
|
const width = side === "left" ? leftWidth.value : rightWidth.value;
|
|
16142
16223
|
if (width && offset > width * threshold) {
|
|
16143
16224
|
open(side);
|
|
@@ -18227,7 +18308,7 @@
|
|
|
18227
18308
|
});
|
|
18228
18309
|
}
|
|
18229
18310
|
};
|
|
18230
|
-
const version = "4.9.
|
|
18311
|
+
const version = "4.9.23";
|
|
18231
18312
|
function install(app) {
|
|
18232
18313
|
const components = [
|
|
18233
18314
|
ActionBar,
|
|
@@ -18525,6 +18606,7 @@
|
|
|
18525
18606
|
exports2.rowProps = rowProps;
|
|
18526
18607
|
exports2.searchProps = searchProps;
|
|
18527
18608
|
exports2.setDialogDefaultOptions = setDialogDefaultOptions;
|
|
18609
|
+
exports2.setGlobalZIndex = setGlobalZIndex;
|
|
18528
18610
|
exports2.setNotifyDefaultOptions = setNotifyDefaultOptions;
|
|
18529
18611
|
exports2.setToastDefaultOptions = setToastDefaultOptions;
|
|
18530
18612
|
exports2.shareSheetProps = shareSheetProps;
|
|
@@ -18564,6 +18646,7 @@
|
|
|
18564
18646
|
exports2.uploaderProps = uploaderProps;
|
|
18565
18647
|
exports2.useAllTabStatus = useAllTabStatus;
|
|
18566
18648
|
exports2.useCurrentLang = useCurrentLang;
|
|
18649
|
+
exports2.useGlobalZIndex = useGlobalZIndex;
|
|
18567
18650
|
exports2.useTabStatus = useTabStatus;
|
|
18568
18651
|
exports2.version = version;
|
|
18569
18652
|
exports2.watermarkProps = watermarkProps;
|