mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Cell): remove slot deprecation log (#9800)
This commit is contained in:
parent
113323cea2
commit
b08a3c0a61
@ -57,14 +57,6 @@ export default defineComponent({
|
|||||||
props: cellProps,
|
props: cellProps,
|
||||||
|
|
||||||
setup(props, { slots }) {
|
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 route = useRoute();
|
||||||
|
|
||||||
const renderLabel = () => {
|
const renderLabel = () => {
|
||||||
@ -94,8 +86,7 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderValue = () => {
|
const renderValue = () => {
|
||||||
// default slot is deprecated
|
// slots.default is an alias of slots.value
|
||||||
// should be removed in next major version
|
|
||||||
const slot = slots.value || slots.default;
|
const slot = slots.value || slots.default;
|
||||||
const hasValue = slot || isDef(props.value);
|
const hasValue = slot || isDef(props.value);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user