You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// call the last hook...vm._isDestroyed=true;// invoke destroy hooks on current rendered treevm.__patch__(vm._vnode,null);// fire destroyed hookcallHook(vm,'destroyed');
页面中有A, B, 更新后变成只有C(A, B, C都是同一个组件,key值唯一)
A, B -> C
此时因为key不同,sameVnode的判定为false,在updateChildren时会首先生成C, 然后destroy A, B
也就是:
create C: this.setData({$root.0_0_0: C})
destroy A和B: this.setData({$root.0_0_0: A, $root.0_0_1: B})
因为0_0_0位置上的元素还在,所以旧数据就被重新更新上去了。
[扼要问题描述]
mpvue 版本号:
[[email protected]]
最小化复现代码:
[建议提供最小化可运行的代码:附件或文本代码]
index.vue
t-text.vue:
问题复现步骤:
观察到的表现:
The text was updated successfully, but these errors were encountered: