父组件传值
<div>
<TableData :table-data="sTableData"></TableData>
</div>
子组件接收
<script setup lang="ts">
import {defineProps} from 'vue'
interface Props {
tableData?: any
}
const props = withDefaults(defineProps<Props>(), {
tableData: () => []
})
</script>
template直接props.tableData直接使用