vant 4.0.0-beta.1 → 4.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.generated.md +46 -42
- package/es/action-bar/ActionBar.d.ts +1 -1
- package/es/action-bar/index.d.ts +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/index.d.ts +1 -1
- package/es/address-edit/style/index.mjs +7 -1
- package/es/area/Area.d.ts +6 -3
- package/es/area/index.d.ts +4 -2
- package/es/area/style/index.mjs +7 -0
- package/es/area/utils.mjs +9 -2
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +4 -3
- package/es/calendar/style/index.mjs +7 -1
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +4 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +1 -1
- package/es/config-provider/index.d.ts +1 -1
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +3 -3
- package/es/date-picker/DatePicker.d.ts +6 -3
- package/es/date-picker/DatePicker.mjs +10 -10
- package/es/date-picker/index.d.ts +4 -2
- package/es/date-picker/style/index.mjs +7 -0
- package/es/date-picker/utils.d.ts +2 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/field/Field.mjs +10 -3
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +10 -2
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +7 -3
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/Overlay.mjs +13 -6
- package/es/overlay/index.d.ts +1 -1
- package/es/picker/Picker.d.ts +8 -4
- package/es/picker/Picker.mjs +43 -67
- package/es/picker/PickerColumn.mjs +6 -2
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.d.ts +4 -2
- package/es/picker/style/index.mjs +7 -0
- package/es/picker/utils.d.ts +2 -0
- package/es/picker/utils.mjs +14 -7
- package/es/picker-group/PickerGroup.d.ts +39 -0
- package/es/picker-group/PickerGroup.mjs +57 -0
- package/es/picker-group/index.css +1 -0
- package/es/picker-group/index.d.ts +32 -0
- package/es/picker-group/index.mjs +8 -0
- package/es/picker-group/style/index.d.ts +1 -0
- package/es/picker-group/style/index.mjs +9 -0
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/index.d.ts +2 -2
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/rate/Rate.mjs +5 -3
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/slider/Slider.mjs +6 -2
- package/es/space/Space.d.ts +1 -1
- package/es/space/index.d.ts +1 -1
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/swipe/Swipe.mjs +13 -6
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.mjs +4 -2
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +6 -3
- package/es/time-picker/index.d.ts +4 -2
- package/es/time-picker/style/index.mjs +7 -0
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/lib/action-bar/ActionBar.d.ts +1 -1
- package/lib/action-bar/index.d.ts +1 -1
- package/lib/action-bar/index.js +4 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +1 -1
- package/lib/action-bar-button/index.js +4 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -1
- package/lib/action-bar-icon/index.js +4 -1
- package/lib/action-sheet/index.js +4 -1
- package/lib/address-edit/AddressEdit.js +4 -1
- package/lib/address-edit/index.js +4 -1
- package/lib/address-edit/style/index.js +7 -1
- package/lib/address-list/AddressList.js +4 -1
- package/lib/address-list/index.js +4 -1
- package/lib/area/Area.d.ts +6 -3
- package/lib/area/index.d.ts +4 -2
- package/lib/area/index.js +4 -1
- package/lib/area/style/index.js +7 -0
- package/lib/area/utils.js +9 -2
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.js +4 -1
- package/lib/button/index.js +4 -1
- package/lib/calendar/Calendar.js +8 -4
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.js +4 -1
- package/lib/calendar/style/index.js +7 -1
- package/lib/card/index.js +4 -1
- package/lib/cascader/index.js +4 -1
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell/index.js +4 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/cell-group/index.js +4 -1
- package/lib/checkbox/Checkbox.js +4 -1
- package/lib/checkbox/index.js +4 -1
- package/lib/checkbox-group/index.js +4 -1
- package/lib/circle/index.js +4 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/col/index.js +4 -1
- package/lib/collapse/index.js +4 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/index.js +4 -1
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +4 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.js +4 -1
- package/lib/contact-card/index.js +4 -1
- package/lib/contact-edit/index.js +4 -1
- package/lib/contact-list/index.js +4 -1
- package/lib/count-down/index.js +4 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +1 -1
- package/lib/coupon-cell/index.js +4 -1
- package/lib/coupon-list/index.js +4 -1
- package/lib/coupon-list/style/index.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +6 -3
- package/lib/date-picker/DatePicker.js +10 -10
- package/lib/date-picker/index.d.ts +4 -2
- package/lib/date-picker/index.js +4 -1
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/utils.d.ts +2 -1
- package/lib/dialog/function-call.js +4 -1
- package/lib/dialog/index.js +4 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/index.js +4 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/index.js +4 -1
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +4 -1
- package/lib/field/Field.js +9 -2
- package/lib/field/index.js +4 -1
- package/lib/form/index.js +4 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid/index.js +4 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/grid-item/index.js +4 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +4 -1
- package/lib/image/index.js +4 -1
- package/lib/image-preview/ImagePreview.js +4 -1
- package/lib/image-preview/ImagePreviewItem.js +9 -1
- package/lib/image-preview/function-call.js +4 -1
- package/lib/image-preview/index.js +4 -1
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-anchor/index.js +4 -1
- package/lib/index-bar/IndexBar.js +7 -3
- package/lib/index-bar/index.js +4 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/index.js +4 -1
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/index.js +4 -1
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/index.js +4 -1
- package/lib/notice-bar/index.js +4 -1
- package/lib/notify/function-call.js +4 -1
- package/lib/notify/index.js +4 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.js +4 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.js +4 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/Overlay.js +11 -4
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/index.js +4 -1
- package/lib/pagination/index.js +4 -1
- package/lib/password-input/index.js +4 -1
- package/lib/picker/Picker.d.ts +8 -4
- package/lib/picker/Picker.js +49 -70
- package/lib/picker/PickerColumn.js +5 -1
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.d.ts +4 -2
- package/lib/picker/index.js +4 -1
- package/lib/picker/style/index.js +7 -0
- package/lib/picker/utils.d.ts +2 -0
- package/lib/picker/utils.js +15 -8
- package/lib/picker-group/PickerGroup.d.ts +39 -0
- package/lib/picker-group/PickerGroup.js +82 -0
- package/lib/picker-group/index.css +1 -0
- package/lib/picker-group/index.d.ts +32 -0
- package/lib/picker-group/index.js +33 -0
- package/lib/picker-group/style/index.d.ts +1 -0
- package/lib/picker-group/style/index.js +9 -0
- package/lib/popover/index.js +4 -1
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/index.d.ts +2 -2
- package/lib/popup/index.js +4 -1
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +4 -1
- package/lib/pull-refresh/index.js +4 -1
- package/lib/radio/Radio.js +4 -1
- package/lib/radio/index.js +4 -1
- package/lib/radio-group/index.js +4 -1
- package/lib/rate/Rate.js +4 -2
- package/lib/rate/index.js +4 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/row/index.js +4 -1
- package/lib/search/index.js +4 -1
- package/lib/share-sheet/index.js +4 -1
- package/lib/sidebar/index.js +4 -1
- package/lib/sidebar-item/index.js +4 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.js +4 -1
- package/lib/slider/Slider.js +5 -1
- package/lib/slider/index.js +4 -1
- package/lib/space/Space.d.ts +1 -1
- package/lib/space/index.d.ts +1 -1
- package/lib/space/index.js +4 -1
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/index.js +4 -1
- package/lib/steps/index.js +4 -1
- package/lib/sticky/index.js +4 -1
- package/lib/submit-bar/index.js +4 -1
- package/lib/swipe/Swipe.js +12 -5
- package/lib/swipe/index.js +4 -1
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +3 -1
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/swipe-cell/index.js +4 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/index.js +4 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +4 -1
- package/lib/tabbar/index.js +4 -1
- package/lib/tabbar-item/index.js +4 -1
- package/lib/tabs/Tabs.js +4 -1
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.js +4 -1
- package/lib/tag/index.js +4 -1
- package/lib/time-picker/TimePicker.d.ts +6 -3
- package/lib/time-picker/index.d.ts +4 -2
- package/lib/time-picker/index.js +4 -1
- package/lib/time-picker/style/index.js +7 -0
- package/lib/toast/function-call.js +4 -1
- package/lib/toast/index.js +4 -1
- package/lib/tree-select/index.js +4 -1
- package/lib/uploader/Uploader.js +4 -1
- package/lib/uploader/index.js +4 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +4345 -4157
- package/lib/vant.es.js +4347 -4159
- package/lib/vant.js +4402 -4197
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +2088 -2034
- package/package.json +7 -7
@@ -5,13 +5,13 @@ import "../../cell/index.css";
|
|
5
5
|
import "../../field/index.css";
|
6
6
|
import "../../loading/index.css";
|
7
7
|
import "../../button/index.css";
|
8
|
-
import "../../checkbox-group/index.css";
|
9
|
-
import "../../checkbox/index.css";
|
10
|
-
import "../../coupon/index.css";
|
11
8
|
import "../../sticky/index.css";
|
12
9
|
import "../../swipe/index.css";
|
13
10
|
import "../../swipe-item/index.css";
|
14
11
|
import "../../tabs/index.css";
|
15
12
|
import "../../tab/index.css";
|
13
|
+
import "../../checkbox-group/index.css";
|
14
|
+
import "../../checkbox/index.css";
|
15
|
+
import "../../coupon/index.css";
|
16
16
|
import "../../empty/index.css";
|
17
17
|
import "../index.css";
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
export declare type DatePickerColumnType = 'year' | 'month' | 'day';
|
3
3
|
declare const datePickerProps: {
|
4
|
-
title: StringConstructor;
|
5
4
|
loading: BooleanConstructor;
|
6
5
|
readonly: BooleanConstructor;
|
7
6
|
allowHtml: BooleanConstructor;
|
@@ -21,6 +20,8 @@ declare const datePickerProps: {
|
|
21
20
|
type: (NumberConstructor | StringConstructor)[];
|
22
21
|
default: number;
|
23
22
|
};
|
23
|
+
} & {
|
24
|
+
title: StringConstructor;
|
24
25
|
cancelButtonText: StringConstructor;
|
25
26
|
confirmButtonText: StringConstructor;
|
26
27
|
} & {
|
@@ -51,7 +52,6 @@ declare const datePickerProps: {
|
|
51
52
|
};
|
52
53
|
export declare type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
|
53
54
|
declare const _default: import("vue").DefineComponent<{
|
54
|
-
title: StringConstructor;
|
55
55
|
loading: BooleanConstructor;
|
56
56
|
readonly: BooleanConstructor;
|
57
57
|
allowHtml: BooleanConstructor;
|
@@ -71,6 +71,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
71
71
|
type: (NumberConstructor | StringConstructor)[];
|
72
72
|
default: number;
|
73
73
|
};
|
74
|
+
} & {
|
75
|
+
title: StringConstructor;
|
74
76
|
cancelButtonText: StringConstructor;
|
75
77
|
confirmButtonText: StringConstructor;
|
76
78
|
} & {
|
@@ -99,7 +101,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
101
|
validator: (val: unknown) => val is Date;
|
100
102
|
};
|
101
103
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
102
|
-
title: StringConstructor;
|
103
104
|
loading: BooleanConstructor;
|
104
105
|
readonly: BooleanConstructor;
|
105
106
|
allowHtml: BooleanConstructor;
|
@@ -119,6 +120,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
119
120
|
type: (NumberConstructor | StringConstructor)[];
|
120
121
|
default: number;
|
121
122
|
};
|
123
|
+
} & {
|
124
|
+
title: StringConstructor;
|
122
125
|
cancelButtonText: StringConstructor;
|
123
126
|
confirmButtonText: StringConstructor;
|
124
127
|
} & {
|
@@ -35,7 +35,9 @@ var stdin_default = defineComponent({
|
|
35
35
|
const maxYear = props.maxDate.getFullYear();
|
36
36
|
return genOptions(minYear, maxYear, "year", props.formatter, props.filter);
|
37
37
|
};
|
38
|
+
const isMinYear = (year) => year === props.minDate.getFullYear();
|
38
39
|
const isMaxYear = (year) => year === props.maxDate.getFullYear();
|
40
|
+
const isMinMonth = (month) => month === props.minDate.getMonth() + 1;
|
39
41
|
const isMaxMonth = (month) => month === props.maxDate.getMonth() + 1;
|
40
42
|
const getValue = (type) => {
|
41
43
|
const {
|
@@ -57,19 +59,17 @@ var stdin_default = defineComponent({
|
|
57
59
|
}
|
58
60
|
};
|
59
61
|
const genMonthOptions = () => {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
return genOptions(
|
62
|
+
const year = getValue("year");
|
63
|
+
const minMonth = isMinYear(year) ? props.minDate.getMonth() + 1 : 1;
|
64
|
+
const maxMonth = isMaxYear(year) ? props.maxDate.getMonth() + 1 : 12;
|
65
|
+
return genOptions(minMonth, maxMonth, "month", props.formatter, props.filter);
|
64
66
|
};
|
65
67
|
const genDayOptions = () => {
|
66
68
|
const year = getValue("year");
|
67
69
|
const month = getValue("month");
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}
|
72
|
-
return genOptions(1, maxDate, "day", props.formatter, props.filter);
|
70
|
+
const minDate = isMinYear(year) && isMinMonth(month) ? props.minDate.getDate() : 1;
|
71
|
+
const maxDate = isMaxYear(year) && isMaxMonth(month) ? props.maxDate.getDate() : getMonthEndDay(year, month);
|
72
|
+
return genOptions(minDate, maxDate, "day", props.formatter, props.filter);
|
73
73
|
};
|
74
74
|
const columns = computed(() => props.columnsType.map((type) => {
|
75
75
|
switch (type) {
|
@@ -84,7 +84,7 @@ var stdin_default = defineComponent({
|
|
84
84
|
}
|
85
85
|
}));
|
86
86
|
watch(currentValues, (newValues) => {
|
87
|
-
if (isSameValue(newValues, props.modelValue)) {
|
87
|
+
if (!isSameValue(newValues, props.modelValue)) {
|
88
88
|
emit("update:modelValue", newValues);
|
89
89
|
}
|
90
90
|
});
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { DatePickerProps } from './DatePicker';
|
2
2
|
export declare const DatePicker: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
-
title: StringConstructor;
|
4
3
|
loading: BooleanConstructor;
|
5
4
|
readonly: BooleanConstructor;
|
6
5
|
allowHtml: BooleanConstructor;
|
@@ -20,6 +19,8 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
20
19
|
type: (NumberConstructor | StringConstructor)[];
|
21
20
|
default: number;
|
22
21
|
};
|
22
|
+
} & {
|
23
|
+
title: StringConstructor;
|
23
24
|
cancelButtonText: StringConstructor;
|
24
25
|
confirmButtonText: StringConstructor;
|
25
26
|
} & {
|
@@ -48,7 +49,6 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
48
49
|
validator: (val: unknown) => val is Date;
|
49
50
|
};
|
50
51
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
51
|
-
title: StringConstructor;
|
52
52
|
loading: BooleanConstructor;
|
53
53
|
readonly: BooleanConstructor;
|
54
54
|
allowHtml: BooleanConstructor;
|
@@ -68,6 +68,8 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
68
68
|
type: (NumberConstructor | StringConstructor)[];
|
69
69
|
default: number;
|
70
70
|
};
|
71
|
+
} & {
|
72
|
+
title: StringConstructor;
|
71
73
|
cancelButtonText: StringConstructor;
|
72
74
|
confirmButtonText: StringConstructor;
|
73
75
|
} & {
|
@@ -1,3 +1,10 @@
|
|
1
1
|
import "../../style/base.css";
|
2
|
+
import "../../badge/index.css";
|
2
3
|
import "../../loading/index.css";
|
4
|
+
import "../../sticky/index.css";
|
5
|
+
import "../../swipe/index.css";
|
6
|
+
import "../../swipe-item/index.css";
|
7
|
+
import "../../tabs/index.css";
|
8
|
+
import "../../tab/index.css";
|
3
9
|
import "../../picker/index.css";
|
10
|
+
import "../../picker-group/index.css";
|
@@ -3,7 +3,6 @@ import type { PickerOption } from '../picker';
|
|
3
3
|
declare type Filter = (columnType: string, options: PickerOption[]) => PickerOption[];
|
4
4
|
declare type Formatter = (type: string, option: PickerOption) => PickerOption;
|
5
5
|
export declare const sharedProps: {
|
6
|
-
title: StringConstructor;
|
7
6
|
loading: BooleanConstructor;
|
8
7
|
readonly: BooleanConstructor;
|
9
8
|
allowHtml: BooleanConstructor;
|
@@ -23,6 +22,8 @@ export declare const sharedProps: {
|
|
23
22
|
type: (NumberConstructor | StringConstructor)[];
|
24
23
|
default: number;
|
25
24
|
};
|
25
|
+
} & {
|
26
|
+
title: StringConstructor;
|
26
27
|
cancelButtonText: StringConstructor;
|
27
28
|
confirmButtonText: StringConstructor;
|
28
29
|
} & {
|
package/es/divider/Divider.d.ts
CHANGED
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
22
22
|
type: import("vue").PropType<DividerContentPosition>;
|
23
23
|
default: DividerContentPosition;
|
24
24
|
};
|
25
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
26
26
|
dashed: BooleanConstructor;
|
27
27
|
hairline: {
|
28
28
|
type: BooleanConstructor;
|
package/es/divider/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ export declare const Divider: import("../utils").WithInstall<import("vue").Defin
|
|
8
8
|
type: import("vue").PropType<import("./Divider").DividerContentPosition>;
|
9
9
|
default: import("./Divider").DividerContentPosition;
|
10
10
|
};
|
11
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
11
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
12
12
|
dashed: BooleanConstructor;
|
13
13
|
hairline: {
|
14
14
|
type: BooleanConstructor;
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
};
|
31
31
|
modelValue: PropType<unknown>;
|
32
32
|
titleClass: PropType<unknown>;
|
33
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "
|
33
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "open" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
34
34
|
title: StringConstructor;
|
35
35
|
options: {
|
36
36
|
type: PropType<DropdownItemOption[]>;
|
@@ -47,8 +47,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
47
47
|
}>> & {
|
48
48
|
onChange?: ((...args: any[]) => any) | undefined;
|
49
49
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
50
|
-
onOpen?: ((...args: any[]) => any) | undefined;
|
51
50
|
onClose?: ((...args: any[]) => any) | undefined;
|
51
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
52
52
|
onOpened?: ((...args: any[]) => any) | undefined;
|
53
53
|
onClosed?: ((...args: any[]) => any) | undefined;
|
54
54
|
}, {
|
@@ -13,7 +13,7 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
|
|
13
13
|
};
|
14
14
|
modelValue: import("vue").PropType<unknown>;
|
15
15
|
titleClass: import("vue").PropType<unknown>;
|
16
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "
|
16
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "open" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
17
17
|
title: StringConstructor;
|
18
18
|
options: {
|
19
19
|
type: import("vue").PropType<import("./types").DropdownItemOption[]>;
|
@@ -30,8 +30,8 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
|
|
30
30
|
}>> & {
|
31
31
|
onChange?: ((...args: any[]) => any) | undefined;
|
32
32
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
33
|
-
onOpen?: ((...args: any[]) => any) | undefined;
|
34
33
|
onClose?: ((...args: any[]) => any) | undefined;
|
34
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
35
35
|
onOpened?: ((...args: any[]) => any) | undefined;
|
36
36
|
onClosed?: ((...args: any[]) => any) | undefined;
|
37
37
|
}, {
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
49
49
|
type: BooleanConstructor;
|
50
50
|
default: true;
|
51
51
|
};
|
52
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
52
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
53
53
|
overlay: {
|
54
54
|
type: BooleanConstructor;
|
55
55
|
default: true;
|
@@ -22,7 +22,7 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
|
|
22
22
|
type: BooleanConstructor;
|
23
23
|
default: true;
|
24
24
|
};
|
25
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
26
26
|
overlay: {
|
27
27
|
type: BooleanConstructor;
|
28
28
|
default: true;
|
package/es/empty/Empty.d.ts
CHANGED
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
16
|
};
|
17
17
|
imageSize: PropType<Numeric | [Numeric, Numeric]>;
|
18
18
|
description: StringConstructor;
|
19
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
19
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
20
20
|
image: {
|
21
21
|
type: PropType<string>;
|
22
22
|
default: string;
|
package/es/empty/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
|
|
5
5
|
};
|
6
6
|
imageSize: import("vue").PropType<import("../utils").Numeric | [import("../utils").Numeric, import("../utils").Numeric]>;
|
7
7
|
description: StringConstructor;
|
8
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
8
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
9
|
image: {
|
10
10
|
type: import("vue").PropType<string>;
|
11
11
|
default: string;
|
package/es/field/Field.mjs
CHANGED
@@ -3,7 +3,7 @@ import { ref, watch, provide, computed, nextTick, reactive, onMounted, defineCom
|
|
3
3
|
import { isDef, extend, addUnit, toArray, FORM_KEY, numericProp, unknownProp, resetScroll, formatNumber, preventDefault, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { cutString, runSyncRule, endComposing, mapInputType, isEmptyValue, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from "./utils.mjs";
|
5
5
|
import { cellSharedProps } from "../cell/Cell.mjs";
|
6
|
-
import {
|
6
|
+
import { useParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY } from "@vant/use";
|
7
7
|
import { useId } from "../composables/use-id.mjs";
|
8
8
|
import { useExpose } from "../composables/use-expose.mjs";
|
9
9
|
import { Icon } from "../icon/index.mjs";
|
@@ -70,6 +70,7 @@ var stdin_default = defineComponent({
|
|
70
70
|
validateMessage: ""
|
71
71
|
});
|
72
72
|
const inputRef = ref();
|
73
|
+
const clearIconRef = ref();
|
73
74
|
const customValue = ref();
|
74
75
|
const {
|
75
76
|
parent: form
|
@@ -385,9 +386,9 @@ var stdin_default = defineComponent({
|
|
385
386
|
const renderFieldBody = () => [_createVNode("div", {
|
386
387
|
"class": bem("body")
|
387
388
|
}, [renderInput(), showClear.value && _createVNode(Icon, {
|
389
|
+
"ref": clearIconRef,
|
388
390
|
"name": props.clearIcon,
|
389
|
-
"class": bem("clear")
|
390
|
-
"onTouchstart": onClear
|
391
|
+
"class": bem("clear")
|
391
392
|
}, null), renderRightIcon(), slots.button && _createVNode("div", {
|
392
393
|
"class": bem("button")
|
393
394
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
@@ -414,6 +415,12 @@ var stdin_default = defineComponent({
|
|
414
415
|
updateValue(getModelValue(), props.formatTrigger);
|
415
416
|
nextTick(adjustTextareaSize);
|
416
417
|
});
|
418
|
+
useEventListener("touchstart", onClear, {
|
419
|
+
target: computed(() => {
|
420
|
+
var _a;
|
421
|
+
return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
|
422
|
+
})
|
423
|
+
});
|
417
424
|
return () => {
|
418
425
|
const disabled = getProp("disabled");
|
419
426
|
const labelAlign = getProp("labelAlign");
|
package/es/grid/Grid.d.ts
CHANGED
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
44
|
type: (NumberConstructor | StringConstructor)[];
|
45
45
|
default: number;
|
46
46
|
};
|
47
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
47
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
48
48
|
square: BooleanConstructor;
|
49
49
|
center: {
|
50
50
|
type: BooleanConstructor;
|
package/es/grid/index.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
|
|
17
17
|
type: (NumberConstructor | StringConstructor)[];
|
18
18
|
default: number;
|
19
19
|
};
|
20
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
20
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
21
|
square: BooleanConstructor;
|
22
22
|
center: {
|
23
23
|
type: BooleanConstructor;
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
26
26
|
iconColor: StringConstructor;
|
27
27
|
iconPrefix: StringConstructor;
|
28
28
|
badgeProps: PropType<Partial<BadgeProps>>;
|
29
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
29
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
30
30
|
to: PropType<import("vue-router").RouteLocationRaw>;
|
31
31
|
url: StringConstructor;
|
32
32
|
replace: BooleanConstructor;
|
package/es/grid-item/index.d.ts
CHANGED
@@ -10,7 +10,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
|
|
10
10
|
iconColor: StringConstructor;
|
11
11
|
iconPrefix: StringConstructor;
|
12
12
|
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
|
13
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
13
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
14
|
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
|
15
15
|
url: StringConstructor;
|
16
16
|
replace: BooleanConstructor;
|
package/es/icon/Icon.d.ts
CHANGED
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
26
26
|
color: StringConstructor;
|
27
27
|
badgeProps: PropType<Partial<BadgeProps>>;
|
28
28
|
classPrefix: StringConstructor;
|
29
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
29
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
30
30
|
dot: BooleanConstructor;
|
31
31
|
tag: {
|
32
32
|
type: PropType<keyof HTMLElementTagNameMap>;
|
package/es/icon/index.d.ts
CHANGED
@@ -10,7 +10,7 @@ export declare const Icon: import("../utils").WithInstall<import("vue").DefineCo
|
|
10
10
|
color: StringConstructor;
|
11
11
|
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
|
12
12
|
classPrefix: StringConstructor;
|
13
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
14
|
dot: BooleanConstructor;
|
15
15
|
tag: {
|
16
16
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { watch, computed, reactive, defineComponent } from "vue";
|
2
|
+
import { ref, watch, computed, reactive, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { useTouch } from "../composables/use-touch.mjs";
|
5
|
+
import { useEventListener } from "@vant/use";
|
5
6
|
import { Image } from "../image/index.mjs";
|
6
7
|
import { Loading } from "../loading/index.mjs";
|
7
8
|
import { SwipeItem } from "../swipe-item/index.mjs";
|
@@ -32,6 +33,7 @@ var stdin_default = defineComponent({
|
|
32
33
|
displayHeight: 0
|
33
34
|
});
|
34
35
|
const touch = useTouch();
|
36
|
+
const swipeItem = ref();
|
35
37
|
const vertical = computed(() => {
|
36
38
|
const {
|
37
39
|
rootWidth,
|
@@ -217,6 +219,12 @@ var stdin_default = defineComponent({
|
|
217
219
|
resetScale();
|
218
220
|
}
|
219
221
|
});
|
222
|
+
useEventListener("touchmove", onTouchMove, {
|
223
|
+
target: computed(() => {
|
224
|
+
var _a;
|
225
|
+
return (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
226
|
+
})
|
227
|
+
});
|
220
228
|
return () => {
|
221
229
|
const imageSlots = {
|
222
230
|
loading: () => _createVNode(Loading, {
|
@@ -224,9 +232,9 @@ var stdin_default = defineComponent({
|
|
224
232
|
}, null)
|
225
233
|
};
|
226
234
|
return _createVNode(SwipeItem, {
|
235
|
+
"ref": swipeItem,
|
227
236
|
"class": bem("swipe-item"),
|
228
237
|
"onTouchstartPassive": onTouchStart,
|
229
|
-
"onTouchmove": onTouchMove,
|
230
238
|
"onTouchend": onTouchEnd,
|
231
239
|
"onTouchcancel": onTouchEnd
|
232
240
|
}, {
|
@@ -5,7 +5,7 @@ declare const indexAnchorProps: {
|
|
5
5
|
export declare type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
7
7
|
index: (NumberConstructor | StringConstructor)[];
|
8
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
8
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
9
9
|
index: (NumberConstructor | StringConstructor)[];
|
10
10
|
}>>, {}>;
|
11
11
|
export default _default;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
2
|
index: (NumberConstructor | StringConstructor)[];
|
3
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
3
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
4
4
|
index: (NumberConstructor | StringConstructor)[];
|
5
5
|
}>>, {}>>;
|
6
6
|
export default IndexAnchor;
|
@@ -31,6 +31,7 @@ var stdin_default = defineComponent({
|
|
31
31
|
slots
|
32
32
|
}) {
|
33
33
|
const root = ref();
|
34
|
+
const sidebar = ref();
|
34
35
|
const activeAnchor = ref("");
|
35
36
|
const touch = useTouch();
|
36
37
|
const scrollParent = useScrollParent(root);
|
@@ -150,11 +151,11 @@ var stdin_default = defineComponent({
|
|
150
151
|
const {
|
151
152
|
offsetHeight
|
152
153
|
} = document.documentElement;
|
154
|
+
match.$el.scrollIntoView();
|
153
155
|
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
154
156
|
onScroll();
|
155
157
|
return;
|
156
158
|
}
|
157
|
-
match.$el.scrollIntoView();
|
158
159
|
if (props.sticky && props.stickyOffsetTop) {
|
159
160
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
160
161
|
}
|
@@ -194,15 +195,18 @@ var stdin_default = defineComponent({
|
|
194
195
|
}
|
195
196
|
};
|
196
197
|
const renderSidebar = () => _createVNode("div", {
|
198
|
+
"ref": sidebar,
|
197
199
|
"class": bem("sidebar"),
|
198
200
|
"style": sidebarStyle.value,
|
199
201
|
"onClick": onClickSidebar,
|
200
|
-
"onTouchstartPassive": touch.start
|
201
|
-
"onTouchmove": onTouchMove
|
202
|
+
"onTouchstartPassive": touch.start
|
202
203
|
}, [renderIndexes()]);
|
203
204
|
useExpose({
|
204
205
|
scrollTo
|
205
206
|
});
|
207
|
+
useEventListener("touchmove", onTouchMove, {
|
208
|
+
target: sidebar
|
209
|
+
});
|
206
210
|
return () => {
|
207
211
|
var _a;
|
208
212
|
return _createVNode("div", {
|
package/es/index.d.ts
CHANGED
@@ -53,6 +53,7 @@ export * from "./overlay";
|
|
53
53
|
export * from "./pagination";
|
54
54
|
export * from "./password-input";
|
55
55
|
export * from "./picker";
|
56
|
+
export * from "./picker-group";
|
56
57
|
export * from "./popover";
|
57
58
|
export * from "./popup";
|
58
59
|
export * from "./progress";
|
@@ -92,4 +93,4 @@ declare namespace _default {
|
|
92
93
|
}
|
93
94
|
export default _default;
|
94
95
|
export function install(app: any): void;
|
95
|
-
export const version: "4.0.0-
|
96
|
+
export const version: "4.0.0-rc.0";
|
package/es/index.mjs
CHANGED
@@ -52,6 +52,7 @@ import { Overlay } from "./overlay/index.mjs";
|
|
52
52
|
import { Pagination } from "./pagination/index.mjs";
|
53
53
|
import { PasswordInput } from "./password-input/index.mjs";
|
54
54
|
import { Picker } from "./picker/index.mjs";
|
55
|
+
import { PickerGroup } from "./picker-group/index.mjs";
|
55
56
|
import { Popover } from "./popover/index.mjs";
|
56
57
|
import { Popup } from "./popup/index.mjs";
|
57
58
|
import { Progress } from "./progress/index.mjs";
|
@@ -85,7 +86,7 @@ import { TimePicker } from "./time-picker/index.mjs";
|
|
85
86
|
import { Toast } from "./toast/index.mjs";
|
86
87
|
import { TreeSelect } from "./tree-select/index.mjs";
|
87
88
|
import { Uploader } from "./uploader/index.mjs";
|
88
|
-
const version = "4.0.0-
|
89
|
+
const version = "4.0.0-rc.0";
|
89
90
|
function install(app) {
|
90
91
|
const components = [
|
91
92
|
ActionBar,
|
@@ -142,6 +143,7 @@ function install(app) {
|
|
142
143
|
Pagination,
|
143
144
|
PasswordInput,
|
144
145
|
Picker,
|
146
|
+
PickerGroup,
|
145
147
|
Popover,
|
146
148
|
Popup,
|
147
149
|
Progress,
|
@@ -239,6 +241,7 @@ export * from "./overlay/index.mjs";
|
|
239
241
|
export * from "./pagination/index.mjs";
|
240
242
|
export * from "./password-input/index.mjs";
|
241
243
|
export * from "./picker/index.mjs";
|
244
|
+
export * from "./picker-group/index.mjs";
|
242
245
|
export * from "./popover/index.mjs";
|
243
246
|
export * from "./popup/index.mjs";
|
244
247
|
export * from "./progress/index.mjs";
|
@@ -9,7 +9,10 @@ var stdin_default = (lazy) => ({
|
|
9
9
|
},
|
10
10
|
emits: ["show"],
|
11
11
|
render() {
|
12
|
-
return h(
|
12
|
+
return h(
|
13
|
+
this.tag,
|
14
|
+
this.show && this.$slots.default ? this.$slots.default() : null
|
15
|
+
);
|
13
16
|
},
|
14
17
|
data() {
|
15
18
|
return {
|
@@ -17,13 +17,17 @@ class LazyContainer {
|
|
17
17
|
this.options = Object.assign({}, defaultOptions, binding.value);
|
18
18
|
const imgs = this.getImgs();
|
19
19
|
imgs.forEach((el2) => {
|
20
|
-
this.lazy.add(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
this.lazy.add(
|
21
|
+
el2,
|
22
|
+
Object.assign({}, this.binding, {
|
23
|
+
value: {
|
24
|
+
src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
|
25
|
+
error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
|
26
|
+
loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
|
27
|
+
}
|
28
|
+
}),
|
29
|
+
this.vnode
|
30
|
+
);
|
27
31
|
});
|
28
32
|
}
|
29
33
|
getImgs() {
|