refactor(usecssr): mount id generating logic

This commit is contained in:
07akioni 2020-06-26 19:18:50 +08:00
parent cc7da0be5f
commit 43ba07e46d

View File

@ -25,6 +25,9 @@ function createMutableStyleId (
dependencyKey,
dependencyValue
) {
if (dependencyKey === 'syntheticTheme') {
return componentName + '-' + renderedTheme
}
return (
componentName + '-' +
renderedTheme + '-' +
@ -91,7 +94,7 @@ function setupImmutableStyle (
CNode
) {
const mountId = createImmutableStyleId(
instance.$options.name + '-immutable'
instance.$options.name
)
if (isStyleMounted(mountId)) return
CNode.mount({