mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
fix(SwitchCell): add deprecation warning (#7350)
This commit is contained in:
@@ -30,6 +30,12 @@ function SwitchCell(
|
|||||||
slots: DefaultSlots,
|
slots: DefaultSlots,
|
||||||
ctx: RenderContext<SwitchCellProps>
|
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 (
|
return (
|
||||||
<Cell
|
<Cell
|
||||||
center
|
center
|
||||||
|
Reference in New Issue
Block a user