vant 4.6.6 → 4.6.7
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 +1 -1
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/address-edit/AddressEditDetail.d.ts +1 -1
- package/es/address-list/AddressList.d.ts +1 -1
- package/es/address-list/index.d.ts +1 -1
- package/es/button/Button.d.ts +2 -2
- package/es/button/index.d.ts +2 -2
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/index.d.ts +1 -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/checkbox/Checkbox.d.ts +13 -0
- package/es/checkbox/Checkbox.mjs +11 -2
- package/es/checkbox/Checker.d.ts +9 -0
- package/es/checkbox/Checker.mjs +10 -4
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.d.ts +9 -0
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/config-provider/ConfigProvider.d.ts +14 -0
- package/es/config-provider/ConfigProvider.mjs +30 -1
- package/es/config-provider/index.d.ts +10 -1
- package/es/contact-list/ContactList.d.ts +1 -1
- package/es/contact-list/index.d.ts +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/field/Field.d.ts +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/image/Image.d.ts +1 -1
- package/es/image/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/index.d.ts +2 -2
- package/es/popup/Popup.d.ts +1 -1
- package/es/popup/index.d.ts +1 -1
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/signature/Signature.d.ts +1 -1
- package/es/signature/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.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/space/Space.d.ts +4 -4
- package/es/space/index.d.ts +3 -3
- package/es/stepper/Stepper.d.ts +2 -2
- package/es/stepper/index.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/address-edit/AddressEditDetail.d.ts +1 -1
- package/lib/address-list/AddressList.d.ts +1 -1
- package/lib/address-list/index.d.ts +1 -1
- package/lib/button/Button.d.ts +2 -2
- package/lib/button/index.d.ts +2 -2
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -1
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/checkbox/Checkbox.d.ts +13 -0
- package/lib/checkbox/Checkbox.js +11 -2
- package/lib/checkbox/Checker.d.ts +9 -0
- package/lib/checkbox/Checker.js +10 -4
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.d.ts +9 -0
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +14 -0
- package/lib/config-provider/ConfigProvider.js +30 -1
- package/lib/config-provider/index.d.ts +10 -1
- package/lib/contact-list/ContactList.d.ts +1 -1
- package/lib/contact-list/index.d.ts +1 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/image/Image.d.ts +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/index.d.ts +2 -2
- package/lib/popup/Popup.d.ts +1 -1
- package/lib/popup/index.d.ts +1 -1
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/signature/Signature.d.ts +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/space/Space.d.ts +4 -4
- package/lib/space/index.d.ts +3 -3
- package/lib/stepper/Stepper.d.ts +2 -2
- package/lib/stepper/index.d.ts +2 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/vant.cjs.js +52 -8
- package/lib/vant.es.js +52 -8
- package/lib/vant.js +52 -8
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +17 -9
package/lib/vant.js
CHANGED
@@ -1017,6 +1017,7 @@
|
|
1017
1017
|
themeVars: Object,
|
1018
1018
|
themeVarsDark: Object,
|
1019
1019
|
themeVarsLight: Object,
|
1020
|
+
themeVarsScope: makeStringProp("local"),
|
1020
1021
|
iconPrefix: String
|
1021
1022
|
};
|
1022
1023
|
function mapThemeVarsToCSSVars(themeVars) {
|
@@ -1026,6 +1027,18 @@
|
|
1026
1027
|
});
|
1027
1028
|
return cssVars;
|
1028
1029
|
}
|
1030
|
+
function syncThemeVarsOnRoot(newStyle = {}, oldStyle = {}) {
|
1031
|
+
Object.keys(newStyle).forEach((key) => {
|
1032
|
+
if (newStyle[key] !== oldStyle[key]) {
|
1033
|
+
document.documentElement.style.setProperty(key, newStyle[key]);
|
1034
|
+
}
|
1035
|
+
});
|
1036
|
+
Object.keys(oldStyle).forEach((key) => {
|
1037
|
+
if (!newStyle[key]) {
|
1038
|
+
document.documentElement.style.removeProperty(key);
|
1039
|
+
}
|
1040
|
+
});
|
1041
|
+
}
|
1029
1042
|
var stdin_default$1R = vue.defineComponent({
|
1030
1043
|
name: name$1H,
|
1031
1044
|
props: configProviderProps,
|
@@ -1051,6 +1064,22 @@
|
|
1051
1064
|
vue.onActivated(addTheme);
|
1052
1065
|
vue.onDeactivated(removeTheme);
|
1053
1066
|
vue.onBeforeUnmount(removeTheme);
|
1067
|
+
vue.watch(style, (newStyle, oldStyle) => {
|
1068
|
+
if (props2.themeVarsScope === "global") {
|
1069
|
+
syncThemeVarsOnRoot(newStyle, oldStyle);
|
1070
|
+
}
|
1071
|
+
});
|
1072
|
+
vue.watch(() => props2.themeVarsScope, (newScope, oldScope) => {
|
1073
|
+
if (oldScope === "global") {
|
1074
|
+
syncThemeVarsOnRoot({}, style.value);
|
1075
|
+
}
|
1076
|
+
if (newScope === "global") {
|
1077
|
+
syncThemeVarsOnRoot(style.value, {});
|
1078
|
+
}
|
1079
|
+
});
|
1080
|
+
if (props2.themeVarsScope === "global") {
|
1081
|
+
syncThemeVarsOnRoot(style.value, {});
|
1082
|
+
}
|
1054
1083
|
}
|
1055
1084
|
vue.provide(CONFIG_PROVIDER_KEY, props2);
|
1056
1085
|
vue.watchEffect(() => {
|
@@ -1060,7 +1089,7 @@
|
|
1060
1089
|
});
|
1061
1090
|
return () => vue.createVNode(props2.tag, {
|
1062
1091
|
"class": bem$1C(),
|
1063
|
-
"style": style.value
|
1092
|
+
"style": props2.themeVarsScope === "local" ? style.value : void 0
|
1064
1093
|
}, {
|
1065
1094
|
default: () => {
|
1066
1095
|
var _a;
|
@@ -5774,7 +5803,11 @@
|
|
5774
5803
|
shape: String,
|
5775
5804
|
parent: Object,
|
5776
5805
|
checked: Boolean,
|
5777
|
-
bindGroup: truthProp
|
5806
|
+
bindGroup: truthProp,
|
5807
|
+
indeterminate: {
|
5808
|
+
type: Boolean,
|
5809
|
+
default: null
|
5810
|
+
}
|
5778
5811
|
}),
|
5779
5812
|
emits: ["click", "toggle"],
|
5780
5813
|
setup(props2, {
|
@@ -5828,14 +5861,16 @@
|
|
5828
5861
|
var _a, _b;
|
5829
5862
|
const {
|
5830
5863
|
bem: bem2,
|
5831
|
-
checked
|
5864
|
+
checked,
|
5865
|
+
indeterminate
|
5832
5866
|
} = props2;
|
5833
5867
|
const iconSize = props2.iconSize || getParentProp("iconSize");
|
5834
5868
|
return vue.createVNode("div", {
|
5835
5869
|
"ref": iconRef,
|
5836
5870
|
"class": bem2("icon", [shape.value, {
|
5837
5871
|
disabled: disabled.value,
|
5838
|
-
checked
|
5872
|
+
checked,
|
5873
|
+
indeterminate
|
5839
5874
|
}]),
|
5840
5875
|
"style": shape.value !== "dot" ? {
|
5841
5876
|
fontSize: addUnit(iconSize)
|
@@ -5848,7 +5883,7 @@
|
|
5848
5883
|
checked,
|
5849
5884
|
disabled: disabled.value
|
5850
5885
|
}) : shape.value !== "dot" ? vue.createVNode(Icon, {
|
5851
|
-
"name": "success",
|
5886
|
+
"name": indeterminate ? "minus" : "success",
|
5852
5887
|
"style": iconStyle.value
|
5853
5888
|
}, null) : vue.createVNode("div", {
|
5854
5889
|
"class": bem2("icon--dot__icon"),
|
@@ -7941,7 +7976,11 @@
|
|
7941
7976
|
const [name$$, bem$_] = createNamespace("checkbox");
|
7942
7977
|
const checkboxProps = extend({}, checkerProps, {
|
7943
7978
|
shape: String,
|
7944
|
-
bindGroup: truthProp
|
7979
|
+
bindGroup: truthProp,
|
7980
|
+
indeterminate: {
|
7981
|
+
type: Boolean,
|
7982
|
+
default: null
|
7983
|
+
}
|
7945
7984
|
});
|
7946
7985
|
var stdin_default$18 = vue.defineComponent({
|
7947
7986
|
name: name$$,
|
@@ -7993,8 +8032,13 @@
|
|
7993
8032
|
} else {
|
7994
8033
|
emit("update:modelValue", newValue);
|
7995
8034
|
}
|
8035
|
+
if (props2.indeterminate !== null)
|
8036
|
+
emit("change", newValue);
|
7996
8037
|
};
|
7997
|
-
vue.watch(() => props2.modelValue, (value) =>
|
8038
|
+
vue.watch(() => props2.modelValue, (value) => {
|
8039
|
+
if (props2.indeterminate === null)
|
8040
|
+
emit("change", value);
|
8041
|
+
});
|
7998
8042
|
useExpose({
|
7999
8043
|
toggle,
|
8000
8044
|
props: props2,
|
@@ -17623,7 +17667,7 @@
|
|
17623
17667
|
});
|
17624
17668
|
}
|
17625
17669
|
};
|
17626
|
-
const version = "4.6.
|
17670
|
+
const version = "4.6.7";
|
17627
17671
|
function install(app) {
|
17628
17672
|
const components = [
|
17629
17673
|
ActionBar,
|