persagy-vant 0.0.38 → 0.0.40
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/action-sheet/ActionSheet.d.ts +3 -15
- package/es/action-sheet/ActionSheet.mjs +22 -11
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +2 -11
- package/es/action-sheet/index.less +31 -17
- package/es/action-sheet/style/index.mjs +2 -0
- package/es/action-sheet/style/less.mjs +2 -0
- package/es/action-sheet/var.less +1 -4
- package/es/address-edit/AddressEditDetail.d.ts +1 -1
- package/es/address-edit/style/index.mjs +1 -0
- package/es/address-edit/style/less.mjs +1 -0
- package/es/button/Button.d.ts +4 -1
- package/es/button/Button.mjs +21 -1
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +3 -1
- package/es/button/index.less +11 -5
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/index.d.ts +1 -1
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/style/index.mjs +2 -0
- package/es/cascader/style/less.mjs +2 -0
- package/es/cell/Cell.d.ts +305 -1
- package/es/cell/Cell.mjs +257 -28
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +165 -1
- package/es/cell/index.less +101 -0
- package/es/cell/style/index.mjs +1 -0
- package/es/cell/style/less.mjs +1 -0
- package/es/checkbox-panel/index.css +1 -1
- package/es/checkbox-panel/index.less +1 -1
- package/es/checkbox-panel/style/index.mjs +1 -0
- package/es/checkbox-panel/style/less.mjs +1 -0
- package/es/collapse-item/CollapseItem.d.ts +230 -0
- package/es/collapse-item/index.d.ts +160 -0
- package/es/collapse-item/style/index.mjs +1 -0
- package/es/collapse-item/style/less.mjs +1 -0
- package/es/contact-card/style/index.mjs +1 -0
- package/es/contact-card/style/less.mjs +1 -0
- package/es/contact-edit/style/index.mjs +1 -0
- package/es/contact-edit/style/less.mjs +1 -0
- package/es/content-panel/index.css +1 -1
- package/es/content-panel/index.less +2 -0
- package/es/coupon-cell/style/index.mjs +1 -0
- package/es/coupon-cell/style/less.mjs +1 -0
- package/es/coupon-list/style/index.mjs +3 -0
- package/es/coupon-list/style/less.mjs +3 -0
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/function-call.d.ts +1 -1
- package/es/dialog/style/index.mjs +1 -0
- package/es/dialog/style/less.mjs +1 -0
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-item/style/index.mjs +1 -0
- package/es/dropdown-item/style/less.mjs +1 -0
- package/es/field/Field.d.ts +248 -1
- package/es/field/Field.mjs +21 -2
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +173 -1
- package/es/field/index.less +15 -0
- package/es/field/style/index.mjs +1 -0
- package/es/field/style/less.mjs +1 -0
- package/es/floor-select/style/index.mjs +3 -0
- package/es/floor-select/style/less.mjs +3 -0
- package/es/form-panel/index.css +1 -1
- package/es/form-panel/index.less +2 -0
- package/es/image-preview/ImagePreview.d.ts +2 -2
- package/es/image-preview/function-call.d.ts +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/info-card/InfoCard.d.ts +1 -1
- package/es/info-card/index.d.ts +1 -1
- package/es/label/index.css +1 -1
- package/es/label/index.less +4 -0
- package/es/label/var.less +1 -0
- package/es/location-select/index.css +1 -1
- package/es/location-select/index.less +1 -1
- package/es/location-select/style/index.mjs +1 -0
- package/es/location-select/style/less.mjs +1 -0
- package/es/material-action-bar/MaterialActionBar.d.ts +9 -0
- package/es/material-action-bar/MaterialActionBar.mjs +5 -2
- package/es/material-action-bar/index.d.ts +18 -0
- package/es/material-add/index.css +1 -1
- package/es/material-add/index.less +1 -1
- package/es/material-add/style/index.mjs +1 -1
- package/es/material-add/style/less.mjs +1 -1
- package/es/material-display-bar/MaterialDisplayBar.d.ts +4 -4
- package/es/material-display-bar/index.d.ts +12 -12
- package/es/multi-person-select/index.css +1 -1
- package/es/multi-person-select/index.less +1 -1
- package/es/multi-person-select/style/index.mjs +1 -0
- package/es/multi-person-select/style/less.mjs +1 -0
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/function-call.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/index.d.ts +2 -2
- package/es/object-select/index.css +1 -1
- package/es/object-select/index.less +2 -0
- package/es/object-select/style/index.mjs +1 -0
- package/es/object-select/style/less.mjs +1 -0
- package/es/popover/Popover.d.ts +3 -3
- package/es/popover/index.d.ts +3 -3
- package/es/popup/Popup.d.ts +4 -4
- package/es/popup/index.d.ts +4 -4
- package/es/quantity-input/style/index.mjs +1 -0
- package/es/quantity-input/style/less.mjs +1 -0
- package/es/radio-panel/RadioPanel.d.ts +1 -1
- package/es/radio-panel/index.css +1 -1
- package/es/radio-panel/index.d.ts +1 -1
- package/es/radio-panel/index.less +1 -1
- package/es/radio-panel/style/index.mjs +1 -0
- package/es/radio-panel/style/less.mjs +1 -0
- package/es/rate/style/index.mjs +1 -0
- package/es/rate/style/less.mjs +1 -0
- package/es/search/style/index.mjs +1 -0
- package/es/search/style/less.mjs +1 -0
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/single-person-select/index.css +1 -1
- package/es/single-person-select/index.less +2 -0
- package/es/single-person-select/style/index.mjs +1 -0
- package/es/single-person-select/style/less.mjs +1 -0
- package/es/style/base.css +1 -1
- package/es/style/base.less +5 -0
- package/es/style/css-variables.css +1 -1
- package/es/style/css-variables.less +1 -0
- package/es/style/var.less +1 -0
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/tab/style/index.mjs +2 -0
- package/es/tab/style/less.mjs +2 -0
- package/es/tabs/style/index.mjs +2 -0
- package/es/tabs/style/less.mjs +2 -0
- package/es/title-bar/TitleBar.d.ts +2 -2
- package/es/title-bar/index.d.ts +2 -2
- package/es/toast/Toast.d.ts +1 -1
- package/es/tree-select/style/index.mjs +1 -0
- package/es/tree-select/style/less.mjs +1 -0
- package/es/uploader/Uploader.d.ts +4 -0
- package/es/uploader/Uploader.mjs +3 -2
- package/es/uploader/index.d.ts +3 -0
- package/es/video-preview/VideoPreview.d.ts +2 -2
- package/es/video-preview/function-call.d.ts +2 -2
- package/es/work-order-filter/index.css +1 -1
- package/es/work-order-filter/index.less +2 -0
- package/es/work-order-filter/style/index.mjs +1 -0
- package/es/work-order-filter/style/less.mjs +1 -0
- package/lib/action-sheet/ActionSheet.d.ts +3 -15
- package/lib/action-sheet/ActionSheet.js +21 -10
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +2 -11
- package/lib/action-sheet/index.less +31 -17
- package/lib/action-sheet/style/index.js +2 -0
- package/lib/action-sheet/style/less.js +2 -0
- package/lib/action-sheet/var.less +1 -4
- package/lib/address-edit/AddressEditDetail.d.ts +1 -1
- package/lib/address-edit/style/index.js +1 -0
- package/lib/address-edit/style/less.js +1 -0
- package/lib/button/Button.d.ts +4 -1
- package/lib/button/Button.js +21 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +3 -1
- package/lib/button/index.less +11 -5
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -1
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/style/index.js +2 -0
- package/lib/cascader/style/less.js +2 -0
- package/lib/cell/Cell.d.ts +305 -1
- package/lib/cell/Cell.js +257 -28
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +165 -1
- package/lib/cell/index.less +101 -0
- package/lib/cell/style/index.js +1 -0
- package/lib/cell/style/less.js +1 -0
- package/lib/checkbox-panel/index.css +1 -1
- package/lib/checkbox-panel/index.less +1 -1
- package/lib/checkbox-panel/style/index.js +1 -0
- package/lib/checkbox-panel/style/less.js +1 -0
- package/lib/collapse-item/CollapseItem.d.ts +230 -0
- package/lib/collapse-item/index.d.ts +160 -0
- package/lib/collapse-item/style/index.js +1 -0
- package/lib/collapse-item/style/less.js +1 -0
- package/lib/contact-card/style/index.js +1 -0
- package/lib/contact-card/style/less.js +1 -0
- package/lib/contact-edit/style/index.js +1 -0
- package/lib/contact-edit/style/less.js +1 -0
- package/lib/content-panel/index.css +1 -1
- package/lib/content-panel/index.less +2 -0
- package/lib/coupon-cell/style/index.js +1 -0
- package/lib/coupon-cell/style/less.js +1 -0
- package/lib/coupon-list/style/index.js +3 -0
- package/lib/coupon-list/style/less.js +3 -0
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/function-call.d.ts +1 -1
- package/lib/dialog/style/index.js +1 -0
- package/lib/dialog/style/less.js +1 -0
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/style/index.js +1 -0
- package/lib/dropdown-item/style/less.js +1 -0
- package/lib/field/Field.d.ts +248 -1
- package/lib/field/Field.js +21 -2
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +173 -1
- package/lib/field/index.less +15 -0
- package/lib/field/style/index.js +1 -0
- package/lib/field/style/less.js +1 -0
- package/lib/floor-select/style/index.js +3 -0
- package/lib/floor-select/style/less.js +3 -0
- package/lib/form-panel/index.css +1 -1
- package/lib/form-panel/index.less +2 -0
- package/lib/image-preview/ImagePreview.d.ts +2 -2
- package/lib/image-preview/function-call.d.ts +2 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +2 -2
- package/lib/info-card/InfoCard.d.ts +1 -1
- package/lib/info-card/index.d.ts +1 -1
- package/lib/label/index.css +1 -1
- package/lib/label/index.less +4 -0
- package/lib/label/var.less +1 -0
- package/lib/location-select/index.css +1 -1
- package/lib/location-select/index.less +1 -1
- package/lib/location-select/style/index.js +1 -0
- package/lib/location-select/style/less.js +1 -0
- package/lib/material-action-bar/MaterialActionBar.d.ts +9 -0
- package/lib/material-action-bar/MaterialActionBar.js +4 -1
- package/lib/material-action-bar/index.d.ts +18 -0
- package/lib/material-add/index.css +1 -1
- package/lib/material-add/index.less +1 -1
- package/lib/material-add/style/index.js +1 -1
- package/lib/material-add/style/less.js +1 -1
- package/lib/material-display-bar/MaterialDisplayBar.d.ts +4 -4
- package/lib/material-display-bar/index.d.ts +12 -12
- package/lib/multi-person-select/index.css +1 -1
- package/lib/multi-person-select/index.less +1 -1
- package/lib/multi-person-select/style/index.js +1 -0
- package/lib/multi-person-select/style/less.js +1 -0
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/function-call.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/index.d.ts +2 -2
- package/lib/object-select/index.css +1 -1
- package/lib/object-select/index.less +2 -0
- package/lib/object-select/style/index.js +1 -0
- package/lib/object-select/style/less.js +1 -0
- package/lib/popover/Popover.d.ts +3 -3
- package/lib/popover/index.d.ts +3 -3
- package/lib/popup/Popup.d.ts +4 -4
- package/lib/popup/index.d.ts +4 -4
- package/lib/quantity-input/style/index.js +1 -0
- package/lib/quantity-input/style/less.js +1 -0
- package/lib/radio-panel/RadioPanel.d.ts +1 -1
- package/lib/radio-panel/index.css +1 -1
- package/lib/radio-panel/index.d.ts +1 -1
- package/lib/radio-panel/index.less +1 -1
- package/lib/radio-panel/style/index.js +1 -0
- package/lib/radio-panel/style/less.js +1 -0
- package/lib/rate/style/index.js +1 -0
- package/lib/rate/style/less.js +1 -0
- package/lib/search/style/index.js +1 -0
- package/lib/search/style/less.js +1 -0
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/single-person-select/index.css +1 -1
- package/lib/single-person-select/index.less +2 -0
- package/lib/single-person-select/style/index.js +1 -0
- package/lib/single-person-select/style/less.js +1 -0
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +5 -0
- package/lib/style/css-variables.css +1 -1
- package/lib/style/css-variables.less +1 -0
- package/lib/style/var.less +1 -0
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/tab/style/index.js +2 -0
- package/lib/tab/style/less.js +2 -0
- package/lib/tabs/style/index.js +2 -0
- package/lib/tabs/style/less.js +2 -0
- package/lib/title-bar/TitleBar.d.ts +2 -2
- package/lib/title-bar/index.d.ts +2 -2
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/tree-select/style/index.js +1 -0
- package/lib/tree-select/style/less.js +1 -0
- package/lib/uploader/Uploader.d.ts +4 -0
- package/lib/uploader/Uploader.js +2 -1
- package/lib/uploader/index.d.ts +3 -0
- package/lib/vant.cjs.js +1268 -987
- package/lib/vant.es.js +1269 -988
- package/lib/vant.js +5214 -4933
- package/lib/vant.min.js +1 -1
- package/lib/video-preview/VideoPreview.d.ts +2 -2
- package/lib/video-preview/function-call.d.ts +2 -2
- package/lib/web-types.json +1 -1
- package/lib/work-order-filter/index.css +1 -1
- package/lib/work-order-filter/index.less +2 -0
- package/lib/work-order-filter/style/index.js +1 -0
- package/lib/work-order-filter/style/less.js +1 -0
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +8 -7
- package/skills/use-persagy-vant/references/component-catalog.md +3 -3
- package/skills/use-persagy-vant/references/component-variant-selection.md +39 -0
- package/skills/use-persagy-vant/references/element-component-matching.md +88 -0
- package/skills/use-persagy-vant/references/public-style-system.md +105 -0
package/lib/vant.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, provide, watchEffect, mergeProps, onDeactivated, onBeforeUnmount, Transition, withDirectives, vShow, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, TransitionGroup, h } from "vue";
|
|
2
|
-
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, useCustomFieldValue, CUSTOM_FIELD_INJECTION_KEY,
|
|
2
|
+
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, useClickAway, useCustomFieldValue, CUSTOM_FIELD_INJECTION_KEY, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, inBrowser as inBrowser$1 } from "@vant/use";
|
|
3
3
|
import { offsetModifier, createPopper } from "@vant/popperjs";
|
|
4
4
|
import Plyr from "plyr";
|
|
5
5
|
const isDef = (val) => val !== void 0 && val !== null;
|
|
@@ -785,6 +785,7 @@ const buttonProps = extend({}, routeProps, {
|
|
|
785
785
|
tag: makeStringProp("button"),
|
|
786
786
|
text: String,
|
|
787
787
|
icon: String,
|
|
788
|
+
rightIcon: String,
|
|
788
789
|
iconSize: numericProp,
|
|
789
790
|
type: makeStringProp("default"),
|
|
790
791
|
size: makeStringProp("normal"),
|
|
@@ -841,6 +842,25 @@ var stdin_default$20 = defineComponent({
|
|
|
841
842
|
}, null);
|
|
842
843
|
}
|
|
843
844
|
};
|
|
845
|
+
const renderRightIcon = () => {
|
|
846
|
+
var _a;
|
|
847
|
+
if (props2.loading) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
if (slots["right-icon"]) {
|
|
851
|
+
return createVNode("div", {
|
|
852
|
+
"class": bem$1O("right-icon")
|
|
853
|
+
}, [slots["right-icon"]()]);
|
|
854
|
+
}
|
|
855
|
+
if (props2.rightIcon) {
|
|
856
|
+
return createVNode(Icon, {
|
|
857
|
+
"size": (_a = props2.iconSize) != null ? _a : buttonIconSizes[props2.size],
|
|
858
|
+
"name": props2.rightIcon,
|
|
859
|
+
"class": bem$1O("right-icon"),
|
|
860
|
+
"classPrefix": props2.iconPrefix
|
|
861
|
+
}, null);
|
|
862
|
+
}
|
|
863
|
+
};
|
|
844
864
|
const renderText = () => {
|
|
845
865
|
let text;
|
|
846
866
|
if (props2.loading) {
|
|
@@ -917,7 +937,7 @@ var stdin_default$20 = defineComponent({
|
|
|
917
937
|
}, {
|
|
918
938
|
default: () => [createVNode("div", {
|
|
919
939
|
"class": bem$1O("content")
|
|
920
|
-
}, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
|
|
940
|
+
}, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon(), renderRightIcon()])]
|
|
921
941
|
});
|
|
922
942
|
};
|
|
923
943
|
}
|
|
@@ -1433,170 +1453,500 @@ var stdin_default$1Y = defineComponent({
|
|
|
1433
1453
|
}
|
|
1434
1454
|
});
|
|
1435
1455
|
const Popup = withInstall(stdin_default$1Y);
|
|
1436
|
-
const [name$1N, bem$1J] = createNamespace("
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
|
|
1456
|
+
const [name$1N, bem$1J] = createNamespace("popover");
|
|
1457
|
+
const popupProps$2 = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
|
1458
|
+
const popoverProps = {
|
|
1459
|
+
show: Boolean,
|
|
1460
|
+
theme: makeStringProp("light"),
|
|
1461
|
+
overlay: Boolean,
|
|
1440
1462
|
actions: makeArrayProp(),
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1463
|
+
trigger: makeStringProp("click"),
|
|
1464
|
+
duration: numericProp,
|
|
1465
|
+
showArrow: truthProp,
|
|
1466
|
+
placement: makeStringProp("bottom"),
|
|
1467
|
+
iconPrefix: String,
|
|
1468
|
+
overlayClass: unknownProp,
|
|
1469
|
+
overlayStyle: Object,
|
|
1470
|
+
closeOnClickAction: truthProp,
|
|
1471
|
+
closeOnClickOverlay: truthProp,
|
|
1472
|
+
closeOnClickOutside: truthProp,
|
|
1473
|
+
offset: {
|
|
1474
|
+
type: Array,
|
|
1475
|
+
default: () => [0, 8]
|
|
1476
|
+
},
|
|
1477
|
+
teleport: {
|
|
1478
|
+
type: [String, Object],
|
|
1479
|
+
default: "body"
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1450
1482
|
var stdin_default$1X = defineComponent({
|
|
1451
1483
|
name: name$1N,
|
|
1452
|
-
props:
|
|
1453
|
-
emits: ["select", "
|
|
1484
|
+
props: popoverProps,
|
|
1485
|
+
emits: ["select", "touchstart", "update:show"],
|
|
1454
1486
|
setup(props2, {
|
|
1487
|
+
emit,
|
|
1455
1488
|
slots,
|
|
1456
|
-
|
|
1489
|
+
attrs
|
|
1457
1490
|
}) {
|
|
1458
|
-
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
|
|
1491
|
+
let popper;
|
|
1492
|
+
const popupRef = ref();
|
|
1493
|
+
const wrapperRef = ref();
|
|
1494
|
+
const popoverRef = ref();
|
|
1495
|
+
const getPopoverOptions = () => ({
|
|
1496
|
+
placement: props2.placement,
|
|
1497
|
+
modifiers: [{
|
|
1498
|
+
name: "computeStyles",
|
|
1499
|
+
options: {
|
|
1500
|
+
adaptive: false,
|
|
1501
|
+
gpuAcceleration: false
|
|
1502
|
+
}
|
|
1503
|
+
}, extend({}, offsetModifier, {
|
|
1504
|
+
options: {
|
|
1505
|
+
offset: props2.offset
|
|
1506
|
+
}
|
|
1507
|
+
})]
|
|
1508
|
+
});
|
|
1509
|
+
const createPopperInstance = () => {
|
|
1510
|
+
if (wrapperRef.value && popoverRef.value) {
|
|
1511
|
+
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
|
|
1512
|
+
}
|
|
1513
|
+
return null;
|
|
1462
1514
|
};
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1515
|
+
const updateLocation = () => {
|
|
1516
|
+
nextTick(() => {
|
|
1517
|
+
if (!props2.show) {
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
if (!popper) {
|
|
1521
|
+
popper = createPopperInstance();
|
|
1522
|
+
} else {
|
|
1523
|
+
popper.setOptions(getPopoverOptions());
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1526
|
+
};
|
|
1527
|
+
const updateShow = (value) => emit("update:show", value);
|
|
1528
|
+
const onClickWrapper = () => {
|
|
1529
|
+
if (props2.trigger === "click") {
|
|
1530
|
+
updateShow(!props2.show);
|
|
1472
1531
|
}
|
|
1473
1532
|
};
|
|
1474
|
-
const
|
|
1475
|
-
if (
|
|
1476
|
-
return
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
"onClick": onCancel
|
|
1482
|
-
}, [slots.cancel ? slots.cancel() : props2.cancelText])];
|
|
1533
|
+
const onClickAction = (action, index) => {
|
|
1534
|
+
if (action.disabled) {
|
|
1535
|
+
return;
|
|
1536
|
+
}
|
|
1537
|
+
emit("select", action, index);
|
|
1538
|
+
if (props2.closeOnClickAction) {
|
|
1539
|
+
updateShow(false);
|
|
1483
1540
|
}
|
|
1484
1541
|
};
|
|
1485
|
-
const
|
|
1486
|
-
if (
|
|
1487
|
-
|
|
1488
|
-
"class": bem$1J("loading-icon")
|
|
1489
|
-
}, null);
|
|
1542
|
+
const onClickAway = () => {
|
|
1543
|
+
if (props2.show && props2.closeOnClickOutside && (!props2.overlay || props2.closeOnClickOverlay)) {
|
|
1544
|
+
updateShow(false);
|
|
1490
1545
|
}
|
|
1546
|
+
};
|
|
1547
|
+
const renderActionContent = (action, index) => {
|
|
1491
1548
|
if (slots.action) {
|
|
1492
1549
|
return slots.action({
|
|
1493
1550
|
action,
|
|
1494
1551
|
index
|
|
1495
1552
|
});
|
|
1496
1553
|
}
|
|
1497
|
-
return [createVNode("
|
|
1498
|
-
"class": bem$1J("
|
|
1499
|
-
}, [
|
|
1500
|
-
"
|
|
1501
|
-
|
|
1554
|
+
return [action.icon && createVNode("div", {
|
|
1555
|
+
"class": bem$1J("action-icon")
|
|
1556
|
+
}, [createVNode(Icon, {
|
|
1557
|
+
"name": action.icon,
|
|
1558
|
+
"classPrefix": props2.iconPrefix
|
|
1559
|
+
}, null)]), createVNode("div", {
|
|
1560
|
+
"class": [bem$1J("action-text"), BORDER_BOTTOM]
|
|
1561
|
+
}, [action.text])];
|
|
1502
1562
|
};
|
|
1503
1563
|
const renderAction = (action, index) => {
|
|
1504
1564
|
const {
|
|
1565
|
+
icon,
|
|
1505
1566
|
color,
|
|
1506
|
-
loading,
|
|
1507
|
-
callback,
|
|
1508
1567
|
disabled,
|
|
1509
1568
|
className
|
|
1510
1569
|
} = action;
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
}
|
|
1518
|
-
if (props2.closeOnClickAction) {
|
|
1519
|
-
updateShow(false);
|
|
1520
|
-
}
|
|
1521
|
-
nextTick(() => emit("select", action, index));
|
|
1522
|
-
};
|
|
1523
|
-
return createVNode("button", {
|
|
1524
|
-
"type": "button",
|
|
1570
|
+
return createVNode("div", {
|
|
1571
|
+
"role": "menuitem",
|
|
1572
|
+
"class": [bem$1J("action", {
|
|
1573
|
+
disabled,
|
|
1574
|
+
"with-icon": icon
|
|
1575
|
+
}), className],
|
|
1525
1576
|
"style": {
|
|
1526
1577
|
color
|
|
1527
1578
|
},
|
|
1528
|
-
"
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
}), className],
|
|
1532
|
-
"onClick": onClick
|
|
1579
|
+
"tabindex": disabled ? void 0 : 0,
|
|
1580
|
+
"aria-disabled": disabled || void 0,
|
|
1581
|
+
"onClick": () => onClickAction(action, index)
|
|
1533
1582
|
}, [renderActionContent(action, index)]);
|
|
1534
1583
|
};
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
return createVNode("div", {
|
|
1539
|
-
"class": bem$1J("description")
|
|
1540
|
-
}, [content]);
|
|
1541
|
-
}
|
|
1542
|
-
};
|
|
1543
|
-
return () => createVNode(Popup, mergeProps({
|
|
1544
|
-
"class": bem$1J(),
|
|
1545
|
-
"position": "bottom",
|
|
1546
|
-
"onUpdate:show": updateShow
|
|
1547
|
-
}, pick(props2, popupInheritKeys$2)), {
|
|
1548
|
-
default: () => {
|
|
1584
|
+
onMounted(() => {
|
|
1585
|
+
updateLocation();
|
|
1586
|
+
watchEffect(() => {
|
|
1549
1587
|
var _a;
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1588
|
+
popupRef.value = (_a = popoverRef.value) == null ? void 0 : _a.popupRef.value;
|
|
1589
|
+
});
|
|
1590
|
+
});
|
|
1591
|
+
onBeforeUnmount(() => {
|
|
1592
|
+
if (popper) {
|
|
1593
|
+
popper.destroy();
|
|
1594
|
+
popper = null;
|
|
1553
1595
|
}
|
|
1554
1596
|
});
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
function deepClone(obj) {
|
|
1559
|
-
if (!isDef(obj)) {
|
|
1560
|
-
return obj;
|
|
1561
|
-
}
|
|
1562
|
-
if (Array.isArray(obj)) {
|
|
1563
|
-
return obj.map((item) => deepClone(item));
|
|
1564
|
-
}
|
|
1565
|
-
if (isObject(obj)) {
|
|
1566
|
-
const to = {};
|
|
1567
|
-
Object.keys(obj).forEach((key) => {
|
|
1568
|
-
to[key] = deepClone(obj[key]);
|
|
1597
|
+
watch(() => [props2.show, props2.offset, props2.placement], updateLocation);
|
|
1598
|
+
useClickAway([wrapperRef, popupRef], onClickAway, {
|
|
1599
|
+
eventName: "touchstart"
|
|
1569
1600
|
});
|
|
1570
|
-
return
|
|
1601
|
+
return () => {
|
|
1602
|
+
var _a;
|
|
1603
|
+
return createVNode(Fragment, null, [createVNode("span", {
|
|
1604
|
+
"ref": wrapperRef,
|
|
1605
|
+
"class": bem$1J("wrapper"),
|
|
1606
|
+
"onClick": onClickWrapper
|
|
1607
|
+
}, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), createVNode(Popup, mergeProps({
|
|
1608
|
+
"ref": popoverRef,
|
|
1609
|
+
"class": bem$1J([props2.theme]),
|
|
1610
|
+
"position": "",
|
|
1611
|
+
"transition": "van-popover-zoom",
|
|
1612
|
+
"lockScroll": false,
|
|
1613
|
+
"onUpdate:show": updateShow
|
|
1614
|
+
}, attrs, pick(props2, popupProps$2)), {
|
|
1615
|
+
default: () => [props2.showArrow && createVNode("div", {
|
|
1616
|
+
"class": bem$1J("arrow")
|
|
1617
|
+
}, null), createVNode("div", {
|
|
1618
|
+
"role": "menu",
|
|
1619
|
+
"class": bem$1J("content")
|
|
1620
|
+
}, [slots.default ? slots.default() : props2.actions.map(renderAction)])]
|
|
1621
|
+
})]);
|
|
1622
|
+
};
|
|
1571
1623
|
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
const
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1624
|
+
});
|
|
1625
|
+
const Popover = withInstall(stdin_default$1X);
|
|
1626
|
+
const [name$1M, bem$1I] = createNamespace("nav-bar");
|
|
1627
|
+
const navBarProps = {
|
|
1628
|
+
title: String,
|
|
1629
|
+
fixed: Boolean,
|
|
1630
|
+
zIndex: numericProp,
|
|
1631
|
+
border: truthProp,
|
|
1632
|
+
leftText: String,
|
|
1633
|
+
rightText: String,
|
|
1634
|
+
subtitle: String,
|
|
1635
|
+
leftArrow: Boolean,
|
|
1636
|
+
rightPopoverActions: makeArrayProp(),
|
|
1637
|
+
rightPopoverIcon: makeStringProp("plus"),
|
|
1638
|
+
titleDropdown: Boolean,
|
|
1639
|
+
titleDropdownActive: Boolean,
|
|
1640
|
+
placeholder: Boolean,
|
|
1641
|
+
safeAreaInsetTop: Boolean
|
|
1642
|
+
};
|
|
1643
|
+
var stdin_default$1W = defineComponent({
|
|
1644
|
+
name: name$1M,
|
|
1645
|
+
props: navBarProps,
|
|
1646
|
+
emits: ["click-left", "click-right", "click-title", "select-right-popover", "update:titleDropdownActive"],
|
|
1647
|
+
setup(props2, {
|
|
1648
|
+
emit,
|
|
1649
|
+
slots
|
|
1650
|
+
}) {
|
|
1651
|
+
const navBarRef = ref();
|
|
1652
|
+
const rightPopoverShow = ref(false);
|
|
1653
|
+
const renderPlaceholder = usePlaceholder(navBarRef, bem$1I);
|
|
1654
|
+
const onClickLeft = (event) => emit("click-left", event);
|
|
1655
|
+
const onClickRight = (event) => emit("click-right", event);
|
|
1656
|
+
const onUpdateRightPopoverShow = (show) => {
|
|
1657
|
+
rightPopoverShow.value = show;
|
|
1658
|
+
};
|
|
1659
|
+
const onSelectRightPopover = (action, index) => {
|
|
1660
|
+
emit("select-right-popover", action, index);
|
|
1661
|
+
};
|
|
1662
|
+
const onClickTitle = (event) => {
|
|
1663
|
+
if (!props2.titleDropdown) {
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
emit("update:titleDropdownActive", !props2.titleDropdownActive);
|
|
1667
|
+
emit("click-title", event);
|
|
1668
|
+
};
|
|
1669
|
+
const renderLeft = () => {
|
|
1670
|
+
if (slots.left) {
|
|
1671
|
+
return slots.left();
|
|
1672
|
+
}
|
|
1673
|
+
return [props2.leftArrow && createVNode(Icon, {
|
|
1674
|
+
"class": bem$1I("arrow"),
|
|
1675
|
+
"name": "arrow-left"
|
|
1676
|
+
}, null), props2.leftText && createVNode("span", {
|
|
1677
|
+
"class": bem$1I("text")
|
|
1678
|
+
}, [props2.leftText])];
|
|
1679
|
+
};
|
|
1680
|
+
const renderRight = () => {
|
|
1681
|
+
if (slots.right) {
|
|
1682
|
+
return slots.right();
|
|
1683
|
+
}
|
|
1684
|
+
if (props2.rightPopoverActions.length) {
|
|
1685
|
+
return createVNode(Popover, {
|
|
1686
|
+
"show": rightPopoverShow.value,
|
|
1687
|
+
"actions": props2.rightPopoverActions,
|
|
1688
|
+
"placement": "bottom-end",
|
|
1689
|
+
"closeOnClickAction": true,
|
|
1690
|
+
"onUpdate:show": onUpdateRightPopoverShow,
|
|
1691
|
+
"onSelect": onSelectRightPopover
|
|
1692
|
+
}, {
|
|
1693
|
+
reference: () => createVNode(Icon, {
|
|
1694
|
+
"name": props2.rightPopoverIcon,
|
|
1695
|
+
"class": bem$1I("right-popover-icon")
|
|
1696
|
+
}, null)
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1699
|
+
return createVNode("span", {
|
|
1700
|
+
"class": bem$1I("text")
|
|
1701
|
+
}, [props2.rightText]);
|
|
1702
|
+
};
|
|
1703
|
+
const renderNavBar = () => {
|
|
1704
|
+
const {
|
|
1705
|
+
title,
|
|
1706
|
+
fixed,
|
|
1707
|
+
border,
|
|
1708
|
+
zIndex,
|
|
1709
|
+
subtitle,
|
|
1710
|
+
titleDropdown
|
|
1711
|
+
} = props2;
|
|
1712
|
+
const style = getZIndexStyle(zIndex);
|
|
1713
|
+
const hasLeft = props2.leftArrow || props2.leftText || slots.left;
|
|
1714
|
+
const hasRight = props2.rightText || props2.rightPopoverActions.length || slots.right;
|
|
1715
|
+
const hasRightPopover = props2.rightPopoverActions.length > 0 && !slots.right;
|
|
1716
|
+
return createVNode("div", {
|
|
1717
|
+
"ref": navBarRef,
|
|
1718
|
+
"style": style,
|
|
1719
|
+
"class": [bem$1I({
|
|
1720
|
+
fixed
|
|
1721
|
+
}), {
|
|
1722
|
+
[BORDER_BOTTOM]: border,
|
|
1723
|
+
"van-safe-area-top": props2.safeAreaInsetTop
|
|
1724
|
+
}]
|
|
1725
|
+
}, [createVNode("div", {
|
|
1726
|
+
"class": bem$1I("content")
|
|
1727
|
+
}, [hasLeft && createVNode("div", {
|
|
1728
|
+
"class": [bem$1I("left", {
|
|
1729
|
+
slot: !!slots.left
|
|
1730
|
+
}), {
|
|
1731
|
+
[HAPTICS_FEEDBACK]: !slots.left
|
|
1732
|
+
}],
|
|
1733
|
+
"onClick": slots.left ? void 0 : onClickLeft
|
|
1734
|
+
}, [renderLeft()]), createVNode("div", {
|
|
1735
|
+
"class": [bem$1I("title", {
|
|
1736
|
+
dropdown: titleDropdown
|
|
1737
|
+
}), {
|
|
1738
|
+
[HAPTICS_FEEDBACK]: titleDropdown
|
|
1739
|
+
}],
|
|
1740
|
+
"role": titleDropdown ? "button" : void 0,
|
|
1741
|
+
"tabindex": titleDropdown ? 0 : void 0,
|
|
1742
|
+
"onClick": onClickTitle,
|
|
1743
|
+
"onKeydown": (event) => {
|
|
1744
|
+
if (titleDropdown && (event.key === "Enter" || event.key === " ")) {
|
|
1745
|
+
event.preventDefault();
|
|
1746
|
+
onClickTitle(event);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}, [createVNode("div", {
|
|
1750
|
+
"class": [bem$1I("title-content"), "van-ellipsis"]
|
|
1751
|
+
}, [slots.title ? slots.title() : title, titleDropdown && createVNode(Icon, {
|
|
1752
|
+
"name": "trangle-down",
|
|
1753
|
+
"class": bem$1I("title-arrow", {
|
|
1754
|
+
active: props2.titleDropdownActive
|
|
1755
|
+
})
|
|
1756
|
+
}, null)]), subtitle && createVNode("div", {
|
|
1757
|
+
"class": [bem$1I("subtitle"), "van-ellipsis"]
|
|
1758
|
+
}, [subtitle])]), hasRight && createVNode("div", {
|
|
1759
|
+
"class": [bem$1I("right", {
|
|
1760
|
+
slot: !!slots.right
|
|
1761
|
+
}), {
|
|
1762
|
+
[HAPTICS_FEEDBACK]: !slots.right && !hasRightPopover
|
|
1763
|
+
}],
|
|
1764
|
+
"onClick": slots.right || hasRightPopover ? void 0 : onClickRight
|
|
1765
|
+
}, [renderRight()])])]);
|
|
1766
|
+
};
|
|
1767
|
+
return () => {
|
|
1768
|
+
if (props2.fixed && props2.placeholder) {
|
|
1769
|
+
return renderPlaceholder(renderNavBar);
|
|
1770
|
+
}
|
|
1771
|
+
return renderNavBar();
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
const NavBar = withInstall(stdin_default$1W);
|
|
1776
|
+
const [name$1L, bem$1H] = createNamespace("action-sheet");
|
|
1777
|
+
const actionSheetProps = extend({}, popupSharedProps, {
|
|
1778
|
+
title: String,
|
|
1779
|
+
round: truthProp,
|
|
1780
|
+
actions: makeArrayProp(),
|
|
1781
|
+
closeable: truthProp,
|
|
1782
|
+
cancelText: String,
|
|
1783
|
+
description: String,
|
|
1784
|
+
closeOnPopstate: truthProp,
|
|
1785
|
+
closeOnClickAction: Boolean,
|
|
1786
|
+
safeAreaInsetBottom: truthProp
|
|
1787
|
+
});
|
|
1788
|
+
const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
|
1789
|
+
var stdin_default$1V = defineComponent({
|
|
1790
|
+
name: name$1L,
|
|
1791
|
+
props: actionSheetProps,
|
|
1792
|
+
emits: ["select", "cancel", "update:show"],
|
|
1793
|
+
setup(props2, {
|
|
1794
|
+
slots,
|
|
1795
|
+
emit
|
|
1796
|
+
}) {
|
|
1797
|
+
const updateShow = (show) => emit("update:show", show);
|
|
1798
|
+
const onCancel = () => {
|
|
1799
|
+
updateShow(false);
|
|
1800
|
+
emit("cancel");
|
|
1801
|
+
};
|
|
1802
|
+
const renderHeader = () => {
|
|
1803
|
+
if (props2.title) {
|
|
1804
|
+
return createVNode(NavBar, {
|
|
1805
|
+
"class": bem$1H("header"),
|
|
1806
|
+
"title": props2.title,
|
|
1807
|
+
"border": false
|
|
1808
|
+
}, props2.closeable ? {
|
|
1809
|
+
left: () => createVNode("span", {
|
|
1810
|
+
"class": bem$1H("nav-left")
|
|
1811
|
+
}, [createVNode(Icon, {
|
|
1812
|
+
"name": "cross",
|
|
1813
|
+
"size": 22,
|
|
1814
|
+
"class": HAPTICS_FEEDBACK,
|
|
1815
|
+
"onClick": onCancel
|
|
1816
|
+
}, null)])
|
|
1817
|
+
} : void 0);
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1820
|
+
const renderCancel = () => {
|
|
1821
|
+
if (slots.cancel || props2.cancelText) {
|
|
1822
|
+
return [createVNode("div", {
|
|
1823
|
+
"class": bem$1H("gap")
|
|
1824
|
+
}, null), createVNode("button", {
|
|
1825
|
+
"type": "button",
|
|
1826
|
+
"class": bem$1H("cancel"),
|
|
1827
|
+
"onClick": onCancel
|
|
1828
|
+
}, [slots.cancel ? slots.cancel() : props2.cancelText])];
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
const renderActionContent = (action, index) => {
|
|
1832
|
+
if (action.loading) {
|
|
1833
|
+
return createVNode(Loading, {
|
|
1834
|
+
"class": bem$1H("loading-icon")
|
|
1835
|
+
}, null);
|
|
1836
|
+
}
|
|
1837
|
+
if (slots.action) {
|
|
1838
|
+
return slots.action({
|
|
1839
|
+
action,
|
|
1840
|
+
index
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
return [createVNode("span", {
|
|
1844
|
+
"class": bem$1H("name")
|
|
1845
|
+
}, [action.name]), action.subname && createVNode("div", {
|
|
1846
|
+
"class": bem$1H("subname")
|
|
1847
|
+
}, [action.subname])];
|
|
1848
|
+
};
|
|
1849
|
+
const renderAction = (action, index) => {
|
|
1850
|
+
const {
|
|
1851
|
+
color,
|
|
1852
|
+
selected,
|
|
1853
|
+
loading,
|
|
1854
|
+
callback,
|
|
1855
|
+
disabled,
|
|
1856
|
+
className
|
|
1857
|
+
} = action;
|
|
1858
|
+
const onClick = () => {
|
|
1859
|
+
if (disabled || loading) {
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
if (callback) {
|
|
1863
|
+
callback(action);
|
|
1864
|
+
}
|
|
1865
|
+
if (props2.closeOnClickAction) {
|
|
1866
|
+
updateShow(false);
|
|
1867
|
+
}
|
|
1868
|
+
nextTick(() => emit("select", action, index));
|
|
1869
|
+
};
|
|
1870
|
+
return createVNode("button", {
|
|
1871
|
+
"type": "button",
|
|
1872
|
+
"style": {
|
|
1873
|
+
color: selected ? "var(--van-primary-color)" : color
|
|
1874
|
+
},
|
|
1875
|
+
"class": [bem$1H("item", {
|
|
1876
|
+
selected,
|
|
1877
|
+
loading,
|
|
1878
|
+
disabled
|
|
1879
|
+
}), className],
|
|
1880
|
+
"onClick": onClick
|
|
1881
|
+
}, [renderActionContent(action, index)]);
|
|
1882
|
+
};
|
|
1883
|
+
const renderDescription = () => {
|
|
1884
|
+
if (props2.description || slots.description) {
|
|
1885
|
+
const content = slots.description ? slots.description() : props2.description;
|
|
1886
|
+
return createVNode("div", {
|
|
1887
|
+
"class": bem$1H("description")
|
|
1888
|
+
}, [content]);
|
|
1889
|
+
}
|
|
1890
|
+
};
|
|
1891
|
+
return () => createVNode(Popup, mergeProps({
|
|
1892
|
+
"class": bem$1H(),
|
|
1893
|
+
"position": "bottom",
|
|
1894
|
+
"onUpdate:show": updateShow
|
|
1895
|
+
}, pick(props2, popupInheritKeys$2)), {
|
|
1896
|
+
default: () => {
|
|
1897
|
+
var _a;
|
|
1898
|
+
return [renderHeader(), renderDescription(), createVNode("div", {
|
|
1899
|
+
"class": bem$1H("content")
|
|
1900
|
+
}, [props2.actions.length > 0 && createVNode("div", {
|
|
1901
|
+
"class": bem$1H("action-card")
|
|
1902
|
+
}, [props2.actions.map(renderAction)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
const ActionSheet = withInstall(stdin_default$1V);
|
|
1908
|
+
function deepClone(obj) {
|
|
1909
|
+
if (!isDef(obj)) {
|
|
1910
|
+
return obj;
|
|
1911
|
+
}
|
|
1912
|
+
if (Array.isArray(obj)) {
|
|
1913
|
+
return obj.map((item) => deepClone(item));
|
|
1914
|
+
}
|
|
1915
|
+
if (isObject(obj)) {
|
|
1916
|
+
const to = {};
|
|
1917
|
+
Object.keys(obj).forEach((key) => {
|
|
1918
|
+
to[key] = deepClone(obj[key]);
|
|
1919
|
+
});
|
|
1920
|
+
return to;
|
|
1921
|
+
}
|
|
1922
|
+
return obj;
|
|
1923
|
+
}
|
|
1924
|
+
const DEFAULT_DURATION = 200;
|
|
1925
|
+
const MOMENTUM_LIMIT_TIME = 300;
|
|
1926
|
+
const MOMENTUM_LIMIT_DISTANCE = 15;
|
|
1927
|
+
const [name$1K, bem$1G] = createNamespace("picker-column");
|
|
1928
|
+
function getElementTranslateY(element) {
|
|
1929
|
+
const {
|
|
1930
|
+
transform
|
|
1931
|
+
} = window.getComputedStyle(element);
|
|
1932
|
+
const translateY = transform.slice(7, transform.length - 1).split(", ")[5];
|
|
1933
|
+
return Number(translateY);
|
|
1934
|
+
}
|
|
1935
|
+
const PICKER_KEY = Symbol(name$1K);
|
|
1936
|
+
const isOptionDisabled = (option) => isObject(option) && option.disabled;
|
|
1937
|
+
var stdin_default$1U = defineComponent({
|
|
1938
|
+
name: name$1K,
|
|
1939
|
+
props: {
|
|
1940
|
+
textKey: makeRequiredProp(String),
|
|
1941
|
+
readonly: Boolean,
|
|
1942
|
+
allowHtml: Boolean,
|
|
1943
|
+
className: unknownProp,
|
|
1944
|
+
itemHeight: makeRequiredProp(Number),
|
|
1945
|
+
defaultIndex: makeNumberProp(0),
|
|
1946
|
+
swipeDuration: makeRequiredProp(numericProp),
|
|
1947
|
+
initialOptions: makeArrayProp(),
|
|
1948
|
+
visibleItemCount: makeRequiredProp(numericProp),
|
|
1949
|
+
rotateDirection: makeStringProp("")
|
|
1600
1950
|
},
|
|
1601
1951
|
emits: ["change"],
|
|
1602
1952
|
setup(props2, {
|
|
@@ -1760,7 +2110,7 @@ var stdin_default$1W = defineComponent({
|
|
|
1760
2110
|
role: "button",
|
|
1761
2111
|
style: optionStyle,
|
|
1762
2112
|
tabindex: disabled ? -1 : 0,
|
|
1763
|
-
class: bem$
|
|
2113
|
+
class: bem$1G("item", {
|
|
1764
2114
|
disabled,
|
|
1765
2115
|
selected: index === state.index
|
|
1766
2116
|
}),
|
|
@@ -1803,7 +2153,7 @@ var stdin_default$1W = defineComponent({
|
|
|
1803
2153
|
});
|
|
1804
2154
|
return () => createVNode("div", {
|
|
1805
2155
|
"ref": root,
|
|
1806
|
-
"class": [bem$
|
|
2156
|
+
"class": [bem$1G(), props2.className],
|
|
1807
2157
|
"onTouchstartPassive": onTouchStart,
|
|
1808
2158
|
"onTouchend": onTouchEnd,
|
|
1809
2159
|
"onTouchcancel": onTouchEnd
|
|
@@ -1814,12 +2164,12 @@ var stdin_default$1W = defineComponent({
|
|
|
1814
2164
|
transitionDuration: `${state.duration}ms`,
|
|
1815
2165
|
transitionProperty: state.duration ? "all" : "none"
|
|
1816
2166
|
},
|
|
1817
|
-
"class": bem$
|
|
2167
|
+
"class": bem$1G("wrapper"),
|
|
1818
2168
|
"onTransitionend": stopMomentum
|
|
1819
2169
|
}, [renderOptions()])]);
|
|
1820
2170
|
}
|
|
1821
2171
|
});
|
|
1822
|
-
const [name$
|
|
2172
|
+
const [name$1J, bem$1F, t$j] = createNamespace("picker");
|
|
1823
2173
|
const pickerSharedProps = {
|
|
1824
2174
|
title: String,
|
|
1825
2175
|
loading: Boolean,
|
|
@@ -1842,8 +2192,8 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
|
1842
2192
|
toolbarPosition: makeStringProp("top"),
|
|
1843
2193
|
columnsFieldNames: Object
|
|
1844
2194
|
});
|
|
1845
|
-
var stdin_default$
|
|
1846
|
-
name: name$
|
|
2195
|
+
var stdin_default$1T = defineComponent({
|
|
2196
|
+
name: name$1J,
|
|
1847
2197
|
props: pickerProps,
|
|
1848
2198
|
emits: ["confirm", "cancel", "change"],
|
|
1849
2199
|
setup(props2, {
|
|
@@ -2028,7 +2378,7 @@ var stdin_default$1V = defineComponent({
|
|
|
2028
2378
|
}
|
|
2029
2379
|
if (props2.title) {
|
|
2030
2380
|
return createVNode("div", {
|
|
2031
|
-
"class": [bem$
|
|
2381
|
+
"class": [bem$1F("title"), "van-ellipsis"]
|
|
2032
2382
|
}, [props2.title]);
|
|
2033
2383
|
}
|
|
2034
2384
|
};
|
|
@@ -2036,7 +2386,7 @@ var stdin_default$1V = defineComponent({
|
|
|
2036
2386
|
const text = props2.cancelButtonText || t$j("cancel");
|
|
2037
2387
|
return createVNode("button", {
|
|
2038
2388
|
"type": "button",
|
|
2039
|
-
"class": [bem$
|
|
2389
|
+
"class": [bem$1F("cancel"), HAPTICS_FEEDBACK],
|
|
2040
2390
|
"onClick": cancel
|
|
2041
2391
|
}, [slots.cancel ? slots.cancel() : text]);
|
|
2042
2392
|
};
|
|
@@ -2044,7 +2394,7 @@ var stdin_default$1V = defineComponent({
|
|
|
2044
2394
|
const text = props2.confirmButtonText || t$j("confirm");
|
|
2045
2395
|
return createVNode("button", {
|
|
2046
2396
|
"type": "button",
|
|
2047
|
-
"class": [bem$
|
|
2397
|
+
"class": [bem$1F("confirm"), HAPTICS_FEEDBACK],
|
|
2048
2398
|
"onClick": confirm
|
|
2049
2399
|
}, [slots.confirm ? slots.confirm() : text]);
|
|
2050
2400
|
};
|
|
@@ -2052,13 +2402,13 @@ var stdin_default$1V = defineComponent({
|
|
|
2052
2402
|
if (props2.showToolbar) {
|
|
2053
2403
|
const slot = slots.toolbar || slots.default;
|
|
2054
2404
|
return createVNode("div", {
|
|
2055
|
-
"class": bem$
|
|
2405
|
+
"class": bem$1F("toolbar")
|
|
2056
2406
|
}, [slot ? slot() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
|
2057
2407
|
}
|
|
2058
2408
|
};
|
|
2059
2409
|
const renderColumnItems = () => formattedColumns.value.map((item, columnIndex) => {
|
|
2060
2410
|
var _a;
|
|
2061
|
-
return createVNode(stdin_default$
|
|
2411
|
+
return createVNode(stdin_default$1U, {
|
|
2062
2412
|
"textKey": columnsFieldNames.value.text,
|
|
2063
2413
|
"readonly": props2.readonly,
|
|
2064
2414
|
"allowHtml": props2.allowHtml,
|
|
@@ -2083,10 +2433,10 @@ var stdin_default$1V = defineComponent({
|
|
|
2083
2433
|
backgroundSize: `100% ${(wrapHeight - itemHeight.value) / 2}px`
|
|
2084
2434
|
};
|
|
2085
2435
|
return [createVNode("div", {
|
|
2086
|
-
"class": bem$
|
|
2436
|
+
"class": bem$1F("mask"),
|
|
2087
2437
|
"style": maskStyle
|
|
2088
2438
|
}, null), createVNode("div", {
|
|
2089
|
-
"class": [BORDER_UNSET_TOP_BOTTOM, bem$
|
|
2439
|
+
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1F("frame")],
|
|
2090
2440
|
"style": frameStyle
|
|
2091
2441
|
}, null)];
|
|
2092
2442
|
}
|
|
@@ -2098,7 +2448,7 @@ var stdin_default$1V = defineComponent({
|
|
|
2098
2448
|
};
|
|
2099
2449
|
return createVNode("div", {
|
|
2100
2450
|
"ref": columnsRef,
|
|
2101
|
-
"class": bem$
|
|
2451
|
+
"class": bem$1F("columns"),
|
|
2102
2452
|
"style": columnsStyle
|
|
2103
2453
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
|
2104
2454
|
};
|
|
@@ -2124,15 +2474,15 @@ var stdin_default$1V = defineComponent({
|
|
|
2124
2474
|
return () => {
|
|
2125
2475
|
var _a, _b;
|
|
2126
2476
|
return createVNode("div", {
|
|
2127
|
-
"class": bem$
|
|
2477
|
+
"class": bem$1F()
|
|
2128
2478
|
}, [props2.toolbarPosition === "top" ? renderToolbar() : null, props2.loading ? createVNode(Loading, {
|
|
2129
|
-
"class": bem$
|
|
2479
|
+
"class": bem$1F("loading")
|
|
2130
2480
|
}, null) : null, (_a = slots["columns-top"]) == null ? void 0 : _a.call(slots), renderColumns(), (_b = slots["columns-bottom"]) == null ? void 0 : _b.call(slots), props2.toolbarPosition === "bottom" ? renderToolbar() : null]);
|
|
2131
2481
|
};
|
|
2132
2482
|
}
|
|
2133
2483
|
});
|
|
2134
|
-
const Picker = withInstall(stdin_default$
|
|
2135
|
-
const [name$
|
|
2484
|
+
const Picker = withInstall(stdin_default$1T);
|
|
2485
|
+
const [name$1I, bem$1E] = createNamespace("area");
|
|
2136
2486
|
const EMPTY_CODE = "000000";
|
|
2137
2487
|
const INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
|
|
2138
2488
|
const INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
|
|
@@ -2150,8 +2500,8 @@ const areaProps = extend({}, pickerSharedProps, {
|
|
|
2150
2500
|
default: isOverseaCode
|
|
2151
2501
|
}
|
|
2152
2502
|
});
|
|
2153
|
-
var stdin_default$
|
|
2154
|
-
name: name$
|
|
2503
|
+
var stdin_default$1S = defineComponent({
|
|
2504
|
+
name: name$1I,
|
|
2155
2505
|
props: areaProps,
|
|
2156
2506
|
emits: ["change", "confirm", "cancel"],
|
|
2157
2507
|
setup(props2, {
|
|
@@ -2351,7 +2701,7 @@ var stdin_default$1U = defineComponent({
|
|
|
2351
2701
|
const columns = state.columns.slice(0, +props2.columnsNum);
|
|
2352
2702
|
return createVNode(Picker, mergeProps({
|
|
2353
2703
|
"ref": pickerRef,
|
|
2354
|
-
"class": bem$
|
|
2704
|
+
"class": bem$1E(),
|
|
2355
2705
|
"columns": columns,
|
|
2356
2706
|
"columnsFieldNames": {
|
|
2357
2707
|
text: "name"
|
|
@@ -2363,8 +2713,8 @@ var stdin_default$1U = defineComponent({
|
|
|
2363
2713
|
};
|
|
2364
2714
|
}
|
|
2365
2715
|
});
|
|
2366
|
-
const Area = withInstall(stdin_default$
|
|
2367
|
-
const [name$
|
|
2716
|
+
const Area = withInstall(stdin_default$1S);
|
|
2717
|
+
const [name$1H, bem$1D] = createNamespace("checkbox-group");
|
|
2368
2718
|
const checkboxGroupProps = {
|
|
2369
2719
|
max: numericProp,
|
|
2370
2720
|
disabled: Boolean,
|
|
@@ -2375,9 +2725,9 @@ const checkboxGroupProps = {
|
|
|
2375
2725
|
modelValue: makeArrayProp(),
|
|
2376
2726
|
checkedColor: String
|
|
2377
2727
|
};
|
|
2378
|
-
const CHECKBOX_GROUP_KEY = Symbol(name$
|
|
2379
|
-
var stdin_default$
|
|
2380
|
-
name: name$
|
|
2728
|
+
const CHECKBOX_GROUP_KEY = Symbol(name$1H);
|
|
2729
|
+
var stdin_default$1R = defineComponent({
|
|
2730
|
+
name: name$1H,
|
|
2381
2731
|
props: checkboxGroupProps,
|
|
2382
2732
|
emits: ["change", "update:modelValue"],
|
|
2383
2733
|
setup(props2, {
|
|
@@ -2423,7 +2773,7 @@ var stdin_default$1T = defineComponent({
|
|
|
2423
2773
|
return () => {
|
|
2424
2774
|
var _a;
|
|
2425
2775
|
return createVNode("div", {
|
|
2426
|
-
"class": bem$
|
|
2776
|
+
"class": bem$1D([props2.direction])
|
|
2427
2777
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
2428
2778
|
};
|
|
2429
2779
|
}
|
|
@@ -2441,7 +2791,7 @@ const checkerProps = {
|
|
|
2441
2791
|
labelDisabled: Boolean,
|
|
2442
2792
|
allowUncheck: Boolean
|
|
2443
2793
|
};
|
|
2444
|
-
var stdin_default$
|
|
2794
|
+
var stdin_default$1Q = defineComponent({
|
|
2445
2795
|
props: extend({}, checkerProps, {
|
|
2446
2796
|
bem: makeRequiredProp(Function),
|
|
2447
2797
|
role: String,
|
|
@@ -2547,12 +2897,12 @@ var stdin_default$1S = defineComponent({
|
|
|
2547
2897
|
};
|
|
2548
2898
|
}
|
|
2549
2899
|
});
|
|
2550
|
-
const [name$
|
|
2900
|
+
const [name$1G, bem$1C] = createNamespace("checkbox");
|
|
2551
2901
|
const checkboxProps = extend({}, checkerProps, {
|
|
2552
2902
|
bindGroup: truthProp
|
|
2553
2903
|
});
|
|
2554
|
-
var stdin_default$
|
|
2555
|
-
name: name$
|
|
2904
|
+
var stdin_default$1P = defineComponent({
|
|
2905
|
+
name: name$1G,
|
|
2556
2906
|
props: checkboxProps,
|
|
2557
2907
|
emits: ["change", "update:modelValue"],
|
|
2558
2908
|
setup(props2, {
|
|
@@ -2609,8 +2959,8 @@ var stdin_default$1R = defineComponent({
|
|
|
2609
2959
|
checked
|
|
2610
2960
|
});
|
|
2611
2961
|
useCustomFieldValue(() => props2.modelValue);
|
|
2612
|
-
return () => createVNode(stdin_default$
|
|
2613
|
-
"bem": bem$
|
|
2962
|
+
return () => createVNode(stdin_default$1Q, mergeProps({
|
|
2963
|
+
"bem": bem$1C,
|
|
2614
2964
|
"role": "checkbox",
|
|
2615
2965
|
"parent": parent,
|
|
2616
2966
|
"checked": checked.value,
|
|
@@ -2618,8 +2968,8 @@ var stdin_default$1R = defineComponent({
|
|
|
2618
2968
|
}, props2), pick(slots, ["default", "icon"]));
|
|
2619
2969
|
}
|
|
2620
2970
|
});
|
|
2621
|
-
const Checkbox = withInstall(stdin_default$
|
|
2622
|
-
const [name$
|
|
2971
|
+
const Checkbox = withInstall(stdin_default$1P);
|
|
2972
|
+
const [name$1F, bem$1B] = createNamespace("radio-group");
|
|
2623
2973
|
const radioGroupProps = {
|
|
2624
2974
|
disabled: Boolean,
|
|
2625
2975
|
iconSize: numericProp,
|
|
@@ -2630,9 +2980,9 @@ const radioGroupProps = {
|
|
|
2630
2980
|
checkedColor: String,
|
|
2631
2981
|
allowUncheck: Boolean
|
|
2632
2982
|
};
|
|
2633
|
-
const RADIO_KEY = Symbol(name$
|
|
2634
|
-
var stdin_default$
|
|
2635
|
-
name: name$
|
|
2983
|
+
const RADIO_KEY = Symbol(name$1F);
|
|
2984
|
+
var stdin_default$1O = defineComponent({
|
|
2985
|
+
name: name$1F,
|
|
2636
2986
|
props: radioGroupProps,
|
|
2637
2987
|
emits: ["change", "update:modelValue"],
|
|
2638
2988
|
setup(props2, {
|
|
@@ -2652,15 +3002,15 @@ var stdin_default$1Q = defineComponent({
|
|
|
2652
3002
|
return () => {
|
|
2653
3003
|
var _a;
|
|
2654
3004
|
return createVNode("div", {
|
|
2655
|
-
"class": bem$
|
|
3005
|
+
"class": bem$1B([props2.direction]),
|
|
2656
3006
|
"role": "radiogroup"
|
|
2657
3007
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
2658
3008
|
};
|
|
2659
3009
|
}
|
|
2660
3010
|
});
|
|
2661
|
-
const [name$
|
|
2662
|
-
var stdin_default$
|
|
2663
|
-
name: name$
|
|
3011
|
+
const [name$1E, bem$1A] = createNamespace("radio");
|
|
3012
|
+
var stdin_default$1N = defineComponent({
|
|
3013
|
+
name: name$1E,
|
|
2664
3014
|
props: checkerProps,
|
|
2665
3015
|
emits: ["update:modelValue"],
|
|
2666
3016
|
setup(props2, {
|
|
@@ -2689,8 +3039,8 @@ var stdin_default$1P = defineComponent({
|
|
|
2689
3039
|
emit("update:modelValue", val);
|
|
2690
3040
|
}
|
|
2691
3041
|
};
|
|
2692
|
-
return () => createVNode(stdin_default$
|
|
2693
|
-
"bem": bem$
|
|
3042
|
+
return () => createVNode(stdin_default$1Q, mergeProps({
|
|
3043
|
+
"bem": bem$1A,
|
|
2694
3044
|
"role": "radio",
|
|
2695
3045
|
"parent": parent,
|
|
2696
3046
|
"checked": checked(),
|
|
@@ -2700,42 +3050,201 @@ var stdin_default$1P = defineComponent({
|
|
|
2700
3050
|
}, props2), pick(slots, ["default", "icon"]));
|
|
2701
3051
|
}
|
|
2702
3052
|
});
|
|
2703
|
-
const Radio = withInstall(stdin_default$
|
|
2704
|
-
const [name$
|
|
3053
|
+
const Radio = withInstall(stdin_default$1N);
|
|
3054
|
+
const [name$1D, bem$1z] = createNamespace("tag");
|
|
3055
|
+
const tagProps = {
|
|
3056
|
+
size: makeStringProp("medium"),
|
|
3057
|
+
mark: Boolean,
|
|
3058
|
+
show: truthProp,
|
|
3059
|
+
type: makeStringProp("gray"),
|
|
3060
|
+
color: String,
|
|
3061
|
+
plain: Boolean,
|
|
3062
|
+
round: Boolean,
|
|
3063
|
+
textColor: String,
|
|
3064
|
+
closeable: Boolean,
|
|
3065
|
+
rightIcon: String,
|
|
3066
|
+
number: [String, Number],
|
|
3067
|
+
showNumber: Boolean,
|
|
3068
|
+
numberColor: String
|
|
3069
|
+
};
|
|
3070
|
+
var stdin_default$1M = defineComponent({
|
|
3071
|
+
name: name$1D,
|
|
3072
|
+
props: tagProps,
|
|
3073
|
+
emits: ["close"],
|
|
3074
|
+
setup(props2, {
|
|
3075
|
+
slots,
|
|
3076
|
+
emit
|
|
3077
|
+
}) {
|
|
3078
|
+
const onClose = (event) => {
|
|
3079
|
+
event.stopPropagation();
|
|
3080
|
+
emit("close", event);
|
|
3081
|
+
};
|
|
3082
|
+
const getStyle = () => {
|
|
3083
|
+
if (props2.plain) {
|
|
3084
|
+
return {
|
|
3085
|
+
color: props2.textColor || props2.color,
|
|
3086
|
+
borderColor: props2.color
|
|
3087
|
+
};
|
|
3088
|
+
}
|
|
3089
|
+
return {
|
|
3090
|
+
color: props2.textColor,
|
|
3091
|
+
background: props2.color
|
|
3092
|
+
};
|
|
3093
|
+
};
|
|
3094
|
+
const renderTag = () => {
|
|
3095
|
+
var _a;
|
|
3096
|
+
const {
|
|
3097
|
+
type,
|
|
3098
|
+
mark,
|
|
3099
|
+
plain,
|
|
3100
|
+
round,
|
|
3101
|
+
size,
|
|
3102
|
+
closeable,
|
|
3103
|
+
rightIcon,
|
|
3104
|
+
number,
|
|
3105
|
+
showNumber,
|
|
3106
|
+
numberColor
|
|
3107
|
+
} = props2;
|
|
3108
|
+
const classes = {
|
|
3109
|
+
mark,
|
|
3110
|
+
plain,
|
|
3111
|
+
round
|
|
3112
|
+
};
|
|
3113
|
+
if (size) {
|
|
3114
|
+
classes[size] = size;
|
|
3115
|
+
}
|
|
3116
|
+
const CloseIcon = closeable && createVNode(Icon, {
|
|
3117
|
+
"name": "cross",
|
|
3118
|
+
"class": [bem$1z("close"), HAPTICS_FEEDBACK],
|
|
3119
|
+
"onClick": onClose
|
|
3120
|
+
}, null);
|
|
3121
|
+
const RightIcon = rightIcon && createVNode(Icon, {
|
|
3122
|
+
"name": rightIcon,
|
|
3123
|
+
"class": bem$1z("right-icon")
|
|
3124
|
+
}, null);
|
|
3125
|
+
return createVNode("span", {
|
|
3126
|
+
"style": getStyle(),
|
|
3127
|
+
"class": bem$1z([classes, type])
|
|
3128
|
+
}, [showNumber && number !== void 0 && createVNode("span", {
|
|
3129
|
+
"class": bem$1z("number"),
|
|
3130
|
+
"style": {
|
|
3131
|
+
color: numberColor
|
|
3132
|
+
}
|
|
3133
|
+
}, [number]), (_a = slots.default) == null ? void 0 : _a.call(slots), RightIcon, CloseIcon]);
|
|
3134
|
+
};
|
|
3135
|
+
return () => createVNode(Transition, {
|
|
3136
|
+
"name": props2.closeable ? "van-fade" : void 0
|
|
3137
|
+
}, {
|
|
3138
|
+
default: () => [props2.show ? renderTag() : null]
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
});
|
|
3142
|
+
const Tag = withInstall(stdin_default$1M);
|
|
3143
|
+
const [name$1C, bem$1y] = createNamespace("cell");
|
|
2705
3144
|
const cellSharedProps = {
|
|
2706
3145
|
icon: String,
|
|
2707
3146
|
size: String,
|
|
3147
|
+
background: String,
|
|
2708
3148
|
title: numericProp,
|
|
2709
3149
|
value: numericProp,
|
|
2710
3150
|
label: numericProp,
|
|
3151
|
+
labelClickable: Boolean,
|
|
3152
|
+
labelIcon: String,
|
|
3153
|
+
showLabelIcon: {
|
|
3154
|
+
type: Boolean,
|
|
3155
|
+
default: void 0
|
|
3156
|
+
},
|
|
2711
3157
|
description: numericProp,
|
|
3158
|
+
descriptionClickable: Boolean,
|
|
3159
|
+
multiLineNotes: Array,
|
|
3160
|
+
showMultiLineNotes: {
|
|
3161
|
+
type: Boolean,
|
|
3162
|
+
default: void 0
|
|
3163
|
+
},
|
|
3164
|
+
showTitleCollapseIcon: Boolean,
|
|
3165
|
+
defaultMultiLineNotesCollapsed: Boolean,
|
|
2712
3166
|
threeLine: Boolean,
|
|
2713
3167
|
labelSize: numericProp,
|
|
2714
3168
|
avatar: String,
|
|
3169
|
+
showAvatar: {
|
|
3170
|
+
type: Boolean,
|
|
3171
|
+
default: void 0
|
|
3172
|
+
},
|
|
2715
3173
|
rightAvatar: String,
|
|
3174
|
+
showRightAvatar: {
|
|
3175
|
+
type: Boolean,
|
|
3176
|
+
default: void 0
|
|
3177
|
+
},
|
|
2716
3178
|
tags: Array,
|
|
3179
|
+
showTags: {
|
|
3180
|
+
type: Boolean,
|
|
3181
|
+
default: void 0
|
|
3182
|
+
},
|
|
3183
|
+
titleTag: numericProp,
|
|
3184
|
+
showTitleTag: {
|
|
3185
|
+
type: Boolean,
|
|
3186
|
+
default: void 0
|
|
3187
|
+
},
|
|
3188
|
+
wrapTags: Array,
|
|
3189
|
+
showWrapTags: {
|
|
3190
|
+
type: Boolean,
|
|
3191
|
+
default: void 0
|
|
3192
|
+
},
|
|
2717
3193
|
titleIcon: String,
|
|
3194
|
+
titleIconClickable: Boolean,
|
|
3195
|
+
showTitleIcon: {
|
|
3196
|
+
type: Boolean,
|
|
3197
|
+
default: void 0
|
|
3198
|
+
},
|
|
2718
3199
|
rightIcon: String,
|
|
3200
|
+
showIcon: {
|
|
3201
|
+
type: Boolean,
|
|
3202
|
+
default: void 0
|
|
3203
|
+
},
|
|
3204
|
+
showRightIcon: {
|
|
3205
|
+
type: Boolean,
|
|
3206
|
+
default: void 0
|
|
3207
|
+
},
|
|
2719
3208
|
note: numericProp,
|
|
3209
|
+
showNote: {
|
|
3210
|
+
type: Boolean,
|
|
3211
|
+
default: void 0
|
|
3212
|
+
},
|
|
2720
3213
|
noteBold: Boolean,
|
|
2721
3214
|
noteClickable: Boolean,
|
|
2722
3215
|
noteTo: routeProps.to,
|
|
2723
3216
|
noteUrl: String,
|
|
2724
3217
|
noteReplace: Boolean,
|
|
2725
3218
|
badge: numericProp,
|
|
3219
|
+
showBadge: {
|
|
3220
|
+
type: Boolean,
|
|
3221
|
+
default: void 0
|
|
3222
|
+
},
|
|
2726
3223
|
leftSelect: {
|
|
2727
3224
|
type: Boolean,
|
|
2728
3225
|
default: void 0
|
|
2729
3226
|
},
|
|
3227
|
+
showLeftSelect: {
|
|
3228
|
+
type: Boolean,
|
|
3229
|
+
default: void 0
|
|
3230
|
+
},
|
|
2730
3231
|
rightSelect: {
|
|
2731
3232
|
type: Boolean,
|
|
2732
3233
|
default: void 0
|
|
2733
3234
|
},
|
|
3235
|
+
showRightSelect: {
|
|
3236
|
+
type: Boolean,
|
|
3237
|
+
default: void 0
|
|
3238
|
+
},
|
|
2734
3239
|
selectType: {
|
|
2735
3240
|
type: String,
|
|
2736
3241
|
default: "checkbox"
|
|
2737
3242
|
},
|
|
2738
3243
|
blueMark: Boolean,
|
|
3244
|
+
showBlueMark: {
|
|
3245
|
+
type: Boolean,
|
|
3246
|
+
default: void 0
|
|
3247
|
+
},
|
|
2739
3248
|
titleBold: Boolean,
|
|
2740
3249
|
center: Boolean,
|
|
2741
3250
|
isLink: Boolean,
|
|
@@ -2754,10 +3263,10 @@ const cellSharedProps = {
|
|
|
2754
3263
|
}
|
|
2755
3264
|
};
|
|
2756
3265
|
const cellProps = extend({}, cellSharedProps, routeProps);
|
|
2757
|
-
var stdin_default$
|
|
2758
|
-
name: name$
|
|
3266
|
+
var stdin_default$1L = defineComponent({
|
|
3267
|
+
name: name$1C,
|
|
2759
3268
|
props: cellProps,
|
|
2760
|
-
emits: ["click", "click-note", "update:leftSelect", "update:rightSelect"],
|
|
3269
|
+
emits: ["click", "click-label", "click-description", "click-note", "click-title-icon", "update:leftSelect", "update:rightSelect", "update:multiLineNotesCollapsed"],
|
|
2761
3270
|
setup(props2, {
|
|
2762
3271
|
slots,
|
|
2763
3272
|
emit
|
|
@@ -2768,6 +3277,8 @@ var stdin_default$1O = defineComponent({
|
|
|
2768
3277
|
const vm = getCurrentInstance().proxy;
|
|
2769
3278
|
const leftSelectState = ref((_a = props2.leftSelect) != null ? _a : false);
|
|
2770
3279
|
const rightSelectState = ref((_b = props2.rightSelect) != null ? _b : false);
|
|
3280
|
+
const multiLineNotesCollapsed = ref(props2.defaultMultiLineNotesCollapsed);
|
|
3281
|
+
const isVisible = (show, hasContent) => show != null ? show : hasContent;
|
|
2771
3282
|
watch(() => props2.leftSelect, (value) => {
|
|
2772
3283
|
if (isDef(value)) {
|
|
2773
3284
|
leftSelectState.value = value;
|
|
@@ -2778,7 +3289,12 @@ var stdin_default$1O = defineComponent({
|
|
|
2778
3289
|
rightSelectState.value = value;
|
|
2779
3290
|
}
|
|
2780
3291
|
});
|
|
2781
|
-
const
|
|
3292
|
+
const isSelectVisible = (position) => {
|
|
3293
|
+
const show = position === "left" ? props2.showLeftSelect : props2.showRightSelect;
|
|
3294
|
+
const select = position === "left" ? props2.leftSelect : props2.rightSelect;
|
|
3295
|
+
return isVisible(show, !!slots[`${position}-select`] || isDef(select));
|
|
3296
|
+
};
|
|
3297
|
+
const hasSelect = (position) => isSelectVisible(position) && isDef(position === "left" ? props2.leftSelect : props2.rightSelect);
|
|
2782
3298
|
const getSelectState = (position) => position === "left" ? leftSelectState.value : rightSelectState.value;
|
|
2783
3299
|
const updateSelectState = (position, value) => {
|
|
2784
3300
|
if (position === "left") {
|
|
@@ -2799,32 +3315,95 @@ var stdin_default$1O = defineComponent({
|
|
|
2799
3315
|
return false;
|
|
2800
3316
|
};
|
|
2801
3317
|
const renderLabel = () => {
|
|
3318
|
+
var _a2;
|
|
2802
3319
|
const showLabel = slots.label || isDef(props2.label);
|
|
3320
|
+
const showLabelIcon = (_a2 = props2.showLabelIcon) != null ? _a2 : !!(slots["label-icon"] || props2.labelIcon);
|
|
2803
3321
|
if (showLabel) {
|
|
2804
3322
|
return createVNode("div", {
|
|
2805
|
-
"class": [bem$
|
|
3323
|
+
"class": [bem$1y("label", {
|
|
3324
|
+
clickable: props2.labelClickable
|
|
3325
|
+
}), props2.labelClass],
|
|
2806
3326
|
"style": {
|
|
2807
3327
|
fontSize: addUnit(props2.labelSize)
|
|
3328
|
+
},
|
|
3329
|
+
"role": props2.labelClickable ? "button" : void 0,
|
|
3330
|
+
"tabindex": props2.labelClickable ? 0 : void 0,
|
|
3331
|
+
"onClick": (event) => {
|
|
3332
|
+
if (!props2.labelClickable)
|
|
3333
|
+
return;
|
|
3334
|
+
event.stopPropagation();
|
|
3335
|
+
emit("click-label", event);
|
|
2808
3336
|
}
|
|
2809
|
-
}, [slots
|
|
3337
|
+
}, [showLabelIcon && slots["label-icon"] ? createVNode("span", {
|
|
3338
|
+
"class": bem$1y("label-icon")
|
|
3339
|
+
}, [slots["label-icon"]()]) : showLabelIcon ? createVNode(Icon, {
|
|
3340
|
+
"name": props2.labelIcon || "location-o",
|
|
3341
|
+
"class": bem$1y("label-icon"),
|
|
3342
|
+
"classPrefix": props2.iconPrefix
|
|
3343
|
+
}, null) : null, createVNode("span", null, [slots.label ? slots.label() : props2.label])]);
|
|
2810
3344
|
}
|
|
2811
3345
|
};
|
|
2812
3346
|
const renderDescription = () => {
|
|
2813
3347
|
const showDescription = slots.description || isDef(props2.description);
|
|
2814
3348
|
if (showDescription) {
|
|
2815
3349
|
return createVNode("div", {
|
|
2816
|
-
"class": bem$
|
|
3350
|
+
"class": bem$1y("description", {
|
|
3351
|
+
clickable: props2.descriptionClickable
|
|
3352
|
+
}),
|
|
3353
|
+
"role": props2.descriptionClickable ? "button" : void 0,
|
|
3354
|
+
"tabindex": props2.descriptionClickable ? 0 : void 0,
|
|
3355
|
+
"onClick": (event) => {
|
|
3356
|
+
if (!props2.descriptionClickable)
|
|
3357
|
+
return;
|
|
3358
|
+
event.stopPropagation();
|
|
3359
|
+
emit("click-description", event);
|
|
3360
|
+
}
|
|
2817
3361
|
}, [slots.description ? slots.description() : props2.description]);
|
|
2818
3362
|
}
|
|
2819
3363
|
};
|
|
3364
|
+
const renderMultiLineNotes = () => {
|
|
3365
|
+
var _a2, _b2;
|
|
3366
|
+
if (!isVisible(props2.showMultiLineNotes, !!slots["multi-line-notes"] || !!((_a2 = props2.multiLineNotes) == null ? void 0 : _a2.length))) {
|
|
3367
|
+
return;
|
|
3368
|
+
}
|
|
3369
|
+
if (slots["multi-line-notes"]) {
|
|
3370
|
+
return createVNode("div", {
|
|
3371
|
+
"class": bem$1y("multi-line-notes")
|
|
3372
|
+
}, [slots["multi-line-notes"]()]);
|
|
3373
|
+
}
|
|
3374
|
+
if ((_b2 = props2.multiLineNotes) == null ? void 0 : _b2.length) {
|
|
3375
|
+
return createVNode("div", {
|
|
3376
|
+
"class": bem$1y("multi-line-notes")
|
|
3377
|
+
}, [props2.multiLineNotes.map((note, index) => createVNode("div", {
|
|
3378
|
+
"key": `${note}-${index}`,
|
|
3379
|
+
"class": bem$1y("multi-line-note")
|
|
3380
|
+
}, [note]))]);
|
|
3381
|
+
}
|
|
3382
|
+
};
|
|
2820
3383
|
const renderTitle = () => {
|
|
2821
3384
|
if (slots.title || isDef(props2.title)) {
|
|
2822
3385
|
return createVNode("div", {
|
|
2823
|
-
"class": [bem$
|
|
3386
|
+
"class": [bem$1y("title"), props2.titleClass],
|
|
2824
3387
|
"style": props2.titleStyle
|
|
2825
3388
|
}, [createVNode("div", {
|
|
2826
|
-
"class": bem$
|
|
2827
|
-
|
|
3389
|
+
"class": bem$1y("title-row", {
|
|
3390
|
+
collapsible: props2.showTitleCollapseIcon
|
|
3391
|
+
}),
|
|
3392
|
+
"onClick": (event) => {
|
|
3393
|
+
if (props2.showTitleCollapseIcon) {
|
|
3394
|
+
event.stopPropagation();
|
|
3395
|
+
multiLineNotesCollapsed.value = !multiLineNotesCollapsed.value;
|
|
3396
|
+
emit("update:multiLineNotesCollapsed", multiLineNotesCollapsed.value);
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
}, [props2.showTitleCollapseIcon && createVNode("div", {
|
|
3400
|
+
"class": bem$1y("title-collapse-action")
|
|
3401
|
+
}, [createVNode(Icon, {
|
|
3402
|
+
"name": "trangle-down",
|
|
3403
|
+
"class": bem$1y("title-collapse-icon", {
|
|
3404
|
+
collapsed: multiLineNotesCollapsed.value
|
|
3405
|
+
})
|
|
3406
|
+
}, null)]), slots.title ? slots.title() : createVNode("span", null, [props2.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props2.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
2828
3407
|
}
|
|
2829
3408
|
};
|
|
2830
3409
|
const renderValue = () => {
|
|
@@ -2833,20 +3412,23 @@ var stdin_default$1O = defineComponent({
|
|
|
2833
3412
|
if (hasValue) {
|
|
2834
3413
|
const hasTitle = slots.title || isDef(props2.title);
|
|
2835
3414
|
return createVNode("div", {
|
|
2836
|
-
"class": [bem$
|
|
3415
|
+
"class": [bem$1y("value", {
|
|
2837
3416
|
alone: !hasTitle
|
|
2838
3417
|
}), props2.valueClass]
|
|
2839
3418
|
}, [slot ? slot() : createVNode("span", null, [props2.value])]);
|
|
2840
3419
|
}
|
|
2841
3420
|
};
|
|
2842
3421
|
const renderLeftIcon = () => {
|
|
3422
|
+
if (!isVisible(props2.showIcon, !!slots.icon || !!props2.icon)) {
|
|
3423
|
+
return;
|
|
3424
|
+
}
|
|
2843
3425
|
if (slots.icon) {
|
|
2844
3426
|
return slots.icon();
|
|
2845
3427
|
}
|
|
2846
3428
|
if (props2.icon) {
|
|
2847
3429
|
return createVNode(Icon, {
|
|
2848
3430
|
"name": props2.icon,
|
|
2849
|
-
"class": bem$
|
|
3431
|
+
"class": bem$1y("left-icon"),
|
|
2850
3432
|
"classPrefix": props2.iconPrefix
|
|
2851
3433
|
}, null);
|
|
2852
3434
|
}
|
|
@@ -2855,15 +3437,18 @@ var stdin_default$1O = defineComponent({
|
|
|
2855
3437
|
var _a2, _b2;
|
|
2856
3438
|
const slot = slots[`${position}-select`];
|
|
2857
3439
|
const selected = getSelectState(position);
|
|
3440
|
+
if (!isSelectVisible(position)) {
|
|
3441
|
+
return;
|
|
3442
|
+
}
|
|
2858
3443
|
if (slot) {
|
|
2859
3444
|
return createVNode("div", {
|
|
2860
|
-
"class": bem$
|
|
3445
|
+
"class": bem$1y(`${position}-select`)
|
|
2861
3446
|
}, [slot()]);
|
|
2862
3447
|
}
|
|
2863
3448
|
if (hasSelect(position)) {
|
|
2864
3449
|
const checkboxSize = (_b2 = (_a2 = props2.size) != null ? _a2 : config == null ? void 0 : config.cellSize) != null ? _b2 : "normal";
|
|
2865
3450
|
return createVNode("div", {
|
|
2866
|
-
"class": bem$
|
|
3451
|
+
"class": bem$1y(`${position}-select`),
|
|
2867
3452
|
"onClick": (event) => event.stopPropagation()
|
|
2868
3453
|
}, [props2.selectType === "radio" ? createVNode(Radio, {
|
|
2869
3454
|
"modelValue": selected ? "selected" : "",
|
|
@@ -2882,63 +3467,125 @@ var stdin_default$1O = defineComponent({
|
|
|
2882
3467
|
const renderAvatar = (position) => {
|
|
2883
3468
|
const slot = slots[`${position}-avatar`];
|
|
2884
3469
|
const avatar = position === "left" ? props2.avatar : props2.rightAvatar;
|
|
3470
|
+
const show = position === "left" ? props2.showAvatar : props2.showRightAvatar;
|
|
3471
|
+
if (!isVisible(show, !!slot || !!avatar)) {
|
|
3472
|
+
return;
|
|
3473
|
+
}
|
|
2885
3474
|
if (slot) {
|
|
2886
3475
|
return createVNode("div", {
|
|
2887
|
-
"class": bem$
|
|
3476
|
+
"class": bem$1y(`${position}-avatar`)
|
|
2888
3477
|
}, [slot()]);
|
|
2889
3478
|
}
|
|
2890
3479
|
if (avatar) {
|
|
2891
3480
|
return createVNode("img", {
|
|
2892
|
-
"class": bem$
|
|
3481
|
+
"class": bem$1y(`${position}-avatar`),
|
|
2893
3482
|
"src": avatar,
|
|
2894
3483
|
"alt": ""
|
|
2895
3484
|
}, null);
|
|
2896
3485
|
}
|
|
2897
3486
|
};
|
|
2898
3487
|
const renderBlueMark = () => {
|
|
3488
|
+
if (!isVisible(props2.showBlueMark, !!slots["blue-mark"] || props2.blueMark)) {
|
|
3489
|
+
return;
|
|
3490
|
+
}
|
|
2899
3491
|
if (slots["blue-mark"]) {
|
|
2900
3492
|
return createVNode("div", {
|
|
2901
|
-
"class": bem$
|
|
3493
|
+
"class": bem$1y("blue-mark")
|
|
2902
3494
|
}, [slots["blue-mark"]()]);
|
|
2903
3495
|
}
|
|
2904
3496
|
if (props2.blueMark) {
|
|
2905
3497
|
return createVNode("span", {
|
|
2906
|
-
"class": bem$
|
|
3498
|
+
"class": bem$1y("blue-mark")
|
|
2907
3499
|
}, null);
|
|
2908
3500
|
}
|
|
2909
3501
|
};
|
|
2910
3502
|
const renderTags = () => {
|
|
2911
|
-
var _a2;
|
|
3503
|
+
var _a2, _b2;
|
|
3504
|
+
if (!isVisible(props2.showTags, !!slots.tags || !!((_a2 = props2.tags) == null ? void 0 : _a2.length))) {
|
|
3505
|
+
return;
|
|
3506
|
+
}
|
|
2912
3507
|
if (slots.tags) {
|
|
2913
3508
|
return createVNode("div", {
|
|
2914
|
-
"class": bem$
|
|
3509
|
+
"class": bem$1y("tags")
|
|
2915
3510
|
}, [slots.tags()]);
|
|
2916
3511
|
}
|
|
2917
|
-
if ((
|
|
3512
|
+
if ((_b2 = props2.tags) == null ? void 0 : _b2.length) {
|
|
2918
3513
|
return createVNode("div", {
|
|
2919
|
-
"class": bem$
|
|
3514
|
+
"class": bem$1y("tags")
|
|
2920
3515
|
}, [props2.tags.map((tag, index) => createVNode("span", {
|
|
2921
3516
|
"key": `${tag}-${index}`,
|
|
2922
|
-
"class": bem$
|
|
3517
|
+
"class": bem$1y("tag")
|
|
2923
3518
|
}, [tag]))]);
|
|
2924
3519
|
}
|
|
2925
3520
|
};
|
|
2926
|
-
const
|
|
2927
|
-
if (slots["title-
|
|
3521
|
+
const renderTitleTag = () => {
|
|
3522
|
+
if (!isVisible(props2.showTitleTag, !!slots["title-tag"] || isDef(props2.titleTag))) {
|
|
3523
|
+
return;
|
|
3524
|
+
}
|
|
3525
|
+
if (slots["title-tag"]) {
|
|
2928
3526
|
return createVNode("div", {
|
|
2929
|
-
"class": bem$
|
|
2930
|
-
}, [slots["title-
|
|
3527
|
+
"class": bem$1y("title-tag")
|
|
3528
|
+
}, [slots["title-tag"]()]);
|
|
2931
3529
|
}
|
|
2932
|
-
if (props2.
|
|
2933
|
-
return createVNode(
|
|
2934
|
-
"
|
|
2935
|
-
|
|
2936
|
-
|
|
3530
|
+
if (isDef(props2.titleTag)) {
|
|
3531
|
+
return createVNode("div", {
|
|
3532
|
+
"class": bem$1y("title-tag")
|
|
3533
|
+
}, [createVNode(Tag, {
|
|
3534
|
+
"size": "small"
|
|
3535
|
+
}, {
|
|
3536
|
+
default: () => [props2.titleTag]
|
|
3537
|
+
})]);
|
|
3538
|
+
}
|
|
3539
|
+
};
|
|
3540
|
+
const renderWrapTags = () => {
|
|
3541
|
+
var _a2, _b2;
|
|
3542
|
+
if (!isVisible(props2.showWrapTags, !!slots["wrap-tags"] || !!((_a2 = props2.wrapTags) == null ? void 0 : _a2.length))) {
|
|
3543
|
+
return;
|
|
2937
3544
|
}
|
|
3545
|
+
if (slots["wrap-tags"]) {
|
|
3546
|
+
return createVNode("div", {
|
|
3547
|
+
"class": bem$1y("wrap-tags")
|
|
3548
|
+
}, [slots["wrap-tags"]()]);
|
|
3549
|
+
}
|
|
3550
|
+
if ((_b2 = props2.wrapTags) == null ? void 0 : _b2.length) {
|
|
3551
|
+
return createVNode("div", {
|
|
3552
|
+
"class": bem$1y("wrap-tags")
|
|
3553
|
+
}, [props2.wrapTags.map((tag, index) => createVNode(Tag, {
|
|
3554
|
+
"key": `${tag}-${index}`
|
|
3555
|
+
}, {
|
|
3556
|
+
default: () => [tag]
|
|
3557
|
+
}))]);
|
|
3558
|
+
}
|
|
3559
|
+
};
|
|
3560
|
+
const renderTitleIcon = () => {
|
|
3561
|
+
if (!isVisible(props2.showTitleIcon, !!slots["title-icon"] || !!props2.titleIcon)) {
|
|
3562
|
+
return;
|
|
3563
|
+
}
|
|
3564
|
+
const icon = slots["title-icon"] ? slots["title-icon"]() : props2.titleIcon ? createVNode(Icon, {
|
|
3565
|
+
"name": props2.titleIcon
|
|
3566
|
+
}, null) : void 0;
|
|
3567
|
+
if (!icon)
|
|
3568
|
+
return;
|
|
3569
|
+
if (props2.titleIconClickable) {
|
|
3570
|
+
return createVNode("button", {
|
|
3571
|
+
"type": "button",
|
|
3572
|
+
"class": bem$1y("title-icon", {
|
|
3573
|
+
clickable: true
|
|
3574
|
+
}),
|
|
3575
|
+
"aria-label": `操作${props2.title || ""}`,
|
|
3576
|
+
"onClick": (event) => {
|
|
3577
|
+
event.stopPropagation();
|
|
3578
|
+
emit("click-title-icon", event);
|
|
3579
|
+
}
|
|
3580
|
+
}, [icon]);
|
|
3581
|
+
}
|
|
3582
|
+
return createVNode("div", {
|
|
3583
|
+
"class": bem$1y("title-icon")
|
|
3584
|
+
}, [icon]);
|
|
2938
3585
|
};
|
|
2939
3586
|
const renderNoteContent = (content) => {
|
|
2940
3587
|
const clickable = props2.noteClickable || props2.noteTo || props2.noteUrl;
|
|
2941
|
-
const classes = bem$
|
|
3588
|
+
const classes = bem$1y("note", {
|
|
2942
3589
|
bold: props2.noteBold,
|
|
2943
3590
|
clickable
|
|
2944
3591
|
});
|
|
@@ -2963,6 +3610,9 @@ var stdin_default$1O = defineComponent({
|
|
|
2963
3610
|
}, [content]);
|
|
2964
3611
|
};
|
|
2965
3612
|
const renderNote = () => {
|
|
3613
|
+
if (!isVisible(props2.showNote, !!slots.note || isDef(props2.note))) {
|
|
3614
|
+
return;
|
|
3615
|
+
}
|
|
2966
3616
|
if (slots.note) {
|
|
2967
3617
|
return renderNoteContent(slots.note());
|
|
2968
3618
|
}
|
|
@@ -2971,14 +3621,17 @@ var stdin_default$1O = defineComponent({
|
|
|
2971
3621
|
}
|
|
2972
3622
|
};
|
|
2973
3623
|
const renderBadge = () => {
|
|
3624
|
+
if (!isVisible(props2.showBadge, !!slots.badge || isDef(props2.badge))) {
|
|
3625
|
+
return;
|
|
3626
|
+
}
|
|
2974
3627
|
if (slots.badge) {
|
|
2975
3628
|
return createVNode("div", {
|
|
2976
|
-
"class": bem$
|
|
3629
|
+
"class": bem$1y("badge")
|
|
2977
3630
|
}, [slots.badge()]);
|
|
2978
3631
|
}
|
|
2979
3632
|
if (isDef(props2.badge)) {
|
|
2980
3633
|
return createVNode("div", {
|
|
2981
|
-
"class": bem$
|
|
3634
|
+
"class": bem$1y("badge")
|
|
2982
3635
|
}, [createVNode(Badge, {
|
|
2983
3636
|
"content": props2.badge,
|
|
2984
3637
|
"showZero": true
|
|
@@ -2986,25 +3639,34 @@ var stdin_default$1O = defineComponent({
|
|
|
2986
3639
|
}
|
|
2987
3640
|
};
|
|
2988
3641
|
const renderRightIcon = () => {
|
|
3642
|
+
if (!isVisible(props2.showRightIcon, !!slots["right-icon"] || !!props2.rightIcon || props2.isLink)) {
|
|
3643
|
+
return;
|
|
3644
|
+
}
|
|
2989
3645
|
if (slots["right-icon"]) {
|
|
2990
|
-
return
|
|
3646
|
+
return createVNode("div", {
|
|
3647
|
+
"class": bem$1y("right-icon-action")
|
|
3648
|
+
}, [slots["right-icon"]()]);
|
|
2991
3649
|
}
|
|
2992
3650
|
if (props2.rightIcon) {
|
|
2993
|
-
return createVNode(
|
|
3651
|
+
return createVNode("div", {
|
|
3652
|
+
"class": bem$1y("right-icon-action")
|
|
3653
|
+
}, [createVNode(Icon, {
|
|
2994
3654
|
"name": props2.rightIcon,
|
|
2995
|
-
"class": bem$
|
|
2996
|
-
}, null);
|
|
3655
|
+
"class": bem$1y("right-icon")
|
|
3656
|
+
}, null)]);
|
|
2997
3657
|
}
|
|
2998
3658
|
if (props2.isLink) {
|
|
2999
3659
|
const name2 = props2.arrowDirection && props2.arrowDirection !== "right" ? `arrow-${props2.arrowDirection}` : "arrow";
|
|
3000
|
-
return createVNode(
|
|
3660
|
+
return createVNode("div", {
|
|
3661
|
+
"class": bem$1y("right-icon-action")
|
|
3662
|
+
}, [createVNode(Icon, {
|
|
3001
3663
|
"name": name2,
|
|
3002
|
-
"class": bem$
|
|
3003
|
-
}, null);
|
|
3664
|
+
"class": bem$1y("right-icon")
|
|
3665
|
+
}, null)]);
|
|
3004
3666
|
}
|
|
3005
3667
|
};
|
|
3006
3668
|
return () => {
|
|
3007
|
-
var _a2, _b2, _c;
|
|
3669
|
+
var _a2, _b2, _c, _d;
|
|
3008
3670
|
const {
|
|
3009
3671
|
size,
|
|
3010
3672
|
center,
|
|
@@ -3016,15 +3678,17 @@ var stdin_default$1O = defineComponent({
|
|
|
3016
3678
|
threeLine
|
|
3017
3679
|
} = props2;
|
|
3018
3680
|
const clickable = (_a2 = props2.clickable) != null ? _a2 : isLink || rightIcon === "arrow" || hasSelect("left") || hasSelect("right");
|
|
3019
|
-
const hasBadge = !!slots.badge || isDef(props2.badge);
|
|
3020
|
-
const
|
|
3681
|
+
const hasBadge = isVisible(props2.showBadge, !!slots.badge || isDef(props2.badge));
|
|
3682
|
+
const hasMultiLineNotes = isVisible(props2.showMultiLineNotes, !!slots["multi-line-notes"] || !!((_b2 = props2.multiLineNotes) == null ? void 0 : _b2.length));
|
|
3683
|
+
const cellSize = (_c = size != null ? size : config == null ? void 0 : config.cellSize) != null ? _c : "normal";
|
|
3021
3684
|
const classes = {
|
|
3022
3685
|
center: center || hasBadge,
|
|
3023
3686
|
required,
|
|
3024
3687
|
"title-bold": titleBold,
|
|
3025
3688
|
clickable,
|
|
3026
3689
|
borderless: !border,
|
|
3027
|
-
"three-line": threeLine
|
|
3690
|
+
"three-line": threeLine,
|
|
3691
|
+
"multi-line-notes": hasMultiLineNotes
|
|
3028
3692
|
};
|
|
3029
3693
|
if (cellSize) {
|
|
3030
3694
|
classes[cellSize] = !!cellSize;
|
|
@@ -3036,16 +3700,19 @@ var stdin_default$1O = defineComponent({
|
|
|
3036
3700
|
}
|
|
3037
3701
|
};
|
|
3038
3702
|
return createVNode("div", {
|
|
3039
|
-
"class": [bem$
|
|
3703
|
+
"class": [bem$1y(classes), props2.errorBorder ? "van-cell-error-border" : ""],
|
|
3704
|
+
"style": props2.background ? {
|
|
3705
|
+
background: props2.background
|
|
3706
|
+
} : void 0,
|
|
3040
3707
|
"role": clickable ? "button" : void 0,
|
|
3041
3708
|
"tabindex": clickable ? 0 : void 0,
|
|
3042
3709
|
"onClick": onClick
|
|
3043
|
-
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (
|
|
3710
|
+
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (_d = slots.extra) == null ? void 0 : _d.call(slots)]);
|
|
3044
3711
|
};
|
|
3045
3712
|
}
|
|
3046
3713
|
});
|
|
3047
|
-
const Cell = withInstall(stdin_default$
|
|
3048
|
-
const [name$
|
|
3714
|
+
const Cell = withInstall(stdin_default$1L);
|
|
3715
|
+
const [name$1B, bem$1x] = createNamespace("form");
|
|
3049
3716
|
const formProps = {
|
|
3050
3717
|
colon: Boolean,
|
|
3051
3718
|
disabled: Boolean,
|
|
@@ -3064,8 +3731,8 @@ const formProps = {
|
|
|
3064
3731
|
default: "onBlur"
|
|
3065
3732
|
}
|
|
3066
3733
|
};
|
|
3067
|
-
var stdin_default$
|
|
3068
|
-
name: name$
|
|
3734
|
+
var stdin_default$1K = defineComponent({
|
|
3735
|
+
name: name$1B,
|
|
3069
3736
|
props: formProps,
|
|
3070
3737
|
emits: ["submit", "failed"],
|
|
3071
3738
|
setup(props2, {
|
|
@@ -3189,13 +3856,13 @@ var stdin_default$1N = defineComponent({
|
|
|
3189
3856
|
return () => {
|
|
3190
3857
|
var _a;
|
|
3191
3858
|
return createVNode("form", {
|
|
3192
|
-
"class": bem$
|
|
3859
|
+
"class": bem$1x(),
|
|
3193
3860
|
"onSubmit": onSubmit
|
|
3194
3861
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3195
3862
|
};
|
|
3196
3863
|
}
|
|
3197
3864
|
});
|
|
3198
|
-
const Form = withInstall(stdin_default$
|
|
3865
|
+
const Form = withInstall(stdin_default$1K);
|
|
3199
3866
|
function isEmptyValue(value) {
|
|
3200
3867
|
if (Array.isArray(value)) {
|
|
3201
3868
|
return !value.length;
|
|
@@ -3293,7 +3960,7 @@ function useId() {
|
|
|
3293
3960
|
}
|
|
3294
3961
|
return `${name2}-${++current}`;
|
|
3295
3962
|
}
|
|
3296
|
-
const [name$
|
|
3963
|
+
const [name$1A, bem$1w] = createNamespace("field");
|
|
3297
3964
|
const fieldSharedProps = {
|
|
3298
3965
|
id: String,
|
|
3299
3966
|
name: String,
|
|
@@ -3335,6 +4002,11 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
3335
4002
|
labelClass: unknownProp,
|
|
3336
4003
|
labelAlign: String,
|
|
3337
4004
|
labelPosition: String,
|
|
4005
|
+
unit: numericProp,
|
|
4006
|
+
showUnit: {
|
|
4007
|
+
type: Boolean,
|
|
4008
|
+
default: void 0
|
|
4009
|
+
},
|
|
3338
4010
|
showWordLimit: Boolean,
|
|
3339
4011
|
errorMessageAlign: String,
|
|
3340
4012
|
colon: {
|
|
@@ -3346,10 +4018,10 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
3346
4018
|
default: false
|
|
3347
4019
|
}
|
|
3348
4020
|
});
|
|
3349
|
-
var stdin_default$
|
|
3350
|
-
name: name$
|
|
4021
|
+
var stdin_default$1J = defineComponent({
|
|
4022
|
+
name: name$1A,
|
|
3351
4023
|
props: fieldProps,
|
|
3352
|
-
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
|
|
4024
|
+
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "click-title-icon", "update:modelValue"],
|
|
3353
4025
|
setup(props2, {
|
|
3354
4026
|
emit,
|
|
3355
4027
|
slots
|
|
@@ -3620,7 +4292,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3620
4292
|
const getInputId = () => props2.id || `${id}-input`;
|
|
3621
4293
|
const getValidationStatus = () => state.status;
|
|
3622
4294
|
const renderInput = () => {
|
|
3623
|
-
const controlClass = bem$
|
|
4295
|
+
const controlClass = bem$1w("control", [inputAlign.value, {
|
|
3624
4296
|
error: showError.value,
|
|
3625
4297
|
custom: !!slots.input,
|
|
3626
4298
|
"min-height": props2.type === "textarea" && !props2.autosize
|
|
@@ -3662,7 +4334,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3662
4334
|
const leftIconSlot = slots["left-icon"];
|
|
3663
4335
|
if (props2.leftIcon || leftIconSlot) {
|
|
3664
4336
|
return createVNode("div", {
|
|
3665
|
-
"class": bem$
|
|
4337
|
+
"class": bem$1w("left-icon"),
|
|
3666
4338
|
"onClick": onClickLeftIcon
|
|
3667
4339
|
}, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
|
|
3668
4340
|
"name": props2.leftIcon,
|
|
@@ -3674,7 +4346,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3674
4346
|
const rightIconSlot = slots["right-icon"];
|
|
3675
4347
|
if (props2.rightIcon || rightIconSlot) {
|
|
3676
4348
|
return createVNode("div", {
|
|
3677
|
-
"class": bem$
|
|
4349
|
+
"class": bem$1w("right-icon"),
|
|
3678
4350
|
"onClick": onClickRightIcon
|
|
3679
4351
|
}, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
|
|
3680
4352
|
"name": props2.rightIcon,
|
|
@@ -3682,13 +4354,23 @@ var stdin_default$1M = defineComponent({
|
|
|
3682
4354
|
}, null)]);
|
|
3683
4355
|
}
|
|
3684
4356
|
};
|
|
4357
|
+
const renderUnit = () => {
|
|
4358
|
+
var _a;
|
|
4359
|
+
const showUnit = (_a = props2.showUnit) != null ? _a : isDef(props2.unit);
|
|
4360
|
+
if (!showUnit || !isDef(props2.unit)) {
|
|
4361
|
+
return;
|
|
4362
|
+
}
|
|
4363
|
+
return createVNode("span", {
|
|
4364
|
+
"class": bem$1w("unit")
|
|
4365
|
+
}, [props2.unit]);
|
|
4366
|
+
};
|
|
3685
4367
|
const renderWordLimit = () => {
|
|
3686
4368
|
if (props2.showWordLimit && props2.maxlength) {
|
|
3687
4369
|
const count = getStringLength(getModelValue());
|
|
3688
4370
|
return createVNode("div", {
|
|
3689
|
-
"class": bem$
|
|
4371
|
+
"class": bem$1w("word-limit")
|
|
3690
4372
|
}, [createVNode("span", {
|
|
3691
|
-
"class": bem$
|
|
4373
|
+
"class": bem$1w("word-num")
|
|
3692
4374
|
}, [count]), createTextVNode("/"), props2.maxlength]);
|
|
3693
4375
|
}
|
|
3694
4376
|
};
|
|
@@ -3701,7 +4383,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3701
4383
|
const slot = slots["error-message"];
|
|
3702
4384
|
const errorMessageAlign = getProp("errorMessageAlign");
|
|
3703
4385
|
return createVNode("div", {
|
|
3704
|
-
"class": bem$
|
|
4386
|
+
"class": bem$1w("error-message", errorMessageAlign)
|
|
3705
4387
|
}, [slot ? slot({
|
|
3706
4388
|
message
|
|
3707
4389
|
}) : message]);
|
|
@@ -3720,13 +4402,13 @@ var stdin_default$1M = defineComponent({
|
|
|
3720
4402
|
}
|
|
3721
4403
|
};
|
|
3722
4404
|
const renderFieldBody = () => [createVNode("div", {
|
|
3723
|
-
"class": bem$
|
|
3724
|
-
}, [renderInput(), showClear.value && createVNode(Icon, {
|
|
4405
|
+
"class": bem$1w("body")
|
|
4406
|
+
}, [renderInput(), renderUnit(), showClear.value && createVNode(Icon, {
|
|
3725
4407
|
"ref": clearIconRef,
|
|
3726
4408
|
"name": props2.clearIcon,
|
|
3727
|
-
"class": bem$
|
|
4409
|
+
"class": bem$1w("clear")
|
|
3728
4410
|
}, null), renderRightIcon(), slots.button && createVNode("div", {
|
|
3729
|
-
"class": bem$
|
|
4411
|
+
"class": bem$1w("button")
|
|
3730
4412
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
|
3731
4413
|
useExpose({
|
|
3732
4414
|
blur,
|
|
@@ -3765,7 +4447,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3765
4447
|
return createVNode(Cell, {
|
|
3766
4448
|
"size": props2.size,
|
|
3767
4449
|
"icon": props2.leftIcon,
|
|
3768
|
-
"class": bem$
|
|
4450
|
+
"class": bem$1w({
|
|
3769
4451
|
error: showError.value,
|
|
3770
4452
|
disabled,
|
|
3771
4453
|
[`label-${labelAlign}`]: labelAlign,
|
|
@@ -3776,9 +4458,13 @@ var stdin_default$1M = defineComponent({
|
|
|
3776
4458
|
"errorBorder": props2.errorBorder,
|
|
3777
4459
|
"isLink": props2.isLink,
|
|
3778
4460
|
"clickable": props2.clickable,
|
|
4461
|
+
"titleIcon": props2.titleIcon,
|
|
4462
|
+
"titleIconClickable": props2.titleIconClickable,
|
|
4463
|
+
"showTitleIcon": props2.showTitleIcon,
|
|
4464
|
+
"onClick-title-icon": (event) => emit("click-title-icon", event),
|
|
3779
4465
|
"titleStyle": labelStyle.value,
|
|
3780
|
-
"valueClass": bem$
|
|
3781
|
-
"titleClass": [bem$
|
|
4466
|
+
"valueClass": bem$1w("value"),
|
|
4467
|
+
"titleClass": [bem$1w("label", [labelAlign, {
|
|
3782
4468
|
required: props2.required
|
|
3783
4469
|
}]), props2.labelClass],
|
|
3784
4470
|
"arrowDirection": props2.arrowDirection
|
|
@@ -3791,7 +4477,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3791
4477
|
};
|
|
3792
4478
|
}
|
|
3793
4479
|
});
|
|
3794
|
-
const Field = withInstall(stdin_default$
|
|
4480
|
+
const Field = withInstall(stdin_default$1J);
|
|
3795
4481
|
function usePopupState() {
|
|
3796
4482
|
const state = reactive({
|
|
3797
4483
|
show: false
|
|
@@ -3838,7 +4524,7 @@ function lockClick(lock) {
|
|
|
3838
4524
|
}
|
|
3839
4525
|
}
|
|
3840
4526
|
}
|
|
3841
|
-
const [name$
|
|
4527
|
+
const [name$1z, bem$1v] = createNamespace("toast");
|
|
3842
4528
|
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
|
3843
4529
|
const toastProps = {
|
|
3844
4530
|
icon: String,
|
|
@@ -3860,8 +4546,8 @@ const toastProps = {
|
|
|
3860
4546
|
closeOnClick: Boolean,
|
|
3861
4547
|
closeOnClickOverlay: Boolean
|
|
3862
4548
|
};
|
|
3863
|
-
var stdin_default$
|
|
3864
|
-
name: name$
|
|
4549
|
+
var stdin_default$1I = defineComponent({
|
|
4550
|
+
name: name$1z,
|
|
3865
4551
|
props: toastProps,
|
|
3866
4552
|
emits: ["update:show"],
|
|
3867
4553
|
setup(props2, {
|
|
@@ -3896,13 +4582,13 @@ var stdin_default$1L = defineComponent({
|
|
|
3896
4582
|
return createVNode(Icon, {
|
|
3897
4583
|
"name": icon || type,
|
|
3898
4584
|
"size": iconSize,
|
|
3899
|
-
"class": bem$
|
|
4585
|
+
"class": bem$1v("icon"),
|
|
3900
4586
|
"classPrefix": iconPrefix
|
|
3901
4587
|
}, null);
|
|
3902
4588
|
}
|
|
3903
4589
|
if (type === "loading") {
|
|
3904
4590
|
return createVNode(Loading, {
|
|
3905
|
-
"class": bem$
|
|
4591
|
+
"class": bem$1v("loading"),
|
|
3906
4592
|
"size": iconSize,
|
|
3907
4593
|
"type": loadingType
|
|
3908
4594
|
}, null);
|
|
@@ -3916,10 +4602,10 @@ var stdin_default$1L = defineComponent({
|
|
|
3916
4602
|
if (isDef(message) && message !== "") {
|
|
3917
4603
|
return type === "html" ? createVNode("div", {
|
|
3918
4604
|
"key": 0,
|
|
3919
|
-
"class": bem$
|
|
4605
|
+
"class": bem$1v("text"),
|
|
3920
4606
|
"innerHTML": String(message)
|
|
3921
4607
|
}, null) : createVNode("div", {
|
|
3922
|
-
"class": bem$
|
|
4608
|
+
"class": bem$1v("text")
|
|
3923
4609
|
}, [message]);
|
|
3924
4610
|
}
|
|
3925
4611
|
};
|
|
@@ -3935,7 +4621,7 @@ var stdin_default$1L = defineComponent({
|
|
|
3935
4621
|
onMounted(toggleClickable);
|
|
3936
4622
|
onUnmounted(toggleClickable);
|
|
3937
4623
|
return () => createVNode(Popup, mergeProps({
|
|
3938
|
-
"class": [bem$
|
|
4624
|
+
"class": [bem$1v([props2.position, {
|
|
3939
4625
|
[props2.type]: !props2.icon
|
|
3940
4626
|
}]), props2.className],
|
|
3941
4627
|
"lockScroll": false,
|
|
@@ -4004,7 +4690,7 @@ function createInstance() {
|
|
|
4004
4690
|
onClosed,
|
|
4005
4691
|
"onUpdate:show": toggle
|
|
4006
4692
|
};
|
|
4007
|
-
return createVNode(stdin_default$
|
|
4693
|
+
return createVNode(stdin_default$1I, mergeProps(state, attrs), null);
|
|
4008
4694
|
};
|
|
4009
4695
|
watch(message, (val) => {
|
|
4010
4696
|
state.message = val;
|
|
@@ -4076,10 +4762,10 @@ Toast.allowMultiple = (value = true) => {
|
|
|
4076
4762
|
allowMultiple = value;
|
|
4077
4763
|
};
|
|
4078
4764
|
Toast.install = (app) => {
|
|
4079
|
-
app.use(withInstall(stdin_default$
|
|
4765
|
+
app.use(withInstall(stdin_default$1I));
|
|
4080
4766
|
app.config.globalProperties.$toast = Toast;
|
|
4081
4767
|
};
|
|
4082
|
-
const [name$
|
|
4768
|
+
const [name$1y, bem$1u] = createNamespace("switch");
|
|
4083
4769
|
const switchProps = {
|
|
4084
4770
|
size: numericProp,
|
|
4085
4771
|
loading: Boolean,
|
|
@@ -4096,8 +4782,8 @@ const switchProps = {
|
|
|
4096
4782
|
default: false
|
|
4097
4783
|
}
|
|
4098
4784
|
};
|
|
4099
|
-
var stdin_default$
|
|
4100
|
-
name: name$
|
|
4785
|
+
var stdin_default$1H = defineComponent({
|
|
4786
|
+
name: name$1y,
|
|
4101
4787
|
props: switchProps,
|
|
4102
4788
|
emits: ["change", "update:modelValue"],
|
|
4103
4789
|
setup(props2, {
|
|
@@ -4116,7 +4802,7 @@ var stdin_default$1K = defineComponent({
|
|
|
4116
4802
|
if (props2.loading) {
|
|
4117
4803
|
const color = isChecked() ? props2.activeColor : props2.inactiveColor;
|
|
4118
4804
|
return createVNode(Loading, {
|
|
4119
|
-
"class": bem$
|
|
4805
|
+
"class": bem$1u("loading"),
|
|
4120
4806
|
"color": color
|
|
4121
4807
|
}, null);
|
|
4122
4808
|
}
|
|
@@ -4141,7 +4827,7 @@ var stdin_default$1K = defineComponent({
|
|
|
4141
4827
|
};
|
|
4142
4828
|
return createVNode("div", {
|
|
4143
4829
|
"role": "switch",
|
|
4144
|
-
"class": bem$
|
|
4830
|
+
"class": bem$1u({
|
|
4145
4831
|
on: checked,
|
|
4146
4832
|
loading,
|
|
4147
4833
|
disabled
|
|
@@ -4151,16 +4837,16 @@ var stdin_default$1K = defineComponent({
|
|
|
4151
4837
|
"aria-checked": checked,
|
|
4152
4838
|
"onClick": onClick
|
|
4153
4839
|
}, [createVNode("div", {
|
|
4154
|
-
"class": bem$
|
|
4840
|
+
"class": bem$1u("node")
|
|
4155
4841
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
|
4156
4842
|
};
|
|
4157
4843
|
}
|
|
4158
4844
|
});
|
|
4159
|
-
const Switch = withInstall(stdin_default$
|
|
4160
|
-
const [name$
|
|
4845
|
+
const Switch = withInstall(stdin_default$1H);
|
|
4846
|
+
const [name$1x, bem$1t] = createNamespace("address-edit-detail");
|
|
4161
4847
|
const t$i = createNamespace("address-edit")[2];
|
|
4162
|
-
var stdin_default$
|
|
4163
|
-
name: name$
|
|
4848
|
+
var stdin_default$1G = defineComponent({
|
|
4849
|
+
name: name$1x,
|
|
4164
4850
|
props: {
|
|
4165
4851
|
show: Boolean,
|
|
4166
4852
|
rows: numericProp,
|
|
@@ -4183,7 +4869,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4183
4869
|
};
|
|
4184
4870
|
const renderSearchTitle = (express) => {
|
|
4185
4871
|
if (express.name) {
|
|
4186
|
-
const text = express.name.replace(props2.value, `<span class=${bem$
|
|
4872
|
+
const text = express.name.replace(props2.value, `<span class=${bem$1t("keyword")}>${props2.value}</span>`);
|
|
4187
4873
|
return createVNode("div", {
|
|
4188
4874
|
"innerHTML": text
|
|
4189
4875
|
}, null);
|
|
@@ -4201,7 +4887,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4201
4887
|
"key": express.name + express.address,
|
|
4202
4888
|
"icon": "location-o",
|
|
4203
4889
|
"label": express.address,
|
|
4204
|
-
"class": bem$
|
|
4890
|
+
"class": bem$1t("search-item"),
|
|
4205
4891
|
"border": false,
|
|
4206
4892
|
"onClick": () => onSelect(express)
|
|
4207
4893
|
}, {
|
|
@@ -4217,7 +4903,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4217
4903
|
"autosize": true,
|
|
4218
4904
|
"clearable": true,
|
|
4219
4905
|
"ref": field,
|
|
4220
|
-
"class": bem$
|
|
4906
|
+
"class": bem$1t(),
|
|
4221
4907
|
"rows": props2.rows,
|
|
4222
4908
|
"type": "textarea",
|
|
4223
4909
|
"rules": props2.rules,
|
|
@@ -4234,7 +4920,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4234
4920
|
};
|
|
4235
4921
|
}
|
|
4236
4922
|
});
|
|
4237
|
-
const [name$
|
|
4923
|
+
const [name$1w, bem$1s, t$h] = createNamespace("address-edit");
|
|
4238
4924
|
const DEFAULT_DATA = {
|
|
4239
4925
|
name: "",
|
|
4240
4926
|
tel: "",
|
|
@@ -4281,8 +4967,8 @@ const addressEditProps = {
|
|
|
4281
4967
|
default: isPostal
|
|
4282
4968
|
}
|
|
4283
4969
|
};
|
|
4284
|
-
var stdin_default$
|
|
4285
|
-
name: name$
|
|
4970
|
+
var stdin_default$1F = defineComponent({
|
|
4971
|
+
name: name$1w,
|
|
4286
4972
|
props: addressEditProps,
|
|
4287
4973
|
emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
|
|
4288
4974
|
setup(props2, {
|
|
@@ -4408,7 +5094,7 @@ var stdin_default$1I = defineComponent({
|
|
|
4408
5094
|
return withDirectives(createVNode(Cell, {
|
|
4409
5095
|
"center": true,
|
|
4410
5096
|
"title": t$h("defaultAddress"),
|
|
4411
|
-
"class": bem$
|
|
5097
|
+
"class": bem$1s("default")
|
|
4412
5098
|
}, slots2), [[vShow, !hideBottomFields.value]]);
|
|
4413
5099
|
}
|
|
4414
5100
|
};
|
|
@@ -4430,13 +5116,13 @@ var stdin_default$1I = defineComponent({
|
|
|
4430
5116
|
disableArea
|
|
4431
5117
|
} = props2;
|
|
4432
5118
|
return createVNode(Form, {
|
|
4433
|
-
"class": bem$
|
|
5119
|
+
"class": bem$1s(),
|
|
4434
5120
|
"onSubmit": onSave
|
|
4435
5121
|
}, {
|
|
4436
5122
|
default: () => {
|
|
4437
5123
|
var _a;
|
|
4438
5124
|
return [createVNode("div", {
|
|
4439
|
-
"class": bem$
|
|
5125
|
+
"class": bem$1s("fields")
|
|
4440
5126
|
}, [createVNode(Field, {
|
|
4441
5127
|
"modelValue": data.name,
|
|
4442
5128
|
"onUpdate:modelValue": ($event) => data.name = $event,
|
|
@@ -4467,7 +5153,7 @@ var stdin_default$1I = defineComponent({
|
|
|
4467
5153
|
emit("click-area");
|
|
4468
5154
|
showAreaPopup.value = !disableArea;
|
|
4469
5155
|
}
|
|
4470
|
-
}, null), [[vShow, props2.showArea]]), createVNode(stdin_default$
|
|
5156
|
+
}, null), [[vShow, props2.showArea]]), createVNode(stdin_default$1G, {
|
|
4471
5157
|
"show": props2.showDetail,
|
|
4472
5158
|
"rows": props2.detailRows,
|
|
4473
5159
|
"rules": rules.value.addressDetail,
|
|
@@ -4478,153 +5164,64 @@ var stdin_default$1I = defineComponent({
|
|
|
4478
5164
|
"showSearchResult": props2.showSearchResult,
|
|
4479
5165
|
"onBlur": onDetailBlur,
|
|
4480
5166
|
"onFocus": () => onFocus("addressDetail"),
|
|
4481
|
-
"onInput": onChangeDetail,
|
|
4482
|
-
"onSelect-search": (event) => emit("select-search", event)
|
|
4483
|
-
}, null), props2.showPostal && withDirectives(createVNode(Field, {
|
|
4484
|
-
"modelValue": data.postalCode,
|
|
4485
|
-
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
|
4486
|
-
"type": "tel",
|
|
4487
|
-
"rules": rules.value.postalCode,
|
|
4488
|
-
"label": t$h("postal"),
|
|
4489
|
-
"maxlength": "6",
|
|
4490
|
-
"placeholder": t$h("postal"),
|
|
4491
|
-
"onFocus": () => onFocus("postalCode")
|
|
4492
|
-
}, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
|
4493
|
-
"class": bem$
|
|
4494
|
-
}, [createVNode(Button, {
|
|
4495
|
-
"block": true,
|
|
4496
|
-
"round": true,
|
|
4497
|
-
"type": "primary",
|
|
4498
|
-
"text": props2.saveButtonText || t$h("save"),
|
|
4499
|
-
"class": bem$
|
|
4500
|
-
"loading": props2.isSaving,
|
|
4501
|
-
"nativeType": "submit"
|
|
4502
|
-
}, null), props2.showDelete && createVNode(Button, {
|
|
4503
|
-
"block": true,
|
|
4504
|
-
"round": true,
|
|
4505
|
-
"class": bem$
|
|
4506
|
-
"loading": props2.isDeleting,
|
|
4507
|
-
"text": props2.deleteButtonText || t$h("delete"),
|
|
4508
|
-
"onClick": onDelete
|
|
4509
|
-
}, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
|
|
4510
|
-
"show": showAreaPopup.value,
|
|
4511
|
-
"onUpdate:show": ($event) => showAreaPopup.value = $event,
|
|
4512
|
-
"round": true,
|
|
4513
|
-
"teleport": "body",
|
|
4514
|
-
"position": "bottom",
|
|
4515
|
-
"lazyRender": false
|
|
4516
|
-
}, {
|
|
4517
|
-
default: () => [createVNode(Area, {
|
|
4518
|
-
"ref": areaRef,
|
|
4519
|
-
"value": data.areaCode,
|
|
4520
|
-
"loading": !areaListLoaded.value,
|
|
4521
|
-
"areaList": props2.areaList,
|
|
4522
|
-
"columnsPlaceholder": props2.areaColumnsPlaceholder,
|
|
4523
|
-
"onConfirm": onAreaConfirm,
|
|
4524
|
-
"onCancel": () => {
|
|
4525
|
-
showAreaPopup.value = false;
|
|
4526
|
-
}
|
|
4527
|
-
}, null)]
|
|
4528
|
-
})];
|
|
4529
|
-
}
|
|
4530
|
-
});
|
|
4531
|
-
};
|
|
4532
|
-
}
|
|
4533
|
-
});
|
|
4534
|
-
const AddressEdit = withInstall(stdin_default$1I);
|
|
4535
|
-
const RadioGroup = withInstall(stdin_default$1Q);
|
|
4536
|
-
const [name$1y, bem$1u] = createNamespace("tag");
|
|
4537
|
-
const tagProps = {
|
|
4538
|
-
size: makeStringProp("medium"),
|
|
4539
|
-
mark: Boolean,
|
|
4540
|
-
show: truthProp,
|
|
4541
|
-
type: makeStringProp("gray"),
|
|
4542
|
-
color: String,
|
|
4543
|
-
plain: Boolean,
|
|
4544
|
-
round: Boolean,
|
|
4545
|
-
textColor: String,
|
|
4546
|
-
closeable: Boolean,
|
|
4547
|
-
rightIcon: String,
|
|
4548
|
-
number: [String, Number],
|
|
4549
|
-
showNumber: Boolean,
|
|
4550
|
-
numberColor: String
|
|
4551
|
-
};
|
|
4552
|
-
var stdin_default$1H = defineComponent({
|
|
4553
|
-
name: name$1y,
|
|
4554
|
-
props: tagProps,
|
|
4555
|
-
emits: ["close"],
|
|
4556
|
-
setup(props2, {
|
|
4557
|
-
slots,
|
|
4558
|
-
emit
|
|
4559
|
-
}) {
|
|
4560
|
-
const onClose = (event) => {
|
|
4561
|
-
event.stopPropagation();
|
|
4562
|
-
emit("close", event);
|
|
4563
|
-
};
|
|
4564
|
-
const getStyle = () => {
|
|
4565
|
-
if (props2.plain) {
|
|
4566
|
-
return {
|
|
4567
|
-
color: props2.textColor || props2.color,
|
|
4568
|
-
borderColor: props2.color
|
|
4569
|
-
};
|
|
4570
|
-
}
|
|
4571
|
-
return {
|
|
4572
|
-
color: props2.textColor,
|
|
4573
|
-
background: props2.color
|
|
4574
|
-
};
|
|
4575
|
-
};
|
|
4576
|
-
const renderTag = () => {
|
|
4577
|
-
var _a;
|
|
4578
|
-
const {
|
|
4579
|
-
type,
|
|
4580
|
-
mark,
|
|
4581
|
-
plain,
|
|
4582
|
-
round,
|
|
4583
|
-
size,
|
|
4584
|
-
closeable,
|
|
4585
|
-
rightIcon,
|
|
4586
|
-
number,
|
|
4587
|
-
showNumber,
|
|
4588
|
-
numberColor
|
|
4589
|
-
} = props2;
|
|
4590
|
-
const classes = {
|
|
4591
|
-
mark,
|
|
4592
|
-
plain,
|
|
4593
|
-
round
|
|
4594
|
-
};
|
|
4595
|
-
if (size) {
|
|
4596
|
-
classes[size] = size;
|
|
4597
|
-
}
|
|
4598
|
-
const CloseIcon = closeable && createVNode(Icon, {
|
|
4599
|
-
"name": "cross",
|
|
4600
|
-
"class": [bem$1u("close"), HAPTICS_FEEDBACK],
|
|
4601
|
-
"onClick": onClose
|
|
4602
|
-
}, null);
|
|
4603
|
-
const RightIcon = rightIcon && createVNode(Icon, {
|
|
4604
|
-
"name": rightIcon,
|
|
4605
|
-
"class": bem$1u("right-icon")
|
|
4606
|
-
}, null);
|
|
4607
|
-
return createVNode("span", {
|
|
4608
|
-
"style": getStyle(),
|
|
4609
|
-
"class": bem$1u([classes, type])
|
|
4610
|
-
}, [showNumber && number !== void 0 && createVNode("span", {
|
|
4611
|
-
"class": bem$1u("number"),
|
|
4612
|
-
"style": {
|
|
4613
|
-
color: numberColor
|
|
5167
|
+
"onInput": onChangeDetail,
|
|
5168
|
+
"onSelect-search": (event) => emit("select-search", event)
|
|
5169
|
+
}, null), props2.showPostal && withDirectives(createVNode(Field, {
|
|
5170
|
+
"modelValue": data.postalCode,
|
|
5171
|
+
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
|
5172
|
+
"type": "tel",
|
|
5173
|
+
"rules": rules.value.postalCode,
|
|
5174
|
+
"label": t$h("postal"),
|
|
5175
|
+
"maxlength": "6",
|
|
5176
|
+
"placeholder": t$h("postal"),
|
|
5177
|
+
"onFocus": () => onFocus("postalCode")
|
|
5178
|
+
}, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
|
5179
|
+
"class": bem$1s("buttons")
|
|
5180
|
+
}, [createVNode(Button, {
|
|
5181
|
+
"block": true,
|
|
5182
|
+
"round": true,
|
|
5183
|
+
"type": "primary",
|
|
5184
|
+
"text": props2.saveButtonText || t$h("save"),
|
|
5185
|
+
"class": bem$1s("button"),
|
|
5186
|
+
"loading": props2.isSaving,
|
|
5187
|
+
"nativeType": "submit"
|
|
5188
|
+
}, null), props2.showDelete && createVNode(Button, {
|
|
5189
|
+
"block": true,
|
|
5190
|
+
"round": true,
|
|
5191
|
+
"class": bem$1s("button"),
|
|
5192
|
+
"loading": props2.isDeleting,
|
|
5193
|
+
"text": props2.deleteButtonText || t$h("delete"),
|
|
5194
|
+
"onClick": onDelete
|
|
5195
|
+
}, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
|
|
5196
|
+
"show": showAreaPopup.value,
|
|
5197
|
+
"onUpdate:show": ($event) => showAreaPopup.value = $event,
|
|
5198
|
+
"round": true,
|
|
5199
|
+
"teleport": "body",
|
|
5200
|
+
"position": "bottom",
|
|
5201
|
+
"lazyRender": false
|
|
5202
|
+
}, {
|
|
5203
|
+
default: () => [createVNode(Area, {
|
|
5204
|
+
"ref": areaRef,
|
|
5205
|
+
"value": data.areaCode,
|
|
5206
|
+
"loading": !areaListLoaded.value,
|
|
5207
|
+
"areaList": props2.areaList,
|
|
5208
|
+
"columnsPlaceholder": props2.areaColumnsPlaceholder,
|
|
5209
|
+
"onConfirm": onAreaConfirm,
|
|
5210
|
+
"onCancel": () => {
|
|
5211
|
+
showAreaPopup.value = false;
|
|
5212
|
+
}
|
|
5213
|
+
}, null)]
|
|
5214
|
+
})];
|
|
4614
5215
|
}
|
|
4615
|
-
}
|
|
5216
|
+
});
|
|
4616
5217
|
};
|
|
4617
|
-
return () => createVNode(Transition, {
|
|
4618
|
-
"name": props2.closeable ? "van-fade" : void 0
|
|
4619
|
-
}, {
|
|
4620
|
-
default: () => [props2.show ? renderTag() : null]
|
|
4621
|
-
});
|
|
4622
5218
|
}
|
|
4623
5219
|
});
|
|
4624
|
-
const
|
|
4625
|
-
const
|
|
4626
|
-
|
|
4627
|
-
|
|
5220
|
+
const AddressEdit = withInstall(stdin_default$1F);
|
|
5221
|
+
const RadioGroup = withInstall(stdin_default$1O);
|
|
5222
|
+
const [name$1v, bem$1r] = createNamespace("address-item");
|
|
5223
|
+
var stdin_default$1E = defineComponent({
|
|
5224
|
+
name: name$1v,
|
|
4628
5225
|
props: {
|
|
4629
5226
|
address: makeRequiredProp(Object),
|
|
4630
5227
|
disabled: Boolean,
|
|
@@ -4644,7 +5241,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4644
5241
|
};
|
|
4645
5242
|
const renderRightIcon = () => createVNode(Icon, {
|
|
4646
5243
|
"name": "edit",
|
|
4647
|
-
"class": bem$
|
|
5244
|
+
"class": bem$1r("edit"),
|
|
4648
5245
|
"onClick": (event) => {
|
|
4649
5246
|
event.stopPropagation();
|
|
4650
5247
|
emit("edit");
|
|
@@ -4659,7 +5256,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4659
5256
|
return createVNode(Tag, {
|
|
4660
5257
|
"type": "danger",
|
|
4661
5258
|
"round": true,
|
|
4662
|
-
"class": bem$
|
|
5259
|
+
"class": bem$1r("tag")
|
|
4663
5260
|
}, {
|
|
4664
5261
|
default: () => [props2.defaultTagText]
|
|
4665
5262
|
});
|
|
@@ -4672,9 +5269,9 @@ var stdin_default$1G = defineComponent({
|
|
|
4672
5269
|
switchable
|
|
4673
5270
|
} = props2;
|
|
4674
5271
|
const Info = [createVNode("div", {
|
|
4675
|
-
"class": bem$
|
|
5272
|
+
"class": bem$1r("name")
|
|
4676
5273
|
}, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
|
|
4677
|
-
"class": bem$
|
|
5274
|
+
"class": bem$1r("address")
|
|
4678
5275
|
}, [address.address])];
|
|
4679
5276
|
if (switchable && !disabled) {
|
|
4680
5277
|
return createVNode(Radio, {
|
|
@@ -4692,13 +5289,13 @@ var stdin_default$1G = defineComponent({
|
|
|
4692
5289
|
disabled
|
|
4693
5290
|
} = props2;
|
|
4694
5291
|
return createVNode("div", {
|
|
4695
|
-
"class": bem$
|
|
5292
|
+
"class": bem$1r({
|
|
4696
5293
|
disabled
|
|
4697
5294
|
}),
|
|
4698
5295
|
"onClick": onClick
|
|
4699
5296
|
}, [createVNode(Cell, {
|
|
4700
5297
|
"border": false,
|
|
4701
|
-
"valueClass": bem$
|
|
5298
|
+
"valueClass": bem$1r("value")
|
|
4702
5299
|
}, {
|
|
4703
5300
|
value: renderContent,
|
|
4704
5301
|
"right-icon": renderRightIcon
|
|
@@ -4708,7 +5305,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4708
5305
|
};
|
|
4709
5306
|
}
|
|
4710
5307
|
});
|
|
4711
|
-
const [name$
|
|
5308
|
+
const [name$1u, bem$1q, t$g] = createNamespace("address-list");
|
|
4712
5309
|
const addressListProps = {
|
|
4713
5310
|
list: makeArrayProp(),
|
|
4714
5311
|
modelValue: numericProp,
|
|
@@ -4718,8 +5315,8 @@ const addressListProps = {
|
|
|
4718
5315
|
addButtonText: String,
|
|
4719
5316
|
defaultTagText: String
|
|
4720
5317
|
};
|
|
4721
|
-
var stdin_default$
|
|
4722
|
-
name: name$
|
|
5318
|
+
var stdin_default$1D = defineComponent({
|
|
5319
|
+
name: name$1u,
|
|
4723
5320
|
props: addressListProps,
|
|
4724
5321
|
emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
|
|
4725
5322
|
setup(props2, {
|
|
@@ -4735,7 +5332,7 @@ var stdin_default$1F = defineComponent({
|
|
|
4735
5332
|
emit("update:modelValue", item.id);
|
|
4736
5333
|
}
|
|
4737
5334
|
};
|
|
4738
|
-
return createVNode(stdin_default$
|
|
5335
|
+
return createVNode(stdin_default$1E, {
|
|
4739
5336
|
"key": item.id,
|
|
4740
5337
|
"address": item,
|
|
4741
5338
|
"disabled": disabled,
|
|
@@ -4755,13 +5352,13 @@ var stdin_default$1F = defineComponent({
|
|
|
4755
5352
|
}
|
|
4756
5353
|
};
|
|
4757
5354
|
const renderBottom = () => createVNode("div", {
|
|
4758
|
-
"class": [bem$
|
|
5355
|
+
"class": [bem$1q("bottom"), "van-safe-area-bottom"]
|
|
4759
5356
|
}, [createVNode(Button, {
|
|
4760
5357
|
"round": true,
|
|
4761
5358
|
"block": true,
|
|
4762
5359
|
"type": "primary",
|
|
4763
5360
|
"text": props2.addButtonText || t$g("add"),
|
|
4764
|
-
"class": bem$
|
|
5361
|
+
"class": bem$1q("add"),
|
|
4765
5362
|
"onClick": () => emit("add")
|
|
4766
5363
|
}, null)]);
|
|
4767
5364
|
return () => {
|
|
@@ -4769,10 +5366,10 @@ var stdin_default$1F = defineComponent({
|
|
|
4769
5366
|
const List2 = renderList(props2.list);
|
|
4770
5367
|
const DisabledList = renderList(props2.disabledList, true);
|
|
4771
5368
|
const DisabledText = props2.disabledText && createVNode("div", {
|
|
4772
|
-
"class": bem$
|
|
5369
|
+
"class": bem$1q("disabled-text")
|
|
4773
5370
|
}, [props2.disabledText]);
|
|
4774
5371
|
return createVNode("div", {
|
|
4775
|
-
"class": bem$
|
|
5372
|
+
"class": bem$1q()
|
|
4776
5373
|
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
|
|
4777
5374
|
"modelValue": props2.modelValue
|
|
4778
5375
|
}, {
|
|
@@ -4781,13 +5378,13 @@ var stdin_default$1F = defineComponent({
|
|
|
4781
5378
|
};
|
|
4782
5379
|
}
|
|
4783
5380
|
});
|
|
4784
|
-
const AddressList = withInstall(stdin_default$
|
|
4785
|
-
const [name$
|
|
5381
|
+
const AddressList = withInstall(stdin_default$1D);
|
|
5382
|
+
const [name$1t, bem$1p] = createNamespace("background");
|
|
4786
5383
|
const backgroundProps = {
|
|
4787
5384
|
theme: makeStringProp("default")
|
|
4788
5385
|
};
|
|
4789
|
-
var stdin_default$
|
|
4790
|
-
name: name$
|
|
5386
|
+
var stdin_default$1C = defineComponent({
|
|
5387
|
+
name: name$1t,
|
|
4791
5388
|
props: backgroundProps,
|
|
4792
5389
|
setup(props2, {
|
|
4793
5390
|
slots
|
|
@@ -4795,13 +5392,13 @@ var stdin_default$1E = defineComponent({
|
|
|
4795
5392
|
return () => {
|
|
4796
5393
|
var _a;
|
|
4797
5394
|
return createVNode("div", {
|
|
4798
|
-
"class": bem$
|
|
5395
|
+
"class": bem$1p([props2.theme])
|
|
4799
5396
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
4800
5397
|
};
|
|
4801
5398
|
}
|
|
4802
5399
|
});
|
|
4803
|
-
const Background = withInstall(stdin_default$
|
|
4804
|
-
const [name$
|
|
5400
|
+
const Background = withInstall(stdin_default$1C);
|
|
5401
|
+
const [name$1s, bem$1o] = createNamespace("blue-mark");
|
|
4805
5402
|
const blueMarkProps = {
|
|
4806
5403
|
size: {
|
|
4807
5404
|
type: String,
|
|
@@ -4815,8 +5412,8 @@ const blueMarkProps = {
|
|
|
4815
5412
|
gap: numericProp,
|
|
4816
5413
|
isLink: Boolean
|
|
4817
5414
|
};
|
|
4818
|
-
var stdin_default$
|
|
4819
|
-
name: name$
|
|
5415
|
+
var stdin_default$1B = defineComponent({
|
|
5416
|
+
name: name$1s,
|
|
4820
5417
|
props: blueMarkProps,
|
|
4821
5418
|
emits: ["click"],
|
|
4822
5419
|
setup(props2, {
|
|
@@ -4834,30 +5431,30 @@ var stdin_default$1D = defineComponent({
|
|
|
4834
5431
|
return () => {
|
|
4835
5432
|
var _a;
|
|
4836
5433
|
return createVNode("span", {
|
|
4837
|
-
"class": [name$
|
|
5434
|
+
"class": [name$1s, props2.size === "normal" ? "" : `${name$1s}--${props2.size}`, props2.isLink ? `${name$1s}--link` : ""],
|
|
4838
5435
|
"style": style.value,
|
|
4839
5436
|
"onClick": props2.isLink ? (event) => emit("click", event) : void 0
|
|
4840
5437
|
}, [createVNode("span", {
|
|
4841
|
-
"class": bem$
|
|
5438
|
+
"class": bem$1o("main")
|
|
4842
5439
|
}, [createVNode("span", {
|
|
4843
|
-
"class": bem$
|
|
5440
|
+
"class": bem$1o("mark")
|
|
4844
5441
|
}, null), createVNode("span", {
|
|
4845
|
-
"class": bem$
|
|
5442
|
+
"class": bem$1o("content")
|
|
4846
5443
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), props2.isLink && createVNode(stdin_default$22, {
|
|
4847
5444
|
"name": "arrow",
|
|
4848
|
-
"class": bem$
|
|
5445
|
+
"class": bem$1o("arrow")
|
|
4849
5446
|
}, null)]);
|
|
4850
5447
|
};
|
|
4851
5448
|
}
|
|
4852
5449
|
});
|
|
4853
|
-
const [name$
|
|
5450
|
+
const [name$1r, bem$1n] = createNamespace("divider");
|
|
4854
5451
|
const dividerProps = {
|
|
4855
5452
|
dashed: Boolean,
|
|
4856
5453
|
hairline: truthProp,
|
|
4857
5454
|
contentPosition: makeStringProp("center")
|
|
4858
5455
|
};
|
|
4859
|
-
var stdin_default$
|
|
4860
|
-
name: name$
|
|
5456
|
+
var stdin_default$1A = defineComponent({
|
|
5457
|
+
name: name$1r,
|
|
4861
5458
|
props: dividerProps,
|
|
4862
5459
|
setup(props2, {
|
|
4863
5460
|
slots
|
|
@@ -4866,7 +5463,7 @@ var stdin_default$1C = defineComponent({
|
|
|
4866
5463
|
var _a;
|
|
4867
5464
|
return createVNode("div", {
|
|
4868
5465
|
"role": "separator",
|
|
4869
|
-
"class": bem$
|
|
5466
|
+
"class": bem$1n({
|
|
4870
5467
|
dashed: props2.dashed,
|
|
4871
5468
|
hairline: props2.hairline,
|
|
4872
5469
|
[`content-${props2.contentPosition}`]: !!slots.default
|
|
@@ -4875,16 +5472,16 @@ var stdin_default$1C = defineComponent({
|
|
|
4875
5472
|
};
|
|
4876
5473
|
}
|
|
4877
5474
|
});
|
|
4878
|
-
const Divider = withInstall(stdin_default$
|
|
4879
|
-
const [name$
|
|
5475
|
+
const Divider = withInstall(stdin_default$1A);
|
|
5476
|
+
const [name$1q, bem$1m] = createNamespace("collapse-toggle");
|
|
4880
5477
|
const collapseToggleProps = {
|
|
4881
5478
|
modelValue: Boolean,
|
|
4882
5479
|
divider: Boolean,
|
|
4883
5480
|
expandText: makeStringProp("展开"),
|
|
4884
5481
|
collapseText: makeStringProp("收起")
|
|
4885
5482
|
};
|
|
4886
|
-
var stdin_default$
|
|
4887
|
-
name: name$
|
|
5483
|
+
var stdin_default$1z = defineComponent({
|
|
5484
|
+
name: name$1q,
|
|
4888
5485
|
props: collapseToggleProps,
|
|
4889
5486
|
emits: ["update:modelValue", "change"],
|
|
4890
5487
|
setup(props2, {
|
|
@@ -4903,7 +5500,7 @@ var stdin_default$1B = defineComponent({
|
|
|
4903
5500
|
const text = expanded ? props2.collapseText : props2.expandText;
|
|
4904
5501
|
return createVNode("button", {
|
|
4905
5502
|
"type": "button",
|
|
4906
|
-
"class": bem$
|
|
5503
|
+
"class": bem$1m({
|
|
4907
5504
|
expanded
|
|
4908
5505
|
}),
|
|
4909
5506
|
"aria-expanded": expanded,
|
|
@@ -4913,20 +5510,20 @@ var stdin_default$1B = defineComponent({
|
|
|
4913
5510
|
text
|
|
4914
5511
|
})) || text]), createVNode(Icon, {
|
|
4915
5512
|
"name": "arrow-down",
|
|
4916
|
-
"class": bem$
|
|
5513
|
+
"class": bem$1m("icon")
|
|
4917
5514
|
}, null)]);
|
|
4918
5515
|
};
|
|
4919
5516
|
return () => {
|
|
4920
5517
|
if (props2.divider) {
|
|
4921
5518
|
return createVNode("div", {
|
|
4922
|
-
"class": bem$
|
|
5519
|
+
"class": bem$1m("divider")
|
|
4923
5520
|
}, [createVNode(Divider, null, null), renderToggle(), createVNode(Divider, null, null)]);
|
|
4924
5521
|
}
|
|
4925
5522
|
return renderToggle();
|
|
4926
5523
|
};
|
|
4927
5524
|
}
|
|
4928
5525
|
});
|
|
4929
|
-
const [name$
|
|
5526
|
+
const [name$1p, bem$1l] = createNamespace("blue-mark-header");
|
|
4930
5527
|
const blueMarkHeaderProps = {
|
|
4931
5528
|
title: numericProp,
|
|
4932
5529
|
size: {
|
|
@@ -4940,8 +5537,8 @@ const blueMarkHeaderProps = {
|
|
|
4940
5537
|
expandText: String,
|
|
4941
5538
|
collapseText: String
|
|
4942
5539
|
};
|
|
4943
|
-
var stdin_default$
|
|
4944
|
-
name: name$
|
|
5540
|
+
var stdin_default$1y = defineComponent({
|
|
5541
|
+
name: name$1p,
|
|
4945
5542
|
props: blueMarkHeaderProps,
|
|
4946
5543
|
emits: ["click-action", "update:modelValue", "change"],
|
|
4947
5544
|
setup(props2, {
|
|
@@ -4956,226 +5553,56 @@ var stdin_default$1A = defineComponent({
|
|
|
4956
5553
|
if (props2.expandable) {
|
|
4957
5554
|
onChange(!props2.modelValue);
|
|
4958
5555
|
}
|
|
4959
|
-
};
|
|
4960
|
-
const onHeaderKeydown = (event) => {
|
|
4961
|
-
if (props2.expandable && (event.key === "Enter" || event.key === " ")) {
|
|
4962
|
-
event.preventDefault();
|
|
4963
|
-
onHeaderClick();
|
|
4964
|
-
}
|
|
4965
|
-
};
|
|
4966
|
-
return () => {
|
|
4967
|
-
var _a;
|
|
4968
|
-
return createVNode("div", {
|
|
4969
|
-
"class": bem$1n({
|
|
4970
|
-
expandable: props2.expandable
|
|
4971
|
-
}),
|
|
4972
|
-
"role": props2.expandable ? "button" : void 0,
|
|
4973
|
-
"tabindex": props2.expandable ? 0 : void 0,
|
|
4974
|
-
"aria-expanded": props2.expandable ? props2.modelValue : void 0,
|
|
4975
|
-
"onClick": onHeaderClick,
|
|
4976
|
-
"onKeydown": onHeaderKeydown
|
|
4977
|
-
}, [createVNode("div", {
|
|
4978
|
-
"class": bem$1n("main")
|
|
4979
|
-
}, [createVNode(stdin_default$1D, {
|
|
4980
|
-
"size": props2.size,
|
|
4981
|
-
"class": bem$1n("title")
|
|
4982
|
-
}, {
|
|
4983
|
-
default: () => [slots.title ? slots.title() : slots.default ? slots.default() : props2.title]
|
|
4984
|
-
}), props2.required && createVNode("span", {
|
|
4985
|
-
"class": bem$1n("required")
|
|
4986
|
-
}, [createTextVNode("*")]), slots.action ? createVNode("span", {
|
|
4987
|
-
"class": bem$1n("action"),
|
|
4988
|
-
"onClick": (event) => event.stopPropagation()
|
|
4989
|
-
}, [slots.action()]) : props2.actionText ? createVNode("button", {
|
|
4990
|
-
"type": "button",
|
|
4991
|
-
"class": bem$1n("action"),
|
|
4992
|
-
"onClick": (event) => {
|
|
4993
|
-
event.stopPropagation();
|
|
4994
|
-
emit("click-action");
|
|
4995
|
-
}
|
|
4996
|
-
}, [props2.actionText]) : null]), (_a = slots.extra) == null ? void 0 : _a.call(slots), props2.expandable && createVNode(stdin_default$1B, {
|
|
4997
|
-
"modelValue": props2.modelValue,
|
|
4998
|
-
"expandText": props2.expandText,
|
|
4999
|
-
"collapseText": props2.collapseText,
|
|
5000
|
-
"onUpdate:modelValue": onChange
|
|
5001
|
-
}, null)]);
|
|
5002
|
-
};
|
|
5003
|
-
}
|
|
5004
|
-
});
|
|
5005
|
-
const BlueMark = withInstall(stdin_default$1D);
|
|
5006
|
-
const BlueMarkHeader = withInstall(stdin_default$1A);
|
|
5007
|
-
const CollapseToggle = withInstall(stdin_default$1B);
|
|
5008
|
-
const [name$1q, bem$1m] = createNamespace("popover");
|
|
5009
|
-
const popupProps$2 = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
|
5010
|
-
const popoverProps = {
|
|
5011
|
-
show: Boolean,
|
|
5012
|
-
theme: makeStringProp("light"),
|
|
5013
|
-
overlay: Boolean,
|
|
5014
|
-
actions: makeArrayProp(),
|
|
5015
|
-
trigger: makeStringProp("click"),
|
|
5016
|
-
duration: numericProp,
|
|
5017
|
-
showArrow: truthProp,
|
|
5018
|
-
placement: makeStringProp("bottom"),
|
|
5019
|
-
iconPrefix: String,
|
|
5020
|
-
overlayClass: unknownProp,
|
|
5021
|
-
overlayStyle: Object,
|
|
5022
|
-
closeOnClickAction: truthProp,
|
|
5023
|
-
closeOnClickOverlay: truthProp,
|
|
5024
|
-
closeOnClickOutside: truthProp,
|
|
5025
|
-
offset: {
|
|
5026
|
-
type: Array,
|
|
5027
|
-
default: () => [0, 8]
|
|
5028
|
-
},
|
|
5029
|
-
teleport: {
|
|
5030
|
-
type: [String, Object],
|
|
5031
|
-
default: "body"
|
|
5032
|
-
}
|
|
5033
|
-
};
|
|
5034
|
-
var stdin_default$1z = defineComponent({
|
|
5035
|
-
name: name$1q,
|
|
5036
|
-
props: popoverProps,
|
|
5037
|
-
emits: ["select", "touchstart", "update:show"],
|
|
5038
|
-
setup(props2, {
|
|
5039
|
-
emit,
|
|
5040
|
-
slots,
|
|
5041
|
-
attrs
|
|
5042
|
-
}) {
|
|
5043
|
-
let popper;
|
|
5044
|
-
const popupRef = ref();
|
|
5045
|
-
const wrapperRef = ref();
|
|
5046
|
-
const popoverRef = ref();
|
|
5047
|
-
const getPopoverOptions = () => ({
|
|
5048
|
-
placement: props2.placement,
|
|
5049
|
-
modifiers: [{
|
|
5050
|
-
name: "computeStyles",
|
|
5051
|
-
options: {
|
|
5052
|
-
adaptive: false,
|
|
5053
|
-
gpuAcceleration: false
|
|
5054
|
-
}
|
|
5055
|
-
}, extend({}, offsetModifier, {
|
|
5056
|
-
options: {
|
|
5057
|
-
offset: props2.offset
|
|
5058
|
-
}
|
|
5059
|
-
})]
|
|
5060
|
-
});
|
|
5061
|
-
const createPopperInstance = () => {
|
|
5062
|
-
if (wrapperRef.value && popoverRef.value) {
|
|
5063
|
-
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
|
|
5064
|
-
}
|
|
5065
|
-
return null;
|
|
5066
|
-
};
|
|
5067
|
-
const updateLocation = () => {
|
|
5068
|
-
nextTick(() => {
|
|
5069
|
-
if (!props2.show) {
|
|
5070
|
-
return;
|
|
5071
|
-
}
|
|
5072
|
-
if (!popper) {
|
|
5073
|
-
popper = createPopperInstance();
|
|
5074
|
-
} else {
|
|
5075
|
-
popper.setOptions(getPopoverOptions());
|
|
5076
|
-
}
|
|
5077
|
-
});
|
|
5078
|
-
};
|
|
5079
|
-
const updateShow = (value) => emit("update:show", value);
|
|
5080
|
-
const onClickWrapper = () => {
|
|
5081
|
-
if (props2.trigger === "click") {
|
|
5082
|
-
updateShow(!props2.show);
|
|
5083
|
-
}
|
|
5084
|
-
};
|
|
5085
|
-
const onClickAction = (action, index) => {
|
|
5086
|
-
if (action.disabled) {
|
|
5087
|
-
return;
|
|
5088
|
-
}
|
|
5089
|
-
emit("select", action, index);
|
|
5090
|
-
if (props2.closeOnClickAction) {
|
|
5091
|
-
updateShow(false);
|
|
5092
|
-
}
|
|
5093
|
-
};
|
|
5094
|
-
const onClickAway = () => {
|
|
5095
|
-
if (props2.show && props2.closeOnClickOutside && (!props2.overlay || props2.closeOnClickOverlay)) {
|
|
5096
|
-
updateShow(false);
|
|
5097
|
-
}
|
|
5098
|
-
};
|
|
5099
|
-
const renderActionContent = (action, index) => {
|
|
5100
|
-
if (slots.action) {
|
|
5101
|
-
return slots.action({
|
|
5102
|
-
action,
|
|
5103
|
-
index
|
|
5104
|
-
});
|
|
5105
|
-
}
|
|
5106
|
-
return [action.icon && createVNode("div", {
|
|
5107
|
-
"class": bem$1m("action-icon")
|
|
5108
|
-
}, [createVNode(Icon, {
|
|
5109
|
-
"name": action.icon,
|
|
5110
|
-
"classPrefix": props2.iconPrefix
|
|
5111
|
-
}, null)]), createVNode("div", {
|
|
5112
|
-
"class": [bem$1m("action-text"), BORDER_BOTTOM]
|
|
5113
|
-
}, [action.text])];
|
|
5114
|
-
};
|
|
5115
|
-
const renderAction = (action, index) => {
|
|
5116
|
-
const {
|
|
5117
|
-
icon,
|
|
5118
|
-
color,
|
|
5119
|
-
disabled,
|
|
5120
|
-
className
|
|
5121
|
-
} = action;
|
|
5122
|
-
return createVNode("div", {
|
|
5123
|
-
"role": "menuitem",
|
|
5124
|
-
"class": [bem$1m("action", {
|
|
5125
|
-
disabled,
|
|
5126
|
-
"with-icon": icon
|
|
5127
|
-
}), className],
|
|
5128
|
-
"style": {
|
|
5129
|
-
color
|
|
5130
|
-
},
|
|
5131
|
-
"tabindex": disabled ? void 0 : 0,
|
|
5132
|
-
"aria-disabled": disabled || void 0,
|
|
5133
|
-
"onClick": () => onClickAction(action, index)
|
|
5134
|
-
}, [renderActionContent(action, index)]);
|
|
5135
|
-
};
|
|
5136
|
-
onMounted(() => {
|
|
5137
|
-
updateLocation();
|
|
5138
|
-
watchEffect(() => {
|
|
5139
|
-
var _a;
|
|
5140
|
-
popupRef.value = (_a = popoverRef.value) == null ? void 0 : _a.popupRef.value;
|
|
5141
|
-
});
|
|
5142
|
-
});
|
|
5143
|
-
onBeforeUnmount(() => {
|
|
5144
|
-
if (popper) {
|
|
5145
|
-
popper.destroy();
|
|
5146
|
-
popper = null;
|
|
5147
|
-
}
|
|
5148
|
-
});
|
|
5149
|
-
watch(() => [props2.show, props2.offset, props2.placement], updateLocation);
|
|
5150
|
-
useClickAway([wrapperRef, popupRef], onClickAway, {
|
|
5151
|
-
eventName: "touchstart"
|
|
5152
|
-
});
|
|
5556
|
+
};
|
|
5557
|
+
const onHeaderKeydown = (event) => {
|
|
5558
|
+
if (props2.expandable && (event.key === "Enter" || event.key === " ")) {
|
|
5559
|
+
event.preventDefault();
|
|
5560
|
+
onHeaderClick();
|
|
5561
|
+
}
|
|
5562
|
+
};
|
|
5153
5563
|
return () => {
|
|
5154
5564
|
var _a;
|
|
5155
|
-
return createVNode(
|
|
5156
|
-
"
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
"
|
|
5161
|
-
"
|
|
5162
|
-
"
|
|
5163
|
-
"
|
|
5164
|
-
|
|
5165
|
-
"
|
|
5166
|
-
},
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
})])
|
|
5565
|
+
return createVNode("div", {
|
|
5566
|
+
"class": bem$1l({
|
|
5567
|
+
expandable: props2.expandable
|
|
5568
|
+
}),
|
|
5569
|
+
"role": props2.expandable ? "button" : void 0,
|
|
5570
|
+
"tabindex": props2.expandable ? 0 : void 0,
|
|
5571
|
+
"aria-expanded": props2.expandable ? props2.modelValue : void 0,
|
|
5572
|
+
"onClick": onHeaderClick,
|
|
5573
|
+
"onKeydown": onHeaderKeydown
|
|
5574
|
+
}, [createVNode("div", {
|
|
5575
|
+
"class": bem$1l("main")
|
|
5576
|
+
}, [createVNode(stdin_default$1B, {
|
|
5577
|
+
"size": props2.size,
|
|
5578
|
+
"class": bem$1l("title")
|
|
5579
|
+
}, {
|
|
5580
|
+
default: () => [slots.title ? slots.title() : slots.default ? slots.default() : props2.title]
|
|
5581
|
+
}), props2.required && createVNode("span", {
|
|
5582
|
+
"class": bem$1l("required")
|
|
5583
|
+
}, [createTextVNode("*")]), slots.action ? createVNode("span", {
|
|
5584
|
+
"class": bem$1l("action"),
|
|
5585
|
+
"onClick": (event) => event.stopPropagation()
|
|
5586
|
+
}, [slots.action()]) : props2.actionText ? createVNode("button", {
|
|
5587
|
+
"type": "button",
|
|
5588
|
+
"class": bem$1l("action"),
|
|
5589
|
+
"onClick": (event) => {
|
|
5590
|
+
event.stopPropagation();
|
|
5591
|
+
emit("click-action");
|
|
5592
|
+
}
|
|
5593
|
+
}, [props2.actionText]) : null]), (_a = slots.extra) == null ? void 0 : _a.call(slots), props2.expandable && createVNode(stdin_default$1z, {
|
|
5594
|
+
"modelValue": props2.modelValue,
|
|
5595
|
+
"expandText": props2.expandText,
|
|
5596
|
+
"collapseText": props2.collapseText,
|
|
5597
|
+
"onUpdate:modelValue": onChange
|
|
5598
|
+
}, null)]);
|
|
5174
5599
|
};
|
|
5175
5600
|
}
|
|
5176
5601
|
});
|
|
5177
|
-
const
|
|
5178
|
-
const
|
|
5602
|
+
const BlueMark = withInstall(stdin_default$1B);
|
|
5603
|
+
const BlueMarkHeader = withInstall(stdin_default$1y);
|
|
5604
|
+
const CollapseToggle = withInstall(stdin_default$1z);
|
|
5605
|
+
const [name$1o, bem$1k] = createNamespace("bottom-action-bar");
|
|
5179
5606
|
const bottomActionBarProps = {
|
|
5180
5607
|
confirmText: makeStringProp("确定"),
|
|
5181
5608
|
confirmType: makeStringProp("primary"),
|
|
@@ -5202,8 +5629,8 @@ const bottomActionBarProps = {
|
|
|
5202
5629
|
checkboxActionDisabled: Boolean,
|
|
5203
5630
|
checkboxActionText: makeStringProp("保存为我的默认筛选")
|
|
5204
5631
|
};
|
|
5205
|
-
var stdin_default$
|
|
5206
|
-
name: name$
|
|
5632
|
+
var stdin_default$1x = defineComponent({
|
|
5633
|
+
name: name$1o,
|
|
5207
5634
|
props: bottomActionBarProps,
|
|
5208
5635
|
emits: ["confirm", "secondary", "icon", "more", "select-more-popover", "update:checkboxActionChecked", "checkbox-action-change"],
|
|
5209
5636
|
setup(props2, {
|
|
@@ -5212,18 +5639,18 @@ var stdin_default$1y = defineComponent({
|
|
|
5212
5639
|
}) {
|
|
5213
5640
|
const root = ref();
|
|
5214
5641
|
const morePopoverShow = ref(false);
|
|
5215
|
-
const renderPlaceholder = usePlaceholder(root, bem$
|
|
5642
|
+
const renderPlaceholder = usePlaceholder(root, bem$1k);
|
|
5216
5643
|
const renderIconAction = () => {
|
|
5217
5644
|
if (slots.icon) {
|
|
5218
5645
|
return createVNode("div", {
|
|
5219
|
-
"class": bem$
|
|
5646
|
+
"class": bem$1k("icon-action")
|
|
5220
5647
|
}, [slots.icon()]);
|
|
5221
5648
|
}
|
|
5222
5649
|
if (!props2.icon) {
|
|
5223
5650
|
return;
|
|
5224
5651
|
}
|
|
5225
5652
|
return createVNode(Button, {
|
|
5226
|
-
"class": bem$
|
|
5653
|
+
"class": bem$1k("icon-button"),
|
|
5227
5654
|
"icon": props2.icon,
|
|
5228
5655
|
"iconPrefix": props2.iconPrefix,
|
|
5229
5656
|
"disabled": props2.iconDisabled,
|
|
@@ -5239,7 +5666,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5239
5666
|
};
|
|
5240
5667
|
const renderMoreButton = (popoverEnabled = false) => createVNode("button", {
|
|
5241
5668
|
"type": "button",
|
|
5242
|
-
"class": bem$
|
|
5669
|
+
"class": bem$1k("more-action"),
|
|
5243
5670
|
"disabled": props2.moreDisabled,
|
|
5244
5671
|
"onClick": popoverEnabled ? void 0 : () => emit("more")
|
|
5245
5672
|
}, [createVNode(Badge, {
|
|
@@ -5249,30 +5676,30 @@ var stdin_default$1y = defineComponent({
|
|
|
5249
5676
|
}, {
|
|
5250
5677
|
default: () => [createVNode(Icon, {
|
|
5251
5678
|
"name": props2.moreIcon || "more-o",
|
|
5252
|
-
"class": bem$
|
|
5679
|
+
"class": bem$1k("more-icon"),
|
|
5253
5680
|
"classPrefix": props2.iconPrefix
|
|
5254
5681
|
}, null)]
|
|
5255
5682
|
}), createVNode("span", {
|
|
5256
|
-
"class": bem$
|
|
5683
|
+
"class": bem$1k("more-text")
|
|
5257
5684
|
}, [props2.moreText])]);
|
|
5258
5685
|
const renderMorePopoverAction = (action, index) => createVNode("button", {
|
|
5259
5686
|
"type": "button",
|
|
5260
|
-
"class": bem$
|
|
5687
|
+
"class": bem$1k("more-popover-action", {
|
|
5261
5688
|
disabled: action.disabled
|
|
5262
5689
|
}),
|
|
5263
5690
|
"disabled": action.disabled,
|
|
5264
5691
|
"onClick": () => onSelectMorePopover(action, index)
|
|
5265
5692
|
}, [action.icon && createVNode(Icon, {
|
|
5266
5693
|
"name": action.icon,
|
|
5267
|
-
"class": bem$
|
|
5694
|
+
"class": bem$1k("more-popover-icon"),
|
|
5268
5695
|
"classPrefix": props2.iconPrefix
|
|
5269
5696
|
}, null), createVNode("span", {
|
|
5270
|
-
"class": bem$
|
|
5697
|
+
"class": bem$1k("more-popover-text")
|
|
5271
5698
|
}, [action.text])]);
|
|
5272
5699
|
const renderMoreAction = () => {
|
|
5273
5700
|
if (slots.more) {
|
|
5274
5701
|
return createVNode("div", {
|
|
5275
|
-
"class": bem$
|
|
5702
|
+
"class": bem$1k("more-action")
|
|
5276
5703
|
}, [slots.more()]);
|
|
5277
5704
|
}
|
|
5278
5705
|
if (!props2.moreText) {
|
|
@@ -5283,7 +5710,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5283
5710
|
}
|
|
5284
5711
|
return createVNode(Popover, {
|
|
5285
5712
|
"show": morePopoverShow.value,
|
|
5286
|
-
"class": bem$
|
|
5713
|
+
"class": bem$1k("more-popover"),
|
|
5287
5714
|
"placement": "top-start",
|
|
5288
5715
|
"showArrow": false,
|
|
5289
5716
|
"offset": [-5, 8],
|
|
@@ -5303,7 +5730,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5303
5730
|
return;
|
|
5304
5731
|
}
|
|
5305
5732
|
return createVNode(Button, {
|
|
5306
|
-
"class": bem$
|
|
5733
|
+
"class": bem$1k("secondary"),
|
|
5307
5734
|
"type": props2.secondaryType,
|
|
5308
5735
|
"text": props2.secondaryText,
|
|
5309
5736
|
"loading": props2.secondaryLoading,
|
|
@@ -5316,7 +5743,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5316
5743
|
return slots.confirm();
|
|
5317
5744
|
}
|
|
5318
5745
|
return createVNode(Button, {
|
|
5319
|
-
"class": bem$
|
|
5746
|
+
"class": bem$1k("confirm"),
|
|
5320
5747
|
"type": props2.confirmType,
|
|
5321
5748
|
"text": props2.confirmText,
|
|
5322
5749
|
"loading": props2.confirmLoading,
|
|
@@ -5329,9 +5756,9 @@ var stdin_default$1y = defineComponent({
|
|
|
5329
5756
|
return;
|
|
5330
5757
|
}
|
|
5331
5758
|
return createVNode("div", {
|
|
5332
|
-
"class": bem$
|
|
5759
|
+
"class": bem$1k("checkbox-action")
|
|
5333
5760
|
}, [createVNode("div", {
|
|
5334
|
-
"class": bem$
|
|
5761
|
+
"class": bem$1k("checkbox-action-content")
|
|
5335
5762
|
}, [createVNode(Checkbox, {
|
|
5336
5763
|
"modelValue": props2.checkboxActionChecked,
|
|
5337
5764
|
"disabled": props2.checkboxActionDisabled,
|
|
@@ -5346,19 +5773,19 @@ var stdin_default$1y = defineComponent({
|
|
|
5346
5773
|
};
|
|
5347
5774
|
const renderBar = () => createVNode("div", {
|
|
5348
5775
|
"ref": root,
|
|
5349
|
-
"class": [bem$
|
|
5776
|
+
"class": [bem$1k({
|
|
5350
5777
|
fixed: props2.fixed
|
|
5351
5778
|
}), {
|
|
5352
5779
|
"van-safe-area-bottom": props2.safeAreaInsetBottom
|
|
5353
5780
|
}]
|
|
5354
5781
|
}, [renderCheckboxAction(), createVNode("div", {
|
|
5355
|
-
"class": bem$
|
|
5782
|
+
"class": bem$1k("actions")
|
|
5356
5783
|
}, [renderIconAction(), renderMoreAction(), renderSecondaryButton(), renderConfirmButton()])]);
|
|
5357
5784
|
return () => props2.placeholder && props2.fixed ? renderPlaceholder(renderBar) : renderBar();
|
|
5358
5785
|
}
|
|
5359
5786
|
});
|
|
5360
|
-
const BottomActionBar = withInstall(stdin_default$
|
|
5361
|
-
const [name$
|
|
5787
|
+
const BottomActionBar = withInstall(stdin_default$1x);
|
|
5788
|
+
const [name$1n, bem$1j, t$f] = createNamespace("calendar");
|
|
5362
5789
|
const formatMonthTitle = (date) => t$f("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
|
5363
5790
|
function compareMonth(date1, date2) {
|
|
5364
5791
|
const year1 = date1.getFullYear();
|
|
@@ -5467,9 +5894,9 @@ const proxyPickerMethods = (picker, callback) => {
|
|
|
5467
5894
|
}
|
|
5468
5895
|
});
|
|
5469
5896
|
};
|
|
5470
|
-
const [name$
|
|
5471
|
-
var stdin_default$
|
|
5472
|
-
name: name$
|
|
5897
|
+
const [name$1m] = createNamespace("calendar-day");
|
|
5898
|
+
var stdin_default$1w = defineComponent({
|
|
5899
|
+
name: name$1m,
|
|
5473
5900
|
props: {
|
|
5474
5901
|
item: makeRequiredProp(Object),
|
|
5475
5902
|
color: String,
|
|
@@ -5531,7 +5958,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5531
5958
|
} = props2.item;
|
|
5532
5959
|
if (topInfo || slots["top-info"]) {
|
|
5533
5960
|
return createVNode("div", {
|
|
5534
|
-
"class": bem$
|
|
5961
|
+
"class": bem$1j("top-info")
|
|
5535
5962
|
}, [slots["top-info"] ? slots["top-info"](props2.item) : topInfo]);
|
|
5536
5963
|
}
|
|
5537
5964
|
};
|
|
@@ -5541,7 +5968,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5541
5968
|
} = props2.item;
|
|
5542
5969
|
if (bottomInfo || slots["bottom-info"]) {
|
|
5543
5970
|
return createVNode("div", {
|
|
5544
|
-
"class": bem$
|
|
5971
|
+
"class": bem$1j("bottom-info")
|
|
5545
5972
|
}, [slots["bottom-info"] ? slots["bottom-info"](props2.item) : bottomInfo]);
|
|
5546
5973
|
}
|
|
5547
5974
|
};
|
|
@@ -5558,7 +5985,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5558
5985
|
const Nodes = [renderTopInfo(), text, renderBottomInfo()];
|
|
5559
5986
|
if (type === "selected") {
|
|
5560
5987
|
return createVNode("div", {
|
|
5561
|
-
"class": bem$
|
|
5988
|
+
"class": bem$1j("selected-day"),
|
|
5562
5989
|
"style": {
|
|
5563
5990
|
width: rowHeight,
|
|
5564
5991
|
height: rowHeight,
|
|
@@ -5575,21 +6002,21 @@ var stdin_default$1x = defineComponent({
|
|
|
5575
6002
|
} = props2.item;
|
|
5576
6003
|
if (type === "placeholder") {
|
|
5577
6004
|
return createVNode("div", {
|
|
5578
|
-
"class": bem$
|
|
6005
|
+
"class": bem$1j("day"),
|
|
5579
6006
|
"style": style.value
|
|
5580
6007
|
}, null);
|
|
5581
6008
|
}
|
|
5582
6009
|
return createVNode("div", {
|
|
5583
6010
|
"role": "gridcell",
|
|
5584
6011
|
"style": style.value,
|
|
5585
|
-
"class": [bem$
|
|
6012
|
+
"class": [bem$1j("day", type), className],
|
|
5586
6013
|
"tabindex": type === "disabled" ? void 0 : -1,
|
|
5587
6014
|
"onClick": onClick
|
|
5588
6015
|
}, [renderContent()]);
|
|
5589
6016
|
};
|
|
5590
6017
|
}
|
|
5591
6018
|
});
|
|
5592
|
-
const [name$
|
|
6019
|
+
const [name$1l] = createNamespace("calendar-month");
|
|
5593
6020
|
const calendarMonthProps = {
|
|
5594
6021
|
date: makeRequiredProp(Date),
|
|
5595
6022
|
type: String,
|
|
@@ -5606,8 +6033,8 @@ const calendarMonthProps = {
|
|
|
5606
6033
|
showMonthTitle: Boolean,
|
|
5607
6034
|
firstDayOfWeek: Number
|
|
5608
6035
|
};
|
|
5609
|
-
var stdin_default$
|
|
5610
|
-
name: name$
|
|
6036
|
+
var stdin_default$1v = defineComponent({
|
|
6037
|
+
name: name$1l,
|
|
5611
6038
|
props: calendarMonthProps,
|
|
5612
6039
|
emits: ["click", "update-height"],
|
|
5613
6040
|
setup(props2, {
|
|
@@ -5712,14 +6139,14 @@ var stdin_default$1w = defineComponent({
|
|
|
5712
6139
|
const renderTitle = () => {
|
|
5713
6140
|
if (props2.showMonthTitle) {
|
|
5714
6141
|
return createVNode("div", {
|
|
5715
|
-
"class": bem$
|
|
6142
|
+
"class": bem$1j("month-title")
|
|
5716
6143
|
}, [title.value]);
|
|
5717
6144
|
}
|
|
5718
6145
|
};
|
|
5719
6146
|
const renderMark = () => {
|
|
5720
6147
|
if (props2.showMark && shouldRender.value) {
|
|
5721
6148
|
return createVNode("div", {
|
|
5722
|
-
"class": bem$
|
|
6149
|
+
"class": bem$1j("month-mark")
|
|
5723
6150
|
}, [props2.date.getMonth() + 1]);
|
|
5724
6151
|
}
|
|
5725
6152
|
};
|
|
@@ -5759,7 +6186,7 @@ var stdin_default$1w = defineComponent({
|
|
|
5759
6186
|
setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
|
|
5760
6187
|
}
|
|
5761
6188
|
};
|
|
5762
|
-
const renderDay = (item, index) => createVNode(stdin_default$
|
|
6189
|
+
const renderDay = (item, index) => createVNode(stdin_default$1w, {
|
|
5763
6190
|
"item": item,
|
|
5764
6191
|
"index": index,
|
|
5765
6192
|
"color": props2.color,
|
|
@@ -5770,7 +6197,7 @@ var stdin_default$1w = defineComponent({
|
|
|
5770
6197
|
const renderDays = () => createVNode("div", {
|
|
5771
6198
|
"ref": daysRef,
|
|
5772
6199
|
"role": "grid",
|
|
5773
|
-
"class": bem$
|
|
6200
|
+
"class": bem$1j("days")
|
|
5774
6201
|
}, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
|
5775
6202
|
useExpose({
|
|
5776
6203
|
getTitle,
|
|
@@ -5780,14 +6207,14 @@ var stdin_default$1w = defineComponent({
|
|
|
5780
6207
|
disabledDays
|
|
5781
6208
|
});
|
|
5782
6209
|
return () => createVNode("div", {
|
|
5783
|
-
"class": bem$
|
|
6210
|
+
"class": bem$1j("month"),
|
|
5784
6211
|
"ref": monthRef
|
|
5785
6212
|
}, [renderTitle(), renderDays()]);
|
|
5786
6213
|
}
|
|
5787
6214
|
});
|
|
5788
|
-
const [name$
|
|
5789
|
-
var stdin_default$
|
|
5790
|
-
name: name$
|
|
6215
|
+
const [name$1k] = createNamespace("calendar-header");
|
|
6216
|
+
var stdin_default$1u = defineComponent({
|
|
6217
|
+
name: name$1k,
|
|
5791
6218
|
props: {
|
|
5792
6219
|
title: String,
|
|
5793
6220
|
subtitle: String,
|
|
@@ -5805,7 +6232,7 @@ var stdin_default$1v = defineComponent({
|
|
|
5805
6232
|
const text = props2.title || t$f("title");
|
|
5806
6233
|
const title = slots.title ? slots.title() : text;
|
|
5807
6234
|
return createVNode("div", {
|
|
5808
|
-
"class": bem$
|
|
6235
|
+
"class": bem$1j("header-title")
|
|
5809
6236
|
}, [title]);
|
|
5810
6237
|
}
|
|
5811
6238
|
};
|
|
@@ -5814,7 +6241,7 @@ var stdin_default$1v = defineComponent({
|
|
|
5814
6241
|
if (props2.showSubtitle) {
|
|
5815
6242
|
const title = slots.subtitle ? slots.subtitle() : props2.subtitle;
|
|
5816
6243
|
return createVNode("div", {
|
|
5817
|
-
"class": bem$
|
|
6244
|
+
"class": bem$1j("header-subtitle"),
|
|
5818
6245
|
"onClick": onClickSubtitle
|
|
5819
6246
|
}, [title]);
|
|
5820
6247
|
}
|
|
@@ -5826,13 +6253,13 @@ var stdin_default$1v = defineComponent({
|
|
|
5826
6253
|
const weekdays = t$f("weekdays");
|
|
5827
6254
|
const renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
|
|
5828
6255
|
return createVNode("div", {
|
|
5829
|
-
"class": bem$
|
|
6256
|
+
"class": bem$1j("weekdays")
|
|
5830
6257
|
}, [renderWeekDays2.map((text) => createVNode("span", {
|
|
5831
|
-
"class": bem$
|
|
6258
|
+
"class": bem$1j("weekday")
|
|
5832
6259
|
}, [text]))]);
|
|
5833
6260
|
};
|
|
5834
6261
|
return () => createVNode("div", {
|
|
5835
|
-
"class": bem$
|
|
6262
|
+
"class": bem$1j("header")
|
|
5836
6263
|
}, [renderTitle(), renderSubtitle(), renderWeekDays()]);
|
|
5837
6264
|
}
|
|
5838
6265
|
});
|
|
@@ -5883,8 +6310,8 @@ const calendarProps = {
|
|
|
5883
6310
|
validator: (val) => val >= 0 && val <= 6
|
|
5884
6311
|
}
|
|
5885
6312
|
};
|
|
5886
|
-
var stdin_default$
|
|
5887
|
-
name: name$
|
|
6313
|
+
var stdin_default$1t = defineComponent({
|
|
6314
|
+
name: name$1n,
|
|
5888
6315
|
props: calendarProps,
|
|
5889
6316
|
emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
|
|
5890
6317
|
setup(props2, {
|
|
@@ -6141,7 +6568,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6141
6568
|
const updateShow = (value) => emit("update:show", value);
|
|
6142
6569
|
const renderMonth = (date, index) => {
|
|
6143
6570
|
const showMonthTitle = index !== 0 || !props2.showSubtitle;
|
|
6144
|
-
return createVNode(stdin_default$
|
|
6571
|
+
return createVNode(stdin_default$1v, mergeProps({
|
|
6145
6572
|
"ref": setMonthRefs(index),
|
|
6146
6573
|
"date": date,
|
|
6147
6574
|
"currentDate": currentDate.value,
|
|
@@ -6164,7 +6591,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6164
6591
|
"block": true,
|
|
6165
6592
|
"type": "primary",
|
|
6166
6593
|
"color": props2.color,
|
|
6167
|
-
"class": bem$
|
|
6594
|
+
"class": bem$1j("confirm"),
|
|
6168
6595
|
"disabled": disabled,
|
|
6169
6596
|
"nativeType": "button",
|
|
6170
6597
|
"onClick": onConfirm
|
|
@@ -6176,13 +6603,13 @@ var stdin_default$1u = defineComponent({
|
|
|
6176
6603
|
}
|
|
6177
6604
|
};
|
|
6178
6605
|
const renderFooter = () => createVNode("div", {
|
|
6179
|
-
"class": [bem$
|
|
6606
|
+
"class": [bem$1j("footer"), {
|
|
6180
6607
|
"van-safe-area-bottom": props2.safeAreaInsetBottom
|
|
6181
6608
|
}]
|
|
6182
6609
|
}, [renderFooterButton()]);
|
|
6183
6610
|
const renderCalendar = () => createVNode("div", {
|
|
6184
|
-
"class": bem$
|
|
6185
|
-
}, [createVNode(stdin_default$
|
|
6611
|
+
"class": bem$1j()
|
|
6612
|
+
}, [createVNode(stdin_default$1u, {
|
|
6186
6613
|
"title": props2.title,
|
|
6187
6614
|
"subtitle": subtitle.value,
|
|
6188
6615
|
"showTitle": props2.showTitle,
|
|
@@ -6191,7 +6618,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6191
6618
|
"onClick-subtitle": (event) => emit("click-subtitle", event)
|
|
6192
6619
|
}, pick(slots, ["title", "subtitle"])), createVNode("div", {
|
|
6193
6620
|
"ref": bodyRef,
|
|
6194
|
-
"class": bem$
|
|
6621
|
+
"class": bem$1j("body"),
|
|
6195
6622
|
"onScroll": onScroll
|
|
6196
6623
|
}, [months.value.map(renderMonth)]), renderFooter()]);
|
|
6197
6624
|
watch(() => props2.show, init);
|
|
@@ -6210,7 +6637,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6210
6637
|
if (props2.poppable) {
|
|
6211
6638
|
return createVNode(Popup, {
|
|
6212
6639
|
"show": props2.show,
|
|
6213
|
-
"class": bem$
|
|
6640
|
+
"class": bem$1j("popup"),
|
|
6214
6641
|
"round": props2.round,
|
|
6215
6642
|
"position": props2.position,
|
|
6216
6643
|
"closeable": props2.showTitle || props2.showSubtitle,
|
|
@@ -6227,8 +6654,8 @@ var stdin_default$1u = defineComponent({
|
|
|
6227
6654
|
};
|
|
6228
6655
|
}
|
|
6229
6656
|
});
|
|
6230
|
-
const Calendar = withInstall(stdin_default$
|
|
6231
|
-
const [name$
|
|
6657
|
+
const Calendar = withInstall(stdin_default$1t);
|
|
6658
|
+
const [name$1j, bem$1i] = createNamespace("image");
|
|
6232
6659
|
const imageProps = {
|
|
6233
6660
|
src: String,
|
|
6234
6661
|
alt: String,
|
|
@@ -6247,8 +6674,8 @@ const imageProps = {
|
|
|
6247
6674
|
showLoading: truthProp,
|
|
6248
6675
|
loadingIcon: makeStringProp("photo")
|
|
6249
6676
|
};
|
|
6250
|
-
var stdin_default$
|
|
6251
|
-
name: name$
|
|
6677
|
+
var stdin_default$1s = defineComponent({
|
|
6678
|
+
name: name$1j,
|
|
6252
6679
|
props: imageProps,
|
|
6253
6680
|
emits: ["load", "error"],
|
|
6254
6681
|
setup(props2, {
|
|
@@ -6299,13 +6726,13 @@ var stdin_default$1t = defineComponent({
|
|
|
6299
6726
|
const renderPlaceholder = () => {
|
|
6300
6727
|
if (loading.value && props2.showLoading) {
|
|
6301
6728
|
return createVNode("div", {
|
|
6302
|
-
"class": bem$
|
|
6303
|
-
}, [renderIcon(props2.loadingIcon, bem$
|
|
6729
|
+
"class": bem$1i("loading")
|
|
6730
|
+
}, [renderIcon(props2.loadingIcon, bem$1i("loading-icon"), slots.loading)]);
|
|
6304
6731
|
}
|
|
6305
6732
|
if (error.value && props2.showError) {
|
|
6306
6733
|
return createVNode("div", {
|
|
6307
|
-
"class": bem$
|
|
6308
|
-
}, [renderIcon(props2.errorIcon, bem$
|
|
6734
|
+
"class": bem$1i("error")
|
|
6735
|
+
}, [renderIcon(props2.errorIcon, bem$1i("error-icon"), slots.error)]);
|
|
6309
6736
|
}
|
|
6310
6737
|
};
|
|
6311
6738
|
const renderImage = () => {
|
|
@@ -6314,7 +6741,7 @@ var stdin_default$1t = defineComponent({
|
|
|
6314
6741
|
}
|
|
6315
6742
|
const attrs = {
|
|
6316
6743
|
alt: props2.alt,
|
|
6317
|
-
class: bem$
|
|
6744
|
+
class: bem$1i("img"),
|
|
6318
6745
|
style: {
|
|
6319
6746
|
objectFit: props2.fit,
|
|
6320
6747
|
objectPosition: props2.position
|
|
@@ -6363,7 +6790,7 @@ var stdin_default$1t = defineComponent({
|
|
|
6363
6790
|
return () => {
|
|
6364
6791
|
var _a;
|
|
6365
6792
|
return createVNode("div", {
|
|
6366
|
-
"class": bem$
|
|
6793
|
+
"class": bem$1i({
|
|
6367
6794
|
round: props2.round,
|
|
6368
6795
|
block: props2.block
|
|
6369
6796
|
}),
|
|
@@ -6372,8 +6799,8 @@ var stdin_default$1t = defineComponent({
|
|
|
6372
6799
|
};
|
|
6373
6800
|
}
|
|
6374
6801
|
});
|
|
6375
|
-
const Image$1 = withInstall(stdin_default$
|
|
6376
|
-
const [name$
|
|
6802
|
+
const Image$1 = withInstall(stdin_default$1s);
|
|
6803
|
+
const [name$1i, bem$1h] = createNamespace("card");
|
|
6377
6804
|
const cardProps = {
|
|
6378
6805
|
tag: String,
|
|
6379
6806
|
num: numericProp,
|
|
@@ -6387,8 +6814,8 @@ const cardProps = {
|
|
|
6387
6814
|
thumbLink: String,
|
|
6388
6815
|
originPrice: numericProp
|
|
6389
6816
|
};
|
|
6390
|
-
var stdin_default$
|
|
6391
|
-
name: name$
|
|
6817
|
+
var stdin_default$1r = defineComponent({
|
|
6818
|
+
name: name$1i,
|
|
6392
6819
|
props: cardProps,
|
|
6393
6820
|
emits: ["click-thumb"],
|
|
6394
6821
|
setup(props2, {
|
|
@@ -6401,14 +6828,14 @@ var stdin_default$1s = defineComponent({
|
|
|
6401
6828
|
}
|
|
6402
6829
|
if (props2.title) {
|
|
6403
6830
|
return createVNode("div", {
|
|
6404
|
-
"class": [bem$
|
|
6831
|
+
"class": [bem$1h("title"), "van-multi-ellipsis--l2"]
|
|
6405
6832
|
}, [props2.title]);
|
|
6406
6833
|
}
|
|
6407
6834
|
};
|
|
6408
6835
|
const renderThumbTag = () => {
|
|
6409
6836
|
if (slots.tag || props2.tag) {
|
|
6410
6837
|
return createVNode("div", {
|
|
6411
|
-
"class": bem$
|
|
6838
|
+
"class": bem$1h("tag")
|
|
6412
6839
|
}, [slots.tag ? slots.tag() : createVNode(Tag, {
|
|
6413
6840
|
"mark": true,
|
|
6414
6841
|
"type": "danger"
|
|
@@ -6433,7 +6860,7 @@ var stdin_default$1s = defineComponent({
|
|
|
6433
6860
|
if (slots.thumb || props2.thumb) {
|
|
6434
6861
|
return createVNode("a", {
|
|
6435
6862
|
"href": props2.thumbLink,
|
|
6436
|
-
"class": bem$
|
|
6863
|
+
"class": bem$1h("thumb"),
|
|
6437
6864
|
"onClick": (event) => emit("click-thumb", event)
|
|
6438
6865
|
}, [renderThumbImage(), renderThumbTag()]);
|
|
6439
6866
|
}
|
|
@@ -6444,18 +6871,18 @@ var stdin_default$1s = defineComponent({
|
|
|
6444
6871
|
}
|
|
6445
6872
|
if (props2.desc) {
|
|
6446
6873
|
return createVNode("div", {
|
|
6447
|
-
"class": [bem$
|
|
6874
|
+
"class": [bem$1h("desc"), "van-ellipsis"]
|
|
6448
6875
|
}, [props2.desc]);
|
|
6449
6876
|
}
|
|
6450
6877
|
};
|
|
6451
6878
|
const renderPriceText = () => {
|
|
6452
6879
|
const priceArr = props2.price.toString().split(".");
|
|
6453
6880
|
return createVNode("div", null, [createVNode("span", {
|
|
6454
|
-
"class": bem$
|
|
6881
|
+
"class": bem$1h("price-currency")
|
|
6455
6882
|
}, [props2.currency]), createVNode("span", {
|
|
6456
|
-
"class": bem$
|
|
6883
|
+
"class": bem$1h("price-integer")
|
|
6457
6884
|
}, [priceArr[0]]), createTextVNode("."), createVNode("span", {
|
|
6458
|
-
"class": bem$
|
|
6885
|
+
"class": bem$1h("price-decimal")
|
|
6459
6886
|
}, [priceArr[1]])]);
|
|
6460
6887
|
};
|
|
6461
6888
|
return () => {
|
|
@@ -6465,33 +6892,33 @@ var stdin_default$1s = defineComponent({
|
|
|
6465
6892
|
const showOriginPrice = slots["origin-price"] || isDef(props2.originPrice);
|
|
6466
6893
|
const showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
|
|
6467
6894
|
const Price = showPrice && createVNode("div", {
|
|
6468
|
-
"class": bem$
|
|
6895
|
+
"class": bem$1h("price")
|
|
6469
6896
|
}, [slots.price ? slots.price() : renderPriceText()]);
|
|
6470
6897
|
const OriginPrice = showOriginPrice && createVNode("div", {
|
|
6471
|
-
"class": bem$
|
|
6898
|
+
"class": bem$1h("origin-price")
|
|
6472
6899
|
}, [slots["origin-price"] ? slots["origin-price"]() : `${props2.currency} ${props2.originPrice}`]);
|
|
6473
6900
|
const Num = showNum && createVNode("div", {
|
|
6474
|
-
"class": bem$
|
|
6901
|
+
"class": bem$1h("num")
|
|
6475
6902
|
}, [slots.num ? slots.num() : `x${props2.num}`]);
|
|
6476
6903
|
const Footer = slots.footer && createVNode("div", {
|
|
6477
|
-
"class": bem$
|
|
6904
|
+
"class": bem$1h("footer")
|
|
6478
6905
|
}, [slots.footer()]);
|
|
6479
6906
|
const Bottom = showBottom && createVNode("div", {
|
|
6480
|
-
"class": bem$
|
|
6907
|
+
"class": bem$1h("bottom")
|
|
6481
6908
|
}, [(_a = slots["price-top"]) == null ? void 0 : _a.call(slots), Price, OriginPrice, Num, (_b = slots.bottom) == null ? void 0 : _b.call(slots)]);
|
|
6482
6909
|
return createVNode("div", {
|
|
6483
|
-
"class": bem$
|
|
6910
|
+
"class": bem$1h()
|
|
6484
6911
|
}, [createVNode("div", {
|
|
6485
|
-
"class": bem$
|
|
6912
|
+
"class": bem$1h("header")
|
|
6486
6913
|
}, [renderThumb(), createVNode("div", {
|
|
6487
|
-
"class": bem$
|
|
6914
|
+
"class": bem$1h("content", {
|
|
6488
6915
|
centered: props2.centered
|
|
6489
6916
|
})
|
|
6490
6917
|
}, [createVNode("div", null, [renderTitle(), renderDesc(), (_c = slots.tags) == null ? void 0 : _c.call(slots)]), Bottom])]), Footer]);
|
|
6491
6918
|
};
|
|
6492
6919
|
}
|
|
6493
6920
|
});
|
|
6494
|
-
const Card = withInstall(stdin_default$
|
|
6921
|
+
const Card = withInstall(stdin_default$1r);
|
|
6495
6922
|
function scrollLeftTo(scroller, to, duration) {
|
|
6496
6923
|
let count = 0;
|
|
6497
6924
|
const from = scroller.scrollLeft;
|
|
@@ -6547,7 +6974,7 @@ function useVisibilityChange(target, onChange) {
|
|
|
6547
6974
|
onBeforeUnmount(unobserve);
|
|
6548
6975
|
onMountedOrActivated(observe);
|
|
6549
6976
|
}
|
|
6550
|
-
const [name$
|
|
6977
|
+
const [name$1h, bem$1g] = createNamespace("sticky");
|
|
6551
6978
|
const stickyProps = {
|
|
6552
6979
|
zIndex: numericProp,
|
|
6553
6980
|
position: makeStringProp("top"),
|
|
@@ -6555,8 +6982,8 @@ const stickyProps = {
|
|
|
6555
6982
|
offsetTop: makeNumericProp(0),
|
|
6556
6983
|
offsetBottom: makeNumericProp(0)
|
|
6557
6984
|
};
|
|
6558
|
-
var stdin_default$
|
|
6559
|
-
name: name$
|
|
6985
|
+
var stdin_default$1q = defineComponent({
|
|
6986
|
+
name: name$1h,
|
|
6560
6987
|
props: stickyProps,
|
|
6561
6988
|
emits: ["scroll", "change"],
|
|
6562
6989
|
setup(props2, {
|
|
@@ -6653,7 +7080,7 @@ var stdin_default$1r = defineComponent({
|
|
|
6653
7080
|
"ref": root,
|
|
6654
7081
|
"style": rootStyle.value
|
|
6655
7082
|
}, [createVNode("div", {
|
|
6656
|
-
"class": bem$
|
|
7083
|
+
"class": bem$1g({
|
|
6657
7084
|
fixed: state.fixed
|
|
6658
7085
|
}),
|
|
6659
7086
|
"style": stickyStyle.value
|
|
@@ -6661,10 +7088,10 @@ var stdin_default$1r = defineComponent({
|
|
|
6661
7088
|
};
|
|
6662
7089
|
}
|
|
6663
7090
|
});
|
|
6664
|
-
const Sticky = withInstall(stdin_default$
|
|
6665
|
-
const [name$
|
|
6666
|
-
var stdin_default$
|
|
6667
|
-
name: name$
|
|
7091
|
+
const Sticky = withInstall(stdin_default$1q);
|
|
7092
|
+
const [name$1g, bem$1f] = createNamespace("tab");
|
|
7093
|
+
var stdin_default$1p = defineComponent({
|
|
7094
|
+
name: name$1g,
|
|
6668
7095
|
props: {
|
|
6669
7096
|
id: String,
|
|
6670
7097
|
dot: Boolean,
|
|
@@ -6714,19 +7141,19 @@ var stdin_default$1q = defineComponent({
|
|
|
6714
7141
|
});
|
|
6715
7142
|
const renderText = () => {
|
|
6716
7143
|
const Text2 = createVNode("span", {
|
|
6717
|
-
"class": bem$
|
|
7144
|
+
"class": bem$1f("text", {
|
|
6718
7145
|
ellipsis: !props2.scrollable
|
|
6719
7146
|
})
|
|
6720
7147
|
}, [slots.title ? slots.title() : props2.title]);
|
|
6721
7148
|
const Content = createVNode("span", {
|
|
6722
|
-
"class": bem$
|
|
7149
|
+
"class": bem$1f("title")
|
|
6723
7150
|
}, [props2.icon && createVNode(Icon, {
|
|
6724
7151
|
"name": props2.icon,
|
|
6725
|
-
"class": bem$
|
|
7152
|
+
"class": bem$1f("icon")
|
|
6726
7153
|
}, null), Text2]);
|
|
6727
7154
|
if (props2.dot || isDef(props2.badge) && props2.badge !== "") {
|
|
6728
7155
|
return createVNode(Badge, {
|
|
6729
|
-
"class": bem$
|
|
7156
|
+
"class": bem$1f("badge"),
|
|
6730
7157
|
"dot": props2.dot,
|
|
6731
7158
|
"content": props2.badge,
|
|
6732
7159
|
"showZero": props2.showZeroBadge
|
|
@@ -6739,7 +7166,7 @@ var stdin_default$1q = defineComponent({
|
|
|
6739
7166
|
return () => createVNode("div", {
|
|
6740
7167
|
"id": props2.id,
|
|
6741
7168
|
"role": "tab",
|
|
6742
|
-
"class": [bem$
|
|
7169
|
+
"class": [bem$1f([props2.type, {
|
|
6743
7170
|
grow: props2.scrollable && !props2.shrink,
|
|
6744
7171
|
shrink: props2.shrink,
|
|
6745
7172
|
active: props2.isActive,
|
|
@@ -6753,7 +7180,7 @@ var stdin_default$1q = defineComponent({
|
|
|
6753
7180
|
}, [renderText()]);
|
|
6754
7181
|
}
|
|
6755
7182
|
});
|
|
6756
|
-
const [name$
|
|
7183
|
+
const [name$1f, bem$1e] = createNamespace("swipe");
|
|
6757
7184
|
const swipeProps = {
|
|
6758
7185
|
loop: truthProp,
|
|
6759
7186
|
width: numericProp,
|
|
@@ -6768,9 +7195,9 @@ const swipeProps = {
|
|
|
6768
7195
|
showIndicators: truthProp,
|
|
6769
7196
|
stopPropagation: truthProp
|
|
6770
7197
|
};
|
|
6771
|
-
const SWIPE_KEY = Symbol(name$
|
|
6772
|
-
var stdin_default$
|
|
6773
|
-
name: name$
|
|
7198
|
+
const SWIPE_KEY = Symbol(name$1f);
|
|
7199
|
+
var stdin_default$1o = defineComponent({
|
|
7200
|
+
name: name$1f,
|
|
6774
7201
|
props: swipeProps,
|
|
6775
7202
|
emits: ["change"],
|
|
6776
7203
|
setup(props2, {
|
|
@@ -7032,7 +7459,7 @@ var stdin_default$1p = defineComponent({
|
|
|
7032
7459
|
} : void 0;
|
|
7033
7460
|
return createVNode("i", {
|
|
7034
7461
|
"style": style,
|
|
7035
|
-
"class": bem$
|
|
7462
|
+
"class": bem$1e("indicator", {
|
|
7036
7463
|
active
|
|
7037
7464
|
})
|
|
7038
7465
|
}, null);
|
|
@@ -7046,7 +7473,7 @@ var stdin_default$1p = defineComponent({
|
|
|
7046
7473
|
}
|
|
7047
7474
|
if (props2.showIndicators && count.value > 1) {
|
|
7048
7475
|
return createVNode("div", {
|
|
7049
|
-
"class": bem$
|
|
7476
|
+
"class": bem$1e("indicators", {
|
|
7050
7477
|
vertical: props2.vertical
|
|
7051
7478
|
})
|
|
7052
7479
|
}, [Array(count.value).fill("").map(renderDot)]);
|
|
@@ -7088,11 +7515,11 @@ var stdin_default$1p = defineComponent({
|
|
|
7088
7515
|
var _a;
|
|
7089
7516
|
return createVNode("div", {
|
|
7090
7517
|
"ref": root,
|
|
7091
|
-
"class": bem$
|
|
7518
|
+
"class": bem$1e()
|
|
7092
7519
|
}, [createVNode("div", {
|
|
7093
7520
|
"ref": track,
|
|
7094
7521
|
"style": trackStyle.value,
|
|
7095
|
-
"class": bem$
|
|
7522
|
+
"class": bem$1e("track", {
|
|
7096
7523
|
vertical: props2.vertical
|
|
7097
7524
|
}),
|
|
7098
7525
|
"onTouchstartPassive": onTouchStart,
|
|
@@ -7102,10 +7529,10 @@ var stdin_default$1p = defineComponent({
|
|
|
7102
7529
|
};
|
|
7103
7530
|
}
|
|
7104
7531
|
});
|
|
7105
|
-
const Swipe = withInstall(stdin_default$
|
|
7106
|
-
const [name$
|
|
7107
|
-
var stdin_default$
|
|
7108
|
-
name: name$
|
|
7532
|
+
const Swipe = withInstall(stdin_default$1o);
|
|
7533
|
+
const [name$1e, bem$1d] = createNamespace("tabs");
|
|
7534
|
+
var stdin_default$1n = defineComponent({
|
|
7535
|
+
name: name$1e,
|
|
7109
7536
|
props: {
|
|
7110
7537
|
count: makeRequiredProp(Number),
|
|
7111
7538
|
inited: Boolean,
|
|
@@ -7129,7 +7556,7 @@ var stdin_default$1o = defineComponent({
|
|
|
7129
7556
|
return createVNode(Swipe, {
|
|
7130
7557
|
"ref": swipeRef,
|
|
7131
7558
|
"loop": false,
|
|
7132
|
-
"class": bem$
|
|
7559
|
+
"class": bem$1d("track"),
|
|
7133
7560
|
"duration": +props2.duration * 1e3,
|
|
7134
7561
|
"touchable": props2.swipeable,
|
|
7135
7562
|
"lazyRender": props2.lazyRender,
|
|
@@ -7157,7 +7584,7 @@ var stdin_default$1o = defineComponent({
|
|
|
7157
7584
|
swipeRef
|
|
7158
7585
|
});
|
|
7159
7586
|
return () => createVNode("div", {
|
|
7160
|
-
"class": bem$
|
|
7587
|
+
"class": bem$1d("content", {
|
|
7161
7588
|
animated: props2.animated || props2.swipeable
|
|
7162
7589
|
})
|
|
7163
7590
|
}, [renderChildren()]);
|
|
@@ -7182,7 +7609,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
7182
7609
|
return a;
|
|
7183
7610
|
};
|
|
7184
7611
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7185
|
-
const [name$
|
|
7612
|
+
const [name$1d, bem$1c] = createNamespace("tabs");
|
|
7186
7613
|
const tabsProps = {
|
|
7187
7614
|
type: makeStringProp("line"),
|
|
7188
7615
|
color: String,
|
|
@@ -7209,9 +7636,9 @@ const tabsProps = {
|
|
|
7209
7636
|
moreTitle: String,
|
|
7210
7637
|
moreOptions: makeArrayProp()
|
|
7211
7638
|
};
|
|
7212
|
-
const TABS_KEY = Symbol(name$
|
|
7213
|
-
var stdin_default$
|
|
7214
|
-
name: name$
|
|
7639
|
+
const TABS_KEY = Symbol(name$1d);
|
|
7640
|
+
var stdin_default$1m = defineComponent({
|
|
7641
|
+
name: name$1d,
|
|
7215
7642
|
props: tabsProps,
|
|
7216
7643
|
emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active", "click-more", "select-more", "update:showMore"],
|
|
7217
7644
|
setup(props2, {
|
|
@@ -7435,12 +7862,12 @@ var stdin_default$1n = defineComponent({
|
|
|
7435
7862
|
}));
|
|
7436
7863
|
return actions.map((action, index) => __spreadProps(__spreadValues$1({}, action), {
|
|
7437
7864
|
color: index === state.currentIndex ? "var(--van-primary-color)" : action.color,
|
|
7438
|
-
className: [action.className, bem$
|
|
7865
|
+
className: [action.className, bem$1c("more-option", {
|
|
7439
7866
|
active: index === state.currentIndex
|
|
7440
7867
|
})]
|
|
7441
7868
|
}));
|
|
7442
7869
|
});
|
|
7443
|
-
const renderNav = () => children.map((item, index) => createVNode(stdin_default$
|
|
7870
|
+
const renderNav = () => children.map((item, index) => createVNode(stdin_default$1p, mergeProps({
|
|
7444
7871
|
"key": item.id,
|
|
7445
7872
|
"id": `${id}-${index}`,
|
|
7446
7873
|
"ref": setTitleRefs(index),
|
|
@@ -7461,7 +7888,7 @@ var stdin_default$1n = defineComponent({
|
|
|
7461
7888
|
const renderLine = () => {
|
|
7462
7889
|
if (props2.type === "line" && children.length) {
|
|
7463
7890
|
return createVNode("div", {
|
|
7464
|
-
"class": bem$
|
|
7891
|
+
"class": bem$1c("line"),
|
|
7465
7892
|
"style": state.lineStyle
|
|
7466
7893
|
}, null);
|
|
7467
7894
|
}
|
|
@@ -7475,13 +7902,13 @@ var stdin_default$1n = defineComponent({
|
|
|
7475
7902
|
} = props2;
|
|
7476
7903
|
const Header = [createVNode("div", {
|
|
7477
7904
|
"ref": sticky ? void 0 : wrapRef,
|
|
7478
|
-
"class": [bem$
|
|
7905
|
+
"class": [bem$1c("wrap"), {
|
|
7479
7906
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
|
7480
7907
|
}]
|
|
7481
7908
|
}, [createVNode("div", {
|
|
7482
7909
|
"ref": navRef,
|
|
7483
7910
|
"role": "tablist",
|
|
7484
|
-
"class": bem$
|
|
7911
|
+
"class": bem$1c("nav", [type, {
|
|
7485
7912
|
shrink: props2.shrink,
|
|
7486
7913
|
complete: scrollable.value,
|
|
7487
7914
|
more: props2.more
|
|
@@ -7491,7 +7918,7 @@ var stdin_default$1n = defineComponent({
|
|
|
7491
7918
|
}, [(_a2 = slots["nav-left"]) == null ? void 0 : _a2.call(slots), renderNav(), renderLine(), (_b2 = slots["nav-right"]) == null ? void 0 : _b2.call(slots)]), props2.more && createVNode("button", {
|
|
7492
7919
|
"ref": moreRef,
|
|
7493
7920
|
"type": "button",
|
|
7494
|
-
"class": bem$
|
|
7921
|
+
"class": bem$1c("more"),
|
|
7495
7922
|
"aria-label": "More tabs",
|
|
7496
7923
|
"onClick": onClickMore
|
|
7497
7924
|
}, [createVNode(Icon, {
|
|
@@ -7565,14 +7992,14 @@ var stdin_default$1n = defineComponent({
|
|
|
7565
7992
|
});
|
|
7566
7993
|
return () => createVNode("div", {
|
|
7567
7994
|
"ref": root,
|
|
7568
|
-
"class": bem$
|
|
7995
|
+
"class": bem$1c([props2.type])
|
|
7569
7996
|
}, [props2.sticky ? createVNode(Sticky, {
|
|
7570
7997
|
"container": root.value,
|
|
7571
7998
|
"offsetTop": offsetTopPx.value,
|
|
7572
7999
|
"onScroll": onStickyScroll
|
|
7573
8000
|
}, {
|
|
7574
8001
|
default: () => [renderHeader()]
|
|
7575
|
-
}) : renderHeader(), createVNode(stdin_default$
|
|
8002
|
+
}) : renderHeader(), createVNode(stdin_default$1n, {
|
|
7576
8003
|
"ref": contentRef,
|
|
7577
8004
|
"count": children.length,
|
|
7578
8005
|
"inited": state.inited,
|
|
@@ -7592,9 +8019,9 @@ var stdin_default$1n = defineComponent({
|
|
|
7592
8019
|
});
|
|
7593
8020
|
const TAB_STATUS_KEY = Symbol();
|
|
7594
8021
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
|
7595
|
-
const [name$
|
|
7596
|
-
var stdin_default$
|
|
7597
|
-
name: name$
|
|
8022
|
+
const [name$1c, bem$1b] = createNamespace("swipe-item");
|
|
8023
|
+
var stdin_default$1l = defineComponent({
|
|
8024
|
+
name: name$1c,
|
|
7598
8025
|
setup(props2, {
|
|
7599
8026
|
slots
|
|
7600
8027
|
}) {
|
|
@@ -7659,14 +8086,14 @@ var stdin_default$1m = defineComponent({
|
|
|
7659
8086
|
return () => {
|
|
7660
8087
|
var _a;
|
|
7661
8088
|
return createVNode("div", {
|
|
7662
|
-
"class": bem$
|
|
8089
|
+
"class": bem$1b(),
|
|
7663
8090
|
"style": style.value
|
|
7664
8091
|
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
|
7665
8092
|
};
|
|
7666
8093
|
}
|
|
7667
8094
|
});
|
|
7668
|
-
const SwipeItem = withInstall(stdin_default$
|
|
7669
|
-
const [name$
|
|
8095
|
+
const SwipeItem = withInstall(stdin_default$1l);
|
|
8096
|
+
const [name$1b, bem$1a] = createNamespace("tab");
|
|
7670
8097
|
const tabProps = extend({}, routeProps, {
|
|
7671
8098
|
dot: Boolean,
|
|
7672
8099
|
name: numericProp,
|
|
@@ -7678,8 +8105,8 @@ const tabProps = extend({}, routeProps, {
|
|
|
7678
8105
|
titleStyle: [String, Object],
|
|
7679
8106
|
showZeroBadge: truthProp
|
|
7680
8107
|
});
|
|
7681
|
-
var stdin_default$
|
|
7682
|
-
name: name$
|
|
8108
|
+
var stdin_default$1k = defineComponent({
|
|
8109
|
+
name: name$1b,
|
|
7683
8110
|
props: tabProps,
|
|
7684
8111
|
setup(props2, {
|
|
7685
8112
|
slots
|
|
@@ -7747,7 +8174,7 @@ var stdin_default$1l = defineComponent({
|
|
|
7747
8174
|
return createVNode(SwipeItem, {
|
|
7748
8175
|
"id": id,
|
|
7749
8176
|
"role": "tabpanel",
|
|
7750
|
-
"class": bem$
|
|
8177
|
+
"class": bem$1a("panel-wrapper", {
|
|
7751
8178
|
inactive: hasInactiveClass.value
|
|
7752
8179
|
}),
|
|
7753
8180
|
"tabindex": active.value ? 0 : -1,
|
|
@@ -7757,7 +8184,7 @@ var stdin_default$1l = defineComponent({
|
|
|
7757
8184
|
default: () => {
|
|
7758
8185
|
var _a2;
|
|
7759
8186
|
return [createVNode("div", {
|
|
7760
|
-
"class": bem$
|
|
8187
|
+
"class": bem$1a("panel")
|
|
7761
8188
|
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
|
|
7762
8189
|
}
|
|
7763
8190
|
});
|
|
@@ -7770,16 +8197,16 @@ var stdin_default$1l = defineComponent({
|
|
|
7770
8197
|
return withDirectives(createVNode("div", {
|
|
7771
8198
|
"id": id,
|
|
7772
8199
|
"role": "tabpanel",
|
|
7773
|
-
"class": bem$
|
|
8200
|
+
"class": bem$1a("panel"),
|
|
7774
8201
|
"tabindex": show ? 0 : -1,
|
|
7775
8202
|
"aria-labelledby": label
|
|
7776
8203
|
}, [Content]), [[vShow, show]]);
|
|
7777
8204
|
};
|
|
7778
8205
|
}
|
|
7779
8206
|
});
|
|
7780
|
-
const Tab = withInstall(stdin_default$
|
|
7781
|
-
const Tabs = withInstall(stdin_default$
|
|
7782
|
-
const [name$
|
|
8207
|
+
const Tab = withInstall(stdin_default$1k);
|
|
8208
|
+
const Tabs = withInstall(stdin_default$1m);
|
|
8209
|
+
const [name$1a, bem$19, t$e] = createNamespace("cascader");
|
|
7783
8210
|
const cascaderProps = {
|
|
7784
8211
|
title: String,
|
|
7785
8212
|
options: makeArrayProp(),
|
|
@@ -7792,8 +8219,8 @@ const cascaderProps = {
|
|
|
7792
8219
|
placeholder: String,
|
|
7793
8220
|
activeColor: String
|
|
7794
8221
|
};
|
|
7795
|
-
var stdin_default$
|
|
7796
|
-
name: name$
|
|
8222
|
+
var stdin_default$1j = defineComponent({
|
|
8223
|
+
name: name$1a,
|
|
7797
8224
|
props: cascaderProps,
|
|
7798
8225
|
emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
|
|
7799
8226
|
setup(props2, {
|
|
@@ -7901,12 +8328,12 @@ var stdin_default$1k = defineComponent({
|
|
|
7901
8328
|
title
|
|
7902
8329
|
}) => emit("click-tab", name2, title);
|
|
7903
8330
|
const renderHeader = () => props2.showHeader ? createVNode("div", {
|
|
7904
|
-
"class": bem$
|
|
8331
|
+
"class": bem$19("header")
|
|
7905
8332
|
}, [createVNode("h2", {
|
|
7906
|
-
"class": bem$
|
|
8333
|
+
"class": bem$19("title")
|
|
7907
8334
|
}, [slots.title ? slots.title() : props2.title]), props2.closeable ? createVNode(Icon, {
|
|
7908
8335
|
"name": props2.closeIcon,
|
|
7909
|
-
"class": [bem$
|
|
8336
|
+
"class": [bem$19("close-icon"), HAPTICS_FEEDBACK],
|
|
7910
8337
|
"onClick": onClose
|
|
7911
8338
|
}, null) : null]) : null;
|
|
7912
8339
|
const renderOption = (option, selectedOption, tabIndex) => {
|
|
@@ -7921,7 +8348,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7921
8348
|
}) : createVNode("span", null, [option[textKey]]);
|
|
7922
8349
|
return createVNode("li", {
|
|
7923
8350
|
"role": "menuitemradio",
|
|
7924
|
-
"class": [bem$
|
|
8351
|
+
"class": [bem$19("option", {
|
|
7925
8352
|
selected,
|
|
7926
8353
|
disabled
|
|
7927
8354
|
}), option.className],
|
|
@@ -7934,12 +8361,12 @@ var stdin_default$1k = defineComponent({
|
|
|
7934
8361
|
"onClick": () => onSelect(option, tabIndex)
|
|
7935
8362
|
}, [Text2, selected ? createVNode(Icon, {
|
|
7936
8363
|
"name": "success",
|
|
7937
|
-
"class": bem$
|
|
8364
|
+
"class": bem$19("selected-icon")
|
|
7938
8365
|
}, null) : null]);
|
|
7939
8366
|
};
|
|
7940
8367
|
const renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
|
|
7941
8368
|
"role": "menu",
|
|
7942
|
-
"class": bem$
|
|
8369
|
+
"class": bem$19("options")
|
|
7943
8370
|
}, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
|
|
7944
8371
|
const renderTab = (tab, tabIndex) => {
|
|
7945
8372
|
const {
|
|
@@ -7950,7 +8377,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7950
8377
|
const title = selected ? selected[textKey] : placeholder;
|
|
7951
8378
|
return createVNode(Tab, {
|
|
7952
8379
|
"title": title,
|
|
7953
|
-
"titleClass": bem$
|
|
8380
|
+
"titleClass": bem$19("tab", {
|
|
7954
8381
|
unselected: !selected
|
|
7955
8382
|
})
|
|
7956
8383
|
}, {
|
|
@@ -7969,7 +8396,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7969
8396
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
|
7970
8397
|
"shrink": true,
|
|
7971
8398
|
"animated": true,
|
|
7972
|
-
"class": bem$
|
|
8399
|
+
"class": bem$19("tabs"),
|
|
7973
8400
|
"color": props2.activeColor,
|
|
7974
8401
|
"swipeable": props2.swipeable,
|
|
7975
8402
|
"onClick-tab": onClickTab
|
|
@@ -7993,20 +8420,20 @@ var stdin_default$1k = defineComponent({
|
|
|
7993
8420
|
updateTabs();
|
|
7994
8421
|
});
|
|
7995
8422
|
return () => createVNode("div", {
|
|
7996
|
-
"class": bem$
|
|
8423
|
+
"class": bem$19()
|
|
7997
8424
|
}, [renderHeader(), renderTabs()]);
|
|
7998
8425
|
}
|
|
7999
8426
|
});
|
|
8000
|
-
const Cascader = withInstall(stdin_default$
|
|
8001
|
-
const [name$
|
|
8427
|
+
const Cascader = withInstall(stdin_default$1j);
|
|
8428
|
+
const [name$19, bem$18] = createNamespace("cell-group");
|
|
8002
8429
|
const cellGroupProps = {
|
|
8003
8430
|
title: String,
|
|
8004
8431
|
inset: Boolean,
|
|
8005
8432
|
grayCard: Boolean,
|
|
8006
8433
|
border: truthProp
|
|
8007
8434
|
};
|
|
8008
|
-
var stdin_default$
|
|
8009
|
-
name: name$
|
|
8435
|
+
var stdin_default$1i = defineComponent({
|
|
8436
|
+
name: name$19,
|
|
8010
8437
|
inheritAttrs: false,
|
|
8011
8438
|
props: cellGroupProps,
|
|
8012
8439
|
setup(props2, {
|
|
@@ -8016,7 +8443,7 @@ var stdin_default$1j = defineComponent({
|
|
|
8016
8443
|
const renderGroup = () => {
|
|
8017
8444
|
var _a;
|
|
8018
8445
|
return createVNode("div", mergeProps({
|
|
8019
|
-
"class": [bem$
|
|
8446
|
+
"class": [bem$18({
|
|
8020
8447
|
inset: props2.inset,
|
|
8021
8448
|
"gray-card": props2.grayCard
|
|
8022
8449
|
}), {
|
|
@@ -8025,7 +8452,7 @@ var stdin_default$1j = defineComponent({
|
|
|
8025
8452
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
8026
8453
|
};
|
|
8027
8454
|
const renderTitle = () => createVNode("div", {
|
|
8028
|
-
"class": bem$
|
|
8455
|
+
"class": bem$18("title", {
|
|
8029
8456
|
inset: props2.inset
|
|
8030
8457
|
})
|
|
8031
8458
|
}, [slots.title ? slots.title() : props2.title]);
|
|
@@ -8037,158 +8464,8 @@ var stdin_default$1j = defineComponent({
|
|
|
8037
8464
|
};
|
|
8038
8465
|
}
|
|
8039
8466
|
});
|
|
8040
|
-
const CellGroup = withInstall(stdin_default$
|
|
8041
|
-
const CheckboxGroup = withInstall(stdin_default$
|
|
8042
|
-
const [name$19, bem$18] = createNamespace("nav-bar");
|
|
8043
|
-
const navBarProps = {
|
|
8044
|
-
title: String,
|
|
8045
|
-
fixed: Boolean,
|
|
8046
|
-
zIndex: numericProp,
|
|
8047
|
-
border: truthProp,
|
|
8048
|
-
leftText: String,
|
|
8049
|
-
rightText: String,
|
|
8050
|
-
subtitle: String,
|
|
8051
|
-
leftArrow: Boolean,
|
|
8052
|
-
rightPopoverActions: makeArrayProp(),
|
|
8053
|
-
rightPopoverIcon: makeStringProp("plus"),
|
|
8054
|
-
titleDropdown: Boolean,
|
|
8055
|
-
titleDropdownActive: Boolean,
|
|
8056
|
-
placeholder: Boolean,
|
|
8057
|
-
safeAreaInsetTop: Boolean
|
|
8058
|
-
};
|
|
8059
|
-
var stdin_default$1i = defineComponent({
|
|
8060
|
-
name: name$19,
|
|
8061
|
-
props: navBarProps,
|
|
8062
|
-
emits: ["click-left", "click-right", "click-title", "select-right-popover", "update:titleDropdownActive"],
|
|
8063
|
-
setup(props2, {
|
|
8064
|
-
emit,
|
|
8065
|
-
slots
|
|
8066
|
-
}) {
|
|
8067
|
-
const navBarRef = ref();
|
|
8068
|
-
const rightPopoverShow = ref(false);
|
|
8069
|
-
const renderPlaceholder = usePlaceholder(navBarRef, bem$18);
|
|
8070
|
-
const onClickLeft = (event) => emit("click-left", event);
|
|
8071
|
-
const onClickRight = (event) => emit("click-right", event);
|
|
8072
|
-
const onUpdateRightPopoverShow = (show) => {
|
|
8073
|
-
rightPopoverShow.value = show;
|
|
8074
|
-
};
|
|
8075
|
-
const onSelectRightPopover = (action, index) => {
|
|
8076
|
-
emit("select-right-popover", action, index);
|
|
8077
|
-
};
|
|
8078
|
-
const onClickTitle = (event) => {
|
|
8079
|
-
if (!props2.titleDropdown) {
|
|
8080
|
-
return;
|
|
8081
|
-
}
|
|
8082
|
-
emit("update:titleDropdownActive", !props2.titleDropdownActive);
|
|
8083
|
-
emit("click-title", event);
|
|
8084
|
-
};
|
|
8085
|
-
const renderLeft = () => {
|
|
8086
|
-
if (slots.left) {
|
|
8087
|
-
return slots.left();
|
|
8088
|
-
}
|
|
8089
|
-
return [props2.leftArrow && createVNode(Icon, {
|
|
8090
|
-
"class": bem$18("arrow"),
|
|
8091
|
-
"name": "arrow-left"
|
|
8092
|
-
}, null), props2.leftText && createVNode("span", {
|
|
8093
|
-
"class": bem$18("text")
|
|
8094
|
-
}, [props2.leftText])];
|
|
8095
|
-
};
|
|
8096
|
-
const renderRight = () => {
|
|
8097
|
-
if (slots.right) {
|
|
8098
|
-
return slots.right();
|
|
8099
|
-
}
|
|
8100
|
-
if (props2.rightPopoverActions.length) {
|
|
8101
|
-
return createVNode(Popover, {
|
|
8102
|
-
"show": rightPopoverShow.value,
|
|
8103
|
-
"actions": props2.rightPopoverActions,
|
|
8104
|
-
"placement": "bottom-end",
|
|
8105
|
-
"closeOnClickAction": true,
|
|
8106
|
-
"onUpdate:show": onUpdateRightPopoverShow,
|
|
8107
|
-
"onSelect": onSelectRightPopover
|
|
8108
|
-
}, {
|
|
8109
|
-
reference: () => createVNode(Icon, {
|
|
8110
|
-
"name": props2.rightPopoverIcon,
|
|
8111
|
-
"class": bem$18("right-popover-icon")
|
|
8112
|
-
}, null)
|
|
8113
|
-
});
|
|
8114
|
-
}
|
|
8115
|
-
return createVNode("span", {
|
|
8116
|
-
"class": bem$18("text")
|
|
8117
|
-
}, [props2.rightText]);
|
|
8118
|
-
};
|
|
8119
|
-
const renderNavBar = () => {
|
|
8120
|
-
const {
|
|
8121
|
-
title,
|
|
8122
|
-
fixed,
|
|
8123
|
-
border,
|
|
8124
|
-
zIndex,
|
|
8125
|
-
subtitle,
|
|
8126
|
-
titleDropdown
|
|
8127
|
-
} = props2;
|
|
8128
|
-
const style = getZIndexStyle(zIndex);
|
|
8129
|
-
const hasLeft = props2.leftArrow || props2.leftText || slots.left;
|
|
8130
|
-
const hasRight = props2.rightText || props2.rightPopoverActions.length || slots.right;
|
|
8131
|
-
const hasRightPopover = props2.rightPopoverActions.length > 0 && !slots.right;
|
|
8132
|
-
return createVNode("div", {
|
|
8133
|
-
"ref": navBarRef,
|
|
8134
|
-
"style": style,
|
|
8135
|
-
"class": [bem$18({
|
|
8136
|
-
fixed
|
|
8137
|
-
}), {
|
|
8138
|
-
[BORDER_BOTTOM]: border,
|
|
8139
|
-
"van-safe-area-top": props2.safeAreaInsetTop
|
|
8140
|
-
}]
|
|
8141
|
-
}, [createVNode("div", {
|
|
8142
|
-
"class": bem$18("content")
|
|
8143
|
-
}, [hasLeft && createVNode("div", {
|
|
8144
|
-
"class": [bem$18("left", {
|
|
8145
|
-
slot: !!slots.left
|
|
8146
|
-
}), {
|
|
8147
|
-
[HAPTICS_FEEDBACK]: !slots.left
|
|
8148
|
-
}],
|
|
8149
|
-
"onClick": slots.left ? void 0 : onClickLeft
|
|
8150
|
-
}, [renderLeft()]), createVNode("div", {
|
|
8151
|
-
"class": [bem$18("title", {
|
|
8152
|
-
dropdown: titleDropdown
|
|
8153
|
-
}), {
|
|
8154
|
-
[HAPTICS_FEEDBACK]: titleDropdown
|
|
8155
|
-
}],
|
|
8156
|
-
"role": titleDropdown ? "button" : void 0,
|
|
8157
|
-
"tabindex": titleDropdown ? 0 : void 0,
|
|
8158
|
-
"onClick": onClickTitle,
|
|
8159
|
-
"onKeydown": (event) => {
|
|
8160
|
-
if (titleDropdown && (event.key === "Enter" || event.key === " ")) {
|
|
8161
|
-
event.preventDefault();
|
|
8162
|
-
onClickTitle(event);
|
|
8163
|
-
}
|
|
8164
|
-
}
|
|
8165
|
-
}, [createVNode("div", {
|
|
8166
|
-
"class": [bem$18("title-content"), "van-ellipsis"]
|
|
8167
|
-
}, [slots.title ? slots.title() : title, titleDropdown && createVNode(Icon, {
|
|
8168
|
-
"name": "trangle-down",
|
|
8169
|
-
"class": bem$18("title-arrow", {
|
|
8170
|
-
active: props2.titleDropdownActive
|
|
8171
|
-
})
|
|
8172
|
-
}, null)]), subtitle && createVNode("div", {
|
|
8173
|
-
"class": [bem$18("subtitle"), "van-ellipsis"]
|
|
8174
|
-
}, [subtitle])]), hasRight && createVNode("div", {
|
|
8175
|
-
"class": [bem$18("right", {
|
|
8176
|
-
slot: !!slots.right
|
|
8177
|
-
}), {
|
|
8178
|
-
[HAPTICS_FEEDBACK]: !slots.right && !hasRightPopover
|
|
8179
|
-
}],
|
|
8180
|
-
"onClick": slots.right || hasRightPopover ? void 0 : onClickRight
|
|
8181
|
-
}, [renderRight()])])]);
|
|
8182
|
-
};
|
|
8183
|
-
return () => {
|
|
8184
|
-
if (props2.fixed && props2.placeholder) {
|
|
8185
|
-
return renderPlaceholder(renderNavBar);
|
|
8186
|
-
}
|
|
8187
|
-
return renderNavBar();
|
|
8188
|
-
};
|
|
8189
|
-
}
|
|
8190
|
-
});
|
|
8191
|
-
const NavBar = withInstall(stdin_default$1i);
|
|
8467
|
+
const CellGroup = withInstall(stdin_default$1i);
|
|
8468
|
+
const CheckboxGroup = withInstall(stdin_default$1R);
|
|
8192
8469
|
const [name$18, bem$17] = createNamespace("checkbox-panel");
|
|
8193
8470
|
const checkboxPanelProps = {
|
|
8194
8471
|
show: Boolean,
|
|
@@ -13290,6 +13567,7 @@ var stdin_default$E = defineComponent({
|
|
|
13290
13567
|
type: Number,
|
|
13291
13568
|
required: true
|
|
13292
13569
|
},
|
|
13570
|
+
max: makeNumericProp(Infinity),
|
|
13293
13571
|
keyword: {
|
|
13294
13572
|
type: String,
|
|
13295
13573
|
default: ""
|
|
@@ -13323,7 +13601,8 @@ var stdin_default$E = defineComponent({
|
|
|
13323
13601
|
const confirmInputValue = () => {
|
|
13324
13602
|
const value = Number(inputValue.value);
|
|
13325
13603
|
if (!Number.isNaN(value)) {
|
|
13326
|
-
|
|
13604
|
+
const max = Number(props2.max);
|
|
13605
|
+
emit("update:modelValue", Math.min(Number.isNaN(max) ? Infinity : max, Math.max(0, value)));
|
|
13327
13606
|
}
|
|
13328
13607
|
};
|
|
13329
13608
|
const clearDetailLongPress = () => {
|
|
@@ -13397,6 +13676,7 @@ var stdin_default$E = defineComponent({
|
|
|
13397
13676
|
"class": bem$x("stepper"),
|
|
13398
13677
|
"modelValue": props2.modelValue,
|
|
13399
13678
|
"min": 0,
|
|
13679
|
+
"max": props2.max,
|
|
13400
13680
|
"theme": "round",
|
|
13401
13681
|
"buttonSize": 18,
|
|
13402
13682
|
"disableInput": true,
|
|
@@ -18558,6 +18838,7 @@ const uploaderProps = {
|
|
|
18558
18838
|
deletable: truthProp,
|
|
18559
18839
|
afterRead: Function,
|
|
18560
18840
|
showUpload: truthProp,
|
|
18841
|
+
uploadFirst: Boolean,
|
|
18561
18842
|
modelValue: makeArrayProp(),
|
|
18562
18843
|
beforeRead: Function,
|
|
18563
18844
|
beforeDelete: Function,
|
|
@@ -18778,7 +19059,7 @@ var stdin_default$7 = defineComponent({
|
|
|
18778
19059
|
"class": bem$3("wrapper", {
|
|
18779
19060
|
disabled: props2.disabled
|
|
18780
19061
|
})
|
|
18781
|
-
}, [renderPreviewList(), renderUpload()])]);
|
|
19062
|
+
}, [props2.uploadFirst ? createVNode(Fragment, null, [renderUpload(), renderPreviewList()]) : createVNode(Fragment, null, [renderPreviewList(), renderUpload()])])]);
|
|
18782
19063
|
}
|
|
18783
19064
|
});
|
|
18784
19065
|
const Uploader = withInstall(stdin_default$7);
|
|
@@ -20658,7 +20939,7 @@ const Lazyload = {
|
|
|
20658
20939
|
});
|
|
20659
20940
|
}
|
|
20660
20941
|
};
|
|
20661
|
-
const version = "0.0.
|
|
20942
|
+
const version = "0.0.40";
|
|
20662
20943
|
function install(app) {
|
|
20663
20944
|
const components = [
|
|
20664
20945
|
ActionBar,
|