|
|
@@ -86,7 +86,7 @@ import { isAsyncWrapper } from './apiAsyncComponent'
|
|
|
import { isCompatEnabled } from './compat/compatConfig'
|
|
|
import { DeprecationTypes } from './compat/compatConfig'
|
|
|
import { type TransitionHooks, leaveCbKey } from './components/BaseTransition'
|
|
|
-import type { VueElement } from '@vue/runtime-dom'
|
|
|
+import type { ComponentCustomElementInterface } from './component'
|
|
|
|
|
|
export interface Renderer<HostElement = RendererElement> {
|
|
|
render: RootRenderFunction<HostElement>
|
|
|
@@ -641,9 +641,10 @@ function baseCreateRenderer(
|
|
|
optimized,
|
|
|
)
|
|
|
} else {
|
|
|
- const customElement = !!(n1.el && (n1.el as VueElement)._isVueCE)
|
|
|
- ? (n1.el as VueElement)
|
|
|
- : null
|
|
|
+ const customElement =
|
|
|
+ n1.el && (n1.el as ComponentCustomElementInterface)._isVueCE
|
|
|
+ ? (n1.el as ComponentCustomElementInterface)
|
|
|
+ : null
|
|
|
try {
|
|
|
if (customElement) {
|
|
|
customElement._beginPatch()
|
|
|
@@ -1385,11 +1386,7 @@ function baseCreateRenderer(
|
|
|
}
|
|
|
} else {
|
|
|
// custom element style injection
|
|
|
- if (
|
|
|
- root.ce &&
|
|
|
- // @ts-expect-error _def is private
|
|
|
- (root.ce as VueElement)._def.shadowRoot !== false
|
|
|
- ) {
|
|
|
+ if (root.ce && root.ce._hasShadowRoot()) {
|
|
|
root.ce._injectChildStyle(type)
|
|
|
}
|
|
|
|