Invalid default value for prop "value": Props with type Object/Array must use a factory function to return the default value.(props default 數組/對象的默認值應當由一個工廠函數返回)
正確書寫方式
<script>
export default{
props:{
list:{
type: [Object,Array],
default: ()=>{}
},
arr:{
type: Array,
default: ()=>[]
},
obj:{
type: Object,
default: ()=>{}
}
}
}
<script>
