mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 03:57:36 +08:00
fix(reactivity): shallowReactive should not unwrap refs (#12605)
fix #12597
This commit is contained in:
parent
8cdd0ac07e
commit
15b9b9b19d
@ -181,7 +181,7 @@ export function defineReactive(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isRef(value) ? value.value : value
|
return isRef(value) && !shallow ? value.value : value
|
||||||
},
|
},
|
||||||
set: function reactiveSetter(newVal) {
|
set: function reactiveSetter(newVal) {
|
||||||
const value = getter ? getter.call(obj) : val
|
const value = getter ? getter.call(obj) : val
|
||||||
|
Loading…
Reference in New Issue
Block a user