vant 4.3.2 → 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/contact-list/ContactList.mjs +1 -1
- package/es/contact-list/index.css +1 -1
- package/es/date-picker/DatePicker.mjs +5 -2
- 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/image-preview/ImagePreviewItem.mjs +28 -15
- 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/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/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/contact-list/ContactList.js +1 -1
- package/lib/contact-list/index.css +1 -1
- package/lib/date-picker/DatePicker.js +5 -2
- 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/image-preview/ImagePreviewItem.js +28 -15
- 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/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/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 +523 -324
- package/lib/vant.es.js +523 -324
- package/lib/vant.js +523 -324
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/lib/vant.es.js
CHANGED
@@ -235,7 +235,7 @@ function deepAssign(to, from) {
|
|
235
235
|
});
|
236
236
|
return to;
|
237
237
|
}
|
238
|
-
var stdin_default$
|
238
|
+
var stdin_default$1Q = {
|
239
239
|
name: "姓名",
|
240
240
|
tel: "电话",
|
241
241
|
save: "保存",
|
@@ -299,7 +299,7 @@ var stdin_default$1P = {
|
|
299
299
|
};
|
300
300
|
const lang = ref("zh-CN");
|
301
301
|
const messages = reactive({
|
302
|
-
"zh-CN": stdin_default$
|
302
|
+
"zh-CN": stdin_default$1Q
|
303
303
|
});
|
304
304
|
const Locale = {
|
305
305
|
messages() {
|
@@ -314,11 +314,11 @@ const Locale = {
|
|
314
314
|
}
|
315
315
|
};
|
316
316
|
const useCurrentLang = () => lang;
|
317
|
-
var stdin_default$
|
317
|
+
var stdin_default$1P = Locale;
|
318
318
|
function createTranslate(name2) {
|
319
319
|
const prefix = camelize(name2) + ".";
|
320
320
|
return (path, ...args) => {
|
321
|
-
const messages2 = stdin_default$
|
321
|
+
const messages2 = stdin_default$1P.messages();
|
322
322
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
323
323
|
return isFunction(message) ? message(...args) : message;
|
324
324
|
};
|
@@ -440,20 +440,20 @@ function usePlaceholder(contentRef, bem2) {
|
|
440
440
|
}
|
441
441
|
}, [renderContent()]);
|
442
442
|
}
|
443
|
-
const [name$
|
444
|
-
const ACTION_BAR_KEY = Symbol(name$
|
443
|
+
const [name$1F, bem$1A] = createNamespace("action-bar");
|
444
|
+
const ACTION_BAR_KEY = Symbol(name$1F);
|
445
445
|
const actionBarProps = {
|
446
446
|
placeholder: Boolean,
|
447
447
|
safeAreaInsetBottom: truthProp
|
448
448
|
};
|
449
|
-
var stdin_default$
|
450
|
-
name: name$
|
449
|
+
var stdin_default$1O = defineComponent({
|
450
|
+
name: name$1F,
|
451
451
|
props: actionBarProps,
|
452
452
|
setup(props, {
|
453
453
|
slots
|
454
454
|
}) {
|
455
455
|
const root = ref();
|
456
|
-
const renderPlaceholder = usePlaceholder(root, bem$
|
456
|
+
const renderPlaceholder = usePlaceholder(root, bem$1A);
|
457
457
|
const {
|
458
458
|
linkChildren
|
459
459
|
} = useChildren(ACTION_BAR_KEY);
|
@@ -462,7 +462,7 @@ var stdin_default$1N = defineComponent({
|
|
462
462
|
var _a;
|
463
463
|
return createVNode("div", {
|
464
464
|
"ref": root,
|
465
|
-
"class": [bem$
|
465
|
+
"class": [bem$1A(), {
|
466
466
|
"van-safe-area-bottom": props.safeAreaInsetBottom
|
467
467
|
}]
|
468
468
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
@@ -475,7 +475,7 @@ var stdin_default$1N = defineComponent({
|
|
475
475
|
};
|
476
476
|
}
|
477
477
|
});
|
478
|
-
const ActionBar = withInstall(stdin_default$
|
478
|
+
const ActionBar = withInstall(stdin_default$1O);
|
479
479
|
function useExpose(apis) {
|
480
480
|
const instance2 = getCurrentInstance();
|
481
481
|
if (instance2) {
|
@@ -503,7 +503,7 @@ function useRoute() {
|
|
503
503
|
const vm = getCurrentInstance().proxy;
|
504
504
|
return () => route(vm);
|
505
505
|
}
|
506
|
-
const [name$
|
506
|
+
const [name$1E, bem$1z] = createNamespace("badge");
|
507
507
|
const badgeProps = {
|
508
508
|
dot: Boolean,
|
509
509
|
max: numericProp,
|
@@ -514,8 +514,8 @@ const badgeProps = {
|
|
514
514
|
showZero: truthProp,
|
515
515
|
position: makeStringProp("top-right")
|
516
516
|
};
|
517
|
-
var stdin_default$
|
518
|
-
name: name$
|
517
|
+
var stdin_default$1N = defineComponent({
|
518
|
+
name: name$1E,
|
519
519
|
props: badgeProps,
|
520
520
|
setup(props, {
|
521
521
|
slots
|
@@ -578,7 +578,7 @@ var stdin_default$1M = defineComponent({
|
|
578
578
|
const renderBadge = () => {
|
579
579
|
if (hasContent() || props.dot) {
|
580
580
|
return createVNode("div", {
|
581
|
-
"class": bem$
|
581
|
+
"class": bem$1z([props.position, {
|
582
582
|
dot: props.dot,
|
583
583
|
fixed: !!slots.default
|
584
584
|
}]),
|
@@ -592,7 +592,7 @@ var stdin_default$1M = defineComponent({
|
|
592
592
|
tag
|
593
593
|
} = props;
|
594
594
|
return createVNode(tag, {
|
595
|
-
"class": bem$
|
595
|
+
"class": bem$1z("wrapper")
|
596
596
|
}, {
|
597
597
|
default: () => [slots.default(), renderBadge()]
|
598
598
|
});
|
@@ -601,14 +601,14 @@ var stdin_default$1M = defineComponent({
|
|
601
601
|
};
|
602
602
|
}
|
603
603
|
});
|
604
|
-
const Badge = withInstall(stdin_default$
|
604
|
+
const Badge = withInstall(stdin_default$1N);
|
605
605
|
let globalZIndex = 2e3;
|
606
606
|
const useGlobalZIndex = () => ++globalZIndex;
|
607
607
|
const setGlobalZIndex = (val) => {
|
608
608
|
globalZIndex = val;
|
609
609
|
};
|
610
|
-
const [name$
|
611
|
-
const CONFIG_PROVIDER_KEY = Symbol(name$
|
610
|
+
const [name$1D, bem$1y] = createNamespace("config-provider");
|
611
|
+
const CONFIG_PROVIDER_KEY = Symbol(name$1D);
|
612
612
|
const configProviderProps = {
|
613
613
|
tag: makeStringProp("div"),
|
614
614
|
theme: makeStringProp("light"),
|
@@ -625,8 +625,8 @@ function mapThemeVarsToCSSVars(themeVars) {
|
|
625
625
|
});
|
626
626
|
return cssVars;
|
627
627
|
}
|
628
|
-
var stdin_default$
|
629
|
-
name: name$
|
628
|
+
var stdin_default$1M = defineComponent({
|
629
|
+
name: name$1D,
|
630
630
|
props: configProviderProps,
|
631
631
|
setup(props, {
|
632
632
|
slots
|
@@ -658,7 +658,7 @@ var stdin_default$1L = defineComponent({
|
|
658
658
|
}
|
659
659
|
});
|
660
660
|
return () => createVNode(props.tag, {
|
661
|
-
"class": bem$
|
661
|
+
"class": bem$1y(),
|
662
662
|
"style": style.value
|
663
663
|
}, {
|
664
664
|
default: () => {
|
@@ -668,7 +668,7 @@ var stdin_default$1L = defineComponent({
|
|
668
668
|
});
|
669
669
|
}
|
670
670
|
});
|
671
|
-
const [name$
|
671
|
+
const [name$1C, bem$1x] = createNamespace("icon");
|
672
672
|
const isImage$1 = (name2) => name2 == null ? void 0 : name2.includes("/");
|
673
673
|
const iconProps = {
|
674
674
|
dot: Boolean,
|
@@ -680,14 +680,14 @@ const iconProps = {
|
|
680
680
|
badgeProps: Object,
|
681
681
|
classPrefix: String
|
682
682
|
};
|
683
|
-
var stdin_default$
|
684
|
-
name: name$
|
683
|
+
var stdin_default$1L = defineComponent({
|
684
|
+
name: name$1C,
|
685
685
|
props: iconProps,
|
686
686
|
setup(props, {
|
687
687
|
slots
|
688
688
|
}) {
|
689
689
|
const config = inject(CONFIG_PROVIDER_KEY, null);
|
690
|
-
const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$
|
690
|
+
const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$1x());
|
691
691
|
return () => {
|
692
692
|
const {
|
693
693
|
tag,
|
@@ -711,7 +711,7 @@ var stdin_default$1K = defineComponent({
|
|
711
711
|
default: () => {
|
712
712
|
var _a;
|
713
713
|
return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && createVNode("img", {
|
714
|
-
"class": bem$
|
714
|
+
"class": bem$1x("image"),
|
715
715
|
"src": name2
|
716
716
|
}, null)];
|
717
717
|
}
|
@@ -719,13 +719,13 @@ var stdin_default$1K = defineComponent({
|
|
719
719
|
};
|
720
720
|
}
|
721
721
|
});
|
722
|
-
const Icon = withInstall(stdin_default$
|
723
|
-
const [name$
|
722
|
+
const Icon = withInstall(stdin_default$1L);
|
723
|
+
const [name$1B, bem$1w] = createNamespace("loading");
|
724
724
|
const SpinIcon = Array(12).fill(null).map((_, index) => createVNode("i", {
|
725
|
-
"class": bem$
|
725
|
+
"class": bem$1w("line", String(index + 1))
|
726
726
|
}, null));
|
727
727
|
const CircularIcon = createVNode("svg", {
|
728
|
-
"class": bem$
|
728
|
+
"class": bem$1w("circular"),
|
729
729
|
"viewBox": "25 25 50 50"
|
730
730
|
}, [createVNode("circle", {
|
731
731
|
"cx": "50",
|
@@ -741,8 +741,8 @@ const loadingProps = {
|
|
741
741
|
textSize: numericProp,
|
742
742
|
textColor: String
|
743
743
|
};
|
744
|
-
var stdin_default$
|
745
|
-
name: name$
|
744
|
+
var stdin_default$1K = defineComponent({
|
745
|
+
name: name$1B,
|
746
746
|
props: loadingProps,
|
747
747
|
setup(props, {
|
748
748
|
slots
|
@@ -753,7 +753,7 @@ var stdin_default$1J = defineComponent({
|
|
753
753
|
const renderIcon = () => {
|
754
754
|
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
755
755
|
return createVNode("span", {
|
756
|
-
"class": bem$
|
756
|
+
"class": bem$1w("spinner", props.type),
|
757
757
|
"style": spinnerStyle.value
|
758
758
|
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
759
759
|
};
|
@@ -761,7 +761,7 @@ var stdin_default$1J = defineComponent({
|
|
761
761
|
var _a;
|
762
762
|
if (slots.default) {
|
763
763
|
return createVNode("span", {
|
764
|
-
"class": bem$
|
764
|
+
"class": bem$1w("text"),
|
765
765
|
"style": {
|
766
766
|
fontSize: addUnit(props.textSize),
|
767
767
|
color: (_a = props.textColor) != null ? _a : props.color
|
@@ -775,7 +775,7 @@ var stdin_default$1J = defineComponent({
|
|
775
775
|
vertical
|
776
776
|
} = props;
|
777
777
|
return createVNode("div", {
|
778
|
-
"class": bem$
|
778
|
+
"class": bem$1w([type, {
|
779
779
|
vertical
|
780
780
|
}]),
|
781
781
|
"aria-live": "polite",
|
@@ -784,8 +784,8 @@ var stdin_default$1J = defineComponent({
|
|
784
784
|
};
|
785
785
|
}
|
786
786
|
});
|
787
|
-
const Loading = withInstall(stdin_default$
|
788
|
-
const [name$
|
787
|
+
const Loading = withInstall(stdin_default$1K);
|
788
|
+
const [name$1A, bem$1v] = createNamespace("button");
|
789
789
|
const buttonProps = extend({}, routeProps, {
|
790
790
|
tag: makeStringProp("button"),
|
791
791
|
text: String,
|
@@ -807,8 +807,8 @@ const buttonProps = extend({}, routeProps, {
|
|
807
807
|
loadingType: String,
|
808
808
|
iconPosition: makeStringProp("left")
|
809
809
|
});
|
810
|
-
var stdin_default$
|
811
|
-
name: name$
|
810
|
+
var stdin_default$1J = defineComponent({
|
811
|
+
name: name$1A,
|
812
812
|
props: buttonProps,
|
813
813
|
emits: ["click"],
|
814
814
|
setup(props, {
|
@@ -823,7 +823,7 @@ var stdin_default$1I = defineComponent({
|
|
823
823
|
return createVNode(Loading, {
|
824
824
|
"size": props.loadingSize,
|
825
825
|
"type": props.loadingType,
|
826
|
-
"class": bem$
|
826
|
+
"class": bem$1v("loading")
|
827
827
|
}, null);
|
828
828
|
};
|
829
829
|
const renderIcon = () => {
|
@@ -832,13 +832,13 @@ var stdin_default$1I = defineComponent({
|
|
832
832
|
}
|
833
833
|
if (slots.icon) {
|
834
834
|
return createVNode("div", {
|
835
|
-
"class": bem$
|
835
|
+
"class": bem$1v("icon")
|
836
836
|
}, [slots.icon()]);
|
837
837
|
}
|
838
838
|
if (props.icon) {
|
839
839
|
return createVNode(Icon, {
|
840
840
|
"name": props.icon,
|
841
|
-
"class": bem$
|
841
|
+
"class": bem$1v("icon"),
|
842
842
|
"classPrefix": props.iconPrefix
|
843
843
|
}, null);
|
844
844
|
}
|
@@ -852,7 +852,7 @@ var stdin_default$1I = defineComponent({
|
|
852
852
|
}
|
853
853
|
if (text) {
|
854
854
|
return createVNode("span", {
|
855
|
-
"class": bem$
|
855
|
+
"class": bem$1v("text")
|
856
856
|
}, [text]);
|
857
857
|
}
|
858
858
|
};
|
@@ -899,7 +899,7 @@ var stdin_default$1I = defineComponent({
|
|
899
899
|
nativeType,
|
900
900
|
iconPosition
|
901
901
|
} = props;
|
902
|
-
const classes = [bem$
|
902
|
+
const classes = [bem$1v([type, size, {
|
903
903
|
plain,
|
904
904
|
block,
|
905
905
|
round,
|
@@ -918,14 +918,14 @@ var stdin_default$1I = defineComponent({
|
|
918
918
|
"onClick": onClick
|
919
919
|
}, {
|
920
920
|
default: () => [createVNode("div", {
|
921
|
-
"class": bem$
|
921
|
+
"class": bem$1v("content")
|
922
922
|
}, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
|
923
923
|
});
|
924
924
|
};
|
925
925
|
}
|
926
926
|
});
|
927
|
-
const Button = withInstall(stdin_default$
|
928
|
-
const [name$
|
927
|
+
const Button = withInstall(stdin_default$1J);
|
928
|
+
const [name$1z, bem$1u] = createNamespace("action-bar-button");
|
929
929
|
const actionBarButtonProps = extend({}, routeProps, {
|
930
930
|
type: String,
|
931
931
|
text: String,
|
@@ -934,8 +934,8 @@ const actionBarButtonProps = extend({}, routeProps, {
|
|
934
934
|
loading: Boolean,
|
935
935
|
disabled: Boolean
|
936
936
|
});
|
937
|
-
var stdin_default$
|
938
|
-
name: name$
|
937
|
+
var stdin_default$1I = defineComponent({
|
938
|
+
name: name$1z,
|
939
939
|
props: actionBarButtonProps,
|
940
940
|
setup(props, {
|
941
941
|
slots
|
@@ -970,7 +970,7 @@ var stdin_default$1H = defineComponent({
|
|
970
970
|
disabled
|
971
971
|
} = props;
|
972
972
|
return createVNode(Button, {
|
973
|
-
"class": bem$
|
973
|
+
"class": bem$1u([type, {
|
974
974
|
last: isLast.value,
|
975
975
|
first: isFirst.value
|
976
976
|
}]),
|
@@ -987,8 +987,8 @@ var stdin_default$1H = defineComponent({
|
|
987
987
|
};
|
988
988
|
}
|
989
989
|
});
|
990
|
-
const ActionBarButton = withInstall(stdin_default$
|
991
|
-
const [name$
|
990
|
+
const ActionBarButton = withInstall(stdin_default$1I);
|
991
|
+
const [name$1y, bem$1t] = createNamespace("action-bar-icon");
|
992
992
|
const actionBarIconProps = extend({}, routeProps, {
|
993
993
|
dot: Boolean,
|
994
994
|
text: String,
|
@@ -999,8 +999,8 @@ const actionBarIconProps = extend({}, routeProps, {
|
|
999
999
|
badgeProps: Object,
|
1000
1000
|
iconPrefix: String
|
1001
1001
|
});
|
1002
|
-
var stdin_default$
|
1003
|
-
name: name$
|
1002
|
+
var stdin_default$1H = defineComponent({
|
1003
|
+
name: name$1y,
|
1004
1004
|
props: actionBarIconProps,
|
1005
1005
|
setup(props, {
|
1006
1006
|
slots
|
@@ -1020,7 +1020,7 @@ var stdin_default$1G = defineComponent({
|
|
1020
1020
|
if (slots.icon) {
|
1021
1021
|
return createVNode(Badge, mergeProps({
|
1022
1022
|
"dot": dot,
|
1023
|
-
"class": bem$
|
1023
|
+
"class": bem$1t("icon"),
|
1024
1024
|
"content": badge
|
1025
1025
|
}, badgeProps2), {
|
1026
1026
|
default: slots.icon
|
@@ -1032,20 +1032,20 @@ var stdin_default$1G = defineComponent({
|
|
1032
1032
|
"name": icon,
|
1033
1033
|
"badge": badge,
|
1034
1034
|
"color": color,
|
1035
|
-
"class": [bem$
|
1035
|
+
"class": [bem$1t("icon"), iconClass],
|
1036
1036
|
"badgeProps": badgeProps2,
|
1037
1037
|
"classPrefix": iconPrefix
|
1038
1038
|
}, null);
|
1039
1039
|
};
|
1040
1040
|
return () => createVNode("div", {
|
1041
1041
|
"role": "button",
|
1042
|
-
"class": bem$
|
1042
|
+
"class": bem$1t(),
|
1043
1043
|
"tabindex": 0,
|
1044
1044
|
"onClick": route2
|
1045
1045
|
}, [renderIcon(), slots.default ? slots.default() : props.text]);
|
1046
1046
|
}
|
1047
1047
|
});
|
1048
|
-
const ActionBarIcon = withInstall(stdin_default$
|
1048
|
+
const ActionBarIcon = withInstall(stdin_default$1H);
|
1049
1049
|
const popupSharedProps = {
|
1050
1050
|
// whether to show popup
|
1051
1051
|
show: Boolean,
|
@@ -1196,7 +1196,7 @@ function useLazyRender(show) {
|
|
1196
1196
|
);
|
1197
1197
|
return (render) => () => inited.value ? render() : null;
|
1198
1198
|
}
|
1199
|
-
const [name$
|
1199
|
+
const [name$1x, bem$1s] = createNamespace("overlay");
|
1200
1200
|
const overlayProps = {
|
1201
1201
|
show: Boolean,
|
1202
1202
|
zIndex: numericProp,
|
@@ -1206,8 +1206,8 @@ const overlayProps = {
|
|
1206
1206
|
lazyRender: truthProp,
|
1207
1207
|
customStyle: Object
|
1208
1208
|
};
|
1209
|
-
var stdin_default$
|
1210
|
-
name: name$
|
1209
|
+
var stdin_default$1G = defineComponent({
|
1210
|
+
name: name$1x,
|
1211
1211
|
props: overlayProps,
|
1212
1212
|
setup(props, {
|
1213
1213
|
slots
|
@@ -1228,7 +1228,7 @@ var stdin_default$1F = defineComponent({
|
|
1228
1228
|
return withDirectives(createVNode("div", {
|
1229
1229
|
"ref": root,
|
1230
1230
|
"style": style,
|
1231
|
-
"class": [bem$
|
1231
|
+
"class": [bem$1s(), props.className]
|
1232
1232
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props.show]]);
|
1233
1233
|
});
|
1234
1234
|
useEventListener("touchmove", onTouchMove, {
|
@@ -1242,7 +1242,7 @@ var stdin_default$1F = defineComponent({
|
|
1242
1242
|
});
|
1243
1243
|
}
|
1244
1244
|
});
|
1245
|
-
const Overlay = withInstall(stdin_default$
|
1245
|
+
const Overlay = withInstall(stdin_default$1G);
|
1246
1246
|
const popupProps$2 = extend({}, popupSharedProps, {
|
1247
1247
|
round: Boolean,
|
1248
1248
|
position: makeStringProp("center"),
|
@@ -1255,9 +1255,9 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1255
1255
|
safeAreaInsetTop: Boolean,
|
1256
1256
|
safeAreaInsetBottom: Boolean
|
1257
1257
|
});
|
1258
|
-
const [name$
|
1259
|
-
var stdin_default$
|
1260
|
-
name: name$
|
1258
|
+
const [name$1w, bem$1r] = createNamespace("popup");
|
1259
|
+
var stdin_default$1F = defineComponent({
|
1260
|
+
name: name$1w,
|
1261
1261
|
inheritAttrs: false,
|
1262
1262
|
props: popupProps$2,
|
1263
1263
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
@@ -1331,7 +1331,7 @@ var stdin_default$1E = defineComponent({
|
|
1331
1331
|
"role": "button",
|
1332
1332
|
"tabindex": 0,
|
1333
1333
|
"name": props.closeIcon,
|
1334
|
-
"class": [bem$
|
1334
|
+
"class": [bem$1r("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
|
1335
1335
|
"classPrefix": props.iconPrefix,
|
1336
1336
|
"onClick": onClickCloseIcon
|
1337
1337
|
}, null);
|
@@ -1353,7 +1353,7 @@ var stdin_default$1E = defineComponent({
|
|
1353
1353
|
"style": style.value,
|
1354
1354
|
"role": "dialog",
|
1355
1355
|
"tabindex": 0,
|
1356
|
-
"class": [bem$
|
1356
|
+
"class": [bem$1r({
|
1357
1357
|
round,
|
1358
1358
|
[position]: position
|
1359
1359
|
}), {
|
@@ -1434,8 +1434,8 @@ var stdin_default$1E = defineComponent({
|
|
1434
1434
|
};
|
1435
1435
|
}
|
1436
1436
|
});
|
1437
|
-
const Popup = withInstall(stdin_default$
|
1438
|
-
const [name$
|
1437
|
+
const Popup = withInstall(stdin_default$1F);
|
1438
|
+
const [name$1v, bem$1q] = createNamespace("action-sheet");
|
1439
1439
|
const actionSheetProps = extend({}, popupSharedProps, {
|
1440
1440
|
title: String,
|
1441
1441
|
round: truthProp,
|
@@ -1449,8 +1449,8 @@ const actionSheetProps = extend({}, popupSharedProps, {
|
|
1449
1449
|
safeAreaInsetBottom: truthProp
|
1450
1450
|
});
|
1451
1451
|
const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
1452
|
-
var stdin_default$
|
1453
|
-
name: name$
|
1452
|
+
var stdin_default$1E = defineComponent({
|
1453
|
+
name: name$1v,
|
1454
1454
|
props: actionSheetProps,
|
1455
1455
|
emits: ["select", "cancel", "update:show"],
|
1456
1456
|
setup(props, {
|
@@ -1465,10 +1465,10 @@ var stdin_default$1D = defineComponent({
|
|
1465
1465
|
const renderHeader = () => {
|
1466
1466
|
if (props.title) {
|
1467
1467
|
return createVNode("div", {
|
1468
|
-
"class": bem$
|
1468
|
+
"class": bem$1q("header")
|
1469
1469
|
}, [props.title, props.closeable && createVNode(Icon, {
|
1470
1470
|
"name": props.closeIcon,
|
1471
|
-
"class": [bem$
|
1471
|
+
"class": [bem$1q("close"), HAPTICS_FEEDBACK],
|
1472
1472
|
"onClick": onCancel
|
1473
1473
|
}, null)]);
|
1474
1474
|
}
|
@@ -1476,10 +1476,10 @@ var stdin_default$1D = defineComponent({
|
|
1476
1476
|
const renderCancel = () => {
|
1477
1477
|
if (slots.cancel || props.cancelText) {
|
1478
1478
|
return [createVNode("div", {
|
1479
|
-
"class": bem$
|
1479
|
+
"class": bem$1q("gap")
|
1480
1480
|
}, null), createVNode("button", {
|
1481
1481
|
"type": "button",
|
1482
|
-
"class": bem$
|
1482
|
+
"class": bem$1q("cancel"),
|
1483
1483
|
"onClick": onCancel
|
1484
1484
|
}, [slots.cancel ? slots.cancel() : props.cancelText])];
|
1485
1485
|
}
|
@@ -1487,7 +1487,7 @@ var stdin_default$1D = defineComponent({
|
|
1487
1487
|
const renderActionContent = (action, index) => {
|
1488
1488
|
if (action.loading) {
|
1489
1489
|
return createVNode(Loading, {
|
1490
|
-
"class": bem$
|
1490
|
+
"class": bem$1q("loading-icon")
|
1491
1491
|
}, null);
|
1492
1492
|
}
|
1493
1493
|
if (slots.action) {
|
@@ -1497,9 +1497,9 @@ var stdin_default$1D = defineComponent({
|
|
1497
1497
|
});
|
1498
1498
|
}
|
1499
1499
|
return [createVNode("span", {
|
1500
|
-
"class": bem$
|
1500
|
+
"class": bem$1q("name")
|
1501
1501
|
}, [action.name]), action.subname && createVNode("div", {
|
1502
|
-
"class": bem$
|
1502
|
+
"class": bem$1q("subname")
|
1503
1503
|
}, [action.subname])];
|
1504
1504
|
};
|
1505
1505
|
const renderAction = (action, index) => {
|
@@ -1527,7 +1527,7 @@ var stdin_default$1D = defineComponent({
|
|
1527
1527
|
"style": {
|
1528
1528
|
color
|
1529
1529
|
},
|
1530
|
-
"class": [bem$
|
1530
|
+
"class": [bem$1q("item", {
|
1531
1531
|
loading,
|
1532
1532
|
disabled
|
1533
1533
|
}), className],
|
@@ -1538,26 +1538,26 @@ var stdin_default$1D = defineComponent({
|
|
1538
1538
|
if (props.description || slots.description) {
|
1539
1539
|
const content = slots.description ? slots.description() : props.description;
|
1540
1540
|
return createVNode("div", {
|
1541
|
-
"class": bem$
|
1541
|
+
"class": bem$1q("description")
|
1542
1542
|
}, [content]);
|
1543
1543
|
}
|
1544
1544
|
};
|
1545
1545
|
return () => createVNode(Popup, mergeProps({
|
1546
|
-
"class": bem$
|
1546
|
+
"class": bem$1q(),
|
1547
1547
|
"position": "bottom",
|
1548
1548
|
"onUpdate:show": updateShow
|
1549
1549
|
}, pick(props, popupInheritKeys$2)), {
|
1550
1550
|
default: () => {
|
1551
1551
|
var _a;
|
1552
1552
|
return [renderHeader(), renderDescription(), createVNode("div", {
|
1553
|
-
"class": bem$
|
1553
|
+
"class": bem$1q("content")
|
1554
1554
|
}, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
|
1555
1555
|
}
|
1556
1556
|
});
|
1557
1557
|
}
|
1558
1558
|
});
|
1559
|
-
const ActionSheet = withInstall(stdin_default$
|
1560
|
-
const [name$
|
1559
|
+
const ActionSheet = withInstall(stdin_default$1E);
|
1560
|
+
const [name$1u, bem$1p, t$k] = createNamespace("picker");
|
1561
1561
|
const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
|
1562
1562
|
function getColumnsType(columns, fields) {
|
1563
1563
|
const firstColumn = columns[0];
|
@@ -1626,10 +1626,10 @@ function assignDefaultFields(fields) {
|
|
1626
1626
|
const DEFAULT_DURATION = 200;
|
1627
1627
|
const MOMENTUM_TIME = 300;
|
1628
1628
|
const MOMENTUM_DISTANCE = 15;
|
1629
|
-
const [name$
|
1630
|
-
const PICKER_KEY = Symbol(name$
|
1631
|
-
var stdin_default$
|
1632
|
-
name: name$
|
1629
|
+
const [name$1t, bem$1o] = createNamespace("picker-column");
|
1630
|
+
const PICKER_KEY = Symbol(name$1t);
|
1631
|
+
var stdin_default$1D = defineComponent({
|
1632
|
+
name: name$1t,
|
1633
1633
|
props: {
|
1634
1634
|
value: numericProp,
|
1635
1635
|
fields: makeRequiredProp(Object),
|
@@ -1768,7 +1768,7 @@ var stdin_default$1C = defineComponent({
|
|
1768
1768
|
role: "button",
|
1769
1769
|
style: optionStyle,
|
1770
1770
|
tabindex: disabled ? -1 : 0,
|
1771
|
-
class: [bem$
|
1771
|
+
class: [bem$1o("item", {
|
1772
1772
|
disabled,
|
1773
1773
|
selected: value === props.value
|
1774
1774
|
}), option.className],
|
@@ -1796,7 +1796,7 @@ var stdin_default$1C = defineComponent({
|
|
1796
1796
|
});
|
1797
1797
|
return () => createVNode("div", {
|
1798
1798
|
"ref": root,
|
1799
|
-
"class": bem$
|
1799
|
+
"class": bem$1o(),
|
1800
1800
|
"onTouchstartPassive": onTouchStart,
|
1801
1801
|
"onTouchend": onTouchEnd,
|
1802
1802
|
"onTouchcancel": onTouchEnd
|
@@ -1807,12 +1807,12 @@ var stdin_default$1C = defineComponent({
|
|
1807
1807
|
transitionDuration: `${currentDuration.value}ms`,
|
1808
1808
|
transitionProperty: currentDuration.value ? "all" : "none"
|
1809
1809
|
},
|
1810
|
-
"class": bem$
|
1810
|
+
"class": bem$1o("wrapper"),
|
1811
1811
|
"onTransitionend": stopMomentum
|
1812
1812
|
}, [renderOptions()])]);
|
1813
1813
|
}
|
1814
1814
|
});
|
1815
|
-
const [name$
|
1815
|
+
const [name$1s] = createNamespace("picker-toolbar");
|
1816
1816
|
const pickerToolbarProps = {
|
1817
1817
|
title: String,
|
1818
1818
|
cancelButtonText: String,
|
@@ -1820,8 +1820,8 @@ const pickerToolbarProps = {
|
|
1820
1820
|
};
|
1821
1821
|
const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
|
1822
1822
|
const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
|
1823
|
-
var stdin_default$
|
1824
|
-
name: name$
|
1823
|
+
var stdin_default$1C = defineComponent({
|
1824
|
+
name: name$1s,
|
1825
1825
|
props: pickerToolbarProps,
|
1826
1826
|
emits: ["confirm", "cancel"],
|
1827
1827
|
setup(props, {
|
@@ -1834,7 +1834,7 @@ var stdin_default$1B = defineComponent({
|
|
1834
1834
|
}
|
1835
1835
|
if (props.title) {
|
1836
1836
|
return createVNode("div", {
|
1837
|
-
"class": [bem$
|
1837
|
+
"class": [bem$1p("title"), "van-ellipsis"]
|
1838
1838
|
}, [props.title]);
|
1839
1839
|
}
|
1840
1840
|
};
|
@@ -1844,7 +1844,7 @@ var stdin_default$1B = defineComponent({
|
|
1844
1844
|
const text = props.cancelButtonText || t$k("cancel");
|
1845
1845
|
return createVNode("button", {
|
1846
1846
|
"type": "button",
|
1847
|
-
"class": [bem$
|
1847
|
+
"class": [bem$1p("cancel"), HAPTICS_FEEDBACK],
|
1848
1848
|
"onClick": onCancel
|
1849
1849
|
}, [slots.cancel ? slots.cancel() : text]);
|
1850
1850
|
};
|
@@ -1852,12 +1852,12 @@ var stdin_default$1B = defineComponent({
|
|
1852
1852
|
const text = props.confirmButtonText || t$k("confirm");
|
1853
1853
|
return createVNode("button", {
|
1854
1854
|
"type": "button",
|
1855
|
-
"class": [bem$
|
1855
|
+
"class": [bem$1p("confirm"), HAPTICS_FEEDBACK],
|
1856
1856
|
"onClick": onConfirm
|
1857
1857
|
}, [slots.confirm ? slots.confirm() : text]);
|
1858
1858
|
};
|
1859
1859
|
return () => createVNode("div", {
|
1860
|
-
"class": bem$
|
1860
|
+
"class": bem$1p("toolbar")
|
1861
1861
|
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
1862
1862
|
}
|
1863
1863
|
});
|
@@ -1965,7 +1965,7 @@ function useVisibilityChange(target, onChange) {
|
|
1965
1965
|
onBeforeUnmount(unobserve);
|
1966
1966
|
onMountedOrActivated(observe);
|
1967
1967
|
}
|
1968
|
-
const [name$
|
1968
|
+
const [name$1r, bem$1n] = createNamespace("sticky");
|
1969
1969
|
const stickyProps = {
|
1970
1970
|
zIndex: numericProp,
|
1971
1971
|
position: makeStringProp("top"),
|
@@ -1973,8 +1973,8 @@ const stickyProps = {
|
|
1973
1973
|
offsetTop: makeNumericProp(0),
|
1974
1974
|
offsetBottom: makeNumericProp(0)
|
1975
1975
|
};
|
1976
|
-
var stdin_default$
|
1977
|
-
name: name$
|
1976
|
+
var stdin_default$1B = defineComponent({
|
1977
|
+
name: name$1r,
|
1978
1978
|
props: stickyProps,
|
1979
1979
|
emits: ["scroll", "change"],
|
1980
1980
|
setup(props, {
|
@@ -2087,7 +2087,7 @@ var stdin_default$1A = defineComponent({
|
|
2087
2087
|
"ref": root,
|
2088
2088
|
"style": rootStyle.value
|
2089
2089
|
}, [createVNode("div", {
|
2090
|
-
"class": bem$
|
2090
|
+
"class": bem$1n({
|
2091
2091
|
fixed: state.fixed && !isReset.value
|
2092
2092
|
}),
|
2093
2093
|
"style": stickyStyle.value
|
@@ -2095,8 +2095,8 @@ var stdin_default$1A = defineComponent({
|
|
2095
2095
|
};
|
2096
2096
|
}
|
2097
2097
|
});
|
2098
|
-
const Sticky = withInstall(stdin_default$
|
2099
|
-
const [name$
|
2098
|
+
const Sticky = withInstall(stdin_default$1B);
|
2099
|
+
const [name$1q, bem$1m] = createNamespace("swipe");
|
2100
2100
|
const swipeProps = {
|
2101
2101
|
loop: truthProp,
|
2102
2102
|
width: numericProp,
|
@@ -2111,9 +2111,9 @@ const swipeProps = {
|
|
2111
2111
|
showIndicators: truthProp,
|
2112
2112
|
stopPropagation: truthProp
|
2113
2113
|
};
|
2114
|
-
const SWIPE_KEY = Symbol(name$
|
2115
|
-
var stdin_default$
|
2116
|
-
name: name$
|
2114
|
+
const SWIPE_KEY = Symbol(name$1q);
|
2115
|
+
var stdin_default$1A = defineComponent({
|
2116
|
+
name: name$1q,
|
2117
2117
|
props: swipeProps,
|
2118
2118
|
emits: ["change", "dragStart", "dragEnd"],
|
2119
2119
|
setup(props, {
|
@@ -2391,7 +2391,7 @@ var stdin_default$1z = defineComponent({
|
|
2391
2391
|
} : void 0;
|
2392
2392
|
return createVNode("i", {
|
2393
2393
|
"style": style,
|
2394
|
-
"class": bem$
|
2394
|
+
"class": bem$1m("indicator", {
|
2395
2395
|
active
|
2396
2396
|
})
|
2397
2397
|
}, null);
|
@@ -2405,7 +2405,7 @@ var stdin_default$1z = defineComponent({
|
|
2405
2405
|
}
|
2406
2406
|
if (props.showIndicators && count.value > 1) {
|
2407
2407
|
return createVNode("div", {
|
2408
|
-
"class": bem$
|
2408
|
+
"class": bem$1m("indicators", {
|
2409
2409
|
vertical: props.vertical
|
2410
2410
|
})
|
2411
2411
|
}, [Array(count.value).fill("").map(renderDot)]);
|
@@ -2447,11 +2447,11 @@ var stdin_default$1z = defineComponent({
|
|
2447
2447
|
var _a;
|
2448
2448
|
return createVNode("div", {
|
2449
2449
|
"ref": root,
|
2450
|
-
"class": bem$
|
2450
|
+
"class": bem$1m()
|
2451
2451
|
}, [createVNode("div", {
|
2452
2452
|
"ref": track,
|
2453
2453
|
"style": trackStyle.value,
|
2454
|
-
"class": bem$
|
2454
|
+
"class": bem$1m("track", {
|
2455
2455
|
vertical: props.vertical
|
2456
2456
|
}),
|
2457
2457
|
"onTouchstartPassive": onTouchStart,
|
@@ -2461,10 +2461,10 @@ var stdin_default$1z = defineComponent({
|
|
2461
2461
|
};
|
2462
2462
|
}
|
2463
2463
|
});
|
2464
|
-
const Swipe = withInstall(stdin_default$
|
2465
|
-
const [name$
|
2466
|
-
var stdin_default$
|
2467
|
-
name: name$
|
2464
|
+
const Swipe = withInstall(stdin_default$1A);
|
2465
|
+
const [name$1p, bem$1l] = createNamespace("tabs");
|
2466
|
+
var stdin_default$1z = defineComponent({
|
2467
|
+
name: name$1p,
|
2468
2468
|
props: {
|
2469
2469
|
count: makeRequiredProp(Number),
|
2470
2470
|
inited: Boolean,
|
@@ -2488,7 +2488,7 @@ var stdin_default$1y = defineComponent({
|
|
2488
2488
|
return createVNode(Swipe, {
|
2489
2489
|
"ref": swipeRef,
|
2490
2490
|
"loop": false,
|
2491
|
-
"class": bem$
|
2491
|
+
"class": bem$1l("track"),
|
2492
2492
|
"duration": +props.duration * 1e3,
|
2493
2493
|
"touchable": props.swipeable,
|
2494
2494
|
"lazyRender": props.lazyRender,
|
@@ -2516,13 +2516,13 @@ var stdin_default$1y = defineComponent({
|
|
2516
2516
|
swipeRef
|
2517
2517
|
});
|
2518
2518
|
return () => createVNode("div", {
|
2519
|
-
"class": bem$
|
2519
|
+
"class": bem$1l("content", {
|
2520
2520
|
animated: props.animated || props.swipeable
|
2521
2521
|
})
|
2522
2522
|
}, [renderChildren()]);
|
2523
2523
|
}
|
2524
2524
|
});
|
2525
|
-
const [name$
|
2525
|
+
const [name$1o, bem$1k] = createNamespace("tabs");
|
2526
2526
|
const tabsProps = {
|
2527
2527
|
type: makeStringProp("line"),
|
2528
2528
|
color: String,
|
@@ -2545,9 +2545,9 @@ const tabsProps = {
|
|
2545
2545
|
titleActiveColor: String,
|
2546
2546
|
titleInactiveColor: String
|
2547
2547
|
};
|
2548
|
-
const TABS_KEY = Symbol(name$
|
2549
|
-
var stdin_default$
|
2550
|
-
name: name$
|
2548
|
+
const TABS_KEY = Symbol(name$1o);
|
2549
|
+
var stdin_default$1y = defineComponent({
|
2550
|
+
name: name$1o,
|
2551
2551
|
props: tabsProps,
|
2552
2552
|
emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
|
2553
2553
|
setup(props, {
|
@@ -2745,7 +2745,7 @@ var stdin_default$1x = defineComponent({
|
|
2745
2745
|
const renderLine = () => {
|
2746
2746
|
if (props.type === "line" && children.length) {
|
2747
2747
|
return createVNode("div", {
|
2748
|
-
"class": bem$
|
2748
|
+
"class": bem$1k("line"),
|
2749
2749
|
"style": state.lineStyle
|
2750
2750
|
}, null);
|
2751
2751
|
}
|
@@ -2759,13 +2759,13 @@ var stdin_default$1x = defineComponent({
|
|
2759
2759
|
} = props;
|
2760
2760
|
const Header = [createVNode("div", {
|
2761
2761
|
"ref": sticky ? void 0 : wrapRef,
|
2762
|
-
"class": [bem$
|
2762
|
+
"class": [bem$1k("wrap"), {
|
2763
2763
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
2764
2764
|
}]
|
2765
2765
|
}, [createVNode("div", {
|
2766
2766
|
"ref": navRef,
|
2767
2767
|
"role": "tablist",
|
2768
|
-
"class": bem$
|
2768
|
+
"class": bem$1k("nav", [type, {
|
2769
2769
|
shrink: props.shrink,
|
2770
2770
|
complete: scrollable.value
|
2771
2771
|
}]),
|
@@ -2838,14 +2838,14 @@ var stdin_default$1x = defineComponent({
|
|
2838
2838
|
});
|
2839
2839
|
return () => createVNode("div", {
|
2840
2840
|
"ref": root,
|
2841
|
-
"class": bem$
|
2841
|
+
"class": bem$1k([props.type])
|
2842
2842
|
}, [props.sticky ? createVNode(Sticky, {
|
2843
2843
|
"container": root.value,
|
2844
2844
|
"offsetTop": offsetTopPx.value,
|
2845
2845
|
"onScroll": onStickyScroll
|
2846
2846
|
}, {
|
2847
2847
|
default: () => [renderHeader()]
|
2848
|
-
}) : renderHeader(), createVNode(stdin_default$
|
2848
|
+
}) : renderHeader(), createVNode(stdin_default$1z, {
|
2849
2849
|
"ref": contentRef,
|
2850
2850
|
"count": children.length,
|
2851
2851
|
"inited": state.inited,
|
@@ -2865,9 +2865,9 @@ var stdin_default$1x = defineComponent({
|
|
2865
2865
|
});
|
2866
2866
|
const TAB_STATUS_KEY = Symbol();
|
2867
2867
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
2868
|
-
const [name$
|
2868
|
+
const [name$1n, bem$1j] = createNamespace("tab");
|
2869
2869
|
const TabTitle = defineComponent({
|
2870
|
-
name: name$
|
2870
|
+
name: name$1n,
|
2871
2871
|
props: {
|
2872
2872
|
id: String,
|
2873
2873
|
dot: Boolean,
|
@@ -2916,7 +2916,7 @@ const TabTitle = defineComponent({
|
|
2916
2916
|
});
|
2917
2917
|
const renderText = () => {
|
2918
2918
|
const Text2 = createVNode("span", {
|
2919
|
-
"class": bem$
|
2919
|
+
"class": bem$1j("text", {
|
2920
2920
|
ellipsis: !props.scrollable
|
2921
2921
|
})
|
2922
2922
|
}, [slots.title ? slots.title() : props.title]);
|
@@ -2934,7 +2934,7 @@ const TabTitle = defineComponent({
|
|
2934
2934
|
return () => createVNode("div", {
|
2935
2935
|
"id": props.id,
|
2936
2936
|
"role": "tab",
|
2937
|
-
"class": [bem$
|
2937
|
+
"class": [bem$1j([props.type, {
|
2938
2938
|
grow: props.scrollable && !props.shrink,
|
2939
2939
|
shrink: props.shrink,
|
2940
2940
|
active: props.isActive,
|
@@ -2948,9 +2948,9 @@ const TabTitle = defineComponent({
|
|
2948
2948
|
}, [renderText()]);
|
2949
2949
|
}
|
2950
2950
|
});
|
2951
|
-
const [name$
|
2952
|
-
var stdin_default$
|
2953
|
-
name: name$
|
2951
|
+
const [name$1m, bem$1i] = createNamespace("swipe-item");
|
2952
|
+
var stdin_default$1x = defineComponent({
|
2953
|
+
name: name$1m,
|
2954
2954
|
setup(props, {
|
2955
2955
|
slots
|
2956
2956
|
}) {
|
@@ -3015,14 +3015,14 @@ var stdin_default$1w = defineComponent({
|
|
3015
3015
|
return () => {
|
3016
3016
|
var _a;
|
3017
3017
|
return createVNode("div", {
|
3018
|
-
"class": bem$
|
3018
|
+
"class": bem$1i(),
|
3019
3019
|
"style": style.value
|
3020
3020
|
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
3021
3021
|
};
|
3022
3022
|
}
|
3023
3023
|
});
|
3024
|
-
const SwipeItem = withInstall(stdin_default$
|
3025
|
-
const [name$
|
3024
|
+
const SwipeItem = withInstall(stdin_default$1x);
|
3025
|
+
const [name$1l, bem$1h] = createNamespace("tab");
|
3026
3026
|
const tabProps = extend({}, routeProps, {
|
3027
3027
|
dot: Boolean,
|
3028
3028
|
name: numericProp,
|
@@ -3033,8 +3033,8 @@ const tabProps = extend({}, routeProps, {
|
|
3033
3033
|
titleStyle: [String, Object],
|
3034
3034
|
showZeroBadge: truthProp
|
3035
3035
|
});
|
3036
|
-
var stdin_default$
|
3037
|
-
name: name$
|
3036
|
+
var stdin_default$1w = defineComponent({
|
3037
|
+
name: name$1l,
|
3038
3038
|
props: tabProps,
|
3039
3039
|
setup(props, {
|
3040
3040
|
slots
|
@@ -3122,7 +3122,7 @@ var stdin_default$1v = defineComponent({
|
|
3122
3122
|
return createVNode(SwipeItem, {
|
3123
3123
|
"id": id,
|
3124
3124
|
"role": "tabpanel",
|
3125
|
-
"class": bem$
|
3125
|
+
"class": bem$1h("panel-wrapper", {
|
3126
3126
|
inactive: hasInactiveClass.value
|
3127
3127
|
}),
|
3128
3128
|
"tabindex": active.value ? 0 : -1,
|
@@ -3132,7 +3132,7 @@ var stdin_default$1v = defineComponent({
|
|
3132
3132
|
default: () => {
|
3133
3133
|
var _a2;
|
3134
3134
|
return [createVNode("div", {
|
3135
|
-
"class": bem$
|
3135
|
+
"class": bem$1h("panel")
|
3136
3136
|
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
|
3137
3137
|
}
|
3138
3138
|
});
|
@@ -3142,24 +3142,24 @@ var stdin_default$1v = defineComponent({
|
|
3142
3142
|
return withDirectives(createVNode("div", {
|
3143
3143
|
"id": id,
|
3144
3144
|
"role": "tabpanel",
|
3145
|
-
"class": bem$
|
3145
|
+
"class": bem$1h("panel"),
|
3146
3146
|
"tabindex": show ? 0 : -1,
|
3147
3147
|
"aria-labelledby": label
|
3148
3148
|
}, [Content]), [[vShow, show]]);
|
3149
3149
|
};
|
3150
3150
|
}
|
3151
3151
|
});
|
3152
|
-
const Tab = withInstall(stdin_default$
|
3153
|
-
const Tabs = withInstall(stdin_default$
|
3154
|
-
const [name$
|
3155
|
-
const PICKER_GROUP_KEY = Symbol(name$
|
3152
|
+
const Tab = withInstall(stdin_default$1w);
|
3153
|
+
const Tabs = withInstall(stdin_default$1y);
|
3154
|
+
const [name$1k, bem$1g] = createNamespace("picker-group");
|
3155
|
+
const PICKER_GROUP_KEY = Symbol(name$1k);
|
3156
3156
|
const pickerGroupProps = extend({
|
3157
3157
|
tabs: makeArrayProp(),
|
3158
3158
|
activeTab: makeNumericProp(0),
|
3159
3159
|
nextStepText: String
|
3160
3160
|
}, pickerToolbarProps);
|
3161
|
-
var stdin_default$
|
3162
|
-
name: name$
|
3161
|
+
var stdin_default$1v = defineComponent({
|
3162
|
+
name: name$1k,
|
3163
3163
|
props: pickerGroupProps,
|
3164
3164
|
emits: ["confirm", "cancel", "update:activeTab"],
|
3165
3165
|
setup(props, {
|
@@ -3186,8 +3186,8 @@ var stdin_default$1u = defineComponent({
|
|
3186
3186
|
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
3187
3187
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
3188
3188
|
return createVNode("div", {
|
3189
|
-
"class": bem$
|
3190
|
-
}, [createVNode(stdin_default$
|
3189
|
+
"class": bem$1g()
|
3190
|
+
}, [createVNode(stdin_default$1C, {
|
3191
3191
|
"title": props.title,
|
3192
3192
|
"cancelButtonText": props.cancelButtonText,
|
3193
3193
|
"confirmButtonText": confirmButtonText,
|
@@ -3196,14 +3196,14 @@ var stdin_default$1u = defineComponent({
|
|
3196
3196
|
}, pick(slots, pickerToolbarSlots)), createVNode(Tabs, {
|
3197
3197
|
"active": activeTab.value,
|
3198
3198
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
3199
|
-
"class": bem$
|
3199
|
+
"class": bem$1g("tabs"),
|
3200
3200
|
"shrink": true,
|
3201
3201
|
"animated": true,
|
3202
3202
|
"lazyRender": false
|
3203
3203
|
}, {
|
3204
3204
|
default: () => [props.tabs.map((title, index) => createVNode(Tab, {
|
3205
3205
|
"title": title,
|
3206
|
-
"titleClass": bem$
|
3206
|
+
"titleClass": bem$1g("tab-title")
|
3207
3207
|
}, {
|
3208
3208
|
default: () => [childNodes == null ? void 0 : childNodes[index]]
|
3209
3209
|
}))]
|
@@ -3226,8 +3226,8 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
3226
3226
|
toolbarPosition: makeStringProp("top"),
|
3227
3227
|
columnsFieldNames: Object
|
3228
3228
|
});
|
3229
|
-
var stdin_default$
|
3230
|
-
name: name$
|
3229
|
+
var stdin_default$1u = defineComponent({
|
3230
|
+
name: name$1u,
|
3231
3231
|
props: pickerProps,
|
3232
3232
|
emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
|
3233
3233
|
setup(props, {
|
@@ -3308,7 +3308,7 @@ var stdin_default$1t = defineComponent({
|
|
3308
3308
|
return params;
|
3309
3309
|
};
|
3310
3310
|
const cancel = () => emit("cancel", getEventParams());
|
3311
|
-
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$
|
3311
|
+
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$1D, {
|
3312
3312
|
"value": selectedValues.value[columnIndex],
|
3313
3313
|
"fields": fields.value,
|
3314
3314
|
"options": options,
|
@@ -3337,10 +3337,10 @@ var stdin_default$1t = defineComponent({
|
|
3337
3337
|
backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`
|
3338
3338
|
};
|
3339
3339
|
return [createVNode("div", {
|
3340
|
-
"class": bem$
|
3340
|
+
"class": bem$1p("mask"),
|
3341
3341
|
"style": maskStyle
|
3342
3342
|
}, null), createVNode("div", {
|
3343
|
-
"class": [BORDER_UNSET_TOP_BOTTOM, bem$
|
3343
|
+
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1p("frame")],
|
3344
3344
|
"style": frameStyle
|
3345
3345
|
}, null)];
|
3346
3346
|
}
|
@@ -3352,13 +3352,13 @@ var stdin_default$1t = defineComponent({
|
|
3352
3352
|
};
|
3353
3353
|
return createVNode("div", {
|
3354
3354
|
"ref": columnsRef,
|
3355
|
-
"class": bem$
|
3355
|
+
"class": bem$1p("columns"),
|
3356
3356
|
"style": columnsStyle
|
3357
3357
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
3358
3358
|
};
|
3359
3359
|
const renderToolbar = () => {
|
3360
3360
|
if (props.showToolbar && !parent) {
|
3361
|
-
return createVNode(stdin_default$
|
3361
|
+
return createVNode(stdin_default$1C, mergeProps(pick(props, pickerToolbarPropKeys), {
|
3362
3362
|
"onConfirm": confirm,
|
3363
3363
|
"onCancel": cancel
|
3364
3364
|
}), pick(slots, pickerToolbarSlots));
|
@@ -3401,9 +3401,9 @@ var stdin_default$1t = defineComponent({
|
|
3401
3401
|
return () => {
|
3402
3402
|
var _a, _b;
|
3403
3403
|
return createVNode("div", {
|
3404
|
-
"class": bem$
|
3404
|
+
"class": bem$1p()
|
3405
3405
|
}, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? createVNode(Loading, {
|
3406
|
-
"class": bem$
|
3406
|
+
"class": bem$1p("loading")
|
3407
3407
|
}, 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]);
|
3408
3408
|
};
|
3409
3409
|
}
|
@@ -3494,9 +3494,9 @@ function formatDataForCascade({
|
|
3494
3494
|
}
|
3495
3495
|
return options;
|
3496
3496
|
}
|
3497
|
-
const Picker = withInstall(stdin_default$
|
3498
|
-
const [name$
|
3499
|
-
const areaProps = extend({}, pickerSharedProps, {
|
3497
|
+
const Picker = withInstall(stdin_default$1u);
|
3498
|
+
const [name$1j, bem$1f] = createNamespace("area");
|
3499
|
+
const areaProps = extend({}, pick(pickerSharedProps, INHERIT_PROPS), {
|
3500
3500
|
modelValue: String,
|
3501
3501
|
columnsNum: makeNumericProp(3),
|
3502
3502
|
columnsPlaceholder: makeArrayProp(),
|
@@ -3505,8 +3505,8 @@ const areaProps = extend({}, pickerSharedProps, {
|
|
3505
3505
|
default: () => ({})
|
3506
3506
|
}
|
3507
3507
|
});
|
3508
|
-
var stdin_default$
|
3509
|
-
name: name$
|
3508
|
+
var stdin_default$1t = defineComponent({
|
3509
|
+
name: name$1j,
|
3510
3510
|
props: areaProps,
|
3511
3511
|
emits: ["change", "confirm", "cancel", "update:modelValue"],
|
3512
3512
|
setup(props, {
|
@@ -3553,7 +3553,7 @@ var stdin_default$1s = defineComponent({
|
|
3553
3553
|
"ref": picker,
|
3554
3554
|
"modelValue": codes.value,
|
3555
3555
|
"onUpdate:modelValue": ($event) => codes.value = $event,
|
3556
|
-
"class": bem$
|
3556
|
+
"class": bem$1f(),
|
3557
3557
|
"columns": columns.value,
|
3558
3558
|
"onChange": onChange,
|
3559
3559
|
"onCancel": onCancel,
|
@@ -3561,8 +3561,8 @@ var stdin_default$1s = defineComponent({
|
|
3561
3561
|
}, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
|
3562
3562
|
}
|
3563
3563
|
});
|
3564
|
-
const Area = withInstall(stdin_default$
|
3565
|
-
const [name$
|
3564
|
+
const Area = withInstall(stdin_default$1t);
|
3565
|
+
const [name$1i, bem$1e] = createNamespace("cell");
|
3566
3566
|
const cellSharedProps = {
|
3567
3567
|
tag: makeStringProp("div"),
|
3568
3568
|
icon: String,
|
@@ -3586,8 +3586,8 @@ const cellSharedProps = {
|
|
3586
3586
|
}
|
3587
3587
|
};
|
3588
3588
|
const cellProps = extend({}, cellSharedProps, routeProps);
|
3589
|
-
var stdin_default$
|
3590
|
-
name: name$
|
3589
|
+
var stdin_default$1s = defineComponent({
|
3590
|
+
name: name$1i,
|
3591
3591
|
props: cellProps,
|
3592
3592
|
setup(props, {
|
3593
3593
|
slots
|
@@ -3597,7 +3597,7 @@ var stdin_default$1r = defineComponent({
|
|
3597
3597
|
const showLabel = slots.label || isDef(props.label);
|
3598
3598
|
if (showLabel) {
|
3599
3599
|
return createVNode("div", {
|
3600
|
-
"class": [bem$
|
3600
|
+
"class": [bem$1e("label"), props.labelClass]
|
3601
3601
|
}, [slots.label ? slots.label() : props.label]);
|
3602
3602
|
}
|
3603
3603
|
};
|
@@ -3609,7 +3609,7 @@ var stdin_default$1r = defineComponent({
|
|
3609
3609
|
return;
|
3610
3610
|
}
|
3611
3611
|
return createVNode("div", {
|
3612
|
-
"class": [bem$
|
3612
|
+
"class": [bem$1e("title"), props.titleClass],
|
3613
3613
|
"style": props.titleStyle
|
3614
3614
|
}, [titleSlot || createVNode("span", null, [props.title]), renderLabel()]);
|
3615
3615
|
}
|
@@ -3619,7 +3619,7 @@ var stdin_default$1r = defineComponent({
|
|
3619
3619
|
const hasValue = slot || isDef(props.value);
|
3620
3620
|
if (hasValue) {
|
3621
3621
|
return createVNode("div", {
|
3622
|
-
"class": [bem$
|
3622
|
+
"class": [bem$1e("value"), props.valueClass]
|
3623
3623
|
}, [slot ? slot() : createVNode("span", null, [props.value])]);
|
3624
3624
|
}
|
3625
3625
|
};
|
@@ -3630,7 +3630,7 @@ var stdin_default$1r = defineComponent({
|
|
3630
3630
|
if (props.icon) {
|
3631
3631
|
return createVNode(Icon, {
|
3632
3632
|
"name": props.icon,
|
3633
|
-
"class": bem$
|
3633
|
+
"class": bem$1e("left-icon"),
|
3634
3634
|
"classPrefix": props.iconPrefix
|
3635
3635
|
}, null);
|
3636
3636
|
}
|
@@ -3643,7 +3643,7 @@ var stdin_default$1r = defineComponent({
|
|
3643
3643
|
const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
|
3644
3644
|
return createVNode(Icon, {
|
3645
3645
|
"name": name2,
|
3646
|
-
"class": bem$
|
3646
|
+
"class": bem$1e("right-icon")
|
3647
3647
|
}, null);
|
3648
3648
|
}
|
3649
3649
|
};
|
@@ -3668,7 +3668,7 @@ var stdin_default$1r = defineComponent({
|
|
3668
3668
|
classes[size] = !!size;
|
3669
3669
|
}
|
3670
3670
|
return createVNode(tag, {
|
3671
|
-
"class": bem$
|
3671
|
+
"class": bem$1e(classes),
|
3672
3672
|
"role": clickable ? "button" : void 0,
|
3673
3673
|
"tabindex": clickable ? 0 : void 0,
|
3674
3674
|
"onClick": route2
|
@@ -3681,8 +3681,8 @@ var stdin_default$1r = defineComponent({
|
|
3681
3681
|
};
|
3682
3682
|
}
|
3683
3683
|
});
|
3684
|
-
const Cell = withInstall(stdin_default$
|
3685
|
-
const [name$
|
3684
|
+
const Cell = withInstall(stdin_default$1s);
|
3685
|
+
const [name$1h, bem$1d] = createNamespace("form");
|
3686
3686
|
const formProps = {
|
3687
3687
|
colon: Boolean,
|
3688
3688
|
disabled: Boolean,
|
@@ -3701,8 +3701,8 @@ const formProps = {
|
|
3701
3701
|
default: "onBlur"
|
3702
3702
|
}
|
3703
3703
|
};
|
3704
|
-
var stdin_default$
|
3705
|
-
name: name$
|
3704
|
+
var stdin_default$1r = defineComponent({
|
3705
|
+
name: name$1h,
|
3706
3706
|
props: formProps,
|
3707
3707
|
emits: ["submit", "failed"],
|
3708
3708
|
setup(props, {
|
@@ -3828,13 +3828,13 @@ var stdin_default$1q = defineComponent({
|
|
3828
3828
|
return () => {
|
3829
3829
|
var _a;
|
3830
3830
|
return createVNode("form", {
|
3831
|
-
"class": bem$
|
3831
|
+
"class": bem$1d(),
|
3832
3832
|
"onSubmit": onSubmit
|
3833
3833
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
3834
3834
|
};
|
3835
3835
|
}
|
3836
3836
|
});
|
3837
|
-
const Form = withInstall(stdin_default$
|
3837
|
+
const Form = withInstall(stdin_default$1r);
|
3838
3838
|
function isEmptyValue(value) {
|
3839
3839
|
if (Array.isArray(value)) {
|
3840
3840
|
return !value.length;
|
@@ -3923,7 +3923,7 @@ function getStringLength(str) {
|
|
3923
3923
|
function cutString(str, maxlength) {
|
3924
3924
|
return [...str].slice(0, maxlength).join("");
|
3925
3925
|
}
|
3926
|
-
const [name$
|
3926
|
+
const [name$1g, bem$1c] = createNamespace("field");
|
3927
3927
|
const fieldSharedProps = {
|
3928
3928
|
id: String,
|
3929
3929
|
name: String,
|
@@ -3970,8 +3970,8 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
3970
3970
|
default: null
|
3971
3971
|
}
|
3972
3972
|
});
|
3973
|
-
var stdin_default$
|
3974
|
-
name: name$
|
3973
|
+
var stdin_default$1q = defineComponent({
|
3974
|
+
name: name$1g,
|
3975
3975
|
props: fieldProps,
|
3976
3976
|
emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
|
3977
3977
|
setup(props, {
|
@@ -4245,7 +4245,7 @@ var stdin_default$1p = defineComponent({
|
|
4245
4245
|
const getInputId = () => props.id || `${id}-input`;
|
4246
4246
|
const getValidationStatus = () => state.status;
|
4247
4247
|
const renderInput = () => {
|
4248
|
-
const controlClass = bem$
|
4248
|
+
const controlClass = bem$1c("control", [getProp("inputAlign"), {
|
4249
4249
|
error: showError.value,
|
4250
4250
|
custom: !!slots.input,
|
4251
4251
|
"min-height": props.type === "textarea" && !props.autosize
|
@@ -4287,7 +4287,7 @@ var stdin_default$1p = defineComponent({
|
|
4287
4287
|
const leftIconSlot = slots["left-icon"];
|
4288
4288
|
if (props.leftIcon || leftIconSlot) {
|
4289
4289
|
return createVNode("div", {
|
4290
|
-
"class": bem$
|
4290
|
+
"class": bem$1c("left-icon"),
|
4291
4291
|
"onClick": onClickLeftIcon
|
4292
4292
|
}, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
|
4293
4293
|
"name": props.leftIcon,
|
@@ -4299,7 +4299,7 @@ var stdin_default$1p = defineComponent({
|
|
4299
4299
|
const rightIconSlot = slots["right-icon"];
|
4300
4300
|
if (props.rightIcon || rightIconSlot) {
|
4301
4301
|
return createVNode("div", {
|
4302
|
-
"class": bem$
|
4302
|
+
"class": bem$1c("right-icon"),
|
4303
4303
|
"onClick": onClickRightIcon
|
4304
4304
|
}, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
|
4305
4305
|
"name": props.rightIcon,
|
@@ -4311,9 +4311,9 @@ var stdin_default$1p = defineComponent({
|
|
4311
4311
|
if (props.showWordLimit && props.maxlength) {
|
4312
4312
|
const count = getStringLength(getModelValue());
|
4313
4313
|
return createVNode("div", {
|
4314
|
-
"class": bem$
|
4314
|
+
"class": bem$1c("word-limit")
|
4315
4315
|
}, [createVNode("span", {
|
4316
|
-
"class": bem$
|
4316
|
+
"class": bem$1c("word-num")
|
4317
4317
|
}, [count]), createTextVNode("/"), props.maxlength]);
|
4318
4318
|
}
|
4319
4319
|
};
|
@@ -4326,7 +4326,7 @@ var stdin_default$1p = defineComponent({
|
|
4326
4326
|
const slot = slots["error-message"];
|
4327
4327
|
const errorMessageAlign = getProp("errorMessageAlign");
|
4328
4328
|
return createVNode("div", {
|
4329
|
-
"class": bem$
|
4329
|
+
"class": bem$1c("error-message", errorMessageAlign)
|
4330
4330
|
}, [slot ? slot({
|
4331
4331
|
message
|
4332
4332
|
}) : message]);
|
@@ -4354,13 +4354,13 @@ var stdin_default$1p = defineComponent({
|
|
4354
4354
|
}
|
4355
4355
|
};
|
4356
4356
|
const renderFieldBody = () => [createVNode("div", {
|
4357
|
-
"class": bem$
|
4357
|
+
"class": bem$1c("body")
|
4358
4358
|
}, [renderInput(), showClear.value && createVNode(Icon, {
|
4359
4359
|
"ref": clearIconRef,
|
4360
4360
|
"name": props.clearIcon,
|
4361
|
-
"class": bem$
|
4361
|
+
"class": bem$1c("clear")
|
4362
4362
|
}, null), renderRightIcon(), slots.button && createVNode("div", {
|
4363
|
-
"class": bem$
|
4363
|
+
"class": bem$1c("button")
|
4364
4364
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
4365
4365
|
useExpose({
|
4366
4366
|
blur,
|
@@ -4404,7 +4404,7 @@ var stdin_default$1p = defineComponent({
|
|
4404
4404
|
};
|
4405
4405
|
return createVNode(Cell, {
|
4406
4406
|
"size": props.size,
|
4407
|
-
"class": bem$
|
4407
|
+
"class": bem$1c({
|
4408
4408
|
error: showError.value,
|
4409
4409
|
disabled,
|
4410
4410
|
[`label-${labelAlign}`]: labelAlign
|
@@ -4414,8 +4414,8 @@ var stdin_default$1p = defineComponent({
|
|
4414
4414
|
"isLink": props.isLink,
|
4415
4415
|
"clickable": props.clickable,
|
4416
4416
|
"titleStyle": labelStyle.value,
|
4417
|
-
"valueClass": bem$
|
4418
|
-
"titleClass": [bem$
|
4417
|
+
"valueClass": bem$1c("value"),
|
4418
|
+
"titleClass": [bem$1c("label", [labelAlign, {
|
4419
4419
|
required: props.required
|
4420
4420
|
}]), props.labelClass],
|
4421
4421
|
"arrowDirection": props.arrowDirection
|
@@ -4428,7 +4428,7 @@ var stdin_default$1p = defineComponent({
|
|
4428
4428
|
};
|
4429
4429
|
}
|
4430
4430
|
});
|
4431
|
-
const Field = withInstall(stdin_default$
|
4431
|
+
const Field = withInstall(stdin_default$1q);
|
4432
4432
|
let lockCount = 0;
|
4433
4433
|
function lockClick(lock) {
|
4434
4434
|
if (lock) {
|
@@ -4443,7 +4443,7 @@ function lockClick(lock) {
|
|
4443
4443
|
}
|
4444
4444
|
}
|
4445
4445
|
}
|
4446
|
-
const [name$
|
4446
|
+
const [name$1f, bem$1b] = createNamespace("toast");
|
4447
4447
|
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
4448
4448
|
const toastProps = {
|
4449
4449
|
icon: String,
|
@@ -4466,8 +4466,8 @@ const toastProps = {
|
|
4466
4466
|
closeOnClick: Boolean,
|
4467
4467
|
closeOnClickOverlay: Boolean
|
4468
4468
|
};
|
4469
|
-
var stdin_default$
|
4470
|
-
name: name$
|
4469
|
+
var stdin_default$1p = defineComponent({
|
4470
|
+
name: name$1f,
|
4471
4471
|
props: toastProps,
|
4472
4472
|
emits: ["update:show"],
|
4473
4473
|
setup(props, {
|
@@ -4503,13 +4503,13 @@ var stdin_default$1o = defineComponent({
|
|
4503
4503
|
return createVNode(Icon, {
|
4504
4504
|
"name": icon || type,
|
4505
4505
|
"size": iconSize,
|
4506
|
-
"class": bem$
|
4506
|
+
"class": bem$1b("icon"),
|
4507
4507
|
"classPrefix": iconPrefix
|
4508
4508
|
}, null);
|
4509
4509
|
}
|
4510
4510
|
if (type === "loading") {
|
4511
4511
|
return createVNode(Loading, {
|
4512
|
-
"class": bem$
|
4512
|
+
"class": bem$1b("loading"),
|
4513
4513
|
"size": iconSize,
|
4514
4514
|
"type": loadingType
|
4515
4515
|
}, null);
|
@@ -4522,16 +4522,16 @@ var stdin_default$1o = defineComponent({
|
|
4522
4522
|
} = props;
|
4523
4523
|
if (slots.message) {
|
4524
4524
|
return createVNode("div", {
|
4525
|
-
"class": bem$
|
4525
|
+
"class": bem$1b("text")
|
4526
4526
|
}, [slots.message()]);
|
4527
4527
|
}
|
4528
4528
|
if (isDef(message) && message !== "") {
|
4529
4529
|
return type === "html" ? createVNode("div", {
|
4530
4530
|
"key": 0,
|
4531
|
-
"class": bem$
|
4531
|
+
"class": bem$1b("text"),
|
4532
4532
|
"innerHTML": String(message)
|
4533
4533
|
}, null) : createVNode("div", {
|
4534
|
-
"class": bem$
|
4534
|
+
"class": bem$1b("text")
|
4535
4535
|
}, [message]);
|
4536
4536
|
}
|
4537
4537
|
};
|
@@ -4547,7 +4547,7 @@ var stdin_default$1o = defineComponent({
|
|
4547
4547
|
onMounted(toggleClickable);
|
4548
4548
|
onUnmounted(toggleClickable);
|
4549
4549
|
return () => createVNode(Popup, mergeProps({
|
4550
|
-
"class": [bem$
|
4550
|
+
"class": [bem$1b([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
4551
4551
|
[props.type]: !props.icon
|
4552
4552
|
}]), props.className],
|
4553
4553
|
"lockScroll": false,
|
@@ -4648,7 +4648,7 @@ function createInstance() {
|
|
4648
4648
|
onClosed,
|
4649
4649
|
"onUpdate:show": toggle
|
4650
4650
|
};
|
4651
|
-
return createVNode(stdin_default$
|
4651
|
+
return createVNode(stdin_default$1p, mergeProps(state, attrs), null);
|
4652
4652
|
};
|
4653
4653
|
watch(message, (val) => {
|
4654
4654
|
state.message = val;
|
@@ -4718,8 +4718,8 @@ const resetToastDefaultOptions = (type) => {
|
|
4718
4718
|
const allowMultipleToast = (value = true) => {
|
4719
4719
|
allowMultiple = value;
|
4720
4720
|
};
|
4721
|
-
const Toast = withInstall(stdin_default$
|
4722
|
-
const [name$
|
4721
|
+
const Toast = withInstall(stdin_default$1p);
|
4722
|
+
const [name$1e, bem$1a] = createNamespace("switch");
|
4723
4723
|
const switchProps = {
|
4724
4724
|
size: numericProp,
|
4725
4725
|
loading: Boolean,
|
@@ -4736,8 +4736,8 @@ const switchProps = {
|
|
4736
4736
|
default: false
|
4737
4737
|
}
|
4738
4738
|
};
|
4739
|
-
var stdin_default$
|
4740
|
-
name: name$
|
4739
|
+
var stdin_default$1o = defineComponent({
|
4740
|
+
name: name$1e,
|
4741
4741
|
props: switchProps,
|
4742
4742
|
emits: ["change", "update:modelValue"],
|
4743
4743
|
setup(props, {
|
@@ -4756,7 +4756,7 @@ var stdin_default$1n = defineComponent({
|
|
4756
4756
|
if (props.loading) {
|
4757
4757
|
const color = isChecked() ? props.activeColor : props.inactiveColor;
|
4758
4758
|
return createVNode(Loading, {
|
4759
|
-
"class": bem$
|
4759
|
+
"class": bem$1a("loading"),
|
4760
4760
|
"color": color
|
4761
4761
|
}, null);
|
4762
4762
|
}
|
@@ -4781,7 +4781,7 @@ var stdin_default$1n = defineComponent({
|
|
4781
4781
|
};
|
4782
4782
|
return createVNode("div", {
|
4783
4783
|
"role": "switch",
|
4784
|
-
"class": bem$
|
4784
|
+
"class": bem$1a({
|
4785
4785
|
on: checked,
|
4786
4786
|
loading,
|
4787
4787
|
disabled
|
@@ -4791,16 +4791,16 @@ var stdin_default$1n = defineComponent({
|
|
4791
4791
|
"aria-checked": checked,
|
4792
4792
|
"onClick": onClick
|
4793
4793
|
}, [createVNode("div", {
|
4794
|
-
"class": bem$
|
4794
|
+
"class": bem$1a("node")
|
4795
4795
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
4796
4796
|
};
|
4797
4797
|
}
|
4798
4798
|
});
|
4799
|
-
const Switch = withInstall(stdin_default$
|
4800
|
-
const [name$
|
4799
|
+
const Switch = withInstall(stdin_default$1o);
|
4800
|
+
const [name$1d, bem$19] = createNamespace("address-edit-detail");
|
4801
4801
|
const t$j = createNamespace("address-edit")[2];
|
4802
|
-
var stdin_default$
|
4803
|
-
name: name$
|
4802
|
+
var stdin_default$1n = defineComponent({
|
4803
|
+
name: name$1d,
|
4804
4804
|
props: {
|
4805
4805
|
show: Boolean,
|
4806
4806
|
rows: numericProp,
|
@@ -4834,7 +4834,7 @@ var stdin_default$1m = defineComponent({
|
|
4834
4834
|
"icon": "location-o",
|
4835
4835
|
"title": express.name,
|
4836
4836
|
"label": express.address,
|
4837
|
-
"class": bem$
|
4837
|
+
"class": bem$19("search-item"),
|
4838
4838
|
"border": false,
|
4839
4839
|
"onClick": () => onSelect(express)
|
4840
4840
|
}, null));
|
@@ -4848,7 +4848,7 @@ var stdin_default$1m = defineComponent({
|
|
4848
4848
|
"autosize": true,
|
4849
4849
|
"clearable": true,
|
4850
4850
|
"ref": field,
|
4851
|
-
"class": bem$
|
4851
|
+
"class": bem$19(),
|
4852
4852
|
"rows": props.rows,
|
4853
4853
|
"type": "textarea",
|
4854
4854
|
"rules": props.rules,
|
@@ -4865,7 +4865,7 @@ var stdin_default$1m = defineComponent({
|
|
4865
4865
|
};
|
4866
4866
|
}
|
4867
4867
|
});
|
4868
|
-
const [name$
|
4868
|
+
const [name$1c, bem$18, t$i] = createNamespace("address-edit");
|
4869
4869
|
const DEFAULT_DATA = {
|
4870
4870
|
name: "",
|
4871
4871
|
tel: "",
|
@@ -4905,8 +4905,8 @@ const addressEditProps = {
|
|
4905
4905
|
default: isMobile
|
4906
4906
|
}
|
4907
4907
|
};
|
4908
|
-
var stdin_default$
|
4909
|
-
name: name$
|
4908
|
+
var stdin_default$1m = defineComponent({
|
4909
|
+
name: name$1c,
|
4910
4910
|
props: addressEditProps,
|
4911
4911
|
emits: ["save", "focus", "delete", "clickArea", "changeArea", "changeDetail", "selectSearch", "changeDefault"],
|
4912
4912
|
setup(props, {
|
@@ -5016,8 +5016,9 @@ var stdin_default$1l = defineComponent({
|
|
5016
5016
|
};
|
5017
5017
|
return withDirectives(createVNode(Cell, {
|
5018
5018
|
"center": true,
|
5019
|
+
"border": false,
|
5019
5020
|
"title": t$i("defaultAddress"),
|
5020
|
-
"class": bem$
|
5021
|
+
"class": bem$18("default")
|
5021
5022
|
}, slots2), [[vShow, !hideBottomFields.value]]);
|
5022
5023
|
}
|
5023
5024
|
};
|
@@ -5043,13 +5044,13 @@ var stdin_default$1l = defineComponent({
|
|
5043
5044
|
disableArea
|
5044
5045
|
} = props;
|
5045
5046
|
return createVNode(Form, {
|
5046
|
-
"class": bem$
|
5047
|
+
"class": bem$18(),
|
5047
5048
|
"onSubmit": onSave
|
5048
5049
|
}, {
|
5049
5050
|
default: () => {
|
5050
5051
|
var _a;
|
5051
5052
|
return [createVNode("div", {
|
5052
|
-
"class": bem$
|
5053
|
+
"class": bem$18("fields")
|
5053
5054
|
}, [createVNode(Field, {
|
5054
5055
|
"modelValue": data.name,
|
5055
5056
|
"onUpdate:modelValue": ($event) => data.name = $event,
|
@@ -5080,7 +5081,7 @@ var stdin_default$1l = defineComponent({
|
|
5080
5081
|
emit("clickArea");
|
5081
5082
|
showAreaPopup.value = !disableArea;
|
5082
5083
|
}
|
5083
|
-
}, null), [[vShow, props.showArea]]), createVNode(stdin_default$
|
5084
|
+
}, null), [[vShow, props.showArea]]), createVNode(stdin_default$1n, {
|
5084
5085
|
"show": props.showDetail,
|
5085
5086
|
"rows": props.detailRows,
|
5086
5087
|
"rules": rules.value.addressDetail,
|
@@ -5094,19 +5095,19 @@ var stdin_default$1l = defineComponent({
|
|
5094
5095
|
"onInput": onChangeDetail,
|
5095
5096
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
5096
5097
|
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
5097
|
-
"class": bem$
|
5098
|
+
"class": bem$18("buttons")
|
5098
5099
|
}, [createVNode(Button, {
|
5099
5100
|
"block": true,
|
5100
5101
|
"round": true,
|
5101
5102
|
"type": "primary",
|
5102
5103
|
"text": props.saveButtonText || t$i("save"),
|
5103
|
-
"class": bem$
|
5104
|
+
"class": bem$18("button"),
|
5104
5105
|
"loading": props.isSaving,
|
5105
5106
|
"nativeType": "submit"
|
5106
5107
|
}, null), props.showDelete && createVNode(Button, {
|
5107
5108
|
"block": true,
|
5108
5109
|
"round": true,
|
5109
|
-
"class": bem$
|
5110
|
+
"class": bem$18("button"),
|
5110
5111
|
"loading": props.isDeleting,
|
5111
5112
|
"text": props.deleteButtonText || t$i("delete"),
|
5112
5113
|
"onClick": onDelete
|
@@ -5136,8 +5137,8 @@ var stdin_default$1l = defineComponent({
|
|
5136
5137
|
};
|
5137
5138
|
}
|
5138
5139
|
});
|
5139
|
-
const AddressEdit = withInstall(stdin_default$
|
5140
|
-
const [name$
|
5140
|
+
const AddressEdit = withInstall(stdin_default$1m);
|
5141
|
+
const [name$1b, bem$17] = createNamespace("radio-group");
|
5141
5142
|
const radioGroupProps = {
|
5142
5143
|
disabled: Boolean,
|
5143
5144
|
iconSize: numericProp,
|
@@ -5145,9 +5146,9 @@ const radioGroupProps = {
|
|
5145
5146
|
modelValue: unknownProp,
|
5146
5147
|
checkedColor: String
|
5147
5148
|
};
|
5148
|
-
const RADIO_KEY = Symbol(name$
|
5149
|
-
var stdin_default$
|
5150
|
-
name: name$
|
5149
|
+
const RADIO_KEY = Symbol(name$1b);
|
5150
|
+
var stdin_default$1l = defineComponent({
|
5151
|
+
name: name$1b,
|
5151
5152
|
props: radioGroupProps,
|
5152
5153
|
emits: ["change", "update:modelValue"],
|
5153
5154
|
setup(props, {
|
@@ -5167,14 +5168,14 @@ var stdin_default$1k = defineComponent({
|
|
5167
5168
|
return () => {
|
5168
5169
|
var _a;
|
5169
5170
|
return createVNode("div", {
|
5170
|
-
"class": bem$
|
5171
|
+
"class": bem$17([props.direction]),
|
5171
5172
|
"role": "radiogroup"
|
5172
5173
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5173
5174
|
};
|
5174
5175
|
}
|
5175
5176
|
});
|
5176
|
-
const RadioGroup = withInstall(stdin_default$
|
5177
|
-
const [name$
|
5177
|
+
const RadioGroup = withInstall(stdin_default$1l);
|
5178
|
+
const [name$1a, bem$16] = createNamespace("tag");
|
5178
5179
|
const tagProps = {
|
5179
5180
|
size: String,
|
5180
5181
|
mark: Boolean,
|
@@ -5186,8 +5187,8 @@ const tagProps = {
|
|
5186
5187
|
textColor: String,
|
5187
5188
|
closeable: Boolean
|
5188
5189
|
};
|
5189
|
-
var stdin_default$
|
5190
|
-
name: name$
|
5190
|
+
var stdin_default$1k = defineComponent({
|
5191
|
+
name: name$1a,
|
5191
5192
|
props: tagProps,
|
5192
5193
|
emits: ["close"],
|
5193
5194
|
setup(props, {
|
@@ -5230,12 +5231,12 @@ var stdin_default$1j = defineComponent({
|
|
5230
5231
|
}
|
5231
5232
|
const CloseIcon = closeable && createVNode(Icon, {
|
5232
5233
|
"name": "cross",
|
5233
|
-
"class": [bem$
|
5234
|
+
"class": [bem$16("close"), HAPTICS_FEEDBACK],
|
5234
5235
|
"onClick": onClose
|
5235
5236
|
}, null);
|
5236
5237
|
return createVNode("span", {
|
5237
5238
|
"style": getStyle(),
|
5238
|
-
"class": bem$
|
5239
|
+
"class": bem$16([classes, type])
|
5239
5240
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
|
5240
5241
|
};
|
5241
5242
|
return () => createVNode(Transition, {
|
@@ -5245,7 +5246,7 @@ var stdin_default$1j = defineComponent({
|
|
5245
5246
|
});
|
5246
5247
|
}
|
5247
5248
|
});
|
5248
|
-
const Tag = withInstall(stdin_default$
|
5249
|
+
const Tag = withInstall(stdin_default$1k);
|
5249
5250
|
const checkerProps = {
|
5250
5251
|
name: unknownProp,
|
5251
5252
|
shape: makeStringProp("round"),
|
@@ -5256,7 +5257,7 @@ const checkerProps = {
|
|
5256
5257
|
labelPosition: String,
|
5257
5258
|
labelDisabled: Boolean
|
5258
5259
|
};
|
5259
|
-
var stdin_default$
|
5260
|
+
var stdin_default$1j = defineComponent({
|
5260
5261
|
props: extend({}, checkerProps, {
|
5261
5262
|
bem: makeRequiredProp(Function),
|
5262
5263
|
role: String,
|
@@ -5358,9 +5359,9 @@ var stdin_default$1i = defineComponent({
|
|
5358
5359
|
}
|
5359
5360
|
});
|
5360
5361
|
const radioProps = checkerProps;
|
5361
|
-
const [name$
|
5362
|
-
var stdin_default$
|
5363
|
-
name: name$
|
5362
|
+
const [name$19, bem$15] = createNamespace("radio");
|
5363
|
+
var stdin_default$1i = defineComponent({
|
5364
|
+
name: name$19,
|
5364
5365
|
props: checkerProps,
|
5365
5366
|
emits: ["update:modelValue"],
|
5366
5367
|
setup(props, {
|
@@ -5381,8 +5382,8 @@ var stdin_default$1h = defineComponent({
|
|
5381
5382
|
emit("update:modelValue", props.name);
|
5382
5383
|
}
|
5383
5384
|
};
|
5384
|
-
return () => createVNode(stdin_default$
|
5385
|
-
"bem": bem$
|
5385
|
+
return () => createVNode(stdin_default$1j, mergeProps({
|
5386
|
+
"bem": bem$15,
|
5386
5387
|
"role": "radio",
|
5387
5388
|
"parent": parent,
|
5388
5389
|
"checked": checked(),
|
@@ -5390,10 +5391,10 @@ var stdin_default$1h = defineComponent({
|
|
5390
5391
|
}, props), pick(slots, ["default", "icon"]));
|
5391
5392
|
}
|
5392
5393
|
});
|
5393
|
-
const Radio = withInstall(stdin_default$
|
5394
|
-
const [name$
|
5395
|
-
var stdin_default$
|
5396
|
-
name: name$
|
5394
|
+
const Radio = withInstall(stdin_default$1i);
|
5395
|
+
const [name$18, bem$14] = createNamespace("address-item");
|
5396
|
+
var stdin_default$1h = defineComponent({
|
5397
|
+
name: name$18,
|
5397
5398
|
props: {
|
5398
5399
|
address: makeRequiredProp(Object),
|
5399
5400
|
disabled: Boolean,
|
@@ -5413,7 +5414,7 @@ var stdin_default$1g = defineComponent({
|
|
5413
5414
|
};
|
5414
5415
|
const renderRightIcon = () => createVNode(Icon, {
|
5415
5416
|
"name": "edit",
|
5416
|
-
"class": bem$
|
5417
|
+
"class": bem$14("edit"),
|
5417
5418
|
"onClick": (event) => {
|
5418
5419
|
event.stopPropagation();
|
5419
5420
|
emit("edit");
|
@@ -5428,7 +5429,7 @@ var stdin_default$1g = defineComponent({
|
|
5428
5429
|
return createVNode(Tag, {
|
5429
5430
|
"type": "primary",
|
5430
5431
|
"round": true,
|
5431
|
-
"class": bem$
|
5432
|
+
"class": bem$14("tag")
|
5432
5433
|
}, {
|
5433
5434
|
default: () => [props.defaultTagText]
|
5434
5435
|
});
|
@@ -5441,9 +5442,9 @@ var stdin_default$1g = defineComponent({
|
|
5441
5442
|
switchable
|
5442
5443
|
} = props;
|
5443
5444
|
const Info = [createVNode("div", {
|
5444
|
-
"class": bem$
|
5445
|
+
"class": bem$14("name")
|
5445
5446
|
}, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
|
5446
|
-
"class": bem$
|
5447
|
+
"class": bem$14("address")
|
5447
5448
|
}, [address.address])];
|
5448
5449
|
if (switchable && !disabled) {
|
5449
5450
|
return createVNode(Radio, {
|
@@ -5461,13 +5462,13 @@ var stdin_default$1g = defineComponent({
|
|
5461
5462
|
disabled
|
5462
5463
|
} = props;
|
5463
5464
|
return createVNode("div", {
|
5464
|
-
"class": bem$
|
5465
|
+
"class": bem$14({
|
5465
5466
|
disabled
|
5466
5467
|
}),
|
5467
5468
|
"onClick": onClick
|
5468
5469
|
}, [createVNode(Cell, {
|
5469
5470
|
"border": false,
|
5470
|
-
"titleClass": bem$
|
5471
|
+
"titleClass": bem$14("title")
|
5471
5472
|
}, {
|
5472
5473
|
title: renderContent,
|
5473
5474
|
"right-icon": renderRightIcon
|
@@ -5477,7 +5478,7 @@ var stdin_default$1g = defineComponent({
|
|
5477
5478
|
};
|
5478
5479
|
}
|
5479
5480
|
});
|
5480
|
-
const [name$
|
5481
|
+
const [name$17, bem$13, t$h] = createNamespace("address-list");
|
5481
5482
|
const addressListProps = {
|
5482
5483
|
list: makeArrayProp(),
|
5483
5484
|
modelValue: numericProp,
|
@@ -5487,8 +5488,8 @@ const addressListProps = {
|
|
5487
5488
|
addButtonText: String,
|
5488
5489
|
defaultTagText: String
|
5489
5490
|
};
|
5490
|
-
var stdin_default$
|
5491
|
-
name: name$
|
5491
|
+
var stdin_default$1g = defineComponent({
|
5492
|
+
name: name$17,
|
5492
5493
|
props: addressListProps,
|
5493
5494
|
emits: ["add", "edit", "select", "clickItem", "editDisabled", "selectDisabled", "update:modelValue"],
|
5494
5495
|
setup(props, {
|
@@ -5504,7 +5505,7 @@ var stdin_default$1f = defineComponent({
|
|
5504
5505
|
emit("update:modelValue", item.id);
|
5505
5506
|
}
|
5506
5507
|
};
|
5507
|
-
return createVNode(stdin_default$
|
5508
|
+
return createVNode(stdin_default$1h, {
|
5508
5509
|
"key": item.id,
|
5509
5510
|
"address": item,
|
5510
5511
|
"disabled": disabled,
|
@@ -5524,13 +5525,13 @@ var stdin_default$1f = defineComponent({
|
|
5524
5525
|
}
|
5525
5526
|
};
|
5526
5527
|
const renderBottom = () => createVNode("div", {
|
5527
|
-
"class": [bem$
|
5528
|
+
"class": [bem$13("bottom"), "van-safe-area-bottom"]
|
5528
5529
|
}, [createVNode(Button, {
|
5529
5530
|
"round": true,
|
5530
5531
|
"block": true,
|
5531
5532
|
"type": "primary",
|
5532
5533
|
"text": props.addButtonText || t$h("add"),
|
5533
|
-
"class": bem$
|
5534
|
+
"class": bem$13("add"),
|
5534
5535
|
"onClick": () => emit("add")
|
5535
5536
|
}, null)]);
|
5536
5537
|
return () => {
|
@@ -5538,10 +5539,10 @@ var stdin_default$1f = defineComponent({
|
|
5538
5539
|
const List2 = renderList(props.list);
|
5539
5540
|
const DisabledList = renderList(props.disabledList, true);
|
5540
5541
|
const DisabledText = props.disabledText && createVNode("div", {
|
5541
|
-
"class": bem$
|
5542
|
+
"class": bem$13("disabled-text")
|
5542
5543
|
}, [props.disabledText]);
|
5543
5544
|
return createVNode("div", {
|
5544
|
-
"class": bem$
|
5545
|
+
"class": bem$13()
|
5545
5546
|
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
|
5546
5547
|
"modelValue": props.modelValue
|
5547
5548
|
}, {
|
@@ -5550,7 +5551,7 @@ var stdin_default$1f = defineComponent({
|
|
5550
5551
|
};
|
5551
5552
|
}
|
5552
5553
|
});
|
5553
|
-
const AddressList = withInstall(stdin_default$
|
5554
|
+
const AddressList = withInstall(stdin_default$1g);
|
5554
5555
|
const hasIntersectionObserver = inBrowser$1 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
5555
5556
|
const modeType = {
|
5556
5557
|
event: "event",
|
@@ -5703,7 +5704,7 @@ class ImageCache {
|
|
5703
5704
|
this.caches.shift();
|
5704
5705
|
}
|
5705
5706
|
}
|
5706
|
-
const [name$
|
5707
|
+
const [name$16, bem$12] = createNamespace("back-top");
|
5707
5708
|
const backTopProps = {
|
5708
5709
|
right: numericProp,
|
5709
5710
|
bottom: numericProp,
|
@@ -5716,8 +5717,8 @@ const backTopProps = {
|
|
5716
5717
|
default: "body"
|
5717
5718
|
}
|
5718
5719
|
};
|
5719
|
-
var stdin_default$
|
5720
|
-
name: name$
|
5720
|
+
var stdin_default$1f = defineComponent({
|
5721
|
+
name: name$16,
|
5721
5722
|
inheritAttrs: false,
|
5722
5723
|
props: backTopProps,
|
5723
5724
|
emits: ["click"],
|
@@ -5775,28 +5776,158 @@ var stdin_default$1e = defineComponent({
|
|
5775
5776
|
watch(() => props.target, updateTarget);
|
5776
5777
|
return () => {
|
5777
5778
|
const Content = createVNode("div", mergeProps({
|
5778
|
-
"ref": root,
|
5779
|
-
"class": bem$
|
5779
|
+
"ref": !props.teleport ? root : void 0,
|
5780
|
+
"class": bem$12({
|
5780
5781
|
active: show.value
|
5781
5782
|
}),
|
5782
5783
|
"style": style.value,
|
5783
5784
|
"onClick": onClick
|
5784
5785
|
}, attrs), [slots.default ? slots.default() : createVNode(Icon, {
|
5785
5786
|
"name": "back-top",
|
5786
|
-
"class": bem$
|
5787
|
+
"class": bem$12("icon")
|
5787
5788
|
}, null)]);
|
5788
5789
|
if (props.teleport) {
|
5789
|
-
return createVNode(
|
5790
|
+
return [createVNode("div", {
|
5791
|
+
"ref": root,
|
5792
|
+
"class": bem$12("placeholder")
|
5793
|
+
}, null), createVNode(Teleport, {
|
5790
5794
|
"to": props.teleport
|
5791
5795
|
}, {
|
5792
5796
|
default: () => [Content]
|
5793
|
-
});
|
5797
|
+
})];
|
5794
5798
|
}
|
5795
5799
|
return Content;
|
5796
5800
|
};
|
5797
5801
|
}
|
5798
5802
|
});
|
5799
|
-
const BackTop = withInstall(stdin_default$
|
5803
|
+
const BackTop = withInstall(stdin_default$1f);
|
5804
|
+
var __async = (__this, __arguments, generator) => {
|
5805
|
+
return new Promise((resolve, reject) => {
|
5806
|
+
var fulfilled = (value) => {
|
5807
|
+
try {
|
5808
|
+
step(generator.next(value));
|
5809
|
+
} catch (e) {
|
5810
|
+
reject(e);
|
5811
|
+
}
|
5812
|
+
};
|
5813
|
+
var rejected = (value) => {
|
5814
|
+
try {
|
5815
|
+
step(generator.throw(value));
|
5816
|
+
} catch (e) {
|
5817
|
+
reject(e);
|
5818
|
+
}
|
5819
|
+
};
|
5820
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
5821
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
5822
|
+
});
|
5823
|
+
};
|
5824
|
+
const barrageProps = {
|
5825
|
+
top: makeNumericProp(10),
|
5826
|
+
rows: makeNumericProp(4),
|
5827
|
+
duration: makeNumericProp(4e3),
|
5828
|
+
autoPlay: truthProp,
|
5829
|
+
delay: makeNumberProp(300),
|
5830
|
+
modelValue: makeArrayProp()
|
5831
|
+
};
|
5832
|
+
const [name$15, bem$11] = createNamespace("barrage");
|
5833
|
+
var stdin_default$1e = defineComponent({
|
5834
|
+
name: name$15,
|
5835
|
+
props: barrageProps,
|
5836
|
+
emits: ["update:modelValue"],
|
5837
|
+
setup(props, {
|
5838
|
+
emit,
|
5839
|
+
slots
|
5840
|
+
}) {
|
5841
|
+
const barrageWrapper = ref();
|
5842
|
+
const className = bem$11("item");
|
5843
|
+
const total = ref(0);
|
5844
|
+
const barrageItems = [];
|
5845
|
+
const createBarrageItem = (text, delay = props.delay) => {
|
5846
|
+
const item = document.createElement("span");
|
5847
|
+
item.className = className;
|
5848
|
+
item.innerText = String(text);
|
5849
|
+
item.style.animationDuration = `${props.duration}ms`;
|
5850
|
+
item.style.animationDelay = `${delay}ms`;
|
5851
|
+
item.style.animationName = "van-barrage";
|
5852
|
+
item.style.animationTimingFunction = "linear";
|
5853
|
+
return item;
|
5854
|
+
};
|
5855
|
+
const isInitBarrage = ref(true);
|
5856
|
+
const isPlay = ref(props.autoPlay);
|
5857
|
+
const appendBarrageItem = ({
|
5858
|
+
id,
|
5859
|
+
text
|
5860
|
+
}, i) => {
|
5861
|
+
var _a;
|
5862
|
+
const item = createBarrageItem(text, isInitBarrage.value ? i * props.delay : void 0);
|
5863
|
+
if (!props.autoPlay && isPlay.value === false) {
|
5864
|
+
item.style.animationPlayState = "paused";
|
5865
|
+
}
|
5866
|
+
(_a = barrageWrapper.value) == null ? void 0 : _a.append(item);
|
5867
|
+
total.value++;
|
5868
|
+
const top = (total.value - 1) % +props.rows * item.offsetHeight + +props.top;
|
5869
|
+
item.style.top = `${top}px`;
|
5870
|
+
item.dataset.id = String(id);
|
5871
|
+
barrageItems.push(item);
|
5872
|
+
item.addEventListener("animationend", () => {
|
5873
|
+
emit("update:modelValue", [...props.modelValue].filter((v) => String(v.id) !== item.dataset.id));
|
5874
|
+
});
|
5875
|
+
};
|
5876
|
+
const updateBarrages = (newValue, oldValue) => {
|
5877
|
+
const map = new Map(oldValue.map((item) => [item.id, item]));
|
5878
|
+
newValue.forEach((item, i) => {
|
5879
|
+
if (map.has(item.id)) {
|
5880
|
+
map.delete(item.id);
|
5881
|
+
} else {
|
5882
|
+
appendBarrageItem(item, i);
|
5883
|
+
}
|
5884
|
+
});
|
5885
|
+
map.forEach((item) => {
|
5886
|
+
const index = barrageItems.findIndex((span) => span.dataset.id === String(item.id));
|
5887
|
+
if (index > -1) {
|
5888
|
+
barrageItems[index].remove();
|
5889
|
+
barrageItems.splice(index, 1);
|
5890
|
+
}
|
5891
|
+
});
|
5892
|
+
isInitBarrage.value = false;
|
5893
|
+
};
|
5894
|
+
watch(() => props.modelValue.slice(), (newValue, oldValue) => updateBarrages(newValue != null ? newValue : [], oldValue != null ? oldValue : []), {
|
5895
|
+
deep: true
|
5896
|
+
});
|
5897
|
+
const rootStyle = ref({});
|
5898
|
+
onMounted(() => __async(this, null, function* () {
|
5899
|
+
var _a;
|
5900
|
+
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
5901
|
+
yield nextTick();
|
5902
|
+
updateBarrages(props.modelValue, []);
|
5903
|
+
}));
|
5904
|
+
const play = () => {
|
5905
|
+
isPlay.value = true;
|
5906
|
+
barrageItems.forEach((item) => {
|
5907
|
+
item.style.animationPlayState = "running";
|
5908
|
+
});
|
5909
|
+
};
|
5910
|
+
const pause = () => {
|
5911
|
+
isPlay.value = false;
|
5912
|
+
barrageItems.forEach((item) => {
|
5913
|
+
item.style.animationPlayState = "paused";
|
5914
|
+
});
|
5915
|
+
};
|
5916
|
+
useExpose({
|
5917
|
+
play,
|
5918
|
+
pause
|
5919
|
+
});
|
5920
|
+
return () => {
|
5921
|
+
var _a;
|
5922
|
+
return createVNode("div", {
|
5923
|
+
"class": bem$11(),
|
5924
|
+
"ref": barrageWrapper,
|
5925
|
+
"style": rootStyle.value
|
5926
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5927
|
+
};
|
5928
|
+
}
|
5929
|
+
});
|
5930
|
+
const Barrage = withInstall(stdin_default$1e);
|
5800
5931
|
const [name$14, bem$10, t$g] = createNamespace("calendar");
|
5801
5932
|
const formatMonthTitle = (date) => t$g("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
5802
5933
|
function compareMonth(date1, date2) {
|
@@ -6958,6 +7089,7 @@ var stdin_default$17 = defineComponent({
|
|
6958
7089
|
}) {
|
6959
7090
|
const tabs = ref([]);
|
6960
7091
|
const activeTab = ref(0);
|
7092
|
+
const [selectedElementRefs, setSelectedElementRefs] = useRefs();
|
6961
7093
|
const {
|
6962
7094
|
text: textKey,
|
6963
7095
|
value: valueKey,
|
@@ -7076,6 +7208,7 @@ var stdin_default$17 = defineComponent({
|
|
7076
7208
|
selected
|
7077
7209
|
}) : createVNode("span", null, [option[textKey]]);
|
7078
7210
|
return createVNode("li", {
|
7211
|
+
"ref": selected ? setSelectedElementRefs(tabIndex) : void 0,
|
7079
7212
|
"role": "menuitemradio",
|
7080
7213
|
"class": [bem$Z("option", {
|
7081
7214
|
selected,
|
@@ -7132,7 +7265,18 @@ var stdin_default$17 = defineComponent({
|
|
7132
7265
|
}, {
|
7133
7266
|
default: () => [tabs.value.map(renderTab)]
|
7134
7267
|
});
|
7268
|
+
const scrollIntoView = (el) => {
|
7269
|
+
const scrollParent = el.parentElement;
|
7270
|
+
if (scrollParent) {
|
7271
|
+
scrollParent.scrollTop = el.offsetTop - (scrollParent.offsetHeight - el.offsetHeight) / 2;
|
7272
|
+
}
|
7273
|
+
};
|
7135
7274
|
updateTabs();
|
7275
|
+
watch(activeTab, (value) => {
|
7276
|
+
const el = selectedElementRefs.value[value];
|
7277
|
+
if (el)
|
7278
|
+
scrollIntoView(el);
|
7279
|
+
});
|
7136
7280
|
watch(() => props.options, updateTabs, {
|
7137
7281
|
deep: true
|
7138
7282
|
});
|
@@ -7316,7 +7460,7 @@ var stdin_default$14 = defineComponent({
|
|
7316
7460
|
checked
|
7317
7461
|
});
|
7318
7462
|
useCustomFieldValue(() => props.modelValue);
|
7319
|
-
return () => createVNode(stdin_default$
|
7463
|
+
return () => createVNode(stdin_default$1j, mergeProps({
|
7320
7464
|
"bem": bem$W,
|
7321
7465
|
"role": "checkbox",
|
7322
7466
|
"parent": parent,
|
@@ -7837,7 +7981,7 @@ var stdin_default$$ = defineComponent({
|
|
7837
7981
|
}
|
7838
7982
|
});
|
7839
7983
|
const CollapseItem = withInstall(stdin_default$$);
|
7840
|
-
const ConfigProvider = withInstall(stdin_default$
|
7984
|
+
const ConfigProvider = withInstall(stdin_default$1M);
|
7841
7985
|
const [name$R, bem$Q, t$e] = createNamespace("contact-card");
|
7842
7986
|
const contactCardProps = {
|
7843
7987
|
tel: String,
|
@@ -8002,7 +8146,7 @@ var stdin_default$Y = defineComponent({
|
|
8002
8146
|
const renderRightIcon = () => createVNode(Radio, {
|
8003
8147
|
"class": bem$O("radio"),
|
8004
8148
|
"name": item.id,
|
8005
|
-
"iconSize":
|
8149
|
+
"iconSize": 18
|
8006
8150
|
}, null);
|
8007
8151
|
const renderEditIcon = () => createVNode(Icon, {
|
8008
8152
|
"name": "edit",
|
@@ -8786,6 +8930,7 @@ var stdin_default$S = defineComponent({
|
|
8786
8930
|
slots
|
8787
8931
|
}) {
|
8788
8932
|
const currentValues = ref(props.modelValue);
|
8933
|
+
const updatedByExternalSources = ref(false);
|
8789
8934
|
const genYearOptions = () => {
|
8790
8935
|
const minYear = props.minDate.getFullYear();
|
8791
8936
|
const maxYear = props.maxDate.getFullYear();
|
@@ -8801,7 +8946,7 @@ var stdin_default$S = defineComponent({
|
|
8801
8946
|
columnsType
|
8802
8947
|
} = props;
|
8803
8948
|
const index = columnsType.indexOf(type);
|
8804
|
-
const value = currentValues.value[index];
|
8949
|
+
const value = updatedByExternalSources.value ? props.modelValue[index] : currentValues.value[index];
|
8805
8950
|
if (value) {
|
8806
8951
|
return +value;
|
8807
8952
|
}
|
@@ -8847,11 +8992,13 @@ var stdin_default$S = defineComponent({
|
|
8847
8992
|
emit("update:modelValue", newValues);
|
8848
8993
|
}
|
8849
8994
|
});
|
8850
|
-
watch(() => props.modelValue, (newValues) => {
|
8995
|
+
watch(() => props.modelValue, (newValues, oldValues) => {
|
8996
|
+
updatedByExternalSources.value = isSameValue(oldValues, currentValues.value);
|
8851
8997
|
newValues = formatValueRange(newValues, columns.value);
|
8852
8998
|
if (!isSameValue(newValues, currentValues.value)) {
|
8853
8999
|
currentValues.value = newValues;
|
8854
9000
|
}
|
9001
|
+
updatedByExternalSources.value = false;
|
8855
9002
|
}, {
|
8856
9003
|
immediate: true
|
8857
9004
|
});
|
@@ -9154,6 +9301,7 @@ const [name$H, bem$H] = createNamespace("divider");
|
|
9154
9301
|
const dividerProps = {
|
9155
9302
|
dashed: Boolean,
|
9156
9303
|
hairline: truthProp,
|
9304
|
+
vertical: Boolean,
|
9157
9305
|
contentPosition: makeStringProp("center")
|
9158
9306
|
};
|
9159
9307
|
var stdin_default$Q = defineComponent({
|
@@ -9169,9 +9317,10 @@ var stdin_default$Q = defineComponent({
|
|
9169
9317
|
"class": bem$H({
|
9170
9318
|
dashed: props.dashed,
|
9171
9319
|
hairline: props.hairline,
|
9172
|
-
|
9320
|
+
vertical: props.vertical,
|
9321
|
+
[`content-${props.contentPosition}`]: !!slots.default && !props.vertical
|
9173
9322
|
})
|
9174
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9323
|
+
}, [!props.vertical && ((_a = slots.default) == null ? void 0 : _a.call(slots))]);
|
9175
9324
|
};
|
9176
9325
|
}
|
9177
9326
|
});
|
@@ -9656,6 +9805,7 @@ const getCenter = (touches) => ({
|
|
9656
9805
|
y: (touches[0].clientY + touches[1].clientY) / 2
|
9657
9806
|
});
|
9658
9807
|
const bem$C = createNamespace("image-preview")[1];
|
9808
|
+
const longImageRatio = 2.6;
|
9659
9809
|
var stdin_default$L = defineComponent({
|
9660
9810
|
props: {
|
9661
9811
|
src: String,
|
@@ -9678,21 +9828,14 @@ var stdin_default$L = defineComponent({
|
|
9678
9828
|
moveY: 0,
|
9679
9829
|
moving: false,
|
9680
9830
|
zooming: false,
|
9681
|
-
imageRatio: 0
|
9682
|
-
displayWidth: 0,
|
9683
|
-
displayHeight: 0
|
9831
|
+
imageRatio: 0
|
9684
9832
|
});
|
9685
9833
|
const touch = useTouch();
|
9686
9834
|
const imageRef = ref();
|
9687
9835
|
const swipeItem = ref();
|
9688
|
-
const vertical =
|
9689
|
-
|
9690
|
-
|
9691
|
-
rootHeight
|
9692
|
-
} = props;
|
9693
|
-
const rootRatio = rootHeight / rootWidth;
|
9694
|
-
return state.imageRatio > rootRatio;
|
9695
|
-
});
|
9836
|
+
const vertical = ref(false);
|
9837
|
+
const isLongImage = ref(false);
|
9838
|
+
let initialMoveY = 0;
|
9696
9839
|
const imageStyle = computed(() => {
|
9697
9840
|
const {
|
9698
9841
|
scale,
|
@@ -9704,7 +9847,7 @@ var stdin_default$L = defineComponent({
|
|
9704
9847
|
const style = {
|
9705
9848
|
transitionDuration: zooming || moving ? "0s" : ".3s"
|
9706
9849
|
};
|
9707
|
-
if (scale !== 1) {
|
9850
|
+
if (scale !== 1 || isLongImage.value) {
|
9708
9851
|
style.transform = `matrix(${scale}, 0, 0, ${scale}, ${moveX}, ${moveY})`;
|
9709
9852
|
}
|
9710
9853
|
return style;
|
@@ -9749,7 +9892,7 @@ var stdin_default$L = defineComponent({
|
|
9749
9892
|
state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
|
9750
9893
|
} else {
|
9751
9894
|
state.moveX = 0;
|
9752
|
-
state.moveY = 0;
|
9895
|
+
state.moveY = isLongImage.value ? initialMoveY : 0;
|
9753
9896
|
}
|
9754
9897
|
emit("scale", {
|
9755
9898
|
scale,
|
@@ -9762,7 +9905,7 @@ var stdin_default$L = defineComponent({
|
|
9762
9905
|
};
|
9763
9906
|
const toggleScale = () => {
|
9764
9907
|
const scale = state.scale > 1 ? 1 : 2;
|
9765
|
-
setScale(scale, scale === 2 ? {
|
9908
|
+
setScale(scale, scale === 2 || isLongImage.value ? {
|
9766
9909
|
x: touch.startX.value,
|
9767
9910
|
y: touch.startY.value
|
9768
9911
|
} : void 0);
|
@@ -9792,7 +9935,7 @@ var stdin_default$L = defineComponent({
|
|
9792
9935
|
startMoveY = state.moveY;
|
9793
9936
|
touchStartTime = Date.now();
|
9794
9937
|
isImageMoved = false;
|
9795
|
-
state.moving = fingerNum === 1 && state.scale !== 1;
|
9938
|
+
state.moving = fingerNum === 1 && (state.scale !== 1 || isLongImage.value);
|
9796
9939
|
state.zooming = fingerNum === 2 && !offsetX.value;
|
9797
9940
|
if (state.zooming) {
|
9798
9941
|
startScale = state.scale;
|
@@ -9888,12 +10031,30 @@ var stdin_default$L = defineComponent({
|
|
9888
10031
|
checkTap();
|
9889
10032
|
touch.reset();
|
9890
10033
|
};
|
10034
|
+
const resize = () => {
|
10035
|
+
const {
|
10036
|
+
rootWidth,
|
10037
|
+
rootHeight
|
10038
|
+
} = props;
|
10039
|
+
const rootRatio = rootHeight / rootWidth;
|
10040
|
+
const {
|
10041
|
+
imageRatio
|
10042
|
+
} = state;
|
10043
|
+
vertical.value = state.imageRatio > rootRatio && imageRatio < longImageRatio;
|
10044
|
+
isLongImage.value = state.imageRatio > rootRatio && imageRatio >= longImageRatio;
|
10045
|
+
if (isLongImage.value) {
|
10046
|
+
initialMoveY = (imageRatio * rootWidth - rootHeight) / 2;
|
10047
|
+
state.moveY = initialMoveY;
|
10048
|
+
}
|
10049
|
+
resetScale();
|
10050
|
+
};
|
9891
10051
|
const onLoad = (event) => {
|
9892
10052
|
const {
|
9893
10053
|
naturalWidth,
|
9894
10054
|
naturalHeight
|
9895
10055
|
} = event.target;
|
9896
10056
|
state.imageRatio = naturalHeight / naturalWidth;
|
10057
|
+
resize();
|
9897
10058
|
};
|
9898
10059
|
watch(() => props.active, resetScale);
|
9899
10060
|
watch(() => props.show, (value) => {
|
@@ -9901,6 +10062,7 @@ var stdin_default$L = defineComponent({
|
|
9901
10062
|
resetScale();
|
9902
10063
|
}
|
9903
10064
|
});
|
10065
|
+
watch(() => [props.rootWidth, props.rootHeight], resize);
|
9904
10066
|
useEventListener("touchmove", onTouchMove, {
|
9905
10067
|
target: computed(() => {
|
9906
10068
|
var _a;
|
@@ -11455,7 +11617,7 @@ var stdin_default$A = defineComponent({
|
|
11455
11617
|
}
|
11456
11618
|
});
|
11457
11619
|
const PasswordInput = withInstall(stdin_default$A);
|
11458
|
-
const PickerGroup = withInstall(stdin_default$
|
11620
|
+
const PickerGroup = withInstall(stdin_default$1v);
|
11459
11621
|
const [name$r, bem$q] = createNamespace("popover");
|
11460
11622
|
const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
11461
11623
|
const popoverProps = {
|
@@ -12435,6 +12597,7 @@ const signatureProps = {
|
|
12435
12597
|
penColor: makeStringProp("#000"),
|
12436
12598
|
lineWidth: makeNumberProp(3),
|
12437
12599
|
clearButtonText: String,
|
12600
|
+
backgroundColor: makeStringProp(""),
|
12438
12601
|
confirmButtonText: String
|
12439
12602
|
};
|
12440
12603
|
const hasCanvasSupport = () => {
|
@@ -12454,7 +12617,8 @@ var stdin_default$r = defineComponent({
|
|
12454
12617
|
const state = reactive({
|
12455
12618
|
width: 0,
|
12456
12619
|
height: 0,
|
12457
|
-
ctx: null
|
12620
|
+
ctx: null,
|
12621
|
+
ratio: inBrowser ? window.devicePixelRatio : 1
|
12458
12622
|
});
|
12459
12623
|
let canvasRect;
|
12460
12624
|
const isRenderCanvas = inBrowser ? hasCanvasSupport() : true;
|
@@ -12463,7 +12627,7 @@ var stdin_default$r = defineComponent({
|
|
12463
12627
|
return false;
|
12464
12628
|
}
|
12465
12629
|
state.ctx.beginPath();
|
12466
|
-
state.ctx.lineWidth = props.lineWidth;
|
12630
|
+
state.ctx.lineWidth = props.lineWidth * state.ratio;
|
12467
12631
|
state.ctx.strokeStyle = props.penColor;
|
12468
12632
|
canvasRect = useRect(canvasRef);
|
12469
12633
|
emit("start");
|
@@ -12475,8 +12639,8 @@ var stdin_default$r = defineComponent({
|
|
12475
12639
|
}
|
12476
12640
|
preventDefault(event);
|
12477
12641
|
const touch = event.touches[0];
|
12478
|
-
const mouseX = touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0);
|
12479
|
-
const mouseY = touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0);
|
12642
|
+
const mouseX = (touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0)) * state.ratio;
|
12643
|
+
const mouseY = (touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0)) * state.ratio;
|
12480
12644
|
state.ctx.lineCap = "round";
|
12481
12645
|
state.ctx.lineJoin = "round";
|
12482
12646
|
(_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
|
@@ -12493,13 +12657,23 @@ var stdin_default$r = defineComponent({
|
|
12493
12657
|
empty.height = canvas.height;
|
12494
12658
|
return canvas.toDataURL() === empty.toDataURL();
|
12495
12659
|
};
|
12660
|
+
const setCanvasBgColor = () => {
|
12661
|
+
if (state.ctx && props.backgroundColor) {
|
12662
|
+
state.ctx.fillStyle = props.backgroundColor;
|
12663
|
+
state.ctx.fillRect(0, 0, state.width, state.height);
|
12664
|
+
}
|
12665
|
+
};
|
12496
12666
|
const submit = () => {
|
12667
|
+
var _a, _b;
|
12497
12668
|
const canvas = canvasRef.value;
|
12498
12669
|
if (!canvas) {
|
12499
12670
|
return;
|
12500
12671
|
}
|
12501
12672
|
const isEmpty = isCanvasEmpty(canvas);
|
12502
|
-
const image = isEmpty ? "" :
|
12673
|
+
const image = isEmpty ? "" : ((_b = (_a = {
|
12674
|
+
jpg: () => canvas.toDataURL("image/jpeg", 0.8),
|
12675
|
+
jpeg: () => canvas.toDataURL("image/jpeg", 0.8)
|
12676
|
+
})[props.type]) == null ? void 0 : _b.call(_a)) || canvas.toDataURL(`image/${props.type}`);
|
12503
12677
|
emit("submit", {
|
12504
12678
|
image,
|
12505
12679
|
canvas
|
@@ -12509,6 +12683,7 @@ var stdin_default$r = defineComponent({
|
|
12509
12683
|
if (state.ctx) {
|
12510
12684
|
state.ctx.clearRect(0, 0, state.width, state.height);
|
12511
12685
|
state.ctx.closePath();
|
12686
|
+
setCanvasBgColor();
|
12512
12687
|
}
|
12513
12688
|
emit("clear");
|
12514
12689
|
};
|
@@ -12516,8 +12691,11 @@ var stdin_default$r = defineComponent({
|
|
12516
12691
|
var _a, _b, _c;
|
12517
12692
|
if (isRenderCanvas) {
|
12518
12693
|
state.ctx = (_a = canvasRef.value) == null ? void 0 : _a.getContext("2d");
|
12519
|
-
state.width = ((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0;
|
12520
|
-
state.height = ((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0;
|
12694
|
+
state.width = (((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0) * state.ratio;
|
12695
|
+
state.height = (((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0) * state.ratio;
|
12696
|
+
nextTick(() => {
|
12697
|
+
setCanvasBgColor();
|
12698
|
+
});
|
12521
12699
|
}
|
12522
12700
|
});
|
12523
12701
|
return () => createVNode("div", {
|
@@ -14228,10 +14406,11 @@ var stdin_default$6 = defineComponent({
|
|
14228
14406
|
imageFit: String,
|
14229
14407
|
lazyLoad: Boolean,
|
14230
14408
|
deletable: Boolean,
|
14409
|
+
reupload: Boolean,
|
14231
14410
|
previewSize: [Number, String, Array],
|
14232
14411
|
beforeDelete: Function
|
14233
14412
|
},
|
14234
|
-
emits: ["delete", "preview"],
|
14413
|
+
emits: ["delete", "preview", "reupload"],
|
14235
14414
|
setup(props, {
|
14236
14415
|
emit,
|
14237
14416
|
slots
|
@@ -14273,6 +14452,7 @@ var stdin_default$6 = defineComponent({
|
|
14273
14452
|
});
|
14274
14453
|
};
|
14275
14454
|
const onPreview = () => emit("preview");
|
14455
|
+
const onReupload = () => emit("reupload");
|
14276
14456
|
const renderDeleteIcon = () => {
|
14277
14457
|
if (props.deletable && props.item.status !== "uploading") {
|
14278
14458
|
const slot = slots["preview-delete"];
|
@@ -14308,7 +14488,8 @@ var stdin_default$6 = defineComponent({
|
|
14308
14488
|
item,
|
14309
14489
|
lazyLoad,
|
14310
14490
|
imageFit,
|
14311
|
-
previewSize
|
14491
|
+
previewSize,
|
14492
|
+
reupload
|
14312
14493
|
} = props;
|
14313
14494
|
if (isImageFile(item)) {
|
14314
14495
|
return createVNode(Image$1, {
|
@@ -14318,7 +14499,7 @@ var stdin_default$6 = defineComponent({
|
|
14318
14499
|
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
14319
14500
|
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
14320
14501
|
"lazyLoad": lazyLoad,
|
14321
|
-
"onClick": onPreview
|
14502
|
+
"onClick": reupload ? onReupload : onPreview
|
14322
14503
|
}, {
|
14323
14504
|
default: renderCover
|
14324
14505
|
});
|
@@ -14352,6 +14533,7 @@ const uploaderProps = {
|
|
14352
14533
|
uploadIcon: makeStringProp("photograph"),
|
14353
14534
|
uploadText: String,
|
14354
14535
|
deletable: truthProp,
|
14536
|
+
reupload: Boolean,
|
14355
14537
|
afterRead: Function,
|
14356
14538
|
showUpload: truthProp,
|
14357
14539
|
modelValue: makeArrayProp(),
|
@@ -14369,13 +14551,14 @@ const uploaderProps = {
|
|
14369
14551
|
var stdin_default$5 = defineComponent({
|
14370
14552
|
name: name$1,
|
14371
14553
|
props: uploaderProps,
|
14372
|
-
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "update:modelValue"],
|
14554
|
+
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
|
14373
14555
|
setup(props, {
|
14374
14556
|
emit,
|
14375
14557
|
slots
|
14376
14558
|
}) {
|
14377
14559
|
const inputRef = ref();
|
14378
14560
|
const urls = [];
|
14561
|
+
const reuploadIndex = ref(-1);
|
14379
14562
|
const getDetail = (index = props.modelValue.length) => ({
|
14380
14563
|
name: props.name,
|
14381
14564
|
index
|
@@ -14401,7 +14584,14 @@ var stdin_default$5 = defineComponent({
|
|
14401
14584
|
}
|
14402
14585
|
}
|
14403
14586
|
items = reactive(items);
|
14404
|
-
|
14587
|
+
if (reuploadIndex.value > -1) {
|
14588
|
+
const arr = [...props.modelValue];
|
14589
|
+
arr.splice(reuploadIndex.value, 1, items);
|
14590
|
+
emit("update:modelValue", arr);
|
14591
|
+
reuploadIndex.value = -1;
|
14592
|
+
} else {
|
14593
|
+
emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
|
14594
|
+
}
|
14405
14595
|
if (props.afterRead) {
|
14406
14596
|
props.afterRead(items, getDetail());
|
14407
14597
|
}
|
@@ -14502,15 +14692,20 @@ var stdin_default$5 = defineComponent({
|
|
14502
14692
|
emit("update:modelValue", fileList);
|
14503
14693
|
emit("delete", item, getDetail(index));
|
14504
14694
|
};
|
14695
|
+
const reuploadImage = (index) => {
|
14696
|
+
chooseFile();
|
14697
|
+
reuploadIndex.value = index;
|
14698
|
+
};
|
14505
14699
|
const renderPreviewItem = (item, index) => {
|
14506
|
-
const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
|
14700
|
+
const needPickData = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"];
|
14507
14701
|
const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
|
14508
14702
|
return createVNode(stdin_default$6, mergeProps({
|
14509
14703
|
"item": item,
|
14510
14704
|
"index": index,
|
14511
|
-
"onClick": () => emit("clickPreview", item, getDetail(index)),
|
14705
|
+
"onClick": () => emit(props.reupload ? "clickReupload" : "clickPreview", item, getDetail(index)),
|
14512
14706
|
"onDelete": () => deleteFile(item, index),
|
14513
|
-
"onPreview": () => previewImage(item)
|
14707
|
+
"onPreview": () => previewImage(item),
|
14708
|
+
"onReupload": () => reuploadImage(index)
|
14514
14709
|
}, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
|
14515
14710
|
};
|
14516
14711
|
const renderPreviewList = () => {
|
@@ -14520,24 +14715,25 @@ var stdin_default$5 = defineComponent({
|
|
14520
14715
|
};
|
14521
14716
|
const onClickUpload = (event) => emit("clickUpload", event);
|
14522
14717
|
const renderUpload = () => {
|
14523
|
-
if (props.modelValue.length >= +props.maxCount) {
|
14718
|
+
if (props.modelValue.length >= +props.maxCount && !props.reupload) {
|
14524
14719
|
return;
|
14525
14720
|
}
|
14721
|
+
const hideUploader = props.modelValue.length >= +props.maxCount && props.reupload;
|
14526
14722
|
const Input = props.readonly ? null : createVNode("input", {
|
14527
14723
|
"ref": inputRef,
|
14528
14724
|
"type": "file",
|
14529
14725
|
"class": bem$1("input"),
|
14530
14726
|
"accept": props.accept,
|
14531
14727
|
"capture": props.capture,
|
14532
|
-
"multiple": props.multiple,
|
14728
|
+
"multiple": props.multiple && reuploadIndex.value === -1,
|
14533
14729
|
"disabled": props.disabled,
|
14534
14730
|
"onChange": onChange
|
14535
14731
|
}, null);
|
14536
14732
|
if (slots.default) {
|
14537
|
-
return createVNode("div", {
|
14733
|
+
return withDirectives(createVNode("div", {
|
14538
14734
|
"class": bem$1("input-wrapper"),
|
14539
14735
|
"onClick": onClickUpload
|
14540
|
-
}, [slots.default(), Input]);
|
14736
|
+
}, [slots.default(), Input]), [[vShow, !hideUploader]]);
|
14541
14737
|
}
|
14542
14738
|
return withDirectives(createVNode("div", {
|
14543
14739
|
"class": bem$1("upload", {
|
@@ -14550,7 +14746,7 @@ var stdin_default$5 = defineComponent({
|
|
14550
14746
|
"class": bem$1("upload-icon")
|
14551
14747
|
}, null), props.uploadText && createVNode("span", {
|
14552
14748
|
"class": bem$1("upload-text")
|
14553
|
-
}, [props.uploadText]), Input]), [[vShow, props.showUpload]]);
|
14749
|
+
}, [props.uploadText]), Input]), [[vShow, props.showUpload && !hideUploader]]);
|
14554
14750
|
};
|
14555
14751
|
const chooseFile = () => {
|
14556
14752
|
if (inputRef.value && !props.disabled) {
|
@@ -15577,7 +15773,7 @@ const Lazyload = {
|
|
15577
15773
|
});
|
15578
15774
|
}
|
15579
15775
|
};
|
15580
|
-
const version = "4.
|
15776
|
+
const version = "4.4.0";
|
15581
15777
|
function install(app) {
|
15582
15778
|
const components = [
|
15583
15779
|
ActionBar,
|
@@ -15589,6 +15785,7 @@ function install(app) {
|
|
15589
15785
|
Area,
|
15590
15786
|
BackTop,
|
15591
15787
|
Badge,
|
15788
|
+
Barrage,
|
15592
15789
|
Button,
|
15593
15790
|
Calendar,
|
15594
15791
|
Card,
|
@@ -15699,6 +15896,7 @@ export {
|
|
15699
15896
|
Area,
|
15700
15897
|
BackTop,
|
15701
15898
|
Badge,
|
15899
|
+
Barrage,
|
15702
15900
|
Button,
|
15703
15901
|
Calendar,
|
15704
15902
|
Card,
|
@@ -15798,6 +15996,7 @@ export {
|
|
15798
15996
|
areaProps,
|
15799
15997
|
backTopProps,
|
15800
15998
|
badgeProps,
|
15999
|
+
barrageProps,
|
15801
16000
|
buttonProps,
|
15802
16001
|
calendarProps,
|
15803
16002
|
cardProps,
|