vuejs / Discussion

Vue.js discussion
167 stars 17 forks source link

component $options.name is overwrite by Vue.component method #424

Closed dazhenhan closed 9 years ago

dazhenhan commented 9 years ago

For example, I define a component like below

export default{
    name: 'AComp'
}

then I use Vue.compoent to register

import AComp from 'AComp'

Vue.component('vue-acomp', AComp)

In fact, I want to get a 'AComp' in this.$options.name attribute, but I get 'vue-acomp' now.

I'm not sure is it right now, in 0.12+ version, it works well.