vant 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/address-edit/AddressEdit.mjs +1 -0
- package/es/area/Area.d.ts +6 -8
- package/es/area/Area.mjs +1 -1
- package/es/area/index.d.ts +4 -6
- package/es/back-top/BackTop.d.ts +1 -1
- package/es/back-top/BackTop.mjs +6 -3
- package/es/back-top/index.css +1 -1
- package/es/back-top/index.d.ts +1 -1
- package/es/barrage/Barrage.d.ts +93 -0
- package/es/barrage/Barrage.mjs +134 -0
- package/es/barrage/index.css +1 -0
- package/es/barrage/index.d.ts +69 -0
- package/es/barrage/index.mjs +10 -0
- package/es/barrage/style/index.d.ts +1 -0
- package/es/barrage/style/index.mjs +2 -0
- package/es/barrage/types.d.ts +7 -0
- package/es/barrage/types.mjs +0 -0
- package/es/cascader/Cascader.mjs +14 -0
- package/es/checkbox/Checker.d.ts +2 -0
- package/es/checkbox/Checker.mjs +13 -1
- package/es/contact-list/ContactList.mjs +1 -1
- package/es/contact-list/index.css +1 -1
- package/es/date-picker/DatePicker.mjs +5 -2
- package/es/date-picker/utils.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/divider/Divider.d.ts +4 -0
- package/es/divider/Divider.mjs +4 -2
- package/es/divider/index.css +1 -1
- package/es/divider/index.d.ts +3 -0
- package/es/field/Field.mjs +4 -0
- package/es/image-preview/ImagePreviewItem.mjs +60 -26
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/picker-group/PickerGroup.d.ts +15 -1
- package/es/picker-group/PickerGroup.mjs +8 -6
- package/es/picker-group/index.d.ts +11 -1
- package/es/signature/Signature.d.ts +13 -0
- package/es/signature/Signature.mjs +24 -8
- package/es/signature/index.css +1 -1
- package/es/signature/index.d.ts +9 -0
- package/es/step/index.css +1 -1
- package/es/submit-bar/index.css +1 -1
- package/es/tabs/Tabs.mjs +8 -2
- package/es/tabs/utils.d.ts +2 -2
- package/es/tabs/utils.mjs +14 -4
- package/es/uploader/Uploader.d.ts +6 -1
- package/es/uploader/Uploader.mjs +25 -10
- package/es/uploader/UploaderPreviewItem.d.ts +5 -1
- package/es/uploader/UploaderPreviewItem.mjs +6 -3
- package/es/uploader/index.d.ts +5 -1
- package/es/uploader/types.d.ts +1 -0
- package/lib/address-edit/AddressEdit.js +1 -0
- package/lib/area/Area.d.ts +6 -8
- package/lib/area/Area.js +1 -1
- package/lib/area/index.d.ts +4 -6
- package/lib/back-top/BackTop.d.ts +1 -1
- package/lib/back-top/BackTop.js +6 -3
- package/lib/back-top/index.css +1 -1
- package/lib/back-top/index.d.ts +1 -1
- package/lib/barrage/Barrage.d.ts +93 -0
- package/lib/barrage/Barrage.js +153 -0
- package/lib/barrage/index.css +1 -0
- package/lib/barrage/index.d.ts +69 -0
- package/lib/barrage/index.js +39 -0
- package/lib/barrage/style/index.d.ts +1 -0
- package/lib/barrage/style/index.js +2 -0
- package/lib/barrage/types.d.ts +7 -0
- package/lib/barrage/types.js +15 -0
- package/lib/cascader/Cascader.js +14 -0
- package/lib/checkbox/Checker.d.ts +2 -0
- package/lib/checkbox/Checker.js +13 -1
- package/lib/contact-list/ContactList.js +1 -1
- package/lib/contact-list/index.css +1 -1
- package/lib/date-picker/DatePicker.js +5 -2
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/divider/Divider.d.ts +4 -0
- package/lib/divider/Divider.js +4 -2
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.d.ts +3 -0
- package/lib/field/Field.js +4 -0
- package/lib/image-preview/ImagePreviewItem.js +59 -25
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/picker-group/PickerGroup.d.ts +15 -1
- package/lib/picker-group/PickerGroup.js +6 -4
- package/lib/picker-group/index.d.ts +11 -1
- package/lib/signature/Signature.d.ts +13 -0
- package/lib/signature/Signature.js +23 -7
- package/lib/signature/index.css +1 -1
- package/lib/signature/index.d.ts +9 -0
- package/lib/step/index.css +1 -1
- package/lib/submit-bar/index.css +1 -1
- package/lib/tabs/Tabs.js +8 -2
- package/lib/tabs/utils.d.ts +2 -2
- package/lib/tabs/utils.js +13 -3
- package/lib/uploader/Uploader.d.ts +6 -1
- package/lib/uploader/Uploader.js +25 -10
- package/lib/uploader/UploaderPreviewItem.d.ts +5 -1
- package/lib/uploader/UploaderPreviewItem.js +6 -3
- package/lib/uploader/index.d.ts +5 -1
- package/lib/uploader/types.d.ts +1 -0
- package/lib/vant.cjs.js +611 -358
- package/lib/vant.es.js +612 -359
- package/lib/vant.js +611 -358
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/lib/vant.cjs.js
CHANGED
@@ -237,7 +237,7 @@ function deepAssign(to, from) {
|
|
237
237
|
});
|
238
238
|
return to;
|
239
239
|
}
|
240
|
-
var stdin_default$
|
240
|
+
var stdin_default$1Q = {
|
241
241
|
name: "姓名",
|
242
242
|
tel: "电话",
|
243
243
|
save: "保存",
|
@@ -301,7 +301,7 @@ var stdin_default$1P = {
|
|
301
301
|
};
|
302
302
|
const lang = vue.ref("zh-CN");
|
303
303
|
const messages = vue.reactive({
|
304
|
-
"zh-CN": stdin_default$
|
304
|
+
"zh-CN": stdin_default$1Q
|
305
305
|
});
|
306
306
|
const Locale = {
|
307
307
|
messages() {
|
@@ -316,11 +316,11 @@ const Locale = {
|
|
316
316
|
}
|
317
317
|
};
|
318
318
|
const useCurrentLang = () => lang;
|
319
|
-
var stdin_default$
|
319
|
+
var stdin_default$1P = Locale;
|
320
320
|
function createTranslate(name2) {
|
321
321
|
const prefix = camelize(name2) + ".";
|
322
322
|
return (path, ...args) => {
|
323
|
-
const messages2 = stdin_default$
|
323
|
+
const messages2 = stdin_default$1P.messages();
|
324
324
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
325
325
|
return isFunction(message) ? message(...args) : message;
|
326
326
|
};
|
@@ -442,20 +442,20 @@ function usePlaceholder(contentRef, bem2) {
|
|
442
442
|
}
|
443
443
|
}, [renderContent()]);
|
444
444
|
}
|
445
|
-
const [name$
|
446
|
-
const ACTION_BAR_KEY = Symbol(name$
|
445
|
+
const [name$1F, bem$1A] = createNamespace("action-bar");
|
446
|
+
const ACTION_BAR_KEY = Symbol(name$1F);
|
447
447
|
const actionBarProps = {
|
448
448
|
placeholder: Boolean,
|
449
449
|
safeAreaInsetBottom: truthProp
|
450
450
|
};
|
451
|
-
var stdin_default$
|
452
|
-
name: name$
|
451
|
+
var stdin_default$1O = vue.defineComponent({
|
452
|
+
name: name$1F,
|
453
453
|
props: actionBarProps,
|
454
454
|
setup(props, {
|
455
455
|
slots
|
456
456
|
}) {
|
457
457
|
const root = vue.ref();
|
458
|
-
const renderPlaceholder = usePlaceholder(root, bem$
|
458
|
+
const renderPlaceholder = usePlaceholder(root, bem$1A);
|
459
459
|
const {
|
460
460
|
linkChildren
|
461
461
|
} = use.useChildren(ACTION_BAR_KEY);
|
@@ -464,7 +464,7 @@ var stdin_default$1N = vue.defineComponent({
|
|
464
464
|
var _a;
|
465
465
|
return vue.createVNode("div", {
|
466
466
|
"ref": root,
|
467
|
-
"class": [bem$
|
467
|
+
"class": [bem$1A(), {
|
468
468
|
"van-safe-area-bottom": props.safeAreaInsetBottom
|
469
469
|
}]
|
470
470
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
@@ -477,7 +477,7 @@ var stdin_default$1N = vue.defineComponent({
|
|
477
477
|
};
|
478
478
|
}
|
479
479
|
});
|
480
|
-
const ActionBar = withInstall(stdin_default$
|
480
|
+
const ActionBar = withInstall(stdin_default$1O);
|
481
481
|
function useExpose(apis) {
|
482
482
|
const instance2 = vue.getCurrentInstance();
|
483
483
|
if (instance2) {
|
@@ -505,7 +505,7 @@ function useRoute() {
|
|
505
505
|
const vm = vue.getCurrentInstance().proxy;
|
506
506
|
return () => route(vm);
|
507
507
|
}
|
508
|
-
const [name$
|
508
|
+
const [name$1E, bem$1z] = createNamespace("badge");
|
509
509
|
const badgeProps = {
|
510
510
|
dot: Boolean,
|
511
511
|
max: numericProp,
|
@@ -516,8 +516,8 @@ const badgeProps = {
|
|
516
516
|
showZero: truthProp,
|
517
517
|
position: makeStringProp("top-right")
|
518
518
|
};
|
519
|
-
var stdin_default$
|
520
|
-
name: name$
|
519
|
+
var stdin_default$1N = vue.defineComponent({
|
520
|
+
name: name$1E,
|
521
521
|
props: badgeProps,
|
522
522
|
setup(props, {
|
523
523
|
slots
|
@@ -580,7 +580,7 @@ var stdin_default$1M = vue.defineComponent({
|
|
580
580
|
const renderBadge = () => {
|
581
581
|
if (hasContent() || props.dot) {
|
582
582
|
return vue.createVNode("div", {
|
583
|
-
"class": bem$
|
583
|
+
"class": bem$1z([props.position, {
|
584
584
|
dot: props.dot,
|
585
585
|
fixed: !!slots.default
|
586
586
|
}]),
|
@@ -594,7 +594,7 @@ var stdin_default$1M = vue.defineComponent({
|
|
594
594
|
tag
|
595
595
|
} = props;
|
596
596
|
return vue.createVNode(tag, {
|
597
|
-
"class": bem$
|
597
|
+
"class": bem$1z("wrapper")
|
598
598
|
}, {
|
599
599
|
default: () => [slots.default(), renderBadge()]
|
600
600
|
});
|
@@ -603,14 +603,14 @@ var stdin_default$1M = vue.defineComponent({
|
|
603
603
|
};
|
604
604
|
}
|
605
605
|
});
|
606
|
-
const Badge = withInstall(stdin_default$
|
606
|
+
const Badge = withInstall(stdin_default$1N);
|
607
607
|
let globalZIndex = 2e3;
|
608
608
|
const useGlobalZIndex = () => ++globalZIndex;
|
609
609
|
const setGlobalZIndex = (val) => {
|
610
610
|
globalZIndex = val;
|
611
611
|
};
|
612
|
-
const [name$
|
613
|
-
const CONFIG_PROVIDER_KEY = Symbol(name$
|
612
|
+
const [name$1D, bem$1y] = createNamespace("config-provider");
|
613
|
+
const CONFIG_PROVIDER_KEY = Symbol(name$1D);
|
614
614
|
const configProviderProps = {
|
615
615
|
tag: makeStringProp("div"),
|
616
616
|
theme: makeStringProp("light"),
|
@@ -627,8 +627,8 @@ function mapThemeVarsToCSSVars(themeVars) {
|
|
627
627
|
});
|
628
628
|
return cssVars;
|
629
629
|
}
|
630
|
-
var stdin_default$
|
631
|
-
name: name$
|
630
|
+
var stdin_default$1M = vue.defineComponent({
|
631
|
+
name: name$1D,
|
632
632
|
props: configProviderProps,
|
633
633
|
setup(props, {
|
634
634
|
slots
|
@@ -660,7 +660,7 @@ var stdin_default$1L = vue.defineComponent({
|
|
660
660
|
}
|
661
661
|
});
|
662
662
|
return () => vue.createVNode(props.tag, {
|
663
|
-
"class": bem$
|
663
|
+
"class": bem$1y(),
|
664
664
|
"style": style.value
|
665
665
|
}, {
|
666
666
|
default: () => {
|
@@ -670,7 +670,7 @@ var stdin_default$1L = vue.defineComponent({
|
|
670
670
|
});
|
671
671
|
}
|
672
672
|
});
|
673
|
-
const [name$
|
673
|
+
const [name$1C, bem$1x] = createNamespace("icon");
|
674
674
|
const isImage$1 = (name2) => name2 == null ? void 0 : name2.includes("/");
|
675
675
|
const iconProps = {
|
676
676
|
dot: Boolean,
|
@@ -682,14 +682,14 @@ const iconProps = {
|
|
682
682
|
badgeProps: Object,
|
683
683
|
classPrefix: String
|
684
684
|
};
|
685
|
-
var stdin_default$
|
686
|
-
name: name$
|
685
|
+
var stdin_default$1L = vue.defineComponent({
|
686
|
+
name: name$1C,
|
687
687
|
props: iconProps,
|
688
688
|
setup(props, {
|
689
689
|
slots
|
690
690
|
}) {
|
691
691
|
const config = vue.inject(CONFIG_PROVIDER_KEY, null);
|
692
|
-
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$
|
692
|
+
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$1x());
|
693
693
|
return () => {
|
694
694
|
const {
|
695
695
|
tag,
|
@@ -713,7 +713,7 @@ var stdin_default$1K = vue.defineComponent({
|
|
713
713
|
default: () => {
|
714
714
|
var _a;
|
715
715
|
return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && vue.createVNode("img", {
|
716
|
-
"class": bem$
|
716
|
+
"class": bem$1x("image"),
|
717
717
|
"src": name2
|
718
718
|
}, null)];
|
719
719
|
}
|
@@ -721,13 +721,13 @@ var stdin_default$1K = vue.defineComponent({
|
|
721
721
|
};
|
722
722
|
}
|
723
723
|
});
|
724
|
-
const Icon = withInstall(stdin_default$
|
725
|
-
const [name$
|
724
|
+
const Icon = withInstall(stdin_default$1L);
|
725
|
+
const [name$1B, bem$1w] = createNamespace("loading");
|
726
726
|
const SpinIcon = Array(12).fill(null).map((_, index) => vue.createVNode("i", {
|
727
|
-
"class": bem$
|
727
|
+
"class": bem$1w("line", String(index + 1))
|
728
728
|
}, null));
|
729
729
|
const CircularIcon = vue.createVNode("svg", {
|
730
|
-
"class": bem$
|
730
|
+
"class": bem$1w("circular"),
|
731
731
|
"viewBox": "25 25 50 50"
|
732
732
|
}, [vue.createVNode("circle", {
|
733
733
|
"cx": "50",
|
@@ -743,8 +743,8 @@ const loadingProps = {
|
|
743
743
|
textSize: numericProp,
|
744
744
|
textColor: String
|
745
745
|
};
|
746
|
-
var stdin_default$
|
747
|
-
name: name$
|
746
|
+
var stdin_default$1K = vue.defineComponent({
|
747
|
+
name: name$1B,
|
748
748
|
props: loadingProps,
|
749
749
|
setup(props, {
|
750
750
|
slots
|
@@ -755,7 +755,7 @@ var stdin_default$1J = vue.defineComponent({
|
|
755
755
|
const renderIcon = () => {
|
756
756
|
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
757
757
|
return vue.createVNode("span", {
|
758
|
-
"class": bem$
|
758
|
+
"class": bem$1w("spinner", props.type),
|
759
759
|
"style": spinnerStyle.value
|
760
760
|
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
761
761
|
};
|
@@ -763,7 +763,7 @@ var stdin_default$1J = vue.defineComponent({
|
|
763
763
|
var _a;
|
764
764
|
if (slots.default) {
|
765
765
|
return vue.createVNode("span", {
|
766
|
-
"class": bem$
|
766
|
+
"class": bem$1w("text"),
|
767
767
|
"style": {
|
768
768
|
fontSize: addUnit(props.textSize),
|
769
769
|
color: (_a = props.textColor) != null ? _a : props.color
|
@@ -777,7 +777,7 @@ var stdin_default$1J = vue.defineComponent({
|
|
777
777
|
vertical
|
778
778
|
} = props;
|
779
779
|
return vue.createVNode("div", {
|
780
|
-
"class": bem$
|
780
|
+
"class": bem$1w([type, {
|
781
781
|
vertical
|
782
782
|
}]),
|
783
783
|
"aria-live": "polite",
|
@@ -786,8 +786,8 @@ var stdin_default$1J = vue.defineComponent({
|
|
786
786
|
};
|
787
787
|
}
|
788
788
|
});
|
789
|
-
const Loading = withInstall(stdin_default$
|
790
|
-
const [name$
|
789
|
+
const Loading = withInstall(stdin_default$1K);
|
790
|
+
const [name$1A, bem$1v] = createNamespace("button");
|
791
791
|
const buttonProps = extend({}, routeProps, {
|
792
792
|
tag: makeStringProp("button"),
|
793
793
|
text: String,
|
@@ -809,8 +809,8 @@ const buttonProps = extend({}, routeProps, {
|
|
809
809
|
loadingType: String,
|
810
810
|
iconPosition: makeStringProp("left")
|
811
811
|
});
|
812
|
-
var stdin_default$
|
813
|
-
name: name$
|
812
|
+
var stdin_default$1J = vue.defineComponent({
|
813
|
+
name: name$1A,
|
814
814
|
props: buttonProps,
|
815
815
|
emits: ["click"],
|
816
816
|
setup(props, {
|
@@ -825,7 +825,7 @@ var stdin_default$1I = vue.defineComponent({
|
|
825
825
|
return vue.createVNode(Loading, {
|
826
826
|
"size": props.loadingSize,
|
827
827
|
"type": props.loadingType,
|
828
|
-
"class": bem$
|
828
|
+
"class": bem$1v("loading")
|
829
829
|
}, null);
|
830
830
|
};
|
831
831
|
const renderIcon = () => {
|
@@ -834,13 +834,13 @@ var stdin_default$1I = vue.defineComponent({
|
|
834
834
|
}
|
835
835
|
if (slots.icon) {
|
836
836
|
return vue.createVNode("div", {
|
837
|
-
"class": bem$
|
837
|
+
"class": bem$1v("icon")
|
838
838
|
}, [slots.icon()]);
|
839
839
|
}
|
840
840
|
if (props.icon) {
|
841
841
|
return vue.createVNode(Icon, {
|
842
842
|
"name": props.icon,
|
843
|
-
"class": bem$
|
843
|
+
"class": bem$1v("icon"),
|
844
844
|
"classPrefix": props.iconPrefix
|
845
845
|
}, null);
|
846
846
|
}
|
@@ -854,7 +854,7 @@ var stdin_default$1I = vue.defineComponent({
|
|
854
854
|
}
|
855
855
|
if (text) {
|
856
856
|
return vue.createVNode("span", {
|
857
|
-
"class": bem$
|
857
|
+
"class": bem$1v("text")
|
858
858
|
}, [text]);
|
859
859
|
}
|
860
860
|
};
|
@@ -901,7 +901,7 @@ var stdin_default$1I = vue.defineComponent({
|
|
901
901
|
nativeType,
|
902
902
|
iconPosition
|
903
903
|
} = props;
|
904
|
-
const classes = [bem$
|
904
|
+
const classes = [bem$1v([type, size, {
|
905
905
|
plain,
|
906
906
|
block,
|
907
907
|
round,
|
@@ -920,14 +920,14 @@ var stdin_default$1I = vue.defineComponent({
|
|
920
920
|
"onClick": onClick
|
921
921
|
}, {
|
922
922
|
default: () => [vue.createVNode("div", {
|
923
|
-
"class": bem$
|
923
|
+
"class": bem$1v("content")
|
924
924
|
}, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
|
925
925
|
});
|
926
926
|
};
|
927
927
|
}
|
928
928
|
});
|
929
|
-
const Button = withInstall(stdin_default$
|
930
|
-
const [name$
|
929
|
+
const Button = withInstall(stdin_default$1J);
|
930
|
+
const [name$1z, bem$1u] = createNamespace("action-bar-button");
|
931
931
|
const actionBarButtonProps = extend({}, routeProps, {
|
932
932
|
type: String,
|
933
933
|
text: String,
|
@@ -936,8 +936,8 @@ const actionBarButtonProps = extend({}, routeProps, {
|
|
936
936
|
loading: Boolean,
|
937
937
|
disabled: Boolean
|
938
938
|
});
|
939
|
-
var stdin_default$
|
940
|
-
name: name$
|
939
|
+
var stdin_default$1I = vue.defineComponent({
|
940
|
+
name: name$1z,
|
941
941
|
props: actionBarButtonProps,
|
942
942
|
setup(props, {
|
943
943
|
slots
|
@@ -972,7 +972,7 @@ var stdin_default$1H = vue.defineComponent({
|
|
972
972
|
disabled
|
973
973
|
} = props;
|
974
974
|
return vue.createVNode(Button, {
|
975
|
-
"class": bem$
|
975
|
+
"class": bem$1u([type, {
|
976
976
|
last: isLast.value,
|
977
977
|
first: isFirst.value
|
978
978
|
}]),
|
@@ -989,8 +989,8 @@ var stdin_default$1H = vue.defineComponent({
|
|
989
989
|
};
|
990
990
|
}
|
991
991
|
});
|
992
|
-
const ActionBarButton = withInstall(stdin_default$
|
993
|
-
const [name$
|
992
|
+
const ActionBarButton = withInstall(stdin_default$1I);
|
993
|
+
const [name$1y, bem$1t] = createNamespace("action-bar-icon");
|
994
994
|
const actionBarIconProps = extend({}, routeProps, {
|
995
995
|
dot: Boolean,
|
996
996
|
text: String,
|
@@ -1001,8 +1001,8 @@ const actionBarIconProps = extend({}, routeProps, {
|
|
1001
1001
|
badgeProps: Object,
|
1002
1002
|
iconPrefix: String
|
1003
1003
|
});
|
1004
|
-
var stdin_default$
|
1005
|
-
name: name$
|
1004
|
+
var stdin_default$1H = vue.defineComponent({
|
1005
|
+
name: name$1y,
|
1006
1006
|
props: actionBarIconProps,
|
1007
1007
|
setup(props, {
|
1008
1008
|
slots
|
@@ -1022,7 +1022,7 @@ var stdin_default$1G = vue.defineComponent({
|
|
1022
1022
|
if (slots.icon) {
|
1023
1023
|
return vue.createVNode(Badge, vue.mergeProps({
|
1024
1024
|
"dot": dot,
|
1025
|
-
"class": bem$
|
1025
|
+
"class": bem$1t("icon"),
|
1026
1026
|
"content": badge
|
1027
1027
|
}, badgeProps2), {
|
1028
1028
|
default: slots.icon
|
@@ -1034,20 +1034,20 @@ var stdin_default$1G = vue.defineComponent({
|
|
1034
1034
|
"name": icon,
|
1035
1035
|
"badge": badge,
|
1036
1036
|
"color": color,
|
1037
|
-
"class": [bem$
|
1037
|
+
"class": [bem$1t("icon"), iconClass],
|
1038
1038
|
"badgeProps": badgeProps2,
|
1039
1039
|
"classPrefix": iconPrefix
|
1040
1040
|
}, null);
|
1041
1041
|
};
|
1042
1042
|
return () => vue.createVNode("div", {
|
1043
1043
|
"role": "button",
|
1044
|
-
"class": bem$
|
1044
|
+
"class": bem$1t(),
|
1045
1045
|
"tabindex": 0,
|
1046
1046
|
"onClick": route2
|
1047
1047
|
}, [renderIcon(), slots.default ? slots.default() : props.text]);
|
1048
1048
|
}
|
1049
1049
|
});
|
1050
|
-
const ActionBarIcon = withInstall(stdin_default$
|
1050
|
+
const ActionBarIcon = withInstall(stdin_default$1H);
|
1051
1051
|
const popupSharedProps = {
|
1052
1052
|
// whether to show popup
|
1053
1053
|
show: Boolean,
|
@@ -1198,7 +1198,7 @@ function useLazyRender(show) {
|
|
1198
1198
|
);
|
1199
1199
|
return (render) => () => inited.value ? render() : null;
|
1200
1200
|
}
|
1201
|
-
const [name$
|
1201
|
+
const [name$1x, bem$1s] = createNamespace("overlay");
|
1202
1202
|
const overlayProps = {
|
1203
1203
|
show: Boolean,
|
1204
1204
|
zIndex: numericProp,
|
@@ -1208,8 +1208,8 @@ const overlayProps = {
|
|
1208
1208
|
lazyRender: truthProp,
|
1209
1209
|
customStyle: Object
|
1210
1210
|
};
|
1211
|
-
var stdin_default$
|
1212
|
-
name: name$
|
1211
|
+
var stdin_default$1G = vue.defineComponent({
|
1212
|
+
name: name$1x,
|
1213
1213
|
props: overlayProps,
|
1214
1214
|
setup(props, {
|
1215
1215
|
slots
|
@@ -1230,7 +1230,7 @@ var stdin_default$1F = vue.defineComponent({
|
|
1230
1230
|
return vue.withDirectives(vue.createVNode("div", {
|
1231
1231
|
"ref": root,
|
1232
1232
|
"style": style,
|
1233
|
-
"class": [bem$
|
1233
|
+
"class": [bem$1s(), props.className]
|
1234
1234
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props.show]]);
|
1235
1235
|
});
|
1236
1236
|
use.useEventListener("touchmove", onTouchMove, {
|
@@ -1244,7 +1244,7 @@ var stdin_default$1F = vue.defineComponent({
|
|
1244
1244
|
});
|
1245
1245
|
}
|
1246
1246
|
});
|
1247
|
-
const Overlay = withInstall(stdin_default$
|
1247
|
+
const Overlay = withInstall(stdin_default$1G);
|
1248
1248
|
const popupProps$2 = extend({}, popupSharedProps, {
|
1249
1249
|
round: Boolean,
|
1250
1250
|
position: makeStringProp("center"),
|
@@ -1257,9 +1257,9 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1257
1257
|
safeAreaInsetTop: Boolean,
|
1258
1258
|
safeAreaInsetBottom: Boolean
|
1259
1259
|
});
|
1260
|
-
const [name$
|
1261
|
-
var stdin_default$
|
1262
|
-
name: name$
|
1260
|
+
const [name$1w, bem$1r] = createNamespace("popup");
|
1261
|
+
var stdin_default$1F = vue.defineComponent({
|
1262
|
+
name: name$1w,
|
1263
1263
|
inheritAttrs: false,
|
1264
1264
|
props: popupProps$2,
|
1265
1265
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
@@ -1333,7 +1333,7 @@ var stdin_default$1E = vue.defineComponent({
|
|
1333
1333
|
"role": "button",
|
1334
1334
|
"tabindex": 0,
|
1335
1335
|
"name": props.closeIcon,
|
1336
|
-
"class": [bem$
|
1336
|
+
"class": [bem$1r("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
|
1337
1337
|
"classPrefix": props.iconPrefix,
|
1338
1338
|
"onClick": onClickCloseIcon
|
1339
1339
|
}, null);
|
@@ -1355,7 +1355,7 @@ var stdin_default$1E = vue.defineComponent({
|
|
1355
1355
|
"style": style.value,
|
1356
1356
|
"role": "dialog",
|
1357
1357
|
"tabindex": 0,
|
1358
|
-
"class": [bem$
|
1358
|
+
"class": [bem$1r({
|
1359
1359
|
round,
|
1360
1360
|
[position]: position
|
1361
1361
|
}), {
|
@@ -1436,8 +1436,8 @@ var stdin_default$1E = vue.defineComponent({
|
|
1436
1436
|
};
|
1437
1437
|
}
|
1438
1438
|
});
|
1439
|
-
const Popup = withInstall(stdin_default$
|
1440
|
-
const [name$
|
1439
|
+
const Popup = withInstall(stdin_default$1F);
|
1440
|
+
const [name$1v, bem$1q] = createNamespace("action-sheet");
|
1441
1441
|
const actionSheetProps = extend({}, popupSharedProps, {
|
1442
1442
|
title: String,
|
1443
1443
|
round: truthProp,
|
@@ -1451,8 +1451,8 @@ const actionSheetProps = extend({}, popupSharedProps, {
|
|
1451
1451
|
safeAreaInsetBottom: truthProp
|
1452
1452
|
});
|
1453
1453
|
const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
1454
|
-
var stdin_default$
|
1455
|
-
name: name$
|
1454
|
+
var stdin_default$1E = vue.defineComponent({
|
1455
|
+
name: name$1v,
|
1456
1456
|
props: actionSheetProps,
|
1457
1457
|
emits: ["select", "cancel", "update:show"],
|
1458
1458
|
setup(props, {
|
@@ -1467,10 +1467,10 @@ var stdin_default$1D = vue.defineComponent({
|
|
1467
1467
|
const renderHeader = () => {
|
1468
1468
|
if (props.title) {
|
1469
1469
|
return vue.createVNode("div", {
|
1470
|
-
"class": bem$
|
1470
|
+
"class": bem$1q("header")
|
1471
1471
|
}, [props.title, props.closeable && vue.createVNode(Icon, {
|
1472
1472
|
"name": props.closeIcon,
|
1473
|
-
"class": [bem$
|
1473
|
+
"class": [bem$1q("close"), HAPTICS_FEEDBACK],
|
1474
1474
|
"onClick": onCancel
|
1475
1475
|
}, null)]);
|
1476
1476
|
}
|
@@ -1478,10 +1478,10 @@ var stdin_default$1D = vue.defineComponent({
|
|
1478
1478
|
const renderCancel = () => {
|
1479
1479
|
if (slots.cancel || props.cancelText) {
|
1480
1480
|
return [vue.createVNode("div", {
|
1481
|
-
"class": bem$
|
1481
|
+
"class": bem$1q("gap")
|
1482
1482
|
}, null), vue.createVNode("button", {
|
1483
1483
|
"type": "button",
|
1484
|
-
"class": bem$
|
1484
|
+
"class": bem$1q("cancel"),
|
1485
1485
|
"onClick": onCancel
|
1486
1486
|
}, [slots.cancel ? slots.cancel() : props.cancelText])];
|
1487
1487
|
}
|
@@ -1489,7 +1489,7 @@ var stdin_default$1D = vue.defineComponent({
|
|
1489
1489
|
const renderActionContent = (action, index) => {
|
1490
1490
|
if (action.loading) {
|
1491
1491
|
return vue.createVNode(Loading, {
|
1492
|
-
"class": bem$
|
1492
|
+
"class": bem$1q("loading-icon")
|
1493
1493
|
}, null);
|
1494
1494
|
}
|
1495
1495
|
if (slots.action) {
|
@@ -1499,9 +1499,9 @@ var stdin_default$1D = vue.defineComponent({
|
|
1499
1499
|
});
|
1500
1500
|
}
|
1501
1501
|
return [vue.createVNode("span", {
|
1502
|
-
"class": bem$
|
1502
|
+
"class": bem$1q("name")
|
1503
1503
|
}, [action.name]), action.subname && vue.createVNode("div", {
|
1504
|
-
"class": bem$
|
1504
|
+
"class": bem$1q("subname")
|
1505
1505
|
}, [action.subname])];
|
1506
1506
|
};
|
1507
1507
|
const renderAction = (action, index) => {
|
@@ -1529,7 +1529,7 @@ var stdin_default$1D = vue.defineComponent({
|
|
1529
1529
|
"style": {
|
1530
1530
|
color
|
1531
1531
|
},
|
1532
|
-
"class": [bem$
|
1532
|
+
"class": [bem$1q("item", {
|
1533
1533
|
loading,
|
1534
1534
|
disabled
|
1535
1535
|
}), className],
|
@@ -1540,26 +1540,26 @@ var stdin_default$1D = vue.defineComponent({
|
|
1540
1540
|
if (props.description || slots.description) {
|
1541
1541
|
const content = slots.description ? slots.description() : props.description;
|
1542
1542
|
return vue.createVNode("div", {
|
1543
|
-
"class": bem$
|
1543
|
+
"class": bem$1q("description")
|
1544
1544
|
}, [content]);
|
1545
1545
|
}
|
1546
1546
|
};
|
1547
1547
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
1548
|
-
"class": bem$
|
1548
|
+
"class": bem$1q(),
|
1549
1549
|
"position": "bottom",
|
1550
1550
|
"onUpdate:show": updateShow
|
1551
1551
|
}, pick(props, popupInheritKeys$2)), {
|
1552
1552
|
default: () => {
|
1553
1553
|
var _a;
|
1554
1554
|
return [renderHeader(), renderDescription(), vue.createVNode("div", {
|
1555
|
-
"class": bem$
|
1555
|
+
"class": bem$1q("content")
|
1556
1556
|
}, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
|
1557
1557
|
}
|
1558
1558
|
});
|
1559
1559
|
}
|
1560
1560
|
});
|
1561
|
-
const ActionSheet = withInstall(stdin_default$
|
1562
|
-
const [name$
|
1561
|
+
const ActionSheet = withInstall(stdin_default$1E);
|
1562
|
+
const [name$1u, bem$1p, t$k] = createNamespace("picker");
|
1563
1563
|
const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
|
1564
1564
|
function getColumnsType(columns, fields) {
|
1565
1565
|
const firstColumn = columns[0];
|
@@ -1628,10 +1628,10 @@ function assignDefaultFields(fields) {
|
|
1628
1628
|
const DEFAULT_DURATION = 200;
|
1629
1629
|
const MOMENTUM_TIME = 300;
|
1630
1630
|
const MOMENTUM_DISTANCE = 15;
|
1631
|
-
const [name$
|
1632
|
-
const PICKER_KEY = Symbol(name$
|
1633
|
-
var stdin_default$
|
1634
|
-
name: name$
|
1631
|
+
const [name$1t, bem$1o] = createNamespace("picker-column");
|
1632
|
+
const PICKER_KEY = Symbol(name$1t);
|
1633
|
+
var stdin_default$1D = vue.defineComponent({
|
1634
|
+
name: name$1t,
|
1635
1635
|
props: {
|
1636
1636
|
value: numericProp,
|
1637
1637
|
fields: makeRequiredProp(Object),
|
@@ -1770,7 +1770,7 @@ var stdin_default$1C = vue.defineComponent({
|
|
1770
1770
|
role: "button",
|
1771
1771
|
style: optionStyle,
|
1772
1772
|
tabindex: disabled ? -1 : 0,
|
1773
|
-
class: [bem$
|
1773
|
+
class: [bem$1o("item", {
|
1774
1774
|
disabled,
|
1775
1775
|
selected: value === props.value
|
1776
1776
|
}), option.className],
|
@@ -1798,7 +1798,7 @@ var stdin_default$1C = vue.defineComponent({
|
|
1798
1798
|
});
|
1799
1799
|
return () => vue.createVNode("div", {
|
1800
1800
|
"ref": root,
|
1801
|
-
"class": bem$
|
1801
|
+
"class": bem$1o(),
|
1802
1802
|
"onTouchstartPassive": onTouchStart,
|
1803
1803
|
"onTouchend": onTouchEnd,
|
1804
1804
|
"onTouchcancel": onTouchEnd
|
@@ -1809,12 +1809,12 @@ var stdin_default$1C = vue.defineComponent({
|
|
1809
1809
|
transitionDuration: `${currentDuration.value}ms`,
|
1810
1810
|
transitionProperty: currentDuration.value ? "all" : "none"
|
1811
1811
|
},
|
1812
|
-
"class": bem$
|
1812
|
+
"class": bem$1o("wrapper"),
|
1813
1813
|
"onTransitionend": stopMomentum
|
1814
1814
|
}, [renderOptions()])]);
|
1815
1815
|
}
|
1816
1816
|
});
|
1817
|
-
const [name$
|
1817
|
+
const [name$1s] = createNamespace("picker-toolbar");
|
1818
1818
|
const pickerToolbarProps = {
|
1819
1819
|
title: String,
|
1820
1820
|
cancelButtonText: String,
|
@@ -1822,8 +1822,8 @@ const pickerToolbarProps = {
|
|
1822
1822
|
};
|
1823
1823
|
const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
|
1824
1824
|
const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
|
1825
|
-
var stdin_default$
|
1826
|
-
name: name$
|
1825
|
+
var stdin_default$1C = vue.defineComponent({
|
1826
|
+
name: name$1s,
|
1827
1827
|
props: pickerToolbarProps,
|
1828
1828
|
emits: ["confirm", "cancel"],
|
1829
1829
|
setup(props, {
|
@@ -1836,7 +1836,7 @@ var stdin_default$1B = vue.defineComponent({
|
|
1836
1836
|
}
|
1837
1837
|
if (props.title) {
|
1838
1838
|
return vue.createVNode("div", {
|
1839
|
-
"class": [bem$
|
1839
|
+
"class": [bem$1p("title"), "van-ellipsis"]
|
1840
1840
|
}, [props.title]);
|
1841
1841
|
}
|
1842
1842
|
};
|
@@ -1846,7 +1846,7 @@ var stdin_default$1B = vue.defineComponent({
|
|
1846
1846
|
const text = props.cancelButtonText || t$k("cancel");
|
1847
1847
|
return vue.createVNode("button", {
|
1848
1848
|
"type": "button",
|
1849
|
-
"class": [bem$
|
1849
|
+
"class": [bem$1p("cancel"), HAPTICS_FEEDBACK],
|
1850
1850
|
"onClick": onCancel
|
1851
1851
|
}, [slots.cancel ? slots.cancel() : text]);
|
1852
1852
|
};
|
@@ -1854,32 +1854,55 @@ var stdin_default$1B = vue.defineComponent({
|
|
1854
1854
|
const text = props.confirmButtonText || t$k("confirm");
|
1855
1855
|
return vue.createVNode("button", {
|
1856
1856
|
"type": "button",
|
1857
|
-
"class": [bem$
|
1857
|
+
"class": [bem$1p("confirm"), HAPTICS_FEEDBACK],
|
1858
1858
|
"onClick": onConfirm
|
1859
1859
|
}, [slots.confirm ? slots.confirm() : text]);
|
1860
1860
|
};
|
1861
1861
|
return () => vue.createVNode("div", {
|
1862
|
-
"class": bem$
|
1862
|
+
"class": bem$1p("toolbar")
|
1863
1863
|
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
1864
1864
|
}
|
1865
1865
|
});
|
1866
|
+
const useSyncPropRef = (getProp, setProp) => {
|
1867
|
+
const propRef = vue.ref(getProp());
|
1868
|
+
vue.watch(getProp, (value) => {
|
1869
|
+
if (value !== propRef.value) {
|
1870
|
+
propRef.value = value;
|
1871
|
+
}
|
1872
|
+
});
|
1873
|
+
vue.watch(propRef, (value) => {
|
1874
|
+
if (value !== getProp()) {
|
1875
|
+
setProp(value);
|
1876
|
+
}
|
1877
|
+
});
|
1878
|
+
return propRef;
|
1879
|
+
};
|
1866
1880
|
function scrollLeftTo(scroller, to, duration) {
|
1881
|
+
let rafId;
|
1867
1882
|
let count = 0;
|
1868
1883
|
const from = scroller.scrollLeft;
|
1869
1884
|
const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
|
1885
|
+
function cancel() {
|
1886
|
+
use.cancelRaf(rafId);
|
1887
|
+
}
|
1870
1888
|
function animate() {
|
1871
1889
|
scroller.scrollLeft += (to - from) / frames;
|
1872
1890
|
if (++count < frames) {
|
1873
|
-
use.raf(animate);
|
1891
|
+
rafId = use.raf(animate);
|
1874
1892
|
}
|
1875
1893
|
}
|
1876
1894
|
animate();
|
1895
|
+
return cancel;
|
1877
1896
|
}
|
1878
1897
|
function scrollTopTo(scroller, to, duration, callback) {
|
1898
|
+
let rafId;
|
1879
1899
|
let current2 = getScrollTop(scroller);
|
1880
1900
|
const isDown = current2 < to;
|
1881
1901
|
const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
|
1882
1902
|
const step = (to - current2) / frames;
|
1903
|
+
function cancel() {
|
1904
|
+
use.cancelRaf(rafId);
|
1905
|
+
}
|
1883
1906
|
function animate() {
|
1884
1907
|
current2 += step;
|
1885
1908
|
if (isDown && current2 > to || !isDown && current2 < to) {
|
@@ -1887,12 +1910,13 @@ function scrollTopTo(scroller, to, duration, callback) {
|
|
1887
1910
|
}
|
1888
1911
|
setScrollTop(scroller, current2);
|
1889
1912
|
if (isDown && current2 < to || !isDown && current2 > to) {
|
1890
|
-
use.raf(animate);
|
1913
|
+
rafId = use.raf(animate);
|
1891
1914
|
} else if (callback) {
|
1892
|
-
use.raf(callback);
|
1915
|
+
rafId = use.raf(callback);
|
1893
1916
|
}
|
1894
1917
|
}
|
1895
1918
|
animate();
|
1919
|
+
return cancel;
|
1896
1920
|
}
|
1897
1921
|
let current = 0;
|
1898
1922
|
function useId() {
|
@@ -1943,7 +1967,7 @@ function useVisibilityChange(target, onChange) {
|
|
1943
1967
|
vue.onBeforeUnmount(unobserve);
|
1944
1968
|
use.onMountedOrActivated(observe);
|
1945
1969
|
}
|
1946
|
-
const [name$
|
1970
|
+
const [name$1r, bem$1n] = createNamespace("sticky");
|
1947
1971
|
const stickyProps = {
|
1948
1972
|
zIndex: numericProp,
|
1949
1973
|
position: makeStringProp("top"),
|
@@ -1951,8 +1975,8 @@ const stickyProps = {
|
|
1951
1975
|
offsetTop: makeNumericProp(0),
|
1952
1976
|
offsetBottom: makeNumericProp(0)
|
1953
1977
|
};
|
1954
|
-
var stdin_default$
|
1955
|
-
name: name$
|
1978
|
+
var stdin_default$1B = vue.defineComponent({
|
1979
|
+
name: name$1r,
|
1956
1980
|
props: stickyProps,
|
1957
1981
|
emits: ["scroll", "change"],
|
1958
1982
|
setup(props, {
|
@@ -2065,7 +2089,7 @@ var stdin_default$1A = vue.defineComponent({
|
|
2065
2089
|
"ref": root,
|
2066
2090
|
"style": rootStyle.value
|
2067
2091
|
}, [vue.createVNode("div", {
|
2068
|
-
"class": bem$
|
2092
|
+
"class": bem$1n({
|
2069
2093
|
fixed: state.fixed && !isReset.value
|
2070
2094
|
}),
|
2071
2095
|
"style": stickyStyle.value
|
@@ -2073,8 +2097,8 @@ var stdin_default$1A = vue.defineComponent({
|
|
2073
2097
|
};
|
2074
2098
|
}
|
2075
2099
|
});
|
2076
|
-
const Sticky = withInstall(stdin_default$
|
2077
|
-
const [name$
|
2100
|
+
const Sticky = withInstall(stdin_default$1B);
|
2101
|
+
const [name$1q, bem$1m] = createNamespace("swipe");
|
2078
2102
|
const swipeProps = {
|
2079
2103
|
loop: truthProp,
|
2080
2104
|
width: numericProp,
|
@@ -2089,9 +2113,9 @@ const swipeProps = {
|
|
2089
2113
|
showIndicators: truthProp,
|
2090
2114
|
stopPropagation: truthProp
|
2091
2115
|
};
|
2092
|
-
const SWIPE_KEY = Symbol(name$
|
2093
|
-
var stdin_default$
|
2094
|
-
name: name$
|
2116
|
+
const SWIPE_KEY = Symbol(name$1q);
|
2117
|
+
var stdin_default$1A = vue.defineComponent({
|
2118
|
+
name: name$1q,
|
2095
2119
|
props: swipeProps,
|
2096
2120
|
emits: ["change", "dragStart", "dragEnd"],
|
2097
2121
|
setup(props, {
|
@@ -2369,7 +2393,7 @@ var stdin_default$1z = vue.defineComponent({
|
|
2369
2393
|
} : void 0;
|
2370
2394
|
return vue.createVNode("i", {
|
2371
2395
|
"style": style,
|
2372
|
-
"class": bem$
|
2396
|
+
"class": bem$1m("indicator", {
|
2373
2397
|
active
|
2374
2398
|
})
|
2375
2399
|
}, null);
|
@@ -2383,7 +2407,7 @@ var stdin_default$1z = vue.defineComponent({
|
|
2383
2407
|
}
|
2384
2408
|
if (props.showIndicators && count.value > 1) {
|
2385
2409
|
return vue.createVNode("div", {
|
2386
|
-
"class": bem$
|
2410
|
+
"class": bem$1m("indicators", {
|
2387
2411
|
vertical: props.vertical
|
2388
2412
|
})
|
2389
2413
|
}, [Array(count.value).fill("").map(renderDot)]);
|
@@ -2425,11 +2449,11 @@ var stdin_default$1z = vue.defineComponent({
|
|
2425
2449
|
var _a;
|
2426
2450
|
return vue.createVNode("div", {
|
2427
2451
|
"ref": root,
|
2428
|
-
"class": bem$
|
2452
|
+
"class": bem$1m()
|
2429
2453
|
}, [vue.createVNode("div", {
|
2430
2454
|
"ref": track,
|
2431
2455
|
"style": trackStyle.value,
|
2432
|
-
"class": bem$
|
2456
|
+
"class": bem$1m("track", {
|
2433
2457
|
vertical: props.vertical
|
2434
2458
|
}),
|
2435
2459
|
"onTouchstartPassive": onTouchStart,
|
@@ -2439,10 +2463,10 @@ var stdin_default$1z = vue.defineComponent({
|
|
2439
2463
|
};
|
2440
2464
|
}
|
2441
2465
|
});
|
2442
|
-
const Swipe = withInstall(stdin_default$
|
2443
|
-
const [name$
|
2444
|
-
var stdin_default$
|
2445
|
-
name: name$
|
2466
|
+
const Swipe = withInstall(stdin_default$1A);
|
2467
|
+
const [name$1p, bem$1l] = createNamespace("tabs");
|
2468
|
+
var stdin_default$1z = vue.defineComponent({
|
2469
|
+
name: name$1p,
|
2446
2470
|
props: {
|
2447
2471
|
count: makeRequiredProp(Number),
|
2448
2472
|
inited: Boolean,
|
@@ -2466,7 +2490,7 @@ var stdin_default$1y = vue.defineComponent({
|
|
2466
2490
|
return vue.createVNode(Swipe, {
|
2467
2491
|
"ref": swipeRef,
|
2468
2492
|
"loop": false,
|
2469
|
-
"class": bem$
|
2493
|
+
"class": bem$1l("track"),
|
2470
2494
|
"duration": +props.duration * 1e3,
|
2471
2495
|
"touchable": props.swipeable,
|
2472
2496
|
"lazyRender": props.lazyRender,
|
@@ -2494,13 +2518,13 @@ var stdin_default$1y = vue.defineComponent({
|
|
2494
2518
|
swipeRef
|
2495
2519
|
});
|
2496
2520
|
return () => vue.createVNode("div", {
|
2497
|
-
"class": bem$
|
2521
|
+
"class": bem$1l("content", {
|
2498
2522
|
animated: props.animated || props.swipeable
|
2499
2523
|
})
|
2500
2524
|
}, [renderChildren()]);
|
2501
2525
|
}
|
2502
2526
|
});
|
2503
|
-
const [name$
|
2527
|
+
const [name$1o, bem$1k] = createNamespace("tabs");
|
2504
2528
|
const tabsProps = {
|
2505
2529
|
type: makeStringProp("line"),
|
2506
2530
|
color: String,
|
@@ -2523,9 +2547,9 @@ const tabsProps = {
|
|
2523
2547
|
titleActiveColor: String,
|
2524
2548
|
titleInactiveColor: String
|
2525
2549
|
};
|
2526
|
-
const TABS_KEY = Symbol(name$
|
2527
|
-
var stdin_default$
|
2528
|
-
name: name$
|
2550
|
+
const TABS_KEY = Symbol(name$1o);
|
2551
|
+
var stdin_default$1y = vue.defineComponent({
|
2552
|
+
name: name$1o,
|
2529
2553
|
props: tabsProps,
|
2530
2554
|
emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
|
2531
2555
|
setup(props, {
|
@@ -2535,6 +2559,8 @@ var stdin_default$1x = vue.defineComponent({
|
|
2535
2559
|
let tabHeight;
|
2536
2560
|
let lockScroll;
|
2537
2561
|
let stickyFixed;
|
2562
|
+
let cancelScrollLeftToRaf;
|
2563
|
+
let cancelScrollTopToRaf;
|
2538
2564
|
const root = vue.ref();
|
2539
2565
|
const navRef = vue.ref();
|
2540
2566
|
const wrapRef = vue.ref();
|
@@ -2582,7 +2608,9 @@ var stdin_default$1x = vue.defineComponent({
|
|
2582
2608
|
}
|
2583
2609
|
const title = titles[state.currentIndex].$el;
|
2584
2610
|
const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
|
2585
|
-
|
2611
|
+
if (cancelScrollLeftToRaf)
|
2612
|
+
cancelScrollLeftToRaf();
|
2613
|
+
cancelScrollLeftToRaf = scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
|
2586
2614
|
};
|
2587
2615
|
const setLine = () => {
|
2588
2616
|
const shouldAnimate = state.inited;
|
@@ -2658,7 +2686,9 @@ var stdin_default$1x = vue.defineComponent({
|
|
2658
2686
|
if (target && scroller.value) {
|
2659
2687
|
const to = getElementTop(target, scroller.value) - scrollOffset.value;
|
2660
2688
|
lockScroll = true;
|
2661
|
-
|
2689
|
+
if (cancelScrollTopToRaf)
|
2690
|
+
cancelScrollTopToRaf();
|
2691
|
+
cancelScrollTopToRaf = scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
|
2662
2692
|
lockScroll = false;
|
2663
2693
|
});
|
2664
2694
|
}
|
@@ -2717,7 +2747,7 @@ var stdin_default$1x = vue.defineComponent({
|
|
2717
2747
|
const renderLine = () => {
|
2718
2748
|
if (props.type === "line" && children.length) {
|
2719
2749
|
return vue.createVNode("div", {
|
2720
|
-
"class": bem$
|
2750
|
+
"class": bem$1k("line"),
|
2721
2751
|
"style": state.lineStyle
|
2722
2752
|
}, null);
|
2723
2753
|
}
|
@@ -2731,13 +2761,13 @@ var stdin_default$1x = vue.defineComponent({
|
|
2731
2761
|
} = props;
|
2732
2762
|
const Header = [vue.createVNode("div", {
|
2733
2763
|
"ref": sticky ? void 0 : wrapRef,
|
2734
|
-
"class": [bem$
|
2764
|
+
"class": [bem$1k("wrap"), {
|
2735
2765
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
2736
2766
|
}]
|
2737
2767
|
}, [vue.createVNode("div", {
|
2738
2768
|
"ref": navRef,
|
2739
2769
|
"role": "tablist",
|
2740
|
-
"class": bem$
|
2770
|
+
"class": bem$1k("nav", [type, {
|
2741
2771
|
shrink: props.shrink,
|
2742
2772
|
complete: scrollable.value
|
2743
2773
|
}]),
|
@@ -2810,14 +2840,14 @@ var stdin_default$1x = vue.defineComponent({
|
|
2810
2840
|
});
|
2811
2841
|
return () => vue.createVNode("div", {
|
2812
2842
|
"ref": root,
|
2813
|
-
"class": bem$
|
2843
|
+
"class": bem$1k([props.type])
|
2814
2844
|
}, [props.sticky ? vue.createVNode(Sticky, {
|
2815
2845
|
"container": root.value,
|
2816
2846
|
"offsetTop": offsetTopPx.value,
|
2817
2847
|
"onScroll": onStickyScroll
|
2818
2848
|
}, {
|
2819
2849
|
default: () => [renderHeader()]
|
2820
|
-
}) : renderHeader(), vue.createVNode(stdin_default$
|
2850
|
+
}) : renderHeader(), vue.createVNode(stdin_default$1z, {
|
2821
2851
|
"ref": contentRef,
|
2822
2852
|
"count": children.length,
|
2823
2853
|
"inited": state.inited,
|
@@ -2837,9 +2867,9 @@ var stdin_default$1x = vue.defineComponent({
|
|
2837
2867
|
});
|
2838
2868
|
const TAB_STATUS_KEY = Symbol();
|
2839
2869
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
2840
|
-
const [name$
|
2870
|
+
const [name$1n, bem$1j] = createNamespace("tab");
|
2841
2871
|
const TabTitle = vue.defineComponent({
|
2842
|
-
name: name$
|
2872
|
+
name: name$1n,
|
2843
2873
|
props: {
|
2844
2874
|
id: String,
|
2845
2875
|
dot: Boolean,
|
@@ -2888,7 +2918,7 @@ const TabTitle = vue.defineComponent({
|
|
2888
2918
|
});
|
2889
2919
|
const renderText = () => {
|
2890
2920
|
const Text = vue.createVNode("span", {
|
2891
|
-
"class": bem$
|
2921
|
+
"class": bem$1j("text", {
|
2892
2922
|
ellipsis: !props.scrollable
|
2893
2923
|
})
|
2894
2924
|
}, [slots.title ? slots.title() : props.title]);
|
@@ -2906,7 +2936,7 @@ const TabTitle = vue.defineComponent({
|
|
2906
2936
|
return () => vue.createVNode("div", {
|
2907
2937
|
"id": props.id,
|
2908
2938
|
"role": "tab",
|
2909
|
-
"class": [bem$
|
2939
|
+
"class": [bem$1j([props.type, {
|
2910
2940
|
grow: props.scrollable && !props.shrink,
|
2911
2941
|
shrink: props.shrink,
|
2912
2942
|
active: props.isActive,
|
@@ -2920,9 +2950,9 @@ const TabTitle = vue.defineComponent({
|
|
2920
2950
|
}, [renderText()]);
|
2921
2951
|
}
|
2922
2952
|
});
|
2923
|
-
const [name$
|
2924
|
-
var stdin_default$
|
2925
|
-
name: name$
|
2953
|
+
const [name$1m, bem$1i] = createNamespace("swipe-item");
|
2954
|
+
var stdin_default$1x = vue.defineComponent({
|
2955
|
+
name: name$1m,
|
2926
2956
|
setup(props, {
|
2927
2957
|
slots
|
2928
2958
|
}) {
|
@@ -2987,14 +3017,14 @@ var stdin_default$1w = vue.defineComponent({
|
|
2987
3017
|
return () => {
|
2988
3018
|
var _a;
|
2989
3019
|
return vue.createVNode("div", {
|
2990
|
-
"class": bem$
|
3020
|
+
"class": bem$1i(),
|
2991
3021
|
"style": style.value
|
2992
3022
|
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
2993
3023
|
};
|
2994
3024
|
}
|
2995
3025
|
});
|
2996
|
-
const SwipeItem = withInstall(stdin_default$
|
2997
|
-
const [name$
|
3026
|
+
const SwipeItem = withInstall(stdin_default$1x);
|
3027
|
+
const [name$1l, bem$1h] = createNamespace("tab");
|
2998
3028
|
const tabProps = extend({}, routeProps, {
|
2999
3029
|
dot: Boolean,
|
3000
3030
|
name: numericProp,
|
@@ -3005,8 +3035,8 @@ const tabProps = extend({}, routeProps, {
|
|
3005
3035
|
titleStyle: [String, Object],
|
3006
3036
|
showZeroBadge: truthProp
|
3007
3037
|
});
|
3008
|
-
var stdin_default$
|
3009
|
-
name: name$
|
3038
|
+
var stdin_default$1w = vue.defineComponent({
|
3039
|
+
name: name$1l,
|
3010
3040
|
props: tabProps,
|
3011
3041
|
setup(props, {
|
3012
3042
|
slots
|
@@ -3094,7 +3124,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
3094
3124
|
return vue.createVNode(SwipeItem, {
|
3095
3125
|
"id": id,
|
3096
3126
|
"role": "tabpanel",
|
3097
|
-
"class": bem$
|
3127
|
+
"class": bem$1h("panel-wrapper", {
|
3098
3128
|
inactive: hasInactiveClass.value
|
3099
3129
|
}),
|
3100
3130
|
"tabindex": active.value ? 0 : -1,
|
@@ -3104,7 +3134,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
3104
3134
|
default: () => {
|
3105
3135
|
var _a2;
|
3106
3136
|
return [vue.createVNode("div", {
|
3107
|
-
"class": bem$
|
3137
|
+
"class": bem$1h("panel")
|
3108
3138
|
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
|
3109
3139
|
}
|
3110
3140
|
});
|
@@ -3114,39 +3144,40 @@ var stdin_default$1v = vue.defineComponent({
|
|
3114
3144
|
return vue.withDirectives(vue.createVNode("div", {
|
3115
3145
|
"id": id,
|
3116
3146
|
"role": "tabpanel",
|
3117
|
-
"class": bem$
|
3147
|
+
"class": bem$1h("panel"),
|
3118
3148
|
"tabindex": show ? 0 : -1,
|
3119
3149
|
"aria-labelledby": label
|
3120
3150
|
}, [Content]), [[vue.vShow, show]]);
|
3121
3151
|
};
|
3122
3152
|
}
|
3123
3153
|
});
|
3124
|
-
const Tab = withInstall(stdin_default$
|
3125
|
-
const Tabs = withInstall(stdin_default$
|
3126
|
-
const [name$
|
3127
|
-
const PICKER_GROUP_KEY = Symbol(name$
|
3154
|
+
const Tab = withInstall(stdin_default$1w);
|
3155
|
+
const Tabs = withInstall(stdin_default$1y);
|
3156
|
+
const [name$1k, bem$1g] = createNamespace("picker-group");
|
3157
|
+
const PICKER_GROUP_KEY = Symbol(name$1k);
|
3128
3158
|
const pickerGroupProps = extend({
|
3129
3159
|
tabs: makeArrayProp(),
|
3160
|
+
activeTab: makeNumericProp(0),
|
3130
3161
|
nextStepText: String
|
3131
3162
|
}, pickerToolbarProps);
|
3132
|
-
var stdin_default$
|
3133
|
-
name: name$
|
3163
|
+
var stdin_default$1v = vue.defineComponent({
|
3164
|
+
name: name$1k,
|
3134
3165
|
props: pickerGroupProps,
|
3135
|
-
emits: ["confirm", "cancel"],
|
3166
|
+
emits: ["confirm", "cancel", "update:activeTab"],
|
3136
3167
|
setup(props, {
|
3137
3168
|
emit,
|
3138
3169
|
slots
|
3139
3170
|
}) {
|
3140
|
-
const activeTab =
|
3171
|
+
const activeTab = useSyncPropRef(() => props.activeTab, (value) => emit("update:activeTab", value));
|
3141
3172
|
const {
|
3142
3173
|
children,
|
3143
3174
|
linkChildren
|
3144
3175
|
} = use.useChildren(PICKER_GROUP_KEY);
|
3145
3176
|
linkChildren();
|
3146
|
-
const showNextButton = () => activeTab.value < props.tabs.length - 1 && props.nextStepText;
|
3177
|
+
const showNextButton = () => +activeTab.value < props.tabs.length - 1 && props.nextStepText;
|
3147
3178
|
const onConfirm = () => {
|
3148
3179
|
if (showNextButton()) {
|
3149
|
-
activeTab.value
|
3180
|
+
activeTab.value = +activeTab.value + 1;
|
3150
3181
|
} else {
|
3151
3182
|
emit("confirm", children.map((item) => item.confirm()));
|
3152
3183
|
}
|
@@ -3157,8 +3188,8 @@ var stdin_default$1u = vue.defineComponent({
|
|
3157
3188
|
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
3158
3189
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
3159
3190
|
return vue.createVNode("div", {
|
3160
|
-
"class": bem$
|
3161
|
-
}, [vue.createVNode(stdin_default$
|
3191
|
+
"class": bem$1g()
|
3192
|
+
}, [vue.createVNode(stdin_default$1C, {
|
3162
3193
|
"title": props.title,
|
3163
3194
|
"cancelButtonText": props.cancelButtonText,
|
3164
3195
|
"confirmButtonText": confirmButtonText,
|
@@ -3167,14 +3198,14 @@ var stdin_default$1u = vue.defineComponent({
|
|
3167
3198
|
}, pick(slots, pickerToolbarSlots)), vue.createVNode(Tabs, {
|
3168
3199
|
"active": activeTab.value,
|
3169
3200
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
3170
|
-
"class": bem$
|
3201
|
+
"class": bem$1g("tabs"),
|
3171
3202
|
"shrink": true,
|
3172
3203
|
"animated": true,
|
3173
3204
|
"lazyRender": false
|
3174
3205
|
}, {
|
3175
3206
|
default: () => [props.tabs.map((title, index) => vue.createVNode(Tab, {
|
3176
3207
|
"title": title,
|
3177
|
-
"titleClass": bem$
|
3208
|
+
"titleClass": bem$1g("tab-title")
|
3178
3209
|
}, {
|
3179
3210
|
default: () => [childNodes == null ? void 0 : childNodes[index]]
|
3180
3211
|
}))]
|
@@ -3197,8 +3228,8 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
3197
3228
|
toolbarPosition: makeStringProp("top"),
|
3198
3229
|
columnsFieldNames: Object
|
3199
3230
|
});
|
3200
|
-
var stdin_default$
|
3201
|
-
name: name$
|
3231
|
+
var stdin_default$1u = vue.defineComponent({
|
3232
|
+
name: name$1u,
|
3202
3233
|
props: pickerProps,
|
3203
3234
|
emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
|
3204
3235
|
setup(props, {
|
@@ -3279,7 +3310,7 @@ var stdin_default$1t = vue.defineComponent({
|
|
3279
3310
|
return params;
|
3280
3311
|
};
|
3281
3312
|
const cancel = () => emit("cancel", getEventParams());
|
3282
|
-
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => vue.createVNode(stdin_default$
|
3313
|
+
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => vue.createVNode(stdin_default$1D, {
|
3283
3314
|
"value": selectedValues.value[columnIndex],
|
3284
3315
|
"fields": fields.value,
|
3285
3316
|
"options": options,
|
@@ -3308,10 +3339,10 @@ var stdin_default$1t = vue.defineComponent({
|
|
3308
3339
|
backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`
|
3309
3340
|
};
|
3310
3341
|
return [vue.createVNode("div", {
|
3311
|
-
"class": bem$
|
3342
|
+
"class": bem$1p("mask"),
|
3312
3343
|
"style": maskStyle
|
3313
3344
|
}, null), vue.createVNode("div", {
|
3314
|
-
"class": [BORDER_UNSET_TOP_BOTTOM, bem$
|
3345
|
+
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1p("frame")],
|
3315
3346
|
"style": frameStyle
|
3316
3347
|
}, null)];
|
3317
3348
|
}
|
@@ -3323,13 +3354,13 @@ var stdin_default$1t = vue.defineComponent({
|
|
3323
3354
|
};
|
3324
3355
|
return vue.createVNode("div", {
|
3325
3356
|
"ref": columnsRef,
|
3326
|
-
"class": bem$
|
3357
|
+
"class": bem$1p("columns"),
|
3327
3358
|
"style": columnsStyle
|
3328
3359
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
3329
3360
|
};
|
3330
3361
|
const renderToolbar = () => {
|
3331
3362
|
if (props.showToolbar && !parent) {
|
3332
|
-
return vue.createVNode(stdin_default$
|
3363
|
+
return vue.createVNode(stdin_default$1C, vue.mergeProps(pick(props, pickerToolbarPropKeys), {
|
3333
3364
|
"onConfirm": confirm,
|
3334
3365
|
"onCancel": cancel
|
3335
3366
|
}), pick(slots, pickerToolbarSlots));
|
@@ -3372,9 +3403,9 @@ var stdin_default$1t = vue.defineComponent({
|
|
3372
3403
|
return () => {
|
3373
3404
|
var _a, _b;
|
3374
3405
|
return vue.createVNode("div", {
|
3375
|
-
"class": bem$
|
3406
|
+
"class": bem$1p()
|
3376
3407
|
}, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? vue.createVNode(Loading, {
|
3377
|
-
"class": bem$
|
3408
|
+
"class": bem$1p("loading")
|
3378
3409
|
}, 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]);
|
3379
3410
|
};
|
3380
3411
|
}
|
@@ -3465,9 +3496,9 @@ function formatDataForCascade({
|
|
3465
3496
|
}
|
3466
3497
|
return options;
|
3467
3498
|
}
|
3468
|
-
const Picker = withInstall(stdin_default$
|
3469
|
-
const [name$
|
3470
|
-
const areaProps = extend({}, pickerSharedProps, {
|
3499
|
+
const Picker = withInstall(stdin_default$1u);
|
3500
|
+
const [name$1j, bem$1f] = createNamespace("area");
|
3501
|
+
const areaProps = extend({}, pick(pickerSharedProps, INHERIT_PROPS), {
|
3471
3502
|
modelValue: String,
|
3472
3503
|
columnsNum: makeNumericProp(3),
|
3473
3504
|
columnsPlaceholder: makeArrayProp(),
|
@@ -3476,8 +3507,8 @@ const areaProps = extend({}, pickerSharedProps, {
|
|
3476
3507
|
default: () => ({})
|
3477
3508
|
}
|
3478
3509
|
});
|
3479
|
-
var stdin_default$
|
3480
|
-
name: name$
|
3510
|
+
var stdin_default$1t = vue.defineComponent({
|
3511
|
+
name: name$1j,
|
3481
3512
|
props: areaProps,
|
3482
3513
|
emits: ["change", "confirm", "cancel", "update:modelValue"],
|
3483
3514
|
setup(props, {
|
@@ -3524,7 +3555,7 @@ var stdin_default$1s = vue.defineComponent({
|
|
3524
3555
|
"ref": picker,
|
3525
3556
|
"modelValue": codes.value,
|
3526
3557
|
"onUpdate:modelValue": ($event) => codes.value = $event,
|
3527
|
-
"class": bem$
|
3558
|
+
"class": bem$1f(),
|
3528
3559
|
"columns": columns.value,
|
3529
3560
|
"onChange": onChange,
|
3530
3561
|
"onCancel": onCancel,
|
@@ -3532,8 +3563,8 @@ var stdin_default$1s = vue.defineComponent({
|
|
3532
3563
|
}, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
|
3533
3564
|
}
|
3534
3565
|
});
|
3535
|
-
const Area = withInstall(stdin_default$
|
3536
|
-
const [name$
|
3566
|
+
const Area = withInstall(stdin_default$1t);
|
3567
|
+
const [name$1i, bem$1e] = createNamespace("cell");
|
3537
3568
|
const cellSharedProps = {
|
3538
3569
|
tag: makeStringProp("div"),
|
3539
3570
|
icon: String,
|
@@ -3557,8 +3588,8 @@ const cellSharedProps = {
|
|
3557
3588
|
}
|
3558
3589
|
};
|
3559
3590
|
const cellProps = extend({}, cellSharedProps, routeProps);
|
3560
|
-
var stdin_default$
|
3561
|
-
name: name$
|
3591
|
+
var stdin_default$1s = vue.defineComponent({
|
3592
|
+
name: name$1i,
|
3562
3593
|
props: cellProps,
|
3563
3594
|
setup(props, {
|
3564
3595
|
slots
|
@@ -3568,7 +3599,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3568
3599
|
const showLabel = slots.label || isDef(props.label);
|
3569
3600
|
if (showLabel) {
|
3570
3601
|
return vue.createVNode("div", {
|
3571
|
-
"class": [bem$
|
3602
|
+
"class": [bem$1e("label"), props.labelClass]
|
3572
3603
|
}, [slots.label ? slots.label() : props.label]);
|
3573
3604
|
}
|
3574
3605
|
};
|
@@ -3580,7 +3611,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3580
3611
|
return;
|
3581
3612
|
}
|
3582
3613
|
return vue.createVNode("div", {
|
3583
|
-
"class": [bem$
|
3614
|
+
"class": [bem$1e("title"), props.titleClass],
|
3584
3615
|
"style": props.titleStyle
|
3585
3616
|
}, [titleSlot || vue.createVNode("span", null, [props.title]), renderLabel()]);
|
3586
3617
|
}
|
@@ -3590,7 +3621,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3590
3621
|
const hasValue = slot || isDef(props.value);
|
3591
3622
|
if (hasValue) {
|
3592
3623
|
return vue.createVNode("div", {
|
3593
|
-
"class": [bem$
|
3624
|
+
"class": [bem$1e("value"), props.valueClass]
|
3594
3625
|
}, [slot ? slot() : vue.createVNode("span", null, [props.value])]);
|
3595
3626
|
}
|
3596
3627
|
};
|
@@ -3601,7 +3632,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3601
3632
|
if (props.icon) {
|
3602
3633
|
return vue.createVNode(Icon, {
|
3603
3634
|
"name": props.icon,
|
3604
|
-
"class": bem$
|
3635
|
+
"class": bem$1e("left-icon"),
|
3605
3636
|
"classPrefix": props.iconPrefix
|
3606
3637
|
}, null);
|
3607
3638
|
}
|
@@ -3614,7 +3645,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3614
3645
|
const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
|
3615
3646
|
return vue.createVNode(Icon, {
|
3616
3647
|
"name": name2,
|
3617
|
-
"class": bem$
|
3648
|
+
"class": bem$1e("right-icon")
|
3618
3649
|
}, null);
|
3619
3650
|
}
|
3620
3651
|
};
|
@@ -3639,7 +3670,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
3639
3670
|
classes[size] = !!size;
|
3640
3671
|
}
|
3641
3672
|
return vue.createVNode(tag, {
|
3642
|
-
"class": bem$
|
3673
|
+
"class": bem$1e(classes),
|
3643
3674
|
"role": clickable ? "button" : void 0,
|
3644
3675
|
"tabindex": clickable ? 0 : void 0,
|
3645
3676
|
"onClick": route2
|
@@ -3652,8 +3683,8 @@ var stdin_default$1r = vue.defineComponent({
|
|
3652
3683
|
};
|
3653
3684
|
}
|
3654
3685
|
});
|
3655
|
-
const Cell = withInstall(stdin_default$
|
3656
|
-
const [name$
|
3686
|
+
const Cell = withInstall(stdin_default$1s);
|
3687
|
+
const [name$1h, bem$1d] = createNamespace("form");
|
3657
3688
|
const formProps = {
|
3658
3689
|
colon: Boolean,
|
3659
3690
|
disabled: Boolean,
|
@@ -3672,8 +3703,8 @@ const formProps = {
|
|
3672
3703
|
default: "onBlur"
|
3673
3704
|
}
|
3674
3705
|
};
|
3675
|
-
var stdin_default$
|
3676
|
-
name: name$
|
3706
|
+
var stdin_default$1r = vue.defineComponent({
|
3707
|
+
name: name$1h,
|
3677
3708
|
props: formProps,
|
3678
3709
|
emits: ["submit", "failed"],
|
3679
3710
|
setup(props, {
|
@@ -3799,13 +3830,13 @@ var stdin_default$1q = vue.defineComponent({
|
|
3799
3830
|
return () => {
|
3800
3831
|
var _a;
|
3801
3832
|
return vue.createVNode("form", {
|
3802
|
-
"class": bem$
|
3833
|
+
"class": bem$1d(),
|
3803
3834
|
"onSubmit": onSubmit
|
3804
3835
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
3805
3836
|
};
|
3806
3837
|
}
|
3807
3838
|
});
|
3808
|
-
const Form = withInstall(stdin_default$
|
3839
|
+
const Form = withInstall(stdin_default$1r);
|
3809
3840
|
function isEmptyValue(value) {
|
3810
3841
|
if (Array.isArray(value)) {
|
3811
3842
|
return !value.length;
|
@@ -3894,7 +3925,7 @@ function getStringLength(str) {
|
|
3894
3925
|
function cutString(str, maxlength) {
|
3895
3926
|
return [...str].slice(0, maxlength).join("");
|
3896
3927
|
}
|
3897
|
-
const [name$
|
3928
|
+
const [name$1g, bem$1c] = createNamespace("field");
|
3898
3929
|
const fieldSharedProps = {
|
3899
3930
|
id: String,
|
3900
3931
|
name: String,
|
@@ -3941,8 +3972,8 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
3941
3972
|
default: null
|
3942
3973
|
}
|
3943
3974
|
});
|
3944
|
-
var stdin_default$
|
3945
|
-
name: name$
|
3975
|
+
var stdin_default$1q = vue.defineComponent({
|
3976
|
+
name: name$1g,
|
3946
3977
|
props: fieldProps,
|
3947
3978
|
emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
|
3948
3979
|
setup(props, {
|
@@ -4216,7 +4247,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4216
4247
|
const getInputId = () => props.id || `${id}-input`;
|
4217
4248
|
const getValidationStatus = () => state.status;
|
4218
4249
|
const renderInput = () => {
|
4219
|
-
const controlClass = bem$
|
4250
|
+
const controlClass = bem$1c("control", [getProp("inputAlign"), {
|
4220
4251
|
error: showError.value,
|
4221
4252
|
custom: !!slots.input,
|
4222
4253
|
"min-height": props.type === "textarea" && !props.autosize
|
@@ -4258,7 +4289,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4258
4289
|
const leftIconSlot = slots["left-icon"];
|
4259
4290
|
if (props.leftIcon || leftIconSlot) {
|
4260
4291
|
return vue.createVNode("div", {
|
4261
|
-
"class": bem$
|
4292
|
+
"class": bem$1c("left-icon"),
|
4262
4293
|
"onClick": onClickLeftIcon
|
4263
4294
|
}, [leftIconSlot ? leftIconSlot() : vue.createVNode(Icon, {
|
4264
4295
|
"name": props.leftIcon,
|
@@ -4270,7 +4301,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4270
4301
|
const rightIconSlot = slots["right-icon"];
|
4271
4302
|
if (props.rightIcon || rightIconSlot) {
|
4272
4303
|
return vue.createVNode("div", {
|
4273
|
-
"class": bem$
|
4304
|
+
"class": bem$1c("right-icon"),
|
4274
4305
|
"onClick": onClickRightIcon
|
4275
4306
|
}, [rightIconSlot ? rightIconSlot() : vue.createVNode(Icon, {
|
4276
4307
|
"name": props.rightIcon,
|
@@ -4282,9 +4313,9 @@ var stdin_default$1p = vue.defineComponent({
|
|
4282
4313
|
if (props.showWordLimit && props.maxlength) {
|
4283
4314
|
const count = getStringLength(getModelValue());
|
4284
4315
|
return vue.createVNode("div", {
|
4285
|
-
"class": bem$
|
4316
|
+
"class": bem$1c("word-limit")
|
4286
4317
|
}, [vue.createVNode("span", {
|
4287
|
-
"class": bem$
|
4318
|
+
"class": bem$1c("word-num")
|
4288
4319
|
}, [count]), vue.createTextVNode("/"), props.maxlength]);
|
4289
4320
|
}
|
4290
4321
|
};
|
@@ -4297,7 +4328,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4297
4328
|
const slot = slots["error-message"];
|
4298
4329
|
const errorMessageAlign = getProp("errorMessageAlign");
|
4299
4330
|
return vue.createVNode("div", {
|
4300
|
-
"class": bem$
|
4331
|
+
"class": bem$1c("error-message", errorMessageAlign)
|
4301
4332
|
}, [slot ? slot({
|
4302
4333
|
message
|
4303
4334
|
}) : message]);
|
@@ -4314,6 +4345,10 @@ var stdin_default$1p = vue.defineComponent({
|
|
4314
4345
|
return vue.createVNode("label", {
|
4315
4346
|
"id": `${id}-label`,
|
4316
4347
|
"for": getInputId(),
|
4348
|
+
"onClick": (event) => {
|
4349
|
+
preventDefault(event);
|
4350
|
+
focus();
|
4351
|
+
},
|
4317
4352
|
"style": labelAlign === "top" && labelWidth ? {
|
4318
4353
|
width: addUnit(labelWidth)
|
4319
4354
|
} : void 0
|
@@ -4321,13 +4356,13 @@ var stdin_default$1p = vue.defineComponent({
|
|
4321
4356
|
}
|
4322
4357
|
};
|
4323
4358
|
const renderFieldBody = () => [vue.createVNode("div", {
|
4324
|
-
"class": bem$
|
4359
|
+
"class": bem$1c("body")
|
4325
4360
|
}, [renderInput(), showClear.value && vue.createVNode(Icon, {
|
4326
4361
|
"ref": clearIconRef,
|
4327
4362
|
"name": props.clearIcon,
|
4328
|
-
"class": bem$
|
4363
|
+
"class": bem$1c("clear")
|
4329
4364
|
}, null), renderRightIcon(), slots.button && vue.createVNode("div", {
|
4330
|
-
"class": bem$
|
4365
|
+
"class": bem$1c("button")
|
4331
4366
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
4332
4367
|
useExpose({
|
4333
4368
|
blur,
|
@@ -4371,7 +4406,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4371
4406
|
};
|
4372
4407
|
return vue.createVNode(Cell, {
|
4373
4408
|
"size": props.size,
|
4374
|
-
"class": bem$
|
4409
|
+
"class": bem$1c({
|
4375
4410
|
error: showError.value,
|
4376
4411
|
disabled,
|
4377
4412
|
[`label-${labelAlign}`]: labelAlign
|
@@ -4381,8 +4416,8 @@ var stdin_default$1p = vue.defineComponent({
|
|
4381
4416
|
"isLink": props.isLink,
|
4382
4417
|
"clickable": props.clickable,
|
4383
4418
|
"titleStyle": labelStyle.value,
|
4384
|
-
"valueClass": bem$
|
4385
|
-
"titleClass": [bem$
|
4419
|
+
"valueClass": bem$1c("value"),
|
4420
|
+
"titleClass": [bem$1c("label", [labelAlign, {
|
4386
4421
|
required: props.required
|
4387
4422
|
}]), props.labelClass],
|
4388
4423
|
"arrowDirection": props.arrowDirection
|
@@ -4395,7 +4430,7 @@ var stdin_default$1p = vue.defineComponent({
|
|
4395
4430
|
};
|
4396
4431
|
}
|
4397
4432
|
});
|
4398
|
-
const Field = withInstall(stdin_default$
|
4433
|
+
const Field = withInstall(stdin_default$1q);
|
4399
4434
|
let lockCount = 0;
|
4400
4435
|
function lockClick(lock) {
|
4401
4436
|
if (lock) {
|
@@ -4410,7 +4445,7 @@ function lockClick(lock) {
|
|
4410
4445
|
}
|
4411
4446
|
}
|
4412
4447
|
}
|
4413
|
-
const [name$
|
4448
|
+
const [name$1f, bem$1b] = createNamespace("toast");
|
4414
4449
|
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
4415
4450
|
const toastProps = {
|
4416
4451
|
icon: String,
|
@@ -4433,8 +4468,8 @@ const toastProps = {
|
|
4433
4468
|
closeOnClick: Boolean,
|
4434
4469
|
closeOnClickOverlay: Boolean
|
4435
4470
|
};
|
4436
|
-
var stdin_default$
|
4437
|
-
name: name$
|
4471
|
+
var stdin_default$1p = vue.defineComponent({
|
4472
|
+
name: name$1f,
|
4438
4473
|
props: toastProps,
|
4439
4474
|
emits: ["update:show"],
|
4440
4475
|
setup(props, {
|
@@ -4470,13 +4505,13 @@ var stdin_default$1o = vue.defineComponent({
|
|
4470
4505
|
return vue.createVNode(Icon, {
|
4471
4506
|
"name": icon || type,
|
4472
4507
|
"size": iconSize,
|
4473
|
-
"class": bem$
|
4508
|
+
"class": bem$1b("icon"),
|
4474
4509
|
"classPrefix": iconPrefix
|
4475
4510
|
}, null);
|
4476
4511
|
}
|
4477
4512
|
if (type === "loading") {
|
4478
4513
|
return vue.createVNode(Loading, {
|
4479
|
-
"class": bem$
|
4514
|
+
"class": bem$1b("loading"),
|
4480
4515
|
"size": iconSize,
|
4481
4516
|
"type": loadingType
|
4482
4517
|
}, null);
|
@@ -4489,16 +4524,16 @@ var stdin_default$1o = vue.defineComponent({
|
|
4489
4524
|
} = props;
|
4490
4525
|
if (slots.message) {
|
4491
4526
|
return vue.createVNode("div", {
|
4492
|
-
"class": bem$
|
4527
|
+
"class": bem$1b("text")
|
4493
4528
|
}, [slots.message()]);
|
4494
4529
|
}
|
4495
4530
|
if (isDef(message) && message !== "") {
|
4496
4531
|
return type === "html" ? vue.createVNode("div", {
|
4497
4532
|
"key": 0,
|
4498
|
-
"class": bem$
|
4533
|
+
"class": bem$1b("text"),
|
4499
4534
|
"innerHTML": String(message)
|
4500
4535
|
}, null) : vue.createVNode("div", {
|
4501
|
-
"class": bem$
|
4536
|
+
"class": bem$1b("text")
|
4502
4537
|
}, [message]);
|
4503
4538
|
}
|
4504
4539
|
};
|
@@ -4514,7 +4549,7 @@ var stdin_default$1o = vue.defineComponent({
|
|
4514
4549
|
vue.onMounted(toggleClickable);
|
4515
4550
|
vue.onUnmounted(toggleClickable);
|
4516
4551
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
4517
|
-
"class": [bem$
|
4552
|
+
"class": [bem$1b([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
4518
4553
|
[props.type]: !props.icon
|
4519
4554
|
}]), props.className],
|
4520
4555
|
"lockScroll": false,
|
@@ -4615,7 +4650,7 @@ function createInstance() {
|
|
4615
4650
|
onClosed,
|
4616
4651
|
"onUpdate:show": toggle
|
4617
4652
|
};
|
4618
|
-
return vue.createVNode(stdin_default$
|
4653
|
+
return vue.createVNode(stdin_default$1p, vue.mergeProps(state, attrs), null);
|
4619
4654
|
};
|
4620
4655
|
vue.watch(message, (val) => {
|
4621
4656
|
state.message = val;
|
@@ -4685,8 +4720,8 @@ const resetToastDefaultOptions = (type) => {
|
|
4685
4720
|
const allowMultipleToast = (value = true) => {
|
4686
4721
|
allowMultiple = value;
|
4687
4722
|
};
|
4688
|
-
const Toast = withInstall(stdin_default$
|
4689
|
-
const [name$
|
4723
|
+
const Toast = withInstall(stdin_default$1p);
|
4724
|
+
const [name$1e, bem$1a] = createNamespace("switch");
|
4690
4725
|
const switchProps = {
|
4691
4726
|
size: numericProp,
|
4692
4727
|
loading: Boolean,
|
@@ -4703,8 +4738,8 @@ const switchProps = {
|
|
4703
4738
|
default: false
|
4704
4739
|
}
|
4705
4740
|
};
|
4706
|
-
var stdin_default$
|
4707
|
-
name: name$
|
4741
|
+
var stdin_default$1o = vue.defineComponent({
|
4742
|
+
name: name$1e,
|
4708
4743
|
props: switchProps,
|
4709
4744
|
emits: ["change", "update:modelValue"],
|
4710
4745
|
setup(props, {
|
@@ -4723,7 +4758,7 @@ var stdin_default$1n = vue.defineComponent({
|
|
4723
4758
|
if (props.loading) {
|
4724
4759
|
const color = isChecked() ? props.activeColor : props.inactiveColor;
|
4725
4760
|
return vue.createVNode(Loading, {
|
4726
|
-
"class": bem$
|
4761
|
+
"class": bem$1a("loading"),
|
4727
4762
|
"color": color
|
4728
4763
|
}, null);
|
4729
4764
|
}
|
@@ -4748,7 +4783,7 @@ var stdin_default$1n = vue.defineComponent({
|
|
4748
4783
|
};
|
4749
4784
|
return vue.createVNode("div", {
|
4750
4785
|
"role": "switch",
|
4751
|
-
"class": bem$
|
4786
|
+
"class": bem$1a({
|
4752
4787
|
on: checked,
|
4753
4788
|
loading,
|
4754
4789
|
disabled
|
@@ -4758,16 +4793,16 @@ var stdin_default$1n = vue.defineComponent({
|
|
4758
4793
|
"aria-checked": checked,
|
4759
4794
|
"onClick": onClick
|
4760
4795
|
}, [vue.createVNode("div", {
|
4761
|
-
"class": bem$
|
4796
|
+
"class": bem$1a("node")
|
4762
4797
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
4763
4798
|
};
|
4764
4799
|
}
|
4765
4800
|
});
|
4766
|
-
const Switch = withInstall(stdin_default$
|
4767
|
-
const [name$
|
4801
|
+
const Switch = withInstall(stdin_default$1o);
|
4802
|
+
const [name$1d, bem$19] = createNamespace("address-edit-detail");
|
4768
4803
|
const t$j = createNamespace("address-edit")[2];
|
4769
|
-
var stdin_default$
|
4770
|
-
name: name$
|
4804
|
+
var stdin_default$1n = vue.defineComponent({
|
4805
|
+
name: name$1d,
|
4771
4806
|
props: {
|
4772
4807
|
show: Boolean,
|
4773
4808
|
rows: numericProp,
|
@@ -4801,7 +4836,7 @@ var stdin_default$1m = vue.defineComponent({
|
|
4801
4836
|
"icon": "location-o",
|
4802
4837
|
"title": express.name,
|
4803
4838
|
"label": express.address,
|
4804
|
-
"class": bem$
|
4839
|
+
"class": bem$19("search-item"),
|
4805
4840
|
"border": false,
|
4806
4841
|
"onClick": () => onSelect(express)
|
4807
4842
|
}, null));
|
@@ -4815,7 +4850,7 @@ var stdin_default$1m = vue.defineComponent({
|
|
4815
4850
|
"autosize": true,
|
4816
4851
|
"clearable": true,
|
4817
4852
|
"ref": field,
|
4818
|
-
"class": bem$
|
4853
|
+
"class": bem$19(),
|
4819
4854
|
"rows": props.rows,
|
4820
4855
|
"type": "textarea",
|
4821
4856
|
"rules": props.rules,
|
@@ -4832,7 +4867,7 @@ var stdin_default$1m = vue.defineComponent({
|
|
4832
4867
|
};
|
4833
4868
|
}
|
4834
4869
|
});
|
4835
|
-
const [name$
|
4870
|
+
const [name$1c, bem$18, t$i] = createNamespace("address-edit");
|
4836
4871
|
const DEFAULT_DATA = {
|
4837
4872
|
name: "",
|
4838
4873
|
tel: "",
|
@@ -4872,8 +4907,8 @@ const addressEditProps = {
|
|
4872
4907
|
default: isMobile
|
4873
4908
|
}
|
4874
4909
|
};
|
4875
|
-
var stdin_default$
|
4876
|
-
name: name$
|
4910
|
+
var stdin_default$1m = vue.defineComponent({
|
4911
|
+
name: name$1c,
|
4877
4912
|
props: addressEditProps,
|
4878
4913
|
emits: ["save", "focus", "delete", "clickArea", "changeArea", "changeDetail", "selectSearch", "changeDefault"],
|
4879
4914
|
setup(props, {
|
@@ -4983,8 +5018,9 @@ var stdin_default$1l = vue.defineComponent({
|
|
4983
5018
|
};
|
4984
5019
|
return vue.withDirectives(vue.createVNode(Cell, {
|
4985
5020
|
"center": true,
|
5021
|
+
"border": false,
|
4986
5022
|
"title": t$i("defaultAddress"),
|
4987
|
-
"class": bem$
|
5023
|
+
"class": bem$18("default")
|
4988
5024
|
}, slots2), [[vue.vShow, !hideBottomFields.value]]);
|
4989
5025
|
}
|
4990
5026
|
};
|
@@ -5010,13 +5046,13 @@ var stdin_default$1l = vue.defineComponent({
|
|
5010
5046
|
disableArea
|
5011
5047
|
} = props;
|
5012
5048
|
return vue.createVNode(Form, {
|
5013
|
-
"class": bem$
|
5049
|
+
"class": bem$18(),
|
5014
5050
|
"onSubmit": onSave
|
5015
5051
|
}, {
|
5016
5052
|
default: () => {
|
5017
5053
|
var _a;
|
5018
5054
|
return [vue.createVNode("div", {
|
5019
|
-
"class": bem$
|
5055
|
+
"class": bem$18("fields")
|
5020
5056
|
}, [vue.createVNode(Field, {
|
5021
5057
|
"modelValue": data.name,
|
5022
5058
|
"onUpdate:modelValue": ($event) => data.name = $event,
|
@@ -5047,7 +5083,7 @@ var stdin_default$1l = vue.defineComponent({
|
|
5047
5083
|
emit("clickArea");
|
5048
5084
|
showAreaPopup.value = !disableArea;
|
5049
5085
|
}
|
5050
|
-
}, null), [[vue.vShow, props.showArea]]), vue.createVNode(stdin_default$
|
5086
|
+
}, null), [[vue.vShow, props.showArea]]), vue.createVNode(stdin_default$1n, {
|
5051
5087
|
"show": props.showDetail,
|
5052
5088
|
"rows": props.detailRows,
|
5053
5089
|
"rules": rules.value.addressDetail,
|
@@ -5061,19 +5097,19 @@ var stdin_default$1l = vue.defineComponent({
|
|
5061
5097
|
"onInput": onChangeDetail,
|
5062
5098
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
5063
5099
|
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
5064
|
-
"class": bem$
|
5100
|
+
"class": bem$18("buttons")
|
5065
5101
|
}, [vue.createVNode(Button, {
|
5066
5102
|
"block": true,
|
5067
5103
|
"round": true,
|
5068
5104
|
"type": "primary",
|
5069
5105
|
"text": props.saveButtonText || t$i("save"),
|
5070
|
-
"class": bem$
|
5106
|
+
"class": bem$18("button"),
|
5071
5107
|
"loading": props.isSaving,
|
5072
5108
|
"nativeType": "submit"
|
5073
5109
|
}, null), props.showDelete && vue.createVNode(Button, {
|
5074
5110
|
"block": true,
|
5075
5111
|
"round": true,
|
5076
|
-
"class": bem$
|
5112
|
+
"class": bem$18("button"),
|
5077
5113
|
"loading": props.isDeleting,
|
5078
5114
|
"text": props.deleteButtonText || t$i("delete"),
|
5079
5115
|
"onClick": onDelete
|
@@ -5103,8 +5139,8 @@ var stdin_default$1l = vue.defineComponent({
|
|
5103
5139
|
};
|
5104
5140
|
}
|
5105
5141
|
});
|
5106
|
-
const AddressEdit = withInstall(stdin_default$
|
5107
|
-
const [name$
|
5142
|
+
const AddressEdit = withInstall(stdin_default$1m);
|
5143
|
+
const [name$1b, bem$17] = createNamespace("radio-group");
|
5108
5144
|
const radioGroupProps = {
|
5109
5145
|
disabled: Boolean,
|
5110
5146
|
iconSize: numericProp,
|
@@ -5112,9 +5148,9 @@ const radioGroupProps = {
|
|
5112
5148
|
modelValue: unknownProp,
|
5113
5149
|
checkedColor: String
|
5114
5150
|
};
|
5115
|
-
const RADIO_KEY = Symbol(name$
|
5116
|
-
var stdin_default$
|
5117
|
-
name: name$
|
5151
|
+
const RADIO_KEY = Symbol(name$1b);
|
5152
|
+
var stdin_default$1l = vue.defineComponent({
|
5153
|
+
name: name$1b,
|
5118
5154
|
props: radioGroupProps,
|
5119
5155
|
emits: ["change", "update:modelValue"],
|
5120
5156
|
setup(props, {
|
@@ -5134,14 +5170,14 @@ var stdin_default$1k = vue.defineComponent({
|
|
5134
5170
|
return () => {
|
5135
5171
|
var _a;
|
5136
5172
|
return vue.createVNode("div", {
|
5137
|
-
"class": bem$
|
5173
|
+
"class": bem$17([props.direction]),
|
5138
5174
|
"role": "radiogroup"
|
5139
5175
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5140
5176
|
};
|
5141
5177
|
}
|
5142
5178
|
});
|
5143
|
-
const RadioGroup = withInstall(stdin_default$
|
5144
|
-
const [name$
|
5179
|
+
const RadioGroup = withInstall(stdin_default$1l);
|
5180
|
+
const [name$1a, bem$16] = createNamespace("tag");
|
5145
5181
|
const tagProps = {
|
5146
5182
|
size: String,
|
5147
5183
|
mark: Boolean,
|
@@ -5153,8 +5189,8 @@ const tagProps = {
|
|
5153
5189
|
textColor: String,
|
5154
5190
|
closeable: Boolean
|
5155
5191
|
};
|
5156
|
-
var stdin_default$
|
5157
|
-
name: name$
|
5192
|
+
var stdin_default$1k = vue.defineComponent({
|
5193
|
+
name: name$1a,
|
5158
5194
|
props: tagProps,
|
5159
5195
|
emits: ["close"],
|
5160
5196
|
setup(props, {
|
@@ -5197,12 +5233,12 @@ var stdin_default$1j = vue.defineComponent({
|
|
5197
5233
|
}
|
5198
5234
|
const CloseIcon = closeable && vue.createVNode(Icon, {
|
5199
5235
|
"name": "cross",
|
5200
|
-
"class": [bem$
|
5236
|
+
"class": [bem$16("close"), HAPTICS_FEEDBACK],
|
5201
5237
|
"onClick": onClose
|
5202
5238
|
}, null);
|
5203
5239
|
return vue.createVNode("span", {
|
5204
5240
|
"style": getStyle(),
|
5205
|
-
"class": bem$
|
5241
|
+
"class": bem$16([classes, type])
|
5206
5242
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
|
5207
5243
|
};
|
5208
5244
|
return () => vue.createVNode(vue.Transition, {
|
@@ -5212,7 +5248,7 @@ var stdin_default$1j = vue.defineComponent({
|
|
5212
5248
|
});
|
5213
5249
|
}
|
5214
5250
|
});
|
5215
|
-
const Tag = withInstall(stdin_default$
|
5251
|
+
const Tag = withInstall(stdin_default$1k);
|
5216
5252
|
const checkerProps = {
|
5217
5253
|
name: unknownProp,
|
5218
5254
|
shape: makeStringProp("round"),
|
@@ -5223,7 +5259,7 @@ const checkerProps = {
|
|
5223
5259
|
labelPosition: String,
|
5224
5260
|
labelDisabled: Boolean
|
5225
5261
|
};
|
5226
|
-
var stdin_default$
|
5262
|
+
var stdin_default$1j = vue.defineComponent({
|
5227
5263
|
props: extend({}, checkerProps, {
|
5228
5264
|
bem: makeRequiredProp(Function),
|
5229
5265
|
role: String,
|
@@ -5242,7 +5278,19 @@ var stdin_default$1i = vue.defineComponent({
|
|
5242
5278
|
return props.parent.props[name2];
|
5243
5279
|
}
|
5244
5280
|
};
|
5245
|
-
const disabled = vue.computed(() =>
|
5281
|
+
const disabled = vue.computed(() => {
|
5282
|
+
if (props.parent && props.bindGroup) {
|
5283
|
+
const disabled2 = getParentProp("disabled") || props.disabled;
|
5284
|
+
if (props.role === "checkbox") {
|
5285
|
+
const checkedCount = getParentProp("modelValue").length;
|
5286
|
+
const max = getParentProp("max");
|
5287
|
+
const overlimit = max && checkedCount >= +max;
|
5288
|
+
return disabled2 || overlimit && !props.checked;
|
5289
|
+
}
|
5290
|
+
return disabled2;
|
5291
|
+
}
|
5292
|
+
return props.disabled;
|
5293
|
+
});
|
5246
5294
|
const direction = vue.computed(() => getParentProp("direction"));
|
5247
5295
|
const iconStyle = vue.computed(() => {
|
5248
5296
|
const checkedColor = props.checkedColor || getParentProp("checkedColor");
|
@@ -5313,9 +5361,9 @@ var stdin_default$1i = vue.defineComponent({
|
|
5313
5361
|
}
|
5314
5362
|
});
|
5315
5363
|
const radioProps = checkerProps;
|
5316
|
-
const [name$
|
5317
|
-
var stdin_default$
|
5318
|
-
name: name$
|
5364
|
+
const [name$19, bem$15] = createNamespace("radio");
|
5365
|
+
var stdin_default$1i = vue.defineComponent({
|
5366
|
+
name: name$19,
|
5319
5367
|
props: checkerProps,
|
5320
5368
|
emits: ["update:modelValue"],
|
5321
5369
|
setup(props, {
|
@@ -5336,8 +5384,8 @@ var stdin_default$1h = vue.defineComponent({
|
|
5336
5384
|
emit("update:modelValue", props.name);
|
5337
5385
|
}
|
5338
5386
|
};
|
5339
|
-
return () => vue.createVNode(stdin_default$
|
5340
|
-
"bem": bem$
|
5387
|
+
return () => vue.createVNode(stdin_default$1j, vue.mergeProps({
|
5388
|
+
"bem": bem$15,
|
5341
5389
|
"role": "radio",
|
5342
5390
|
"parent": parent,
|
5343
5391
|
"checked": checked(),
|
@@ -5345,10 +5393,10 @@ var stdin_default$1h = vue.defineComponent({
|
|
5345
5393
|
}, props), pick(slots, ["default", "icon"]));
|
5346
5394
|
}
|
5347
5395
|
});
|
5348
|
-
const Radio = withInstall(stdin_default$
|
5349
|
-
const [name$
|
5350
|
-
var stdin_default$
|
5351
|
-
name: name$
|
5396
|
+
const Radio = withInstall(stdin_default$1i);
|
5397
|
+
const [name$18, bem$14] = createNamespace("address-item");
|
5398
|
+
var stdin_default$1h = vue.defineComponent({
|
5399
|
+
name: name$18,
|
5352
5400
|
props: {
|
5353
5401
|
address: makeRequiredProp(Object),
|
5354
5402
|
disabled: Boolean,
|
@@ -5368,7 +5416,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
5368
5416
|
};
|
5369
5417
|
const renderRightIcon = () => vue.createVNode(Icon, {
|
5370
5418
|
"name": "edit",
|
5371
|
-
"class": bem$
|
5419
|
+
"class": bem$14("edit"),
|
5372
5420
|
"onClick": (event) => {
|
5373
5421
|
event.stopPropagation();
|
5374
5422
|
emit("edit");
|
@@ -5383,7 +5431,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
5383
5431
|
return vue.createVNode(Tag, {
|
5384
5432
|
"type": "primary",
|
5385
5433
|
"round": true,
|
5386
|
-
"class": bem$
|
5434
|
+
"class": bem$14("tag")
|
5387
5435
|
}, {
|
5388
5436
|
default: () => [props.defaultTagText]
|
5389
5437
|
});
|
@@ -5396,9 +5444,9 @@ var stdin_default$1g = vue.defineComponent({
|
|
5396
5444
|
switchable
|
5397
5445
|
} = props;
|
5398
5446
|
const Info = [vue.createVNode("div", {
|
5399
|
-
"class": bem$
|
5447
|
+
"class": bem$14("name")
|
5400
5448
|
}, [`${address.name} ${address.tel}`, renderTag()]), vue.createVNode("div", {
|
5401
|
-
"class": bem$
|
5449
|
+
"class": bem$14("address")
|
5402
5450
|
}, [address.address])];
|
5403
5451
|
if (switchable && !disabled) {
|
5404
5452
|
return vue.createVNode(Radio, {
|
@@ -5416,13 +5464,13 @@ var stdin_default$1g = vue.defineComponent({
|
|
5416
5464
|
disabled
|
5417
5465
|
} = props;
|
5418
5466
|
return vue.createVNode("div", {
|
5419
|
-
"class": bem$
|
5467
|
+
"class": bem$14({
|
5420
5468
|
disabled
|
5421
5469
|
}),
|
5422
5470
|
"onClick": onClick
|
5423
5471
|
}, [vue.createVNode(Cell, {
|
5424
5472
|
"border": false,
|
5425
|
-
"titleClass": bem$
|
5473
|
+
"titleClass": bem$14("title")
|
5426
5474
|
}, {
|
5427
5475
|
title: renderContent,
|
5428
5476
|
"right-icon": renderRightIcon
|
@@ -5432,7 +5480,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
5432
5480
|
};
|
5433
5481
|
}
|
5434
5482
|
});
|
5435
|
-
const [name$
|
5483
|
+
const [name$17, bem$13, t$h] = createNamespace("address-list");
|
5436
5484
|
const addressListProps = {
|
5437
5485
|
list: makeArrayProp(),
|
5438
5486
|
modelValue: numericProp,
|
@@ -5442,8 +5490,8 @@ const addressListProps = {
|
|
5442
5490
|
addButtonText: String,
|
5443
5491
|
defaultTagText: String
|
5444
5492
|
};
|
5445
|
-
var stdin_default$
|
5446
|
-
name: name$
|
5493
|
+
var stdin_default$1g = vue.defineComponent({
|
5494
|
+
name: name$17,
|
5447
5495
|
props: addressListProps,
|
5448
5496
|
emits: ["add", "edit", "select", "clickItem", "editDisabled", "selectDisabled", "update:modelValue"],
|
5449
5497
|
setup(props, {
|
@@ -5459,7 +5507,7 @@ var stdin_default$1f = vue.defineComponent({
|
|
5459
5507
|
emit("update:modelValue", item.id);
|
5460
5508
|
}
|
5461
5509
|
};
|
5462
|
-
return vue.createVNode(stdin_default$
|
5510
|
+
return vue.createVNode(stdin_default$1h, {
|
5463
5511
|
"key": item.id,
|
5464
5512
|
"address": item,
|
5465
5513
|
"disabled": disabled,
|
@@ -5479,13 +5527,13 @@ var stdin_default$1f = vue.defineComponent({
|
|
5479
5527
|
}
|
5480
5528
|
};
|
5481
5529
|
const renderBottom = () => vue.createVNode("div", {
|
5482
|
-
"class": [bem$
|
5530
|
+
"class": [bem$13("bottom"), "van-safe-area-bottom"]
|
5483
5531
|
}, [vue.createVNode(Button, {
|
5484
5532
|
"round": true,
|
5485
5533
|
"block": true,
|
5486
5534
|
"type": "primary",
|
5487
5535
|
"text": props.addButtonText || t$h("add"),
|
5488
|
-
"class": bem$
|
5536
|
+
"class": bem$13("add"),
|
5489
5537
|
"onClick": () => emit("add")
|
5490
5538
|
}, null)]);
|
5491
5539
|
return () => {
|
@@ -5493,10 +5541,10 @@ var stdin_default$1f = vue.defineComponent({
|
|
5493
5541
|
const List2 = renderList(props.list);
|
5494
5542
|
const DisabledList = renderList(props.disabledList, true);
|
5495
5543
|
const DisabledText = props.disabledText && vue.createVNode("div", {
|
5496
|
-
"class": bem$
|
5544
|
+
"class": bem$13("disabled-text")
|
5497
5545
|
}, [props.disabledText]);
|
5498
5546
|
return vue.createVNode("div", {
|
5499
|
-
"class": bem$
|
5547
|
+
"class": bem$13()
|
5500
5548
|
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), vue.createVNode(RadioGroup, {
|
5501
5549
|
"modelValue": props.modelValue
|
5502
5550
|
}, {
|
@@ -5505,7 +5553,7 @@ var stdin_default$1f = vue.defineComponent({
|
|
5505
5553
|
};
|
5506
5554
|
}
|
5507
5555
|
});
|
5508
|
-
const AddressList = withInstall(stdin_default$
|
5556
|
+
const AddressList = withInstall(stdin_default$1g);
|
5509
5557
|
const hasIntersectionObserver = use.inBrowser && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
5510
5558
|
const modeType = {
|
5511
5559
|
event: "event",
|
@@ -5658,7 +5706,7 @@ class ImageCache {
|
|
5658
5706
|
this.caches.shift();
|
5659
5707
|
}
|
5660
5708
|
}
|
5661
|
-
const [name$
|
5709
|
+
const [name$16, bem$12] = createNamespace("back-top");
|
5662
5710
|
const backTopProps = {
|
5663
5711
|
right: numericProp,
|
5664
5712
|
bottom: numericProp,
|
@@ -5671,8 +5719,8 @@ const backTopProps = {
|
|
5671
5719
|
default: "body"
|
5672
5720
|
}
|
5673
5721
|
};
|
5674
|
-
var stdin_default$
|
5675
|
-
name: name$
|
5722
|
+
var stdin_default$1f = vue.defineComponent({
|
5723
|
+
name: name$16,
|
5676
5724
|
inheritAttrs: false,
|
5677
5725
|
props: backTopProps,
|
5678
5726
|
emits: ["click"],
|
@@ -5730,28 +5778,158 @@ var stdin_default$1e = vue.defineComponent({
|
|
5730
5778
|
vue.watch(() => props.target, updateTarget);
|
5731
5779
|
return () => {
|
5732
5780
|
const Content = vue.createVNode("div", vue.mergeProps({
|
5733
|
-
"ref": root,
|
5734
|
-
"class": bem$
|
5781
|
+
"ref": !props.teleport ? root : void 0,
|
5782
|
+
"class": bem$12({
|
5735
5783
|
active: show.value
|
5736
5784
|
}),
|
5737
5785
|
"style": style.value,
|
5738
5786
|
"onClick": onClick
|
5739
5787
|
}, attrs), [slots.default ? slots.default() : vue.createVNode(Icon, {
|
5740
5788
|
"name": "back-top",
|
5741
|
-
"class": bem$
|
5789
|
+
"class": bem$12("icon")
|
5742
5790
|
}, null)]);
|
5743
5791
|
if (props.teleport) {
|
5744
|
-
return vue.createVNode(
|
5792
|
+
return [vue.createVNode("div", {
|
5793
|
+
"ref": root,
|
5794
|
+
"class": bem$12("placeholder")
|
5795
|
+
}, null), vue.createVNode(vue.Teleport, {
|
5745
5796
|
"to": props.teleport
|
5746
5797
|
}, {
|
5747
5798
|
default: () => [Content]
|
5748
|
-
});
|
5799
|
+
})];
|
5749
5800
|
}
|
5750
5801
|
return Content;
|
5751
5802
|
};
|
5752
5803
|
}
|
5753
5804
|
});
|
5754
|
-
const BackTop = withInstall(stdin_default$
|
5805
|
+
const BackTop = withInstall(stdin_default$1f);
|
5806
|
+
var __async = (__this, __arguments, generator) => {
|
5807
|
+
return new Promise((resolve, reject) => {
|
5808
|
+
var fulfilled = (value) => {
|
5809
|
+
try {
|
5810
|
+
step(generator.next(value));
|
5811
|
+
} catch (e) {
|
5812
|
+
reject(e);
|
5813
|
+
}
|
5814
|
+
};
|
5815
|
+
var rejected = (value) => {
|
5816
|
+
try {
|
5817
|
+
step(generator.throw(value));
|
5818
|
+
} catch (e) {
|
5819
|
+
reject(e);
|
5820
|
+
}
|
5821
|
+
};
|
5822
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
5823
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
5824
|
+
});
|
5825
|
+
};
|
5826
|
+
const barrageProps = {
|
5827
|
+
top: makeNumericProp(10),
|
5828
|
+
rows: makeNumericProp(4),
|
5829
|
+
duration: makeNumericProp(4e3),
|
5830
|
+
autoPlay: truthProp,
|
5831
|
+
delay: makeNumberProp(300),
|
5832
|
+
modelValue: makeArrayProp()
|
5833
|
+
};
|
5834
|
+
const [name$15, bem$11] = createNamespace("barrage");
|
5835
|
+
var stdin_default$1e = vue.defineComponent({
|
5836
|
+
name: name$15,
|
5837
|
+
props: barrageProps,
|
5838
|
+
emits: ["update:modelValue"],
|
5839
|
+
setup(props, {
|
5840
|
+
emit,
|
5841
|
+
slots
|
5842
|
+
}) {
|
5843
|
+
const barrageWrapper = vue.ref();
|
5844
|
+
const className = bem$11("item");
|
5845
|
+
const total = vue.ref(0);
|
5846
|
+
const barrageItems = [];
|
5847
|
+
const createBarrageItem = (text, delay = props.delay) => {
|
5848
|
+
const item = document.createElement("span");
|
5849
|
+
item.className = className;
|
5850
|
+
item.innerText = String(text);
|
5851
|
+
item.style.animationDuration = `${props.duration}ms`;
|
5852
|
+
item.style.animationDelay = `${delay}ms`;
|
5853
|
+
item.style.animationName = "van-barrage";
|
5854
|
+
item.style.animationTimingFunction = "linear";
|
5855
|
+
return item;
|
5856
|
+
};
|
5857
|
+
const isInitBarrage = vue.ref(true);
|
5858
|
+
const isPlay = vue.ref(props.autoPlay);
|
5859
|
+
const appendBarrageItem = ({
|
5860
|
+
id,
|
5861
|
+
text
|
5862
|
+
}, i) => {
|
5863
|
+
var _a;
|
5864
|
+
const item = createBarrageItem(text, isInitBarrage.value ? i * props.delay : void 0);
|
5865
|
+
if (!props.autoPlay && isPlay.value === false) {
|
5866
|
+
item.style.animationPlayState = "paused";
|
5867
|
+
}
|
5868
|
+
(_a = barrageWrapper.value) == null ? void 0 : _a.append(item);
|
5869
|
+
total.value++;
|
5870
|
+
const top = (total.value - 1) % +props.rows * item.offsetHeight + +props.top;
|
5871
|
+
item.style.top = `${top}px`;
|
5872
|
+
item.dataset.id = String(id);
|
5873
|
+
barrageItems.push(item);
|
5874
|
+
item.addEventListener("animationend", () => {
|
5875
|
+
emit("update:modelValue", [...props.modelValue].filter((v) => String(v.id) !== item.dataset.id));
|
5876
|
+
});
|
5877
|
+
};
|
5878
|
+
const updateBarrages = (newValue, oldValue) => {
|
5879
|
+
const map = new Map(oldValue.map((item) => [item.id, item]));
|
5880
|
+
newValue.forEach((item, i) => {
|
5881
|
+
if (map.has(item.id)) {
|
5882
|
+
map.delete(item.id);
|
5883
|
+
} else {
|
5884
|
+
appendBarrageItem(item, i);
|
5885
|
+
}
|
5886
|
+
});
|
5887
|
+
map.forEach((item) => {
|
5888
|
+
const index = barrageItems.findIndex((span) => span.dataset.id === String(item.id));
|
5889
|
+
if (index > -1) {
|
5890
|
+
barrageItems[index].remove();
|
5891
|
+
barrageItems.splice(index, 1);
|
5892
|
+
}
|
5893
|
+
});
|
5894
|
+
isInitBarrage.value = false;
|
5895
|
+
};
|
5896
|
+
vue.watch(() => props.modelValue.slice(), (newValue, oldValue) => updateBarrages(newValue != null ? newValue : [], oldValue != null ? oldValue : []), {
|
5897
|
+
deep: true
|
5898
|
+
});
|
5899
|
+
const rootStyle = vue.ref({});
|
5900
|
+
vue.onMounted(() => __async(this, null, function* () {
|
5901
|
+
var _a;
|
5902
|
+
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
5903
|
+
yield vue.nextTick();
|
5904
|
+
updateBarrages(props.modelValue, []);
|
5905
|
+
}));
|
5906
|
+
const play = () => {
|
5907
|
+
isPlay.value = true;
|
5908
|
+
barrageItems.forEach((item) => {
|
5909
|
+
item.style.animationPlayState = "running";
|
5910
|
+
});
|
5911
|
+
};
|
5912
|
+
const pause = () => {
|
5913
|
+
isPlay.value = false;
|
5914
|
+
barrageItems.forEach((item) => {
|
5915
|
+
item.style.animationPlayState = "paused";
|
5916
|
+
});
|
5917
|
+
};
|
5918
|
+
useExpose({
|
5919
|
+
play,
|
5920
|
+
pause
|
5921
|
+
});
|
5922
|
+
return () => {
|
5923
|
+
var _a;
|
5924
|
+
return vue.createVNode("div", {
|
5925
|
+
"class": bem$11(),
|
5926
|
+
"ref": barrageWrapper,
|
5927
|
+
"style": rootStyle.value
|
5928
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5929
|
+
};
|
5930
|
+
}
|
5931
|
+
});
|
5932
|
+
const Barrage = withInstall(stdin_default$1e);
|
5755
5933
|
const [name$14, bem$10, t$g] = createNamespace("calendar");
|
5756
5934
|
const formatMonthTitle = (date) => t$g("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
5757
5935
|
function compareMonth(date1, date2) {
|
@@ -6913,6 +7091,7 @@ var stdin_default$17 = vue.defineComponent({
|
|
6913
7091
|
}) {
|
6914
7092
|
const tabs = vue.ref([]);
|
6915
7093
|
const activeTab = vue.ref(0);
|
7094
|
+
const [selectedElementRefs, setSelectedElementRefs] = useRefs();
|
6916
7095
|
const {
|
6917
7096
|
text: textKey,
|
6918
7097
|
value: valueKey,
|
@@ -7031,6 +7210,7 @@ var stdin_default$17 = vue.defineComponent({
|
|
7031
7210
|
selected
|
7032
7211
|
}) : vue.createVNode("span", null, [option[textKey]]);
|
7033
7212
|
return vue.createVNode("li", {
|
7213
|
+
"ref": selected ? setSelectedElementRefs(tabIndex) : void 0,
|
7034
7214
|
"role": "menuitemradio",
|
7035
7215
|
"class": [bem$Z("option", {
|
7036
7216
|
selected,
|
@@ -7087,7 +7267,18 @@ var stdin_default$17 = vue.defineComponent({
|
|
7087
7267
|
}, {
|
7088
7268
|
default: () => [tabs.value.map(renderTab)]
|
7089
7269
|
});
|
7270
|
+
const scrollIntoView = (el) => {
|
7271
|
+
const scrollParent = el.parentElement;
|
7272
|
+
if (scrollParent) {
|
7273
|
+
scrollParent.scrollTop = el.offsetTop - (scrollParent.offsetHeight - el.offsetHeight) / 2;
|
7274
|
+
}
|
7275
|
+
};
|
7090
7276
|
updateTabs();
|
7277
|
+
vue.watch(activeTab, (value) => {
|
7278
|
+
const el = selectedElementRefs.value[value];
|
7279
|
+
if (el)
|
7280
|
+
scrollIntoView(el);
|
7281
|
+
});
|
7091
7282
|
vue.watch(() => props.options, updateTabs, {
|
7092
7283
|
deep: true
|
7093
7284
|
});
|
@@ -7271,7 +7462,7 @@ var stdin_default$14 = vue.defineComponent({
|
|
7271
7462
|
checked
|
7272
7463
|
});
|
7273
7464
|
use.useCustomFieldValue(() => props.modelValue);
|
7274
|
-
return () => vue.createVNode(stdin_default$
|
7465
|
+
return () => vue.createVNode(stdin_default$1j, vue.mergeProps({
|
7275
7466
|
"bem": bem$W,
|
7276
7467
|
"role": "checkbox",
|
7277
7468
|
"parent": parent,
|
@@ -7792,7 +7983,7 @@ var stdin_default$$ = vue.defineComponent({
|
|
7792
7983
|
}
|
7793
7984
|
});
|
7794
7985
|
const CollapseItem = withInstall(stdin_default$$);
|
7795
|
-
const ConfigProvider = withInstall(stdin_default$
|
7986
|
+
const ConfigProvider = withInstall(stdin_default$1M);
|
7796
7987
|
const [name$R, bem$Q, t$e] = createNamespace("contact-card");
|
7797
7988
|
const contactCardProps = {
|
7798
7989
|
tel: String,
|
@@ -7957,7 +8148,7 @@ var stdin_default$Y = vue.defineComponent({
|
|
7957
8148
|
const renderRightIcon = () => vue.createVNode(Radio, {
|
7958
8149
|
"class": bem$O("radio"),
|
7959
8150
|
"name": item.id,
|
7960
|
-
"iconSize":
|
8151
|
+
"iconSize": 18
|
7961
8152
|
}, null);
|
7962
8153
|
const renderEditIcon = () => vue.createVNode(Icon, {
|
7963
8154
|
"name": "edit",
|
@@ -8741,6 +8932,7 @@ var stdin_default$S = vue.defineComponent({
|
|
8741
8932
|
slots
|
8742
8933
|
}) {
|
8743
8934
|
const currentValues = vue.ref(props.modelValue);
|
8935
|
+
const updatedByExternalSources = vue.ref(false);
|
8744
8936
|
const genYearOptions = () => {
|
8745
8937
|
const minYear = props.minDate.getFullYear();
|
8746
8938
|
const maxYear = props.maxDate.getFullYear();
|
@@ -8756,7 +8948,7 @@ var stdin_default$S = vue.defineComponent({
|
|
8756
8948
|
columnsType
|
8757
8949
|
} = props;
|
8758
8950
|
const index = columnsType.indexOf(type);
|
8759
|
-
const value = currentValues.value[index];
|
8951
|
+
const value = updatedByExternalSources.value ? props.modelValue[index] : currentValues.value[index];
|
8760
8952
|
if (value) {
|
8761
8953
|
return +value;
|
8762
8954
|
}
|
@@ -8802,11 +8994,13 @@ var stdin_default$S = vue.defineComponent({
|
|
8802
8994
|
emit("update:modelValue", newValues);
|
8803
8995
|
}
|
8804
8996
|
});
|
8805
|
-
vue.watch(() => props.modelValue, (newValues) => {
|
8997
|
+
vue.watch(() => props.modelValue, (newValues, oldValues) => {
|
8998
|
+
updatedByExternalSources.value = isSameValue(oldValues, currentValues.value);
|
8806
8999
|
newValues = formatValueRange(newValues, columns.value);
|
8807
9000
|
if (!isSameValue(newValues, currentValues.value)) {
|
8808
9001
|
currentValues.value = newValues;
|
8809
9002
|
}
|
9003
|
+
updatedByExternalSources.value = false;
|
8810
9004
|
}, {
|
8811
9005
|
immediate: true
|
8812
9006
|
});
|
@@ -9109,6 +9303,7 @@ const [name$H, bem$H] = createNamespace("divider");
|
|
9109
9303
|
const dividerProps = {
|
9110
9304
|
dashed: Boolean,
|
9111
9305
|
hairline: truthProp,
|
9306
|
+
vertical: Boolean,
|
9112
9307
|
contentPosition: makeStringProp("center")
|
9113
9308
|
};
|
9114
9309
|
var stdin_default$Q = vue.defineComponent({
|
@@ -9124,9 +9319,10 @@ var stdin_default$Q = vue.defineComponent({
|
|
9124
9319
|
"class": bem$H({
|
9125
9320
|
dashed: props.dashed,
|
9126
9321
|
hairline: props.hairline,
|
9127
|
-
|
9322
|
+
vertical: props.vertical,
|
9323
|
+
[`content-${props.contentPosition}`]: !!slots.default && !props.vertical
|
9128
9324
|
})
|
9129
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9325
|
+
}, [!props.vertical && ((_a = slots.default) == null ? void 0 : _a.call(slots))]);
|
9130
9326
|
};
|
9131
9327
|
}
|
9132
9328
|
});
|
@@ -9606,7 +9802,12 @@ var stdin_default$M = vue.defineComponent({
|
|
9606
9802
|
});
|
9607
9803
|
const GridItem = withInstall(stdin_default$M);
|
9608
9804
|
const getDistance = (touches) => Math.sqrt((touches[0].clientX - touches[1].clientX) ** 2 + (touches[0].clientY - touches[1].clientY) ** 2);
|
9805
|
+
const getCenter = (touches) => ({
|
9806
|
+
x: (touches[0].clientX + touches[1].clientX) / 2,
|
9807
|
+
y: (touches[0].clientY + touches[1].clientY) / 2
|
9808
|
+
});
|
9609
9809
|
const bem$C = createNamespace("image-preview")[1];
|
9810
|
+
const longImageRatio = 2.6;
|
9610
9811
|
var stdin_default$L = vue.defineComponent({
|
9611
9812
|
props: {
|
9612
9813
|
src: String,
|
@@ -9629,20 +9830,14 @@ var stdin_default$L = vue.defineComponent({
|
|
9629
9830
|
moveY: 0,
|
9630
9831
|
moving: false,
|
9631
9832
|
zooming: false,
|
9632
|
-
imageRatio: 0
|
9633
|
-
displayWidth: 0,
|
9634
|
-
displayHeight: 0
|
9833
|
+
imageRatio: 0
|
9635
9834
|
});
|
9636
9835
|
const touch = useTouch();
|
9836
|
+
const imageRef = vue.ref();
|
9637
9837
|
const swipeItem = vue.ref();
|
9638
|
-
const vertical = vue.
|
9639
|
-
|
9640
|
-
|
9641
|
-
rootHeight
|
9642
|
-
} = props;
|
9643
|
-
const rootRatio = rootHeight / rootWidth;
|
9644
|
-
return state.imageRatio > rootRatio;
|
9645
|
-
});
|
9838
|
+
const vertical = vue.ref(false);
|
9839
|
+
const isLongImage = vue.ref(false);
|
9840
|
+
let initialMoveY = 0;
|
9646
9841
|
const imageStyle = vue.computed(() => {
|
9647
9842
|
const {
|
9648
9843
|
scale,
|
@@ -9654,10 +9849,8 @@ var stdin_default$L = vue.defineComponent({
|
|
9654
9849
|
const style = {
|
9655
9850
|
transitionDuration: zooming || moving ? "0s" : ".3s"
|
9656
9851
|
};
|
9657
|
-
if (scale !== 1) {
|
9658
|
-
|
9659
|
-
const offsetY = moveY / scale;
|
9660
|
-
style.transform = `scale(${scale}, ${scale}) translate(${offsetX}px, ${offsetY}px)`;
|
9852
|
+
if (scale !== 1 || isLongImage.value) {
|
9853
|
+
style.transform = `matrix(${scale}, 0, 0, ${scale}, ${moveX}, ${moveY})`;
|
9661
9854
|
}
|
9662
9855
|
return style;
|
9663
9856
|
});
|
@@ -9683,10 +9876,26 @@ var stdin_default$L = vue.defineComponent({
|
|
9683
9876
|
}
|
9684
9877
|
return 0;
|
9685
9878
|
});
|
9686
|
-
const setScale = (scale) => {
|
9879
|
+
const setScale = (scale, center) => {
|
9880
|
+
var _a;
|
9687
9881
|
scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
|
9688
9882
|
if (scale !== state.scale) {
|
9883
|
+
const ratio = scale / state.scale;
|
9689
9884
|
state.scale = scale;
|
9885
|
+
if (center) {
|
9886
|
+
const imageRect = use.useRect((_a = imageRef.value) == null ? void 0 : _a.$el);
|
9887
|
+
const origin = {
|
9888
|
+
x: imageRect.width * 0.5,
|
9889
|
+
y: imageRect.height * 0.5
|
9890
|
+
};
|
9891
|
+
const moveX = state.moveX - (center.x - imageRect.left - origin.x) * (ratio - 1);
|
9892
|
+
const moveY = state.moveY - (center.y - imageRect.top - origin.y) * (ratio - 1);
|
9893
|
+
state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
|
9894
|
+
state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
|
9895
|
+
} else {
|
9896
|
+
state.moveX = 0;
|
9897
|
+
state.moveY = isLongImage.value ? initialMoveY : 0;
|
9898
|
+
}
|
9690
9899
|
emit("scale", {
|
9691
9900
|
scale,
|
9692
9901
|
index: props.active
|
@@ -9695,20 +9904,20 @@ var stdin_default$L = vue.defineComponent({
|
|
9695
9904
|
};
|
9696
9905
|
const resetScale = () => {
|
9697
9906
|
setScale(1);
|
9698
|
-
state.moveX = 0;
|
9699
|
-
state.moveY = 0;
|
9700
9907
|
};
|
9701
9908
|
const toggleScale = () => {
|
9702
9909
|
const scale = state.scale > 1 ? 1 : 2;
|
9703
|
-
setScale(scale
|
9704
|
-
|
9705
|
-
|
9910
|
+
setScale(scale, scale === 2 || isLongImage.value ? {
|
9911
|
+
x: touch.startX.value,
|
9912
|
+
y: touch.startY.value
|
9913
|
+
} : void 0);
|
9706
9914
|
};
|
9707
9915
|
let fingerNum;
|
9708
9916
|
let startMoveX;
|
9709
9917
|
let startMoveY;
|
9710
9918
|
let startScale;
|
9711
9919
|
let startDistance;
|
9920
|
+
let lastCenter;
|
9712
9921
|
let doubleTapTimer;
|
9713
9922
|
let touchStartTime;
|
9714
9923
|
let isImageMoved = false;
|
@@ -9728,11 +9937,11 @@ var stdin_default$L = vue.defineComponent({
|
|
9728
9937
|
startMoveY = state.moveY;
|
9729
9938
|
touchStartTime = Date.now();
|
9730
9939
|
isImageMoved = false;
|
9731
|
-
state.moving = fingerNum === 1 && state.scale !== 1;
|
9940
|
+
state.moving = fingerNum === 1 && (state.scale !== 1 || isLongImage.value);
|
9732
9941
|
state.zooming = fingerNum === 2 && !offsetX.value;
|
9733
9942
|
if (state.zooming) {
|
9734
9943
|
startScale = state.scale;
|
9735
|
-
startDistance = getDistance(
|
9944
|
+
startDistance = getDistance(touches);
|
9736
9945
|
}
|
9737
9946
|
};
|
9738
9947
|
const onTouchMove = (event) => {
|
@@ -9761,7 +9970,8 @@ var stdin_default$L = vue.defineComponent({
|
|
9761
9970
|
if (touches.length === 2) {
|
9762
9971
|
const distance = getDistance(touches);
|
9763
9972
|
const scale = startScale * distance / startDistance;
|
9764
|
-
|
9973
|
+
lastCenter = getCenter(touches);
|
9974
|
+
setScale(scale, lastCenter);
|
9765
9975
|
}
|
9766
9976
|
}
|
9767
9977
|
};
|
@@ -9815,7 +10025,7 @@ var stdin_default$L = vue.defineComponent({
|
|
9815
10025
|
}
|
9816
10026
|
const maxZoom = +props.maxZoom;
|
9817
10027
|
if (state.scale > maxZoom) {
|
9818
|
-
|
10028
|
+
setScale(maxZoom, lastCenter);
|
9819
10029
|
}
|
9820
10030
|
}
|
9821
10031
|
}
|
@@ -9823,12 +10033,30 @@ var stdin_default$L = vue.defineComponent({
|
|
9823
10033
|
checkTap();
|
9824
10034
|
touch.reset();
|
9825
10035
|
};
|
10036
|
+
const resize = () => {
|
10037
|
+
const {
|
10038
|
+
rootWidth,
|
10039
|
+
rootHeight
|
10040
|
+
} = props;
|
10041
|
+
const rootRatio = rootHeight / rootWidth;
|
10042
|
+
const {
|
10043
|
+
imageRatio
|
10044
|
+
} = state;
|
10045
|
+
vertical.value = state.imageRatio > rootRatio && imageRatio < longImageRatio;
|
10046
|
+
isLongImage.value = state.imageRatio > rootRatio && imageRatio >= longImageRatio;
|
10047
|
+
if (isLongImage.value) {
|
10048
|
+
initialMoveY = (imageRatio * rootWidth - rootHeight) / 2;
|
10049
|
+
state.moveY = initialMoveY;
|
10050
|
+
}
|
10051
|
+
resetScale();
|
10052
|
+
};
|
9826
10053
|
const onLoad = (event) => {
|
9827
10054
|
const {
|
9828
10055
|
naturalWidth,
|
9829
10056
|
naturalHeight
|
9830
10057
|
} = event.target;
|
9831
10058
|
state.imageRatio = naturalHeight / naturalWidth;
|
10059
|
+
resize();
|
9832
10060
|
};
|
9833
10061
|
vue.watch(() => props.active, resetScale);
|
9834
10062
|
vue.watch(() => props.show, (value) => {
|
@@ -9836,6 +10064,7 @@ var stdin_default$L = vue.defineComponent({
|
|
9836
10064
|
resetScale();
|
9837
10065
|
}
|
9838
10066
|
});
|
10067
|
+
vue.watch(() => [props.rootWidth, props.rootHeight], resize);
|
9839
10068
|
use.useEventListener("touchmove", onTouchMove, {
|
9840
10069
|
target: vue.computed(() => {
|
9841
10070
|
var _a;
|
@@ -9860,6 +10089,7 @@ var stdin_default$L = vue.defineComponent({
|
|
9860
10089
|
}, [slots.image({
|
9861
10090
|
src: props.src
|
9862
10091
|
})]) : vue.createVNode(Image$1, {
|
10092
|
+
"ref": imageRef,
|
9863
10093
|
"src": props.src,
|
9864
10094
|
"fit": "contain",
|
9865
10095
|
"class": bem$C("image", {
|
@@ -11389,21 +11619,7 @@ var stdin_default$A = vue.defineComponent({
|
|
11389
11619
|
}
|
11390
11620
|
});
|
11391
11621
|
const PasswordInput = withInstall(stdin_default$A);
|
11392
|
-
const PickerGroup = withInstall(stdin_default$
|
11393
|
-
const useSyncPropRef = (getProp, setProp) => {
|
11394
|
-
const propRef = vue.ref(getProp());
|
11395
|
-
vue.watch(getProp, (value) => {
|
11396
|
-
if (value !== propRef.value) {
|
11397
|
-
propRef.value = value;
|
11398
|
-
}
|
11399
|
-
});
|
11400
|
-
vue.watch(propRef, (value) => {
|
11401
|
-
if (value !== getProp()) {
|
11402
|
-
setProp(value);
|
11403
|
-
}
|
11404
|
-
});
|
11405
|
-
return propRef;
|
11406
|
-
};
|
11622
|
+
const PickerGroup = withInstall(stdin_default$1v);
|
11407
11623
|
const [name$r, bem$q] = createNamespace("popover");
|
11408
11624
|
const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
11409
11625
|
const popoverProps = {
|
@@ -12383,6 +12599,7 @@ const signatureProps = {
|
|
12383
12599
|
penColor: makeStringProp("#000"),
|
12384
12600
|
lineWidth: makeNumberProp(3),
|
12385
12601
|
clearButtonText: String,
|
12602
|
+
backgroundColor: makeStringProp(""),
|
12386
12603
|
confirmButtonText: String
|
12387
12604
|
};
|
12388
12605
|
const hasCanvasSupport = () => {
|
@@ -12402,7 +12619,8 @@ var stdin_default$r = vue.defineComponent({
|
|
12402
12619
|
const state = vue.reactive({
|
12403
12620
|
width: 0,
|
12404
12621
|
height: 0,
|
12405
|
-
ctx: null
|
12622
|
+
ctx: null,
|
12623
|
+
ratio: inBrowser ? window.devicePixelRatio : 1
|
12406
12624
|
});
|
12407
12625
|
let canvasRect;
|
12408
12626
|
const isRenderCanvas = inBrowser ? hasCanvasSupport() : true;
|
@@ -12411,7 +12629,7 @@ var stdin_default$r = vue.defineComponent({
|
|
12411
12629
|
return false;
|
12412
12630
|
}
|
12413
12631
|
state.ctx.beginPath();
|
12414
|
-
state.ctx.lineWidth = props.lineWidth;
|
12632
|
+
state.ctx.lineWidth = props.lineWidth * state.ratio;
|
12415
12633
|
state.ctx.strokeStyle = props.penColor;
|
12416
12634
|
canvasRect = use.useRect(canvasRef);
|
12417
12635
|
emit("start");
|
@@ -12423,8 +12641,8 @@ var stdin_default$r = vue.defineComponent({
|
|
12423
12641
|
}
|
12424
12642
|
preventDefault(event);
|
12425
12643
|
const touch = event.touches[0];
|
12426
|
-
const mouseX = touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0);
|
12427
|
-
const mouseY = touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0);
|
12644
|
+
const mouseX = (touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0)) * state.ratio;
|
12645
|
+
const mouseY = (touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0)) * state.ratio;
|
12428
12646
|
state.ctx.lineCap = "round";
|
12429
12647
|
state.ctx.lineJoin = "round";
|
12430
12648
|
(_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
|
@@ -12441,13 +12659,23 @@ var stdin_default$r = vue.defineComponent({
|
|
12441
12659
|
empty.height = canvas.height;
|
12442
12660
|
return canvas.toDataURL() === empty.toDataURL();
|
12443
12661
|
};
|
12662
|
+
const setCanvasBgColor = () => {
|
12663
|
+
if (state.ctx && props.backgroundColor) {
|
12664
|
+
state.ctx.fillStyle = props.backgroundColor;
|
12665
|
+
state.ctx.fillRect(0, 0, state.width, state.height);
|
12666
|
+
}
|
12667
|
+
};
|
12444
12668
|
const submit = () => {
|
12669
|
+
var _a, _b;
|
12445
12670
|
const canvas = canvasRef.value;
|
12446
12671
|
if (!canvas) {
|
12447
12672
|
return;
|
12448
12673
|
}
|
12449
12674
|
const isEmpty = isCanvasEmpty(canvas);
|
12450
|
-
const image = isEmpty ? "" :
|
12675
|
+
const image = isEmpty ? "" : ((_b = (_a = {
|
12676
|
+
jpg: () => canvas.toDataURL("image/jpeg", 0.8),
|
12677
|
+
jpeg: () => canvas.toDataURL("image/jpeg", 0.8)
|
12678
|
+
})[props.type]) == null ? void 0 : _b.call(_a)) || canvas.toDataURL(`image/${props.type}`);
|
12451
12679
|
emit("submit", {
|
12452
12680
|
image,
|
12453
12681
|
canvas
|
@@ -12457,6 +12685,7 @@ var stdin_default$r = vue.defineComponent({
|
|
12457
12685
|
if (state.ctx) {
|
12458
12686
|
state.ctx.clearRect(0, 0, state.width, state.height);
|
12459
12687
|
state.ctx.closePath();
|
12688
|
+
setCanvasBgColor();
|
12460
12689
|
}
|
12461
12690
|
emit("clear");
|
12462
12691
|
};
|
@@ -12464,8 +12693,11 @@ var stdin_default$r = vue.defineComponent({
|
|
12464
12693
|
var _a, _b, _c;
|
12465
12694
|
if (isRenderCanvas) {
|
12466
12695
|
state.ctx = (_a = canvasRef.value) == null ? void 0 : _a.getContext("2d");
|
12467
|
-
state.width = ((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0;
|
12468
|
-
state.height = ((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0;
|
12696
|
+
state.width = (((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0) * state.ratio;
|
12697
|
+
state.height = (((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0) * state.ratio;
|
12698
|
+
vue.nextTick(() => {
|
12699
|
+
setCanvasBgColor();
|
12700
|
+
});
|
12469
12701
|
}
|
12470
12702
|
});
|
12471
12703
|
return () => vue.createVNode("div", {
|
@@ -14176,10 +14408,11 @@ var stdin_default$6 = vue.defineComponent({
|
|
14176
14408
|
imageFit: String,
|
14177
14409
|
lazyLoad: Boolean,
|
14178
14410
|
deletable: Boolean,
|
14411
|
+
reupload: Boolean,
|
14179
14412
|
previewSize: [Number, String, Array],
|
14180
14413
|
beforeDelete: Function
|
14181
14414
|
},
|
14182
|
-
emits: ["delete", "preview"],
|
14415
|
+
emits: ["delete", "preview", "reupload"],
|
14183
14416
|
setup(props, {
|
14184
14417
|
emit,
|
14185
14418
|
slots
|
@@ -14221,6 +14454,7 @@ var stdin_default$6 = vue.defineComponent({
|
|
14221
14454
|
});
|
14222
14455
|
};
|
14223
14456
|
const onPreview = () => emit("preview");
|
14457
|
+
const onReupload = () => emit("reupload");
|
14224
14458
|
const renderDeleteIcon = () => {
|
14225
14459
|
if (props.deletable && props.item.status !== "uploading") {
|
14226
14460
|
const slot = slots["preview-delete"];
|
@@ -14256,7 +14490,8 @@ var stdin_default$6 = vue.defineComponent({
|
|
14256
14490
|
item,
|
14257
14491
|
lazyLoad,
|
14258
14492
|
imageFit,
|
14259
|
-
previewSize
|
14493
|
+
previewSize,
|
14494
|
+
reupload
|
14260
14495
|
} = props;
|
14261
14496
|
if (isImageFile(item)) {
|
14262
14497
|
return vue.createVNode(Image$1, {
|
@@ -14266,7 +14501,7 @@ var stdin_default$6 = vue.defineComponent({
|
|
14266
14501
|
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
14267
14502
|
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
14268
14503
|
"lazyLoad": lazyLoad,
|
14269
|
-
"onClick": onPreview
|
14504
|
+
"onClick": reupload ? onReupload : onPreview
|
14270
14505
|
}, {
|
14271
14506
|
default: renderCover
|
14272
14507
|
});
|
@@ -14300,6 +14535,7 @@ const uploaderProps = {
|
|
14300
14535
|
uploadIcon: makeStringProp("photograph"),
|
14301
14536
|
uploadText: String,
|
14302
14537
|
deletable: truthProp,
|
14538
|
+
reupload: Boolean,
|
14303
14539
|
afterRead: Function,
|
14304
14540
|
showUpload: truthProp,
|
14305
14541
|
modelValue: makeArrayProp(),
|
@@ -14317,13 +14553,14 @@ const uploaderProps = {
|
|
14317
14553
|
var stdin_default$5 = vue.defineComponent({
|
14318
14554
|
name: name$1,
|
14319
14555
|
props: uploaderProps,
|
14320
|
-
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "update:modelValue"],
|
14556
|
+
emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
|
14321
14557
|
setup(props, {
|
14322
14558
|
emit,
|
14323
14559
|
slots
|
14324
14560
|
}) {
|
14325
14561
|
const inputRef = vue.ref();
|
14326
14562
|
const urls = [];
|
14563
|
+
const reuploadIndex = vue.ref(-1);
|
14327
14564
|
const getDetail = (index = props.modelValue.length) => ({
|
14328
14565
|
name: props.name,
|
14329
14566
|
index
|
@@ -14349,7 +14586,14 @@ var stdin_default$5 = vue.defineComponent({
|
|
14349
14586
|
}
|
14350
14587
|
}
|
14351
14588
|
items = vue.reactive(items);
|
14352
|
-
|
14589
|
+
if (reuploadIndex.value > -1) {
|
14590
|
+
const arr = [...props.modelValue];
|
14591
|
+
arr.splice(reuploadIndex.value, 1, items);
|
14592
|
+
emit("update:modelValue", arr);
|
14593
|
+
reuploadIndex.value = -1;
|
14594
|
+
} else {
|
14595
|
+
emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
|
14596
|
+
}
|
14353
14597
|
if (props.afterRead) {
|
14354
14598
|
props.afterRead(items, getDetail());
|
14355
14599
|
}
|
@@ -14450,15 +14694,20 @@ var stdin_default$5 = vue.defineComponent({
|
|
14450
14694
|
emit("update:modelValue", fileList);
|
14451
14695
|
emit("delete", item, getDetail(index));
|
14452
14696
|
};
|
14697
|
+
const reuploadImage = (index) => {
|
14698
|
+
chooseFile();
|
14699
|
+
reuploadIndex.value = index;
|
14700
|
+
};
|
14453
14701
|
const renderPreviewItem = (item, index) => {
|
14454
|
-
const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
|
14702
|
+
const needPickData = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"];
|
14455
14703
|
const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
|
14456
14704
|
return vue.createVNode(stdin_default$6, vue.mergeProps({
|
14457
14705
|
"item": item,
|
14458
14706
|
"index": index,
|
14459
|
-
"onClick": () => emit("clickPreview", item, getDetail(index)),
|
14707
|
+
"onClick": () => emit(props.reupload ? "clickReupload" : "clickPreview", item, getDetail(index)),
|
14460
14708
|
"onDelete": () => deleteFile(item, index),
|
14461
|
-
"onPreview": () => previewImage(item)
|
14709
|
+
"onPreview": () => previewImage(item),
|
14710
|
+
"onReupload": () => reuploadImage(index)
|
14462
14711
|
}, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
|
14463
14712
|
};
|
14464
14713
|
const renderPreviewList = () => {
|
@@ -14468,24 +14717,25 @@ var stdin_default$5 = vue.defineComponent({
|
|
14468
14717
|
};
|
14469
14718
|
const onClickUpload = (event) => emit("clickUpload", event);
|
14470
14719
|
const renderUpload = () => {
|
14471
|
-
if (props.modelValue.length >= +props.maxCount) {
|
14720
|
+
if (props.modelValue.length >= +props.maxCount && !props.reupload) {
|
14472
14721
|
return;
|
14473
14722
|
}
|
14723
|
+
const hideUploader = props.modelValue.length >= +props.maxCount && props.reupload;
|
14474
14724
|
const Input = props.readonly ? null : vue.createVNode("input", {
|
14475
14725
|
"ref": inputRef,
|
14476
14726
|
"type": "file",
|
14477
14727
|
"class": bem$1("input"),
|
14478
14728
|
"accept": props.accept,
|
14479
14729
|
"capture": props.capture,
|
14480
|
-
"multiple": props.multiple,
|
14730
|
+
"multiple": props.multiple && reuploadIndex.value === -1,
|
14481
14731
|
"disabled": props.disabled,
|
14482
14732
|
"onChange": onChange
|
14483
14733
|
}, null);
|
14484
14734
|
if (slots.default) {
|
14485
|
-
return vue.createVNode("div", {
|
14735
|
+
return vue.withDirectives(vue.createVNode("div", {
|
14486
14736
|
"class": bem$1("input-wrapper"),
|
14487
14737
|
"onClick": onClickUpload
|
14488
|
-
}, [slots.default(), Input]);
|
14738
|
+
}, [slots.default(), Input]), [[vue.vShow, !hideUploader]]);
|
14489
14739
|
}
|
14490
14740
|
return vue.withDirectives(vue.createVNode("div", {
|
14491
14741
|
"class": bem$1("upload", {
|
@@ -14498,7 +14748,7 @@ var stdin_default$5 = vue.defineComponent({
|
|
14498
14748
|
"class": bem$1("upload-icon")
|
14499
14749
|
}, null), props.uploadText && vue.createVNode("span", {
|
14500
14750
|
"class": bem$1("upload-text")
|
14501
|
-
}, [props.uploadText]), Input]), [[vue.vShow, props.showUpload]]);
|
14751
|
+
}, [props.uploadText]), Input]), [[vue.vShow, props.showUpload && !hideUploader]]);
|
14502
14752
|
};
|
14503
14753
|
const chooseFile = () => {
|
14504
14754
|
if (inputRef.value && !props.disabled) {
|
@@ -15525,7 +15775,7 @@ const Lazyload = {
|
|
15525
15775
|
});
|
15526
15776
|
}
|
15527
15777
|
};
|
15528
|
-
const version = "4.
|
15778
|
+
const version = "4.4.0";
|
15529
15779
|
function install(app) {
|
15530
15780
|
const components = [
|
15531
15781
|
ActionBar,
|
@@ -15537,6 +15787,7 @@ function install(app) {
|
|
15537
15787
|
Area,
|
15538
15788
|
BackTop,
|
15539
15789
|
Badge,
|
15790
|
+
Barrage,
|
15540
15791
|
Button,
|
15541
15792
|
Calendar,
|
15542
15793
|
Card,
|
@@ -15646,6 +15897,7 @@ exports.AddressList = AddressList;
|
|
15646
15897
|
exports.Area = Area;
|
15647
15898
|
exports.BackTop = BackTop;
|
15648
15899
|
exports.Badge = Badge;
|
15900
|
+
exports.Barrage = Barrage;
|
15649
15901
|
exports.Button = Button;
|
15650
15902
|
exports.Calendar = Calendar;
|
15651
15903
|
exports.Card = Card;
|
@@ -15745,6 +15997,7 @@ exports.allowMultipleToast = allowMultipleToast;
|
|
15745
15997
|
exports.areaProps = areaProps;
|
15746
15998
|
exports.backTopProps = backTopProps;
|
15747
15999
|
exports.badgeProps = badgeProps;
|
16000
|
+
exports.barrageProps = barrageProps;
|
15748
16001
|
exports.buttonProps = buttonProps;
|
15749
16002
|
exports.calendarProps = calendarProps;
|
15750
16003
|
exports.cardProps = cardProps;
|