parent
4126a9dd51
commit
4c1a193617
@ -124,7 +124,6 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
|
|||||||
}
|
}
|
||||||
return publicGetter(target)
|
return publicGetter(target)
|
||||||
} else if (
|
} else if (
|
||||||
__BUNDLER__ &&
|
|
||||||
(cssModule = type.__cssModules) &&
|
(cssModule = type.__cssModules) &&
|
||||||
(cssModule = cssModule[key])
|
(cssModule = cssModule[key])
|
||||||
) {
|
) {
|
||||||
|
@ -8,20 +8,15 @@ export let currentScopeId: string | null = null
|
|||||||
const scopeIdStack: string[] = []
|
const scopeIdStack: string[] = []
|
||||||
|
|
||||||
export function pushScopeId(id: string) {
|
export function pushScopeId(id: string) {
|
||||||
if (__BUNDLER__) {
|
|
||||||
scopeIdStack.push((currentScopeId = id))
|
scopeIdStack.push((currentScopeId = id))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export function popScopeId() {
|
export function popScopeId() {
|
||||||
if (__BUNDLER__) {
|
|
||||||
scopeIdStack.pop()
|
scopeIdStack.pop()
|
||||||
currentScopeId = scopeIdStack[scopeIdStack.length - 1] || null
|
currentScopeId = scopeIdStack[scopeIdStack.length - 1] || null
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export function withScopeId(id: string): <T extends Function>(fn: T) => T {
|
export function withScopeId(id: string): <T extends Function>(fn: T) => T {
|
||||||
if (__BUNDLER__) {
|
|
||||||
return ((fn: Function) =>
|
return ((fn: Function) =>
|
||||||
withCtx(function(this: any) {
|
withCtx(function(this: any) {
|
||||||
pushScopeId(id)
|
pushScopeId(id)
|
||||||
@ -29,7 +24,4 @@ export function withScopeId(id: string): <T extends Function>(fn: T) => T {
|
|||||||
popScopeId()
|
popScopeId()
|
||||||
return res
|
return res
|
||||||
})) as any
|
})) as any
|
||||||
} else {
|
|
||||||
return undefined as any
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -563,7 +563,6 @@ function baseCreateRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// scopeId
|
// scopeId
|
||||||
if (__BUNDLER__) {
|
|
||||||
if (scopeId) {
|
if (scopeId) {
|
||||||
hostSetScopeId(el, scopeId)
|
hostSetScopeId(el, scopeId)
|
||||||
}
|
}
|
||||||
@ -573,7 +572,6 @@ function baseCreateRenderer(
|
|||||||
if (treeOwnerId && treeOwnerId !== scopeId) {
|
if (treeOwnerId && treeOwnerId !== scopeId) {
|
||||||
hostSetScopeId(el, treeOwnerId + '-s')
|
hostSetScopeId(el, treeOwnerId + '-s')
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// children
|
// children
|
||||||
if (shapeFlag & ShapeFlags.TEXT_CHILDREN) {
|
if (shapeFlag & ShapeFlags.TEXT_CHILDREN) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user