vant 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/address-edit/AddressEdit.mjs +1 -0
- package/es/area/Area.d.ts +6 -8
- package/es/area/Area.mjs +1 -1
- package/es/area/index.d.ts +4 -6
- package/es/back-top/BackTop.d.ts +1 -1
- package/es/back-top/BackTop.mjs +6 -3
- package/es/back-top/index.css +1 -1
- package/es/back-top/index.d.ts +1 -1
- package/es/barrage/Barrage.d.ts +93 -0
- package/es/barrage/Barrage.mjs +134 -0
- package/es/barrage/index.css +1 -0
- package/es/barrage/index.d.ts +69 -0
- package/es/barrage/index.mjs +10 -0
- package/es/barrage/style/index.d.ts +1 -0
- package/es/barrage/style/index.mjs +2 -0
- package/es/barrage/types.d.ts +7 -0
- package/es/barrage/types.mjs +0 -0
- package/es/cascader/Cascader.mjs +14 -0
- package/es/checkbox/Checker.d.ts +2 -0
- package/es/checkbox/Checker.mjs +13 -1
- package/es/contact-list/ContactList.mjs +1 -1
- package/es/contact-list/index.css +1 -1
- package/es/date-picker/DatePicker.mjs +5 -2
- package/es/date-picker/utils.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/divider/Divider.d.ts +4 -0
- package/es/divider/Divider.mjs +4 -2
- package/es/divider/index.css +1 -1
- package/es/divider/index.d.ts +3 -0
- package/es/field/Field.mjs +4 -0
- package/es/image-preview/ImagePreviewItem.mjs +60 -26
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/picker-group/PickerGroup.d.ts +15 -1
- package/es/picker-group/PickerGroup.mjs +8 -6
- package/es/picker-group/index.d.ts +11 -1
- package/es/signature/Signature.d.ts +13 -0
- package/es/signature/Signature.mjs +24 -8
- package/es/signature/index.css +1 -1
- package/es/signature/index.d.ts +9 -0
- package/es/step/index.css +1 -1
- package/es/submit-bar/index.css +1 -1
- package/es/tabs/Tabs.mjs +8 -2
- package/es/tabs/utils.d.ts +2 -2
- package/es/tabs/utils.mjs +14 -4
- package/es/uploader/Uploader.d.ts +6 -1
- package/es/uploader/Uploader.mjs +25 -10
- package/es/uploader/UploaderPreviewItem.d.ts +5 -1
- package/es/uploader/UploaderPreviewItem.mjs +6 -3
- package/es/uploader/index.d.ts +5 -1
- package/es/uploader/types.d.ts +1 -0
- package/lib/address-edit/AddressEdit.js +1 -0
- package/lib/area/Area.d.ts +6 -8
- package/lib/area/Area.js +1 -1
- package/lib/area/index.d.ts +4 -6
- package/lib/back-top/BackTop.d.ts +1 -1
- package/lib/back-top/BackTop.js +6 -3
- package/lib/back-top/index.css +1 -1
- package/lib/back-top/index.d.ts +1 -1
- package/lib/barrage/Barrage.d.ts +93 -0
- package/lib/barrage/Barrage.js +153 -0
- package/lib/barrage/index.css +1 -0
- package/lib/barrage/index.d.ts +69 -0
- package/lib/barrage/index.js +39 -0
- package/lib/barrage/style/index.d.ts +1 -0
- package/lib/barrage/style/index.js +2 -0
- package/lib/barrage/types.d.ts +7 -0
- package/lib/barrage/types.js +15 -0
- package/lib/cascader/Cascader.js +14 -0
- package/lib/checkbox/Checker.d.ts +2 -0
- package/lib/checkbox/Checker.js +13 -1
- package/lib/contact-list/ContactList.js +1 -1
- package/lib/contact-list/index.css +1 -1
- package/lib/date-picker/DatePicker.js +5 -2
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/divider/Divider.d.ts +4 -0
- package/lib/divider/Divider.js +4 -2
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.d.ts +3 -0
- package/lib/field/Field.js +4 -0
- package/lib/image-preview/ImagePreviewItem.js +59 -25
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/picker-group/PickerGroup.d.ts +15 -1
- package/lib/picker-group/PickerGroup.js +6 -4
- package/lib/picker-group/index.d.ts +11 -1
- package/lib/signature/Signature.d.ts +13 -0
- package/lib/signature/Signature.js +23 -7
- package/lib/signature/index.css +1 -1
- package/lib/signature/index.d.ts +9 -0
- package/lib/step/index.css +1 -1
- package/lib/submit-bar/index.css +1 -1
- package/lib/tabs/Tabs.js +8 -2
- package/lib/tabs/utils.d.ts +2 -2
- package/lib/tabs/utils.js +13 -3
- package/lib/uploader/Uploader.d.ts +6 -1
- package/lib/uploader/Uploader.js +25 -10
- package/lib/uploader/UploaderPreviewItem.d.ts +5 -1
- package/lib/uploader/UploaderPreviewItem.js +6 -3
- package/lib/uploader/index.d.ts +5 -1
- package/lib/uploader/types.d.ts +1 -0
- package/lib/vant.cjs.js +611 -358
- package/lib/vant.es.js +612 -359
- package/lib/vant.js +611 -358
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/lib/vant.js
CHANGED
@@ -626,7 +626,7 @@
|
|
626
626
|
});
|
627
627
|
return to;
|
628
628
|
}
|
629
|
-
var stdin_default$
|
629
|
+
var stdin_default$1Q = {
|
630
630
|
name: "姓名",
|
631
631
|
tel: "电话",
|
632
632
|
save: "保存",
|
@@ -690,7 +690,7 @@
|
|
690
690
|
};
|
691
691
|
const lang = vue.ref("zh-CN");
|
692
692
|
const messages = vue.reactive({
|
693
|
-
"zh-CN": stdin_default$
|
693
|
+
"zh-CN": stdin_default$1Q
|
694
694
|
});
|
695
695
|
const Locale = {
|
696
696
|
messages() {
|
@@ -705,11 +705,11 @@
|
|
705
705
|
}
|
706
706
|
};
|
707
707
|
const useCurrentLang = () => lang;
|
708
|
-
var stdin_default$
|
708
|
+
var stdin_default$1P = Locale;
|
709
709
|
function createTranslate(name2) {
|
710
710
|
const prefix = camelize(name2) + ".";
|
711
711
|
return (path, ...args) => {
|
712
|
-
const messages2 = stdin_default$
|
712
|
+
const messages2 = stdin_default$1P.messages();
|
713
713
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
714
714
|
return isFunction(message) ? message(...args) : message;
|
715
715
|
};
|
@@ -831,20 +831,20 @@
|
|
831
831
|
}
|
832
832
|
}, [renderContent()]);
|
833
833
|
}
|
834
|
-
const [name$
|
835
|
-
const ACTION_BAR_KEY = Symbol(name$
|
834
|
+
const [name$1F, bem$1A] = createNamespace("action-bar");
|
835
|
+
const ACTION_BAR_KEY = Symbol(name$1F);
|
836
836
|
const actionBarProps = {
|
837
837
|
placeholder: Boolean,
|
838
838
|
safeAreaInsetBottom: truthProp
|
839
839
|
};
|
840
|
-
var stdin_default$
|
841
|
-
name: name$
|
840
|
+
var stdin_default$1O = vue.defineComponent({
|
841
|
+
name: name$1F,
|
842
842
|
props: actionBarProps,
|
843
843
|
setup(props, {
|
844
844
|
slots
|
845
845
|
}) {
|
846
846
|
const root = vue.ref();
|
847
|
-
const renderPlaceholder = usePlaceholder(root, bem$
|
847
|
+
const renderPlaceholder = usePlaceholder(root, bem$1A);
|
848
848
|
const {
|
849
849
|
linkChildren
|
850
850
|
} = useChildren(ACTION_BAR_KEY);
|
@@ -853,7 +853,7 @@
|
|
853
853
|
var _a;
|
854
854
|
return vue.createVNode("div", {
|
855
855
|
"ref": root,
|
856
|
-
"class": [bem$
|
856
|
+
"class": [bem$1A(), {
|
857
857
|
"van-safe-area-bottom": props.safeAreaInsetBottom
|
858
858
|
}]
|
859
859
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
@@ -866,7 +866,7 @@
|
|
866
866
|
};
|
867
867
|
}
|
868
868
|
});
|
869
|
-
const ActionBar = withInstall(stdin_default$
|
869
|
+
const ActionBar = withInstall(stdin_default$1O);
|
870
870
|
function useExpose(apis) {
|
871
871
|
const instance2 = vue.getCurrentInstance();
|
872
872
|
if (instance2) {
|
@@ -894,7 +894,7 @@
|
|
894
894
|
const vm = vue.getCurrentInstance().proxy;
|
895
895
|
return () => route(vm);
|
896
896
|
}
|
897
|
-
const [name$
|
897
|
+
const [name$1E, bem$1z] = createNamespace("badge");
|
898
898
|
const badgeProps = {
|
899
899
|
dot: Boolean,
|
900
900
|
max: numericProp,
|
@@ -905,8 +905,8 @@
|
|
905
905
|
showZero: truthProp,
|
906
906
|
position: makeStringProp("top-right")
|
907
907
|
};
|
908
|
-
var stdin_default$
|
909
|
-
name: name$
|
908
|
+
var stdin_default$1N = vue.defineComponent({
|
909
|
+
name: name$1E,
|
910
910
|
props: badgeProps,
|
911
911
|
setup(props, {
|
912
912
|
slots
|
@@ -969,7 +969,7 @@
|
|
969
969
|
const renderBadge = () => {
|
970
970
|
if (hasContent() || props.dot) {
|
971
971
|
return vue.createVNode("div", {
|
972
|
-
"class": bem$
|
972
|
+
"class": bem$1z([props.position, {
|
973
973
|
dot: props.dot,
|
974
974
|
fixed: !!slots.default
|
975
975
|
}]),
|
@@ -983,7 +983,7 @@
|
|
983
983
|
tag
|
984
984
|
} = props;
|
985
985
|
return vue.createVNode(tag, {
|
986
|
-
"class": bem$
|
986
|
+
"class": bem$1z("wrapper")
|
987
987
|
}, {
|
988
988
|
default: () => [slots.default(), renderBadge()]
|
989
989
|
});
|
@@ -992,14 +992,14 @@
|
|
992
992
|
};
|
993
993
|
}
|
994
994
|
});
|
995
|
-
const Badge = withInstall(stdin_default$
|
995
|
+
const Badge = withInstall(stdin_default$1N);
|
996
996
|
let globalZIndex = 2e3;
|
997
997
|
const useGlobalZIndex = () => ++globalZIndex;
|
998
998
|
const setGlobalZIndex = (val) => {
|
999
999
|
globalZIndex = val;
|
1000
1000
|
};
|
1001
|
-
const [name$
|
1002
|
-
const CONFIG_PROVIDER_KEY = Symbol(name$
|
1001
|
+
const [name$1D, bem$1y] = createNamespace("config-provider");
|
1002
|
+
const CONFIG_PROVIDER_KEY = Symbol(name$1D);
|
1003
1003
|
const configProviderProps = {
|
1004
1004
|
tag: makeStringProp("div"),
|
1005
1005
|
theme: makeStringProp("light"),
|
@@ -1016,8 +1016,8 @@
|
|
1016
1016
|
});
|
1017
1017
|
return cssVars;
|
1018
1018
|
}
|
1019
|
-
var stdin_default$
|
1020
|
-
name: name$
|
1019
|
+
var stdin_default$1M = vue.defineComponent({
|
1020
|
+
name: name$1D,
|
1021
1021
|
props: configProviderProps,
|
1022
1022
|
setup(props, {
|
1023
1023
|
slots
|
@@ -1049,7 +1049,7 @@
|
|
1049
1049
|
}
|
1050
1050
|
});
|
1051
1051
|
return () => vue.createVNode(props.tag, {
|
1052
|
-
"class": bem$
|
1052
|
+
"class": bem$1y(),
|
1053
1053
|
"style": style.value
|
1054
1054
|
}, {
|
1055
1055
|
default: () => {
|
@@ -1059,7 +1059,7 @@
|
|
1059
1059
|
});
|
1060
1060
|
}
|
1061
1061
|
});
|
1062
|
-
const [name$
|
1062
|
+
const [name$1C, bem$1x] = createNamespace("icon");
|
1063
1063
|
const isImage$1 = (name2) => name2 == null ? void 0 : name2.includes("/");
|
1064
1064
|
const iconProps = {
|
1065
1065
|
dot: Boolean,
|
@@ -1071,14 +1071,14 @@
|
|
1071
1071
|
badgeProps: Object,
|
1072
1072
|
classPrefix: String
|
1073
1073
|
};
|
1074
|
-
var stdin_default$
|
1075
|
-
name: name$
|
1074
|
+
var stdin_default$1L = vue.defineComponent({
|
1075
|
+
name: name$1C,
|
1076
1076
|
props: iconProps,
|
1077
1077
|
setup(props, {
|
1078
1078
|
slots
|
1079
1079
|
}) {
|
1080
1080
|
const config = vue.inject(CONFIG_PROVIDER_KEY, null);
|
1081
|
-
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$
|
1081
|
+
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$1x());
|
1082
1082
|
return () => {
|
1083
1083
|
const {
|
1084
1084
|
tag,
|
@@ -1102,7 +1102,7 @@
|
|
1102
1102
|
default: () => {
|
1103
1103
|
var _a;
|
1104
1104
|
return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && vue.createVNode("img", {
|
1105
|
-
"class": bem$
|
1105
|
+
"class": bem$1x("image"),
|
1106
1106
|
"src": name2
|
1107
1107
|
}, null)];
|
1108
1108
|
}
|
@@ -1110,13 +1110,13 @@
|
|
1110
1110
|
};
|
1111
1111
|
}
|
1112
1112
|
});
|
1113
|
-
const Icon = withInstall(stdin_default$
|
1114
|
-
const [name$
|
1113
|
+
const Icon = withInstall(stdin_default$1L);
|
1114
|
+
const [name$1B, bem$1w] = createNamespace("loading");
|
1115
1115
|
const SpinIcon = Array(12).fill(null).map((_, index) => vue.createVNode("i", {
|
1116
|
-
"class": bem$
|
1116
|
+
"class": bem$1w("line", String(index + 1))
|
1117
1117
|
}, null));
|
1118
1118
|
const CircularIcon = vue.createVNode("svg", {
|
1119
|
-
"class": bem$
|
1119
|
+
"class": bem$1w("circular"),
|
1120
1120
|
"viewBox": "25 25 50 50"
|
1121
1121
|
}, [vue.createVNode("circle", {
|
1122
1122
|
"cx": "50",
|
@@ -1132,8 +1132,8 @@
|
|
1132
1132
|
textSize: numericProp,
|
1133
1133
|
textColor: String
|
1134
1134
|
};
|
1135
|
-
var stdin_default$
|
1136
|
-
name: name$
|
1135
|
+
var stdin_default$1K = vue.defineComponent({
|
1136
|
+
name: name$1B,
|
1137
1137
|
props: loadingProps,
|
1138
1138
|
setup(props, {
|
1139
1139
|
slots
|
@@ -1144,7 +1144,7 @@
|
|
1144
1144
|
const renderIcon = () => {
|
1145
1145
|
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
1146
1146
|
return vue.createVNode("span", {
|
1147
|
-
"class": bem$
|
1147
|
+
"class": bem$1w("spinner", props.type),
|
1148
1148
|
"style": spinnerStyle.value
|
1149
1149
|
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
1150
1150
|
};
|
@@ -1152,7 +1152,7 @@
|
|
1152
1152
|
var _a;
|
1153
1153
|
if (slots.default) {
|
1154
1154
|
return vue.createVNode("span", {
|
1155
|
-
"class": bem$
|
1155
|
+
"class": bem$1w("text"),
|
1156
1156
|
"style": {
|
1157
1157
|
fontSize: addUnit(props.textSize),
|
1158
1158
|
color: (_a = props.textColor) != null ? _a : props.color
|
@@ -1166,7 +1166,7 @@
|
|
1166
1166
|
vertical
|
1167
1167
|
} = props;
|
1168
1168
|
return vue.createVNode("div", {
|
1169
|
-
"class": bem$
|
1169
|
+
"class": bem$1w([type, {
|
1170
1170
|
vertical
|
1171
1171
|
}]),
|
1172
1172
|
"aria-live": "polite",
|
@@ -1175,8 +1175,8 @@
|
|
1175
1175
|
};
|
1176
1176
|
}
|
1177
1177
|
});
|
1178
|
-
const Loading = withInstall(stdin_default$
|
1179
|
-
const [name$
|
1178
|
+
const Loading = withInstall(stdin_default$1K);
|
1179
|
+
const [name$1A, bem$1v] = createNamespace("button");
|
1180
1180
|
const buttonProps = extend({}, routeProps, {
|
1181
1181
|
tag: makeStringProp("button"),
|
1182
1182
|
text: String,
|
@@ -1198,8 +1198,8 @@
|
|
1198
1198
|
loadingType: String,
|
1199
1199
|
iconPosition: makeStringProp("left")
|
1200
1200
|
});
|
1201
|
-
var stdin_default$
|
1202
|
-
name: name$
|
1201
|
+
var stdin_default$1J = vue.defineComponent({
|
1202
|
+
name: name$1A,
|
1203
1203
|
props: buttonProps,
|
1204
1204
|
emits: ["click"],
|
1205
1205
|
setup(props, {
|
@@ -1214,7 +1214,7 @@
|
|
1214
1214
|
return vue.createVNode(Loading, {
|
1215
1215
|
"size": props.loadingSize,
|
1216
1216
|
"type": props.loadingType,
|
1217
|
-
"class": bem$
|
1217
|
+
"class": bem$1v("loading")
|
1218
1218
|
}, null);
|
1219
1219
|
};
|
1220
1220
|
const renderIcon = () => {
|
@@ -1223,13 +1223,13 @@
|
|
1223
1223
|
}
|
1224
1224
|
if (slots.icon) {
|
1225
1225
|
return vue.createVNode("div", {
|
1226
|
-
"class": bem$
|
1226
|
+
"class": bem$1v("icon")
|
1227
1227
|
}, [slots.icon()]);
|
1228
1228
|
}
|
1229
1229
|
if (props.icon) {
|
1230
1230
|
return vue.createVNode(Icon, {
|
1231
1231
|
"name": props.icon,
|
1232
|
-
"class": bem$
|
1232
|
+
"class": bem$1v("icon"),
|
1233
1233
|
"classPrefix": props.iconPrefix
|
1234
1234
|
}, null);
|
1235
1235
|
}
|
@@ -1243,7 +1243,7 @@
|
|
1243
1243
|
}
|
1244
1244
|
if (text) {
|
1245
1245
|
return vue.createVNode("span", {
|
1246
|
-
"class": bem$
|
1246
|
+
"class": bem$1v("text")
|
1247
1247
|
}, [text]);
|
1248
1248
|
}
|
1249
1249
|
};
|
@@ -1290,7 +1290,7 @@
|
|
1290
1290
|
nativeType,
|
1291
1291
|
iconPosition
|
1292
1292
|
} = props;
|
1293
|
-
const classes = [bem$
|
1293
|
+
const classes = [bem$1v([type, size, {
|
1294
1294
|
plain,
|
1295
1295
|
block,
|
1296
1296
|
round: round2,
|
@@ -1309,14 +1309,14 @@
|
|
1309
1309
|
"onClick": onClick
|
1310
1310
|
}, {
|
1311
1311
|
default: () => [vue.createVNode("div", {
|
1312
|
-
"class": bem$
|
1312
|
+
"class": bem$1v("content")
|
1313
1313
|
}, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
|
1314
1314
|
});
|
1315
1315
|
};
|
1316
1316
|
}
|
1317
1317
|
});
|
1318
|
-
const Button = withInstall(stdin_default$
|
1319
|
-
const [name$
|
1318
|
+
const Button = withInstall(stdin_default$1J);
|
1319
|
+
const [name$1z, bem$1u] = createNamespace("action-bar-button");
|
1320
1320
|
const actionBarButtonProps = extend({}, routeProps, {
|
1321
1321
|
type: String,
|
1322
1322
|
text: String,
|
@@ -1325,8 +1325,8 @@
|
|
1325
1325
|
loading: Boolean,
|
1326
1326
|
disabled: Boolean
|
1327
1327
|
});
|
1328
|
-
var stdin_default$
|
1329
|
-
name: name$
|
1328
|
+
var stdin_default$1I = vue.defineComponent({
|
1329
|
+
name: name$1z,
|
1330
1330
|
props: actionBarButtonProps,
|
1331
1331
|
setup(props, {
|
1332
1332
|
slots
|
@@ -1361,7 +1361,7 @@
|
|
1361
1361
|
disabled
|
1362
1362
|
} = props;
|
1363
1363
|
return vue.createVNode(Button, {
|
1364
|
-
"class": bem$
|
1364
|
+
"class": bem$1u([type, {
|
1365
1365
|
last: isLast.value,
|
1366
1366
|
first: isFirst.value
|
1367
1367
|
}]),
|
@@ -1378,8 +1378,8 @@
|
|
1378
1378
|
};
|
1379
1379
|
}
|
1380
1380
|
});
|
1381
|
-
const ActionBarButton = withInstall(stdin_default$
|
1382
|
-
const [name$
|
1381
|
+
const ActionBarButton = withInstall(stdin_default$1I);
|
1382
|
+
const [name$1y, bem$1t] = createNamespace("action-bar-icon");
|
1383
1383
|
const actionBarIconProps = extend({}, routeProps, {
|
1384
1384
|
dot: Boolean,
|
1385
1385
|
text: String,
|
@@ -1390,8 +1390,8 @@
|
|
1390
1390
|
badgeProps: Object,
|
1391
1391
|
iconPrefix: String
|
1392
1392
|
});
|
1393
|
-
var stdin_default$
|
1394
|
-
name: name$
|
1393
|
+
var stdin_default$1H = vue.defineComponent({
|
1394
|
+
name: name$1y,
|
1395
1395
|
props: actionBarIconProps,
|
1396
1396
|
setup(props, {
|
1397
1397
|
slots
|
@@ -1411,7 +1411,7 @@
|
|
1411
1411
|
if (slots.icon) {
|
1412
1412
|
return vue.createVNode(Badge, vue.mergeProps({
|
1413
1413
|
"dot": dot,
|
1414
|
-
"class": bem$
|
1414
|
+
"class": bem$1t("icon"),
|
1415
1415
|
"content": badge
|
1416
1416
|
}, badgeProps2), {
|
1417
1417
|
default: slots.icon
|
@@ -1423,20 +1423,20 @@
|
|
1423
1423
|
"name": icon,
|
1424
1424
|
"badge": badge,
|
1425
1425
|
"color": color,
|
1426
|
-
"class": [bem$
|
1426
|
+
"class": [bem$1t("icon"), iconClass],
|
1427
1427
|
"badgeProps": badgeProps2,
|
1428
1428
|
"classPrefix": iconPrefix
|
1429
1429
|
}, null);
|
1430
1430
|
};
|
1431
1431
|
return () => vue.createVNode("div", {
|
1432
1432
|
"role": "button",
|
1433
|
-
"class": bem$
|
1433
|
+
"class": bem$1t(),
|
1434
1434
|
"tabindex": 0,
|
1435
1435
|
"onClick": route2
|
1436
1436
|
}, [renderIcon(), slots.default ? slots.default() : props.text]);
|
1437
1437
|
}
|
1438
1438
|
});
|
1439
|
-
const ActionBarIcon = withInstall(stdin_default$
|
1439
|
+
const ActionBarIcon = withInstall(stdin_default$1H);
|
1440
1440
|
const popupSharedProps = {
|
1441
1441
|
// whether to show popup
|
1442
1442
|
show: Boolean,
|
@@ -1587,7 +1587,7 @@
|
|
1587
1587
|
);
|
1588
1588
|
return (render) => () => inited.value ? render() : null;
|
1589
1589
|
}
|
1590
|
-
const [name$
|
1590
|
+
const [name$1x, bem$1s] = createNamespace("overlay");
|
1591
1591
|
const overlayProps = {
|
1592
1592
|
show: Boolean,
|
1593
1593
|
zIndex: numericProp,
|
@@ -1597,8 +1597,8 @@
|
|
1597
1597
|
lazyRender: truthProp,
|
1598
1598
|
customStyle: Object
|
1599
1599
|
};
|
1600
|
-
var stdin_default$
|
1601
|
-
name: name$
|
1600
|
+
var stdin_default$1G = vue.defineComponent({
|
1601
|
+
name: name$1x,
|
1602
1602
|
props: overlayProps,
|
1603
1603
|
setup(props, {
|
1604
1604
|
slots
|
@@ -1619,7 +1619,7 @@
|
|
1619
1619
|
return vue.withDirectives(vue.createVNode("div", {
|
1620
1620
|
"ref": root,
|
1621
1621
|
"style": style,
|
1622
|
-
"class": [bem$
|
1622
|
+
"class": [bem$1s(), props.className]
|
1623
1623
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props.show]]);
|
1624
1624
|
});
|
1625
1625
|
useEventListener("touchmove", onTouchMove, {
|
@@ -1633,7 +1633,7 @@
|
|
1633
1633
|
});
|
1634
1634
|
}
|
1635
1635
|
});
|
1636
|
-
const Overlay = withInstall(stdin_default$
|
1636
|
+
const Overlay = withInstall(stdin_default$1G);
|
1637
1637
|
const popupProps$2 = extend({}, popupSharedProps, {
|
1638
1638
|
round: Boolean,
|
1639
1639
|
position: makeStringProp("center"),
|
@@ -1646,9 +1646,9 @@
|
|
1646
1646
|
safeAreaInsetTop: Boolean,
|
1647
1647
|
safeAreaInsetBottom: Boolean
|
1648
1648
|
});
|
1649
|
-
const [name$
|
1650
|
-
var stdin_default$
|
1651
|
-
name: name$
|
1649
|
+
const [name$1w, bem$1r] = createNamespace("popup");
|
1650
|
+
var stdin_default$1F = vue.defineComponent({
|
1651
|
+
name: name$1w,
|
1652
1652
|
inheritAttrs: false,
|
1653
1653
|
props: popupProps$2,
|
1654
1654
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
@@ -1722,7 +1722,7 @@
|
|
1722
1722
|
"role": "button",
|
1723
1723
|
"tabindex": 0,
|
1724
1724
|
"name": props.closeIcon,
|
1725
|
-
"class": [bem$
|
1725
|
+
"class": [bem$1r("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
|
1726
1726
|
"classPrefix": props.iconPrefix,
|
1727
1727
|
"onClick": onClickCloseIcon
|
1728
1728
|
}, null);
|
@@ -1744,7 +1744,7 @@
|
|
1744
1744
|
"style": style.value,
|
1745
1745
|
"role": "dialog",
|
1746
1746
|
"tabindex": 0,
|
1747
|
-
"class": [bem$
|
1747
|
+
"class": [bem$1r({
|
1748
1748
|
round: round2,
|
1749
1749
|
[position]: position
|
1750
1750
|
}), {
|
@@ -1825,8 +1825,8 @@
|
|
1825
1825
|
};
|
1826
1826
|
}
|
1827
1827
|
});
|
1828
|
-
const Popup = withInstall(stdin_default$
|
1829
|
-
const [name$
|
1828
|
+
const Popup = withInstall(stdin_default$1F);
|
1829
|
+
const [name$1v, bem$1q] = createNamespace("action-sheet");
|
1830
1830
|
const actionSheetProps = extend({}, popupSharedProps, {
|
1831
1831
|
title: String,
|
1832
1832
|
round: truthProp,
|
@@ -1840,8 +1840,8 @@
|
|
1840
1840
|
safeAreaInsetBottom: truthProp
|
1841
1841
|
});
|
1842
1842
|
const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
1843
|
-
var stdin_default$
|
1844
|
-
name: name$
|
1843
|
+
var stdin_default$1E = vue.defineComponent({
|
1844
|
+
name: name$1v,
|
1845
1845
|
props: actionSheetProps,
|
1846
1846
|
emits: ["select", "cancel", "update:show"],
|
1847
1847
|
setup(props, {
|
@@ -1856,10 +1856,10 @@
|
|
1856
1856
|
const renderHeader = () => {
|
1857
1857
|
if (props.title) {
|
1858
1858
|
return vue.createVNode("div", {
|
1859
|
-
"class": bem$
|
1859
|
+
"class": bem$1q("header")
|
1860
1860
|
}, [props.title, props.closeable && vue.createVNode(Icon, {
|
1861
1861
|
"name": props.closeIcon,
|
1862
|
-
"class": [bem$
|
1862
|
+
"class": [bem$1q("close"), HAPTICS_FEEDBACK],
|
1863
1863
|
"onClick": onCancel
|
1864
1864
|
}, null)]);
|
1865
1865
|
}
|
@@ -1867,10 +1867,10 @@
|
|
1867
1867
|
const renderCancel = () => {
|
1868
1868
|
if (slots.cancel || props.cancelText) {
|
1869
1869
|
return [vue.createVNode("div", {
|
1870
|
-
"class": bem$
|
1870
|
+
"class": bem$1q("gap")
|
1871
1871
|
}, null), vue.createVNode("button", {
|
1872
1872
|
"type": "button",
|
1873
|
-
"class": bem$
|
1873
|
+
"class": bem$1q("cancel"),
|
1874
1874
|
"onClick": onCancel
|
1875
1875
|
}, [slots.cancel ? slots.cancel() : props.cancelText])];
|
1876
1876
|
}
|
@@ -1878,7 +1878,7 @@
|
|
1878
1878
|
const renderActionContent = (action, index) => {
|
1879
1879
|
if (action.loading) {
|
1880
1880
|
return vue.createVNode(Loading, {
|
1881
|
-
"class": bem$
|
1881
|
+
"class": bem$1q("loading-icon")
|
1882
1882
|
}, null);
|
1883
1883
|
}
|
1884
1884
|
if (slots.action) {
|
@@ -1888,9 +1888,9 @@
|
|
1888
1888
|
});
|
1889
1889
|
}
|
1890
1890
|
return [vue.createVNode("span", {
|
1891
|
-
"class": bem$
|
1891
|
+
"class": bem$1q("name")
|
1892
1892
|
}, [action.name]), action.subname && vue.createVNode("div", {
|
1893
|
-
"class": bem$
|
1893
|
+
"class": bem$1q("subname")
|
1894
1894
|
}, [action.subname])];
|
1895
1895
|
};
|
1896
1896
|
const renderAction = (action, index) => {
|
@@ -1918,7 +1918,7 @@
|
|
1918
1918
|
"style": {
|
1919
1919
|
color
|
1920
1920
|
},
|
1921
|
-
"class": [bem$
|
1921
|
+
"class": [bem$1q("item", {
|
1922
1922
|
loading,
|
1923
1923
|
disabled
|
1924
1924
|
}), className],
|
@@ -1929,26 +1929,26 @@
|
|
1929
1929
|
if (props.description || slots.description) {
|
1930
1930
|
const content = slots.description ? slots.description() : props.description;
|
1931
1931
|
return vue.createVNode("div", {
|
1932
|
-
"class": bem$
|
1932
|
+
"class": bem$1q("description")
|
1933
1933
|
}, [content]);
|
1934
1934
|
}
|
1935
1935
|
};
|
1936
1936
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
1937
|
-
"class": bem$
|
1937
|
+
"class": bem$1q(),
|
1938
1938
|
"position": "bottom",
|
1939
1939
|
"onUpdate:show": updateShow
|
1940
1940
|
}, pick(props, popupInheritKeys$2)), {
|
1941
1941
|
default: () => {
|
1942
1942
|
var _a;
|
1943
1943
|
return [renderHeader(), renderDescription(), vue.createVNode("div", {
|
1944
|
-
"class": bem$
|
1944
|
+
"class": bem$1q("content")
|
1945
1945
|
}, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
|
1946
1946
|
}
|
1947
1947
|
});
|
1948
1948
|
}
|
1949
1949
|
});
|
1950
|
-
const ActionSheet = withInstall(stdin_default$
|
1951
|
-
const [name$
|
1950
|
+
const ActionSheet = withInstall(stdin_default$1E);
|
1951
|
+
const [name$1u, bem$1p, t$k] = createNamespace("picker");
|
1952
1952
|
const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
|
1953
1953
|
function getColumnsType(columns, fields) {
|
1954
1954
|
const firstColumn = columns[0];
|
@@ -2017,10 +2017,10 @@
|
|
2017
2017
|
const DEFAULT_DURATION = 200;
|
2018
2018
|
const MOMENTUM_TIME = 300;
|
2019
2019
|
const MOMENTUM_DISTANCE = 15;
|
2020
|
-
const [name$
|
2021
|
-
const PICKER_KEY = Symbol(name$
|
2022
|
-
var stdin_default$
|
2023
|
-
name: name$
|
2020
|
+
const [name$1t, bem$1o] = createNamespace("picker-column");
|
2021
|
+
const PICKER_KEY = Symbol(name$1t);
|
2022
|
+
var stdin_default$1D = vue.defineComponent({
|
2023
|
+
name: name$1t,
|
2024
2024
|
props: {
|
2025
2025
|
value: numericProp,
|
2026
2026
|
fields: makeRequiredProp(Object),
|
@@ -2159,7 +2159,7 @@
|
|
2159
2159
|
role: "button",
|
2160
2160
|
style: optionStyle,
|
2161
2161
|
tabindex: disabled ? -1 : 0,
|
2162
|
-
class: [bem$
|
2162
|
+
class: [bem$1o("item", {
|
2163
2163
|
disabled,
|
2164
2164
|
selected: value === props.value
|
2165
2165
|
}), option.className],
|
@@ -2187,7 +2187,7 @@
|
|
2187
2187
|
});
|
2188
2188
|
return () => vue.createVNode("div", {
|
2189
2189
|
"ref": root,
|
2190
|
-
"class": bem$
|
2190
|
+
"class": bem$1o(),
|
2191
2191
|
"onTouchstartPassive": onTouchStart,
|
2192
2192
|
"onTouchend": onTouchEnd,
|
2193
2193
|
"onTouchcancel": onTouchEnd
|
@@ -2198,12 +2198,12 @@
|
|
2198
2198
|
transitionDuration: `${currentDuration.value}ms`,
|
2199
2199
|
transitionProperty: currentDuration.value ? "all" : "none"
|
2200
2200
|
},
|
2201
|
-
"class": bem$
|
2201
|
+
"class": bem$1o("wrapper"),
|
2202
2202
|
"onTransitionend": stopMomentum
|
2203
2203
|
}, [renderOptions()])]);
|
2204
2204
|
}
|
2205
2205
|
});
|
2206
|
-
const [name$
|
2206
|
+
const [name$1s] = createNamespace("picker-toolbar");
|
2207
2207
|
const pickerToolbarProps = {
|
2208
2208
|
title: String,
|
2209
2209
|
cancelButtonText: String,
|
@@ -2211,8 +2211,8 @@
|
|
2211
2211
|
};
|
2212
2212
|
const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
|
2213
2213
|
const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
|
2214
|
-
var stdin_default$
|
2215
|
-
name: name$
|
2214
|
+
var stdin_default$1C = vue.defineComponent({
|
2215
|
+
name: name$1s,
|
2216
2216
|
props: pickerToolbarProps,
|
2217
2217
|
emits: ["confirm", "cancel"],
|
2218
2218
|
setup(props, {
|
@@ -2225,7 +2225,7 @@
|
|
2225
2225
|
}
|
2226
2226
|
if (props.title) {
|
2227
2227
|
return vue.createVNode("div", {
|
2228
|
-
"class": [bem$
|
2228
|
+
"class": [bem$1p("title"), "van-ellipsis"]
|
2229
2229
|
}, [props.title]);
|
2230
2230
|
}
|
2231
2231
|
};
|
@@ -2235,7 +2235,7 @@
|
|
2235
2235
|
const text = props.cancelButtonText || t$k("cancel");
|
2236
2236
|
return vue.createVNode("button", {
|
2237
2237
|
"type": "button",
|
2238
|
-
"class": [bem$
|
2238
|
+
"class": [bem$1p("cancel"), HAPTICS_FEEDBACK],
|
2239
2239
|
"onClick": onCancel
|
2240
2240
|
}, [slots.cancel ? slots.cancel() : text]);
|
2241
2241
|
};
|
@@ -2243,32 +2243,55 @@
|
|
2243
2243
|
const text = props.confirmButtonText || t$k("confirm");
|
2244
2244
|
return vue.createVNode("button", {
|
2245
2245
|
"type": "button",
|
2246
|
-
"class": [bem$
|
2246
|
+
"class": [bem$1p("confirm"), HAPTICS_FEEDBACK],
|
2247
2247
|
"onClick": onConfirm
|
2248
2248
|
}, [slots.confirm ? slots.confirm() : text]);
|
2249
2249
|
};
|
2250
2250
|
return () => vue.createVNode("div", {
|
2251
|
-
"class": bem$
|
2251
|
+
"class": bem$1p("toolbar")
|
2252
2252
|
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
2253
2253
|
}
|
2254
2254
|
});
|
2255
|
+
const useSyncPropRef = (getProp, setProp) => {
|
2256
|
+
const propRef = vue.ref(getProp());
|
2257
|
+
vue.watch(getProp, (value) => {
|
2258
|
+
if (value !== propRef.value) {
|
2259
|
+
propRef.value = value;
|
2260
|
+
}
|
2261
|
+
});
|
2262
|
+
vue.watch(propRef, (value) => {
|
2263
|
+
if (value !== getProp()) {
|
2264
|
+
setProp(value);
|
2265
|
+
}
|
2266
|
+
});
|
2267
|
+
return propRef;
|
2268
|
+
};
|
2255
2269
|
function scrollLeftTo(scroller, to, duration) {
|
2270
|
+
let rafId;
|
2256
2271
|
let count = 0;
|
2257
2272
|
const from = scroller.scrollLeft;
|
2258
2273
|
const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
|
2274
|
+
function cancel() {
|
2275
|
+
cancelRaf(rafId);
|
2276
|
+
}
|
2259
2277
|
function animate() {
|
2260
2278
|
scroller.scrollLeft += (to - from) / frames;
|
2261
2279
|
if (++count < frames) {
|
2262
|
-
raf(animate);
|
2280
|
+
rafId = raf(animate);
|
2263
2281
|
}
|
2264
2282
|
}
|
2265
2283
|
animate();
|
2284
|
+
return cancel;
|
2266
2285
|
}
|
2267
2286
|
function scrollTopTo(scroller, to, duration, callback) {
|
2287
|
+
let rafId;
|
2268
2288
|
let current2 = getScrollTop(scroller);
|
2269
2289
|
const isDown = current2 < to;
|
2270
2290
|
const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
|
2271
2291
|
const step = (to - current2) / frames;
|
2292
|
+
function cancel() {
|
2293
|
+
cancelRaf(rafId);
|
2294
|
+
}
|
2272
2295
|
function animate() {
|
2273
2296
|
current2 += step;
|
2274
2297
|
if (isDown && current2 > to || !isDown && current2 < to) {
|
@@ -2276,12 +2299,13 @@
|
|
2276
2299
|
}
|
2277
2300
|
setScrollTop(scroller, current2);
|
2278
2301
|
if (isDown && current2 < to || !isDown && current2 > to) {
|
2279
|
-
raf(animate);
|
2302
|
+
rafId = raf(animate);
|
2280
2303
|
} else if (callback) {
|
2281
|
-
raf(callback);
|
2304
|
+
rafId = raf(callback);
|
2282
2305
|
}
|
2283
2306
|
}
|
2284
2307
|
animate();
|
2308
|
+
return cancel;
|
2285
2309
|
}
|
2286
2310
|
let current = 0;
|
2287
2311
|
function useId() {
|
@@ -2329,7 +2353,7 @@
|
|
2329
2353
|
vue.onBeforeUnmount(unobserve);
|
2330
2354
|
onMountedOrActivated(observe);
|
2331
2355
|
}
|
2332
|
-
const [name$
|
2356
|
+
const [name$1r, bem$1n] = createNamespace("sticky");
|
2333
2357
|
const stickyProps = {
|
2334
2358
|
zIndex: numericProp,
|
2335
2359
|
position: makeStringProp("top"),
|
@@ -2337,8 +2361,8 @@
|
|
2337
2361
|
offsetTop: makeNumericProp(0),
|
2338
2362
|
offsetBottom: makeNumericProp(0)
|
2339
2363
|
};
|
2340
|
-
var stdin_default$
|
2341
|
-
name: name$
|
2364
|
+
var stdin_default$1B = vue.defineComponent({
|
2365
|
+
name: name$1r,
|
2342
2366
|
props: stickyProps,
|
2343
2367
|
emits: ["scroll", "change"],
|
2344
2368
|
setup(props, {
|
@@ -2451,7 +2475,7 @@
|
|
2451
2475
|
"ref": root,
|
2452
2476
|
"style": rootStyle.value
|
2453
2477
|
}, [vue.createVNode("div", {
|
2454
|
-
"class": bem$
|
2478
|
+
"class": bem$1n({
|
2455
2479
|
fixed: state.fixed && !isReset.value
|
2456
2480
|
}),
|
2457
2481
|
"style": stickyStyle.value
|
@@ -2459,8 +2483,8 @@
|
|
2459
2483
|
};
|
2460
2484
|
}
|
2461
2485
|
});
|
2462
|
-
const Sticky = withInstall(stdin_default$
|
2463
|
-
const [name$
|
2486
|
+
const Sticky = withInstall(stdin_default$1B);
|
2487
|
+
const [name$1q, bem$1m] = createNamespace("swipe");
|
2464
2488
|
const swipeProps = {
|
2465
2489
|
loop: truthProp,
|
2466
2490
|
width: numericProp,
|
@@ -2475,9 +2499,9 @@
|
|
2475
2499
|
showIndicators: truthProp,
|
2476
2500
|
stopPropagation: truthProp
|
2477
2501
|
};
|
2478
|
-
const SWIPE_KEY = Symbol(name$
|
2479
|
-
var stdin_default$
|
2480
|
-
name: name$
|
2502
|
+
const SWIPE_KEY = Symbol(name$1q);
|
2503
|
+
var stdin_default$1A = vue.defineComponent({
|
2504
|
+
name: name$1q,
|
2481
2505
|
props: swipeProps,
|
2482
2506
|
emits: ["change", "dragStart", "dragEnd"],
|
2483
2507
|
setup(props, {
|
@@ -2755,7 +2779,7 @@
|
|
2755
2779
|
} : void 0;
|
2756
2780
|
return vue.createVNode("i", {
|
2757
2781
|
"style": style,
|
2758
|
-
"class": bem$
|
2782
|
+
"class": bem$1m("indicator", {
|
2759
2783
|
active
|
2760
2784
|
})
|
2761
2785
|
}, null);
|
@@ -2769,7 +2793,7 @@
|
|
2769
2793
|
}
|
2770
2794
|
if (props.showIndicators && count.value > 1) {
|
2771
2795
|
return vue.createVNode("div", {
|
2772
|
-
"class": bem$
|
2796
|
+
"class": bem$1m("indicators", {
|
2773
2797
|
vertical: props.vertical
|
2774
2798
|
})
|
2775
2799
|
}, [Array(count.value).fill("").map(renderDot)]);
|
@@ -2811,11 +2835,11 @@
|
|
2811
2835
|
var _a;
|
2812
2836
|
return vue.createVNode("div", {
|
2813
2837
|
"ref": root,
|
2814
|
-
"class": bem$
|
2838
|
+
"class": bem$1m()
|
2815
2839
|
}, [vue.createVNode("div", {
|
2816
2840
|
"ref": track,
|
2817
2841
|
"style": trackStyle.value,
|
2818
|
-
"class": bem$
|
2842
|
+
"class": bem$1m("track", {
|
2819
2843
|
vertical: props.vertical
|
2820
2844
|
}),
|
2821
2845
|
"onTouchstartPassive": onTouchStart,
|
@@ -2825,10 +2849,10 @@
|
|
2825
2849
|
};
|
2826
2850
|
}
|
2827
2851
|
});
|
2828
|
-
const Swipe = withInstall(stdin_default$
|
2829
|
-
const [name$
|
2830
|
-
var stdin_default$
|
2831
|
-
name: name$
|
2852
|
+
const Swipe = withInstall(stdin_default$1A);
|
2853
|
+
const [name$1p, bem$1l] = createNamespace("tabs");
|
2854
|
+
var stdin_default$1z = vue.defineComponent({
|
2855
|
+
name: name$1p,
|
2832
2856
|
props: {
|
2833
2857
|
count: makeRequiredProp(Number),
|
2834
2858
|
inited: Boolean,
|
@@ -2852,7 +2876,7 @@
|
|
2852
2876
|
return vue.createVNode(Swipe, {
|
2853
2877
|
"ref": swipeRef,
|
2854
2878
|
"loop": false,
|
2855
|
-
"class": bem$
|
2879
|
+
"class": bem$1l("track"),
|
2856
2880
|
"duration": +props.duration * 1e3,
|
2857
2881
|
"touchable": props.swipeable,
|
2858
2882
|
"lazyRender": props.lazyRender,
|
@@ -2880,13 +2904,13 @@
|
|
2880
2904
|
swipeRef
|
2881
2905
|
});
|
2882
2906
|
return () => vue.createVNode("div", {
|
2883
|
-
"class": bem$
|
2907
|
+
"class": bem$1l("content", {
|
2884
2908
|
animated: props.animated || props.swipeable
|
2885
2909
|
})
|
2886
2910
|
}, [renderChildren()]);
|
2887
2911
|
}
|
2888
2912
|
});
|
2889
|
-
const [name$
|
2913
|
+
const [name$1o, bem$1k] = createNamespace("tabs");
|
2890
2914
|
const tabsProps = {
|
2891
2915
|
type: makeStringProp("line"),
|
2892
2916
|
color: String,
|
@@ -2909,9 +2933,9 @@
|
|
2909
2933
|
titleActiveColor: String,
|
2910
2934
|
titleInactiveColor: String
|
2911
2935
|
};
|
2912
|
-
const TABS_KEY = Symbol(name$
|
2913
|
-
var stdin_default$
|
2914
|
-
name: name$
|
2936
|
+
const TABS_KEY = Symbol(name$1o);
|
2937
|
+
var stdin_default$1y = vue.defineComponent({
|
2938
|
+
name: name$1o,
|
2915
2939
|
props: tabsProps,
|
2916
2940
|
emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
|
2917
2941
|
setup(props, {
|
@@ -2921,6 +2945,8 @@
|
|
2921
2945
|
let tabHeight;
|
2922
2946
|
let lockScroll;
|
2923
2947
|
let stickyFixed;
|
2948
|
+
let cancelScrollLeftToRaf;
|
2949
|
+
let cancelScrollTopToRaf;
|
2924
2950
|
const root = vue.ref();
|
2925
2951
|
const navRef = vue.ref();
|
2926
2952
|
const wrapRef = vue.ref();
|
@@ -2968,7 +2994,9 @@
|
|
2968
2994
|
}
|
2969
2995
|
const title = titles[state.currentIndex].$el;
|
2970
2996
|
const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
|
2971
|
-
|
2997
|
+
if (cancelScrollLeftToRaf)
|
2998
|
+
cancelScrollLeftToRaf();
|
2999
|
+
cancelScrollLeftToRaf = scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
|
2972
3000
|
};
|
2973
3001
|
const setLine = () => {
|
2974
3002
|
const shouldAnimate = state.inited;
|
@@ -3044,7 +3072,9 @@
|
|
3044
3072
|
if (target && scroller.value) {
|
3045
3073
|
const to = getElementTop(target, scroller.value) - scrollOffset.value;
|
3046
3074
|
lockScroll = true;
|
3047
|
-
|
3075
|
+
if (cancelScrollTopToRaf)
|
3076
|
+
cancelScrollTopToRaf();
|
3077
|
+
cancelScrollTopToRaf = scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
|
3048
3078
|
lockScroll = false;
|
3049
3079
|
});
|
3050
3080
|
}
|
@@ -3103,7 +3133,7 @@
|
|
3103
3133
|
const renderLine = () => {
|
3104
3134
|
if (props.type === "line" && children.length) {
|
3105
3135
|
return vue.createVNode("div", {
|
3106
|
-
"class": bem$
|
3136
|
+
"class": bem$1k("line"),
|
3107
3137
|
"style": state.lineStyle
|
3108
3138
|
}, null);
|
3109
3139
|
}
|
@@ -3117,13 +3147,13 @@
|
|
3117
3147
|
} = props;
|
3118
3148
|
const Header = [vue.createVNode("div", {
|
3119
3149
|
"ref": sticky ? void 0 : wrapRef,
|
3120
|
-
"class": [bem$
|
3150
|
+
"class": [bem$1k("wrap"), {
|
3121
3151
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
3122
3152
|
}]
|
3123
3153
|
}, [vue.createVNode("div", {
|
3124
3154
|
"ref": navRef,
|
3125
3155
|
"role": "tablist",
|
3126
|
-
"class": bem$
|
3156
|
+
"class": bem$1k("nav", [type, {
|
3127
3157
|
shrink: props.shrink,
|
3128
3158
|
complete: scrollable.value
|
3129
3159
|
}]),
|
@@ -3196,14 +3226,14 @@
|
|
3196
3226
|
});
|
3197
3227
|
return () => vue.createVNode("div", {
|
3198
3228
|
"ref": root,
|
3199
|
-
"class": bem$
|
3229
|
+
"class": bem$1k([props.type])
|
3200
3230
|
}, [props.sticky ? vue.createVNode(Sticky, {
|
3201
3231
|
"container": root.value,
|
3202
3232
|
"offsetTop": offsetTopPx.value,
|
3203
3233
|
"onScroll": onStickyScroll
|
3204
3234
|
}, {
|
3205
3235
|
default: () => [renderHeader()]
|
3206
|
-
}) : renderHeader(), vue.createVNode(stdin_default$
|
3236
|
+
}) : renderHeader(), vue.createVNode(stdin_default$1z, {
|
3207
3237
|
"ref": contentRef,
|
3208
3238
|
"count": children.length,
|
3209
3239
|
"inited": state.inited,
|
@@ -3223,9 +3253,9 @@
|
|
3223
3253
|
});
|
3224
3254
|
const TAB_STATUS_KEY = Symbol();
|
3225
3255
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
3226
|
-
const [name$
|
3256
|
+
const [name$1n, bem$1j] = createNamespace("tab");
|
3227
3257
|
const TabTitle = vue.defineComponent({
|
3228
|
-
name: name$
|
3258
|
+
name: name$1n,
|
3229
3259
|
props: {
|
3230
3260
|
id: String,
|
3231
3261
|
dot: Boolean,
|
@@ -3274,7 +3304,7 @@
|
|
3274
3304
|
});
|
3275
3305
|
const renderText = () => {
|
3276
3306
|
const Text = vue.createVNode("span", {
|
3277
|
-
"class": bem$
|
3307
|
+
"class": bem$1j("text", {
|
3278
3308
|
ellipsis: !props.scrollable
|
3279
3309
|
})
|
3280
3310
|
}, [slots.title ? slots.title() : props.title]);
|
@@ -3292,7 +3322,7 @@
|
|
3292
3322
|
return () => vue.createVNode("div", {
|
3293
3323
|
"id": props.id,
|
3294
3324
|
"role": "tab",
|
3295
|
-
"class": [bem$
|
3325
|
+
"class": [bem$1j([props.type, {
|
3296
3326
|
grow: props.scrollable && !props.shrink,
|
3297
3327
|
shrink: props.shrink,
|
3298
3328
|
active: props.isActive,
|
@@ -3306,9 +3336,9 @@
|
|
3306
3336
|
}, [renderText()]);
|
3307
3337
|
}
|
3308
3338
|
});
|
3309
|
-
const [name$
|
3310
|
-
var stdin_default$
|
3311
|
-
name: name$
|
3339
|
+
const [name$1m, bem$1i] = createNamespace("swipe-item");
|
3340
|
+
var stdin_default$1x = vue.defineComponent({
|
3341
|
+
name: name$1m,
|
3312
3342
|
setup(props, {
|
3313
3343
|
slots
|
3314
3344
|
}) {
|
@@ -3370,14 +3400,14 @@
|
|
3370
3400
|
return () => {
|
3371
3401
|
var _a;
|
3372
3402
|
return vue.createVNode("div", {
|
3373
|
-
"class": bem$
|
3403
|
+
"class": bem$1i(),
|
3374
3404
|
"style": style.value
|
3375
3405
|
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
3376
3406
|
};
|
3377
3407
|
}
|
3378
3408
|
});
|
3379
|
-
const SwipeItem = withInstall(stdin_default$
|
3380
|
-
const [name$
|
3409
|
+
const SwipeItem = withInstall(stdin_default$1x);
|
3410
|
+
const [name$1l, bem$1h] = createNamespace("tab");
|
3381
3411
|
const tabProps = extend({}, routeProps, {
|
3382
3412
|
dot: Boolean,
|
3383
3413
|
name: numericProp,
|
@@ -3388,8 +3418,8 @@
|
|
3388
3418
|
titleStyle: [String, Object],
|
3389
3419
|
showZeroBadge: truthProp
|
3390
3420
|
});
|
3391
|
-
var stdin_default$
|
3392
|
-
name: name$
|
3421
|
+
var stdin_default$1w = vue.defineComponent({
|
3422
|
+
name: name$1l,
|
3393
3423
|
props: tabProps,
|
3394
3424
|
setup(props, {
|
3395
3425
|
slots
|
@@ -3474,7 +3504,7 @@
|
|
3474
3504
|
return vue.createVNode(SwipeItem, {
|
3475
3505
|
"id": id,
|
3476
3506
|
"role": "tabpanel",
|
3477
|
-
"class": bem$
|
3507
|
+
"class": bem$1h("panel-wrapper", {
|
3478
3508
|
inactive: hasInactiveClass.value
|
3479
3509
|
}),
|
3480
3510
|
"tabindex": active.value ? 0 : -1,
|
@@ -3484,7 +3514,7 @@
|
|
3484
3514
|
default: () => {
|
3485
3515
|
var _a2;
|
3486
3516
|
return [vue.createVNode("div", {
|
3487
|
-
"class": bem$
|
3517
|
+
"class": bem$1h("panel")
|
3488
3518
|
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
|
3489
3519
|
}
|
3490
3520
|
});
|
@@ -3494,39 +3524,40 @@
|
|
3494
3524
|
return vue.withDirectives(vue.createVNode("div", {
|
3495
3525
|
"id": id,
|
3496
3526
|
"role": "tabpanel",
|
3497
|
-
"class": bem$
|
3527
|
+
"class": bem$1h("panel"),
|
3498
3528
|
"tabindex": show ? 0 : -1,
|
3499
3529
|
"aria-labelledby": label
|
3500
3530
|
}, [Content]), [[vue.vShow, show]]);
|
3501
3531
|
};
|
3502
3532
|
}
|
3503
3533
|
});
|
3504
|
-
const Tab = withInstall(stdin_default$
|
3505
|
-
const Tabs = withInstall(stdin_default$
|
3506
|
-
const [name$
|
3507
|
-
const PICKER_GROUP_KEY = Symbol(name$
|
3534
|
+
const Tab = withInstall(stdin_default$1w);
|
3535
|
+
const Tabs = withInstall(stdin_default$1y);
|
3536
|
+
const [name$1k, bem$1g] = createNamespace("picker-group");
|
3537
|
+
const PICKER_GROUP_KEY = Symbol(name$1k);
|
3508
3538
|
const pickerGroupProps = extend({
|
3509
3539
|
tabs: makeArrayProp(),
|
3540
|
+
activeTab: makeNumericProp(0),
|
3510
3541
|
nextStepText: String
|
3511
3542
|
}, pickerToolbarProps);
|
3512
|
-
var stdin_default$
|
3513
|
-
name: name$
|
3543
|
+
var stdin_default$1v = vue.defineComponent({
|
3544
|
+
name: name$1k,
|
3514
3545
|
props: pickerGroupProps,
|
3515
|
-
emits: ["confirm", "cancel"],
|
3546
|
+
emits: ["confirm", "cancel", "update:activeTab"],
|
3516
3547
|
setup(props, {
|
3517
3548
|
emit,
|
3518
3549
|
slots
|
3519
3550
|
}) {
|
3520
|
-
const activeTab =
|
3551
|
+
const activeTab = useSyncPropRef(() => props.activeTab, (value) => emit("update:activeTab", value));
|
3521
3552
|
const {
|
3522
3553
|
children,
|
3523
3554
|
linkChildren
|
3524
3555
|
} = useChildren(PICKER_GROUP_KEY);
|
3525
3556
|
linkChildren();
|
3526
|
-
const showNextButton = () => activeTab.value < props.tabs.length - 1 && props.nextStepText;
|
3557
|
+
const showNextButton = () => +activeTab.value < props.tabs.length - 1 && props.nextStepText;
|
3527
3558
|
const onConfirm = () => {
|
3528
3559
|
if (showNextButton()) {
|
3529
|
-
activeTab.value
|
3560
|
+
activeTab.value = +activeTab.value + 1;
|
3530
3561
|
} else {
|
3531
3562
|
emit("confirm", children.map((item) => item.confirm()));
|
3532
3563
|
}
|
@@ -3537,8 +3568,8 @@
|
|
3537
3568
|
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
3538
3569
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
3539
3570
|
return vue.createVNode("div", {
|
3540
|
-
"class": bem$
|
3541
|
-
}, [vue.createVNode(stdin_default$
|
3571
|
+
"class": bem$1g()
|
3572
|
+
}, [vue.createVNode(stdin_default$1C, {
|
3542
3573
|
"title": props.title,
|
3543
3574
|
"cancelButtonText": props.cancelButtonText,
|
3544
3575
|
"confirmButtonText": confirmButtonText,
|
@@ -3547,14 +3578,14 @@
|
|
3547
3578
|
}, pick(slots, pickerToolbarSlots)), vue.createVNode(Tabs, {
|
3548
3579
|
"active": activeTab.value,
|
3549
3580
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
3550
|
-
"class": bem$
|
3581
|
+
"class": bem$1g("tabs"),
|
3551
3582
|
"shrink": true,
|
3552
3583
|
"animated": true,
|
3553
3584
|
"lazyRender": false
|
3554
3585
|
}, {
|
3555
3586
|
default: () => [props.tabs.map((title, index) => vue.createVNode(Tab, {
|
3556
3587
|
"title": title,
|
3557
|
-
"titleClass": bem$
|
3588
|
+
"titleClass": bem$1g("tab-title")
|
3558
3589
|
}, {
|
3559
3590
|
default: () => [childNodes == null ? void 0 : childNodes[index]]
|
3560
3591
|
}))]
|
@@ -3577,8 +3608,8 @@
|
|
3577
3608
|
toolbarPosition: makeStringProp("top"),
|
3578
3609
|
columnsFieldNames: Object
|
3579
3610
|
});
|
3580
|
-
var stdin_default$
|
3581
|
-
name: name$
|
3611
|
+
var stdin_default$1u = vue.defineComponent({
|
3612
|
+
name: name$1u,
|
3582
3613
|
props: pickerProps,
|
3583
3614
|
emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
|
3584
3615
|
setup(props, {
|
@@ -3659,7 +3690,7 @@
|
|
3659
3690
|
return params;
|
3660
3691
|
};
|
3661
3692
|
const cancel = () => emit("cancel", getEventParams());
|
3662
|
-
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => vue.createVNode(stdin_default$
|
3693
|
+
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => vue.createVNode(stdin_default$1D, {
|
3663
3694
|
"value": selectedValues.value[columnIndex],
|
3664
3695
|
"fields": fields.value,
|
3665
3696
|
"options": options,
|
@@ -3688,10 +3719,10 @@
|
|
3688
3719
|
backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`
|
3689
3720
|
};
|
3690
3721
|
return [vue.createVNode("div", {
|
3691
|
-
"class": bem$
|
3722
|
+
"class": bem$1p("mask"),
|
3692
3723
|
"style": maskStyle
|
3693
3724
|
}, null), vue.createVNode("div", {
|
3694
|
-
"class": [BORDER_UNSET_TOP_BOTTOM, bem$
|
3725
|
+
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1p("frame")],
|
3695
3726
|
"style": frameStyle
|
3696
3727
|
}, null)];
|
3697
3728
|
}
|
@@ -3703,13 +3734,13 @@
|
|
3703
3734
|
};
|
3704
3735
|
return vue.createVNode("div", {
|
3705
3736
|
"ref": columnsRef,
|
3706
|
-
"class": bem$
|
3737
|
+
"class": bem$1p("columns"),
|
3707
3738
|
"style": columnsStyle
|
3708
3739
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
3709
3740
|
};
|
3710
3741
|
const renderToolbar = () => {
|
3711
3742
|
if (props.showToolbar && !parent) {
|
3712
|
-
return vue.createVNode(stdin_default$
|
3743
|
+
return vue.createVNode(stdin_default$1C, vue.mergeProps(pick(props, pickerToolbarPropKeys), {
|
3713
3744
|
"onConfirm": confirm,
|
3714
3745
|
"onCancel": cancel
|
3715
3746
|
}), pick(slots, pickerToolbarSlots));
|
@@ -3752,9 +3783,9 @@
|
|
3752
3783
|
return () => {
|
3753
3784
|
var _a, _b;
|
3754
3785
|
return vue.createVNode("div", {
|
3755
|
-
"class": bem$
|
3786
|
+
"class": bem$1p()
|
3756
3787
|
}, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? vue.createVNode(Loading, {
|
3757
|
-
"class": bem$
|
3788
|
+
"class": bem$1p("loading")
|
3758
3789
|
}, null) : null, (_a = slots["columns-top"]) == null ? void 0 : _a.call(slots), renderColumns(), (_b = slots["columns-bottom"]) == null ? void 0 : _b.call(slots), props.toolbarPosition === "bottom" ? renderToolbar() : null]);
|
3759
3790
|
};
|
3760
3791
|
}
|
@@ -3845,9 +3876,9 @@
|
|
3845
3876
|
}
|
3846
3877
|
return options;
|
3847
3878
|
}
|
3848
|
-
const Picker = withInstall(stdin_default$
|
3849
|
-
const [name$
|
3850
|
-
const areaProps = extend({}, pickerSharedProps, {
|
3879
|
+
const Picker = withInstall(stdin_default$1u);
|
3880
|
+
const [name$1j, bem$1f] = createNamespace("area");
|
3881
|
+
const areaProps = extend({}, pick(pickerSharedProps, INHERIT_PROPS), {
|
3851
3882
|
modelValue: String,
|
3852
3883
|
columnsNum: makeNumericProp(3),
|
3853
3884
|
columnsPlaceholder: makeArrayProp(),
|
@@ -3856,8 +3887,8 @@
|
|
3856
3887
|
default: () => ({})
|
3857
3888
|
}
|
3858
3889
|
});
|
3859
|
-
var stdin_default$
|
3860
|
-
name: name$
|
3890
|
+
var stdin_default$1t = vue.defineComponent({
|
3891
|
+
name: name$1j,
|
3861
3892
|
props: areaProps,
|
3862
3893
|
emits: ["change", "confirm", "cancel", "update:modelValue"],
|
3863
3894
|
setup(props, {
|
@@ -3904,7 +3935,7 @@
|
|
3904
3935
|
"ref": picker,
|
3905
3936
|
"modelValue": codes.value,
|
3906
3937
|
"onUpdate:modelValue": ($event) => codes.value = $event,
|
3907
|
-
"class": bem$
|
3938
|
+
"class": bem$1f(),
|
3908
3939
|
"columns": columns.value,
|
3909
3940
|
"onChange": onChange,
|
3910
3941
|
"onCancel": onCancel,
|
@@ -3912,8 +3943,8 @@
|
|
3912
3943
|
}, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
|
3913
3944
|
}
|
3914
3945
|
});
|
3915
|
-
const Area = withInstall(stdin_default$
|
3916
|
-
const [name$
|
3946
|
+
const Area = withInstall(stdin_default$1t);
|
3947
|
+
const [name$1i, bem$1e] = createNamespace("cell");
|
3917
3948
|
const cellSharedProps = {
|
3918
3949
|
tag: makeStringProp("div"),
|
3919
3950
|
icon: String,
|
@@ -3937,8 +3968,8 @@
|
|
3937
3968
|
}
|
3938
3969
|
};
|
3939
3970
|
const cellProps = extend({}, cellSharedProps, routeProps);
|
3940
|
-
var stdin_default$
|
3941
|
-
name: name$
|
3971
|
+
var stdin_default$1s = vue.defineComponent({
|
3972
|
+
name: name$1i,
|
3942
3973
|
props: cellProps,
|
3943
3974
|
setup(props, {
|
3944
3975
|
slots
|
@@ -3948,7 +3979,7 @@
|
|
3948
3979
|
const showLabel = slots.label || isDef(props.label);
|
3949
3980
|
if (showLabel) {
|
3950
3981
|
return vue.createVNode("div", {
|
3951
|
-
"class": [bem$
|
3982
|
+
"class": [bem$1e("label"), props.labelClass]
|
3952
3983
|
}, [slots.label ? slots.label() : props.label]);
|
3953
3984
|
}
|
3954
3985
|
};
|
@@ -3960,7 +3991,7 @@
|
|
3960
3991
|
return;
|
3961
3992
|
}
|
3962
3993
|
return vue.createVNode("div", {
|
3963
|
-
"class": [bem$
|
3994
|
+
"class": [bem$1e("title"), props.titleClass],
|
3964
3995
|
"style": props.titleStyle
|
3965
3996
|
}, [titleSlot || vue.createVNode("span", null, [props.title]), renderLabel()]);
|
3966
3997
|
}
|
@@ -3970,7 +4001,7 @@
|
|
3970
4001
|
const hasValue = slot || isDef(props.value);
|
3971
4002
|
if (hasValue) {
|
3972
4003
|
return vue.createVNode("div", {
|
3973
|
-
"class": [bem$
|
4004
|
+
"class": [bem$1e("value"), props.valueClass]
|
3974
4005
|
}, [slot ? slot() : vue.createVNode("span", null, [props.value])]);
|
3975
4006
|
}
|
3976
4007
|
};
|
@@ -3981,7 +4012,7 @@
|
|
3981
4012
|
if (props.icon) {
|
3982
4013
|
return vue.createVNode(Icon, {
|
3983
4014
|
"name": props.icon,
|
3984
|
-
"class": bem$
|
4015
|
+
"class": bem$1e("left-icon"),
|
3985
4016
|
"classPrefix": props.iconPrefix
|
3986
4017
|
}, null);
|
3987
4018
|
}
|
@@ -3994,7 +4025,7 @@
|
|
3994
4025
|
const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
|
3995
4026
|
return vue.createVNode(Icon, {
|
3996
4027
|
"name": name2,
|
3997
|
-
"class": bem$
|
4028
|
+
"class": bem$1e("right-icon")
|
3998
4029
|
}, null);
|
3999
4030
|
}
|
4000
4031
|
};
|
@@ -4019,7 +4050,7 @@
|
|
4019
4050
|
classes[size] = !!size;
|
4020
4051
|
}
|
4021
4052
|
return vue.createVNode(tag, {
|
4022
|
-
"class": bem$
|
4053
|
+
"class": bem$1e(classes),
|
4023
4054
|
"role": clickable ? "button" : void 0,
|
4024
4055
|
"tabindex": clickable ? 0 : void 0,
|
4025
4056
|
"onClick": route2
|
@@ -4032,8 +4063,8 @@
|
|
4032
4063
|
};
|
4033
4064
|
}
|
4034
4065
|
});
|
4035
|
-
const Cell = withInstall(stdin_default$
|
4036
|
-
const [name$
|
4066
|
+
const Cell = withInstall(stdin_default$1s);
|
4067
|
+
const [name$1h, bem$1d] = createNamespace("form");
|
4037
4068
|
const formProps = {
|
4038
4069
|
colon: Boolean,
|
4039
4070
|
disabled: Boolean,
|
@@ -4052,8 +4083,8 @@
|
|
4052
4083
|
default: "onBlur"
|
4053
4084
|
}
|
4054
4085
|
};
|
4055
|
-
var stdin_default$
|
4056
|
-
name: name$
|
4086
|
+
var stdin_default$1r = vue.defineComponent({
|
4087
|
+
name: name$1h,
|
4057
4088
|
props: formProps,
|
4058
4089
|
emits: ["submit", "failed"],
|
4059
4090
|
setup(props, {
|
@@ -4179,13 +4210,13 @@
|
|
4179
4210
|
return () => {
|
4180
4211
|
var _a;
|
4181
4212
|
return vue.createVNode("form", {
|
4182
|
-
"class": bem$
|
4213
|
+
"class": bem$1d(),
|
4183
4214
|
"onSubmit": onSubmit
|
4184
4215
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
4185
4216
|
};
|
4186
4217
|
}
|
4187
4218
|
});
|
4188
|
-
const Form = withInstall(stdin_default$
|
4219
|
+
const Form = withInstall(stdin_default$1r);
|
4189
4220
|
function isEmptyValue(value) {
|
4190
4221
|
if (Array.isArray(value)) {
|
4191
4222
|
return !value.length;
|
@@ -4274,7 +4305,7 @@
|
|
4274
4305
|
function cutString(str, maxlength) {
|
4275
4306
|
return [...str].slice(0, maxlength).join("");
|
4276
4307
|
}
|
4277
|
-
const [name$
|
4308
|
+
const [name$1g, bem$1c] = createNamespace("field");
|
4278
4309
|
const fieldSharedProps = {
|
4279
4310
|
id: String,
|
4280
4311
|
name: String,
|
@@ -4321,8 +4352,8 @@
|
|
4321
4352
|
default: null
|
4322
4353
|
}
|
4323
4354
|
});
|
4324
|
-
var stdin_default$
|
4325
|
-
name: name$
|
4355
|
+
var stdin_default$1q = vue.defineComponent({
|
4356
|
+
name: name$1g,
|
4326
4357
|
props: fieldProps,
|
4327
4358
|
emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
|
4328
4359
|
setup(props, {
|
@@ -4596,7 +4627,7 @@
|
|
4596
4627
|
const getInputId = () => props.id || `${id}-input`;
|
4597
4628
|
const getValidationStatus = () => state.status;
|
4598
4629
|
const renderInput = () => {
|
4599
|
-
const controlClass = bem$
|
4630
|
+
const controlClass = bem$1c("control", [getProp("inputAlign"), {
|
4600
4631
|
error: showError.value,
|
4601
4632
|
custom: !!slots.input,
|
4602
4633
|
"min-height": props.type === "textarea" && !props.autosize
|
@@ -4638,7 +4669,7 @@
|
|
4638
4669
|
const leftIconSlot = slots["left-icon"];
|
4639
4670
|
if (props.leftIcon || leftIconSlot) {
|
4640
4671
|
return vue.createVNode("div", {
|
4641
|
-
"class": bem$
|
4672
|
+
"class": bem$1c("left-icon"),
|
4642
4673
|
"onClick": onClickLeftIcon
|
4643
4674
|
}, [leftIconSlot ? leftIconSlot() : vue.createVNode(Icon, {
|
4644
4675
|
"name": props.leftIcon,
|
@@ -4650,7 +4681,7 @@
|
|
4650
4681
|
const rightIconSlot = slots["right-icon"];
|
4651
4682
|
if (props.rightIcon || rightIconSlot) {
|
4652
4683
|
return vue.createVNode("div", {
|
4653
|
-
"class": bem$
|
4684
|
+
"class": bem$1c("right-icon"),
|
4654
4685
|
"onClick": onClickRightIcon
|
4655
4686
|
}, [rightIconSlot ? rightIconSlot() : vue.createVNode(Icon, {
|
4656
4687
|
"name": props.rightIcon,
|
@@ -4662,9 +4693,9 @@
|
|
4662
4693
|
if (props.showWordLimit && props.maxlength) {
|
4663
4694
|
const count = getStringLength(getModelValue());
|
4664
4695
|
return vue.createVNode("div", {
|
4665
|
-
"class": bem$
|
4696
|
+
"class": bem$1c("word-limit")
|
4666
4697
|
}, [vue.createVNode("span", {
|
4667
|
-
"class": bem$
|
4698
|
+
"class": bem$1c("word-num")
|
4668
4699
|
}, [count]), vue.createTextVNode("/"), props.maxlength]);
|
4669
4700
|
}
|
4670
4701
|
};
|
@@ -4677,7 +4708,7 @@
|
|
4677
4708
|
const slot = slots["error-message"];
|
4678
4709
|
const errorMessageAlign = getProp("errorMessageAlign");
|
4679
4710
|
return vue.createVNode("div", {
|
4680
|
-
"class": bem$
|
4711
|
+
"class": bem$1c("error-message", errorMessageAlign)
|
4681
4712
|
}, [slot ? slot({
|
4682
4713
|
message
|
4683
4714
|
}) : message]);
|
@@ -4694,6 +4725,10 @@
|
|
4694
4725
|
return vue.createVNode("label", {
|
4695
4726
|
"id": `${id}-label`,
|
4696
4727
|
"for": getInputId(),
|
4728
|
+
"onClick": (event) => {
|
4729
|
+
preventDefault(event);
|
4730
|
+
focus();
|
4731
|
+
},
|
4697
4732
|
"style": labelAlign === "top" && labelWidth ? {
|
4698
4733
|
width: addUnit(labelWidth)
|
4699
4734
|
} : void 0
|
@@ -4701,13 +4736,13 @@
|
|
4701
4736
|
}
|
4702
4737
|
};
|
4703
4738
|
const renderFieldBody = () => [vue.createVNode("div", {
|
4704
|
-
"class": bem$
|
4739
|
+
"class": bem$1c("body")
|
4705
4740
|
}, [renderInput(), showClear.value && vue.createVNode(Icon, {
|
4706
4741
|
"ref": clearIconRef,
|
4707
4742
|
"name": props.clearIcon,
|
4708
|
-
"class": bem$
|
4743
|
+
"class": bem$1c("clear")
|
4709
4744
|
}, null), renderRightIcon(), slots.button && vue.createVNode("div", {
|
4710
|
-
"class": bem$
|
4745
|
+
"class": bem$1c("button")
|
4711
4746
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
4712
4747
|
useExpose({
|
4713
4748
|
blur,
|
@@ -4751,7 +4786,7 @@
|
|
4751
4786
|
};
|
4752
4787
|
return vue.createVNode(Cell, {
|
4753
4788
|
"size": props.size,
|
4754
|
-
"class": bem$
|
4789
|
+
"class": bem$1c({
|
4755
4790
|
error: showError.value,
|
4756
4791
|
disabled,
|
4757
4792
|
[`label-${labelAlign}`]: labelAlign
|
@@ -4761,8 +4796,8 @@
|
|
4761
4796
|
"isLink": props.isLink,
|
4762
4797
|
"clickable": props.clickable,
|
4763
4798
|
"titleStyle": labelStyle.value,
|
4764
|
-
"valueClass": bem$
|
4765
|
-
"titleClass": [bem$
|
4799
|
+
"valueClass": bem$1c("value"),
|
4800
|
+
"titleClass": [bem$1c("label", [labelAlign, {
|
4766
4801
|
required: props.required
|
4767
4802
|
}]), props.labelClass],
|
4768
4803
|
"arrowDirection": props.arrowDirection
|
@@ -4775,7 +4810,7 @@
|
|
4775
4810
|
};
|
4776
4811
|
}
|
4777
4812
|
});
|
4778
|
-
const Field = withInstall(stdin_default$
|
4813
|
+
const Field = withInstall(stdin_default$1q);
|
4779
4814
|
let lockCount = 0;
|
4780
4815
|
function lockClick(lock) {
|
4781
4816
|
if (lock) {
|
@@ -4790,7 +4825,7 @@
|
|
4790
4825
|
}
|
4791
4826
|
}
|
4792
4827
|
}
|
4793
|
-
const [name$
|
4828
|
+
const [name$1f, bem$1b] = createNamespace("toast");
|
4794
4829
|
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
4795
4830
|
const toastProps = {
|
4796
4831
|
icon: String,
|
@@ -4813,8 +4848,8 @@
|
|
4813
4848
|
closeOnClick: Boolean,
|
4814
4849
|
closeOnClickOverlay: Boolean
|
4815
4850
|
};
|
4816
|
-
var stdin_default$
|
4817
|
-
name: name$
|
4851
|
+
var stdin_default$1p = vue.defineComponent({
|
4852
|
+
name: name$1f,
|
4818
4853
|
props: toastProps,
|
4819
4854
|
emits: ["update:show"],
|
4820
4855
|
setup(props, {
|
@@ -4850,13 +4885,13 @@
|
|
4850
4885
|
return vue.createVNode(Icon, {
|
4851
4886
|
"name": icon || type,
|
4852
4887
|
"size": iconSize,
|
4853
|
-
"class": bem$
|
4888
|
+
"class": bem$1b("icon"),
|
4854
4889
|
"classPrefix": iconPrefix
|
4855
4890
|
}, null);
|
4856
4891
|
}
|
4857
4892
|
if (type === "loading") {
|
4858
4893
|
return vue.createVNode(Loading, {
|
4859
|
-
"class": bem$
|
4894
|
+
"class": bem$1b("loading"),
|
4860
4895
|
"size": iconSize,
|
4861
4896
|
"type": loadingType
|
4862
4897
|
}, null);
|
@@ -4869,16 +4904,16 @@
|
|
4869
4904
|
} = props;
|
4870
4905
|
if (slots.message) {
|
4871
4906
|
return vue.createVNode("div", {
|
4872
|
-
"class": bem$
|
4907
|
+
"class": bem$1b("text")
|
4873
4908
|
}, [slots.message()]);
|
4874
4909
|
}
|
4875
4910
|
if (isDef(message) && message !== "") {
|
4876
4911
|
return type === "html" ? vue.createVNode("div", {
|
4877
4912
|
"key": 0,
|
4878
|
-
"class": bem$
|
4913
|
+
"class": bem$1b("text"),
|
4879
4914
|
"innerHTML": String(message)
|
4880
4915
|
}, null) : vue.createVNode("div", {
|
4881
|
-
"class": bem$
|
4916
|
+
"class": bem$1b("text")
|
4882
4917
|
}, [message]);
|
4883
4918
|
}
|
4884
4919
|
};
|
@@ -4894,7 +4929,7 @@
|
|
4894
4929
|
vue.onMounted(toggleClickable);
|
4895
4930
|
vue.onUnmounted(toggleClickable);
|
4896
4931
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
4897
|
-
"class": [bem$
|
4932
|
+
"class": [bem$1b([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
4898
4933
|
[props.type]: !props.icon
|
4899
4934
|
}]), props.className],
|
4900
4935
|
"lockScroll": false,
|
@@ -4995,7 +5030,7 @@
|
|
4995
5030
|
onClosed,
|
4996
5031
|
"onUpdate:show": toggle
|
4997
5032
|
};
|
4998
|
-
return vue.createVNode(stdin_default$
|
5033
|
+
return vue.createVNode(stdin_default$1p, vue.mergeProps(state, attrs), null);
|
4999
5034
|
};
|
5000
5035
|
vue.watch(message, (val) => {
|
5001
5036
|
state.message = val;
|
@@ -5065,8 +5100,8 @@
|
|
5065
5100
|
const allowMultipleToast = (value = true) => {
|
5066
5101
|
allowMultiple = value;
|
5067
5102
|
};
|
5068
|
-
const Toast = withInstall(stdin_default$
|
5069
|
-
const [name$
|
5103
|
+
const Toast = withInstall(stdin_default$1p);
|
5104
|
+
const [name$1e, bem$1a] = createNamespace("switch");
|
5070
5105
|
const switchProps = {
|
5071
5106
|
size: numericProp,
|
5072
5107
|
loading: Boolean,
|
@@ -5083,8 +5118,8 @@
|
|
5083
5118
|
default: false
|
5084
5119
|
}
|
5085
5120
|
};
|
5086
|
-
var stdin_default$
|
5087
|
-
name: name$
|
5121
|
+
var stdin_default$1o = vue.defineComponent({
|
5122
|
+
name: name$1e,
|
5088
5123
|
props: switchProps,
|
5089
5124
|
emits: ["change", "update:modelValue"],
|
5090
5125
|
setup(props, {
|
@@ -5103,7 +5138,7 @@
|
|
5103
5138
|
if (props.loading) {
|
5104
5139
|
const color = isChecked() ? props.activeColor : props.inactiveColor;
|
5105
5140
|
return vue.createVNode(Loading, {
|
5106
|
-
"class": bem$
|
5141
|
+
"class": bem$1a("loading"),
|
5107
5142
|
"color": color
|
5108
5143
|
}, null);
|
5109
5144
|
}
|
@@ -5128,7 +5163,7 @@
|
|
5128
5163
|
};
|
5129
5164
|
return vue.createVNode("div", {
|
5130
5165
|
"role": "switch",
|
5131
|
-
"class": bem$
|
5166
|
+
"class": bem$1a({
|
5132
5167
|
on: checked,
|
5133
5168
|
loading,
|
5134
5169
|
disabled
|
@@ -5138,16 +5173,16 @@
|
|
5138
5173
|
"aria-checked": checked,
|
5139
5174
|
"onClick": onClick
|
5140
5175
|
}, [vue.createVNode("div", {
|
5141
|
-
"class": bem$
|
5176
|
+
"class": bem$1a("node")
|
5142
5177
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
5143
5178
|
};
|
5144
5179
|
}
|
5145
5180
|
});
|
5146
|
-
const Switch = withInstall(stdin_default$
|
5147
|
-
const [name$
|
5181
|
+
const Switch = withInstall(stdin_default$1o);
|
5182
|
+
const [name$1d, bem$19] = createNamespace("address-edit-detail");
|
5148
5183
|
const t$j = createNamespace("address-edit")[2];
|
5149
|
-
var stdin_default$
|
5150
|
-
name: name$
|
5184
|
+
var stdin_default$1n = vue.defineComponent({
|
5185
|
+
name: name$1d,
|
5151
5186
|
props: {
|
5152
5187
|
show: Boolean,
|
5153
5188
|
rows: numericProp,
|
@@ -5181,7 +5216,7 @@
|
|
5181
5216
|
"icon": "location-o",
|
5182
5217
|
"title": express.name,
|
5183
5218
|
"label": express.address,
|
5184
|
-
"class": bem$
|
5219
|
+
"class": bem$19("search-item"),
|
5185
5220
|
"border": false,
|
5186
5221
|
"onClick": () => onSelect(express)
|
5187
5222
|
}, null));
|
@@ -5195,7 +5230,7 @@
|
|
5195
5230
|
"autosize": true,
|
5196
5231
|
"clearable": true,
|
5197
5232
|
"ref": field,
|
5198
|
-
"class": bem$
|
5233
|
+
"class": bem$19(),
|
5199
5234
|
"rows": props.rows,
|
5200
5235
|
"type": "textarea",
|
5201
5236
|
"rules": props.rules,
|
@@ -5212,7 +5247,7 @@
|
|
5212
5247
|
};
|
5213
5248
|
}
|
5214
5249
|
});
|
5215
|
-
const [name$
|
5250
|
+
const [name$1c, bem$18, t$i] = createNamespace("address-edit");
|
5216
5251
|
const DEFAULT_DATA = {
|
5217
5252
|
name: "",
|
5218
5253
|
tel: "",
|
@@ -5252,8 +5287,8 @@
|
|
5252
5287
|
default: isMobile
|
5253
5288
|
}
|
5254
5289
|
};
|
5255
|
-
var stdin_default$
|
5256
|
-
name: name$
|
5290
|
+
var stdin_default$1m = vue.defineComponent({
|
5291
|
+
name: name$1c,
|
5257
5292
|
props: addressEditProps,
|
5258
5293
|
emits: ["save", "focus", "delete", "clickArea", "changeArea", "changeDetail", "selectSearch", "changeDefault"],
|
5259
5294
|
setup(props, {
|
@@ -5363,8 +5398,9 @@
|
|
5363
5398
|
};
|
5364
5399
|
return vue.withDirectives(vue.createVNode(Cell, {
|
5365
5400
|
"center": true,
|
5401
|
+
"border": false,
|
5366
5402
|
"title": t$i("defaultAddress"),
|
5367
|
-
"class": bem$
|
5403
|
+
"class": bem$18("default")
|
5368
5404
|
}, slots2), [[vue.vShow, !hideBottomFields.value]]);
|
5369
5405
|
}
|
5370
5406
|
};
|
@@ -5390,13 +5426,13 @@
|
|
5390
5426
|
disableArea
|
5391
5427
|
} = props;
|
5392
5428
|
return vue.createVNode(Form, {
|
5393
|
-
"class": bem$
|
5429
|
+
"class": bem$18(),
|
5394
5430
|
"onSubmit": onSave
|
5395
5431
|
}, {
|
5396
5432
|
default: () => {
|
5397
5433
|
var _a;
|
5398
5434
|
return [vue.createVNode("div", {
|
5399
|
-
"class": bem$
|
5435
|
+
"class": bem$18("fields")
|
5400
5436
|
}, [vue.createVNode(Field, {
|
5401
5437
|
"modelValue": data.name,
|
5402
5438
|
"onUpdate:modelValue": ($event) => data.name = $event,
|
@@ -5427,7 +5463,7 @@
|
|
5427
5463
|
emit("clickArea");
|
5428
5464
|
showAreaPopup.value = !disableArea;
|
5429
5465
|
}
|
5430
|
-
}, null), [[vue.vShow, props.showArea]]), vue.createVNode(stdin_default$
|
5466
|
+
}, null), [[vue.vShow, props.showArea]]), vue.createVNode(stdin_default$1n, {
|
5431
5467
|
"show": props.showDetail,
|
5432
5468
|
"rows": props.detailRows,
|
5433
5469
|
"rules": rules.value.addressDetail,
|
@@ -5441,19 +5477,19 @@
|
|
5441
5477
|
"onInput": onChangeDetail,
|
5442
5478
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
5443
5479
|
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
5444
|
-
"class": bem$
|
5480
|
+
"class": bem$18("buttons")
|
5445
5481
|
}, [vue.createVNode(Button, {
|
5446
5482
|
"block": true,
|
5447
5483
|
"round": true,
|
5448
5484
|
"type": "primary",
|
5449
5485
|
"text": props.saveButtonText || t$i("save"),
|
5450
|
-
"class": bem$
|
5486
|
+
"class": bem$18("button"),
|
5451
5487
|
"loading": props.isSaving,
|
5452
5488
|
"nativeType": "submit"
|
5453
5489
|
}, null), props.showDelete && vue.createVNode(Button, {
|
5454
5490
|
"block": true,
|
5455
5491
|
"round": true,
|
5456
|
-
"class": bem$
|
5492
|
+
"class": bem$18("button"),
|
5457
5493
|
"loading": props.isDeleting,
|
5458
5494
|
"text": props.deleteButtonText || t$i("delete"),
|
5459
5495
|
"onClick": onDelete
|
@@ -5483,8 +5519,8 @@
|
|
5483
5519
|
};
|
5484
5520
|
}
|
5485
5521
|
});
|
5486
|
-
const AddressEdit = withInstall(stdin_default$
|
5487
|
-
const [name$
|
5522
|
+
const AddressEdit = withInstall(stdin_default$1m);
|
5523
|
+
const [name$1b, bem$17] = createNamespace("radio-group");
|
5488
5524
|
const radioGroupProps = {
|
5489
5525
|
disabled: Boolean,
|
5490
5526
|
iconSize: numericProp,
|
@@ -5492,9 +5528,9 @@
|
|
5492
5528
|
modelValue: unknownProp,
|
5493
5529
|
checkedColor: String
|
5494
5530
|
};
|
5495
|
-
const RADIO_KEY = Symbol(name$
|
5496
|
-
var stdin_default$
|
5497
|
-
name: name$
|
5531
|
+
const RADIO_KEY = Symbol(name$1b);
|
5532
|
+
var stdin_default$1l = vue.defineComponent({
|
5533
|
+
name: name$1b,
|
5498
5534
|
props: radioGroupProps,
|
5499
5535
|
emits: ["change", "update:modelValue"],
|
5500
5536
|
setup(props, {
|
@@ -5514,14 +5550,14 @@
|
|
5514
5550
|
return () => {
|
5515
5551
|
var _a;
|
5516
5552
|
return vue.createVNode("div", {
|
5517
|
-
"class": bem$
|
5553
|
+
"class": bem$17([props.direction]),
|
5518
5554
|
"role": "radiogroup"
|
5519
5555
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5520
5556
|
};
|
5521
5557
|
}
|
5522
5558
|
});
|
5523
|
-
const RadioGroup = withInstall(stdin_default$
|
5524
|
-
const [name$
|
5559
|
+
const RadioGroup = withInstall(stdin_default$1l);
|
5560
|
+
const [name$1a, bem$16] = createNamespace("tag");
|
5525
5561
|
const tagProps = {
|
5526
5562
|
size: String,
|
5527
5563
|
mark: Boolean,
|
@@ -5533,8 +5569,8 @@
|
|
5533
5569
|
textColor: String,
|
5534
5570
|
closeable: Boolean
|
5535
5571
|
};
|
5536
|
-
var stdin_default$
|
5537
|
-
name: name$
|
5572
|
+
var stdin_default$1k = vue.defineComponent({
|
5573
|
+
name: name$1a,
|
5538
5574
|
props: tagProps,
|
5539
5575
|
emits: ["close"],
|
5540
5576
|
setup(props, {
|
@@ -5577,12 +5613,12 @@
|
|
5577
5613
|
}
|
5578
5614
|
const CloseIcon = closeable && vue.createVNode(Icon, {
|
5579
5615
|
"name": "cross",
|
5580
|
-
"class": [bem$
|
5616
|
+
"class": [bem$16("close"), HAPTICS_FEEDBACK],
|
5581
5617
|
"onClick": onClose
|
5582
5618
|
}, null);
|
5583
5619
|
return vue.createVNode("span", {
|
5584
5620
|
"style": getStyle(),
|
5585
|
-
"class": bem$
|
5621
|
+
"class": bem$16([classes, type])
|
5586
5622
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
|
5587
5623
|
};
|
5588
5624
|
return () => vue.createVNode(vue.Transition, {
|
@@ -5592,7 +5628,7 @@
|
|
5592
5628
|
});
|
5593
5629
|
}
|
5594
5630
|
});
|
5595
|
-
const Tag = withInstall(stdin_default$
|
5631
|
+
const Tag = withInstall(stdin_default$1k);
|
5596
5632
|
const checkerProps = {
|
5597
5633
|
name: unknownProp,
|
5598
5634
|
shape: makeStringProp("round"),
|
@@ -5603,7 +5639,7 @@
|
|
5603
5639
|
labelPosition: String,
|
5604
5640
|
labelDisabled: Boolean
|
5605
5641
|
};
|
5606
|
-
var stdin_default$
|
5642
|
+
var stdin_default$1j = vue.defineComponent({
|
5607
5643
|
props: extend({}, checkerProps, {
|
5608
5644
|
bem: makeRequiredProp(Function),
|
5609
5645
|
role: String,
|
@@ -5622,7 +5658,19 @@
|
|
5622
5658
|
return props.parent.props[name2];
|
5623
5659
|
}
|
5624
5660
|
};
|
5625
|
-
const disabled = vue.computed(() =>
|
5661
|
+
const disabled = vue.computed(() => {
|
5662
|
+
if (props.parent && props.bindGroup) {
|
5663
|
+
const disabled2 = getParentProp("disabled") || props.disabled;
|
5664
|
+
if (props.role === "checkbox") {
|
5665
|
+
const checkedCount = getParentProp("modelValue").length;
|
5666
|
+
const max = getParentProp("max");
|
5667
|
+
const overlimit = max && checkedCount >= +max;
|
5668
|
+
return disabled2 || overlimit && !props.checked;
|
5669
|
+
}
|
5670
|
+
return disabled2;
|
5671
|
+
}
|
5672
|
+
return props.disabled;
|
5673
|
+
});
|
5626
5674
|
const direction = vue.computed(() => getParentProp("direction"));
|
5627
5675
|
const iconStyle = vue.computed(() => {
|
5628
5676
|
const checkedColor = props.checkedColor || getParentProp("checkedColor");
|
@@ -5693,9 +5741,9 @@
|
|
5693
5741
|
}
|
5694
5742
|
});
|
5695
5743
|
const radioProps = checkerProps;
|
5696
|
-
const [name$
|
5697
|
-
var stdin_default$
|
5698
|
-
name: name$
|
5744
|
+
const [name$19, bem$15] = createNamespace("radio");
|
5745
|
+
var stdin_default$1i = vue.defineComponent({
|
5746
|
+
name: name$19,
|
5699
5747
|
props: checkerProps,
|
5700
5748
|
emits: ["update:modelValue"],
|
5701
5749
|
setup(props, {
|
@@ -5716,8 +5764,8 @@
|
|
5716
5764
|
emit("update:modelValue", props.name);
|
5717
5765
|
}
|
5718
5766
|
};
|
5719
|
-
return () => vue.createVNode(stdin_default$
|
5720
|
-
"bem": bem$
|
5767
|
+
return () => vue.createVNode(stdin_default$1j, vue.mergeProps({
|
5768
|
+
"bem": bem$15,
|
5721
5769
|
"role": "radio",
|
5722
5770
|
"parent": parent,
|
5723
5771
|
"checked": checked(),
|
@@ -5725,10 +5773,10 @@
|
|
5725
5773
|
}, props), pick(slots, ["default", "icon"]));
|
5726
5774
|
}
|
5727
5775
|
});
|
5728
|
-
const Radio = withInstall(stdin_default$
|
5729
|
-
const [name$
|
5730
|
-
var stdin_default$
|
5731
|
-
name: name$
|
5776
|
+
const Radio = withInstall(stdin_default$1i);
|
5777
|
+
const [name$18, bem$14] = createNamespace("address-item");
|
5778
|
+
var stdin_default$1h = vue.defineComponent({
|
5779
|
+
name: name$18,
|
5732
5780
|
props: {
|
5733
5781
|
address: makeRequiredProp(Object),
|
5734
5782
|
disabled: Boolean,
|
@@ -5748,7 +5796,7 @@
|
|
5748
5796
|
};
|
5749
5797
|
const renderRightIcon = () => vue.createVNode(Icon, {
|
5750
5798
|
"name": "edit",
|
5751
|
-
"class": bem$
|
5799
|
+
"class": bem$14("edit"),
|
5752
5800
|
"onClick": (event) => {
|
5753
5801
|
event.stopPropagation();
|
5754
5802
|
emit("edit");
|
@@ -5763,7 +5811,7 @@
|
|
5763
5811
|
return vue.createVNode(Tag, {
|
5764
5812
|
"type": "primary",
|
5765
5813
|
"round": true,
|
5766
|
-
"class": bem$
|
5814
|
+
"class": bem$14("tag")
|
5767
5815
|
}, {
|
5768
5816
|
default: () => [props.defaultTagText]
|
5769
5817
|
});
|
@@ -5776,9 +5824,9 @@
|
|
5776
5824
|
switchable
|
5777
5825
|
} = props;
|
5778
5826
|
const Info = [vue.createVNode("div", {
|
5779
|
-
"class": bem$
|
5827
|
+
"class": bem$14("name")
|
5780
5828
|
}, [`${address.name} ${address.tel}`, renderTag()]), vue.createVNode("div", {
|
5781
|
-
"class": bem$
|
5829
|
+
"class": bem$14("address")
|
5782
5830
|
}, [address.address])];
|
5783
5831
|
if (switchable && !disabled) {
|
5784
5832
|
return vue.createVNode(Radio, {
|
@@ -5796,13 +5844,13 @@
|
|
5796
5844
|
disabled
|
5797
5845
|
} = props;
|
5798
5846
|
return vue.createVNode("div", {
|
5799
|
-
"class": bem$
|
5847
|
+
"class": bem$14({
|
5800
5848
|
disabled
|
5801
5849
|
}),
|
5802
5850
|
"onClick": onClick
|
5803
5851
|
}, [vue.createVNode(Cell, {
|
5804
5852
|
"border": false,
|
5805
|
-
"titleClass": bem$
|
5853
|
+
"titleClass": bem$14("title")
|
5806
5854
|
}, {
|
5807
5855
|
title: renderContent,
|
5808
5856
|
"right-icon": renderRightIcon
|
@@ -5812,7 +5860,7 @@
|
|
5812
5860
|
};
|
5813
5861
|
}
|
5814
5862
|
});
|
5815
|
-
const [name$
|
5863
|
+
const [name$17, bem$13, t$h] = createNamespace("address-list");
|
5816
5864
|
const addressListProps = {
|
5817
5865
|
list: makeArrayProp(),
|
5818
5866
|
modelValue: numericProp,
|
@@ -5822,8 +5870,8 @@
|
|
5822
5870
|
addButtonText: String,
|
5823
5871
|
defaultTagText: String
|
5824
5872
|
};
|
5825
|
-
var stdin_default$
|
5826
|
-
name: name$
|
5873
|
+
var stdin_default$1g = vue.defineComponent({
|
5874
|
+
name: name$17,
|
5827
5875
|
props: addressListProps,
|
5828
5876
|
emits: ["add", "edit", "select", "clickItem", "editDisabled", "selectDisabled", "update:modelValue"],
|
5829
5877
|
setup(props, {
|
@@ -5839,7 +5887,7 @@
|
|
5839
5887
|
emit("update:modelValue", item.id);
|
5840
5888
|
}
|
5841
5889
|
};
|
5842
|
-
return vue.createVNode(stdin_default$
|
5890
|
+
return vue.createVNode(stdin_default$1h, {
|
5843
5891
|
"key": item.id,
|
5844
5892
|
"address": item,
|
5845
5893
|
"disabled": disabled,
|
@@ -5859,13 +5907,13 @@
|
|
5859
5907
|
}
|
5860
5908
|
};
|
5861
5909
|
const renderBottom = () => vue.createVNode("div", {
|
5862
|
-
"class": [bem$
|
5910
|
+
"class": [bem$13("bottom"), "van-safe-area-bottom"]
|
5863
5911
|
}, [vue.createVNode(Button, {
|
5864
5912
|
"round": true,
|
5865
5913
|
"block": true,
|
5866
5914
|
"type": "primary",
|
5867
5915
|
"text": props.addButtonText || t$h("add"),
|
5868
|
-
"class": bem$
|
5916
|
+
"class": bem$13("add"),
|
5869
5917
|
"onClick": () => emit("add")
|
5870
5918
|
}, null)]);
|
5871
5919
|
return () => {
|
@@ -5873,10 +5921,10 @@
|
|
5873
5921
|
const List2 = renderList(props.list);
|
5874
5922
|
const DisabledList = renderList(props.disabledList, true);
|
5875
5923
|
const DisabledText = props.disabledText && vue.createVNode("div", {
|
5876
|
-
"class": bem$
|
5924
|
+
"class": bem$13("disabled-text")
|
5877
5925
|
}, [props.disabledText]);
|
5878
5926
|
return vue.createVNode("div", {
|
5879
|
-
"class": bem$
|
5927
|
+
"class": bem$13()
|
5880
5928
|
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), vue.createVNode(RadioGroup, {
|
5881
5929
|
"modelValue": props.modelValue
|
5882
5930
|
}, {
|
@@ -5885,7 +5933,7 @@
|
|
5885
5933
|
};
|
5886
5934
|
}
|
5887
5935
|
});
|
5888
|
-
const AddressList = withInstall(stdin_default$
|
5936
|
+
const AddressList = withInstall(stdin_default$1g);
|
5889
5937
|
const hasIntersectionObserver = inBrowser && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
5890
5938
|
const modeType = {
|
5891
5939
|
event: "event",
|
@@ -6038,7 +6086,7 @@
|
|
6038
6086
|
this.caches.shift();
|
6039
6087
|
}
|
6040
6088
|
}
|
6041
|
-
const [name$
|
6089
|
+
const [name$16, bem$12] = createNamespace("back-top");
|
6042
6090
|
const backTopProps = {
|
6043
6091
|
right: numericProp,
|
6044
6092
|
bottom: numericProp,
|
@@ -6051,8 +6099,8 @@
|
|
6051
6099
|
default: "body"
|
6052
6100
|
}
|
6053
6101
|
};
|
6054
|
-
var stdin_default$
|
6055
|
-
name: name$
|
6102
|
+
var stdin_default$1f = vue.defineComponent({
|
6103
|
+
name: name$16,
|
6056
6104
|
inheritAttrs: false,
|
6057
6105
|
props: backTopProps,
|
6058
6106
|
emits: ["click"],
|
@@ -6107,28 +6155,158 @@
|
|
6107
6155
|
vue.watch(() => props.target, updateTarget);
|
6108
6156
|
return () => {
|
6109
6157
|
const Content = vue.createVNode("div", vue.mergeProps({
|
6110
|
-
"ref": root,
|
6111
|
-
"class": bem$
|
6158
|
+
"ref": !props.teleport ? root : void 0,
|
6159
|
+
"class": bem$12({
|
6112
6160
|
active: show.value
|
6113
6161
|
}),
|
6114
6162
|
"style": style.value,
|
6115
6163
|
"onClick": onClick
|
6116
6164
|
}, attrs), [slots.default ? slots.default() : vue.createVNode(Icon, {
|
6117
6165
|
"name": "back-top",
|
6118
|
-
"class": bem$
|
6166
|
+
"class": bem$12("icon")
|
6119
6167
|
}, null)]);
|
6120
6168
|
if (props.teleport) {
|
6121
|
-
return vue.createVNode(
|
6169
|
+
return [vue.createVNode("div", {
|
6170
|
+
"ref": root,
|
6171
|
+
"class": bem$12("placeholder")
|
6172
|
+
}, null), vue.createVNode(vue.Teleport, {
|
6122
6173
|
"to": props.teleport
|
6123
6174
|
}, {
|
6124
6175
|
default: () => [Content]
|
6125
|
-
});
|
6176
|
+
})];
|
6126
6177
|
}
|
6127
6178
|
return Content;
|
6128
6179
|
};
|
6129
6180
|
}
|
6130
6181
|
});
|
6131
|
-
const BackTop = withInstall(stdin_default$
|
6182
|
+
const BackTop = withInstall(stdin_default$1f);
|
6183
|
+
var __async = (__this, __arguments, generator) => {
|
6184
|
+
return new Promise((resolve, reject) => {
|
6185
|
+
var fulfilled = (value) => {
|
6186
|
+
try {
|
6187
|
+
step(generator.next(value));
|
6188
|
+
} catch (e) {
|
6189
|
+
reject(e);
|
6190
|
+
}
|
6191
|
+
};
|
6192
|
+
var rejected = (value) => {
|
6193
|
+
try {
|
6194
|
+
step(generator.throw(value));
|
6195
|
+
} catch (e) {
|
6196
|
+
reject(e);
|
6197
|
+
}
|
6198
|
+
};
|
6199
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
6200
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
6201
|
+
});
|
6202
|
+
};
|
6203
|
+
const barrageProps = {
|
6204
|
+
top: makeNumericProp(10),
|
6205
|
+
rows: makeNumericProp(4),
|
6206
|
+
duration: makeNumericProp(4e3),
|
6207
|
+
autoPlay: truthProp,
|
6208
|
+
delay: makeNumberProp(300),
|
6209
|
+
modelValue: makeArrayProp()
|
6210
|
+
};
|
6211
|
+
const [name$15, bem$11] = createNamespace("barrage");
|
6212
|
+
var stdin_default$1e = vue.defineComponent({
|
6213
|
+
name: name$15,
|
6214
|
+
props: barrageProps,
|
6215
|
+
emits: ["update:modelValue"],
|
6216
|
+
setup(props, {
|
6217
|
+
emit,
|
6218
|
+
slots
|
6219
|
+
}) {
|
6220
|
+
const barrageWrapper = vue.ref();
|
6221
|
+
const className = bem$11("item");
|
6222
|
+
const total = vue.ref(0);
|
6223
|
+
const barrageItems = [];
|
6224
|
+
const createBarrageItem = (text, delay = props.delay) => {
|
6225
|
+
const item = document.createElement("span");
|
6226
|
+
item.className = className;
|
6227
|
+
item.innerText = String(text);
|
6228
|
+
item.style.animationDuration = `${props.duration}ms`;
|
6229
|
+
item.style.animationDelay = `${delay}ms`;
|
6230
|
+
item.style.animationName = "van-barrage";
|
6231
|
+
item.style.animationTimingFunction = "linear";
|
6232
|
+
return item;
|
6233
|
+
};
|
6234
|
+
const isInitBarrage = vue.ref(true);
|
6235
|
+
const isPlay = vue.ref(props.autoPlay);
|
6236
|
+
const appendBarrageItem = ({
|
6237
|
+
id,
|
6238
|
+
text
|
6239
|
+
}, i) => {
|
6240
|
+
var _a;
|
6241
|
+
const item = createBarrageItem(text, isInitBarrage.value ? i * props.delay : void 0);
|
6242
|
+
if (!props.autoPlay && isPlay.value === false) {
|
6243
|
+
item.style.animationPlayState = "paused";
|
6244
|
+
}
|
6245
|
+
(_a = barrageWrapper.value) == null ? void 0 : _a.append(item);
|
6246
|
+
total.value++;
|
6247
|
+
const top2 = (total.value - 1) % +props.rows * item.offsetHeight + +props.top;
|
6248
|
+
item.style.top = `${top2}px`;
|
6249
|
+
item.dataset.id = String(id);
|
6250
|
+
barrageItems.push(item);
|
6251
|
+
item.addEventListener("animationend", () => {
|
6252
|
+
emit("update:modelValue", [...props.modelValue].filter((v) => String(v.id) !== item.dataset.id));
|
6253
|
+
});
|
6254
|
+
};
|
6255
|
+
const updateBarrages = (newValue, oldValue) => {
|
6256
|
+
const map = new Map(oldValue.map((item) => [item.id, item]));
|
6257
|
+
newValue.forEach((item, i) => {
|
6258
|
+
if (map.has(item.id)) {
|
6259
|
+
map.delete(item.id);
|
6260
|
+
} else {
|
6261
|
+
appendBarrageItem(item, i);
|
6262
|
+
}
|
6263
|
+
});
|
6264
|
+
map.forEach((item) => {
|
6265
|
+
const index = barrageItems.findIndex((span) => span.dataset.id === String(item.id));
|
6266
|
+
if (index > -1) {
|
6267
|
+
barrageItems[index].remove();
|
6268
|
+
barrageItems.splice(index, 1);
|
6269
|
+
}
|
6270
|
+
});
|
6271
|
+
isInitBarrage.value = false;
|
6272
|
+
};
|
6273
|
+
vue.watch(() => props.modelValue.slice(), (newValue, oldValue) => updateBarrages(newValue != null ? newValue : [], oldValue != null ? oldValue : []), {
|
6274
|
+
deep: true
|
6275
|
+
});
|
6276
|
+
const rootStyle = vue.ref({});
|
6277
|
+
vue.onMounted(() => __async(this, null, function* () {
|
6278
|
+
var _a;
|
6279
|
+
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
6280
|
+
yield vue.nextTick();
|
6281
|
+
updateBarrages(props.modelValue, []);
|
6282
|
+
}));
|
6283
|
+
const play = () => {
|
6284
|
+
isPlay.value = true;
|
6285
|
+
barrageItems.forEach((item) => {
|
6286
|
+
item.style.animationPlayState = "running";
|
6287
|
+
});
|
6288
|
+
};
|
6289
|
+
const pause = () => {
|
6290
|
+
isPlay.value = false;
|
6291
|
+
barrageItems.forEach((item) => {
|
6292
|
+
item.style.animationPlayState = "paused";
|
6293
|
+
});
|
6294
|
+
};
|
6295
|
+
useExpose({
|
6296
|
+
play,
|
6297
|
+
pause
|
6298
|
+
});
|
6299
|
+
return () => {
|
6300
|
+
var _a;
|
6301
|
+
return vue.createVNode("div", {
|
6302
|
+
"class": bem$11(),
|
6303
|
+
"ref": barrageWrapper,
|
6304
|
+
"style": rootStyle.value
|
6305
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
6306
|
+
};
|
6307
|
+
}
|
6308
|
+
});
|
6309
|
+
const Barrage = withInstall(stdin_default$1e);
|
6132
6310
|
const [name$14, bem$10, t$g] = createNamespace("calendar");
|
6133
6311
|
const formatMonthTitle = (date) => t$g("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
6134
6312
|
function compareMonth(date1, date2) {
|
@@ -7290,6 +7468,7 @@
|
|
7290
7468
|
}) {
|
7291
7469
|
const tabs = vue.ref([]);
|
7292
7470
|
const activeTab = vue.ref(0);
|
7471
|
+
const [selectedElementRefs, setSelectedElementRefs] = useRefs();
|
7293
7472
|
const {
|
7294
7473
|
text: textKey,
|
7295
7474
|
value: valueKey,
|
@@ -7408,6 +7587,7 @@
|
|
7408
7587
|
selected
|
7409
7588
|
}) : vue.createVNode("span", null, [option[textKey]]);
|
7410
7589
|
return vue.createVNode("li", {
|
7590
|
+
"ref": selected ? setSelectedElementRefs(tabIndex) : void 0,
|
7411
7591
|
"role": "menuitemradio",
|
7412
7592
|
"class": [bem$Z("option", {
|
7413
7593
|
selected,
|
@@ -7464,7 +7644,18 @@
|
|
7464
7644
|
}, {
|
7465
7645
|
default: () => [tabs.value.map(renderTab)]
|
7466
7646
|
});
|
7647
|
+
const scrollIntoView = (el) => {
|
7648
|
+
const scrollParent = el.parentElement;
|
7649
|
+
if (scrollParent) {
|
7650
|
+
scrollParent.scrollTop = el.offsetTop - (scrollParent.offsetHeight - el.offsetHeight) / 2;
|
7651
|
+
}
|
7652
|
+
};
|
7467
7653
|
updateTabs();
|
7654
|
+
vue.watch(activeTab, (value) => {
|
7655
|
+
const el = selectedElementRefs.value[value];
|
7656
|
+
if (el)
|
7657
|
+
scrollIntoView(el);
|
7658
|
+
});
|
7468
7659
|
vue.watch(() => props.options, updateTabs, {
|
7469
7660
|
deep: true
|
7470
7661
|
});
|
@@ -7648,7 +7839,7 @@
|
|
7648
7839
|
checked
|
7649
7840
|
});
|
7650
7841
|
useCustomFieldValue(() => props.modelValue);
|
7651
|
-
return () => vue.createVNode(stdin_default$
|
7842
|
+
return () => vue.createVNode(stdin_default$1j, vue.mergeProps({
|
7652
7843
|
"bem": bem$W,
|
7653
7844
|
"role": "checkbox",
|
7654
7845
|
"parent": parent,
|
@@ -8152,7 +8343,7 @@
|
|
8152
8343
|
}
|
8153
8344
|
});
|
8154
8345
|
const CollapseItem = withInstall(stdin_default$$);
|
8155
|
-
const ConfigProvider = withInstall(stdin_default$
|
8346
|
+
const ConfigProvider = withInstall(stdin_default$1M);
|
8156
8347
|
const [name$R, bem$Q, t$e] = createNamespace("contact-card");
|
8157
8348
|
const contactCardProps = {
|
8158
8349
|
tel: String,
|
@@ -8317,7 +8508,7 @@
|
|
8317
8508
|
const renderRightIcon = () => vue.createVNode(Radio, {
|
8318
8509
|
"class": bem$O("radio"),
|
8319
8510
|
"name": item.id,
|
8320
|
-
"iconSize":
|
8511
|
+
"iconSize": 18
|
8321
8512
|
}, null);
|
8322
8513
|
const renderEditIcon = () => vue.createVNode(Icon, {
|
8323
8514
|
"name": "edit",
|
@@ -9101,6 +9292,7 @@
|
|
9101
9292
|
slots
|
9102
9293
|
}) {
|
9103
9294
|
const currentValues = vue.ref(props.modelValue);
|
9295
|
+
const updatedByExternalSources = vue.ref(false);
|
9104
9296
|
const genYearOptions = () => {
|
9105
9297
|
const minYear = props.minDate.getFullYear();
|
9106
9298
|
const maxYear = props.maxDate.getFullYear();
|
@@ -9116,7 +9308,7 @@
|
|
9116
9308
|
columnsType
|
9117
9309
|
} = props;
|
9118
9310
|
const index = columnsType.indexOf(type);
|
9119
|
-
const value = currentValues.value[index];
|
9311
|
+
const value = updatedByExternalSources.value ? props.modelValue[index] : currentValues.value[index];
|
9120
9312
|
if (value) {
|
9121
9313
|
return +value;
|
9122
9314
|
}
|
@@ -9159,11 +9351,13 @@
|
|
9159
9351
|
emit("update:modelValue", newValues);
|
9160
9352
|
}
|
9161
9353
|
});
|
9162
|
-
vue.watch(() => props.modelValue, (newValues) => {
|
9354
|
+
vue.watch(() => props.modelValue, (newValues, oldValues) => {
|
9355
|
+
updatedByExternalSources.value = isSameValue(oldValues, currentValues.value);
|
9163
9356
|
newValues = formatValueRange(newValues, columns.value);
|
9164
9357
|
if (!isSameValue(newValues, currentValues.value)) {
|
9165
9358
|
currentValues.value = newValues;
|
9166
9359
|
}
|
9360
|
+
updatedByExternalSources.value = false;
|
9167
9361
|
}, {
|
9168
9362
|
immediate: true
|
9169
9363
|
});
|
@@ -9466,6 +9660,7 @@
|
|
9466
9660
|
const dividerProps = {
|
9467
9661
|
dashed: Boolean,
|
9468
9662
|
hairline: truthProp,
|
9663
|
+
vertical: Boolean,
|
9469
9664
|
contentPosition: makeStringProp("center")
|
9470
9665
|
};
|
9471
9666
|
var stdin_default$Q = vue.defineComponent({
|
@@ -9481,9 +9676,10 @@
|
|
9481
9676
|
"class": bem$H({
|
9482
9677
|
dashed: props.dashed,
|
9483
9678
|
hairline: props.hairline,
|
9484
|
-
|
9679
|
+
vertical: props.vertical,
|
9680
|
+
[`content-${props.contentPosition}`]: !!slots.default && !props.vertical
|
9485
9681
|
})
|
9486
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9682
|
+
}, [!props.vertical && ((_a = slots.default) == null ? void 0 : _a.call(slots))]);
|
9487
9683
|
};
|
9488
9684
|
}
|
9489
9685
|
});
|
@@ -9957,7 +10153,12 @@
|
|
9957
10153
|
});
|
9958
10154
|
const GridItem = withInstall(stdin_default$M);
|
9959
10155
|
const getDistance = (touches) => Math.sqrt((touches[0].clientX - touches[1].clientX) ** 2 + (touches[0].clientY - touches[1].clientY) ** 2);
|
10156
|
+
const getCenter = (touches) => ({
|
10157
|
+
x: (touches[0].clientX + touches[1].clientX) / 2,
|
10158
|
+
y: (touches[0].clientY + touches[1].clientY) / 2
|
10159
|
+
});
|
9960
10160
|
const bem$C = createNamespace("image-preview")[1];
|
10161
|
+
const longImageRatio = 2.6;
|
9961
10162
|
var stdin_default$L = vue.defineComponent({
|
9962
10163
|
props: {
|
9963
10164
|
src: String,
|
@@ -9980,20 +10181,14 @@
|
|
9980
10181
|
moveY: 0,
|
9981
10182
|
moving: false,
|
9982
10183
|
zooming: false,
|
9983
|
-
imageRatio: 0
|
9984
|
-
displayWidth: 0,
|
9985
|
-
displayHeight: 0
|
10184
|
+
imageRatio: 0
|
9986
10185
|
});
|
9987
10186
|
const touch = useTouch();
|
10187
|
+
const imageRef = vue.ref();
|
9988
10188
|
const swipeItem = vue.ref();
|
9989
|
-
const vertical = vue.
|
9990
|
-
|
9991
|
-
|
9992
|
-
rootHeight
|
9993
|
-
} = props;
|
9994
|
-
const rootRatio = rootHeight / rootWidth;
|
9995
|
-
return state.imageRatio > rootRatio;
|
9996
|
-
});
|
10189
|
+
const vertical = vue.ref(false);
|
10190
|
+
const isLongImage = vue.ref(false);
|
10191
|
+
let initialMoveY = 0;
|
9997
10192
|
const imageStyle = vue.computed(() => {
|
9998
10193
|
const {
|
9999
10194
|
scale,
|
@@ -10005,10 +10200,8 @@
|
|
10005
10200
|
const style = {
|
10006
10201
|
transitionDuration: zooming || moving ? "0s" : ".3s"
|
10007
10202
|
};
|
10008
|
-
if (scale !== 1) {
|
10009
|
-
|
10010
|
-
const offsetY = moveY / scale;
|
10011
|
-
style.transform = `scale(${scale}, ${scale}) translate(${offsetX}px, ${offsetY}px)`;
|
10203
|
+
if (scale !== 1 || isLongImage.value) {
|
10204
|
+
style.transform = `matrix(${scale}, 0, 0, ${scale}, ${moveX}, ${moveY})`;
|
10012
10205
|
}
|
10013
10206
|
return style;
|
10014
10207
|
});
|
@@ -10034,10 +10227,26 @@
|
|
10034
10227
|
}
|
10035
10228
|
return 0;
|
10036
10229
|
});
|
10037
|
-
const setScale = (scale) => {
|
10230
|
+
const setScale = (scale, center) => {
|
10231
|
+
var _a;
|
10038
10232
|
scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
|
10039
10233
|
if (scale !== state.scale) {
|
10234
|
+
const ratio = scale / state.scale;
|
10040
10235
|
state.scale = scale;
|
10236
|
+
if (center) {
|
10237
|
+
const imageRect = useRect((_a = imageRef.value) == null ? void 0 : _a.$el);
|
10238
|
+
const origin = {
|
10239
|
+
x: imageRect.width * 0.5,
|
10240
|
+
y: imageRect.height * 0.5
|
10241
|
+
};
|
10242
|
+
const moveX = state.moveX - (center.x - imageRect.left - origin.x) * (ratio - 1);
|
10243
|
+
const moveY = state.moveY - (center.y - imageRect.top - origin.y) * (ratio - 1);
|
10244
|
+
state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
|
10245
|
+
state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
|
10246
|
+
} else {
|
10247
|
+
state.moveX = 0;
|
10248
|
+
state.moveY = isLongImage.value ? initialMoveY : 0;
|
10249
|
+
}
|
10041
10250
|
emit("scale", {
|
10042
10251
|
scale,
|
10043
10252
|
index: props.active
|
@@ -10046,20 +10255,20 @@
|
|
10046
10255
|
};
|
10047
10256
|
const resetScale = () => {
|
10048
10257
|
setScale(1);
|
10049
|
-
state.moveX = 0;
|
10050
|
-
state.moveY = 0;
|
10051
10258
|
};
|
10052
10259
|
const toggleScale = () => {
|
10053
10260
|
const scale = state.scale > 1 ? 1 : 2;
|
10054
|
-
setScale(scale
|
10055
|
-
|
10056
|
-
|
10261
|
+
setScale(scale, scale === 2 || isLongImage.value ? {
|
10262
|
+
x: touch.startX.value,
|
10263
|
+
y: touch.startY.value
|
10264
|
+
} : void 0);
|
10057
10265
|
};
|
10058
10266
|
let fingerNum;
|
10059
10267
|
let startMoveX;
|
10060
10268
|
let startMoveY;
|
10061
10269
|
let startScale;
|
10062
10270
|
let startDistance;
|
10271
|
+
let lastCenter;
|
10063
10272
|
let doubleTapTimer;
|
10064
10273
|
let touchStartTime;
|
10065
10274
|
let isImageMoved = false;
|
@@ -10079,11 +10288,11 @@
|
|
10079
10288
|
startMoveY = state.moveY;
|
10080
10289
|
touchStartTime = Date.now();
|
10081
10290
|
isImageMoved = false;
|
10082
|
-
state.moving = fingerNum === 1 && state.scale !== 1;
|
10291
|
+
state.moving = fingerNum === 1 && (state.scale !== 1 || isLongImage.value);
|
10083
10292
|
state.zooming = fingerNum === 2 && !offsetX.value;
|
10084
10293
|
if (state.zooming) {
|
10085
10294
|
startScale = state.scale;
|
10086
|
-
startDistance = getDistance(
|
10295
|
+
startDistance = getDistance(touches);
|
10087
10296
|
}
|
10088
10297
|
};
|
10089
10298
|
const onTouchMove = (event) => {
|
@@ -10112,7 +10321,8 @@
|
|
10112
10321
|
if (touches.length === 2) {
|
10113
10322
|
const distance = getDistance(touches);
|
10114
10323
|
const scale = startScale * distance / startDistance;
|
10115
|
-
|
10324
|
+
lastCenter = getCenter(touches);
|
10325
|
+
setScale(scale, lastCenter);
|
10116
10326
|
}
|
10117
10327
|
}
|
10118
10328
|
};
|
@@ -10166,7 +10376,7 @@
|
|
10166
10376
|
}
|
10167
10377
|
const maxZoom = +props.maxZoom;
|
10168
10378
|
if (state.scale > maxZoom) {
|
10169
|
-
|
10379
|
+
setScale(maxZoom, lastCenter);
|
10170
10380
|
}
|
10171
10381
|
}
|
10172
10382
|
}
|
@@ -10174,12 +10384,30 @@
|
|
10174
10384
|
checkTap();
|
10175
10385
|
touch.reset();
|
10176
10386
|
};
|
10387
|
+
const resize = () => {
|
10388
|
+
const {
|
10389
|
+
rootWidth,
|
10390
|
+
rootHeight
|
10391
|
+
} = props;
|
10392
|
+
const rootRatio = rootHeight / rootWidth;
|
10393
|
+
const {
|
10394
|
+
imageRatio
|
10395
|
+
} = state;
|
10396
|
+
vertical.value = state.imageRatio > rootRatio && imageRatio < longImageRatio;
|
10397
|
+
isLongImage.value = state.imageRatio > rootRatio && imageRatio >= longImageRatio;
|
10398
|
+
if (isLongImage.value) {
|
10399
|
+
initialMoveY = (imageRatio * rootWidth - rootHeight) / 2;
|
10400
|
+
state.moveY = initialMoveY;
|
10401
|
+
}
|
10402
|
+
resetScale();
|
10403
|
+
};
|
10177
10404
|
const onLoad = (event) => {
|
10178
10405
|
const {
|
10179
10406
|
naturalWidth,
|
10180
10407
|
naturalHeight
|
10181
10408
|
} = event.target;
|
10182
10409
|
state.imageRatio = naturalHeight / naturalWidth;
|
10410
|
+
resize();
|
10183
10411
|
};
|
10184
10412
|
vue.watch(() => props.active, resetScale);
|
10185
10413
|
vue.watch(() => props.show, (value) => {
|
@@ -10187,6 +10415,7 @@
|
|
10187
10415
|
resetScale();
|
10188
10416
|
}
|
10189
10417
|
});
|
10418
|
+
vue.watch(() => [props.rootWidth, props.rootHeight], resize);
|
10190
10419
|
useEventListener("touchmove", onTouchMove, {
|
10191
10420
|
target: vue.computed(() => {
|
10192
10421
|
var _a;
|
@@ -10211,6 +10440,7 @@
|
|
10211
10440
|
}, [slots.image({
|
10212
10441
|
src: props.src
|
10213
10442
|
})]) : vue.createVNode(Image$1, {
|
10443
|
+
"ref": imageRef,
|
10214
10444
|
"src": props.src,
|
10215
10445
|
"fit": "contain",
|
10216
10446
|
"class": bem$C("image", {
|
@@ -11737,7 +11967,7 @@
|
|
11737
11967
|
}
|
11738
11968
|
});
|
11739
11969
|
const PasswordInput = withInstall(stdin_default$A);
|
11740
|
-
const PickerGroup = withInstall(stdin_default$
|
11970
|
+
const PickerGroup = withInstall(stdin_default$1v);
|
11741
11971
|
function getWindow(node) {
|
11742
11972
|
if (node == null) {
|
11743
11973
|
return window;
|
@@ -12677,20 +12907,6 @@
|
|
12677
12907
|
requires: ["popperOffsets"],
|
12678
12908
|
fn: offset
|
12679
12909
|
};
|
12680
|
-
const useSyncPropRef = (getProp, setProp) => {
|
12681
|
-
const propRef = vue.ref(getProp());
|
12682
|
-
vue.watch(getProp, (value) => {
|
12683
|
-
if (value !== propRef.value) {
|
12684
|
-
propRef.value = value;
|
12685
|
-
}
|
12686
|
-
});
|
12687
|
-
vue.watch(propRef, (value) => {
|
12688
|
-
if (value !== getProp()) {
|
12689
|
-
setProp(value);
|
12690
|
-
}
|
12691
|
-
});
|
12692
|
-
return propRef;
|
12693
|
-
};
|
12694
12910
|
const [name$r, bem$q] = createNamespace("popover");
|
12695
12911
|
const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
12696
12912
|
const popoverProps = {
|
@@ -13667,6 +13883,7 @@
|
|
13667
13883
|
penColor: makeStringProp("#000"),
|
13668
13884
|
lineWidth: makeNumberProp(3),
|
13669
13885
|
clearButtonText: String,
|
13886
|
+
backgroundColor: makeStringProp(""),
|
13670
13887
|
confirmButtonText: String
|
13671
13888
|
};
|
13672
13889
|
const hasCanvasSupport = () => {
|
@@ -13686,7 +13903,8 @@
|
|
13686
13903
|
const state = vue.reactive({
|
13687
13904
|
width: 0,
|
13688
13905
|
height: 0,
|
13689
|
-
ctx: null
|
13906
|
+
ctx: null,
|
13907
|
+
ratio: inBrowser$1 ? window.devicePixelRatio : 1
|
13690
13908
|
});
|
13691
13909
|
let canvasRect;
|
13692
13910
|
const isRenderCanvas = inBrowser$1 ? hasCanvasSupport() : true;
|
@@ -13695,7 +13913,7 @@
|
|
13695
13913
|
return false;
|
13696
13914
|
}
|
13697
13915
|
state.ctx.beginPath();
|
13698
|
-
state.ctx.lineWidth = props.lineWidth;
|
13916
|
+
state.ctx.lineWidth = props.lineWidth * state.ratio;
|
13699
13917
|
state.ctx.strokeStyle = props.penColor;
|
13700
13918
|
canvasRect = useRect(canvasRef);
|
13701
13919
|
emit("start");
|
@@ -13707,8 +13925,8 @@
|
|
13707
13925
|
}
|
13708
13926
|
preventDefault(event);
|
13709
13927
|
const touch = event.touches[0];
|
13710
|
-
const mouseX = touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0);
|
13711
|
-
const mouseY = touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0);
|
13928
|
+
const mouseX = (touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0)) * state.ratio;
|
13929
|
+
const mouseY = (touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0)) * state.ratio;
|
13712
13930
|
state.ctx.lineCap = "round";
|
13713
13931
|
state.ctx.lineJoin = "round";
|
13714
13932
|
(_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
|
@@ -13725,13 +13943,23 @@
|
|
13725
13943
|
empty.height = canvas.height;
|
13726
13944
|
return canvas.toDataURL() === empty.toDataURL();
|
13727
13945
|
};
|
13946
|
+
const setCanvasBgColor = () => {
|
13947
|
+
if (state.ctx && props.backgroundColor) {
|
13948
|
+
state.ctx.fillStyle = props.backgroundColor;
|
13949
|
+
state.ctx.fillRect(0, 0, state.width, state.height);
|
13950
|
+
}
|
13951
|
+
};
|
13728
13952
|
const submit = () => {
|
13953
|
+
var _a, _b;
|
13729
13954
|
const canvas = canvasRef.value;
|
13730
13955
|
if (!canvas) {
|
13731
13956
|
return;
|
13732
13957
|
}
|
13733
13958
|
const isEmpty = isCanvasEmpty(canvas);
|
13734
|
-
const image = isEmpty ? "" :
|
13959
|
+
const image = isEmpty ? "" : ((_b = (_a = {
|
13960
|
+
jpg: () => canvas.toDataURL("image/jpeg", 0.8),
|
13961
|
+
jpeg: () => canvas.toDataURL("image/jpeg", 0.8)
|
13962
|
+
})[props.type]) == null ? void 0 : _b.call(_a)) || canvas.toDataURL(`image/${props.type}`);
|
13735
13963
|
emit("submit", {
|
13736
13964
|
image,
|
13737
13965
|
canvas
|
@@ -13741,6 +13969,7 @@
|
|
13741
13969
|
if (state.ctx) {
|
13742
13970
|
state.ctx.clearRect(0, 0, state.width, state.height);
|
13743
13971
|
state.ctx.closePath();
|
13972
|
+
setCanvasBgColor();
|
13744
13973
|
}
|
13745
13974
|
emit("clear");
|
13746
13975
|
};
|
@@ -13748,8 +13977,11 @@
|
|
13748
13977
|
var _a, _b, _c;
|
13749
13978
|
if (isRenderCanvas) {
|
13750
13979
|
state.ctx = (_a = canvasRef.value) == null ? void 0 : _a.getContext("2d");
|
13751
|
-
state.width = ((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0;
|
13752
|
-
state.height = ((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0;
|
13980
|
+
state.width = (((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0) * state.ratio;
|
13981
|
+
state.height = (((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0) * state.ratio;
|
13982
|
+
vue.nextTick(() => {
|
13983
|
+
setCanvasBgColor();
|
13984
|
+
});
|
13753
13985
|
}
|
13754
13986
|
});
|
13755
13987
|
return () => vue.createVNode("div", {
|
@@ -15451,10 +15683,11 @@
|
|
15451
15683
|
imageFit: String,
|
15452
15684
|
lazyLoad: Boolean,
|
15453
15685
|
deletable: Boolean,
|
15686
|
+
reupload: Boolean,
|
15454
15687
|
previewSize: [Number, String, Array],
|
15455
15688
|
beforeDelete: Function
|
15456
15689
|
},
|
15457
|
-
emits: ["delete", "preview"],
|
15690
|
+
emits: ["delete", "preview", "reupload"],
|
15458
15691
|
setup(props, {
|
15459
15692
|
emit,
|
15460
15693
|
slots
|
@@ -15496,6 +15729,7 @@
|
|
15496
15729
|
});
|
15497
15730
|
};
|
15498
15731
|
const onPreview = () => emit("preview");
|
15732
|
+
const onReupload = () => emit("reupload");
|
15499
15733
|
const renderDeleteIcon = () => {
|
15500
15734
|
if (props.deletable && props.item.status !== "uploading") {
|
15501
15735
|
const slot = slots["preview-delete"];
|
@@ -15531,7 +15765,8 @@
|
|
15531
15765
|
item,
|
15532
15766
|
lazyLoad,
|
15533
15767
|
imageFit,
|
15534
|
-
previewSize
|
15768
|
+
previewSize,
|
15769
|
+
reupload
|
15535
15770
|
} = props;
|
15536
15771
|
if (isImageFile(item)) {
|
15537
15772
|
return vue.createVNode(Image$1, {
|
@@ -15541,7 +15776,7 @@
|
|
15541
15776
|
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
15542
15777
|
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
15543
15778
|
"lazyLoad": lazyLoad,
|
15544
|
-
"onClick": onPreview
|
15779
|
+
"onClick": reupload ? onReupload : onPreview
|
15545
15780
|
}, {
|
15546
15781
|
default: renderCover
|
15547
15782
|
});
|
@@ -15575,6 +15810,7 @@
|
|
15575
15810
|
uploadIcon: makeStringProp("photograph"),
|
15576
15811
|
uploadText: String,
|
15577
15812
|
deletable: truthProp,
|
15813
|
+
reupload: Boolean,
|
15578
15814
|
afterRead: Function,
|
15579
15815
|
showUpload: truthProp,
|
15580
15816
|
modelValue: makeArrayProp(),
|
@@ -15592,13 +15828,14 @@
|
|
15592
15828
|
var stdin_default$5 = vue.defineComponent({
|
15593
15829
|
name: name$1,
|
15594
15830
|
props: uploaderProps,
|
15595
|
-
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "update:modelValue"],
|
15831
|
+
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
|
15596
15832
|
setup(props, {
|
15597
15833
|
emit,
|
15598
15834
|
slots
|
15599
15835
|
}) {
|
15600
15836
|
const inputRef = vue.ref();
|
15601
15837
|
const urls = [];
|
15838
|
+
const reuploadIndex = vue.ref(-1);
|
15602
15839
|
const getDetail = (index = props.modelValue.length) => ({
|
15603
15840
|
name: props.name,
|
15604
15841
|
index
|
@@ -15624,7 +15861,14 @@
|
|
15624
15861
|
}
|
15625
15862
|
}
|
15626
15863
|
items = vue.reactive(items);
|
15627
|
-
|
15864
|
+
if (reuploadIndex.value > -1) {
|
15865
|
+
const arr = [...props.modelValue];
|
15866
|
+
arr.splice(reuploadIndex.value, 1, items);
|
15867
|
+
emit("update:modelValue", arr);
|
15868
|
+
reuploadIndex.value = -1;
|
15869
|
+
} else {
|
15870
|
+
emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
|
15871
|
+
}
|
15628
15872
|
if (props.afterRead) {
|
15629
15873
|
props.afterRead(items, getDetail());
|
15630
15874
|
}
|
@@ -15725,15 +15969,20 @@
|
|
15725
15969
|
emit("update:modelValue", fileList);
|
15726
15970
|
emit("delete", item, getDetail(index));
|
15727
15971
|
};
|
15972
|
+
const reuploadImage = (index) => {
|
15973
|
+
chooseFile();
|
15974
|
+
reuploadIndex.value = index;
|
15975
|
+
};
|
15728
15976
|
const renderPreviewItem = (item, index) => {
|
15729
|
-
const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
|
15977
|
+
const needPickData = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"];
|
15730
15978
|
const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
|
15731
15979
|
return vue.createVNode(stdin_default$6, vue.mergeProps({
|
15732
15980
|
"item": item,
|
15733
15981
|
"index": index,
|
15734
|
-
"onClick": () => emit("clickPreview", item, getDetail(index)),
|
15982
|
+
"onClick": () => emit(props.reupload ? "clickReupload" : "clickPreview", item, getDetail(index)),
|
15735
15983
|
"onDelete": () => deleteFile(item, index),
|
15736
|
-
"onPreview": () => previewImage(item)
|
15984
|
+
"onPreview": () => previewImage(item),
|
15985
|
+
"onReupload": () => reuploadImage(index)
|
15737
15986
|
}, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
|
15738
15987
|
};
|
15739
15988
|
const renderPreviewList = () => {
|
@@ -15743,24 +15992,25 @@
|
|
15743
15992
|
};
|
15744
15993
|
const onClickUpload = (event) => emit("clickUpload", event);
|
15745
15994
|
const renderUpload = () => {
|
15746
|
-
if (props.modelValue.length >= +props.maxCount) {
|
15995
|
+
if (props.modelValue.length >= +props.maxCount && !props.reupload) {
|
15747
15996
|
return;
|
15748
15997
|
}
|
15998
|
+
const hideUploader = props.modelValue.length >= +props.maxCount && props.reupload;
|
15749
15999
|
const Input = props.readonly ? null : vue.createVNode("input", {
|
15750
16000
|
"ref": inputRef,
|
15751
16001
|
"type": "file",
|
15752
16002
|
"class": bem$1("input"),
|
15753
16003
|
"accept": props.accept,
|
15754
16004
|
"capture": props.capture,
|
15755
|
-
"multiple": props.multiple,
|
16005
|
+
"multiple": props.multiple && reuploadIndex.value === -1,
|
15756
16006
|
"disabled": props.disabled,
|
15757
16007
|
"onChange": onChange
|
15758
16008
|
}, null);
|
15759
16009
|
if (slots.default) {
|
15760
|
-
return vue.createVNode("div", {
|
16010
|
+
return vue.withDirectives(vue.createVNode("div", {
|
15761
16011
|
"class": bem$1("input-wrapper"),
|
15762
16012
|
"onClick": onClickUpload
|
15763
|
-
}, [slots.default(), Input]);
|
16013
|
+
}, [slots.default(), Input]), [[vue.vShow, !hideUploader]]);
|
15764
16014
|
}
|
15765
16015
|
return vue.withDirectives(vue.createVNode("div", {
|
15766
16016
|
"class": bem$1("upload", {
|
@@ -15773,7 +16023,7 @@
|
|
15773
16023
|
"class": bem$1("upload-icon")
|
15774
16024
|
}, null), props.uploadText && vue.createVNode("span", {
|
15775
16025
|
"class": bem$1("upload-text")
|
15776
|
-
}, [props.uploadText]), Input]), [[vue.vShow, props.showUpload]]);
|
16026
|
+
}, [props.uploadText]), Input]), [[vue.vShow, props.showUpload && !hideUploader]]);
|
15777
16027
|
};
|
15778
16028
|
const chooseFile = () => {
|
15779
16029
|
if (inputRef.value && !props.disabled) {
|
@@ -16783,7 +17033,7 @@
|
|
16783
17033
|
});
|
16784
17034
|
}
|
16785
17035
|
};
|
16786
|
-
const version = "4.
|
17036
|
+
const version = "4.4.0";
|
16787
17037
|
function install(app) {
|
16788
17038
|
const components = [
|
16789
17039
|
ActionBar,
|
@@ -16795,6 +17045,7 @@
|
|
16795
17045
|
Area,
|
16796
17046
|
BackTop,
|
16797
17047
|
Badge,
|
17048
|
+
Barrage,
|
16798
17049
|
Button,
|
16799
17050
|
Calendar,
|
16800
17051
|
Card,
|
@@ -16904,6 +17155,7 @@
|
|
16904
17155
|
exports2.Area = Area;
|
16905
17156
|
exports2.BackTop = BackTop;
|
16906
17157
|
exports2.Badge = Badge;
|
17158
|
+
exports2.Barrage = Barrage;
|
16907
17159
|
exports2.Button = Button;
|
16908
17160
|
exports2.Calendar = Calendar;
|
16909
17161
|
exports2.Card = Card;
|
@@ -17003,6 +17255,7 @@
|
|
17003
17255
|
exports2.areaProps = areaProps;
|
17004
17256
|
exports2.backTopProps = backTopProps;
|
17005
17257
|
exports2.badgeProps = badgeProps;
|
17258
|
+
exports2.barrageProps = barrageProps;
|
17006
17259
|
exports2.buttonProps = buttonProps;
|
17007
17260
|
exports2.calendarProps = calendarProps;
|
17008
17261
|
exports2.cardProps = cardProps;
|