Преглед изворни кода

Revert "remove no longer necessary code"

This reverts commit 7f25f730c1b82a80158d488b025f138155664921.
Evan You пре 9 година
родитељ
комит
fcc98d52e2
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      src/platforms/web/runtime/components/transition.js

+ 6 - 0
src/platforms/web/runtime/components/transition.js

@@ -133,6 +133,12 @@ export default {
     const oldRawChild = this._vnode
     const oldRawChild = this._vnode
     const oldChild: any = getRealChild(oldRawChild)
     const oldChild: any = getRealChild(oldRawChild)
 
 
+    // mark v-show
+    // so that the transition module can hand over the control to the directive
+    if (child.data.directives && child.data.directives.some(d => d.name === 'show')) {
+      child.data.show = true
+    }
+
     if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
     if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
       // replace old child transition data with fresh one
       // replace old child transition data with fresh one
       // important for dynamic transitions!
       // important for dynamic transitions!