vant 4.8.3 → 4.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/picker/PickerToolbar.mjs +10 -2
- package/es/sticky/Sticky.mjs +1 -1
- package/lib/dropdown-menu/DropdownMenu.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/picker/PickerToolbar.js +10 -2
- package/lib/sticky/Sticky.js +1 -1
- package/lib/vant.cjs.js +13 -5
- package/lib/vant.es.js +14 -6
- package/lib/vant.js +13 -5
- package/lib/vant.min.js +2 -2
- package/lib/web-types.json +1 -1
- package/package.json +4 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { ref, computed, defineComponent } from "vue";
|
2
|
+
import { ref, computed, defineComponent, toRaw } from "vue";
|
3
3
|
import { isDef, truthProp, numericProp, windowHeight, makeStringProp, makeNumericProp, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
|
4
4
|
import { useId } from "../composables/use-id.mjs";
|
5
5
|
import { useExpose } from "../composables/use-expose.mjs";
|
@@ -84,7 +84,7 @@ var stdin_default = defineComponent({
|
|
84
84
|
const {
|
85
85
|
disabled,
|
86
86
|
titleClass
|
87
|
-
} = item;
|
87
|
+
} = toRaw(item.$props);
|
88
88
|
return _createVNode("div", {
|
89
89
|
"id": `${id}-${index}`,
|
90
90
|
"role": "button",
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
|
|
99
99
|
import { TreeSelect } from "./tree-select/index.mjs";
|
100
100
|
import { Uploader } from "./uploader/index.mjs";
|
101
101
|
import { Watermark } from "./watermark/index.mjs";
|
102
|
-
const version = "4.8.
|
102
|
+
const version = "4.8.4";
|
103
103
|
function install(app) {
|
104
104
|
const components = [
|
105
105
|
ActionBar,
|
@@ -31,7 +31,11 @@ var stdin_default = defineComponent({
|
|
31
31
|
const onCancel = () => emit("cancel");
|
32
32
|
const onConfirm = () => emit("confirm");
|
33
33
|
const renderCancel = () => {
|
34
|
-
|
34
|
+
var _a;
|
35
|
+
const text = (_a = props.cancelButtonText) != null ? _a : t("cancel");
|
36
|
+
if (!slots.cancel && !text) {
|
37
|
+
return;
|
38
|
+
}
|
35
39
|
return _createVNode("button", {
|
36
40
|
"type": "button",
|
37
41
|
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
@@ -39,7 +43,11 @@ var stdin_default = defineComponent({
|
|
39
43
|
}, [slots.cancel ? slots.cancel() : text]);
|
40
44
|
};
|
41
45
|
const renderConfirm = () => {
|
42
|
-
|
46
|
+
var _a;
|
47
|
+
const text = (_a = props.confirmButtonText) != null ? _a : t("confirm");
|
48
|
+
if (!slots.confirm && !text) {
|
49
|
+
return;
|
50
|
+
}
|
43
51
|
return _createVNode("button", {
|
44
52
|
"type": "button",
|
45
53
|
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
package/es/sticky/Sticky.mjs
CHANGED
@@ -81,7 +81,7 @@ var stdin_default = defineComponent({
|
|
81
81
|
if (container) {
|
82
82
|
const containerRect = useRect(container);
|
83
83
|
const difference = containerRect.bottom - offset.value - state.height;
|
84
|
-
state.fixed = offset.value
|
84
|
+
state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
|
85
85
|
state.transform = difference < 0 ? difference : 0;
|
86
86
|
} else {
|
87
87
|
state.fixed = offset.value > rootRect.top;
|
@@ -108,7 +108,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
108
108
|
const {
|
109
109
|
disabled,
|
110
110
|
titleClass
|
111
|
-
} = item;
|
111
|
+
} = (0, import_vue2.toRaw)(item.$props);
|
112
112
|
return (0, import_vue.createVNode)("div", {
|
113
113
|
"id": `${id}-${index}`,
|
114
114
|
"role": "button",
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
229
|
-
const version = "4.8.
|
229
|
+
const version = "4.8.4";
|
230
230
|
function install(app) {
|
231
231
|
const components = [
|
232
232
|
import_action_bar.ActionBar,
|
@@ -56,7 +56,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
56
56
|
const onCancel = () => emit("cancel");
|
57
57
|
const onConfirm = () => emit("confirm");
|
58
58
|
const renderCancel = () => {
|
59
|
-
|
59
|
+
var _a;
|
60
|
+
const text = (_a = props.cancelButtonText) != null ? _a : (0, import_utils.t)("cancel");
|
61
|
+
if (!slots.cancel && !text) {
|
62
|
+
return;
|
63
|
+
}
|
60
64
|
return (0, import_vue.createVNode)("button", {
|
61
65
|
"type": "button",
|
62
66
|
"class": [(0, import_utils.bem)("cancel"), import_utils2.HAPTICS_FEEDBACK],
|
@@ -64,7 +68,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
64
68
|
}, [slots.cancel ? slots.cancel() : text]);
|
65
69
|
};
|
66
70
|
const renderConfirm = () => {
|
67
|
-
|
71
|
+
var _a;
|
72
|
+
const text = (_a = props.confirmButtonText) != null ? _a : (0, import_utils.t)("confirm");
|
73
|
+
if (!slots.confirm && !text) {
|
74
|
+
return;
|
75
|
+
}
|
68
76
|
return (0, import_vue.createVNode)("button", {
|
69
77
|
"type": "button",
|
70
78
|
"class": [(0, import_utils.bem)("confirm"), import_utils2.HAPTICS_FEEDBACK],
|
package/lib/sticky/Sticky.js
CHANGED
@@ -104,7 +104,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
104
104
|
if (container) {
|
105
105
|
const containerRect = (0, import_use.useRect)(container);
|
106
106
|
const difference = containerRect.bottom - offset.value - state.height;
|
107
|
-
state.fixed = offset.value
|
107
|
+
state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
|
108
108
|
state.transform = difference < 0 ? difference : 0;
|
109
109
|
} else {
|
110
110
|
state.fixed = offset.value > rootRect.top;
|
package/lib/vant.cjs.js
CHANGED
@@ -1929,7 +1929,11 @@ var stdin_default$1H = vue.defineComponent({
|
|
1929
1929
|
const onCancel = () => emit("cancel");
|
1930
1930
|
const onConfirm = () => emit("confirm");
|
1931
1931
|
const renderCancel = () => {
|
1932
|
-
|
1932
|
+
var _a;
|
1933
|
+
const text = (_a = props2.cancelButtonText) != null ? _a : t$k("cancel");
|
1934
|
+
if (!slots.cancel && !text) {
|
1935
|
+
return;
|
1936
|
+
}
|
1933
1937
|
return vue.createVNode("button", {
|
1934
1938
|
"type": "button",
|
1935
1939
|
"class": [bem$1u("cancel"), HAPTICS_FEEDBACK],
|
@@ -1937,7 +1941,11 @@ var stdin_default$1H = vue.defineComponent({
|
|
1937
1941
|
}, [slots.cancel ? slots.cancel() : text]);
|
1938
1942
|
};
|
1939
1943
|
const renderConfirm = () => {
|
1940
|
-
|
1944
|
+
var _a;
|
1945
|
+
const text = (_a = props2.confirmButtonText) != null ? _a : t$k("confirm");
|
1946
|
+
if (!slots.confirm && !text) {
|
1947
|
+
return;
|
1948
|
+
}
|
1941
1949
|
return vue.createVNode("button", {
|
1942
1950
|
"type": "button",
|
1943
1951
|
"class": [bem$1u("confirm"), HAPTICS_FEEDBACK],
|
@@ -2131,7 +2139,7 @@ var stdin_default$1G = vue.defineComponent({
|
|
2131
2139
|
if (container) {
|
2132
2140
|
const containerRect = use.useRect(container);
|
2133
2141
|
const difference = containerRect.bottom - offset.value - state.height;
|
2134
|
-
state.fixed = offset.value
|
2142
|
+
state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
|
2135
2143
|
state.transform = difference < 0 ? difference : 0;
|
2136
2144
|
} else {
|
2137
2145
|
state.fixed = offset.value > rootRect.top;
|
@@ -9633,7 +9641,7 @@ var stdin_default$U = vue.defineComponent({
|
|
9633
9641
|
const {
|
9634
9642
|
disabled,
|
9635
9643
|
titleClass
|
9636
|
-
} = item;
|
9644
|
+
} = vue.toRaw(item.$props);
|
9637
9645
|
return vue.createVNode("div", {
|
9638
9646
|
"id": `${id}-${index}`,
|
9639
9647
|
"role": "button",
|
@@ -16768,7 +16776,7 @@ const Lazyload = {
|
|
16768
16776
|
});
|
16769
16777
|
}
|
16770
16778
|
};
|
16771
|
-
const version = "4.8.
|
16779
|
+
const version = "4.8.4";
|
16772
16780
|
function install(app) {
|
16773
16781
|
const components = [
|
16774
16782
|
ActionBar,
|
package/lib/vant.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, withDirectives, vShow, Teleport, Fragment, onBeforeUpdate, Comment, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, onUpdated, Text, h } from "vue";
|
1
|
+
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, withDirectives, vShow, Teleport, Fragment, onBeforeUpdate, Comment, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, toRaw, onUpdated, Text, h } from "vue";
|
2
2
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, cancelRaf, raf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
|
3
3
|
import { normalizeClass, stringifyStyle, normalizeStyle } from "@vue/shared";
|
4
4
|
import { offsetModifier, createPopper } from "@vant/popperjs";
|
@@ -1927,7 +1927,11 @@ var stdin_default$1H = defineComponent({
|
|
1927
1927
|
const onCancel = () => emit("cancel");
|
1928
1928
|
const onConfirm = () => emit("confirm");
|
1929
1929
|
const renderCancel = () => {
|
1930
|
-
|
1930
|
+
var _a;
|
1931
|
+
const text = (_a = props2.cancelButtonText) != null ? _a : t$k("cancel");
|
1932
|
+
if (!slots.cancel && !text) {
|
1933
|
+
return;
|
1934
|
+
}
|
1931
1935
|
return createVNode("button", {
|
1932
1936
|
"type": "button",
|
1933
1937
|
"class": [bem$1u("cancel"), HAPTICS_FEEDBACK],
|
@@ -1935,7 +1939,11 @@ var stdin_default$1H = defineComponent({
|
|
1935
1939
|
}, [slots.cancel ? slots.cancel() : text]);
|
1936
1940
|
};
|
1937
1941
|
const renderConfirm = () => {
|
1938
|
-
|
1942
|
+
var _a;
|
1943
|
+
const text = (_a = props2.confirmButtonText) != null ? _a : t$k("confirm");
|
1944
|
+
if (!slots.confirm && !text) {
|
1945
|
+
return;
|
1946
|
+
}
|
1939
1947
|
return createVNode("button", {
|
1940
1948
|
"type": "button",
|
1941
1949
|
"class": [bem$1u("confirm"), HAPTICS_FEEDBACK],
|
@@ -2129,7 +2137,7 @@ var stdin_default$1G = defineComponent({
|
|
2129
2137
|
if (container) {
|
2130
2138
|
const containerRect = useRect(container);
|
2131
2139
|
const difference = containerRect.bottom - offset.value - state.height;
|
2132
|
-
state.fixed = offset.value
|
2140
|
+
state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
|
2133
2141
|
state.transform = difference < 0 ? difference : 0;
|
2134
2142
|
} else {
|
2135
2143
|
state.fixed = offset.value > rootRect.top;
|
@@ -9631,7 +9639,7 @@ var stdin_default$U = defineComponent({
|
|
9631
9639
|
const {
|
9632
9640
|
disabled,
|
9633
9641
|
titleClass
|
9634
|
-
} = item;
|
9642
|
+
} = toRaw(item.$props);
|
9635
9643
|
return createVNode("div", {
|
9636
9644
|
"id": `${id}-${index}`,
|
9637
9645
|
"role": "button",
|
@@ -16766,7 +16774,7 @@ const Lazyload = {
|
|
16766
16774
|
});
|
16767
16775
|
}
|
16768
16776
|
};
|
16769
|
-
const version = "4.8.
|
16777
|
+
const version = "4.8.4";
|
16770
16778
|
function install(app) {
|
16771
16779
|
const components = [
|
16772
16780
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -2317,7 +2317,11 @@
|
|
2317
2317
|
const onCancel = () => emit("cancel");
|
2318
2318
|
const onConfirm = () => emit("confirm");
|
2319
2319
|
const renderCancel = () => {
|
2320
|
-
|
2320
|
+
var _a;
|
2321
|
+
const text = (_a = props2.cancelButtonText) != null ? _a : t$k("cancel");
|
2322
|
+
if (!slots.cancel && !text) {
|
2323
|
+
return;
|
2324
|
+
}
|
2321
2325
|
return vue.createVNode("button", {
|
2322
2326
|
"type": "button",
|
2323
2327
|
"class": [bem$1u("cancel"), HAPTICS_FEEDBACK],
|
@@ -2325,7 +2329,11 @@
|
|
2325
2329
|
}, [slots.cancel ? slots.cancel() : text]);
|
2326
2330
|
};
|
2327
2331
|
const renderConfirm = () => {
|
2328
|
-
|
2332
|
+
var _a;
|
2333
|
+
const text = (_a = props2.confirmButtonText) != null ? _a : t$k("confirm");
|
2334
|
+
if (!slots.confirm && !text) {
|
2335
|
+
return;
|
2336
|
+
}
|
2329
2337
|
return vue.createVNode("button", {
|
2330
2338
|
"type": "button",
|
2331
2339
|
"class": [bem$1u("confirm"), HAPTICS_FEEDBACK],
|
@@ -2599,7 +2607,7 @@
|
|
2599
2607
|
if (container) {
|
2600
2608
|
const containerRect = useRect(container);
|
2601
2609
|
const difference = containerRect.bottom - offset2.value - state.height;
|
2602
|
-
state.fixed = offset2.value
|
2610
|
+
state.fixed = offset2.value > rootRect.top && containerRect.bottom > 0;
|
2603
2611
|
state.transform = difference < 0 ? difference : 0;
|
2604
2612
|
} else {
|
2605
2613
|
state.fixed = offset2.value > rootRect.top;
|
@@ -10072,7 +10080,7 @@
|
|
10072
10080
|
const {
|
10073
10081
|
disabled,
|
10074
10082
|
titleClass
|
10075
|
-
} = item;
|
10083
|
+
} = vue.toRaw(item.$props);
|
10076
10084
|
return vue.createVNode("div", {
|
10077
10085
|
"id": `${id}-${index}`,
|
10078
10086
|
"role": "button",
|
@@ -17981,7 +17989,7 @@
|
|
17981
17989
|
});
|
17982
17990
|
}
|
17983
17991
|
};
|
17984
|
-
const version = "4.8.
|
17992
|
+
const version = "4.8.4";
|
17985
17993
|
function install(app) {
|
17986
17994
|
const components = [
|
17987
17995
|
ActionBar,
|