vant 3.4.6 → 3.4.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/changelog.generated.md +39 -50
- package/es/address-list/AddressListItem.d.ts +3 -2
- package/es/address-list/AddressListItem.js +1 -1
- package/es/badge/Badge.d.ts +4 -3
- package/es/badge/index.d.ts +2 -2
- package/es/calendar/Calendar.js +1 -1
- package/es/calendar/types.d.ts +2 -1
- package/es/cascader/types.d.ts +2 -1
- package/es/checkbox/Checker.d.ts +2 -1
- package/es/collapse/Collapse.d.ts +7 -6
- package/es/collapse/index.d.ts +3 -3
- package/es/composables/use-touch.js +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -3
- package/es/config-provider/index.d.ts +2 -2
- package/es/contact-list/ContactList.d.ts +3 -2
- package/es/coupon/Coupon.d.ts +2 -1
- package/es/coupon-list/CouponList.d.ts +3 -13
- package/es/coupon-list/CouponList.js +9 -7
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +2 -9
- package/es/coupon-list/index.less +4 -16
- package/es/coupon-list/style/index.js +1 -0
- package/es/coupon-list/style/less.js +1 -0
- package/es/coupon-list/var.less +0 -1
- package/es/datetime-picker/DatePicker.js +1 -2
- package/es/dialog/types.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/index-bar/IndexBar.d.ts +5 -4
- package/es/index-bar/IndexBar.js +25 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/is-IS.d.ts +64 -0
- package/es/locale/lang/is-IS.js +74 -0
- package/es/locale/lang/la-LA.d.ts +64 -0
- package/es/locale/lang/la-LA.js +66 -0
- package/es/locale/lang/sv-SE.d.ts +64 -0
- package/es/locale/lang/sv-SE.js +66 -0
- package/es/notify/types.d.ts +2 -1
- package/es/number-keyboard/NumberKeyboard.js +10 -1
- package/es/picker/types.d.ts +3 -2
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/skeleton/Skeleton.d.ts +5 -4
- package/es/skeleton/index.d.ts +3 -3
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.js +1 -0
- package/es/tabs/types.d.ts +5 -4
- package/es/toast/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +2 -2
- package/es/uploader/UploaderPreviewItem.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.js +9 -6
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/types.d.ts +5 -5
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/validate.d.ts +2 -1
- package/lib/address-list/AddressListItem.d.ts +3 -2
- package/lib/badge/Badge.d.ts +4 -3
- package/lib/badge/index.d.ts +2 -2
- package/lib/calendar/Calendar.js +1 -1
- package/lib/calendar/types.d.ts +2 -1
- package/lib/cascader/types.d.ts +2 -1
- package/lib/checkbox/Checker.d.ts +2 -1
- package/lib/collapse/Collapse.d.ts +7 -6
- package/lib/collapse/index.d.ts +3 -3
- package/lib/composables/use-touch.js +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +4 -3
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/contact-list/ContactList.d.ts +3 -2
- package/lib/coupon/Coupon.d.ts +2 -1
- package/lib/coupon-list/CouponList.d.ts +3 -13
- package/lib/coupon-list/CouponList.js +9 -7
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +2 -9
- package/lib/coupon-list/index.less +4 -16
- package/lib/coupon-list/style/index.js +1 -0
- package/lib/coupon-list/style/less.js +1 -0
- package/lib/coupon-list/var.less +0 -1
- package/lib/datetime-picker/DatePicker.js +1 -2
- package/lib/dialog/types.d.ts +2 -2
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/index-bar/IndexBar.d.ts +5 -4
- package/lib/index-bar/IndexBar.js +25 -4
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +2 -2
- package/lib/locale/lang/is-IS.d.ts +64 -0
- package/lib/locale/lang/is-IS.js +98 -0
- package/lib/locale/lang/la-LA.d.ts +64 -0
- package/lib/locale/lang/la-LA.js +90 -0
- package/lib/locale/lang/sv-SE.d.ts +64 -0
- package/lib/locale/lang/sv-SE.js +90 -0
- package/lib/notify/types.d.ts +2 -1
- package/lib/number-keyboard/NumberKeyboard.js +10 -1
- package/lib/picker/types.d.ts +3 -2
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/index.d.ts +2 -2
- package/lib/skeleton/Skeleton.d.ts +5 -4
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +1 -0
- package/lib/tabs/types.d.ts +5 -4
- package/lib/toast/types.d.ts +3 -2
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +1 -1
- package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.js +9 -6
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/types.d.ts +5 -5
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/format.d.ts +7 -6
- package/lib/utils/format.js +6 -0
- package/lib/utils/validate.d.ts +2 -1
- package/lib/vant.cjs.js +269 -229
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +269 -229
- package/lib/vant.es.min.js +269 -229
- package/lib/vant.js +269 -229
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +641 -638
- package/vetur/tags.json +227 -227
- package/vetur/web-types.json +2160 -2158
package/lib/vant.cjs.js
CHANGED
@@ -121,6 +121,12 @@ function addUnit(value) {
|
|
121
121
|
}
|
122
122
|
function getSizeStyle(originSize) {
|
123
123
|
if (isDef(originSize)) {
|
124
|
+
if (Array.isArray(originSize)) {
|
125
|
+
return {
|
126
|
+
width: addUnit(originSize[0]),
|
127
|
+
height: addUnit(originSize[1])
|
128
|
+
};
|
129
|
+
}
|
124
130
|
const size = addUnit(originSize);
|
125
131
|
return {
|
126
132
|
width: size,
|
@@ -989,7 +995,7 @@ function useTouch() {
|
|
989
995
|
};
|
990
996
|
const move = (event) => {
|
991
997
|
const touch = event.touches[0];
|
992
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
998
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
993
999
|
deltaY.value = touch.clientY - startY.value;
|
994
1000
|
offsetX.value = Math.abs(deltaX.value);
|
995
1001
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -4782,8 +4788,8 @@ var stdin_default$17 = vue.defineComponent({
|
|
4782
4788
|
}
|
4783
4789
|
use.raf(() => {
|
4784
4790
|
bodyHeight = Math.floor(use.useRect(bodyRef).height);
|
4785
|
-
scrollToCurrentDate();
|
4786
4791
|
});
|
4792
|
+
scrollToCurrentDate();
|
4787
4793
|
};
|
4788
4794
|
const reset = (date = getInitialDate()) => {
|
4789
4795
|
currentDate.value = date;
|
@@ -6097,6 +6103,7 @@ var stdin_default$10 = vue.defineComponent({
|
|
6097
6103
|
}
|
6098
6104
|
};
|
6099
6105
|
const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$13, vue.mergeProps({
|
6106
|
+
"key": item.id,
|
6100
6107
|
"id": `${id}-${index}`,
|
6101
6108
|
"ref": setTitleRefs(index),
|
6102
6109
|
"type": props.type,
|
@@ -7687,14 +7694,152 @@ var stdin_default$L = vue.defineComponent({
|
|
7687
7694
|
}
|
7688
7695
|
});
|
7689
7696
|
const CouponCell = withInstall(stdin_default$L);
|
7690
|
-
const
|
7691
|
-
const
|
7697
|
+
const prefix = "van-empty-network-";
|
7698
|
+
const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
|
7699
|
+
"stop-color": color,
|
7700
|
+
"offset": `${offset}%`,
|
7701
|
+
"stop-opacity": opacity
|
7702
|
+
}, null);
|
7703
|
+
const Network = vue.createVNode("svg", {
|
7704
|
+
"viewBox": "0 0 160 160"
|
7705
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7706
|
+
"id": `${prefix}1`,
|
7707
|
+
"x1": "64%",
|
7708
|
+
"y1": "100%",
|
7709
|
+
"x2": "64%"
|
7710
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
7711
|
+
"id": `${prefix}2`,
|
7712
|
+
"x1": "50%",
|
7713
|
+
"x2": "50%",
|
7714
|
+
"y2": "84%"
|
7715
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
7716
|
+
"id": `${prefix}3`,
|
7717
|
+
"x1": "100%",
|
7718
|
+
"x2": "100%",
|
7719
|
+
"y2": "100%"
|
7720
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
7721
|
+
"id": `${prefix}4`,
|
7722
|
+
"cx": "50%",
|
7723
|
+
"cy": "0%",
|
7724
|
+
"fx": "50%",
|
7725
|
+
"fy": "0%",
|
7726
|
+
"r": "100%",
|
7727
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7728
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
7729
|
+
"fill": "none"
|
7730
|
+
}, [vue.createVNode("g", {
|
7731
|
+
"opacity": ".8"
|
7732
|
+
}, [vue.createVNode("path", {
|
7733
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7734
|
+
"fill": `url(#${prefix}1)`
|
7735
|
+
}, null), vue.createVNode("path", {
|
7736
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7737
|
+
"fill": `url(#${prefix}1)`
|
7738
|
+
}, null)]), vue.createVNode("path", {
|
7739
|
+
"fill": `url(#${prefix}4)`,
|
7740
|
+
"d": "M0 139h160v21H0z"
|
7741
|
+
}, null), vue.createVNode("path", {
|
7742
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7743
|
+
"fill": `url(#${prefix}2)`
|
7744
|
+
}, null), vue.createVNode("g", {
|
7745
|
+
"opacity": ".6",
|
7746
|
+
"stroke-linecap": "round",
|
7747
|
+
"stroke-width": "7"
|
7748
|
+
}, [vue.createVNode("path", {
|
7749
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7750
|
+
"stroke": `url(#${prefix}3)`
|
7751
|
+
}, null), vue.createVNode("path", {
|
7752
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7753
|
+
"stroke": `url(#${prefix}3)`
|
7754
|
+
}, null), vue.createVNode("path", {
|
7755
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7756
|
+
"stroke": `url(#${prefix}3)`
|
7757
|
+
}, null), vue.createVNode("path", {
|
7758
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7759
|
+
"stroke": `url(#${prefix}3)`
|
7760
|
+
}, null)]), vue.createVNode("g", {
|
7761
|
+
"transform": "translate(31 105)"
|
7762
|
+
}, [vue.createVNode("rect", {
|
7763
|
+
"fill": "#EBEDF0",
|
7764
|
+
"width": "98",
|
7765
|
+
"height": "34",
|
7766
|
+
"rx": "2"
|
7767
|
+
}, null), vue.createVNode("rect", {
|
7768
|
+
"fill": "#FFF",
|
7769
|
+
"x": "9",
|
7770
|
+
"y": "8",
|
7771
|
+
"width": "80",
|
7772
|
+
"height": "18",
|
7773
|
+
"rx": "1.1"
|
7774
|
+
}, null), vue.createVNode("rect", {
|
7775
|
+
"fill": "#EBEDF0",
|
7776
|
+
"x": "15",
|
7777
|
+
"y": "12",
|
7778
|
+
"width": "18",
|
7779
|
+
"height": "6",
|
7780
|
+
"rx": "1.1"
|
7781
|
+
}, null)])])]);
|
7782
|
+
const [name$E, bem$D] = createNamespace("empty");
|
7783
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
7784
|
+
const emptyProps = {
|
7785
|
+
image: makeStringProp("default"),
|
7786
|
+
imageSize: numericProp,
|
7787
|
+
description: String
|
7788
|
+
};
|
7789
|
+
var stdin_default$K = vue.defineComponent({
|
7790
|
+
name: name$E,
|
7791
|
+
props: emptyProps,
|
7792
|
+
setup(props, {
|
7793
|
+
slots
|
7794
|
+
}) {
|
7795
|
+
const renderImage = () => {
|
7796
|
+
if (slots.image) {
|
7797
|
+
return slots.image();
|
7798
|
+
}
|
7799
|
+
let {
|
7800
|
+
image
|
7801
|
+
} = props;
|
7802
|
+
if (image === "network") {
|
7803
|
+
return Network;
|
7804
|
+
}
|
7805
|
+
if (PRESET_IMAGES.includes(image)) {
|
7806
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
7807
|
+
}
|
7808
|
+
return vue.createVNode("img", {
|
7809
|
+
"src": image
|
7810
|
+
}, null);
|
7811
|
+
};
|
7812
|
+
const renderDescription = () => {
|
7813
|
+
const description = slots.description ? slots.description() : props.description;
|
7814
|
+
if (description) {
|
7815
|
+
return vue.createVNode("p", {
|
7816
|
+
"class": bem$D("description")
|
7817
|
+
}, [description]);
|
7818
|
+
}
|
7819
|
+
};
|
7820
|
+
const renderBottom = () => {
|
7821
|
+
if (slots.default) {
|
7822
|
+
return vue.createVNode("div", {
|
7823
|
+
"class": bem$D("bottom")
|
7824
|
+
}, [slots.default()]);
|
7825
|
+
}
|
7826
|
+
};
|
7827
|
+
return () => vue.createVNode("div", {
|
7828
|
+
"class": bem$D()
|
7829
|
+
}, [vue.createVNode("div", {
|
7830
|
+
"class": bem$D("image"),
|
7831
|
+
"style": getSizeStyle(props.imageSize)
|
7832
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7833
|
+
}
|
7834
|
+
});
|
7835
|
+
const Empty = withInstall(stdin_default$K);
|
7836
|
+
const [name$D, bem$C, t$8] = createNamespace("coupon-list");
|
7692
7837
|
const couponListProps = {
|
7693
7838
|
code: makeStringProp(""),
|
7694
7839
|
coupons: makeArrayProp(),
|
7695
7840
|
currency: makeStringProp("\xA5"),
|
7696
7841
|
showCount: truthProp,
|
7697
|
-
emptyImage:
|
7842
|
+
emptyImage: String,
|
7698
7843
|
chosenCoupon: makeNumberProp(-1),
|
7699
7844
|
enabledTitle: String,
|
7700
7845
|
disabledTitle: String,
|
@@ -7709,8 +7854,8 @@ const couponListProps = {
|
|
7709
7854
|
exchangeButtonLoading: Boolean,
|
7710
7855
|
exchangeButtonDisabled: Boolean
|
7711
7856
|
};
|
7712
|
-
var stdin_default$
|
7713
|
-
name: name$
|
7857
|
+
var stdin_default$J = vue.defineComponent({
|
7858
|
+
name: name$D,
|
7714
7859
|
props: couponListProps,
|
7715
7860
|
emits: ["change", "exchange", "update:code"],
|
7716
7861
|
setup(props, {
|
@@ -7742,28 +7887,30 @@ var stdin_default$K = vue.defineComponent({
|
|
7742
7887
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7743
7888
|
});
|
7744
7889
|
};
|
7745
|
-
const renderEmpty = () => vue.createVNode(
|
7746
|
-
"
|
7747
|
-
},
|
7748
|
-
"
|
7749
|
-
|
7890
|
+
const renderEmpty = () => vue.createVNode(Empty, {
|
7891
|
+
"image": props.emptyImage
|
7892
|
+
}, {
|
7893
|
+
default: () => [vue.createVNode("p", {
|
7894
|
+
"class": bem$C("empty-tip")
|
7895
|
+
}, [t$8("noCoupon")])]
|
7896
|
+
});
|
7750
7897
|
const renderExchangeBar = () => {
|
7751
7898
|
if (props.showExchangeBar) {
|
7752
7899
|
return vue.createVNode("div", {
|
7753
7900
|
"ref": barRef,
|
7754
|
-
"class": bem$
|
7901
|
+
"class": bem$C("exchange-bar")
|
7755
7902
|
}, [vue.createVNode(Field, {
|
7756
7903
|
"modelValue": currentCode.value,
|
7757
7904
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7758
7905
|
"clearable": true,
|
7759
7906
|
"border": false,
|
7760
|
-
"class": bem$
|
7907
|
+
"class": bem$C("field"),
|
7761
7908
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7762
7909
|
"maxlength": "20"
|
7763
7910
|
}, null), vue.createVNode(Button, {
|
7764
7911
|
"plain": true,
|
7765
7912
|
"type": "danger",
|
7766
|
-
"class": bem$
|
7913
|
+
"class": bem$C("exchange"),
|
7767
7914
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7768
7915
|
"loading": props.exchangeButtonLoading,
|
7769
7916
|
"disabled": buttonDisabled.value,
|
@@ -7783,7 +7930,7 @@ var stdin_default$K = vue.defineComponent({
|
|
7783
7930
|
default: () => {
|
7784
7931
|
var _a;
|
7785
7932
|
return [vue.createVNode("div", {
|
7786
|
-
"class": bem$
|
7933
|
+
"class": bem$C("list", {
|
7787
7934
|
"with-bottom": props.showCloseButton
|
7788
7935
|
}),
|
7789
7936
|
"style": {
|
@@ -7812,7 +7959,7 @@ var stdin_default$K = vue.defineComponent({
|
|
7812
7959
|
default: () => {
|
7813
7960
|
var _a;
|
7814
7961
|
return [vue.createVNode("div", {
|
7815
|
-
"class": bem$
|
7962
|
+
"class": bem$C("list", {
|
7816
7963
|
"with-bottom": props.showCloseButton
|
7817
7964
|
}),
|
7818
7965
|
"style": {
|
@@ -7839,29 +7986,29 @@ var stdin_default$K = vue.defineComponent({
|
|
7839
7986
|
});
|
7840
7987
|
return () => vue.createVNode("div", {
|
7841
7988
|
"ref": root,
|
7842
|
-
"class": bem$
|
7989
|
+
"class": bem$C()
|
7843
7990
|
}, [renderExchangeBar(), vue.createVNode(Tabs, {
|
7844
7991
|
"active": activeTab.value,
|
7845
7992
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7846
|
-
"class": bem$
|
7993
|
+
"class": bem$C("tab")
|
7847
7994
|
}, {
|
7848
7995
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7849
7996
|
}), vue.createVNode("div", {
|
7850
|
-
"class": bem$
|
7997
|
+
"class": bem$C("bottom")
|
7851
7998
|
}, [vue.withDirectives(vue.createVNode(Button, {
|
7852
7999
|
"round": true,
|
7853
8000
|
"block": true,
|
7854
8001
|
"type": "danger",
|
7855
|
-
"class": bem$
|
8002
|
+
"class": bem$C("close"),
|
7856
8003
|
"text": props.closeButtonText || t$8("close"),
|
7857
8004
|
"onClick": () => emit("change", -1)
|
7858
8005
|
}, null), [[vue.vShow, props.showCloseButton]])])]);
|
7859
8006
|
}
|
7860
8007
|
});
|
7861
|
-
const CouponList = withInstall(stdin_default$
|
7862
|
-
const [name$
|
7863
|
-
var stdin_default$
|
7864
|
-
name: name$
|
8008
|
+
const CouponList = withInstall(stdin_default$J);
|
8009
|
+
const [name$C] = createNamespace("time-picker");
|
8010
|
+
var stdin_default$I = vue.defineComponent({
|
8011
|
+
name: name$C,
|
7865
8012
|
props: extend({}, sharedProps, {
|
7866
8013
|
minHour: makeNumericProp(0),
|
7867
8014
|
maxHour: makeNumericProp(23),
|
@@ -7968,9 +8115,9 @@ var stdin_default$J = vue.defineComponent({
|
|
7968
8115
|
}
|
7969
8116
|
});
|
7970
8117
|
const currentYear = new Date().getFullYear();
|
7971
|
-
const [name$
|
7972
|
-
var stdin_default$
|
7973
|
-
name: name$
|
8118
|
+
const [name$B] = createNamespace("date-picker");
|
8119
|
+
var stdin_default$H = vue.defineComponent({
|
8120
|
+
name: name$B,
|
7974
8121
|
props: extend({}, sharedProps, {
|
7975
8122
|
type: makeStringProp("datetime"),
|
7976
8123
|
modelValue: Date,
|
@@ -8185,8 +8332,7 @@ var stdin_default$I = vue.defineComponent({
|
|
8185
8332
|
});
|
8186
8333
|
vue.watch(columns, updateColumnValue);
|
8187
8334
|
vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
|
8188
|
-
vue.watch(() => [props.filter, props.maxDate],
|
8189
|
-
vue.watch(() => props.minDate, () => {
|
8335
|
+
vue.watch(() => [props.filter, props.minDate, props.maxDate], () => {
|
8190
8336
|
vue.nextTick(updateInnerValue);
|
8191
8337
|
});
|
8192
8338
|
vue.watch(() => props.modelValue, (value) => {
|
@@ -8208,14 +8354,14 @@ var stdin_default$I = vue.defineComponent({
|
|
8208
8354
|
}, pick(props, pickerInheritKeys)), slots);
|
8209
8355
|
}
|
8210
8356
|
});
|
8211
|
-
const [name$
|
8212
|
-
const timePickerPropKeys = Object.keys(stdin_default$
|
8213
|
-
const datePickerPropKeys = Object.keys(stdin_default$
|
8214
|
-
const datetimePickerProps = extend({}, stdin_default$
|
8357
|
+
const [name$A, bem$B] = createNamespace("datetime-picker");
|
8358
|
+
const timePickerPropKeys = Object.keys(stdin_default$I.props);
|
8359
|
+
const datePickerPropKeys = Object.keys(stdin_default$H.props);
|
8360
|
+
const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
|
8215
8361
|
modelValue: [String, Date]
|
8216
8362
|
});
|
8217
|
-
var stdin_default$
|
8218
|
-
name: name$
|
8363
|
+
var stdin_default$G = vue.defineComponent({
|
8364
|
+
name: name$A,
|
8219
8365
|
props: datetimePickerProps,
|
8220
8366
|
setup(props, {
|
8221
8367
|
attrs,
|
@@ -8230,17 +8376,17 @@ var stdin_default$H = vue.defineComponent({
|
|
8230
8376
|
});
|
8231
8377
|
return () => {
|
8232
8378
|
const isTimePicker = props.type === "time";
|
8233
|
-
const Component = isTimePicker ? stdin_default$
|
8379
|
+
const Component = isTimePicker ? stdin_default$I : stdin_default$H;
|
8234
8380
|
const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
|
8235
8381
|
return vue.createVNode(Component, vue.mergeProps({
|
8236
8382
|
"ref": root,
|
8237
|
-
"class": bem$
|
8383
|
+
"class": bem$B()
|
8238
8384
|
}, inheritProps, attrs), slots);
|
8239
8385
|
};
|
8240
8386
|
}
|
8241
8387
|
});
|
8242
|
-
const DatetimePicker = withInstall(stdin_default$
|
8243
|
-
const [name$
|
8388
|
+
const DatetimePicker = withInstall(stdin_default$G);
|
8389
|
+
const [name$z, bem$A, t$7] = createNamespace("dialog");
|
8244
8390
|
const dialogProps = extend({}, popupSharedProps, {
|
8245
8391
|
title: String,
|
8246
8392
|
theme: String,
|
@@ -8261,8 +8407,8 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8261
8407
|
closeOnClickOverlay: Boolean
|
8262
8408
|
});
|
8263
8409
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
8264
|
-
var stdin_default$
|
8265
|
-
name: name$
|
8410
|
+
var stdin_default$F = vue.defineComponent({
|
8411
|
+
name: name$z,
|
8266
8412
|
props: dialogProps,
|
8267
8413
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8268
8414
|
setup(props, {
|
@@ -8319,7 +8465,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8319
8465
|
const title = slots.title ? slots.title() : props.title;
|
8320
8466
|
if (title) {
|
8321
8467
|
return vue.createVNode("div", {
|
8322
|
-
"class": bem$
|
8468
|
+
"class": bem$A("header", {
|
8323
8469
|
isolated: !props.message && !slots.default
|
8324
8470
|
})
|
8325
8471
|
}, [title]);
|
@@ -8331,7 +8477,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8331
8477
|
allowHtml,
|
8332
8478
|
messageAlign
|
8333
8479
|
} = props;
|
8334
|
-
const classNames = bem$
|
8480
|
+
const classNames = bem$A("message", {
|
8335
8481
|
"has-title": hasTitle,
|
8336
8482
|
[messageAlign]: messageAlign
|
8337
8483
|
});
|
@@ -8349,7 +8495,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8349
8495
|
const renderContent = () => {
|
8350
8496
|
if (slots.default) {
|
8351
8497
|
return vue.createVNode("div", {
|
8352
|
-
"class": bem$
|
8498
|
+
"class": bem$A("content")
|
8353
8499
|
}, [slots.default()]);
|
8354
8500
|
}
|
8355
8501
|
const {
|
@@ -8361,18 +8507,18 @@ var stdin_default$G = vue.defineComponent({
|
|
8361
8507
|
const hasTitle = !!(title || slots.title);
|
8362
8508
|
return vue.createVNode("div", {
|
8363
8509
|
"key": allowHtml ? 1 : 0,
|
8364
|
-
"class": bem$
|
8510
|
+
"class": bem$A("content", {
|
8365
8511
|
isolated: !hasTitle
|
8366
8512
|
})
|
8367
8513
|
}, [renderMessage(hasTitle)]);
|
8368
8514
|
}
|
8369
8515
|
};
|
8370
8516
|
const renderButtons = () => vue.createVNode("div", {
|
8371
|
-
"class": [BORDER_TOP, bem$
|
8517
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
8372
8518
|
}, [props.showCancelButton && vue.createVNode(Button, {
|
8373
8519
|
"size": "large",
|
8374
8520
|
"text": props.cancelButtonText || t$7("cancel"),
|
8375
|
-
"class": bem$
|
8521
|
+
"class": bem$A("cancel"),
|
8376
8522
|
"style": {
|
8377
8523
|
color: props.cancelButtonColor
|
8378
8524
|
},
|
@@ -8381,7 +8527,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8381
8527
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
8382
8528
|
"size": "large",
|
8383
8529
|
"text": props.confirmButtonText || t$7("confirm"),
|
8384
|
-
"class": [bem$
|
8530
|
+
"class": [bem$A("confirm"), {
|
8385
8531
|
[BORDER_LEFT]: props.showCancelButton
|
8386
8532
|
}],
|
8387
8533
|
"style": {
|
@@ -8391,19 +8537,19 @@ var stdin_default$G = vue.defineComponent({
|
|
8391
8537
|
"onClick": onConfirm
|
8392
8538
|
}, null)]);
|
8393
8539
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
8394
|
-
"class": bem$
|
8540
|
+
"class": bem$A("footer")
|
8395
8541
|
}, {
|
8396
8542
|
default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
|
8397
8543
|
"type": "warning",
|
8398
8544
|
"text": props.cancelButtonText || t$7("cancel"),
|
8399
|
-
"class": bem$
|
8545
|
+
"class": bem$A("cancel"),
|
8400
8546
|
"color": props.cancelButtonColor,
|
8401
8547
|
"loading": loading.cancel,
|
8402
8548
|
"onClick": onCancel
|
8403
8549
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
8404
8550
|
"type": "danger",
|
8405
8551
|
"text": props.confirmButtonText || t$7("confirm"),
|
8406
|
-
"class": bem$
|
8552
|
+
"class": bem$A("confirm"),
|
8407
8553
|
"color": props.confirmButtonColor,
|
8408
8554
|
"loading": loading.confirm,
|
8409
8555
|
"onClick": onConfirm
|
@@ -8426,7 +8572,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8426
8572
|
return vue.createVNode(Popup, vue.mergeProps({
|
8427
8573
|
"ref": root,
|
8428
8574
|
"role": "dialog",
|
8429
|
-
"class": [bem$
|
8575
|
+
"class": [bem$A([theme]), className],
|
8430
8576
|
"style": {
|
8431
8577
|
width: addUnit(width)
|
8432
8578
|
},
|
@@ -8448,7 +8594,7 @@ function initInstance$2() {
|
|
8448
8594
|
state,
|
8449
8595
|
toggle
|
8450
8596
|
} = usePopupState();
|
8451
|
-
return () => vue.createVNode(stdin_default$
|
8597
|
+
return () => vue.createVNode(stdin_default$F, vue.mergeProps(state, {
|
8452
8598
|
"onUpdate:show": toggle
|
8453
8599
|
}), null);
|
8454
8600
|
}
|
@@ -8513,19 +8659,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8513
8659
|
Dialog.resetDefaultOptions = () => {
|
8514
8660
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8515
8661
|
};
|
8516
|
-
Dialog.Component = withInstall(stdin_default$
|
8662
|
+
Dialog.Component = withInstall(stdin_default$F);
|
8517
8663
|
Dialog.install = (app) => {
|
8518
8664
|
app.use(Dialog.Component);
|
8519
8665
|
app.config.globalProperties.$dialog = Dialog;
|
8520
8666
|
};
|
8521
|
-
const [name$
|
8667
|
+
const [name$y, bem$z] = createNamespace("divider");
|
8522
8668
|
const dividerProps = {
|
8523
8669
|
dashed: Boolean,
|
8524
8670
|
hairline: truthProp,
|
8525
8671
|
contentPosition: makeStringProp("center")
|
8526
8672
|
};
|
8527
|
-
var stdin_default$
|
8528
|
-
name: name$
|
8673
|
+
var stdin_default$E = vue.defineComponent({
|
8674
|
+
name: name$y,
|
8529
8675
|
props: dividerProps,
|
8530
8676
|
setup(props, {
|
8531
8677
|
slots
|
@@ -8534,7 +8680,7 @@ var stdin_default$F = vue.defineComponent({
|
|
8534
8680
|
var _a;
|
8535
8681
|
return vue.createVNode("div", {
|
8536
8682
|
"role": "separator",
|
8537
|
-
"class": bem$
|
8683
|
+
"class": bem$z({
|
8538
8684
|
dashed: props.dashed,
|
8539
8685
|
hairline: props.hairline,
|
8540
8686
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8543,8 +8689,8 @@ var stdin_default$F = vue.defineComponent({
|
|
8543
8689
|
};
|
8544
8690
|
}
|
8545
8691
|
});
|
8546
|
-
const Divider = withInstall(stdin_default$
|
8547
|
-
const [name$
|
8692
|
+
const Divider = withInstall(stdin_default$E);
|
8693
|
+
const [name$x, bem$y] = createNamespace("dropdown-menu");
|
8548
8694
|
const dropdownMenuProps = {
|
8549
8695
|
overlay: truthProp,
|
8550
8696
|
zIndex: numericProp,
|
@@ -8554,9 +8700,9 @@ const dropdownMenuProps = {
|
|
8554
8700
|
closeOnClickOutside: truthProp,
|
8555
8701
|
closeOnClickOverlay: truthProp
|
8556
8702
|
};
|
8557
|
-
const DROPDOWN_KEY = Symbol(name$
|
8558
|
-
var stdin_default$
|
8559
|
-
name: name$
|
8703
|
+
const DROPDOWN_KEY = Symbol(name$x);
|
8704
|
+
var stdin_default$D = vue.defineComponent({
|
8705
|
+
name: name$x,
|
8560
8706
|
props: dropdownMenuProps,
|
8561
8707
|
setup(props, {
|
8562
8708
|
slots
|
@@ -8624,7 +8770,7 @@ var stdin_default$E = vue.defineComponent({
|
|
8624
8770
|
"id": `${id}-${index}`,
|
8625
8771
|
"role": "button",
|
8626
8772
|
"tabindex": disabled ? void 0 : 0,
|
8627
|
-
"class": [bem$
|
8773
|
+
"class": [bem$y("item", {
|
8628
8774
|
disabled
|
8629
8775
|
}), {
|
8630
8776
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8635,7 +8781,7 @@ var stdin_default$E = vue.defineComponent({
|
|
8635
8781
|
}
|
8636
8782
|
}
|
8637
8783
|
}, [vue.createVNode("span", {
|
8638
|
-
"class": [bem$
|
8784
|
+
"class": [bem$y("title", {
|
8639
8785
|
down: showPopup === (props.direction === "down"),
|
8640
8786
|
active: showPopup
|
8641
8787
|
}), titleClass],
|
@@ -8659,18 +8805,18 @@ var stdin_default$E = vue.defineComponent({
|
|
8659
8805
|
var _a;
|
8660
8806
|
return vue.createVNode("div", {
|
8661
8807
|
"ref": root,
|
8662
|
-
"class": bem$
|
8808
|
+
"class": bem$y()
|
8663
8809
|
}, [vue.createVNode("div", {
|
8664
8810
|
"ref": barRef,
|
8665
8811
|
"style": barStyle.value,
|
8666
|
-
"class": bem$
|
8812
|
+
"class": bem$y("bar", {
|
8667
8813
|
opened: opened.value
|
8668
8814
|
})
|
8669
8815
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8670
8816
|
};
|
8671
8817
|
}
|
8672
8818
|
});
|
8673
|
-
const [name$
|
8819
|
+
const [name$w, bem$x] = createNamespace("dropdown-item");
|
8674
8820
|
const dropdownItemProps = {
|
8675
8821
|
title: String,
|
8676
8822
|
options: makeArrayProp(),
|
@@ -8680,8 +8826,8 @@ const dropdownItemProps = {
|
|
8680
8826
|
modelValue: unknownProp,
|
8681
8827
|
titleClass: unknownProp
|
8682
8828
|
};
|
8683
|
-
var stdin_default$
|
8684
|
-
name: name$
|
8829
|
+
var stdin_default$C = vue.defineComponent({
|
8830
|
+
name: name$w,
|
8685
8831
|
props: dropdownItemProps,
|
8686
8832
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8687
8833
|
setup(props, {
|
@@ -8748,7 +8894,7 @@ var stdin_default$D = vue.defineComponent({
|
|
8748
8894
|
const renderIcon = () => {
|
8749
8895
|
if (active) {
|
8750
8896
|
return vue.createVNode(Icon, {
|
8751
|
-
"class": bem$
|
8897
|
+
"class": bem$x("icon"),
|
8752
8898
|
"color": activeColor,
|
8753
8899
|
"name": "success"
|
8754
8900
|
}, null);
|
@@ -8759,7 +8905,7 @@ var stdin_default$D = vue.defineComponent({
|
|
8759
8905
|
"key": option.value,
|
8760
8906
|
"icon": option.icon,
|
8761
8907
|
"title": option.text,
|
8762
|
-
"class": bem$
|
8908
|
+
"class": bem$x("option", {
|
8763
8909
|
active
|
8764
8910
|
}),
|
8765
8911
|
"style": {
|
@@ -8791,13 +8937,13 @@ var stdin_default$D = vue.defineComponent({
|
|
8791
8937
|
}
|
8792
8938
|
return vue.withDirectives(vue.createVNode("div", {
|
8793
8939
|
"style": style,
|
8794
|
-
"class": bem$
|
8940
|
+
"class": bem$x([direction]),
|
8795
8941
|
"onClick": onClickWrapper
|
8796
8942
|
}, [vue.createVNode(Popup, {
|
8797
8943
|
"show": state.showPopup,
|
8798
8944
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8799
8945
|
"role": "menu",
|
8800
|
-
"class": bem$
|
8946
|
+
"class": bem$x("content"),
|
8801
8947
|
"overlay": overlay,
|
8802
8948
|
"position": direction === "down" ? "top" : "bottom",
|
8803
8949
|
"duration": state.transition ? duration : 0,
|
@@ -8835,147 +8981,8 @@ var stdin_default$D = vue.defineComponent({
|
|
8835
8981
|
};
|
8836
8982
|
}
|
8837
8983
|
});
|
8838
|
-
const DropdownItem = withInstall(stdin_default$
|
8839
|
-
const DropdownMenu = withInstall(stdin_default$
|
8840
|
-
const prefix = "van-empty-network-";
|
8841
|
-
const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
|
8842
|
-
"stop-color": color,
|
8843
|
-
"offset": `${offset}%`,
|
8844
|
-
"stop-opacity": opacity
|
8845
|
-
}, null);
|
8846
|
-
const Network = vue.createVNode("svg", {
|
8847
|
-
"viewBox": "0 0 160 160"
|
8848
|
-
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
8849
|
-
"id": `${prefix}1`,
|
8850
|
-
"x1": "64%",
|
8851
|
-
"y1": "100%",
|
8852
|
-
"x2": "64%"
|
8853
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
8854
|
-
"id": `${prefix}2`,
|
8855
|
-
"x1": "50%",
|
8856
|
-
"x2": "50%",
|
8857
|
-
"y2": "84%"
|
8858
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
8859
|
-
"id": `${prefix}3`,
|
8860
|
-
"x1": "100%",
|
8861
|
-
"x2": "100%",
|
8862
|
-
"y2": "100%"
|
8863
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
8864
|
-
"id": `${prefix}4`,
|
8865
|
-
"cx": "50%",
|
8866
|
-
"cy": "0%",
|
8867
|
-
"fx": "50%",
|
8868
|
-
"fy": "0%",
|
8869
|
-
"r": "100%",
|
8870
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8871
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
8872
|
-
"fill": "none"
|
8873
|
-
}, [vue.createVNode("g", {
|
8874
|
-
"opacity": ".8"
|
8875
|
-
}, [vue.createVNode("path", {
|
8876
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8877
|
-
"fill": `url(#${prefix}1)`
|
8878
|
-
}, null), vue.createVNode("path", {
|
8879
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8880
|
-
"fill": `url(#${prefix}1)`
|
8881
|
-
}, null)]), vue.createVNode("path", {
|
8882
|
-
"fill": `url(#${prefix}4)`,
|
8883
|
-
"d": "M0 139h160v21H0z"
|
8884
|
-
}, null), vue.createVNode("path", {
|
8885
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8886
|
-
"fill": `url(#${prefix}2)`
|
8887
|
-
}, null), vue.createVNode("g", {
|
8888
|
-
"opacity": ".6",
|
8889
|
-
"stroke-linecap": "round",
|
8890
|
-
"stroke-width": "7"
|
8891
|
-
}, [vue.createVNode("path", {
|
8892
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8893
|
-
"stroke": `url(#${prefix}3)`
|
8894
|
-
}, null), vue.createVNode("path", {
|
8895
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8896
|
-
"stroke": `url(#${prefix}3)`
|
8897
|
-
}, null), vue.createVNode("path", {
|
8898
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8899
|
-
"stroke": `url(#${prefix}3)`
|
8900
|
-
}, null), vue.createVNode("path", {
|
8901
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8902
|
-
"stroke": `url(#${prefix}3)`
|
8903
|
-
}, null)]), vue.createVNode("g", {
|
8904
|
-
"transform": "translate(31 105)"
|
8905
|
-
}, [vue.createVNode("rect", {
|
8906
|
-
"fill": "#EBEDF0",
|
8907
|
-
"width": "98",
|
8908
|
-
"height": "34",
|
8909
|
-
"rx": "2"
|
8910
|
-
}, null), vue.createVNode("rect", {
|
8911
|
-
"fill": "#FFF",
|
8912
|
-
"x": "9",
|
8913
|
-
"y": "8",
|
8914
|
-
"width": "80",
|
8915
|
-
"height": "18",
|
8916
|
-
"rx": "1.1"
|
8917
|
-
}, null), vue.createVNode("rect", {
|
8918
|
-
"fill": "#EBEDF0",
|
8919
|
-
"x": "15",
|
8920
|
-
"y": "12",
|
8921
|
-
"width": "18",
|
8922
|
-
"height": "6",
|
8923
|
-
"rx": "1.1"
|
8924
|
-
}, null)])])]);
|
8925
|
-
const [name$w, bem$x] = createNamespace("empty");
|
8926
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8927
|
-
const emptyProps = {
|
8928
|
-
image: makeStringProp("default"),
|
8929
|
-
imageSize: numericProp,
|
8930
|
-
description: String
|
8931
|
-
};
|
8932
|
-
var stdin_default$C = vue.defineComponent({
|
8933
|
-
name: name$w,
|
8934
|
-
props: emptyProps,
|
8935
|
-
setup(props, {
|
8936
|
-
slots
|
8937
|
-
}) {
|
8938
|
-
const renderImage = () => {
|
8939
|
-
if (slots.image) {
|
8940
|
-
return slots.image();
|
8941
|
-
}
|
8942
|
-
let {
|
8943
|
-
image
|
8944
|
-
} = props;
|
8945
|
-
if (image === "network") {
|
8946
|
-
return Network;
|
8947
|
-
}
|
8948
|
-
if (PRESET_IMAGES.includes(image)) {
|
8949
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8950
|
-
}
|
8951
|
-
return vue.createVNode("img", {
|
8952
|
-
"src": image
|
8953
|
-
}, null);
|
8954
|
-
};
|
8955
|
-
const renderDescription = () => {
|
8956
|
-
const description = slots.description ? slots.description() : props.description;
|
8957
|
-
if (description) {
|
8958
|
-
return vue.createVNode("p", {
|
8959
|
-
"class": bem$x("description")
|
8960
|
-
}, [description]);
|
8961
|
-
}
|
8962
|
-
};
|
8963
|
-
const renderBottom = () => {
|
8964
|
-
if (slots.default) {
|
8965
|
-
return vue.createVNode("div", {
|
8966
|
-
"class": bem$x("bottom")
|
8967
|
-
}, [slots.default()]);
|
8968
|
-
}
|
8969
|
-
};
|
8970
|
-
return () => vue.createVNode("div", {
|
8971
|
-
"class": bem$x()
|
8972
|
-
}, [vue.createVNode("div", {
|
8973
|
-
"class": bem$x("image"),
|
8974
|
-
"style": getSizeStyle(props.imageSize)
|
8975
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8976
|
-
}
|
8977
|
-
});
|
8978
|
-
const Empty = withInstall(stdin_default$C);
|
8984
|
+
const DropdownItem = withInstall(stdin_default$C);
|
8985
|
+
const DropdownMenu = withInstall(stdin_default$D);
|
8979
8986
|
const [name$v, bem$w] = createNamespace("grid");
|
8980
8987
|
const gridProps = {
|
8981
8988
|
square: Boolean,
|
@@ -9629,6 +9636,7 @@ var stdin_default$x = vue.defineComponent({
|
|
9629
9636
|
children,
|
9630
9637
|
linkChildren
|
9631
9638
|
} = use.useChildren(INDEX_BAR_KEY);
|
9639
|
+
let selectActiveIndex;
|
9632
9640
|
linkChildren({
|
9633
9641
|
props
|
9634
9642
|
});
|
@@ -9656,6 +9664,7 @@ var stdin_default$x = vue.defineComponent({
|
|
9656
9664
|
}
|
9657
9665
|
return -1;
|
9658
9666
|
};
|
9667
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9659
9668
|
const onScroll = () => {
|
9660
9669
|
if (isHidden(root)) {
|
9661
9670
|
return;
|
@@ -9667,7 +9676,16 @@ var stdin_default$x = vue.defineComponent({
|
|
9667
9676
|
const scrollTop = getScrollTop(scrollParent.value);
|
9668
9677
|
const scrollParentRect = use.useRect(scrollParent);
|
9669
9678
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9670
|
-
|
9679
|
+
let active = -1;
|
9680
|
+
if (selectActiveIndex) {
|
9681
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9682
|
+
if (match) {
|
9683
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
9684
|
+
active = getActiveAnchor(rect.top, rects);
|
9685
|
+
}
|
9686
|
+
} else {
|
9687
|
+
active = getActiveAnchor(scrollTop, rects);
|
9688
|
+
}
|
9671
9689
|
activeAnchor.value = indexList[active];
|
9672
9690
|
if (sticky) {
|
9673
9691
|
children.forEach((item, index) => {
|
@@ -9686,7 +9704,7 @@ var stdin_default$x = vue.defineComponent({
|
|
9686
9704
|
if (index === active) {
|
9687
9705
|
state.active = true;
|
9688
9706
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
9689
|
-
} else if (index === active - 1) {
|
9707
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
9690
9708
|
const activeItemTop = rects[active].top - scrollTop;
|
9691
9709
|
state.active = activeItemTop > 0;
|
9692
9710
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -9695,6 +9713,7 @@ var stdin_default$x = vue.defineComponent({
|
|
9695
9713
|
}
|
9696
9714
|
});
|
9697
9715
|
}
|
9716
|
+
selectActiveIndex = "";
|
9698
9717
|
};
|
9699
9718
|
const init = () => {
|
9700
9719
|
vue.nextTick(onScroll);
|
@@ -9720,9 +9739,18 @@ var stdin_default$x = vue.defineComponent({
|
|
9720
9739
|
}, [index]);
|
9721
9740
|
});
|
9722
9741
|
const scrollTo = (index) => {
|
9723
|
-
|
9724
|
-
const match =
|
9742
|
+
selectActiveIndex = String(index);
|
9743
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9725
9744
|
if (match) {
|
9745
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
9746
|
+
const scrollParentRect = use.useRect(scrollParent);
|
9747
|
+
const {
|
9748
|
+
offsetHeight
|
9749
|
+
} = document.documentElement;
|
9750
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
9751
|
+
onScroll();
|
9752
|
+
return;
|
9753
|
+
}
|
9726
9754
|
match.$el.scrollIntoView();
|
9727
9755
|
if (props.sticky && props.stickyOffsetTop) {
|
9728
9756
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -10448,6 +10476,15 @@ const numberKeyboardProps = {
|
|
10448
10476
|
default: ""
|
10449
10477
|
}
|
10450
10478
|
};
|
10479
|
+
function shuffle(array) {
|
10480
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10481
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10482
|
+
const temp = array[i];
|
10483
|
+
array[i] = array[j];
|
10484
|
+
array[j] = temp;
|
10485
|
+
}
|
10486
|
+
return array;
|
10487
|
+
}
|
10451
10488
|
var stdin_default$q = vue.defineComponent({
|
10452
10489
|
name: name$l,
|
10453
10490
|
props: numberKeyboardProps,
|
@@ -10462,7 +10499,7 @@ var stdin_default$q = vue.defineComponent({
|
|
10462
10499
|
text: i + 1
|
10463
10500
|
}));
|
10464
10501
|
if (props.randomKeyOrder) {
|
10465
|
-
keys2
|
10502
|
+
shuffle(keys2);
|
10466
10503
|
}
|
10467
10504
|
return keys2;
|
10468
10505
|
};
|
@@ -13080,7 +13117,7 @@ var stdin_default$5 = vue.defineComponent({
|
|
13080
13117
|
imageFit: String,
|
13081
13118
|
lazyLoad: Boolean,
|
13082
13119
|
deletable: Boolean,
|
13083
|
-
previewSize:
|
13120
|
+
previewSize: [Number, String, Array],
|
13084
13121
|
beforeDelete: Function
|
13085
13122
|
},
|
13086
13123
|
emits: ["delete", "preview"],
|
@@ -13154,16 +13191,19 @@ var stdin_default$5 = vue.defineComponent({
|
|
13154
13191
|
};
|
13155
13192
|
const renderPreview = () => {
|
13156
13193
|
const {
|
13157
|
-
item
|
13194
|
+
item,
|
13195
|
+
lazyLoad,
|
13196
|
+
imageFit,
|
13197
|
+
previewSize
|
13158
13198
|
} = props;
|
13159
13199
|
if (isImageFile(item)) {
|
13160
13200
|
return vue.createVNode(Image$1, {
|
13161
|
-
"fit":
|
13201
|
+
"fit": imageFit,
|
13162
13202
|
"src": item.content || item.url,
|
13163
13203
|
"class": bem("preview-image"),
|
13164
|
-
"width":
|
13165
|
-
"height":
|
13166
|
-
"lazyLoad":
|
13204
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
13205
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
13206
|
+
"lazyLoad": lazyLoad,
|
13167
13207
|
"onClick": onPreview
|
13168
13208
|
}, {
|
13169
13209
|
default: renderCover
|
@@ -13203,7 +13243,7 @@ const uploaderProps = {
|
|
13203
13243
|
modelValue: makeArrayProp(),
|
13204
13244
|
beforeRead: Function,
|
13205
13245
|
beforeDelete: Function,
|
13206
|
-
previewSize:
|
13246
|
+
previewSize: [Number, String, Array],
|
13207
13247
|
previewImage: truthProp,
|
13208
13248
|
previewOptions: Object,
|
13209
13249
|
previewFullImage: truthProp,
|
@@ -14270,7 +14310,7 @@ const Lazyload = {
|
|
14270
14310
|
});
|
14271
14311
|
}
|
14272
14312
|
};
|
14273
|
-
const version = "3.4.
|
14313
|
+
const version = "3.4.7";
|
14274
14314
|
function install(app) {
|
14275
14315
|
const components = [
|
14276
14316
|
ActionBar,
|