mirror of https://github.com/vuejs/core.git
types: custom element interface should be internal
This commit is contained in:
parent
37ccb9b9a0
commit
bcb9a70290
|
@ -1239,6 +1239,12 @@ export function isClassComponent(value: unknown): value is ClassComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ComponentCustomElementInterface {
|
export interface ComponentCustomElementInterface {
|
||||||
injectChildStyle(type: ConcreteComponent): void
|
/**
|
||||||
removeChildStyle(type: ConcreteComponent): void
|
* @internal
|
||||||
|
*/
|
||||||
|
_injectChildStyle(type: ConcreteComponent): void
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
_removeChildStyle(type: ConcreteComponent): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ function reload(id: string, newComp: HMRComponent) {
|
||||||
|
|
||||||
// update custom element child style
|
// update custom element child style
|
||||||
if (instance.root.ce && instance !== instance.root) {
|
if (instance.root.ce && instance !== instance.root) {
|
||||||
instance.root.ce.removeChildStyle(oldComp)
|
instance.root.ce._removeChildStyle(oldComp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1337,7 +1337,7 @@ function baseCreateRenderer(
|
||||||
} else {
|
} else {
|
||||||
// custom element style injection
|
// custom element style injection
|
||||||
if (root.ce) {
|
if (root.ce) {
|
||||||
root.ce.injectChildStyle(type)
|
root.ce._injectChildStyle(type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
|
|
|
@ -609,11 +609,17 @@ export class VueElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
injectChildStyle(comp: ConcreteComponent & CustomElementOptions) {
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
_injectChildStyle(comp: ConcreteComponent & CustomElementOptions) {
|
||||||
this._applyStyles(comp.styles, comp)
|
this._applyStyles(comp.styles, comp)
|
||||||
}
|
}
|
||||||
|
|
||||||
removeChildStyle(comp: ConcreteComponent): void {
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
_removeChildStyle(comp: ConcreteComponent): void {
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
this._styleChildren.delete(comp)
|
this._styleChildren.delete(comp)
|
||||||
if (this._childStyles && comp.__hmrId) {
|
if (this._childStyles && comp.__hmrId) {
|
||||||
|
|
Loading…
Reference in New Issue