1、immediate 写错位置 哭晕
const reCompolist = ref([])
watch(
() => props.list,
() => {
;(reCompolist.value as any) = props.list.map(
(row) => {
const newRow: Record<string, any> = {}
props.labels.forEach(([key, _]) => {
newRow[key] = row[key]
})
return newRow
},
{
immediate: true,
}
)
}
)
Please use a proxy to use the comment function in 🇨🇳