skip v-show transition if value is the same (fix #3395)

This commit is contained in:
Evan You 2016-08-06 10:26:15 -04:00
parent c2c68d6a22
commit 1c0effa577
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,8 @@ export default {
}
el.style.display = value ? '' : 'none'
},
update (el: HTMLElement, { value }: VNodeDirective, vnode: VNodeWithData) {
update (el: HTMLElement, { value, oldValue }: VNodeDirective, vnode: VNodeWithData) {
if (value === oldValue) return
vnode = locateNode(vnode)
const transition = vnode.data && vnode.data.transition
if (transition && !isIE9) {