type ItemListType = { text : string, color : string, size : number }
props: {
simpleList: {
type: Array as PropType<string[]>,
default: () => []
},
itemList: {
type: Array as PropType<ItemListType[]>,
required: true
},
}
simpleList可以正常v-for循环,itemList循环不了,抛出异常error: java.lang.ClassCastException: uni.UNID206DCB.ItemListType1ReactiveObject cannot be cast to uni.UNID206DCB.ItemListType
1 个回复
l***@163.com (作者)
解决了,要使用UTSJSONObject[],貌似不能使用自定义的类型