Преглед на файлове

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 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)) {
       // replace old child transition data with fresh one
       // important for dynamic transitions!