我需要在获取后使用一些数据更新react 对象:
setup(){
const formData = reactive({})
onMounted(() => {
fetchData().then((data) => {
if (data) {
formData = data //how can i replace the whole reactive object?
}
})
})
}
formData = data
也不行
有更好的方法吗?