vant 4.9.0 → 4.9.2
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/README.md +5 -4
- package/es/action-bar-button/ActionBarButton.d.ts +3 -3
- package/es/action-bar-button/index.d.ts +2 -2
- package/es/action-bar-icon/ActionBarIcon.d.ts +3 -3
- package/es/action-bar-icon/index.d.ts +2 -2
- package/es/address-list/AddressList.d.ts +13 -13
- package/es/address-list/AddressList.mjs +20 -4
- package/es/address-list/AddressListItem.d.ts +3 -0
- package/es/address-list/AddressListItem.mjs +19 -7
- package/es/address-list/index.d.ts +2 -2
- package/es/address-list/style/index.mjs +1 -0
- package/es/area/utils.mjs +3 -3
- package/es/button/Button.d.ts +3 -3
- package/es/button/index.d.ts +2 -2
- package/es/card/Card.mjs +3 -3
- package/es/cell/Cell.d.ts +3 -3
- package/es/cell/index.d.ts +2 -2
- package/es/composables/use-route.d.ts +1 -2
- package/es/floating-panel/FloatingPanel.mjs +11 -5
- package/es/form/Form.d.ts +3 -0
- package/es/form/Form.mjs +9 -2
- package/es/form/index.d.ts +2 -0
- package/es/grid-item/GridItem.d.ts +3 -3
- package/es/grid-item/index.d.ts +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/notify/types.d.ts +3 -0
- package/es/sidebar-item/SidebarItem.d.ts +3 -3
- package/es/sidebar-item/index.d.ts +2 -2
- package/es/stepper/Stepper.mjs +1 -0
- package/es/tab/Tab.d.ts +3 -3
- package/es/tab/index.d.ts +2 -2
- package/es/tabbar-item/TabbarItem.d.ts +3 -3
- package/es/tabbar-item/index.d.ts +2 -2
- package/es/tabs/index.css +1 -1
- package/es/tabs/utils.mjs +3 -1
- package/es/uploader/index.d.ts +1 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +3 -3
- package/lib/action-bar-button/index.d.ts +2 -2
- package/lib/action-bar-icon/ActionBarIcon.d.ts +3 -3
- package/lib/action-bar-icon/index.d.ts +2 -2
- package/lib/address-list/AddressList.d.ts +13 -13
- package/lib/address-list/AddressList.js +19 -3
- package/lib/address-list/AddressListItem.d.ts +3 -0
- package/lib/address-list/AddressListItem.js +19 -7
- package/lib/address-list/index.d.ts +2 -2
- package/lib/address-list/style/index.js +1 -0
- package/lib/area/utils.js +3 -3
- package/lib/button/Button.d.ts +3 -3
- package/lib/button/index.d.ts +2 -2
- package/lib/card/Card.js +2 -2
- package/lib/cell/Cell.d.ts +3 -3
- package/lib/cell/index.d.ts +2 -2
- package/lib/composables/use-route.d.ts +1 -2
- package/lib/floating-panel/FloatingPanel.js +11 -5
- package/lib/form/Form.d.ts +3 -0
- package/lib/form/Form.js +9 -2
- package/lib/form/index.d.ts +2 -0
- package/lib/grid-item/GridItem.d.ts +3 -3
- package/lib/grid-item/index.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/notify/types.d.ts +3 -0
- package/lib/sidebar-item/SidebarItem.d.ts +3 -3
- package/lib/sidebar-item/index.d.ts +2 -2
- package/lib/stepper/Stepper.js +1 -0
- package/lib/tab/Tab.d.ts +3 -3
- package/lib/tab/index.d.ts +2 -2
- package/lib/tabbar-item/TabbarItem.d.ts +3 -3
- package/lib/tabbar-item/index.d.ts +2 -2
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/utils.js +3 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/vant.cjs.js +342 -300
- package/lib/vant.es.js +342 -300
- package/lib/vant.js +344 -302
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +15 -15
package/lib/vant.es.js
CHANGED
@@ -1983,11 +1983,13 @@ function scrollLeftTo(scroller, to, duration) {
|
|
1983
1983
|
let count = 0;
|
1984
1984
|
const from = scroller.scrollLeft;
|
1985
1985
|
const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
|
1986
|
+
let scrollLeft = from;
|
1986
1987
|
function cancel() {
|
1987
1988
|
cancelRaf(rafId);
|
1988
1989
|
}
|
1989
1990
|
function animate() {
|
1990
|
-
|
1991
|
+
scrollLeft += (to - from) / frames;
|
1992
|
+
scroller.scrollLeft = scrollLeft;
|
1991
1993
|
if (++count < frames) {
|
1992
1994
|
rafId = raf(animate);
|
1993
1995
|
}
|
@@ -3569,9 +3571,9 @@ function formatDataForCascade({
|
|
3569
3571
|
const showCounty = +columnsNum > 2;
|
3570
3572
|
const getProvinceChildren = () => {
|
3571
3573
|
if (showCity) {
|
3572
|
-
return placeholder.length ? [
|
3574
|
+
return placeholder.length > 1 ? [
|
3573
3575
|
makeOption(
|
3574
|
-
placeholder[
|
3576
|
+
placeholder[1],
|
3575
3577
|
AREA_EMPTY_CODE,
|
3576
3578
|
showCounty ? [] : void 0
|
3577
3579
|
)
|
@@ -3589,7 +3591,7 @@ function formatDataForCascade({
|
|
3589
3591
|
if (showCity) {
|
3590
3592
|
const getCityChildren = () => {
|
3591
3593
|
if (showCounty) {
|
3592
|
-
return placeholder.length ? [makeOption(placeholder[
|
3594
|
+
return placeholder.length > 2 ? [makeOption(placeholder[2])] : [];
|
3593
3595
|
}
|
3594
3596
|
};
|
3595
3597
|
Object.keys(city).forEach((code) => {
|
@@ -3819,6 +3821,7 @@ const formProps = {
|
|
3819
3821
|
labelAlign: String,
|
3820
3822
|
inputAlign: String,
|
3821
3823
|
scrollToError: Boolean,
|
3824
|
+
scrollToErrorPosition: String,
|
3822
3825
|
validateFirst: Boolean,
|
3823
3826
|
submitOnEnter: truthProp,
|
3824
3827
|
showErrorMessage: truthProp,
|
@@ -3932,8 +3935,14 @@ var stdin_default$1w = defineComponent({
|
|
3932
3935
|
values,
|
3933
3936
|
errors
|
3934
3937
|
});
|
3935
|
-
|
3936
|
-
|
3938
|
+
const {
|
3939
|
+
scrollToError,
|
3940
|
+
scrollToErrorPosition
|
3941
|
+
} = props2;
|
3942
|
+
if (scrollToError && errors[0].name) {
|
3943
|
+
scrollToField(errors[0].name, scrollToErrorPosition ? {
|
3944
|
+
block: scrollToErrorPosition
|
3945
|
+
} : void 0);
|
3937
3946
|
}
|
3938
3947
|
});
|
3939
3948
|
};
|
@@ -5327,7 +5336,71 @@ var stdin_default$1q = defineComponent({
|
|
5327
5336
|
}
|
5328
5337
|
});
|
5329
5338
|
const RadioGroup = withInstall(stdin_default$1q);
|
5330
|
-
const [name$1f, bem$1b] = createNamespace("
|
5339
|
+
const [name$1f, bem$1b] = createNamespace("checkbox-group");
|
5340
|
+
const checkboxGroupProps = {
|
5341
|
+
max: numericProp,
|
5342
|
+
shape: makeStringProp("round"),
|
5343
|
+
disabled: Boolean,
|
5344
|
+
iconSize: numericProp,
|
5345
|
+
direction: String,
|
5346
|
+
modelValue: makeArrayProp(),
|
5347
|
+
checkedColor: String
|
5348
|
+
};
|
5349
|
+
const CHECKBOX_GROUP_KEY = Symbol(name$1f);
|
5350
|
+
var stdin_default$1p = defineComponent({
|
5351
|
+
name: name$1f,
|
5352
|
+
props: checkboxGroupProps,
|
5353
|
+
emits: ["change", "update:modelValue"],
|
5354
|
+
setup(props2, {
|
5355
|
+
emit,
|
5356
|
+
slots
|
5357
|
+
}) {
|
5358
|
+
const {
|
5359
|
+
children,
|
5360
|
+
linkChildren
|
5361
|
+
} = useChildren(CHECKBOX_GROUP_KEY);
|
5362
|
+
const updateValue = (value) => emit("update:modelValue", value);
|
5363
|
+
const toggleAll = (options = {}) => {
|
5364
|
+
if (typeof options === "boolean") {
|
5365
|
+
options = {
|
5366
|
+
checked: options
|
5367
|
+
};
|
5368
|
+
}
|
5369
|
+
const {
|
5370
|
+
checked,
|
5371
|
+
skipDisabled
|
5372
|
+
} = options;
|
5373
|
+
const checkedChildren = children.filter((item) => {
|
5374
|
+
if (!item.props.bindGroup) {
|
5375
|
+
return false;
|
5376
|
+
}
|
5377
|
+
if (item.props.disabled && skipDisabled) {
|
5378
|
+
return item.checked.value;
|
5379
|
+
}
|
5380
|
+
return checked != null ? checked : !item.checked.value;
|
5381
|
+
});
|
5382
|
+
const names = checkedChildren.map((item) => item.name);
|
5383
|
+
updateValue(names);
|
5384
|
+
};
|
5385
|
+
watch(() => props2.modelValue, (value) => emit("change", value));
|
5386
|
+
useExpose({
|
5387
|
+
toggleAll
|
5388
|
+
});
|
5389
|
+
useCustomFieldValue(() => props2.modelValue);
|
5390
|
+
linkChildren({
|
5391
|
+
props: props2,
|
5392
|
+
updateValue
|
5393
|
+
});
|
5394
|
+
return () => {
|
5395
|
+
var _a;
|
5396
|
+
return createVNode("div", {
|
5397
|
+
"class": bem$1b([props2.direction])
|
5398
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
5399
|
+
};
|
5400
|
+
}
|
5401
|
+
});
|
5402
|
+
const CheckboxGroup = withInstall(stdin_default$1p);
|
5403
|
+
const [name$1e, bem$1a] = createNamespace("tag");
|
5331
5404
|
const tagProps = {
|
5332
5405
|
size: String,
|
5333
5406
|
mark: Boolean,
|
@@ -5339,8 +5412,8 @@ const tagProps = {
|
|
5339
5412
|
textColor: String,
|
5340
5413
|
closeable: Boolean
|
5341
5414
|
};
|
5342
|
-
var stdin_default$
|
5343
|
-
name: name$
|
5415
|
+
var stdin_default$1o = defineComponent({
|
5416
|
+
name: name$1e,
|
5344
5417
|
props: tagProps,
|
5345
5418
|
emits: ["close"],
|
5346
5419
|
setup(props2, {
|
@@ -5383,12 +5456,12 @@ var stdin_default$1p = defineComponent({
|
|
5383
5456
|
}
|
5384
5457
|
const CloseIcon = closeable && createVNode(Icon, {
|
5385
5458
|
"name": "cross",
|
5386
|
-
"class": [bem$
|
5459
|
+
"class": [bem$1a("close"), HAPTICS_FEEDBACK],
|
5387
5460
|
"onClick": onClose
|
5388
5461
|
}, null);
|
5389
5462
|
return createVNode("span", {
|
5390
5463
|
"style": getStyle(),
|
5391
|
-
"class": bem$
|
5464
|
+
"class": bem$1a([classes, type])
|
5392
5465
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
|
5393
5466
|
};
|
5394
5467
|
return () => createVNode(Transition, {
|
@@ -5398,7 +5471,7 @@ var stdin_default$1p = defineComponent({
|
|
5398
5471
|
});
|
5399
5472
|
}
|
5400
5473
|
});
|
5401
|
-
const Tag = withInstall(stdin_default$
|
5474
|
+
const Tag = withInstall(stdin_default$1o);
|
5402
5475
|
const checkerProps = {
|
5403
5476
|
name: unknownProp,
|
5404
5477
|
disabled: Boolean,
|
@@ -5408,7 +5481,7 @@ const checkerProps = {
|
|
5408
5481
|
labelPosition: String,
|
5409
5482
|
labelDisabled: Boolean
|
5410
5483
|
};
|
5411
|
-
var stdin_default$
|
5484
|
+
var stdin_default$1n = defineComponent({
|
5412
5485
|
props: extend({}, checkerProps, {
|
5413
5486
|
bem: makeRequiredProp(Function),
|
5414
5487
|
role: String,
|
@@ -5537,9 +5610,9 @@ var stdin_default$1o = defineComponent({
|
|
5537
5610
|
const radioProps = extend({}, checkerProps, {
|
5538
5611
|
shape: String
|
5539
5612
|
});
|
5540
|
-
const [name$
|
5541
|
-
var stdin_default$
|
5542
|
-
name: name$
|
5613
|
+
const [name$1d, bem$19] = createNamespace("radio");
|
5614
|
+
var stdin_default$1m = defineComponent({
|
5615
|
+
name: name$1d,
|
5543
5616
|
props: radioProps,
|
5544
5617
|
emits: ["update:modelValue"],
|
5545
5618
|
setup(props2, {
|
@@ -5560,8 +5633,8 @@ var stdin_default$1n = defineComponent({
|
|
5560
5633
|
emit("update:modelValue", props2.name);
|
5561
5634
|
}
|
5562
5635
|
};
|
5563
|
-
return () => createVNode(stdin_default$
|
5564
|
-
"bem": bem$
|
5636
|
+
return () => createVNode(stdin_default$1n, mergeProps({
|
5637
|
+
"bem": bem$19,
|
5565
5638
|
"role": "radio",
|
5566
5639
|
"parent": parent,
|
5567
5640
|
"checked": checked(),
|
@@ -5569,14 +5642,97 @@ var stdin_default$1n = defineComponent({
|
|
5569
5642
|
}, props2), pick(slots, ["default", "icon"]));
|
5570
5643
|
}
|
5571
5644
|
});
|
5572
|
-
const Radio = withInstall(stdin_default$
|
5573
|
-
const [name$
|
5574
|
-
|
5575
|
-
|
5645
|
+
const Radio = withInstall(stdin_default$1m);
|
5646
|
+
const [name$1c, bem$18] = createNamespace("checkbox");
|
5647
|
+
const checkboxProps = extend({}, checkerProps, {
|
5648
|
+
shape: String,
|
5649
|
+
bindGroup: truthProp,
|
5650
|
+
indeterminate: {
|
5651
|
+
type: Boolean,
|
5652
|
+
default: null
|
5653
|
+
}
|
5654
|
+
});
|
5655
|
+
var stdin_default$1l = defineComponent({
|
5656
|
+
name: name$1c,
|
5657
|
+
props: checkboxProps,
|
5658
|
+
emits: ["change", "update:modelValue"],
|
5659
|
+
setup(props2, {
|
5660
|
+
emit,
|
5661
|
+
slots
|
5662
|
+
}) {
|
5663
|
+
const {
|
5664
|
+
parent
|
5665
|
+
} = useParent(CHECKBOX_GROUP_KEY);
|
5666
|
+
const setParentValue = (checked2) => {
|
5667
|
+
const {
|
5668
|
+
name: name2
|
5669
|
+
} = props2;
|
5670
|
+
const {
|
5671
|
+
max,
|
5672
|
+
modelValue
|
5673
|
+
} = parent.props;
|
5674
|
+
const value = modelValue.slice();
|
5675
|
+
if (checked2) {
|
5676
|
+
const overlimit = max && value.length >= +max;
|
5677
|
+
if (!overlimit && !value.includes(name2)) {
|
5678
|
+
value.push(name2);
|
5679
|
+
if (props2.bindGroup) {
|
5680
|
+
parent.updateValue(value);
|
5681
|
+
}
|
5682
|
+
}
|
5683
|
+
} else {
|
5684
|
+
const index = value.indexOf(name2);
|
5685
|
+
if (index !== -1) {
|
5686
|
+
value.splice(index, 1);
|
5687
|
+
if (props2.bindGroup) {
|
5688
|
+
parent.updateValue(value);
|
5689
|
+
}
|
5690
|
+
}
|
5691
|
+
}
|
5692
|
+
};
|
5693
|
+
const checked = computed(() => {
|
5694
|
+
if (parent && props2.bindGroup) {
|
5695
|
+
return parent.props.modelValue.indexOf(props2.name) !== -1;
|
5696
|
+
}
|
5697
|
+
return !!props2.modelValue;
|
5698
|
+
});
|
5699
|
+
const toggle = (newValue = !checked.value) => {
|
5700
|
+
if (parent && props2.bindGroup) {
|
5701
|
+
setParentValue(newValue);
|
5702
|
+
} else {
|
5703
|
+
emit("update:modelValue", newValue);
|
5704
|
+
}
|
5705
|
+
if (props2.indeterminate !== null)
|
5706
|
+
emit("change", newValue);
|
5707
|
+
};
|
5708
|
+
watch(() => props2.modelValue, (value) => {
|
5709
|
+
if (props2.indeterminate === null)
|
5710
|
+
emit("change", value);
|
5711
|
+
});
|
5712
|
+
useExpose({
|
5713
|
+
toggle,
|
5714
|
+
props: props2,
|
5715
|
+
checked
|
5716
|
+
});
|
5717
|
+
useCustomFieldValue(() => props2.modelValue);
|
5718
|
+
return () => createVNode(stdin_default$1n, mergeProps({
|
5719
|
+
"bem": bem$18,
|
5720
|
+
"role": "checkbox",
|
5721
|
+
"parent": parent,
|
5722
|
+
"checked": checked.value,
|
5723
|
+
"onToggle": toggle
|
5724
|
+
}, props2), pick(slots, ["default", "icon"]));
|
5725
|
+
}
|
5726
|
+
});
|
5727
|
+
const Checkbox = withInstall(stdin_default$1l);
|
5728
|
+
const [name$1b, bem$17] = createNamespace("address-item");
|
5729
|
+
var stdin_default$1k = defineComponent({
|
5730
|
+
name: name$1b,
|
5576
5731
|
props: {
|
5577
5732
|
address: makeRequiredProp(Object),
|
5578
5733
|
disabled: Boolean,
|
5579
5734
|
switchable: Boolean,
|
5735
|
+
singleChoice: Boolean,
|
5580
5736
|
defaultTagText: String,
|
5581
5737
|
rightIcon: makeStringProp("edit")
|
5582
5738
|
},
|
@@ -5593,7 +5749,7 @@ var stdin_default$1m = defineComponent({
|
|
5593
5749
|
};
|
5594
5750
|
const renderRightIcon = () => createVNode(Icon, {
|
5595
5751
|
"name": props2.rightIcon,
|
5596
|
-
"class": bem$
|
5752
|
+
"class": bem$17("edit"),
|
5597
5753
|
"onClick": (event) => {
|
5598
5754
|
event.stopPropagation();
|
5599
5755
|
emit("edit");
|
@@ -5608,7 +5764,7 @@ var stdin_default$1m = defineComponent({
|
|
5608
5764
|
return createVNode(Tag, {
|
5609
5765
|
"type": "primary",
|
5610
5766
|
"round": true,
|
5611
|
-
"class": bem$
|
5767
|
+
"class": bem$17("tag")
|
5612
5768
|
}, {
|
5613
5769
|
default: () => [props2.defaultTagText]
|
5614
5770
|
});
|
@@ -5618,20 +5774,30 @@ var stdin_default$1m = defineComponent({
|
|
5618
5774
|
const {
|
5619
5775
|
address,
|
5620
5776
|
disabled,
|
5621
|
-
switchable
|
5777
|
+
switchable,
|
5778
|
+
singleChoice
|
5622
5779
|
} = props2;
|
5623
5780
|
const Info = [createVNode("div", {
|
5624
|
-
"class": bem$
|
5781
|
+
"class": bem$17("name")
|
5625
5782
|
}, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
|
5626
|
-
"class": bem$
|
5783
|
+
"class": bem$17("address")
|
5627
5784
|
}, [address.address])];
|
5628
5785
|
if (switchable && !disabled) {
|
5629
|
-
|
5630
|
-
|
5631
|
-
|
5632
|
-
|
5633
|
-
|
5634
|
-
|
5786
|
+
if (singleChoice) {
|
5787
|
+
return createVNode(Radio, {
|
5788
|
+
"name": address.id,
|
5789
|
+
"iconSize": 18
|
5790
|
+
}, {
|
5791
|
+
default: () => [Info]
|
5792
|
+
});
|
5793
|
+
} else {
|
5794
|
+
return createVNode(Checkbox, {
|
5795
|
+
"name": address.id,
|
5796
|
+
"iconSize": 18
|
5797
|
+
}, {
|
5798
|
+
default: () => [Info]
|
5799
|
+
});
|
5800
|
+
}
|
5635
5801
|
}
|
5636
5802
|
return Info;
|
5637
5803
|
};
|
@@ -5641,13 +5807,13 @@ var stdin_default$1m = defineComponent({
|
|
5641
5807
|
disabled
|
5642
5808
|
} = props2;
|
5643
5809
|
return createVNode("div", {
|
5644
|
-
"class": bem$
|
5810
|
+
"class": bem$17({
|
5645
5811
|
disabled
|
5646
5812
|
}),
|
5647
5813
|
"onClick": onClick
|
5648
5814
|
}, [createVNode(Cell, {
|
5649
5815
|
"border": false,
|
5650
|
-
"titleClass": bem$
|
5816
|
+
"titleClass": bem$17("title")
|
5651
5817
|
}, {
|
5652
5818
|
title: renderContent,
|
5653
5819
|
"right-icon": renderRightIcon
|
@@ -5657,10 +5823,10 @@ var stdin_default$1m = defineComponent({
|
|
5657
5823
|
};
|
5658
5824
|
}
|
5659
5825
|
});
|
5660
|
-
const [name$
|
5826
|
+
const [name$1a, bem$16, t$h] = createNamespace("address-list");
|
5661
5827
|
const addressListProps = {
|
5662
5828
|
list: makeArrayProp(),
|
5663
|
-
modelValue: numericProp,
|
5829
|
+
modelValue: [...numericProp, Array],
|
5664
5830
|
switchable: truthProp,
|
5665
5831
|
disabledText: String,
|
5666
5832
|
disabledList: makeArrayProp(),
|
@@ -5669,14 +5835,15 @@ const addressListProps = {
|
|
5669
5835
|
defaultTagText: String,
|
5670
5836
|
rightIcon: makeStringProp("edit")
|
5671
5837
|
};
|
5672
|
-
var stdin_default$
|
5673
|
-
name: name$
|
5838
|
+
var stdin_default$1j = defineComponent({
|
5839
|
+
name: name$1a,
|
5674
5840
|
props: addressListProps,
|
5675
5841
|
emits: ["add", "edit", "select", "clickItem", "editDisabled", "selectDisabled", "update:modelValue"],
|
5676
5842
|
setup(props2, {
|
5677
5843
|
slots,
|
5678
5844
|
emit
|
5679
5845
|
}) {
|
5846
|
+
const singleChoice = computed(() => !Array.isArray(props2.modelValue));
|
5680
5847
|
const renderItem = (item, index, disabled) => {
|
5681
5848
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
5682
5849
|
const onClick = (event) => emit("clickItem", item, index, {
|
@@ -5685,14 +5852,24 @@ var stdin_default$1l = defineComponent({
|
|
5685
5852
|
const onSelect = () => {
|
5686
5853
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
5687
5854
|
if (!disabled) {
|
5688
|
-
|
5855
|
+
if (singleChoice.value) {
|
5856
|
+
emit("update:modelValue", item.id);
|
5857
|
+
} else {
|
5858
|
+
const value = props2.modelValue;
|
5859
|
+
if (value.includes(item.id)) {
|
5860
|
+
emit("update:modelValue", value.filter((id) => id !== item.id));
|
5861
|
+
} else {
|
5862
|
+
emit("update:modelValue", [...value, item.id]);
|
5863
|
+
}
|
5864
|
+
}
|
5689
5865
|
}
|
5690
5866
|
};
|
5691
|
-
return createVNode(stdin_default$
|
5867
|
+
return createVNode(stdin_default$1k, {
|
5692
5868
|
"key": item.id,
|
5693
5869
|
"address": item,
|
5694
5870
|
"disabled": disabled,
|
5695
5871
|
"switchable": props2.switchable,
|
5872
|
+
"singleChoice": singleChoice.value,
|
5696
5873
|
"defaultTagText": props2.defaultTagText,
|
5697
5874
|
"rightIcon": props2.rightIcon,
|
5698
5875
|
"onEdit": onEdit,
|
@@ -5709,13 +5886,13 @@ var stdin_default$1l = defineComponent({
|
|
5709
5886
|
}
|
5710
5887
|
};
|
5711
5888
|
const renderBottom = () => props2.showAddButton ? createVNode("div", {
|
5712
|
-
"class": [bem$
|
5889
|
+
"class": [bem$16("bottom"), "van-safe-area-bottom"]
|
5713
5890
|
}, [createVNode(Button, {
|
5714
5891
|
"round": true,
|
5715
5892
|
"block": true,
|
5716
5893
|
"type": "primary",
|
5717
5894
|
"text": props2.addButtonText || t$h("add"),
|
5718
|
-
"class": bem$
|
5895
|
+
"class": bem$16("add"),
|
5719
5896
|
"onClick": () => emit("add")
|
5720
5897
|
}, null)]) : void 0;
|
5721
5898
|
return () => {
|
@@ -5723,11 +5900,15 @@ var stdin_default$1l = defineComponent({
|
|
5723
5900
|
const List2 = renderList(props2.list);
|
5724
5901
|
const DisabledList = renderList(props2.disabledList, true);
|
5725
5902
|
const DisabledText = props2.disabledText && createVNode("div", {
|
5726
|
-
"class": bem$
|
5903
|
+
"class": bem$16("disabled-text")
|
5727
5904
|
}, [props2.disabledText]);
|
5728
5905
|
return createVNode("div", {
|
5729
|
-
"class": bem$
|
5730
|
-
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(
|
5906
|
+
"class": bem$16()
|
5907
|
+
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), !singleChoice.value && Array.isArray(props2.modelValue) ? createVNode(CheckboxGroup, {
|
5908
|
+
"modelValue": props2.modelValue
|
5909
|
+
}, {
|
5910
|
+
default: () => [List2]
|
5911
|
+
}) : createVNode(RadioGroup, {
|
5731
5912
|
"modelValue": props2.modelValue
|
5732
5913
|
}, {
|
5733
5914
|
default: () => [List2]
|
@@ -5735,7 +5916,7 @@ var stdin_default$1l = defineComponent({
|
|
5735
5916
|
};
|
5736
5917
|
}
|
5737
5918
|
});
|
5738
|
-
const AddressList = withInstall(stdin_default$
|
5919
|
+
const AddressList = withInstall(stdin_default$1j);
|
5739
5920
|
const hasIntersectionObserver = inBrowser$1 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
5740
5921
|
const modeType = {
|
5741
5922
|
event: "event",
|
@@ -5888,7 +6069,7 @@ class ImageCache {
|
|
5888
6069
|
this.caches.shift();
|
5889
6070
|
}
|
5890
6071
|
}
|
5891
|
-
const [name$
|
6072
|
+
const [name$19, bem$15] = createNamespace("back-top");
|
5892
6073
|
const backTopProps = {
|
5893
6074
|
right: numericProp,
|
5894
6075
|
bottom: numericProp,
|
@@ -5901,8 +6082,8 @@ const backTopProps = {
|
|
5901
6082
|
default: "body"
|
5902
6083
|
}
|
5903
6084
|
};
|
5904
|
-
var stdin_default$
|
5905
|
-
name: name$
|
6085
|
+
var stdin_default$1i = defineComponent({
|
6086
|
+
name: name$19,
|
5906
6087
|
inheritAttrs: false,
|
5907
6088
|
props: backTopProps,
|
5908
6089
|
emits: ["click"],
|
@@ -5974,19 +6155,19 @@ var stdin_default$1k = defineComponent({
|
|
5974
6155
|
return () => {
|
5975
6156
|
const Content = createVNode("div", mergeProps({
|
5976
6157
|
"ref": !props2.teleport ? root : void 0,
|
5977
|
-
"class": bem$
|
6158
|
+
"class": bem$15({
|
5978
6159
|
active: show.value
|
5979
6160
|
}),
|
5980
6161
|
"style": style.value,
|
5981
6162
|
"onClick": onClick
|
5982
6163
|
}, attrs), [slots.default ? slots.default() : createVNode(Icon, {
|
5983
6164
|
"name": "back-top",
|
5984
|
-
"class": bem$
|
6165
|
+
"class": bem$15("icon")
|
5985
6166
|
}, null)]);
|
5986
6167
|
if (props2.teleport) {
|
5987
6168
|
return [createVNode("div", {
|
5988
6169
|
"ref": root,
|
5989
|
-
"class": bem$
|
6170
|
+
"class": bem$15("placeholder")
|
5990
6171
|
}, null), createVNode(Teleport, {
|
5991
6172
|
"to": props2.teleport
|
5992
6173
|
}, {
|
@@ -5997,7 +6178,7 @@ var stdin_default$1k = defineComponent({
|
|
5997
6178
|
};
|
5998
6179
|
}
|
5999
6180
|
});
|
6000
|
-
const BackTop = withInstall(stdin_default$
|
6181
|
+
const BackTop = withInstall(stdin_default$1i);
|
6001
6182
|
var __async = (__this, __arguments, generator) => {
|
6002
6183
|
return new Promise((resolve, reject) => {
|
6003
6184
|
var fulfilled = (value) => {
|
@@ -6026,9 +6207,9 @@ const barrageProps = {
|
|
6026
6207
|
delay: makeNumberProp(300),
|
6027
6208
|
modelValue: makeArrayProp()
|
6028
6209
|
};
|
6029
|
-
const [name$
|
6030
|
-
var stdin_default$
|
6031
|
-
name: name$
|
6210
|
+
const [name$18, bem$14] = createNamespace("barrage");
|
6211
|
+
var stdin_default$1h = defineComponent({
|
6212
|
+
name: name$18,
|
6032
6213
|
props: barrageProps,
|
6033
6214
|
emits: ["update:modelValue"],
|
6034
6215
|
setup(props2, {
|
@@ -6036,7 +6217,7 @@ var stdin_default$1j = defineComponent({
|
|
6036
6217
|
slots
|
6037
6218
|
}) {
|
6038
6219
|
const barrageWrapper = ref();
|
6039
|
-
const className = bem$
|
6220
|
+
const className = bem$14("item");
|
6040
6221
|
const total = ref(0);
|
6041
6222
|
const barrageItems = [];
|
6042
6223
|
const createBarrageItem = (text, delay = props2.delay) => {
|
@@ -6117,15 +6298,15 @@ var stdin_default$1j = defineComponent({
|
|
6117
6298
|
return () => {
|
6118
6299
|
var _a;
|
6119
6300
|
return createVNode("div", {
|
6120
|
-
"class": bem$
|
6301
|
+
"class": bem$14(),
|
6121
6302
|
"ref": barrageWrapper,
|
6122
6303
|
"style": rootStyle.value
|
6123
6304
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
6124
6305
|
};
|
6125
6306
|
}
|
6126
6307
|
});
|
6127
|
-
const Barrage = withInstall(stdin_default$
|
6128
|
-
const [name$
|
6308
|
+
const Barrage = withInstall(stdin_default$1h);
|
6309
|
+
const [name$17, bem$13, t$g] = createNamespace("calendar");
|
6129
6310
|
const formatMonthTitle = (date) => t$g("monthTitle", date.getFullYear(), date.getMonth() + 1);
|
6130
6311
|
function compareMonth(date1, date2) {
|
6131
6312
|
const year1 = date1.getFullYear();
|
@@ -6219,9 +6400,9 @@ const formatValueRange = (values, columns) => values.map((value, index) => {
|
|
6219
6400
|
}
|
6220
6401
|
return value;
|
6221
6402
|
});
|
6222
|
-
const [name$
|
6223
|
-
var stdin_default$
|
6224
|
-
name: name$
|
6403
|
+
const [name$16] = createNamespace("calendar-day");
|
6404
|
+
var stdin_default$1g = defineComponent({
|
6405
|
+
name: name$16,
|
6225
6406
|
props: {
|
6226
6407
|
item: makeRequiredProp(Object),
|
6227
6408
|
color: String,
|
@@ -6285,7 +6466,7 @@ var stdin_default$1i = defineComponent({
|
|
6285
6466
|
} = props2.item;
|
6286
6467
|
if (topInfo || slots["top-info"]) {
|
6287
6468
|
return createVNode("div", {
|
6288
|
-
"class": bem$
|
6469
|
+
"class": bem$13("top-info")
|
6289
6470
|
}, [slots["top-info"] ? slots["top-info"](props2.item) : topInfo]);
|
6290
6471
|
}
|
6291
6472
|
};
|
@@ -6295,7 +6476,7 @@ var stdin_default$1i = defineComponent({
|
|
6295
6476
|
} = props2.item;
|
6296
6477
|
if (bottomInfo || slots["bottom-info"]) {
|
6297
6478
|
return createVNode("div", {
|
6298
|
-
"class": bem$
|
6479
|
+
"class": bem$13("bottom-info")
|
6299
6480
|
}, [slots["bottom-info"] ? slots["bottom-info"](props2.item) : bottomInfo]);
|
6300
6481
|
}
|
6301
6482
|
};
|
@@ -6312,7 +6493,7 @@ var stdin_default$1i = defineComponent({
|
|
6312
6493
|
const Nodes = [renderTopInfo(), text, renderBottomInfo()];
|
6313
6494
|
if (type === "selected") {
|
6314
6495
|
return createVNode("div", {
|
6315
|
-
"class": bem$
|
6496
|
+
"class": bem$13("selected-day"),
|
6316
6497
|
"style": {
|
6317
6498
|
width: rowHeight,
|
6318
6499
|
height: rowHeight,
|
@@ -6329,21 +6510,21 @@ var stdin_default$1i = defineComponent({
|
|
6329
6510
|
} = props2.item;
|
6330
6511
|
if (type === "placeholder") {
|
6331
6512
|
return createVNode("div", {
|
6332
|
-
"class": bem$
|
6513
|
+
"class": bem$13("day"),
|
6333
6514
|
"style": style.value
|
6334
6515
|
}, null);
|
6335
6516
|
}
|
6336
6517
|
return createVNode("div", {
|
6337
6518
|
"role": "gridcell",
|
6338
6519
|
"style": style.value,
|
6339
|
-
"class": [bem$
|
6520
|
+
"class": [bem$13("day", type), className],
|
6340
6521
|
"tabindex": type === "disabled" ? void 0 : -1,
|
6341
6522
|
"onClick": onClick
|
6342
6523
|
}, [renderContent()]);
|
6343
6524
|
};
|
6344
6525
|
}
|
6345
6526
|
});
|
6346
|
-
const [name$
|
6527
|
+
const [name$15] = createNamespace("calendar-month");
|
6347
6528
|
const calendarMonthProps = {
|
6348
6529
|
date: makeRequiredProp(Date),
|
6349
6530
|
type: String,
|
@@ -6360,8 +6541,8 @@ const calendarMonthProps = {
|
|
6360
6541
|
showMonthTitle: Boolean,
|
6361
6542
|
firstDayOfWeek: Number
|
6362
6543
|
};
|
6363
|
-
var stdin_default$
|
6364
|
-
name: name$
|
6544
|
+
var stdin_default$1f = defineComponent({
|
6545
|
+
name: name$15,
|
6365
6546
|
props: calendarMonthProps,
|
6366
6547
|
emits: ["click", "clickDisabledDate"],
|
6367
6548
|
setup(props2, {
|
@@ -6468,7 +6649,7 @@ var stdin_default$1h = defineComponent({
|
|
6468
6649
|
const renderTitle = () => {
|
6469
6650
|
if (props2.showMonthTitle) {
|
6470
6651
|
return createVNode("div", {
|
6471
|
-
"class": bem$
|
6652
|
+
"class": bem$13("month-title")
|
6472
6653
|
}, [slots["month-title"] ? slots["month-title"]({
|
6473
6654
|
date: props2.date,
|
6474
6655
|
text: title.value
|
@@ -6478,7 +6659,7 @@ var stdin_default$1h = defineComponent({
|
|
6478
6659
|
const renderMark = () => {
|
6479
6660
|
if (props2.showMark && shouldRender.value) {
|
6480
6661
|
return createVNode("div", {
|
6481
|
-
"class": bem$
|
6662
|
+
"class": bem$13("month-mark")
|
6482
6663
|
}, [props2.date.getMonth() + 1]);
|
6483
6664
|
}
|
6484
6665
|
};
|
@@ -6518,7 +6699,7 @@ var stdin_default$1h = defineComponent({
|
|
6518
6699
|
setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
|
6519
6700
|
}
|
6520
6701
|
};
|
6521
|
-
const renderDay = (item, index) => createVNode(stdin_default$
|
6702
|
+
const renderDay = (item, index) => createVNode(stdin_default$1g, {
|
6522
6703
|
"item": item,
|
6523
6704
|
"index": index,
|
6524
6705
|
"color": props2.color,
|
@@ -6530,7 +6711,7 @@ var stdin_default$1h = defineComponent({
|
|
6530
6711
|
const renderDays = () => createVNode("div", {
|
6531
6712
|
"ref": daysRef,
|
6532
6713
|
"role": "grid",
|
6533
|
-
"class": bem$
|
6714
|
+
"class": bem$13("days")
|
6534
6715
|
}, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
6535
6716
|
useExpose({
|
6536
6717
|
getTitle,
|
@@ -6540,14 +6721,14 @@ var stdin_default$1h = defineComponent({
|
|
6540
6721
|
disabledDays
|
6541
6722
|
});
|
6542
6723
|
return () => createVNode("div", {
|
6543
|
-
"class": bem$
|
6724
|
+
"class": bem$13("month"),
|
6544
6725
|
"ref": monthRef
|
6545
6726
|
}, [renderTitle(), renderDays()]);
|
6546
6727
|
}
|
6547
6728
|
});
|
6548
|
-
const [name$
|
6549
|
-
var stdin_default$
|
6550
|
-
name: name$
|
6729
|
+
const [name$14] = createNamespace("calendar-header");
|
6730
|
+
var stdin_default$1e = defineComponent({
|
6731
|
+
name: name$14,
|
6551
6732
|
props: {
|
6552
6733
|
date: Date,
|
6553
6734
|
minDate: Date,
|
@@ -6585,7 +6766,7 @@ var stdin_default$1g = defineComponent({
|
|
6585
6766
|
const text = props2.title || t$g("title");
|
6586
6767
|
const title = slots.title ? slots.title() : text;
|
6587
6768
|
return createVNode("div", {
|
6588
|
-
"class": bem$
|
6769
|
+
"class": bem$13("header-title")
|
6589
6770
|
}, [title]);
|
6590
6771
|
}
|
6591
6772
|
};
|
@@ -6602,7 +6783,7 @@ var stdin_default$1g = defineComponent({
|
|
6602
6783
|
const onMonthChange = () => onPanelChange((isNext ? getNextMonth : getPrevMonth)(props2.date));
|
6603
6784
|
const onYearChange = () => onPanelChange((isNext ? getNextYear : getPrevYear)(props2.date));
|
6604
6785
|
const MonthAction = createVNode("view", {
|
6605
|
-
"class": bem$
|
6786
|
+
"class": bem$13("header-action", {
|
6606
6787
|
disabled: monthDisabled
|
6607
6788
|
}),
|
6608
6789
|
"onClick": monthDisabled ? void 0 : onMonthChange
|
@@ -6615,7 +6796,7 @@ var stdin_default$1g = defineComponent({
|
|
6615
6796
|
"name": monthIconName
|
6616
6797
|
}, null)]);
|
6617
6798
|
const YearAction = showYearAction && createVNode("view", {
|
6618
|
-
"class": bem$
|
6799
|
+
"class": bem$13("header-action", {
|
6619
6800
|
disabled: yearDisabled
|
6620
6801
|
}),
|
6621
6802
|
"onClick": yearDisabled ? void 0 : onYearChange
|
@@ -6637,12 +6818,12 @@ var stdin_default$1g = defineComponent({
|
|
6637
6818
|
}) : props2.subtitle;
|
6638
6819
|
const canSwitch = props2.switchMode !== "none";
|
6639
6820
|
return createVNode("div", {
|
6640
|
-
"class": bem$
|
6821
|
+
"class": bem$13("header-subtitle", {
|
6641
6822
|
"with-swicth": canSwitch
|
6642
6823
|
}),
|
6643
6824
|
"onClick": onClickSubtitle
|
6644
6825
|
}, [canSwitch ? [renderAction(), createVNode("div", {
|
6645
|
-
"class": bem$
|
6826
|
+
"class": bem$13("header-subtitle-text")
|
6646
6827
|
}, [title]), renderAction(true)] : title]);
|
6647
6828
|
}
|
6648
6829
|
};
|
@@ -6653,13 +6834,13 @@ var stdin_default$1g = defineComponent({
|
|
6653
6834
|
const weekdays = t$g("weekdays");
|
6654
6835
|
const renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
|
6655
6836
|
return createVNode("div", {
|
6656
|
-
"class": bem$
|
6837
|
+
"class": bem$13("weekdays")
|
6657
6838
|
}, [renderWeekDays2.map((text) => createVNode("span", {
|
6658
|
-
"class": bem$
|
6839
|
+
"class": bem$13("weekday")
|
6659
6840
|
}, [text]))]);
|
6660
6841
|
};
|
6661
6842
|
return () => createVNode("div", {
|
6662
|
-
"class": bem$
|
6843
|
+
"class": bem$13("header")
|
6663
6844
|
}, [renderTitle(), renderSubtitle(), renderWeekDays()]);
|
6664
6845
|
}
|
6665
6846
|
});
|
@@ -6706,8 +6887,8 @@ const calendarProps = {
|
|
6706
6887
|
validator: (val) => val >= 0 && val <= 6
|
6707
6888
|
}
|
6708
6889
|
};
|
6709
|
-
var stdin_default$
|
6710
|
-
name: name$
|
6890
|
+
var stdin_default$1d = defineComponent({
|
6891
|
+
name: name$17,
|
6711
6892
|
props: calendarProps,
|
6712
6893
|
emits: ["select", "confirm", "unselect", "monthShow", "overRange", "update:show", "clickSubtitle", "clickDisabledDate", "panelChange"],
|
6713
6894
|
setup(props2, {
|
@@ -6997,7 +7178,7 @@ var stdin_default$1f = defineComponent({
|
|
6997
7178
|
const updateShow = (value) => emit("update:show", value);
|
6998
7179
|
const renderMonth = (date, index) => {
|
6999
7180
|
const showMonthTitle = index !== 0 || !props2.showSubtitle;
|
7000
|
-
return createVNode(stdin_default$
|
7181
|
+
return createVNode(stdin_default$1f, mergeProps({
|
7001
7182
|
"ref": canSwitch.value ? currentMonthRef : setMonthRefs(index),
|
7002
7183
|
"date": date,
|
7003
7184
|
"currentDate": currentDate.value,
|
@@ -7024,7 +7205,7 @@ var stdin_default$1f = defineComponent({
|
|
7024
7205
|
"block": true,
|
7025
7206
|
"type": "primary",
|
7026
7207
|
"color": props2.color,
|
7027
|
-
"class": bem$
|
7208
|
+
"class": bem$13("confirm"),
|
7028
7209
|
"disabled": disabled,
|
7029
7210
|
"nativeType": "button",
|
7030
7211
|
"onClick": onConfirm
|
@@ -7036,15 +7217,15 @@ var stdin_default$1f = defineComponent({
|
|
7036
7217
|
}
|
7037
7218
|
};
|
7038
7219
|
const renderFooter = () => createVNode("div", {
|
7039
|
-
"class": [bem$
|
7220
|
+
"class": [bem$13("footer"), {
|
7040
7221
|
"van-safe-area-bottom": props2.safeAreaInsetBottom
|
7041
7222
|
}]
|
7042
7223
|
}, [renderFooterButton()]);
|
7043
7224
|
const renderCalendar = () => {
|
7044
7225
|
var _a, _b;
|
7045
7226
|
return createVNode("div", {
|
7046
|
-
"class": bem$
|
7047
|
-
}, [createVNode(stdin_default$
|
7227
|
+
"class": bem$13()
|
7228
|
+
}, [createVNode(stdin_default$1e, {
|
7048
7229
|
"date": (_a = currentMonthRef.value) == null ? void 0 : _a.date,
|
7049
7230
|
"maxDate": maxDate.value,
|
7050
7231
|
"minDate": minDate.value,
|
@@ -7058,7 +7239,7 @@ var stdin_default$1f = defineComponent({
|
|
7058
7239
|
"onPanelChange": onPanelChange
|
7059
7240
|
}, pick(slots, ["title", "subtitle", "prev-month", "prev-year", "next-month", "next-year"])), createVNode("div", {
|
7060
7241
|
"ref": bodyRef,
|
7061
|
-
"class": bem$
|
7242
|
+
"class": bem$13("body"),
|
7062
7243
|
"onScroll": canSwitch.value ? void 0 : onScroll
|
7063
7244
|
}, [canSwitch.value ? renderMonth(currentPanelDate.value, 0) : months.value.map(renderMonth)]), renderFooter()]);
|
7064
7245
|
};
|
@@ -7078,7 +7259,7 @@ var stdin_default$1f = defineComponent({
|
|
7078
7259
|
if (props2.poppable) {
|
7079
7260
|
return createVNode(Popup, {
|
7080
7261
|
"show": props2.show,
|
7081
|
-
"class": bem$
|
7262
|
+
"class": bem$13("popup"),
|
7082
7263
|
"round": props2.round,
|
7083
7264
|
"position": props2.position,
|
7084
7265
|
"closeable": props2.showTitle || props2.showSubtitle,
|
@@ -7095,8 +7276,8 @@ var stdin_default$1f = defineComponent({
|
|
7095
7276
|
};
|
7096
7277
|
}
|
7097
7278
|
});
|
7098
|
-
const Calendar = withInstall(stdin_default$
|
7099
|
-
const [name$
|
7279
|
+
const Calendar = withInstall(stdin_default$1d);
|
7280
|
+
const [name$13, bem$12] = createNamespace("image");
|
7100
7281
|
const imageProps = {
|
7101
7282
|
src: String,
|
7102
7283
|
alt: String,
|
@@ -7117,8 +7298,8 @@ const imageProps = {
|
|
7117
7298
|
crossorigin: String,
|
7118
7299
|
referrerpolicy: String
|
7119
7300
|
};
|
7120
|
-
var stdin_default$
|
7121
|
-
name: name$
|
7301
|
+
var stdin_default$1c = defineComponent({
|
7302
|
+
name: name$13,
|
7122
7303
|
props: imageProps,
|
7123
7304
|
emits: ["load", "error"],
|
7124
7305
|
setup(props2, {
|
@@ -7179,13 +7360,13 @@ var stdin_default$1e = defineComponent({
|
|
7179
7360
|
const renderPlaceholder = () => {
|
7180
7361
|
if (loading.value && props2.showLoading) {
|
7181
7362
|
return createVNode("div", {
|
7182
|
-
"class": bem$
|
7183
|
-
}, [renderIcon(props2.loadingIcon, bem$
|
7363
|
+
"class": bem$12("loading")
|
7364
|
+
}, [renderIcon(props2.loadingIcon, bem$12("loading-icon"), slots.loading)]);
|
7184
7365
|
}
|
7185
7366
|
if (error.value && props2.showError) {
|
7186
7367
|
return createVNode("div", {
|
7187
|
-
"class": bem$
|
7188
|
-
}, [renderIcon(props2.errorIcon, bem$
|
7368
|
+
"class": bem$12("error")
|
7369
|
+
}, [renderIcon(props2.errorIcon, bem$12("error-icon"), slots.error)]);
|
7189
7370
|
}
|
7190
7371
|
};
|
7191
7372
|
const renderImage = () => {
|
@@ -7194,7 +7375,7 @@ var stdin_default$1e = defineComponent({
|
|
7194
7375
|
}
|
7195
7376
|
const attrs = {
|
7196
7377
|
alt: props2.alt,
|
7197
|
-
class: bem$
|
7378
|
+
class: bem$12("img"),
|
7198
7379
|
style: {
|
7199
7380
|
objectFit: props2.fit,
|
7200
7381
|
objectPosition: props2.position
|
@@ -7254,7 +7435,7 @@ var stdin_default$1e = defineComponent({
|
|
7254
7435
|
return () => {
|
7255
7436
|
var _a;
|
7256
7437
|
return createVNode("div", {
|
7257
|
-
"class": bem$
|
7438
|
+
"class": bem$12({
|
7258
7439
|
round: props2.round,
|
7259
7440
|
block: props2.block
|
7260
7441
|
}),
|
@@ -7263,8 +7444,8 @@ var stdin_default$1e = defineComponent({
|
|
7263
7444
|
};
|
7264
7445
|
}
|
7265
7446
|
});
|
7266
|
-
const Image$1 = withInstall(stdin_default$
|
7267
|
-
const [name$
|
7447
|
+
const Image$1 = withInstall(stdin_default$1c);
|
7448
|
+
const [name$12, bem$11] = createNamespace("card");
|
7268
7449
|
const cardProps = {
|
7269
7450
|
tag: String,
|
7270
7451
|
num: numericProp,
|
@@ -7278,8 +7459,8 @@ const cardProps = {
|
|
7278
7459
|
thumbLink: String,
|
7279
7460
|
originPrice: numericProp
|
7280
7461
|
};
|
7281
|
-
var stdin_default$
|
7282
|
-
name: name$
|
7462
|
+
var stdin_default$1b = defineComponent({
|
7463
|
+
name: name$12,
|
7283
7464
|
props: cardProps,
|
7284
7465
|
emits: ["clickThumb"],
|
7285
7466
|
setup(props2, {
|
@@ -7292,14 +7473,14 @@ var stdin_default$1d = defineComponent({
|
|
7292
7473
|
}
|
7293
7474
|
if (props2.title) {
|
7294
7475
|
return createVNode("div", {
|
7295
|
-
"class": [bem$
|
7476
|
+
"class": [bem$11("title"), "van-multi-ellipsis--l2"]
|
7296
7477
|
}, [props2.title]);
|
7297
7478
|
}
|
7298
7479
|
};
|
7299
7480
|
const renderThumbTag = () => {
|
7300
7481
|
if (slots.tag || props2.tag) {
|
7301
7482
|
return createVNode("div", {
|
7302
|
-
"class": bem$
|
7483
|
+
"class": bem$11("tag")
|
7303
7484
|
}, [slots.tag ? slots.tag() : createVNode(Tag, {
|
7304
7485
|
"mark": true,
|
7305
7486
|
"type": "primary"
|
@@ -7324,7 +7505,7 @@ var stdin_default$1d = defineComponent({
|
|
7324
7505
|
if (slots.thumb || props2.thumb) {
|
7325
7506
|
return createVNode("a", {
|
7326
7507
|
"href": props2.thumbLink,
|
7327
|
-
"class": bem$
|
7508
|
+
"class": bem$11("thumb"),
|
7328
7509
|
"onClick": (event) => emit("clickThumb", event)
|
7329
7510
|
}, [renderThumbImage(), renderThumbTag()]);
|
7330
7511
|
}
|
@@ -7335,19 +7516,19 @@ var stdin_default$1d = defineComponent({
|
|
7335
7516
|
}
|
7336
7517
|
if (props2.desc) {
|
7337
7518
|
return createVNode("div", {
|
7338
|
-
"class": [bem$
|
7519
|
+
"class": [bem$11("desc"), "van-ellipsis"]
|
7339
7520
|
}, [props2.desc]);
|
7340
7521
|
}
|
7341
7522
|
};
|
7342
7523
|
const renderPriceText = () => {
|
7343
7524
|
const priceArr = props2.price.toString().split(".");
|
7344
7525
|
return createVNode("div", null, [createVNode("span", {
|
7345
|
-
"class": bem$
|
7526
|
+
"class": bem$11("price-currency")
|
7346
7527
|
}, [props2.currency]), createVNode("span", {
|
7347
|
-
"class": bem$
|
7348
|
-
}, [priceArr[0]]), createTextVNode("."), createVNode("span", {
|
7349
|
-
"class": bem$
|
7350
|
-
}, [priceArr[1]])]);
|
7528
|
+
"class": bem$11("price-integer")
|
7529
|
+
}, [priceArr[0]]), priceArr.length > 1 && createVNode(Fragment, null, [createTextVNode("."), createVNode("span", {
|
7530
|
+
"class": bem$11("price-decimal")
|
7531
|
+
}, [priceArr[1]])])]);
|
7351
7532
|
};
|
7352
7533
|
return () => {
|
7353
7534
|
var _a, _b, _c;
|
@@ -7356,34 +7537,34 @@ var stdin_default$1d = defineComponent({
|
|
7356
7537
|
const showOriginPrice = slots["origin-price"] || isDef(props2.originPrice);
|
7357
7538
|
const showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
|
7358
7539
|
const Price = showPrice && createVNode("div", {
|
7359
|
-
"class": bem$
|
7540
|
+
"class": bem$11("price")
|
7360
7541
|
}, [slots.price ? slots.price() : renderPriceText()]);
|
7361
7542
|
const OriginPrice = showOriginPrice && createVNode("div", {
|
7362
|
-
"class": bem$
|
7543
|
+
"class": bem$11("origin-price")
|
7363
7544
|
}, [slots["origin-price"] ? slots["origin-price"]() : `${props2.currency} ${props2.originPrice}`]);
|
7364
7545
|
const Num = showNum && createVNode("div", {
|
7365
|
-
"class": bem$
|
7546
|
+
"class": bem$11("num")
|
7366
7547
|
}, [slots.num ? slots.num() : `x${props2.num}`]);
|
7367
7548
|
const Footer = slots.footer && createVNode("div", {
|
7368
|
-
"class": bem$
|
7549
|
+
"class": bem$11("footer")
|
7369
7550
|
}, [slots.footer()]);
|
7370
7551
|
const Bottom = showBottom && createVNode("div", {
|
7371
|
-
"class": bem$
|
7552
|
+
"class": bem$11("bottom")
|
7372
7553
|
}, [(_a = slots["price-top"]) == null ? void 0 : _a.call(slots), Price, OriginPrice, Num, (_b = slots.bottom) == null ? void 0 : _b.call(slots)]);
|
7373
7554
|
return createVNode("div", {
|
7374
|
-
"class": bem$
|
7555
|
+
"class": bem$11()
|
7375
7556
|
}, [createVNode("div", {
|
7376
|
-
"class": bem$
|
7557
|
+
"class": bem$11("header")
|
7377
7558
|
}, [renderThumb(), createVNode("div", {
|
7378
|
-
"class": bem$
|
7559
|
+
"class": bem$11("content", {
|
7379
7560
|
centered: props2.centered
|
7380
7561
|
})
|
7381
7562
|
}, [createVNode("div", null, [renderTitle(), renderDesc(), (_c = slots.tags) == null ? void 0 : _c.call(slots)]), Bottom])]), Footer]);
|
7382
7563
|
};
|
7383
7564
|
}
|
7384
7565
|
});
|
7385
|
-
const Card = withInstall(stdin_default$
|
7386
|
-
const [name$
|
7566
|
+
const Card = withInstall(stdin_default$1b);
|
7567
|
+
const [name$11, bem$10, t$f] = createNamespace("cascader");
|
7387
7568
|
const cascaderProps = {
|
7388
7569
|
title: String,
|
7389
7570
|
options: makeArrayProp(),
|
@@ -7396,8 +7577,8 @@ const cascaderProps = {
|
|
7396
7577
|
placeholder: String,
|
7397
7578
|
activeColor: String
|
7398
7579
|
};
|
7399
|
-
var stdin_default$
|
7400
|
-
name: name$
|
7580
|
+
var stdin_default$1a = defineComponent({
|
7581
|
+
name: name$11,
|
7401
7582
|
props: cascaderProps,
|
7402
7583
|
emits: ["close", "change", "finish", "clickTab", "update:modelValue"],
|
7403
7584
|
setup(props2, {
|
@@ -7506,12 +7687,12 @@ var stdin_default$1c = defineComponent({
|
|
7506
7687
|
title
|
7507
7688
|
}) => emit("clickTab", name2, title);
|
7508
7689
|
const renderHeader = () => props2.showHeader ? createVNode("div", {
|
7509
|
-
"class": bem$
|
7690
|
+
"class": bem$10("header")
|
7510
7691
|
}, [createVNode("h2", {
|
7511
|
-
"class": bem$
|
7692
|
+
"class": bem$10("title")
|
7512
7693
|
}, [slots.title ? slots.title() : props2.title]), props2.closeable ? createVNode(Icon, {
|
7513
7694
|
"name": props2.closeIcon,
|
7514
|
-
"class": [bem$
|
7695
|
+
"class": [bem$10("close-icon"), HAPTICS_FEEDBACK],
|
7515
7696
|
"onClick": onClose
|
7516
7697
|
}, null) : null]) : null;
|
7517
7698
|
const renderOption = (option, selectedOption, tabIndex) => {
|
@@ -7527,7 +7708,7 @@ var stdin_default$1c = defineComponent({
|
|
7527
7708
|
return createVNode("li", {
|
7528
7709
|
"ref": selected ? setSelectedElementRefs(tabIndex) : void 0,
|
7529
7710
|
"role": "menuitemradio",
|
7530
|
-
"class": [bem$
|
7711
|
+
"class": [bem$10("option", {
|
7531
7712
|
selected,
|
7532
7713
|
disabled
|
7533
7714
|
}), option.className],
|
@@ -7540,12 +7721,12 @@ var stdin_default$1c = defineComponent({
|
|
7540
7721
|
"onClick": () => onSelect(option, tabIndex)
|
7541
7722
|
}, [Text2, selected ? createVNode(Icon, {
|
7542
7723
|
"name": "success",
|
7543
|
-
"class": bem$
|
7724
|
+
"class": bem$10("selected-icon")
|
7544
7725
|
}, null) : null]);
|
7545
7726
|
};
|
7546
7727
|
const renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
|
7547
7728
|
"role": "menu",
|
7548
|
-
"class": bem$
|
7729
|
+
"class": bem$10("options")
|
7549
7730
|
}, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
|
7550
7731
|
const renderTab = (tab, tabIndex) => {
|
7551
7732
|
const {
|
@@ -7556,7 +7737,7 @@ var stdin_default$1c = defineComponent({
|
|
7556
7737
|
const title = selected ? selected[textKey] : placeholder;
|
7557
7738
|
return createVNode(Tab, {
|
7558
7739
|
"title": title,
|
7559
|
-
"titleClass": bem$
|
7740
|
+
"titleClass": bem$10("tab", {
|
7560
7741
|
unselected: !selected
|
7561
7742
|
})
|
7562
7743
|
}, {
|
@@ -7575,7 +7756,7 @@ var stdin_default$1c = defineComponent({
|
|
7575
7756
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7576
7757
|
"shrink": true,
|
7577
7758
|
"animated": true,
|
7578
|
-
"class": bem$
|
7759
|
+
"class": bem$10("tabs"),
|
7579
7760
|
"color": props2.activeColor,
|
7580
7761
|
"swipeable": props2.swipeable,
|
7581
7762
|
"onClickTab": onClickTab
|
@@ -7610,19 +7791,19 @@ var stdin_default$1c = defineComponent({
|
|
7610
7791
|
updateTabs();
|
7611
7792
|
});
|
7612
7793
|
return () => createVNode("div", {
|
7613
|
-
"class": bem$
|
7794
|
+
"class": bem$10()
|
7614
7795
|
}, [renderHeader(), renderTabs()]);
|
7615
7796
|
}
|
7616
7797
|
});
|
7617
|
-
const Cascader = withInstall(stdin_default$
|
7618
|
-
const [name$
|
7798
|
+
const Cascader = withInstall(stdin_default$1a);
|
7799
|
+
const [name$10, bem$$] = createNamespace("cell-group");
|
7619
7800
|
const cellGroupProps = {
|
7620
7801
|
title: String,
|
7621
7802
|
inset: Boolean,
|
7622
7803
|
border: truthProp
|
7623
7804
|
};
|
7624
|
-
var stdin_default$
|
7625
|
-
name: name$
|
7805
|
+
var stdin_default$19 = defineComponent({
|
7806
|
+
name: name$10,
|
7626
7807
|
inheritAttrs: false,
|
7627
7808
|
props: cellGroupProps,
|
7628
7809
|
setup(props2, {
|
@@ -7632,7 +7813,7 @@ var stdin_default$1b = defineComponent({
|
|
7632
7813
|
const renderGroup = () => {
|
7633
7814
|
var _a;
|
7634
7815
|
return createVNode("div", mergeProps({
|
7635
|
-
"class": [bem
|
7816
|
+
"class": [bem$$({
|
7636
7817
|
inset: props2.inset
|
7637
7818
|
}), {
|
7638
7819
|
[BORDER_TOP_BOTTOM]: props2.border && !props2.inset
|
@@ -7640,7 +7821,7 @@ var stdin_default$1b = defineComponent({
|
|
7640
7821
|
}, attrs, useScopeId()), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
7641
7822
|
};
|
7642
7823
|
const renderTitle = () => createVNode("div", {
|
7643
|
-
"class": bem
|
7824
|
+
"class": bem$$("title", {
|
7644
7825
|
inset: props2.inset
|
7645
7826
|
})
|
7646
7827
|
}, [slots.title ? slots.title() : props2.title]);
|
@@ -7652,153 +7833,7 @@ var stdin_default$1b = defineComponent({
|
|
7652
7833
|
};
|
7653
7834
|
}
|
7654
7835
|
});
|
7655
|
-
const CellGroup = withInstall(stdin_default$
|
7656
|
-
const [name$11, bem$10] = createNamespace("checkbox-group");
|
7657
|
-
const checkboxGroupProps = {
|
7658
|
-
max: numericProp,
|
7659
|
-
shape: makeStringProp("round"),
|
7660
|
-
disabled: Boolean,
|
7661
|
-
iconSize: numericProp,
|
7662
|
-
direction: String,
|
7663
|
-
modelValue: makeArrayProp(),
|
7664
|
-
checkedColor: String
|
7665
|
-
};
|
7666
|
-
const CHECKBOX_GROUP_KEY = Symbol(name$11);
|
7667
|
-
var stdin_default$1a = defineComponent({
|
7668
|
-
name: name$11,
|
7669
|
-
props: checkboxGroupProps,
|
7670
|
-
emits: ["change", "update:modelValue"],
|
7671
|
-
setup(props2, {
|
7672
|
-
emit,
|
7673
|
-
slots
|
7674
|
-
}) {
|
7675
|
-
const {
|
7676
|
-
children,
|
7677
|
-
linkChildren
|
7678
|
-
} = useChildren(CHECKBOX_GROUP_KEY);
|
7679
|
-
const updateValue = (value) => emit("update:modelValue", value);
|
7680
|
-
const toggleAll = (options = {}) => {
|
7681
|
-
if (typeof options === "boolean") {
|
7682
|
-
options = {
|
7683
|
-
checked: options
|
7684
|
-
};
|
7685
|
-
}
|
7686
|
-
const {
|
7687
|
-
checked,
|
7688
|
-
skipDisabled
|
7689
|
-
} = options;
|
7690
|
-
const checkedChildren = children.filter((item) => {
|
7691
|
-
if (!item.props.bindGroup) {
|
7692
|
-
return false;
|
7693
|
-
}
|
7694
|
-
if (item.props.disabled && skipDisabled) {
|
7695
|
-
return item.checked.value;
|
7696
|
-
}
|
7697
|
-
return checked != null ? checked : !item.checked.value;
|
7698
|
-
});
|
7699
|
-
const names = checkedChildren.map((item) => item.name);
|
7700
|
-
updateValue(names);
|
7701
|
-
};
|
7702
|
-
watch(() => props2.modelValue, (value) => emit("change", value));
|
7703
|
-
useExpose({
|
7704
|
-
toggleAll
|
7705
|
-
});
|
7706
|
-
useCustomFieldValue(() => props2.modelValue);
|
7707
|
-
linkChildren({
|
7708
|
-
props: props2,
|
7709
|
-
updateValue
|
7710
|
-
});
|
7711
|
-
return () => {
|
7712
|
-
var _a;
|
7713
|
-
return createVNode("div", {
|
7714
|
-
"class": bem$10([props2.direction])
|
7715
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
7716
|
-
};
|
7717
|
-
}
|
7718
|
-
});
|
7719
|
-
const [name$10, bem$$] = createNamespace("checkbox");
|
7720
|
-
const checkboxProps = extend({}, checkerProps, {
|
7721
|
-
shape: String,
|
7722
|
-
bindGroup: truthProp,
|
7723
|
-
indeterminate: {
|
7724
|
-
type: Boolean,
|
7725
|
-
default: null
|
7726
|
-
}
|
7727
|
-
});
|
7728
|
-
var stdin_default$19 = defineComponent({
|
7729
|
-
name: name$10,
|
7730
|
-
props: checkboxProps,
|
7731
|
-
emits: ["change", "update:modelValue"],
|
7732
|
-
setup(props2, {
|
7733
|
-
emit,
|
7734
|
-
slots
|
7735
|
-
}) {
|
7736
|
-
const {
|
7737
|
-
parent
|
7738
|
-
} = useParent(CHECKBOX_GROUP_KEY);
|
7739
|
-
const setParentValue = (checked2) => {
|
7740
|
-
const {
|
7741
|
-
name: name2
|
7742
|
-
} = props2;
|
7743
|
-
const {
|
7744
|
-
max,
|
7745
|
-
modelValue
|
7746
|
-
} = parent.props;
|
7747
|
-
const value = modelValue.slice();
|
7748
|
-
if (checked2) {
|
7749
|
-
const overlimit = max && value.length >= +max;
|
7750
|
-
if (!overlimit && !value.includes(name2)) {
|
7751
|
-
value.push(name2);
|
7752
|
-
if (props2.bindGroup) {
|
7753
|
-
parent.updateValue(value);
|
7754
|
-
}
|
7755
|
-
}
|
7756
|
-
} else {
|
7757
|
-
const index = value.indexOf(name2);
|
7758
|
-
if (index !== -1) {
|
7759
|
-
value.splice(index, 1);
|
7760
|
-
if (props2.bindGroup) {
|
7761
|
-
parent.updateValue(value);
|
7762
|
-
}
|
7763
|
-
}
|
7764
|
-
}
|
7765
|
-
};
|
7766
|
-
const checked = computed(() => {
|
7767
|
-
if (parent && props2.bindGroup) {
|
7768
|
-
return parent.props.modelValue.indexOf(props2.name) !== -1;
|
7769
|
-
}
|
7770
|
-
return !!props2.modelValue;
|
7771
|
-
});
|
7772
|
-
const toggle = (newValue = !checked.value) => {
|
7773
|
-
if (parent && props2.bindGroup) {
|
7774
|
-
setParentValue(newValue);
|
7775
|
-
} else {
|
7776
|
-
emit("update:modelValue", newValue);
|
7777
|
-
}
|
7778
|
-
if (props2.indeterminate !== null)
|
7779
|
-
emit("change", newValue);
|
7780
|
-
};
|
7781
|
-
watch(() => props2.modelValue, (value) => {
|
7782
|
-
if (props2.indeterminate === null)
|
7783
|
-
emit("change", value);
|
7784
|
-
});
|
7785
|
-
useExpose({
|
7786
|
-
toggle,
|
7787
|
-
props: props2,
|
7788
|
-
checked
|
7789
|
-
});
|
7790
|
-
useCustomFieldValue(() => props2.modelValue);
|
7791
|
-
return () => createVNode(stdin_default$1o, mergeProps({
|
7792
|
-
"bem": bem$$,
|
7793
|
-
"role": "checkbox",
|
7794
|
-
"parent": parent,
|
7795
|
-
"checked": checked.value,
|
7796
|
-
"onToggle": toggle
|
7797
|
-
}, props2), pick(slots, ["default", "icon"]));
|
7798
|
-
}
|
7799
|
-
});
|
7800
|
-
const Checkbox = withInstall(stdin_default$19);
|
7801
|
-
const CheckboxGroup = withInstall(stdin_default$1a);
|
7836
|
+
const CellGroup = withInstall(stdin_default$19);
|
7802
7837
|
const [name$$, bem$_] = createNamespace("circle");
|
7803
7838
|
let uid = 0;
|
7804
7839
|
const format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
@@ -10328,6 +10363,16 @@ var stdin_default$R = defineComponent({
|
|
10328
10363
|
useEventListener("touchmove", onTouchmove, {
|
10329
10364
|
target: rootRef
|
10330
10365
|
});
|
10366
|
+
const renderHeader = () => {
|
10367
|
+
if (slots.header) {
|
10368
|
+
return slots.header();
|
10369
|
+
}
|
10370
|
+
return createVNode("div", {
|
10371
|
+
"class": bem$I("header")
|
10372
|
+
}, [createVNode("div", {
|
10373
|
+
"class": bem$I("header-bar")
|
10374
|
+
}, null)]);
|
10375
|
+
};
|
10331
10376
|
return () => {
|
10332
10377
|
var _a;
|
10333
10378
|
return createVNode("div", {
|
@@ -10339,11 +10384,7 @@ var stdin_default$R = defineComponent({
|
|
10339
10384
|
"onTouchstartPassive": onTouchstart,
|
10340
10385
|
"onTouchend": onTouchend,
|
10341
10386
|
"onTouchcancel": onTouchend
|
10342
|
-
}, [createVNode("div", {
|
10343
|
-
"class": bem$I("header")
|
10344
|
-
}, [createVNode("div", {
|
10345
|
-
"class": bem$I("header-bar")
|
10346
|
-
}, null)]), createVNode("div", {
|
10387
|
+
}, [renderHeader(), createVNode("div", {
|
10347
10388
|
"class": bem$I("content"),
|
10348
10389
|
"ref": contentRef
|
10349
10390
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
@@ -14699,6 +14740,7 @@ var stdin_default$e = defineComponent({
|
|
14699
14740
|
"readonly": props2.disableInput,
|
14700
14741
|
"inputmode": props2.integer ? "numeric" : "decimal",
|
14701
14742
|
"placeholder": props2.placeholder,
|
14743
|
+
"autocomplete": "off",
|
14702
14744
|
"aria-valuemax": props2.max,
|
14703
14745
|
"aria-valuemin": props2.min,
|
14704
14746
|
"aria-valuenow": current2.value,
|
@@ -16999,7 +17041,7 @@ const Lazyload = {
|
|
16999
17041
|
});
|
17000
17042
|
}
|
17001
17043
|
};
|
17002
|
-
const version = "4.9.
|
17044
|
+
const version = "4.9.2";
|
17003
17045
|
function install(app) {
|
17004
17046
|
const components = [
|
17005
17047
|
ActionBar,
|