切换组件报错,可能是transition+keep-alive的问题
Version
3.2.27 及以上
Reproduction link
Steps to reproduce
- 输入11
- 点击切换
- 输入 22
- 点击前往CC 然后就报错了,怎么点都报错
What is expected?
正常切换组件
What is actually happening?
切换报错
Version
3.2.27 及以上
Reproduction link
Steps to reproduce
- 输入11
- 点击切换
- 输入 22
- 点击前往CC 然后就报错了,怎么点都报错
What is expected?
正常切换组件
What is actually happening?
切换报错
function toggleCC(){
t.value = 2;
+ nextTick(() => {
Comp.value=CC // 挂载到Parent 行为
+ });
}
t.value = 2
卸载Parent dom行为 与 Comp.value=CC
挂载到Parent dom 行为,在同一队列下执行是矛盾的,如报错 Cannot read properties of null (reading 'parentNode')
所说