父元件
<template> <person :list="personList" /> </template>
子元件用defineProps 來接收
const props = defineProps({ list: { type:Array, required:true, }, }); console.log(props.list);
父元件
<template> <person :list="personList" /> </template>
子元件用defineProps 來接收
const props = defineProps({ list: { type:Array, required:true, }, }); console.log(props.list);