baozhengrui

导航

vue3使用props传值

// 父级
<user1111Info :user="userForm" />

//子级
import { propTypes } from '@/utils/propTypes';

const props = defineProps({
  user: propTypes.any.isRequired
});
const userForm = computed(() => props.user);

posted on 2024-10-29 16:26  芮艺  阅读(4)  评论(0编辑  收藏  举报