wip: more compat progress

This commit is contained in:
Evan You
2021-04-21 15:09:18 -04:00
parent 62b8f4a39c
commit 1b8f14ee76
14 changed files with 272 additions and 55 deletions

View File

@@ -25,6 +25,10 @@ export function setCurrentRenderingInstance(
const prev = currentRenderingInstance
currentRenderingInstance = instance
currentScopeId = (instance && instance.type.__scopeId) || null
// v2 pre-compiled components uses _scopeId instead of __scopeId
if (__COMPAT__ && !currentScopeId) {
currentScopeId = (instance && (instance.type as any)._scopeId) || null
}
return prev
}