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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;