Przeglądaj źródła

fix global mixin recursive name lookup

Evan You 10 lat temu
rodzic
commit
7304385c11
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/core/global-api/mixin.js

+ 3 - 0
src/core/global-api/mixin.js

@@ -9,6 +9,9 @@ export function initMixin (Vue: GlobalAPI) {
     // update constructors that are already created
     config._ctors.forEach(Ctor => {
       Ctor.options = mergeOptions(Ctor['super'].options, Ctor.extendOptions)
+      if (Ctor.options.name) {
+        Ctor.options.components[Ctor.options.name] = Ctor
+      }
     })
   }
 }