1、immediate 写错位置 哭晕

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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,
}
)
}
)