vant 4.8.11 → 4.9.1
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 +11 -8
- 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/calendar/Calendar.d.ts +16 -10
- package/es/calendar/Calendar.mjs +83 -53
- package/es/calendar/CalendarHeader.d.ts +16 -1
- package/es/calendar/CalendarHeader.mjs +71 -7
- package/es/calendar/CalendarMonth.d.ts +6 -24
- package/es/calendar/CalendarMonth.mjs +6 -4
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +11 -7
- package/es/calendar/types.d.ts +4 -0
- package/es/calendar/utils.d.ts +6 -0
- package/es/calendar/utils.mjs +20 -0
- package/es/floating-panel/FloatingPanel.mjs +11 -5
- package/es/highlight/Highlight.mjs +7 -0
- package/es/image-preview/ImagePreviewItem.mjs +2 -0
- package/es/index-bar/IndexBar.mjs +10 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/picker-group/PickerGroup.d.ts +13 -0
- package/es/picker-group/PickerGroup.mjs +5 -4
- package/es/picker-group/index.d.ts +9 -0
- package/es/stepper/Stepper.mjs +1 -0
- package/es/tabs/index.css +1 -1
- package/es/utils/basic.d.ts +1 -1
- 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/calendar/Calendar.d.ts +16 -10
- package/lib/calendar/Calendar.js +82 -52
- package/lib/calendar/CalendarHeader.d.ts +16 -1
- package/lib/calendar/CalendarHeader.js +68 -4
- package/lib/calendar/CalendarMonth.d.ts +6 -24
- package/lib/calendar/CalendarMonth.js +6 -4
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +11 -7
- package/lib/calendar/types.d.ts +4 -0
- package/lib/calendar/utils.d.ts +6 -0
- package/lib/calendar/utils.js +20 -0
- package/lib/floating-panel/FloatingPanel.js +11 -5
- package/lib/highlight/Highlight.js +7 -0
- package/lib/image-preview/ImagePreviewItem.js +2 -0
- package/lib/index-bar/IndexBar.js +10 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/picker-group/PickerGroup.d.ts +13 -0
- package/lib/picker-group/PickerGroup.js +4 -3
- package/lib/picker-group/index.d.ts +9 -0
- package/lib/stepper/Stepper.js +1 -0
- package/lib/tabs/index.css +1 -1
- package/lib/utils/basic.d.ts +1 -1
- package/lib/vant.cjs.js +516 -356
- package/lib/vant.es.js +516 -356
- package/lib/vant.js +518 -358
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +17 -17
@@ -125,6 +125,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
125
125
|
(0, import_use.useEventListener)("touchmove", onTouchmove, {
|
126
126
|
target: rootRef
|
127
127
|
});
|
128
|
+
const renderHeader = () => {
|
129
|
+
if (slots.header) {
|
130
|
+
return slots.header();
|
131
|
+
}
|
132
|
+
return (0, import_vue.createVNode)("div", {
|
133
|
+
"class": bem("header")
|
134
|
+
}, [(0, import_vue.createVNode)("div", {
|
135
|
+
"class": bem("header-bar")
|
136
|
+
}, null)]);
|
137
|
+
};
|
128
138
|
return () => {
|
129
139
|
var _a;
|
130
140
|
return (0, import_vue.createVNode)("div", {
|
@@ -136,11 +146,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
136
146
|
"onTouchstartPassive": onTouchstart,
|
137
147
|
"onTouchend": onTouchend,
|
138
148
|
"onTouchcancel": onTouchend
|
139
|
-
}, [(0, import_vue.createVNode)("div", {
|
140
|
-
"class": bem("header")
|
141
|
-
}, [(0, import_vue.createVNode)("div", {
|
142
|
-
"class": bem("header-bar")
|
143
|
-
}, null)]), (0, import_vue.createVNode)("div", {
|
149
|
+
}, [renderHeader(), (0, import_vue.createVNode)("div", {
|
144
150
|
"class": bem("content"),
|
145
151
|
"ref": contentRef
|
146
152
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
@@ -89,6 +89,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
89
89
|
return chunks2;
|
90
90
|
}, []);
|
91
91
|
const lastChunk = chunks[chunks.length - 1];
|
92
|
+
if (!lastChunk) {
|
93
|
+
chunks.push({
|
94
|
+
start: 0,
|
95
|
+
end: sourceString.length,
|
96
|
+
highlight: false
|
97
|
+
});
|
98
|
+
}
|
92
99
|
if (lastChunk && lastChunk.end < sourceString.length) {
|
93
100
|
chunks.push({
|
94
101
|
start: lastChunk.end,
|
@@ -213,6 +213,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
213
213
|
const checkClose = (event) => {
|
214
214
|
var _a;
|
215
215
|
const swipeItemEl = (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
216
|
+
if (!swipeItemEl)
|
217
|
+
return;
|
216
218
|
const imageEl = swipeItemEl.firstElementChild;
|
217
219
|
const isClickOverlay = event.target === swipeItemEl;
|
218
220
|
const isClickImage = imageEl == null ? void 0 : imageEl.contains(event.target);
|
@@ -108,7 +108,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
108
108
|
const match = getMatchAnchor(selectActiveIndex);
|
109
109
|
if (match) {
|
110
110
|
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
111
|
-
|
111
|
+
if (props.sticky && props.stickyOffsetTop) {
|
112
|
+
active = getActiveAnchor(rect.top - props.stickyOffsetTop, rects);
|
113
|
+
} else {
|
114
|
+
active = getActiveAnchor(rect.top, rects);
|
115
|
+
}
|
112
116
|
}
|
113
117
|
} else {
|
114
118
|
active = getActiveAnchor(scrollTop, rects);
|
@@ -181,7 +185,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
181
185
|
return;
|
182
186
|
}
|
183
187
|
if (props.sticky && props.stickyOffsetTop) {
|
184
|
-
|
188
|
+
if ((0, import_utils.getRootScrollTop)() === offsetHeight - scrollParentRect.height) {
|
189
|
+
(0, import_utils.setRootScrollTop)((0, import_utils.getRootScrollTop)());
|
190
|
+
} else {
|
191
|
+
(0, import_utils.setRootScrollTop)((0, import_utils.getRootScrollTop)() - props.stickyOffsetTop);
|
192
|
+
}
|
185
193
|
}
|
186
194
|
emit("select", match.index);
|
187
195
|
}
|