chore(Cell): remove slot deprecation log (#9800)

This commit is contained in:
neverland 2021-11-04 19:26:28 +08:00 committed by GitHub
parent 113323cea2
commit b08a3c0a61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);