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
When the instruction update logic assigns oldValue, oldVnode.data.directives ["show"] and vnode.data.directives ["show"] are actually the same object.
So dir.oldValue = oldDir.value is actually equivalent to dir.oldValue = dir.value; in the later update event, dir.oldValue === dir.value
The text was updated successfully, but these errors were encountered:
You can just spread the global object: [{...directive}],. What is the use case for a shared directive object?
pkf1994
changed the title
When v-show render instruction is passed a reference object, the instruction will not work
v-show render的时候指令传入的是一个引用对象的话,指令不起作用。
Dec 23, 2019
Version
2.6.10
Reproduction link
https://codepen.io/SamirGuo/pen/vYBezXz
Steps to reproduce
What is expected?
v-show to be applied
What is actually happening?
v-show isn't applied
When the instruction update logic assigns oldValue, oldVnode.data.directives ["show"] and vnode.data.directives ["show"] are actually the same object.
So dir.oldValue = oldDir.value is actually equivalent to dir.oldValue = dir.value; in the later update event, dir.oldValue === dir.value
The text was updated successfully, but these errors were encountered: