persagy-vant 0.0.38 → 0.0.39
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 +238 -19
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +165 -1
- package/es/cell/index.less +77 -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 +230 -0
- package/es/field/index.d.ts +160 -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 +3 -3
- package/es/material-display-bar/index.d.ts +9 -9
- 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/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 +238 -19
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +165 -1
- package/lib/cell/index.less +77 -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 +230 -0
- package/lib/field/index.d.ts +160 -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 +3 -3
- package/lib/material-display-bar/index.d.ts +9 -9
- 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/vant.cjs.js +1226 -975
- package/lib/vant.es.js +1227 -976
- package/lib/vant.js +5157 -4906
- 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 +1 -1
- 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,93 @@ 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(Icon, {
|
|
3400
|
+
"name": "trangle-down",
|
|
3401
|
+
"class": bem$1y("title-collapse-icon", {
|
|
3402
|
+
collapsed: multiLineNotesCollapsed.value
|
|
3403
|
+
})
|
|
3404
|
+
}, null), slots.title ? slots.title() : createVNode("span", null, [props2.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props2.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
2828
3405
|
}
|
|
2829
3406
|
};
|
|
2830
3407
|
const renderValue = () => {
|
|
@@ -2833,20 +3410,23 @@ var stdin_default$1O = defineComponent({
|
|
|
2833
3410
|
if (hasValue) {
|
|
2834
3411
|
const hasTitle = slots.title || isDef(props2.title);
|
|
2835
3412
|
return createVNode("div", {
|
|
2836
|
-
"class": [bem$
|
|
3413
|
+
"class": [bem$1y("value", {
|
|
2837
3414
|
alone: !hasTitle
|
|
2838
3415
|
}), props2.valueClass]
|
|
2839
3416
|
}, [slot ? slot() : createVNode("span", null, [props2.value])]);
|
|
2840
3417
|
}
|
|
2841
3418
|
};
|
|
2842
3419
|
const renderLeftIcon = () => {
|
|
3420
|
+
if (!isVisible(props2.showIcon, !!slots.icon || !!props2.icon)) {
|
|
3421
|
+
return;
|
|
3422
|
+
}
|
|
2843
3423
|
if (slots.icon) {
|
|
2844
3424
|
return slots.icon();
|
|
2845
3425
|
}
|
|
2846
3426
|
if (props2.icon) {
|
|
2847
3427
|
return createVNode(Icon, {
|
|
2848
3428
|
"name": props2.icon,
|
|
2849
|
-
"class": bem$
|
|
3429
|
+
"class": bem$1y("left-icon"),
|
|
2850
3430
|
"classPrefix": props2.iconPrefix
|
|
2851
3431
|
}, null);
|
|
2852
3432
|
}
|
|
@@ -2855,15 +3435,18 @@ var stdin_default$1O = defineComponent({
|
|
|
2855
3435
|
var _a2, _b2;
|
|
2856
3436
|
const slot = slots[`${position}-select`];
|
|
2857
3437
|
const selected = getSelectState(position);
|
|
3438
|
+
if (!isSelectVisible(position)) {
|
|
3439
|
+
return;
|
|
3440
|
+
}
|
|
2858
3441
|
if (slot) {
|
|
2859
3442
|
return createVNode("div", {
|
|
2860
|
-
"class": bem$
|
|
3443
|
+
"class": bem$1y(`${position}-select`)
|
|
2861
3444
|
}, [slot()]);
|
|
2862
3445
|
}
|
|
2863
3446
|
if (hasSelect(position)) {
|
|
2864
3447
|
const checkboxSize = (_b2 = (_a2 = props2.size) != null ? _a2 : config == null ? void 0 : config.cellSize) != null ? _b2 : "normal";
|
|
2865
3448
|
return createVNode("div", {
|
|
2866
|
-
"class": bem$
|
|
3449
|
+
"class": bem$1y(`${position}-select`),
|
|
2867
3450
|
"onClick": (event) => event.stopPropagation()
|
|
2868
3451
|
}, [props2.selectType === "radio" ? createVNode(Radio, {
|
|
2869
3452
|
"modelValue": selected ? "selected" : "",
|
|
@@ -2882,63 +3465,125 @@ var stdin_default$1O = defineComponent({
|
|
|
2882
3465
|
const renderAvatar = (position) => {
|
|
2883
3466
|
const slot = slots[`${position}-avatar`];
|
|
2884
3467
|
const avatar = position === "left" ? props2.avatar : props2.rightAvatar;
|
|
3468
|
+
const show = position === "left" ? props2.showAvatar : props2.showRightAvatar;
|
|
3469
|
+
if (!isVisible(show, !!slot || !!avatar)) {
|
|
3470
|
+
return;
|
|
3471
|
+
}
|
|
2885
3472
|
if (slot) {
|
|
2886
3473
|
return createVNode("div", {
|
|
2887
|
-
"class": bem$
|
|
3474
|
+
"class": bem$1y(`${position}-avatar`)
|
|
2888
3475
|
}, [slot()]);
|
|
2889
3476
|
}
|
|
2890
3477
|
if (avatar) {
|
|
2891
3478
|
return createVNode("img", {
|
|
2892
|
-
"class": bem$
|
|
3479
|
+
"class": bem$1y(`${position}-avatar`),
|
|
2893
3480
|
"src": avatar,
|
|
2894
3481
|
"alt": ""
|
|
2895
3482
|
}, null);
|
|
2896
3483
|
}
|
|
2897
3484
|
};
|
|
2898
3485
|
const renderBlueMark = () => {
|
|
3486
|
+
if (!isVisible(props2.showBlueMark, !!slots["blue-mark"] || props2.blueMark)) {
|
|
3487
|
+
return;
|
|
3488
|
+
}
|
|
2899
3489
|
if (slots["blue-mark"]) {
|
|
2900
3490
|
return createVNode("div", {
|
|
2901
|
-
"class": bem$
|
|
3491
|
+
"class": bem$1y("blue-mark")
|
|
2902
3492
|
}, [slots["blue-mark"]()]);
|
|
2903
3493
|
}
|
|
2904
3494
|
if (props2.blueMark) {
|
|
2905
3495
|
return createVNode("span", {
|
|
2906
|
-
"class": bem$
|
|
3496
|
+
"class": bem$1y("blue-mark")
|
|
2907
3497
|
}, null);
|
|
2908
3498
|
}
|
|
2909
3499
|
};
|
|
2910
3500
|
const renderTags = () => {
|
|
2911
|
-
var _a2;
|
|
3501
|
+
var _a2, _b2;
|
|
3502
|
+
if (!isVisible(props2.showTags, !!slots.tags || !!((_a2 = props2.tags) == null ? void 0 : _a2.length))) {
|
|
3503
|
+
return;
|
|
3504
|
+
}
|
|
2912
3505
|
if (slots.tags) {
|
|
2913
3506
|
return createVNode("div", {
|
|
2914
|
-
"class": bem$
|
|
3507
|
+
"class": bem$1y("tags")
|
|
2915
3508
|
}, [slots.tags()]);
|
|
2916
3509
|
}
|
|
2917
|
-
if ((
|
|
3510
|
+
if ((_b2 = props2.tags) == null ? void 0 : _b2.length) {
|
|
2918
3511
|
return createVNode("div", {
|
|
2919
|
-
"class": bem$
|
|
3512
|
+
"class": bem$1y("tags")
|
|
2920
3513
|
}, [props2.tags.map((tag, index) => createVNode("span", {
|
|
2921
3514
|
"key": `${tag}-${index}`,
|
|
2922
|
-
"class": bem$
|
|
3515
|
+
"class": bem$1y("tag")
|
|
2923
3516
|
}, [tag]))]);
|
|
2924
3517
|
}
|
|
2925
3518
|
};
|
|
2926
|
-
const
|
|
2927
|
-
if (slots["title-
|
|
3519
|
+
const renderTitleTag = () => {
|
|
3520
|
+
if (!isVisible(props2.showTitleTag, !!slots["title-tag"] || isDef(props2.titleTag))) {
|
|
3521
|
+
return;
|
|
3522
|
+
}
|
|
3523
|
+
if (slots["title-tag"]) {
|
|
2928
3524
|
return createVNode("div", {
|
|
2929
|
-
"class": bem$
|
|
2930
|
-
}, [slots["title-
|
|
3525
|
+
"class": bem$1y("title-tag")
|
|
3526
|
+
}, [slots["title-tag"]()]);
|
|
2931
3527
|
}
|
|
2932
|
-
if (props2.
|
|
2933
|
-
return createVNode(
|
|
2934
|
-
"
|
|
2935
|
-
|
|
2936
|
-
|
|
3528
|
+
if (isDef(props2.titleTag)) {
|
|
3529
|
+
return createVNode("div", {
|
|
3530
|
+
"class": bem$1y("title-tag")
|
|
3531
|
+
}, [createVNode(Tag, {
|
|
3532
|
+
"size": "small"
|
|
3533
|
+
}, {
|
|
3534
|
+
default: () => [props2.titleTag]
|
|
3535
|
+
})]);
|
|
3536
|
+
}
|
|
3537
|
+
};
|
|
3538
|
+
const renderWrapTags = () => {
|
|
3539
|
+
var _a2, _b2;
|
|
3540
|
+
if (!isVisible(props2.showWrapTags, !!slots["wrap-tags"] || !!((_a2 = props2.wrapTags) == null ? void 0 : _a2.length))) {
|
|
3541
|
+
return;
|
|
3542
|
+
}
|
|
3543
|
+
if (slots["wrap-tags"]) {
|
|
3544
|
+
return createVNode("div", {
|
|
3545
|
+
"class": bem$1y("wrap-tags")
|
|
3546
|
+
}, [slots["wrap-tags"]()]);
|
|
3547
|
+
}
|
|
3548
|
+
if ((_b2 = props2.wrapTags) == null ? void 0 : _b2.length) {
|
|
3549
|
+
return createVNode("div", {
|
|
3550
|
+
"class": bem$1y("wrap-tags")
|
|
3551
|
+
}, [props2.wrapTags.map((tag, index) => createVNode(Tag, {
|
|
3552
|
+
"key": `${tag}-${index}`
|
|
3553
|
+
}, {
|
|
3554
|
+
default: () => [tag]
|
|
3555
|
+
}))]);
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3558
|
+
const renderTitleIcon = () => {
|
|
3559
|
+
if (!isVisible(props2.showTitleIcon, !!slots["title-icon"] || !!props2.titleIcon)) {
|
|
3560
|
+
return;
|
|
3561
|
+
}
|
|
3562
|
+
const icon = slots["title-icon"] ? slots["title-icon"]() : props2.titleIcon ? createVNode(Icon, {
|
|
3563
|
+
"name": props2.titleIcon
|
|
3564
|
+
}, null) : void 0;
|
|
3565
|
+
if (!icon)
|
|
3566
|
+
return;
|
|
3567
|
+
if (props2.titleIconClickable) {
|
|
3568
|
+
return createVNode("button", {
|
|
3569
|
+
"type": "button",
|
|
3570
|
+
"class": bem$1y("title-icon", {
|
|
3571
|
+
clickable: true
|
|
3572
|
+
}),
|
|
3573
|
+
"aria-label": `操作${props2.title || ""}`,
|
|
3574
|
+
"onClick": (event) => {
|
|
3575
|
+
event.stopPropagation();
|
|
3576
|
+
emit("click-title-icon", event);
|
|
3577
|
+
}
|
|
3578
|
+
}, [icon]);
|
|
2937
3579
|
}
|
|
3580
|
+
return createVNode("div", {
|
|
3581
|
+
"class": bem$1y("title-icon")
|
|
3582
|
+
}, [icon]);
|
|
2938
3583
|
};
|
|
2939
3584
|
const renderNoteContent = (content) => {
|
|
2940
3585
|
const clickable = props2.noteClickable || props2.noteTo || props2.noteUrl;
|
|
2941
|
-
const classes = bem$
|
|
3586
|
+
const classes = bem$1y("note", {
|
|
2942
3587
|
bold: props2.noteBold,
|
|
2943
3588
|
clickable
|
|
2944
3589
|
});
|
|
@@ -2963,6 +3608,9 @@ var stdin_default$1O = defineComponent({
|
|
|
2963
3608
|
}, [content]);
|
|
2964
3609
|
};
|
|
2965
3610
|
const renderNote = () => {
|
|
3611
|
+
if (!isVisible(props2.showNote, !!slots.note || isDef(props2.note))) {
|
|
3612
|
+
return;
|
|
3613
|
+
}
|
|
2966
3614
|
if (slots.note) {
|
|
2967
3615
|
return renderNoteContent(slots.note());
|
|
2968
3616
|
}
|
|
@@ -2971,14 +3619,17 @@ var stdin_default$1O = defineComponent({
|
|
|
2971
3619
|
}
|
|
2972
3620
|
};
|
|
2973
3621
|
const renderBadge = () => {
|
|
3622
|
+
if (!isVisible(props2.showBadge, !!slots.badge || isDef(props2.badge))) {
|
|
3623
|
+
return;
|
|
3624
|
+
}
|
|
2974
3625
|
if (slots.badge) {
|
|
2975
3626
|
return createVNode("div", {
|
|
2976
|
-
"class": bem$
|
|
3627
|
+
"class": bem$1y("badge")
|
|
2977
3628
|
}, [slots.badge()]);
|
|
2978
3629
|
}
|
|
2979
3630
|
if (isDef(props2.badge)) {
|
|
2980
3631
|
return createVNode("div", {
|
|
2981
|
-
"class": bem$
|
|
3632
|
+
"class": bem$1y("badge")
|
|
2982
3633
|
}, [createVNode(Badge, {
|
|
2983
3634
|
"content": props2.badge,
|
|
2984
3635
|
"showZero": true
|
|
@@ -2986,20 +3637,23 @@ var stdin_default$1O = defineComponent({
|
|
|
2986
3637
|
}
|
|
2987
3638
|
};
|
|
2988
3639
|
const renderRightIcon = () => {
|
|
3640
|
+
if (!isVisible(props2.showRightIcon, !!slots["right-icon"] || !!props2.rightIcon || props2.isLink)) {
|
|
3641
|
+
return;
|
|
3642
|
+
}
|
|
2989
3643
|
if (slots["right-icon"]) {
|
|
2990
3644
|
return slots["right-icon"]();
|
|
2991
3645
|
}
|
|
2992
3646
|
if (props2.rightIcon) {
|
|
2993
3647
|
return createVNode(Icon, {
|
|
2994
3648
|
"name": props2.rightIcon,
|
|
2995
|
-
"class": bem$
|
|
3649
|
+
"class": bem$1y("right-icon")
|
|
2996
3650
|
}, null);
|
|
2997
3651
|
}
|
|
2998
3652
|
if (props2.isLink) {
|
|
2999
3653
|
const name2 = props2.arrowDirection && props2.arrowDirection !== "right" ? `arrow-${props2.arrowDirection}` : "arrow";
|
|
3000
3654
|
return createVNode(Icon, {
|
|
3001
3655
|
"name": name2,
|
|
3002
|
-
"class": bem$
|
|
3656
|
+
"class": bem$1y("right-icon")
|
|
3003
3657
|
}, null);
|
|
3004
3658
|
}
|
|
3005
3659
|
};
|
|
@@ -3016,7 +3670,7 @@ var stdin_default$1O = defineComponent({
|
|
|
3016
3670
|
threeLine
|
|
3017
3671
|
} = props2;
|
|
3018
3672
|
const clickable = (_a2 = props2.clickable) != null ? _a2 : isLink || rightIcon === "arrow" || hasSelect("left") || hasSelect("right");
|
|
3019
|
-
const hasBadge = !!slots.badge || isDef(props2.badge);
|
|
3673
|
+
const hasBadge = isVisible(props2.showBadge, !!slots.badge || isDef(props2.badge));
|
|
3020
3674
|
const cellSize = (_b2 = size != null ? size : config == null ? void 0 : config.cellSize) != null ? _b2 : "normal";
|
|
3021
3675
|
const classes = {
|
|
3022
3676
|
center: center || hasBadge,
|
|
@@ -3036,7 +3690,10 @@ var stdin_default$1O = defineComponent({
|
|
|
3036
3690
|
}
|
|
3037
3691
|
};
|
|
3038
3692
|
return createVNode("div", {
|
|
3039
|
-
"class": [bem$
|
|
3693
|
+
"class": [bem$1y(classes), props2.errorBorder ? "van-cell-error-border" : ""],
|
|
3694
|
+
"style": props2.background ? {
|
|
3695
|
+
background: props2.background
|
|
3696
|
+
} : void 0,
|
|
3040
3697
|
"role": clickable ? "button" : void 0,
|
|
3041
3698
|
"tabindex": clickable ? 0 : void 0,
|
|
3042
3699
|
"onClick": onClick
|
|
@@ -3044,8 +3701,8 @@ var stdin_default$1O = defineComponent({
|
|
|
3044
3701
|
};
|
|
3045
3702
|
}
|
|
3046
3703
|
});
|
|
3047
|
-
const Cell = withInstall(stdin_default$
|
|
3048
|
-
const [name$
|
|
3704
|
+
const Cell = withInstall(stdin_default$1L);
|
|
3705
|
+
const [name$1B, bem$1x] = createNamespace("form");
|
|
3049
3706
|
const formProps = {
|
|
3050
3707
|
colon: Boolean,
|
|
3051
3708
|
disabled: Boolean,
|
|
@@ -3064,8 +3721,8 @@ const formProps = {
|
|
|
3064
3721
|
default: "onBlur"
|
|
3065
3722
|
}
|
|
3066
3723
|
};
|
|
3067
|
-
var stdin_default$
|
|
3068
|
-
name: name$
|
|
3724
|
+
var stdin_default$1K = defineComponent({
|
|
3725
|
+
name: name$1B,
|
|
3069
3726
|
props: formProps,
|
|
3070
3727
|
emits: ["submit", "failed"],
|
|
3071
3728
|
setup(props2, {
|
|
@@ -3189,13 +3846,13 @@ var stdin_default$1N = defineComponent({
|
|
|
3189
3846
|
return () => {
|
|
3190
3847
|
var _a;
|
|
3191
3848
|
return createVNode("form", {
|
|
3192
|
-
"class": bem$
|
|
3849
|
+
"class": bem$1x(),
|
|
3193
3850
|
"onSubmit": onSubmit
|
|
3194
3851
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3195
3852
|
};
|
|
3196
3853
|
}
|
|
3197
3854
|
});
|
|
3198
|
-
const Form = withInstall(stdin_default$
|
|
3855
|
+
const Form = withInstall(stdin_default$1K);
|
|
3199
3856
|
function isEmptyValue(value) {
|
|
3200
3857
|
if (Array.isArray(value)) {
|
|
3201
3858
|
return !value.length;
|
|
@@ -3293,7 +3950,7 @@ function useId() {
|
|
|
3293
3950
|
}
|
|
3294
3951
|
return `${name2}-${++current}`;
|
|
3295
3952
|
}
|
|
3296
|
-
const [name$
|
|
3953
|
+
const [name$1A, bem$1w] = createNamespace("field");
|
|
3297
3954
|
const fieldSharedProps = {
|
|
3298
3955
|
id: String,
|
|
3299
3956
|
name: String,
|
|
@@ -3346,8 +4003,8 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
3346
4003
|
default: false
|
|
3347
4004
|
}
|
|
3348
4005
|
});
|
|
3349
|
-
var stdin_default$
|
|
3350
|
-
name: name$
|
|
4006
|
+
var stdin_default$1J = defineComponent({
|
|
4007
|
+
name: name$1A,
|
|
3351
4008
|
props: fieldProps,
|
|
3352
4009
|
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
|
|
3353
4010
|
setup(props2, {
|
|
@@ -3620,7 +4277,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3620
4277
|
const getInputId = () => props2.id || `${id}-input`;
|
|
3621
4278
|
const getValidationStatus = () => state.status;
|
|
3622
4279
|
const renderInput = () => {
|
|
3623
|
-
const controlClass = bem$
|
|
4280
|
+
const controlClass = bem$1w("control", [inputAlign.value, {
|
|
3624
4281
|
error: showError.value,
|
|
3625
4282
|
custom: !!slots.input,
|
|
3626
4283
|
"min-height": props2.type === "textarea" && !props2.autosize
|
|
@@ -3662,7 +4319,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3662
4319
|
const leftIconSlot = slots["left-icon"];
|
|
3663
4320
|
if (props2.leftIcon || leftIconSlot) {
|
|
3664
4321
|
return createVNode("div", {
|
|
3665
|
-
"class": bem$
|
|
4322
|
+
"class": bem$1w("left-icon"),
|
|
3666
4323
|
"onClick": onClickLeftIcon
|
|
3667
4324
|
}, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
|
|
3668
4325
|
"name": props2.leftIcon,
|
|
@@ -3674,7 +4331,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3674
4331
|
const rightIconSlot = slots["right-icon"];
|
|
3675
4332
|
if (props2.rightIcon || rightIconSlot) {
|
|
3676
4333
|
return createVNode("div", {
|
|
3677
|
-
"class": bem$
|
|
4334
|
+
"class": bem$1w("right-icon"),
|
|
3678
4335
|
"onClick": onClickRightIcon
|
|
3679
4336
|
}, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
|
|
3680
4337
|
"name": props2.rightIcon,
|
|
@@ -3686,9 +4343,9 @@ var stdin_default$1M = defineComponent({
|
|
|
3686
4343
|
if (props2.showWordLimit && props2.maxlength) {
|
|
3687
4344
|
const count = getStringLength(getModelValue());
|
|
3688
4345
|
return createVNode("div", {
|
|
3689
|
-
"class": bem$
|
|
4346
|
+
"class": bem$1w("word-limit")
|
|
3690
4347
|
}, [createVNode("span", {
|
|
3691
|
-
"class": bem$
|
|
4348
|
+
"class": bem$1w("word-num")
|
|
3692
4349
|
}, [count]), createTextVNode("/"), props2.maxlength]);
|
|
3693
4350
|
}
|
|
3694
4351
|
};
|
|
@@ -3701,7 +4358,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3701
4358
|
const slot = slots["error-message"];
|
|
3702
4359
|
const errorMessageAlign = getProp("errorMessageAlign");
|
|
3703
4360
|
return createVNode("div", {
|
|
3704
|
-
"class": bem$
|
|
4361
|
+
"class": bem$1w("error-message", errorMessageAlign)
|
|
3705
4362
|
}, [slot ? slot({
|
|
3706
4363
|
message
|
|
3707
4364
|
}) : message]);
|
|
@@ -3720,13 +4377,13 @@ var stdin_default$1M = defineComponent({
|
|
|
3720
4377
|
}
|
|
3721
4378
|
};
|
|
3722
4379
|
const renderFieldBody = () => [createVNode("div", {
|
|
3723
|
-
"class": bem$
|
|
4380
|
+
"class": bem$1w("body")
|
|
3724
4381
|
}, [renderInput(), showClear.value && createVNode(Icon, {
|
|
3725
4382
|
"ref": clearIconRef,
|
|
3726
4383
|
"name": props2.clearIcon,
|
|
3727
|
-
"class": bem$
|
|
4384
|
+
"class": bem$1w("clear")
|
|
3728
4385
|
}, null), renderRightIcon(), slots.button && createVNode("div", {
|
|
3729
|
-
"class": bem$
|
|
4386
|
+
"class": bem$1w("button")
|
|
3730
4387
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
|
3731
4388
|
useExpose({
|
|
3732
4389
|
blur,
|
|
@@ -3765,7 +4422,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3765
4422
|
return createVNode(Cell, {
|
|
3766
4423
|
"size": props2.size,
|
|
3767
4424
|
"icon": props2.leftIcon,
|
|
3768
|
-
"class": bem$
|
|
4425
|
+
"class": bem$1w({
|
|
3769
4426
|
error: showError.value,
|
|
3770
4427
|
disabled,
|
|
3771
4428
|
[`label-${labelAlign}`]: labelAlign,
|
|
@@ -3777,8 +4434,8 @@ var stdin_default$1M = defineComponent({
|
|
|
3777
4434
|
"isLink": props2.isLink,
|
|
3778
4435
|
"clickable": props2.clickable,
|
|
3779
4436
|
"titleStyle": labelStyle.value,
|
|
3780
|
-
"valueClass": bem$
|
|
3781
|
-
"titleClass": [bem$
|
|
4437
|
+
"valueClass": bem$1w("value"),
|
|
4438
|
+
"titleClass": [bem$1w("label", [labelAlign, {
|
|
3782
4439
|
required: props2.required
|
|
3783
4440
|
}]), props2.labelClass],
|
|
3784
4441
|
"arrowDirection": props2.arrowDirection
|
|
@@ -3791,7 +4448,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3791
4448
|
};
|
|
3792
4449
|
}
|
|
3793
4450
|
});
|
|
3794
|
-
const Field = withInstall(stdin_default$
|
|
4451
|
+
const Field = withInstall(stdin_default$1J);
|
|
3795
4452
|
function usePopupState() {
|
|
3796
4453
|
const state = reactive({
|
|
3797
4454
|
show: false
|
|
@@ -3838,7 +4495,7 @@ function lockClick(lock) {
|
|
|
3838
4495
|
}
|
|
3839
4496
|
}
|
|
3840
4497
|
}
|
|
3841
|
-
const [name$
|
|
4498
|
+
const [name$1z, bem$1v] = createNamespace("toast");
|
|
3842
4499
|
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
|
3843
4500
|
const toastProps = {
|
|
3844
4501
|
icon: String,
|
|
@@ -3860,8 +4517,8 @@ const toastProps = {
|
|
|
3860
4517
|
closeOnClick: Boolean,
|
|
3861
4518
|
closeOnClickOverlay: Boolean
|
|
3862
4519
|
};
|
|
3863
|
-
var stdin_default$
|
|
3864
|
-
name: name$
|
|
4520
|
+
var stdin_default$1I = defineComponent({
|
|
4521
|
+
name: name$1z,
|
|
3865
4522
|
props: toastProps,
|
|
3866
4523
|
emits: ["update:show"],
|
|
3867
4524
|
setup(props2, {
|
|
@@ -3896,13 +4553,13 @@ var stdin_default$1L = defineComponent({
|
|
|
3896
4553
|
return createVNode(Icon, {
|
|
3897
4554
|
"name": icon || type,
|
|
3898
4555
|
"size": iconSize,
|
|
3899
|
-
"class": bem$
|
|
4556
|
+
"class": bem$1v("icon"),
|
|
3900
4557
|
"classPrefix": iconPrefix
|
|
3901
4558
|
}, null);
|
|
3902
4559
|
}
|
|
3903
4560
|
if (type === "loading") {
|
|
3904
4561
|
return createVNode(Loading, {
|
|
3905
|
-
"class": bem$
|
|
4562
|
+
"class": bem$1v("loading"),
|
|
3906
4563
|
"size": iconSize,
|
|
3907
4564
|
"type": loadingType
|
|
3908
4565
|
}, null);
|
|
@@ -3916,10 +4573,10 @@ var stdin_default$1L = defineComponent({
|
|
|
3916
4573
|
if (isDef(message) && message !== "") {
|
|
3917
4574
|
return type === "html" ? createVNode("div", {
|
|
3918
4575
|
"key": 0,
|
|
3919
|
-
"class": bem$
|
|
4576
|
+
"class": bem$1v("text"),
|
|
3920
4577
|
"innerHTML": String(message)
|
|
3921
4578
|
}, null) : createVNode("div", {
|
|
3922
|
-
"class": bem$
|
|
4579
|
+
"class": bem$1v("text")
|
|
3923
4580
|
}, [message]);
|
|
3924
4581
|
}
|
|
3925
4582
|
};
|
|
@@ -3935,7 +4592,7 @@ var stdin_default$1L = defineComponent({
|
|
|
3935
4592
|
onMounted(toggleClickable);
|
|
3936
4593
|
onUnmounted(toggleClickable);
|
|
3937
4594
|
return () => createVNode(Popup, mergeProps({
|
|
3938
|
-
"class": [bem$
|
|
4595
|
+
"class": [bem$1v([props2.position, {
|
|
3939
4596
|
[props2.type]: !props2.icon
|
|
3940
4597
|
}]), props2.className],
|
|
3941
4598
|
"lockScroll": false,
|
|
@@ -4004,7 +4661,7 @@ function createInstance() {
|
|
|
4004
4661
|
onClosed,
|
|
4005
4662
|
"onUpdate:show": toggle
|
|
4006
4663
|
};
|
|
4007
|
-
return createVNode(stdin_default$
|
|
4664
|
+
return createVNode(stdin_default$1I, mergeProps(state, attrs), null);
|
|
4008
4665
|
};
|
|
4009
4666
|
watch(message, (val) => {
|
|
4010
4667
|
state.message = val;
|
|
@@ -4076,10 +4733,10 @@ Toast.allowMultiple = (value = true) => {
|
|
|
4076
4733
|
allowMultiple = value;
|
|
4077
4734
|
};
|
|
4078
4735
|
Toast.install = (app) => {
|
|
4079
|
-
app.use(withInstall(stdin_default$
|
|
4736
|
+
app.use(withInstall(stdin_default$1I));
|
|
4080
4737
|
app.config.globalProperties.$toast = Toast;
|
|
4081
4738
|
};
|
|
4082
|
-
const [name$
|
|
4739
|
+
const [name$1y, bem$1u] = createNamespace("switch");
|
|
4083
4740
|
const switchProps = {
|
|
4084
4741
|
size: numericProp,
|
|
4085
4742
|
loading: Boolean,
|
|
@@ -4096,8 +4753,8 @@ const switchProps = {
|
|
|
4096
4753
|
default: false
|
|
4097
4754
|
}
|
|
4098
4755
|
};
|
|
4099
|
-
var stdin_default$
|
|
4100
|
-
name: name$
|
|
4756
|
+
var stdin_default$1H = defineComponent({
|
|
4757
|
+
name: name$1y,
|
|
4101
4758
|
props: switchProps,
|
|
4102
4759
|
emits: ["change", "update:modelValue"],
|
|
4103
4760
|
setup(props2, {
|
|
@@ -4116,7 +4773,7 @@ var stdin_default$1K = defineComponent({
|
|
|
4116
4773
|
if (props2.loading) {
|
|
4117
4774
|
const color = isChecked() ? props2.activeColor : props2.inactiveColor;
|
|
4118
4775
|
return createVNode(Loading, {
|
|
4119
|
-
"class": bem$
|
|
4776
|
+
"class": bem$1u("loading"),
|
|
4120
4777
|
"color": color
|
|
4121
4778
|
}, null);
|
|
4122
4779
|
}
|
|
@@ -4141,7 +4798,7 @@ var stdin_default$1K = defineComponent({
|
|
|
4141
4798
|
};
|
|
4142
4799
|
return createVNode("div", {
|
|
4143
4800
|
"role": "switch",
|
|
4144
|
-
"class": bem$
|
|
4801
|
+
"class": bem$1u({
|
|
4145
4802
|
on: checked,
|
|
4146
4803
|
loading,
|
|
4147
4804
|
disabled
|
|
@@ -4151,16 +4808,16 @@ var stdin_default$1K = defineComponent({
|
|
|
4151
4808
|
"aria-checked": checked,
|
|
4152
4809
|
"onClick": onClick
|
|
4153
4810
|
}, [createVNode("div", {
|
|
4154
|
-
"class": bem$
|
|
4811
|
+
"class": bem$1u("node")
|
|
4155
4812
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
|
4156
4813
|
};
|
|
4157
4814
|
}
|
|
4158
4815
|
});
|
|
4159
|
-
const Switch = withInstall(stdin_default$
|
|
4160
|
-
const [name$
|
|
4816
|
+
const Switch = withInstall(stdin_default$1H);
|
|
4817
|
+
const [name$1x, bem$1t] = createNamespace("address-edit-detail");
|
|
4161
4818
|
const t$i = createNamespace("address-edit")[2];
|
|
4162
|
-
var stdin_default$
|
|
4163
|
-
name: name$
|
|
4819
|
+
var stdin_default$1G = defineComponent({
|
|
4820
|
+
name: name$1x,
|
|
4164
4821
|
props: {
|
|
4165
4822
|
show: Boolean,
|
|
4166
4823
|
rows: numericProp,
|
|
@@ -4183,7 +4840,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4183
4840
|
};
|
|
4184
4841
|
const renderSearchTitle = (express) => {
|
|
4185
4842
|
if (express.name) {
|
|
4186
|
-
const text = express.name.replace(props2.value, `<span class=${bem$
|
|
4843
|
+
const text = express.name.replace(props2.value, `<span class=${bem$1t("keyword")}>${props2.value}</span>`);
|
|
4187
4844
|
return createVNode("div", {
|
|
4188
4845
|
"innerHTML": text
|
|
4189
4846
|
}, null);
|
|
@@ -4201,7 +4858,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4201
4858
|
"key": express.name + express.address,
|
|
4202
4859
|
"icon": "location-o",
|
|
4203
4860
|
"label": express.address,
|
|
4204
|
-
"class": bem$
|
|
4861
|
+
"class": bem$1t("search-item"),
|
|
4205
4862
|
"border": false,
|
|
4206
4863
|
"onClick": () => onSelect(express)
|
|
4207
4864
|
}, {
|
|
@@ -4217,7 +4874,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4217
4874
|
"autosize": true,
|
|
4218
4875
|
"clearable": true,
|
|
4219
4876
|
"ref": field,
|
|
4220
|
-
"class": bem$
|
|
4877
|
+
"class": bem$1t(),
|
|
4221
4878
|
"rows": props2.rows,
|
|
4222
4879
|
"type": "textarea",
|
|
4223
4880
|
"rules": props2.rules,
|
|
@@ -4234,7 +4891,7 @@ var stdin_default$1J = defineComponent({
|
|
|
4234
4891
|
};
|
|
4235
4892
|
}
|
|
4236
4893
|
});
|
|
4237
|
-
const [name$
|
|
4894
|
+
const [name$1w, bem$1s, t$h] = createNamespace("address-edit");
|
|
4238
4895
|
const DEFAULT_DATA = {
|
|
4239
4896
|
name: "",
|
|
4240
4897
|
tel: "",
|
|
@@ -4281,8 +4938,8 @@ const addressEditProps = {
|
|
|
4281
4938
|
default: isPostal
|
|
4282
4939
|
}
|
|
4283
4940
|
};
|
|
4284
|
-
var stdin_default$
|
|
4285
|
-
name: name$
|
|
4941
|
+
var stdin_default$1F = defineComponent({
|
|
4942
|
+
name: name$1w,
|
|
4286
4943
|
props: addressEditProps,
|
|
4287
4944
|
emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
|
|
4288
4945
|
setup(props2, {
|
|
@@ -4408,7 +5065,7 @@ var stdin_default$1I = defineComponent({
|
|
|
4408
5065
|
return withDirectives(createVNode(Cell, {
|
|
4409
5066
|
"center": true,
|
|
4410
5067
|
"title": t$h("defaultAddress"),
|
|
4411
|
-
"class": bem$
|
|
5068
|
+
"class": bem$1s("default")
|
|
4412
5069
|
}, slots2), [[vShow, !hideBottomFields.value]]);
|
|
4413
5070
|
}
|
|
4414
5071
|
};
|
|
@@ -4430,13 +5087,13 @@ var stdin_default$1I = defineComponent({
|
|
|
4430
5087
|
disableArea
|
|
4431
5088
|
} = props2;
|
|
4432
5089
|
return createVNode(Form, {
|
|
4433
|
-
"class": bem$
|
|
5090
|
+
"class": bem$1s(),
|
|
4434
5091
|
"onSubmit": onSave
|
|
4435
5092
|
}, {
|
|
4436
5093
|
default: () => {
|
|
4437
5094
|
var _a;
|
|
4438
5095
|
return [createVNode("div", {
|
|
4439
|
-
"class": bem$
|
|
5096
|
+
"class": bem$1s("fields")
|
|
4440
5097
|
}, [createVNode(Field, {
|
|
4441
5098
|
"modelValue": data.name,
|
|
4442
5099
|
"onUpdate:modelValue": ($event) => data.name = $event,
|
|
@@ -4467,7 +5124,7 @@ var stdin_default$1I = defineComponent({
|
|
|
4467
5124
|
emit("click-area");
|
|
4468
5125
|
showAreaPopup.value = !disableArea;
|
|
4469
5126
|
}
|
|
4470
|
-
}, null), [[vShow, props2.showArea]]), createVNode(stdin_default$
|
|
5127
|
+
}, null), [[vShow, props2.showArea]]), createVNode(stdin_default$1G, {
|
|
4471
5128
|
"show": props2.showDetail,
|
|
4472
5129
|
"rows": props2.detailRows,
|
|
4473
5130
|
"rules": rules.value.addressDetail,
|
|
@@ -4478,153 +5135,64 @@ var stdin_default$1I = defineComponent({
|
|
|
4478
5135
|
"showSearchResult": props2.showSearchResult,
|
|
4479
5136
|
"onBlur": onDetailBlur,
|
|
4480
5137
|
"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
|
|
5138
|
+
"onInput": onChangeDetail,
|
|
5139
|
+
"onSelect-search": (event) => emit("select-search", event)
|
|
5140
|
+
}, null), props2.showPostal && withDirectives(createVNode(Field, {
|
|
5141
|
+
"modelValue": data.postalCode,
|
|
5142
|
+
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
|
5143
|
+
"type": "tel",
|
|
5144
|
+
"rules": rules.value.postalCode,
|
|
5145
|
+
"label": t$h("postal"),
|
|
5146
|
+
"maxlength": "6",
|
|
5147
|
+
"placeholder": t$h("postal"),
|
|
5148
|
+
"onFocus": () => onFocus("postalCode")
|
|
5149
|
+
}, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
|
5150
|
+
"class": bem$1s("buttons")
|
|
5151
|
+
}, [createVNode(Button, {
|
|
5152
|
+
"block": true,
|
|
5153
|
+
"round": true,
|
|
5154
|
+
"type": "primary",
|
|
5155
|
+
"text": props2.saveButtonText || t$h("save"),
|
|
5156
|
+
"class": bem$1s("button"),
|
|
5157
|
+
"loading": props2.isSaving,
|
|
5158
|
+
"nativeType": "submit"
|
|
5159
|
+
}, null), props2.showDelete && createVNode(Button, {
|
|
5160
|
+
"block": true,
|
|
5161
|
+
"round": true,
|
|
5162
|
+
"class": bem$1s("button"),
|
|
5163
|
+
"loading": props2.isDeleting,
|
|
5164
|
+
"text": props2.deleteButtonText || t$h("delete"),
|
|
5165
|
+
"onClick": onDelete
|
|
5166
|
+
}, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
|
|
5167
|
+
"show": showAreaPopup.value,
|
|
5168
|
+
"onUpdate:show": ($event) => showAreaPopup.value = $event,
|
|
5169
|
+
"round": true,
|
|
5170
|
+
"teleport": "body",
|
|
5171
|
+
"position": "bottom",
|
|
5172
|
+
"lazyRender": false
|
|
5173
|
+
}, {
|
|
5174
|
+
default: () => [createVNode(Area, {
|
|
5175
|
+
"ref": areaRef,
|
|
5176
|
+
"value": data.areaCode,
|
|
5177
|
+
"loading": !areaListLoaded.value,
|
|
5178
|
+
"areaList": props2.areaList,
|
|
5179
|
+
"columnsPlaceholder": props2.areaColumnsPlaceholder,
|
|
5180
|
+
"onConfirm": onAreaConfirm,
|
|
5181
|
+
"onCancel": () => {
|
|
5182
|
+
showAreaPopup.value = false;
|
|
5183
|
+
}
|
|
5184
|
+
}, null)]
|
|
5185
|
+
})];
|
|
4614
5186
|
}
|
|
4615
|
-
}
|
|
5187
|
+
});
|
|
4616
5188
|
};
|
|
4617
|
-
return () => createVNode(Transition, {
|
|
4618
|
-
"name": props2.closeable ? "van-fade" : void 0
|
|
4619
|
-
}, {
|
|
4620
|
-
default: () => [props2.show ? renderTag() : null]
|
|
4621
|
-
});
|
|
4622
5189
|
}
|
|
4623
5190
|
});
|
|
4624
|
-
const
|
|
4625
|
-
const
|
|
4626
|
-
|
|
4627
|
-
|
|
5191
|
+
const AddressEdit = withInstall(stdin_default$1F);
|
|
5192
|
+
const RadioGroup = withInstall(stdin_default$1O);
|
|
5193
|
+
const [name$1v, bem$1r] = createNamespace("address-item");
|
|
5194
|
+
var stdin_default$1E = defineComponent({
|
|
5195
|
+
name: name$1v,
|
|
4628
5196
|
props: {
|
|
4629
5197
|
address: makeRequiredProp(Object),
|
|
4630
5198
|
disabled: Boolean,
|
|
@@ -4644,7 +5212,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4644
5212
|
};
|
|
4645
5213
|
const renderRightIcon = () => createVNode(Icon, {
|
|
4646
5214
|
"name": "edit",
|
|
4647
|
-
"class": bem$
|
|
5215
|
+
"class": bem$1r("edit"),
|
|
4648
5216
|
"onClick": (event) => {
|
|
4649
5217
|
event.stopPropagation();
|
|
4650
5218
|
emit("edit");
|
|
@@ -4659,7 +5227,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4659
5227
|
return createVNode(Tag, {
|
|
4660
5228
|
"type": "danger",
|
|
4661
5229
|
"round": true,
|
|
4662
|
-
"class": bem$
|
|
5230
|
+
"class": bem$1r("tag")
|
|
4663
5231
|
}, {
|
|
4664
5232
|
default: () => [props2.defaultTagText]
|
|
4665
5233
|
});
|
|
@@ -4672,9 +5240,9 @@ var stdin_default$1G = defineComponent({
|
|
|
4672
5240
|
switchable
|
|
4673
5241
|
} = props2;
|
|
4674
5242
|
const Info = [createVNode("div", {
|
|
4675
|
-
"class": bem$
|
|
5243
|
+
"class": bem$1r("name")
|
|
4676
5244
|
}, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
|
|
4677
|
-
"class": bem$
|
|
5245
|
+
"class": bem$1r("address")
|
|
4678
5246
|
}, [address.address])];
|
|
4679
5247
|
if (switchable && !disabled) {
|
|
4680
5248
|
return createVNode(Radio, {
|
|
@@ -4692,13 +5260,13 @@ var stdin_default$1G = defineComponent({
|
|
|
4692
5260
|
disabled
|
|
4693
5261
|
} = props2;
|
|
4694
5262
|
return createVNode("div", {
|
|
4695
|
-
"class": bem$
|
|
5263
|
+
"class": bem$1r({
|
|
4696
5264
|
disabled
|
|
4697
5265
|
}),
|
|
4698
5266
|
"onClick": onClick
|
|
4699
5267
|
}, [createVNode(Cell, {
|
|
4700
5268
|
"border": false,
|
|
4701
|
-
"valueClass": bem$
|
|
5269
|
+
"valueClass": bem$1r("value")
|
|
4702
5270
|
}, {
|
|
4703
5271
|
value: renderContent,
|
|
4704
5272
|
"right-icon": renderRightIcon
|
|
@@ -4708,7 +5276,7 @@ var stdin_default$1G = defineComponent({
|
|
|
4708
5276
|
};
|
|
4709
5277
|
}
|
|
4710
5278
|
});
|
|
4711
|
-
const [name$
|
|
5279
|
+
const [name$1u, bem$1q, t$g] = createNamespace("address-list");
|
|
4712
5280
|
const addressListProps = {
|
|
4713
5281
|
list: makeArrayProp(),
|
|
4714
5282
|
modelValue: numericProp,
|
|
@@ -4718,8 +5286,8 @@ const addressListProps = {
|
|
|
4718
5286
|
addButtonText: String,
|
|
4719
5287
|
defaultTagText: String
|
|
4720
5288
|
};
|
|
4721
|
-
var stdin_default$
|
|
4722
|
-
name: name$
|
|
5289
|
+
var stdin_default$1D = defineComponent({
|
|
5290
|
+
name: name$1u,
|
|
4723
5291
|
props: addressListProps,
|
|
4724
5292
|
emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
|
|
4725
5293
|
setup(props2, {
|
|
@@ -4735,7 +5303,7 @@ var stdin_default$1F = defineComponent({
|
|
|
4735
5303
|
emit("update:modelValue", item.id);
|
|
4736
5304
|
}
|
|
4737
5305
|
};
|
|
4738
|
-
return createVNode(stdin_default$
|
|
5306
|
+
return createVNode(stdin_default$1E, {
|
|
4739
5307
|
"key": item.id,
|
|
4740
5308
|
"address": item,
|
|
4741
5309
|
"disabled": disabled,
|
|
@@ -4755,13 +5323,13 @@ var stdin_default$1F = defineComponent({
|
|
|
4755
5323
|
}
|
|
4756
5324
|
};
|
|
4757
5325
|
const renderBottom = () => createVNode("div", {
|
|
4758
|
-
"class": [bem$
|
|
5326
|
+
"class": [bem$1q("bottom"), "van-safe-area-bottom"]
|
|
4759
5327
|
}, [createVNode(Button, {
|
|
4760
5328
|
"round": true,
|
|
4761
5329
|
"block": true,
|
|
4762
5330
|
"type": "primary",
|
|
4763
5331
|
"text": props2.addButtonText || t$g("add"),
|
|
4764
|
-
"class": bem$
|
|
5332
|
+
"class": bem$1q("add"),
|
|
4765
5333
|
"onClick": () => emit("add")
|
|
4766
5334
|
}, null)]);
|
|
4767
5335
|
return () => {
|
|
@@ -4769,10 +5337,10 @@ var stdin_default$1F = defineComponent({
|
|
|
4769
5337
|
const List2 = renderList(props2.list);
|
|
4770
5338
|
const DisabledList = renderList(props2.disabledList, true);
|
|
4771
5339
|
const DisabledText = props2.disabledText && createVNode("div", {
|
|
4772
|
-
"class": bem$
|
|
5340
|
+
"class": bem$1q("disabled-text")
|
|
4773
5341
|
}, [props2.disabledText]);
|
|
4774
5342
|
return createVNode("div", {
|
|
4775
|
-
"class": bem$
|
|
5343
|
+
"class": bem$1q()
|
|
4776
5344
|
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
|
|
4777
5345
|
"modelValue": props2.modelValue
|
|
4778
5346
|
}, {
|
|
@@ -4781,13 +5349,13 @@ var stdin_default$1F = defineComponent({
|
|
|
4781
5349
|
};
|
|
4782
5350
|
}
|
|
4783
5351
|
});
|
|
4784
|
-
const AddressList = withInstall(stdin_default$
|
|
4785
|
-
const [name$
|
|
5352
|
+
const AddressList = withInstall(stdin_default$1D);
|
|
5353
|
+
const [name$1t, bem$1p] = createNamespace("background");
|
|
4786
5354
|
const backgroundProps = {
|
|
4787
5355
|
theme: makeStringProp("default")
|
|
4788
5356
|
};
|
|
4789
|
-
var stdin_default$
|
|
4790
|
-
name: name$
|
|
5357
|
+
var stdin_default$1C = defineComponent({
|
|
5358
|
+
name: name$1t,
|
|
4791
5359
|
props: backgroundProps,
|
|
4792
5360
|
setup(props2, {
|
|
4793
5361
|
slots
|
|
@@ -4795,13 +5363,13 @@ var stdin_default$1E = defineComponent({
|
|
|
4795
5363
|
return () => {
|
|
4796
5364
|
var _a;
|
|
4797
5365
|
return createVNode("div", {
|
|
4798
|
-
"class": bem$
|
|
5366
|
+
"class": bem$1p([props2.theme])
|
|
4799
5367
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
4800
5368
|
};
|
|
4801
5369
|
}
|
|
4802
5370
|
});
|
|
4803
|
-
const Background = withInstall(stdin_default$
|
|
4804
|
-
const [name$
|
|
5371
|
+
const Background = withInstall(stdin_default$1C);
|
|
5372
|
+
const [name$1s, bem$1o] = createNamespace("blue-mark");
|
|
4805
5373
|
const blueMarkProps = {
|
|
4806
5374
|
size: {
|
|
4807
5375
|
type: String,
|
|
@@ -4815,8 +5383,8 @@ const blueMarkProps = {
|
|
|
4815
5383
|
gap: numericProp,
|
|
4816
5384
|
isLink: Boolean
|
|
4817
5385
|
};
|
|
4818
|
-
var stdin_default$
|
|
4819
|
-
name: name$
|
|
5386
|
+
var stdin_default$1B = defineComponent({
|
|
5387
|
+
name: name$1s,
|
|
4820
5388
|
props: blueMarkProps,
|
|
4821
5389
|
emits: ["click"],
|
|
4822
5390
|
setup(props2, {
|
|
@@ -4834,30 +5402,30 @@ var stdin_default$1D = defineComponent({
|
|
|
4834
5402
|
return () => {
|
|
4835
5403
|
var _a;
|
|
4836
5404
|
return createVNode("span", {
|
|
4837
|
-
"class": [name$
|
|
5405
|
+
"class": [name$1s, props2.size === "normal" ? "" : `${name$1s}--${props2.size}`, props2.isLink ? `${name$1s}--link` : ""],
|
|
4838
5406
|
"style": style.value,
|
|
4839
5407
|
"onClick": props2.isLink ? (event) => emit("click", event) : void 0
|
|
4840
5408
|
}, [createVNode("span", {
|
|
4841
|
-
"class": bem$
|
|
5409
|
+
"class": bem$1o("main")
|
|
4842
5410
|
}, [createVNode("span", {
|
|
4843
|
-
"class": bem$
|
|
5411
|
+
"class": bem$1o("mark")
|
|
4844
5412
|
}, null), createVNode("span", {
|
|
4845
|
-
"class": bem$
|
|
5413
|
+
"class": bem$1o("content")
|
|
4846
5414
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), props2.isLink && createVNode(stdin_default$22, {
|
|
4847
5415
|
"name": "arrow",
|
|
4848
|
-
"class": bem$
|
|
5416
|
+
"class": bem$1o("arrow")
|
|
4849
5417
|
}, null)]);
|
|
4850
5418
|
};
|
|
4851
5419
|
}
|
|
4852
5420
|
});
|
|
4853
|
-
const [name$
|
|
5421
|
+
const [name$1r, bem$1n] = createNamespace("divider");
|
|
4854
5422
|
const dividerProps = {
|
|
4855
5423
|
dashed: Boolean,
|
|
4856
5424
|
hairline: truthProp,
|
|
4857
5425
|
contentPosition: makeStringProp("center")
|
|
4858
5426
|
};
|
|
4859
|
-
var stdin_default$
|
|
4860
|
-
name: name$
|
|
5427
|
+
var stdin_default$1A = defineComponent({
|
|
5428
|
+
name: name$1r,
|
|
4861
5429
|
props: dividerProps,
|
|
4862
5430
|
setup(props2, {
|
|
4863
5431
|
slots
|
|
@@ -4866,7 +5434,7 @@ var stdin_default$1C = defineComponent({
|
|
|
4866
5434
|
var _a;
|
|
4867
5435
|
return createVNode("div", {
|
|
4868
5436
|
"role": "separator",
|
|
4869
|
-
"class": bem$
|
|
5437
|
+
"class": bem$1n({
|
|
4870
5438
|
dashed: props2.dashed,
|
|
4871
5439
|
hairline: props2.hairline,
|
|
4872
5440
|
[`content-${props2.contentPosition}`]: !!slots.default
|
|
@@ -4875,16 +5443,16 @@ var stdin_default$1C = defineComponent({
|
|
|
4875
5443
|
};
|
|
4876
5444
|
}
|
|
4877
5445
|
});
|
|
4878
|
-
const Divider = withInstall(stdin_default$
|
|
4879
|
-
const [name$
|
|
5446
|
+
const Divider = withInstall(stdin_default$1A);
|
|
5447
|
+
const [name$1q, bem$1m] = createNamespace("collapse-toggle");
|
|
4880
5448
|
const collapseToggleProps = {
|
|
4881
5449
|
modelValue: Boolean,
|
|
4882
5450
|
divider: Boolean,
|
|
4883
5451
|
expandText: makeStringProp("展开"),
|
|
4884
5452
|
collapseText: makeStringProp("收起")
|
|
4885
5453
|
};
|
|
4886
|
-
var stdin_default$
|
|
4887
|
-
name: name$
|
|
5454
|
+
var stdin_default$1z = defineComponent({
|
|
5455
|
+
name: name$1q,
|
|
4888
5456
|
props: collapseToggleProps,
|
|
4889
5457
|
emits: ["update:modelValue", "change"],
|
|
4890
5458
|
setup(props2, {
|
|
@@ -4903,7 +5471,7 @@ var stdin_default$1B = defineComponent({
|
|
|
4903
5471
|
const text = expanded ? props2.collapseText : props2.expandText;
|
|
4904
5472
|
return createVNode("button", {
|
|
4905
5473
|
"type": "button",
|
|
4906
|
-
"class": bem$
|
|
5474
|
+
"class": bem$1m({
|
|
4907
5475
|
expanded
|
|
4908
5476
|
}),
|
|
4909
5477
|
"aria-expanded": expanded,
|
|
@@ -4913,20 +5481,20 @@ var stdin_default$1B = defineComponent({
|
|
|
4913
5481
|
text
|
|
4914
5482
|
})) || text]), createVNode(Icon, {
|
|
4915
5483
|
"name": "arrow-down",
|
|
4916
|
-
"class": bem$
|
|
5484
|
+
"class": bem$1m("icon")
|
|
4917
5485
|
}, null)]);
|
|
4918
5486
|
};
|
|
4919
5487
|
return () => {
|
|
4920
5488
|
if (props2.divider) {
|
|
4921
5489
|
return createVNode("div", {
|
|
4922
|
-
"class": bem$
|
|
5490
|
+
"class": bem$1m("divider")
|
|
4923
5491
|
}, [createVNode(Divider, null, null), renderToggle(), createVNode(Divider, null, null)]);
|
|
4924
5492
|
}
|
|
4925
5493
|
return renderToggle();
|
|
4926
5494
|
};
|
|
4927
5495
|
}
|
|
4928
5496
|
});
|
|
4929
|
-
const [name$
|
|
5497
|
+
const [name$1p, bem$1l] = createNamespace("blue-mark-header");
|
|
4930
5498
|
const blueMarkHeaderProps = {
|
|
4931
5499
|
title: numericProp,
|
|
4932
5500
|
size: {
|
|
@@ -4940,8 +5508,8 @@ const blueMarkHeaderProps = {
|
|
|
4940
5508
|
expandText: String,
|
|
4941
5509
|
collapseText: String
|
|
4942
5510
|
};
|
|
4943
|
-
var stdin_default$
|
|
4944
|
-
name: name$
|
|
5511
|
+
var stdin_default$1y = defineComponent({
|
|
5512
|
+
name: name$1p,
|
|
4945
5513
|
props: blueMarkHeaderProps,
|
|
4946
5514
|
emits: ["click-action", "update:modelValue", "change"],
|
|
4947
5515
|
setup(props2, {
|
|
@@ -4956,226 +5524,56 @@ var stdin_default$1A = defineComponent({
|
|
|
4956
5524
|
if (props2.expandable) {
|
|
4957
5525
|
onChange(!props2.modelValue);
|
|
4958
5526
|
}
|
|
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
|
-
});
|
|
5527
|
+
};
|
|
5528
|
+
const onHeaderKeydown = (event) => {
|
|
5529
|
+
if (props2.expandable && (event.key === "Enter" || event.key === " ")) {
|
|
5530
|
+
event.preventDefault();
|
|
5531
|
+
onHeaderClick();
|
|
5532
|
+
}
|
|
5533
|
+
};
|
|
5153
5534
|
return () => {
|
|
5154
5535
|
var _a;
|
|
5155
|
-
return createVNode(
|
|
5156
|
-
"
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
"
|
|
5161
|
-
"
|
|
5162
|
-
"
|
|
5163
|
-
"
|
|
5164
|
-
|
|
5165
|
-
"
|
|
5166
|
-
},
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
})])
|
|
5536
|
+
return createVNode("div", {
|
|
5537
|
+
"class": bem$1l({
|
|
5538
|
+
expandable: props2.expandable
|
|
5539
|
+
}),
|
|
5540
|
+
"role": props2.expandable ? "button" : void 0,
|
|
5541
|
+
"tabindex": props2.expandable ? 0 : void 0,
|
|
5542
|
+
"aria-expanded": props2.expandable ? props2.modelValue : void 0,
|
|
5543
|
+
"onClick": onHeaderClick,
|
|
5544
|
+
"onKeydown": onHeaderKeydown
|
|
5545
|
+
}, [createVNode("div", {
|
|
5546
|
+
"class": bem$1l("main")
|
|
5547
|
+
}, [createVNode(stdin_default$1B, {
|
|
5548
|
+
"size": props2.size,
|
|
5549
|
+
"class": bem$1l("title")
|
|
5550
|
+
}, {
|
|
5551
|
+
default: () => [slots.title ? slots.title() : slots.default ? slots.default() : props2.title]
|
|
5552
|
+
}), props2.required && createVNode("span", {
|
|
5553
|
+
"class": bem$1l("required")
|
|
5554
|
+
}, [createTextVNode("*")]), slots.action ? createVNode("span", {
|
|
5555
|
+
"class": bem$1l("action"),
|
|
5556
|
+
"onClick": (event) => event.stopPropagation()
|
|
5557
|
+
}, [slots.action()]) : props2.actionText ? createVNode("button", {
|
|
5558
|
+
"type": "button",
|
|
5559
|
+
"class": bem$1l("action"),
|
|
5560
|
+
"onClick": (event) => {
|
|
5561
|
+
event.stopPropagation();
|
|
5562
|
+
emit("click-action");
|
|
5563
|
+
}
|
|
5564
|
+
}, [props2.actionText]) : null]), (_a = slots.extra) == null ? void 0 : _a.call(slots), props2.expandable && createVNode(stdin_default$1z, {
|
|
5565
|
+
"modelValue": props2.modelValue,
|
|
5566
|
+
"expandText": props2.expandText,
|
|
5567
|
+
"collapseText": props2.collapseText,
|
|
5568
|
+
"onUpdate:modelValue": onChange
|
|
5569
|
+
}, null)]);
|
|
5174
5570
|
};
|
|
5175
5571
|
}
|
|
5176
5572
|
});
|
|
5177
|
-
const
|
|
5178
|
-
const
|
|
5573
|
+
const BlueMark = withInstall(stdin_default$1B);
|
|
5574
|
+
const BlueMarkHeader = withInstall(stdin_default$1y);
|
|
5575
|
+
const CollapseToggle = withInstall(stdin_default$1z);
|
|
5576
|
+
const [name$1o, bem$1k] = createNamespace("bottom-action-bar");
|
|
5179
5577
|
const bottomActionBarProps = {
|
|
5180
5578
|
confirmText: makeStringProp("确定"),
|
|
5181
5579
|
confirmType: makeStringProp("primary"),
|
|
@@ -5202,8 +5600,8 @@ const bottomActionBarProps = {
|
|
|
5202
5600
|
checkboxActionDisabled: Boolean,
|
|
5203
5601
|
checkboxActionText: makeStringProp("保存为我的默认筛选")
|
|
5204
5602
|
};
|
|
5205
|
-
var stdin_default$
|
|
5206
|
-
name: name$
|
|
5603
|
+
var stdin_default$1x = defineComponent({
|
|
5604
|
+
name: name$1o,
|
|
5207
5605
|
props: bottomActionBarProps,
|
|
5208
5606
|
emits: ["confirm", "secondary", "icon", "more", "select-more-popover", "update:checkboxActionChecked", "checkbox-action-change"],
|
|
5209
5607
|
setup(props2, {
|
|
@@ -5212,18 +5610,18 @@ var stdin_default$1y = defineComponent({
|
|
|
5212
5610
|
}) {
|
|
5213
5611
|
const root = ref();
|
|
5214
5612
|
const morePopoverShow = ref(false);
|
|
5215
|
-
const renderPlaceholder = usePlaceholder(root, bem$
|
|
5613
|
+
const renderPlaceholder = usePlaceholder(root, bem$1k);
|
|
5216
5614
|
const renderIconAction = () => {
|
|
5217
5615
|
if (slots.icon) {
|
|
5218
5616
|
return createVNode("div", {
|
|
5219
|
-
"class": bem$
|
|
5617
|
+
"class": bem$1k("icon-action")
|
|
5220
5618
|
}, [slots.icon()]);
|
|
5221
5619
|
}
|
|
5222
5620
|
if (!props2.icon) {
|
|
5223
5621
|
return;
|
|
5224
5622
|
}
|
|
5225
5623
|
return createVNode(Button, {
|
|
5226
|
-
"class": bem$
|
|
5624
|
+
"class": bem$1k("icon-button"),
|
|
5227
5625
|
"icon": props2.icon,
|
|
5228
5626
|
"iconPrefix": props2.iconPrefix,
|
|
5229
5627
|
"disabled": props2.iconDisabled,
|
|
@@ -5239,7 +5637,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5239
5637
|
};
|
|
5240
5638
|
const renderMoreButton = (popoverEnabled = false) => createVNode("button", {
|
|
5241
5639
|
"type": "button",
|
|
5242
|
-
"class": bem$
|
|
5640
|
+
"class": bem$1k("more-action"),
|
|
5243
5641
|
"disabled": props2.moreDisabled,
|
|
5244
5642
|
"onClick": popoverEnabled ? void 0 : () => emit("more")
|
|
5245
5643
|
}, [createVNode(Badge, {
|
|
@@ -5249,30 +5647,30 @@ var stdin_default$1y = defineComponent({
|
|
|
5249
5647
|
}, {
|
|
5250
5648
|
default: () => [createVNode(Icon, {
|
|
5251
5649
|
"name": props2.moreIcon || "more-o",
|
|
5252
|
-
"class": bem$
|
|
5650
|
+
"class": bem$1k("more-icon"),
|
|
5253
5651
|
"classPrefix": props2.iconPrefix
|
|
5254
5652
|
}, null)]
|
|
5255
5653
|
}), createVNode("span", {
|
|
5256
|
-
"class": bem$
|
|
5654
|
+
"class": bem$1k("more-text")
|
|
5257
5655
|
}, [props2.moreText])]);
|
|
5258
5656
|
const renderMorePopoverAction = (action, index) => createVNode("button", {
|
|
5259
5657
|
"type": "button",
|
|
5260
|
-
"class": bem$
|
|
5658
|
+
"class": bem$1k("more-popover-action", {
|
|
5261
5659
|
disabled: action.disabled
|
|
5262
5660
|
}),
|
|
5263
5661
|
"disabled": action.disabled,
|
|
5264
5662
|
"onClick": () => onSelectMorePopover(action, index)
|
|
5265
5663
|
}, [action.icon && createVNode(Icon, {
|
|
5266
5664
|
"name": action.icon,
|
|
5267
|
-
"class": bem$
|
|
5665
|
+
"class": bem$1k("more-popover-icon"),
|
|
5268
5666
|
"classPrefix": props2.iconPrefix
|
|
5269
5667
|
}, null), createVNode("span", {
|
|
5270
|
-
"class": bem$
|
|
5668
|
+
"class": bem$1k("more-popover-text")
|
|
5271
5669
|
}, [action.text])]);
|
|
5272
5670
|
const renderMoreAction = () => {
|
|
5273
5671
|
if (slots.more) {
|
|
5274
5672
|
return createVNode("div", {
|
|
5275
|
-
"class": bem$
|
|
5673
|
+
"class": bem$1k("more-action")
|
|
5276
5674
|
}, [slots.more()]);
|
|
5277
5675
|
}
|
|
5278
5676
|
if (!props2.moreText) {
|
|
@@ -5283,7 +5681,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5283
5681
|
}
|
|
5284
5682
|
return createVNode(Popover, {
|
|
5285
5683
|
"show": morePopoverShow.value,
|
|
5286
|
-
"class": bem$
|
|
5684
|
+
"class": bem$1k("more-popover"),
|
|
5287
5685
|
"placement": "top-start",
|
|
5288
5686
|
"showArrow": false,
|
|
5289
5687
|
"offset": [-5, 8],
|
|
@@ -5303,7 +5701,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5303
5701
|
return;
|
|
5304
5702
|
}
|
|
5305
5703
|
return createVNode(Button, {
|
|
5306
|
-
"class": bem$
|
|
5704
|
+
"class": bem$1k("secondary"),
|
|
5307
5705
|
"type": props2.secondaryType,
|
|
5308
5706
|
"text": props2.secondaryText,
|
|
5309
5707
|
"loading": props2.secondaryLoading,
|
|
@@ -5316,7 +5714,7 @@ var stdin_default$1y = defineComponent({
|
|
|
5316
5714
|
return slots.confirm();
|
|
5317
5715
|
}
|
|
5318
5716
|
return createVNode(Button, {
|
|
5319
|
-
"class": bem$
|
|
5717
|
+
"class": bem$1k("confirm"),
|
|
5320
5718
|
"type": props2.confirmType,
|
|
5321
5719
|
"text": props2.confirmText,
|
|
5322
5720
|
"loading": props2.confirmLoading,
|
|
@@ -5329,9 +5727,9 @@ var stdin_default$1y = defineComponent({
|
|
|
5329
5727
|
return;
|
|
5330
5728
|
}
|
|
5331
5729
|
return createVNode("div", {
|
|
5332
|
-
"class": bem$
|
|
5730
|
+
"class": bem$1k("checkbox-action")
|
|
5333
5731
|
}, [createVNode("div", {
|
|
5334
|
-
"class": bem$
|
|
5732
|
+
"class": bem$1k("checkbox-action-content")
|
|
5335
5733
|
}, [createVNode(Checkbox, {
|
|
5336
5734
|
"modelValue": props2.checkboxActionChecked,
|
|
5337
5735
|
"disabled": props2.checkboxActionDisabled,
|
|
@@ -5346,19 +5744,19 @@ var stdin_default$1y = defineComponent({
|
|
|
5346
5744
|
};
|
|
5347
5745
|
const renderBar = () => createVNode("div", {
|
|
5348
5746
|
"ref": root,
|
|
5349
|
-
"class": [bem$
|
|
5747
|
+
"class": [bem$1k({
|
|
5350
5748
|
fixed: props2.fixed
|
|
5351
5749
|
}), {
|
|
5352
5750
|
"van-safe-area-bottom": props2.safeAreaInsetBottom
|
|
5353
5751
|
}]
|
|
5354
5752
|
}, [renderCheckboxAction(), createVNode("div", {
|
|
5355
|
-
"class": bem$
|
|
5753
|
+
"class": bem$1k("actions")
|
|
5356
5754
|
}, [renderIconAction(), renderMoreAction(), renderSecondaryButton(), renderConfirmButton()])]);
|
|
5357
5755
|
return () => props2.placeholder && props2.fixed ? renderPlaceholder(renderBar) : renderBar();
|
|
5358
5756
|
}
|
|
5359
5757
|
});
|
|
5360
|
-
const BottomActionBar = withInstall(stdin_default$
|
|
5361
|
-
const [name$
|
|
5758
|
+
const BottomActionBar = withInstall(stdin_default$1x);
|
|
5759
|
+
const [name$1n, bem$1j, t$f] = createNamespace("calendar");
|
|
5362
5760
|
const formatMonthTitle = (date) => t$f("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
|
5363
5761
|
function compareMonth(date1, date2) {
|
|
5364
5762
|
const year1 = date1.getFullYear();
|
|
@@ -5467,9 +5865,9 @@ const proxyPickerMethods = (picker, callback) => {
|
|
|
5467
5865
|
}
|
|
5468
5866
|
});
|
|
5469
5867
|
};
|
|
5470
|
-
const [name$
|
|
5471
|
-
var stdin_default$
|
|
5472
|
-
name: name$
|
|
5868
|
+
const [name$1m] = createNamespace("calendar-day");
|
|
5869
|
+
var stdin_default$1w = defineComponent({
|
|
5870
|
+
name: name$1m,
|
|
5473
5871
|
props: {
|
|
5474
5872
|
item: makeRequiredProp(Object),
|
|
5475
5873
|
color: String,
|
|
@@ -5531,7 +5929,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5531
5929
|
} = props2.item;
|
|
5532
5930
|
if (topInfo || slots["top-info"]) {
|
|
5533
5931
|
return createVNode("div", {
|
|
5534
|
-
"class": bem$
|
|
5932
|
+
"class": bem$1j("top-info")
|
|
5535
5933
|
}, [slots["top-info"] ? slots["top-info"](props2.item) : topInfo]);
|
|
5536
5934
|
}
|
|
5537
5935
|
};
|
|
@@ -5541,7 +5939,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5541
5939
|
} = props2.item;
|
|
5542
5940
|
if (bottomInfo || slots["bottom-info"]) {
|
|
5543
5941
|
return createVNode("div", {
|
|
5544
|
-
"class": bem$
|
|
5942
|
+
"class": bem$1j("bottom-info")
|
|
5545
5943
|
}, [slots["bottom-info"] ? slots["bottom-info"](props2.item) : bottomInfo]);
|
|
5546
5944
|
}
|
|
5547
5945
|
};
|
|
@@ -5558,7 +5956,7 @@ var stdin_default$1x = defineComponent({
|
|
|
5558
5956
|
const Nodes = [renderTopInfo(), text, renderBottomInfo()];
|
|
5559
5957
|
if (type === "selected") {
|
|
5560
5958
|
return createVNode("div", {
|
|
5561
|
-
"class": bem$
|
|
5959
|
+
"class": bem$1j("selected-day"),
|
|
5562
5960
|
"style": {
|
|
5563
5961
|
width: rowHeight,
|
|
5564
5962
|
height: rowHeight,
|
|
@@ -5575,21 +5973,21 @@ var stdin_default$1x = defineComponent({
|
|
|
5575
5973
|
} = props2.item;
|
|
5576
5974
|
if (type === "placeholder") {
|
|
5577
5975
|
return createVNode("div", {
|
|
5578
|
-
"class": bem$
|
|
5976
|
+
"class": bem$1j("day"),
|
|
5579
5977
|
"style": style.value
|
|
5580
5978
|
}, null);
|
|
5581
5979
|
}
|
|
5582
5980
|
return createVNode("div", {
|
|
5583
5981
|
"role": "gridcell",
|
|
5584
5982
|
"style": style.value,
|
|
5585
|
-
"class": [bem$
|
|
5983
|
+
"class": [bem$1j("day", type), className],
|
|
5586
5984
|
"tabindex": type === "disabled" ? void 0 : -1,
|
|
5587
5985
|
"onClick": onClick
|
|
5588
5986
|
}, [renderContent()]);
|
|
5589
5987
|
};
|
|
5590
5988
|
}
|
|
5591
5989
|
});
|
|
5592
|
-
const [name$
|
|
5990
|
+
const [name$1l] = createNamespace("calendar-month");
|
|
5593
5991
|
const calendarMonthProps = {
|
|
5594
5992
|
date: makeRequiredProp(Date),
|
|
5595
5993
|
type: String,
|
|
@@ -5606,8 +6004,8 @@ const calendarMonthProps = {
|
|
|
5606
6004
|
showMonthTitle: Boolean,
|
|
5607
6005
|
firstDayOfWeek: Number
|
|
5608
6006
|
};
|
|
5609
|
-
var stdin_default$
|
|
5610
|
-
name: name$
|
|
6007
|
+
var stdin_default$1v = defineComponent({
|
|
6008
|
+
name: name$1l,
|
|
5611
6009
|
props: calendarMonthProps,
|
|
5612
6010
|
emits: ["click", "update-height"],
|
|
5613
6011
|
setup(props2, {
|
|
@@ -5712,14 +6110,14 @@ var stdin_default$1w = defineComponent({
|
|
|
5712
6110
|
const renderTitle = () => {
|
|
5713
6111
|
if (props2.showMonthTitle) {
|
|
5714
6112
|
return createVNode("div", {
|
|
5715
|
-
"class": bem$
|
|
6113
|
+
"class": bem$1j("month-title")
|
|
5716
6114
|
}, [title.value]);
|
|
5717
6115
|
}
|
|
5718
6116
|
};
|
|
5719
6117
|
const renderMark = () => {
|
|
5720
6118
|
if (props2.showMark && shouldRender.value) {
|
|
5721
6119
|
return createVNode("div", {
|
|
5722
|
-
"class": bem$
|
|
6120
|
+
"class": bem$1j("month-mark")
|
|
5723
6121
|
}, [props2.date.getMonth() + 1]);
|
|
5724
6122
|
}
|
|
5725
6123
|
};
|
|
@@ -5759,7 +6157,7 @@ var stdin_default$1w = defineComponent({
|
|
|
5759
6157
|
setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
|
|
5760
6158
|
}
|
|
5761
6159
|
};
|
|
5762
|
-
const renderDay = (item, index) => createVNode(stdin_default$
|
|
6160
|
+
const renderDay = (item, index) => createVNode(stdin_default$1w, {
|
|
5763
6161
|
"item": item,
|
|
5764
6162
|
"index": index,
|
|
5765
6163
|
"color": props2.color,
|
|
@@ -5770,7 +6168,7 @@ var stdin_default$1w = defineComponent({
|
|
|
5770
6168
|
const renderDays = () => createVNode("div", {
|
|
5771
6169
|
"ref": daysRef,
|
|
5772
6170
|
"role": "grid",
|
|
5773
|
-
"class": bem$
|
|
6171
|
+
"class": bem$1j("days")
|
|
5774
6172
|
}, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
|
5775
6173
|
useExpose({
|
|
5776
6174
|
getTitle,
|
|
@@ -5780,14 +6178,14 @@ var stdin_default$1w = defineComponent({
|
|
|
5780
6178
|
disabledDays
|
|
5781
6179
|
});
|
|
5782
6180
|
return () => createVNode("div", {
|
|
5783
|
-
"class": bem$
|
|
6181
|
+
"class": bem$1j("month"),
|
|
5784
6182
|
"ref": monthRef
|
|
5785
6183
|
}, [renderTitle(), renderDays()]);
|
|
5786
6184
|
}
|
|
5787
6185
|
});
|
|
5788
|
-
const [name$
|
|
5789
|
-
var stdin_default$
|
|
5790
|
-
name: name$
|
|
6186
|
+
const [name$1k] = createNamespace("calendar-header");
|
|
6187
|
+
var stdin_default$1u = defineComponent({
|
|
6188
|
+
name: name$1k,
|
|
5791
6189
|
props: {
|
|
5792
6190
|
title: String,
|
|
5793
6191
|
subtitle: String,
|
|
@@ -5805,7 +6203,7 @@ var stdin_default$1v = defineComponent({
|
|
|
5805
6203
|
const text = props2.title || t$f("title");
|
|
5806
6204
|
const title = slots.title ? slots.title() : text;
|
|
5807
6205
|
return createVNode("div", {
|
|
5808
|
-
"class": bem$
|
|
6206
|
+
"class": bem$1j("header-title")
|
|
5809
6207
|
}, [title]);
|
|
5810
6208
|
}
|
|
5811
6209
|
};
|
|
@@ -5814,7 +6212,7 @@ var stdin_default$1v = defineComponent({
|
|
|
5814
6212
|
if (props2.showSubtitle) {
|
|
5815
6213
|
const title = slots.subtitle ? slots.subtitle() : props2.subtitle;
|
|
5816
6214
|
return createVNode("div", {
|
|
5817
|
-
"class": bem$
|
|
6215
|
+
"class": bem$1j("header-subtitle"),
|
|
5818
6216
|
"onClick": onClickSubtitle
|
|
5819
6217
|
}, [title]);
|
|
5820
6218
|
}
|
|
@@ -5826,13 +6224,13 @@ var stdin_default$1v = defineComponent({
|
|
|
5826
6224
|
const weekdays = t$f("weekdays");
|
|
5827
6225
|
const renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
|
|
5828
6226
|
return createVNode("div", {
|
|
5829
|
-
"class": bem$
|
|
6227
|
+
"class": bem$1j("weekdays")
|
|
5830
6228
|
}, [renderWeekDays2.map((text) => createVNode("span", {
|
|
5831
|
-
"class": bem$
|
|
6229
|
+
"class": bem$1j("weekday")
|
|
5832
6230
|
}, [text]))]);
|
|
5833
6231
|
};
|
|
5834
6232
|
return () => createVNode("div", {
|
|
5835
|
-
"class": bem$
|
|
6233
|
+
"class": bem$1j("header")
|
|
5836
6234
|
}, [renderTitle(), renderSubtitle(), renderWeekDays()]);
|
|
5837
6235
|
}
|
|
5838
6236
|
});
|
|
@@ -5883,8 +6281,8 @@ const calendarProps = {
|
|
|
5883
6281
|
validator: (val) => val >= 0 && val <= 6
|
|
5884
6282
|
}
|
|
5885
6283
|
};
|
|
5886
|
-
var stdin_default$
|
|
5887
|
-
name: name$
|
|
6284
|
+
var stdin_default$1t = defineComponent({
|
|
6285
|
+
name: name$1n,
|
|
5888
6286
|
props: calendarProps,
|
|
5889
6287
|
emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
|
|
5890
6288
|
setup(props2, {
|
|
@@ -6141,7 +6539,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6141
6539
|
const updateShow = (value) => emit("update:show", value);
|
|
6142
6540
|
const renderMonth = (date, index) => {
|
|
6143
6541
|
const showMonthTitle = index !== 0 || !props2.showSubtitle;
|
|
6144
|
-
return createVNode(stdin_default$
|
|
6542
|
+
return createVNode(stdin_default$1v, mergeProps({
|
|
6145
6543
|
"ref": setMonthRefs(index),
|
|
6146
6544
|
"date": date,
|
|
6147
6545
|
"currentDate": currentDate.value,
|
|
@@ -6164,7 +6562,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6164
6562
|
"block": true,
|
|
6165
6563
|
"type": "primary",
|
|
6166
6564
|
"color": props2.color,
|
|
6167
|
-
"class": bem$
|
|
6565
|
+
"class": bem$1j("confirm"),
|
|
6168
6566
|
"disabled": disabled,
|
|
6169
6567
|
"nativeType": "button",
|
|
6170
6568
|
"onClick": onConfirm
|
|
@@ -6176,13 +6574,13 @@ var stdin_default$1u = defineComponent({
|
|
|
6176
6574
|
}
|
|
6177
6575
|
};
|
|
6178
6576
|
const renderFooter = () => createVNode("div", {
|
|
6179
|
-
"class": [bem$
|
|
6577
|
+
"class": [bem$1j("footer"), {
|
|
6180
6578
|
"van-safe-area-bottom": props2.safeAreaInsetBottom
|
|
6181
6579
|
}]
|
|
6182
6580
|
}, [renderFooterButton()]);
|
|
6183
6581
|
const renderCalendar = () => createVNode("div", {
|
|
6184
|
-
"class": bem$
|
|
6185
|
-
}, [createVNode(stdin_default$
|
|
6582
|
+
"class": bem$1j()
|
|
6583
|
+
}, [createVNode(stdin_default$1u, {
|
|
6186
6584
|
"title": props2.title,
|
|
6187
6585
|
"subtitle": subtitle.value,
|
|
6188
6586
|
"showTitle": props2.showTitle,
|
|
@@ -6191,7 +6589,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6191
6589
|
"onClick-subtitle": (event) => emit("click-subtitle", event)
|
|
6192
6590
|
}, pick(slots, ["title", "subtitle"])), createVNode("div", {
|
|
6193
6591
|
"ref": bodyRef,
|
|
6194
|
-
"class": bem$
|
|
6592
|
+
"class": bem$1j("body"),
|
|
6195
6593
|
"onScroll": onScroll
|
|
6196
6594
|
}, [months.value.map(renderMonth)]), renderFooter()]);
|
|
6197
6595
|
watch(() => props2.show, init);
|
|
@@ -6210,7 +6608,7 @@ var stdin_default$1u = defineComponent({
|
|
|
6210
6608
|
if (props2.poppable) {
|
|
6211
6609
|
return createVNode(Popup, {
|
|
6212
6610
|
"show": props2.show,
|
|
6213
|
-
"class": bem$
|
|
6611
|
+
"class": bem$1j("popup"),
|
|
6214
6612
|
"round": props2.round,
|
|
6215
6613
|
"position": props2.position,
|
|
6216
6614
|
"closeable": props2.showTitle || props2.showSubtitle,
|
|
@@ -6227,8 +6625,8 @@ var stdin_default$1u = defineComponent({
|
|
|
6227
6625
|
};
|
|
6228
6626
|
}
|
|
6229
6627
|
});
|
|
6230
|
-
const Calendar = withInstall(stdin_default$
|
|
6231
|
-
const [name$
|
|
6628
|
+
const Calendar = withInstall(stdin_default$1t);
|
|
6629
|
+
const [name$1j, bem$1i] = createNamespace("image");
|
|
6232
6630
|
const imageProps = {
|
|
6233
6631
|
src: String,
|
|
6234
6632
|
alt: String,
|
|
@@ -6247,8 +6645,8 @@ const imageProps = {
|
|
|
6247
6645
|
showLoading: truthProp,
|
|
6248
6646
|
loadingIcon: makeStringProp("photo")
|
|
6249
6647
|
};
|
|
6250
|
-
var stdin_default$
|
|
6251
|
-
name: name$
|
|
6648
|
+
var stdin_default$1s = defineComponent({
|
|
6649
|
+
name: name$1j,
|
|
6252
6650
|
props: imageProps,
|
|
6253
6651
|
emits: ["load", "error"],
|
|
6254
6652
|
setup(props2, {
|
|
@@ -6299,13 +6697,13 @@ var stdin_default$1t = defineComponent({
|
|
|
6299
6697
|
const renderPlaceholder = () => {
|
|
6300
6698
|
if (loading.value && props2.showLoading) {
|
|
6301
6699
|
return createVNode("div", {
|
|
6302
|
-
"class": bem$
|
|
6303
|
-
}, [renderIcon(props2.loadingIcon, bem$
|
|
6700
|
+
"class": bem$1i("loading")
|
|
6701
|
+
}, [renderIcon(props2.loadingIcon, bem$1i("loading-icon"), slots.loading)]);
|
|
6304
6702
|
}
|
|
6305
6703
|
if (error.value && props2.showError) {
|
|
6306
6704
|
return createVNode("div", {
|
|
6307
|
-
"class": bem$
|
|
6308
|
-
}, [renderIcon(props2.errorIcon, bem$
|
|
6705
|
+
"class": bem$1i("error")
|
|
6706
|
+
}, [renderIcon(props2.errorIcon, bem$1i("error-icon"), slots.error)]);
|
|
6309
6707
|
}
|
|
6310
6708
|
};
|
|
6311
6709
|
const renderImage = () => {
|
|
@@ -6314,7 +6712,7 @@ var stdin_default$1t = defineComponent({
|
|
|
6314
6712
|
}
|
|
6315
6713
|
const attrs = {
|
|
6316
6714
|
alt: props2.alt,
|
|
6317
|
-
class: bem$
|
|
6715
|
+
class: bem$1i("img"),
|
|
6318
6716
|
style: {
|
|
6319
6717
|
objectFit: props2.fit,
|
|
6320
6718
|
objectPosition: props2.position
|
|
@@ -6363,7 +6761,7 @@ var stdin_default$1t = defineComponent({
|
|
|
6363
6761
|
return () => {
|
|
6364
6762
|
var _a;
|
|
6365
6763
|
return createVNode("div", {
|
|
6366
|
-
"class": bem$
|
|
6764
|
+
"class": bem$1i({
|
|
6367
6765
|
round: props2.round,
|
|
6368
6766
|
block: props2.block
|
|
6369
6767
|
}),
|
|
@@ -6372,8 +6770,8 @@ var stdin_default$1t = defineComponent({
|
|
|
6372
6770
|
};
|
|
6373
6771
|
}
|
|
6374
6772
|
});
|
|
6375
|
-
const Image$1 = withInstall(stdin_default$
|
|
6376
|
-
const [name$
|
|
6773
|
+
const Image$1 = withInstall(stdin_default$1s);
|
|
6774
|
+
const [name$1i, bem$1h] = createNamespace("card");
|
|
6377
6775
|
const cardProps = {
|
|
6378
6776
|
tag: String,
|
|
6379
6777
|
num: numericProp,
|
|
@@ -6387,8 +6785,8 @@ const cardProps = {
|
|
|
6387
6785
|
thumbLink: String,
|
|
6388
6786
|
originPrice: numericProp
|
|
6389
6787
|
};
|
|
6390
|
-
var stdin_default$
|
|
6391
|
-
name: name$
|
|
6788
|
+
var stdin_default$1r = defineComponent({
|
|
6789
|
+
name: name$1i,
|
|
6392
6790
|
props: cardProps,
|
|
6393
6791
|
emits: ["click-thumb"],
|
|
6394
6792
|
setup(props2, {
|
|
@@ -6401,14 +6799,14 @@ var stdin_default$1s = defineComponent({
|
|
|
6401
6799
|
}
|
|
6402
6800
|
if (props2.title) {
|
|
6403
6801
|
return createVNode("div", {
|
|
6404
|
-
"class": [bem$
|
|
6802
|
+
"class": [bem$1h("title"), "van-multi-ellipsis--l2"]
|
|
6405
6803
|
}, [props2.title]);
|
|
6406
6804
|
}
|
|
6407
6805
|
};
|
|
6408
6806
|
const renderThumbTag = () => {
|
|
6409
6807
|
if (slots.tag || props2.tag) {
|
|
6410
6808
|
return createVNode("div", {
|
|
6411
|
-
"class": bem$
|
|
6809
|
+
"class": bem$1h("tag")
|
|
6412
6810
|
}, [slots.tag ? slots.tag() : createVNode(Tag, {
|
|
6413
6811
|
"mark": true,
|
|
6414
6812
|
"type": "danger"
|
|
@@ -6433,7 +6831,7 @@ var stdin_default$1s = defineComponent({
|
|
|
6433
6831
|
if (slots.thumb || props2.thumb) {
|
|
6434
6832
|
return createVNode("a", {
|
|
6435
6833
|
"href": props2.thumbLink,
|
|
6436
|
-
"class": bem$
|
|
6834
|
+
"class": bem$1h("thumb"),
|
|
6437
6835
|
"onClick": (event) => emit("click-thumb", event)
|
|
6438
6836
|
}, [renderThumbImage(), renderThumbTag()]);
|
|
6439
6837
|
}
|
|
@@ -6444,18 +6842,18 @@ var stdin_default$1s = defineComponent({
|
|
|
6444
6842
|
}
|
|
6445
6843
|
if (props2.desc) {
|
|
6446
6844
|
return createVNode("div", {
|
|
6447
|
-
"class": [bem$
|
|
6845
|
+
"class": [bem$1h("desc"), "van-ellipsis"]
|
|
6448
6846
|
}, [props2.desc]);
|
|
6449
6847
|
}
|
|
6450
6848
|
};
|
|
6451
6849
|
const renderPriceText = () => {
|
|
6452
6850
|
const priceArr = props2.price.toString().split(".");
|
|
6453
6851
|
return createVNode("div", null, [createVNode("span", {
|
|
6454
|
-
"class": bem$
|
|
6852
|
+
"class": bem$1h("price-currency")
|
|
6455
6853
|
}, [props2.currency]), createVNode("span", {
|
|
6456
|
-
"class": bem$
|
|
6854
|
+
"class": bem$1h("price-integer")
|
|
6457
6855
|
}, [priceArr[0]]), createTextVNode("."), createVNode("span", {
|
|
6458
|
-
"class": bem$
|
|
6856
|
+
"class": bem$1h("price-decimal")
|
|
6459
6857
|
}, [priceArr[1]])]);
|
|
6460
6858
|
};
|
|
6461
6859
|
return () => {
|
|
@@ -6465,33 +6863,33 @@ var stdin_default$1s = defineComponent({
|
|
|
6465
6863
|
const showOriginPrice = slots["origin-price"] || isDef(props2.originPrice);
|
|
6466
6864
|
const showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
|
|
6467
6865
|
const Price = showPrice && createVNode("div", {
|
|
6468
|
-
"class": bem$
|
|
6866
|
+
"class": bem$1h("price")
|
|
6469
6867
|
}, [slots.price ? slots.price() : renderPriceText()]);
|
|
6470
6868
|
const OriginPrice = showOriginPrice && createVNode("div", {
|
|
6471
|
-
"class": bem$
|
|
6869
|
+
"class": bem$1h("origin-price")
|
|
6472
6870
|
}, [slots["origin-price"] ? slots["origin-price"]() : `${props2.currency} ${props2.originPrice}`]);
|
|
6473
6871
|
const Num = showNum && createVNode("div", {
|
|
6474
|
-
"class": bem$
|
|
6872
|
+
"class": bem$1h("num")
|
|
6475
6873
|
}, [slots.num ? slots.num() : `x${props2.num}`]);
|
|
6476
6874
|
const Footer = slots.footer && createVNode("div", {
|
|
6477
|
-
"class": bem$
|
|
6875
|
+
"class": bem$1h("footer")
|
|
6478
6876
|
}, [slots.footer()]);
|
|
6479
6877
|
const Bottom = showBottom && createVNode("div", {
|
|
6480
|
-
"class": bem$
|
|
6878
|
+
"class": bem$1h("bottom")
|
|
6481
6879
|
}, [(_a = slots["price-top"]) == null ? void 0 : _a.call(slots), Price, OriginPrice, Num, (_b = slots.bottom) == null ? void 0 : _b.call(slots)]);
|
|
6482
6880
|
return createVNode("div", {
|
|
6483
|
-
"class": bem$
|
|
6881
|
+
"class": bem$1h()
|
|
6484
6882
|
}, [createVNode("div", {
|
|
6485
|
-
"class": bem$
|
|
6883
|
+
"class": bem$1h("header")
|
|
6486
6884
|
}, [renderThumb(), createVNode("div", {
|
|
6487
|
-
"class": bem$
|
|
6885
|
+
"class": bem$1h("content", {
|
|
6488
6886
|
centered: props2.centered
|
|
6489
6887
|
})
|
|
6490
6888
|
}, [createVNode("div", null, [renderTitle(), renderDesc(), (_c = slots.tags) == null ? void 0 : _c.call(slots)]), Bottom])]), Footer]);
|
|
6491
6889
|
};
|
|
6492
6890
|
}
|
|
6493
6891
|
});
|
|
6494
|
-
const Card = withInstall(stdin_default$
|
|
6892
|
+
const Card = withInstall(stdin_default$1r);
|
|
6495
6893
|
function scrollLeftTo(scroller, to, duration) {
|
|
6496
6894
|
let count = 0;
|
|
6497
6895
|
const from = scroller.scrollLeft;
|
|
@@ -6547,7 +6945,7 @@ function useVisibilityChange(target, onChange) {
|
|
|
6547
6945
|
onBeforeUnmount(unobserve);
|
|
6548
6946
|
onMountedOrActivated(observe);
|
|
6549
6947
|
}
|
|
6550
|
-
const [name$
|
|
6948
|
+
const [name$1h, bem$1g] = createNamespace("sticky");
|
|
6551
6949
|
const stickyProps = {
|
|
6552
6950
|
zIndex: numericProp,
|
|
6553
6951
|
position: makeStringProp("top"),
|
|
@@ -6555,8 +6953,8 @@ const stickyProps = {
|
|
|
6555
6953
|
offsetTop: makeNumericProp(0),
|
|
6556
6954
|
offsetBottom: makeNumericProp(0)
|
|
6557
6955
|
};
|
|
6558
|
-
var stdin_default$
|
|
6559
|
-
name: name$
|
|
6956
|
+
var stdin_default$1q = defineComponent({
|
|
6957
|
+
name: name$1h,
|
|
6560
6958
|
props: stickyProps,
|
|
6561
6959
|
emits: ["scroll", "change"],
|
|
6562
6960
|
setup(props2, {
|
|
@@ -6653,7 +7051,7 @@ var stdin_default$1r = defineComponent({
|
|
|
6653
7051
|
"ref": root,
|
|
6654
7052
|
"style": rootStyle.value
|
|
6655
7053
|
}, [createVNode("div", {
|
|
6656
|
-
"class": bem$
|
|
7054
|
+
"class": bem$1g({
|
|
6657
7055
|
fixed: state.fixed
|
|
6658
7056
|
}),
|
|
6659
7057
|
"style": stickyStyle.value
|
|
@@ -6661,10 +7059,10 @@ var stdin_default$1r = defineComponent({
|
|
|
6661
7059
|
};
|
|
6662
7060
|
}
|
|
6663
7061
|
});
|
|
6664
|
-
const Sticky = withInstall(stdin_default$
|
|
6665
|
-
const [name$
|
|
6666
|
-
var stdin_default$
|
|
6667
|
-
name: name$
|
|
7062
|
+
const Sticky = withInstall(stdin_default$1q);
|
|
7063
|
+
const [name$1g, bem$1f] = createNamespace("tab");
|
|
7064
|
+
var stdin_default$1p = defineComponent({
|
|
7065
|
+
name: name$1g,
|
|
6668
7066
|
props: {
|
|
6669
7067
|
id: String,
|
|
6670
7068
|
dot: Boolean,
|
|
@@ -6714,19 +7112,19 @@ var stdin_default$1q = defineComponent({
|
|
|
6714
7112
|
});
|
|
6715
7113
|
const renderText = () => {
|
|
6716
7114
|
const Text2 = createVNode("span", {
|
|
6717
|
-
"class": bem$
|
|
7115
|
+
"class": bem$1f("text", {
|
|
6718
7116
|
ellipsis: !props2.scrollable
|
|
6719
7117
|
})
|
|
6720
7118
|
}, [slots.title ? slots.title() : props2.title]);
|
|
6721
7119
|
const Content = createVNode("span", {
|
|
6722
|
-
"class": bem$
|
|
7120
|
+
"class": bem$1f("title")
|
|
6723
7121
|
}, [props2.icon && createVNode(Icon, {
|
|
6724
7122
|
"name": props2.icon,
|
|
6725
|
-
"class": bem$
|
|
7123
|
+
"class": bem$1f("icon")
|
|
6726
7124
|
}, null), Text2]);
|
|
6727
7125
|
if (props2.dot || isDef(props2.badge) && props2.badge !== "") {
|
|
6728
7126
|
return createVNode(Badge, {
|
|
6729
|
-
"class": bem$
|
|
7127
|
+
"class": bem$1f("badge"),
|
|
6730
7128
|
"dot": props2.dot,
|
|
6731
7129
|
"content": props2.badge,
|
|
6732
7130
|
"showZero": props2.showZeroBadge
|
|
@@ -6739,7 +7137,7 @@ var stdin_default$1q = defineComponent({
|
|
|
6739
7137
|
return () => createVNode("div", {
|
|
6740
7138
|
"id": props2.id,
|
|
6741
7139
|
"role": "tab",
|
|
6742
|
-
"class": [bem$
|
|
7140
|
+
"class": [bem$1f([props2.type, {
|
|
6743
7141
|
grow: props2.scrollable && !props2.shrink,
|
|
6744
7142
|
shrink: props2.shrink,
|
|
6745
7143
|
active: props2.isActive,
|
|
@@ -6753,7 +7151,7 @@ var stdin_default$1q = defineComponent({
|
|
|
6753
7151
|
}, [renderText()]);
|
|
6754
7152
|
}
|
|
6755
7153
|
});
|
|
6756
|
-
const [name$
|
|
7154
|
+
const [name$1f, bem$1e] = createNamespace("swipe");
|
|
6757
7155
|
const swipeProps = {
|
|
6758
7156
|
loop: truthProp,
|
|
6759
7157
|
width: numericProp,
|
|
@@ -6768,9 +7166,9 @@ const swipeProps = {
|
|
|
6768
7166
|
showIndicators: truthProp,
|
|
6769
7167
|
stopPropagation: truthProp
|
|
6770
7168
|
};
|
|
6771
|
-
const SWIPE_KEY = Symbol(name$
|
|
6772
|
-
var stdin_default$
|
|
6773
|
-
name: name$
|
|
7169
|
+
const SWIPE_KEY = Symbol(name$1f);
|
|
7170
|
+
var stdin_default$1o = defineComponent({
|
|
7171
|
+
name: name$1f,
|
|
6774
7172
|
props: swipeProps,
|
|
6775
7173
|
emits: ["change"],
|
|
6776
7174
|
setup(props2, {
|
|
@@ -7032,7 +7430,7 @@ var stdin_default$1p = defineComponent({
|
|
|
7032
7430
|
} : void 0;
|
|
7033
7431
|
return createVNode("i", {
|
|
7034
7432
|
"style": style,
|
|
7035
|
-
"class": bem$
|
|
7433
|
+
"class": bem$1e("indicator", {
|
|
7036
7434
|
active
|
|
7037
7435
|
})
|
|
7038
7436
|
}, null);
|
|
@@ -7046,7 +7444,7 @@ var stdin_default$1p = defineComponent({
|
|
|
7046
7444
|
}
|
|
7047
7445
|
if (props2.showIndicators && count.value > 1) {
|
|
7048
7446
|
return createVNode("div", {
|
|
7049
|
-
"class": bem$
|
|
7447
|
+
"class": bem$1e("indicators", {
|
|
7050
7448
|
vertical: props2.vertical
|
|
7051
7449
|
})
|
|
7052
7450
|
}, [Array(count.value).fill("").map(renderDot)]);
|
|
@@ -7088,11 +7486,11 @@ var stdin_default$1p = defineComponent({
|
|
|
7088
7486
|
var _a;
|
|
7089
7487
|
return createVNode("div", {
|
|
7090
7488
|
"ref": root,
|
|
7091
|
-
"class": bem$
|
|
7489
|
+
"class": bem$1e()
|
|
7092
7490
|
}, [createVNode("div", {
|
|
7093
7491
|
"ref": track,
|
|
7094
7492
|
"style": trackStyle.value,
|
|
7095
|
-
"class": bem$
|
|
7493
|
+
"class": bem$1e("track", {
|
|
7096
7494
|
vertical: props2.vertical
|
|
7097
7495
|
}),
|
|
7098
7496
|
"onTouchstartPassive": onTouchStart,
|
|
@@ -7102,10 +7500,10 @@ var stdin_default$1p = defineComponent({
|
|
|
7102
7500
|
};
|
|
7103
7501
|
}
|
|
7104
7502
|
});
|
|
7105
|
-
const Swipe = withInstall(stdin_default$
|
|
7106
|
-
const [name$
|
|
7107
|
-
var stdin_default$
|
|
7108
|
-
name: name$
|
|
7503
|
+
const Swipe = withInstall(stdin_default$1o);
|
|
7504
|
+
const [name$1e, bem$1d] = createNamespace("tabs");
|
|
7505
|
+
var stdin_default$1n = defineComponent({
|
|
7506
|
+
name: name$1e,
|
|
7109
7507
|
props: {
|
|
7110
7508
|
count: makeRequiredProp(Number),
|
|
7111
7509
|
inited: Boolean,
|
|
@@ -7129,7 +7527,7 @@ var stdin_default$1o = defineComponent({
|
|
|
7129
7527
|
return createVNode(Swipe, {
|
|
7130
7528
|
"ref": swipeRef,
|
|
7131
7529
|
"loop": false,
|
|
7132
|
-
"class": bem$
|
|
7530
|
+
"class": bem$1d("track"),
|
|
7133
7531
|
"duration": +props2.duration * 1e3,
|
|
7134
7532
|
"touchable": props2.swipeable,
|
|
7135
7533
|
"lazyRender": props2.lazyRender,
|
|
@@ -7157,7 +7555,7 @@ var stdin_default$1o = defineComponent({
|
|
|
7157
7555
|
swipeRef
|
|
7158
7556
|
});
|
|
7159
7557
|
return () => createVNode("div", {
|
|
7160
|
-
"class": bem$
|
|
7558
|
+
"class": bem$1d("content", {
|
|
7161
7559
|
animated: props2.animated || props2.swipeable
|
|
7162
7560
|
})
|
|
7163
7561
|
}, [renderChildren()]);
|
|
@@ -7182,7 +7580,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
7182
7580
|
return a;
|
|
7183
7581
|
};
|
|
7184
7582
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7185
|
-
const [name$
|
|
7583
|
+
const [name$1d, bem$1c] = createNamespace("tabs");
|
|
7186
7584
|
const tabsProps = {
|
|
7187
7585
|
type: makeStringProp("line"),
|
|
7188
7586
|
color: String,
|
|
@@ -7209,9 +7607,9 @@ const tabsProps = {
|
|
|
7209
7607
|
moreTitle: String,
|
|
7210
7608
|
moreOptions: makeArrayProp()
|
|
7211
7609
|
};
|
|
7212
|
-
const TABS_KEY = Symbol(name$
|
|
7213
|
-
var stdin_default$
|
|
7214
|
-
name: name$
|
|
7610
|
+
const TABS_KEY = Symbol(name$1d);
|
|
7611
|
+
var stdin_default$1m = defineComponent({
|
|
7612
|
+
name: name$1d,
|
|
7215
7613
|
props: tabsProps,
|
|
7216
7614
|
emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active", "click-more", "select-more", "update:showMore"],
|
|
7217
7615
|
setup(props2, {
|
|
@@ -7435,12 +7833,12 @@ var stdin_default$1n = defineComponent({
|
|
|
7435
7833
|
}));
|
|
7436
7834
|
return actions.map((action, index) => __spreadProps(__spreadValues$1({}, action), {
|
|
7437
7835
|
color: index === state.currentIndex ? "var(--van-primary-color)" : action.color,
|
|
7438
|
-
className: [action.className, bem$
|
|
7836
|
+
className: [action.className, bem$1c("more-option", {
|
|
7439
7837
|
active: index === state.currentIndex
|
|
7440
7838
|
})]
|
|
7441
7839
|
}));
|
|
7442
7840
|
});
|
|
7443
|
-
const renderNav = () => children.map((item, index) => createVNode(stdin_default$
|
|
7841
|
+
const renderNav = () => children.map((item, index) => createVNode(stdin_default$1p, mergeProps({
|
|
7444
7842
|
"key": item.id,
|
|
7445
7843
|
"id": `${id}-${index}`,
|
|
7446
7844
|
"ref": setTitleRefs(index),
|
|
@@ -7461,7 +7859,7 @@ var stdin_default$1n = defineComponent({
|
|
|
7461
7859
|
const renderLine = () => {
|
|
7462
7860
|
if (props2.type === "line" && children.length) {
|
|
7463
7861
|
return createVNode("div", {
|
|
7464
|
-
"class": bem$
|
|
7862
|
+
"class": bem$1c("line"),
|
|
7465
7863
|
"style": state.lineStyle
|
|
7466
7864
|
}, null);
|
|
7467
7865
|
}
|
|
@@ -7475,13 +7873,13 @@ var stdin_default$1n = defineComponent({
|
|
|
7475
7873
|
} = props2;
|
|
7476
7874
|
const Header = [createVNode("div", {
|
|
7477
7875
|
"ref": sticky ? void 0 : wrapRef,
|
|
7478
|
-
"class": [bem$
|
|
7876
|
+
"class": [bem$1c("wrap"), {
|
|
7479
7877
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
|
7480
7878
|
}]
|
|
7481
7879
|
}, [createVNode("div", {
|
|
7482
7880
|
"ref": navRef,
|
|
7483
7881
|
"role": "tablist",
|
|
7484
|
-
"class": bem$
|
|
7882
|
+
"class": bem$1c("nav", [type, {
|
|
7485
7883
|
shrink: props2.shrink,
|
|
7486
7884
|
complete: scrollable.value,
|
|
7487
7885
|
more: props2.more
|
|
@@ -7491,7 +7889,7 @@ var stdin_default$1n = defineComponent({
|
|
|
7491
7889
|
}, [(_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
7890
|
"ref": moreRef,
|
|
7493
7891
|
"type": "button",
|
|
7494
|
-
"class": bem$
|
|
7892
|
+
"class": bem$1c("more"),
|
|
7495
7893
|
"aria-label": "More tabs",
|
|
7496
7894
|
"onClick": onClickMore
|
|
7497
7895
|
}, [createVNode(Icon, {
|
|
@@ -7565,14 +7963,14 @@ var stdin_default$1n = defineComponent({
|
|
|
7565
7963
|
});
|
|
7566
7964
|
return () => createVNode("div", {
|
|
7567
7965
|
"ref": root,
|
|
7568
|
-
"class": bem$
|
|
7966
|
+
"class": bem$1c([props2.type])
|
|
7569
7967
|
}, [props2.sticky ? createVNode(Sticky, {
|
|
7570
7968
|
"container": root.value,
|
|
7571
7969
|
"offsetTop": offsetTopPx.value,
|
|
7572
7970
|
"onScroll": onStickyScroll
|
|
7573
7971
|
}, {
|
|
7574
7972
|
default: () => [renderHeader()]
|
|
7575
|
-
}) : renderHeader(), createVNode(stdin_default$
|
|
7973
|
+
}) : renderHeader(), createVNode(stdin_default$1n, {
|
|
7576
7974
|
"ref": contentRef,
|
|
7577
7975
|
"count": children.length,
|
|
7578
7976
|
"inited": state.inited,
|
|
@@ -7592,9 +7990,9 @@ var stdin_default$1n = defineComponent({
|
|
|
7592
7990
|
});
|
|
7593
7991
|
const TAB_STATUS_KEY = Symbol();
|
|
7594
7992
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
|
7595
|
-
const [name$
|
|
7596
|
-
var stdin_default$
|
|
7597
|
-
name: name$
|
|
7993
|
+
const [name$1c, bem$1b] = createNamespace("swipe-item");
|
|
7994
|
+
var stdin_default$1l = defineComponent({
|
|
7995
|
+
name: name$1c,
|
|
7598
7996
|
setup(props2, {
|
|
7599
7997
|
slots
|
|
7600
7998
|
}) {
|
|
@@ -7659,14 +8057,14 @@ var stdin_default$1m = defineComponent({
|
|
|
7659
8057
|
return () => {
|
|
7660
8058
|
var _a;
|
|
7661
8059
|
return createVNode("div", {
|
|
7662
|
-
"class": bem$
|
|
8060
|
+
"class": bem$1b(),
|
|
7663
8061
|
"style": style.value
|
|
7664
8062
|
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
|
7665
8063
|
};
|
|
7666
8064
|
}
|
|
7667
8065
|
});
|
|
7668
|
-
const SwipeItem = withInstall(stdin_default$
|
|
7669
|
-
const [name$
|
|
8066
|
+
const SwipeItem = withInstall(stdin_default$1l);
|
|
8067
|
+
const [name$1b, bem$1a] = createNamespace("tab");
|
|
7670
8068
|
const tabProps = extend({}, routeProps, {
|
|
7671
8069
|
dot: Boolean,
|
|
7672
8070
|
name: numericProp,
|
|
@@ -7678,8 +8076,8 @@ const tabProps = extend({}, routeProps, {
|
|
|
7678
8076
|
titleStyle: [String, Object],
|
|
7679
8077
|
showZeroBadge: truthProp
|
|
7680
8078
|
});
|
|
7681
|
-
var stdin_default$
|
|
7682
|
-
name: name$
|
|
8079
|
+
var stdin_default$1k = defineComponent({
|
|
8080
|
+
name: name$1b,
|
|
7683
8081
|
props: tabProps,
|
|
7684
8082
|
setup(props2, {
|
|
7685
8083
|
slots
|
|
@@ -7747,7 +8145,7 @@ var stdin_default$1l = defineComponent({
|
|
|
7747
8145
|
return createVNode(SwipeItem, {
|
|
7748
8146
|
"id": id,
|
|
7749
8147
|
"role": "tabpanel",
|
|
7750
|
-
"class": bem$
|
|
8148
|
+
"class": bem$1a("panel-wrapper", {
|
|
7751
8149
|
inactive: hasInactiveClass.value
|
|
7752
8150
|
}),
|
|
7753
8151
|
"tabindex": active.value ? 0 : -1,
|
|
@@ -7757,7 +8155,7 @@ var stdin_default$1l = defineComponent({
|
|
|
7757
8155
|
default: () => {
|
|
7758
8156
|
var _a2;
|
|
7759
8157
|
return [createVNode("div", {
|
|
7760
|
-
"class": bem$
|
|
8158
|
+
"class": bem$1a("panel")
|
|
7761
8159
|
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
|
|
7762
8160
|
}
|
|
7763
8161
|
});
|
|
@@ -7770,16 +8168,16 @@ var stdin_default$1l = defineComponent({
|
|
|
7770
8168
|
return withDirectives(createVNode("div", {
|
|
7771
8169
|
"id": id,
|
|
7772
8170
|
"role": "tabpanel",
|
|
7773
|
-
"class": bem$
|
|
8171
|
+
"class": bem$1a("panel"),
|
|
7774
8172
|
"tabindex": show ? 0 : -1,
|
|
7775
8173
|
"aria-labelledby": label
|
|
7776
8174
|
}, [Content]), [[vShow, show]]);
|
|
7777
8175
|
};
|
|
7778
8176
|
}
|
|
7779
8177
|
});
|
|
7780
|
-
const Tab = withInstall(stdin_default$
|
|
7781
|
-
const Tabs = withInstall(stdin_default$
|
|
7782
|
-
const [name$
|
|
8178
|
+
const Tab = withInstall(stdin_default$1k);
|
|
8179
|
+
const Tabs = withInstall(stdin_default$1m);
|
|
8180
|
+
const [name$1a, bem$19, t$e] = createNamespace("cascader");
|
|
7783
8181
|
const cascaderProps = {
|
|
7784
8182
|
title: String,
|
|
7785
8183
|
options: makeArrayProp(),
|
|
@@ -7792,8 +8190,8 @@ const cascaderProps = {
|
|
|
7792
8190
|
placeholder: String,
|
|
7793
8191
|
activeColor: String
|
|
7794
8192
|
};
|
|
7795
|
-
var stdin_default$
|
|
7796
|
-
name: name$
|
|
8193
|
+
var stdin_default$1j = defineComponent({
|
|
8194
|
+
name: name$1a,
|
|
7797
8195
|
props: cascaderProps,
|
|
7798
8196
|
emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
|
|
7799
8197
|
setup(props2, {
|
|
@@ -7901,12 +8299,12 @@ var stdin_default$1k = defineComponent({
|
|
|
7901
8299
|
title
|
|
7902
8300
|
}) => emit("click-tab", name2, title);
|
|
7903
8301
|
const renderHeader = () => props2.showHeader ? createVNode("div", {
|
|
7904
|
-
"class": bem$
|
|
8302
|
+
"class": bem$19("header")
|
|
7905
8303
|
}, [createVNode("h2", {
|
|
7906
|
-
"class": bem$
|
|
8304
|
+
"class": bem$19("title")
|
|
7907
8305
|
}, [slots.title ? slots.title() : props2.title]), props2.closeable ? createVNode(Icon, {
|
|
7908
8306
|
"name": props2.closeIcon,
|
|
7909
|
-
"class": [bem$
|
|
8307
|
+
"class": [bem$19("close-icon"), HAPTICS_FEEDBACK],
|
|
7910
8308
|
"onClick": onClose
|
|
7911
8309
|
}, null) : null]) : null;
|
|
7912
8310
|
const renderOption = (option, selectedOption, tabIndex) => {
|
|
@@ -7921,7 +8319,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7921
8319
|
}) : createVNode("span", null, [option[textKey]]);
|
|
7922
8320
|
return createVNode("li", {
|
|
7923
8321
|
"role": "menuitemradio",
|
|
7924
|
-
"class": [bem$
|
|
8322
|
+
"class": [bem$19("option", {
|
|
7925
8323
|
selected,
|
|
7926
8324
|
disabled
|
|
7927
8325
|
}), option.className],
|
|
@@ -7934,12 +8332,12 @@ var stdin_default$1k = defineComponent({
|
|
|
7934
8332
|
"onClick": () => onSelect(option, tabIndex)
|
|
7935
8333
|
}, [Text2, selected ? createVNode(Icon, {
|
|
7936
8334
|
"name": "success",
|
|
7937
|
-
"class": bem$
|
|
8335
|
+
"class": bem$19("selected-icon")
|
|
7938
8336
|
}, null) : null]);
|
|
7939
8337
|
};
|
|
7940
8338
|
const renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
|
|
7941
8339
|
"role": "menu",
|
|
7942
|
-
"class": bem$
|
|
8340
|
+
"class": bem$19("options")
|
|
7943
8341
|
}, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
|
|
7944
8342
|
const renderTab = (tab, tabIndex) => {
|
|
7945
8343
|
const {
|
|
@@ -7950,7 +8348,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7950
8348
|
const title = selected ? selected[textKey] : placeholder;
|
|
7951
8349
|
return createVNode(Tab, {
|
|
7952
8350
|
"title": title,
|
|
7953
|
-
"titleClass": bem$
|
|
8351
|
+
"titleClass": bem$19("tab", {
|
|
7954
8352
|
unselected: !selected
|
|
7955
8353
|
})
|
|
7956
8354
|
}, {
|
|
@@ -7969,7 +8367,7 @@ var stdin_default$1k = defineComponent({
|
|
|
7969
8367
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
|
7970
8368
|
"shrink": true,
|
|
7971
8369
|
"animated": true,
|
|
7972
|
-
"class": bem$
|
|
8370
|
+
"class": bem$19("tabs"),
|
|
7973
8371
|
"color": props2.activeColor,
|
|
7974
8372
|
"swipeable": props2.swipeable,
|
|
7975
8373
|
"onClick-tab": onClickTab
|
|
@@ -7993,20 +8391,20 @@ var stdin_default$1k = defineComponent({
|
|
|
7993
8391
|
updateTabs();
|
|
7994
8392
|
});
|
|
7995
8393
|
return () => createVNode("div", {
|
|
7996
|
-
"class": bem$
|
|
8394
|
+
"class": bem$19()
|
|
7997
8395
|
}, [renderHeader(), renderTabs()]);
|
|
7998
8396
|
}
|
|
7999
8397
|
});
|
|
8000
|
-
const Cascader = withInstall(stdin_default$
|
|
8001
|
-
const [name$
|
|
8398
|
+
const Cascader = withInstall(stdin_default$1j);
|
|
8399
|
+
const [name$19, bem$18] = createNamespace("cell-group");
|
|
8002
8400
|
const cellGroupProps = {
|
|
8003
8401
|
title: String,
|
|
8004
8402
|
inset: Boolean,
|
|
8005
8403
|
grayCard: Boolean,
|
|
8006
8404
|
border: truthProp
|
|
8007
8405
|
};
|
|
8008
|
-
var stdin_default$
|
|
8009
|
-
name: name$
|
|
8406
|
+
var stdin_default$1i = defineComponent({
|
|
8407
|
+
name: name$19,
|
|
8010
8408
|
inheritAttrs: false,
|
|
8011
8409
|
props: cellGroupProps,
|
|
8012
8410
|
setup(props2, {
|
|
@@ -8016,7 +8414,7 @@ var stdin_default$1j = defineComponent({
|
|
|
8016
8414
|
const renderGroup = () => {
|
|
8017
8415
|
var _a;
|
|
8018
8416
|
return createVNode("div", mergeProps({
|
|
8019
|
-
"class": [bem$
|
|
8417
|
+
"class": [bem$18({
|
|
8020
8418
|
inset: props2.inset,
|
|
8021
8419
|
"gray-card": props2.grayCard
|
|
8022
8420
|
}), {
|
|
@@ -8025,7 +8423,7 @@ var stdin_default$1j = defineComponent({
|
|
|
8025
8423
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
8026
8424
|
};
|
|
8027
8425
|
const renderTitle = () => createVNode("div", {
|
|
8028
|
-
"class": bem$
|
|
8426
|
+
"class": bem$18("title", {
|
|
8029
8427
|
inset: props2.inset
|
|
8030
8428
|
})
|
|
8031
8429
|
}, [slots.title ? slots.title() : props2.title]);
|
|
@@ -8037,158 +8435,8 @@ var stdin_default$1j = defineComponent({
|
|
|
8037
8435
|
};
|
|
8038
8436
|
}
|
|
8039
8437
|
});
|
|
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);
|
|
8438
|
+
const CellGroup = withInstall(stdin_default$1i);
|
|
8439
|
+
const CheckboxGroup = withInstall(stdin_default$1R);
|
|
8192
8440
|
const [name$18, bem$17] = createNamespace("checkbox-panel");
|
|
8193
8441
|
const checkboxPanelProps = {
|
|
8194
8442
|
show: Boolean,
|
|
@@ -13290,6 +13538,7 @@ var stdin_default$E = defineComponent({
|
|
|
13290
13538
|
type: Number,
|
|
13291
13539
|
required: true
|
|
13292
13540
|
},
|
|
13541
|
+
max: makeNumericProp(Infinity),
|
|
13293
13542
|
keyword: {
|
|
13294
13543
|
type: String,
|
|
13295
13544
|
default: ""
|
|
@@ -13323,7 +13572,8 @@ var stdin_default$E = defineComponent({
|
|
|
13323
13572
|
const confirmInputValue = () => {
|
|
13324
13573
|
const value = Number(inputValue.value);
|
|
13325
13574
|
if (!Number.isNaN(value)) {
|
|
13326
|
-
|
|
13575
|
+
const max = Number(props2.max);
|
|
13576
|
+
emit("update:modelValue", Math.min(Number.isNaN(max) ? Infinity : max, Math.max(0, value)));
|
|
13327
13577
|
}
|
|
13328
13578
|
};
|
|
13329
13579
|
const clearDetailLongPress = () => {
|
|
@@ -13397,6 +13647,7 @@ var stdin_default$E = defineComponent({
|
|
|
13397
13647
|
"class": bem$x("stepper"),
|
|
13398
13648
|
"modelValue": props2.modelValue,
|
|
13399
13649
|
"min": 0,
|
|
13650
|
+
"max": props2.max,
|
|
13400
13651
|
"theme": "round",
|
|
13401
13652
|
"buttonSize": 18,
|
|
13402
13653
|
"disableInput": true,
|
|
@@ -20658,7 +20909,7 @@ const Lazyload = {
|
|
|
20658
20909
|
});
|
|
20659
20910
|
}
|
|
20660
20911
|
};
|
|
20661
|
-
const version = "0.0.
|
|
20912
|
+
const version = "0.0.39";
|
|
20662
20913
|
function install(app) {
|
|
20663
20914
|
const components = [
|
|
20664
20915
|
ActionBar,
|