{
setup () {
const original= () => {
return {
a: 1
}
}
const state = reactive(original())
const resetState = () => {
Object.assign(state, original())
}
}
}
{
setup () {
const original= () => {
return {
a: 1
}
}
const state = reactive(original())
const resetState = () => {
Object.assign(state, original())
}
}
}
本文标题:vue3.0重置reactive值
本文链接:https://www.haomeiwen.com/subject/cwnxzltx.html
网友评论