fix(SwitchCell): add deprecation warning (#7350)

This commit is contained in:
neverland 2020-10-16 20:40:21 +08:00 committed by GitHub
parent b4f2f2f330
commit 3fc2af9842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,12 @@ function SwitchCell(
slots: DefaultSlots,
ctx: RenderContext<SwitchCellProps>
) {
if (process.env.NODE_ENV !== 'production') {
console.warn(
'[Vant] "SwitchCell" component is deprecated, see: https://youzan.github.io/vant/#/zh-CN/switch-cell.'
);
}
return (
<Cell
center