fix(custom-element): keep instance.isCE for backwards compat

This commit is contained in:
Evan You 2024-08-15 15:18:19 +08:00
parent 3d6f01571b
commit e19fc27042
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
2 changed files with 7 additions and 1 deletions

View File

@ -414,10 +414,15 @@ export interface ComponentInternalInstance {
*/
inheritAttrs?: boolean
/**
* is custom element?
* Custom Element instance (if component is created by defineCustomElement)
* @internal
*/
ce?: ComponentCustomElementInterface
/**
* is custom element? (kept only for compatibility)
* @internal
*/
isCE?: boolean
/**
* custom element specific HMR method
* @internal

View File

@ -519,6 +519,7 @@ export class VueElement
vnode.ce = instance => {
this._instance = instance
instance.ce = this
instance.isCE = true // for vue-i18n backwards compat
// HMR
if (__DEV__) {
instance.ceReload = newStyles => {