Akryum / meteor-vue2-example

Meteor & Vue 2.0 example
44 stars 22 forks source link

Anonymous Component in Vue dev tools #4

Closed mitar closed 7 years ago

mitar commented 7 years ago

In Vue dev tools, the app component is named "Anonymous Component". Is there some way to correctly name it?

Akryum commented 7 years ago

Add a name option to the component definition.

mitar commented 7 years ago

I thought that the name is automatically added for single file components?

Akryum commented 7 years ago

No it isn't. ^^

mitar commented 7 years ago

Any reason why this would not be done so? From what I see Vue tries vm.$options.name || vm.$options._componentTag in warn (not sure for dev tools). So _componentTag could be set?

Akryum commented 7 years ago

Well because you can set a different name that will be used for aromatic registration. I usually name my components, even in non Meteor apps.

Le lun. 2 janv. 2017 à 12:22, Mitar notifications@github.com a écrit :

Any reason why this would not be done so? From what I see Vue tries vm.$ options.name || vm.$options._componentTag in warn (not sure for dev tools). So _componentTag could be set?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Akryum/meteor-vue2-example/issues/4#issuecomment-269960249, or mute the thread https://github.com/notifications/unsubscribe-auth/ACqyfJElRK8sS-GlzEC78vyL7Q-g5g4yks5rON3igaJpZM4LY4pJ .

mitar commented 7 years ago

So, why wouldn't we name components the same as they are registered under using automatic registration, if user does not name them themselves?

Akryum commented 7 years ago

We could. 😄

mitar commented 7 years ago

I opened: https://github.com/Akryum/meteor-vue-component/issues/99