產(chǎn)生問題的出處
@Prop({
type: Object,
default: { picTypeNicNames: [], sriovTypeNicNames: [] };
}
})
private usedNicNameList!: any;
解決辦法 props傳遞數(shù)據(jù)的時候避咆,默認值如果是數(shù)組或者對象,應(yīng)該使用一個函數(shù)返回默認值
@Prop({
type: Object,
// Props with type Object/Array must use a factory function to return the default value.
default: () => {
return { picTypeNicNames: [], sriovTypeNicNames: [] };
}
})
private usedNicNameList!: any;