From 3fc2af9842bd0ba5935f9a29a0594a4988e7ee4f Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 16 Oct 2020 20:40:21 +0800 Subject: [PATCH] fix(SwitchCell): add deprecation warning (#7350) --- src/switch-cell/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/switch-cell/index.tsx b/src/switch-cell/index.tsx index 21d3173b0..5d287be71 100644 --- a/src/switch-cell/index.tsx +++ b/src/switch-cell/index.tsx @@ -30,6 +30,12 @@ function SwitchCell( slots: DefaultSlots, ctx: RenderContext ) { + if (process.env.NODE_ENV !== 'production') { + console.warn( + '[Vant] "SwitchCell" component is deprecated, see: https://youzan.github.io/vant/#/zh-CN/switch-cell.' + ); + } + return (