From b08a3c0a61f0b3570404341c59f0e2b38178b215 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Nov 2021 19:26:28 +0800 Subject: [PATCH] chore(Cell): remove slot deprecation log (#9800) --- packages/vant/src/cell/Cell.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/vant/src/cell/Cell.tsx b/packages/vant/src/cell/Cell.tsx index 5667c2732..2b734c743 100644 --- a/packages/vant/src/cell/Cell.tsx +++ b/packages/vant/src/cell/Cell.tsx @@ -57,14 +57,6 @@ export default defineComponent({ props: cellProps, setup(props, { slots }) { - if (process.env.NODE_ENV !== 'production') { - if (slots.default) { - console.warn( - '[Vant] Cell: "default" slot is deprecated, please use "value" slot instead.' - ); - } - } - const route = useRoute(); const renderLabel = () => { @@ -94,8 +86,7 @@ export default defineComponent({ }; const renderValue = () => { - // default slot is deprecated - // should be removed in next major version + // slots.default is an alias of slots.value const slot = slots.value || slots.default; const hasValue = slot || isDef(props.value);