]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
Merge branch 'main' into edison/feat/ce_attachInternals edison/feat/ce_attachInternals 12129/head
authoredison <daiwei521@126.com>
Fri, 7 Nov 2025 00:46:41 +0000 (08:46 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Nov 2025 00:46:41 +0000 (08:46 +0800)
1  2 
packages/runtime-dom/__tests__/customElement.spec.ts
packages/runtime-dom/src/apiCustomElement.ts
packages/runtime-dom/src/index.ts

index c6d000feeca4a0dd3677ba640e372ecc8e3e4b21,85d37bc117e06f337dff6d6451e5b81b7479d558..86ea365d2ea47838fab64e2c899b16683fd4063a
@@@ -172,12 -173,10 +173,12 @@@ export function defineCustomElement
     */
    _createApp?: CreateAppFunction<Element>,
  ): VueElementConstructor {
-   const Comp = defineComponent(options, extraOptions) as any
-   if (isPlainObject(Comp)) extend(Comp, extraOptions)
+   let Comp = defineComponent(options, extraOptions) as any
+   if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions)
    class VueCustomElement extends VueElement {
      static def = Comp
 +    static formAssociated = !!options.formAssociated
 +
      constructor(initialProps?: Record<string, any>) {
        super(Comp, initialProps, _createApp)
      }
Simple merge