一、父组件
<List :tableData="tableData"></List>
二、子组件
import { toRefs } from 'vue'
// 接收父组件的数据
const props = defineProps({
tableData: {
type: Array,
default: () => []
},
})
// 结构
const { tableData } = toRefs(props)
一、父组件
<List :tableData="tableData"></List>
二、子组件
import { toRefs } from 'vue'
// 接收父组件的数据
const props = defineProps({
tableData: {
type: Array,
default: () => []
},
})
// 结构
const { tableData } = toRefs(props)