Browse Source

fix(devtools): send update to component owning the slot

https://github.com/vuejs/vue-devtools/issues/1404
Guillaume Chau 5 years ago
parent
commit
1355ee27a6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/runtime-core/src/componentRenderContext.ts

+ 6 - 0
packages/runtime-core/src/componentRenderContext.ts

@@ -1,4 +1,5 @@
 import { ComponentInternalInstance } from './component'
+import { devtoolsComponentUpdated } from './devtools'
 import { isRenderingCompiledSlot } from './helpers/renderSlot'
 import { closeBlock, openBlock } from './vnode'
 
@@ -78,6 +79,11 @@ export function withCtx(
     if (!isRenderingCompiledSlot) {
       closeBlock()
     }
+
+    if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+      devtoolsComponentUpdated(ctx)
+    }
+
     return res
   }
   // mark this as a compiled slot function.