feat(runtime-dom): defineCustomElement

This commit is contained in:
Evan You
2021-07-12 15:32:38 -04:00
parent 42ace9577d
commit 8610e1c9e2
8 changed files with 546 additions and 14 deletions

View File

@@ -279,12 +279,15 @@ export interface ComponentInternalInstance {
* @internal
*/
emitsOptions: ObjectEmitsOptions | null
/**
* resolved inheritAttrs options
* @internal
*/
inheritAttrs?: boolean
/**
* is custom element?
*/
isCE?: boolean
// the rest are only for stateful components ---------------------------------
@@ -519,6 +522,11 @@ export function createComponentInstance(
instance.root = parent ? parent.root : instance
instance.emit = emit.bind(null, instance)
// apply custom element special handling
if (vnode.ce) {
vnode.ce(instance)
}
return instance
}