Przeglądaj źródła

fix global component name

Evan You 10 lat temu
rodzic
commit
56ebb003a4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/core/global-api/assets.js

+ 1 - 1
src/core/global-api/assets.js

@@ -25,7 +25,7 @@ export function initAssetRegisters (Vue: GlobalAPI) {
           }
           }
         }
         }
         if (type === 'component' && isPlainObject(definition)) {
         if (type === 'component' && isPlainObject(definition)) {
-          definition.name = id
+          definition.name = definition.name || id
           definition = Vue.extend(definition)
           definition = Vue.extend(definition)
         }
         }
         this.options[type + 's'][id] = definition
         this.options[type + 's'][id] = definition