fix(Toast): add mask option deprecation warning (#7342)

This commit is contained in:
neverland
2020-10-15 22:05:21 +08:00
committed by GitHub
parent e9247b9e7d
commit 4b4203daec

View File

@@ -97,6 +97,12 @@ function Toast(options = {}) {
...options,
};
if (process.env.NODE_ENV !== 'production' && options.mask) {
console.warn(
'[Vant] Toast: "mask" option is deprecated, use "overlay" option instead.'
);
}
options.clear = () => {
toast.value = false;