From 4b4203daecb1bf2931077f973b025bcdd2ae64ad Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 15 Oct 2020 22:05:21 +0800 Subject: [PATCH] fix(Toast): add mask option deprecation warning (#7342) --- src/toast/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/toast/index.js b/src/toast/index.js index 3df45cdce..b00e0da8b 100644 --- a/src/toast/index.js +++ b/src/toast/index.js @@ -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;