-
Notifications
You must be signed in to change notification settings - Fork 17
Can I use a compoent inherit other compoent? #354
Comments
@yyx990803 耽误一小会时间,帮我解个惑吧 |
components: {
'table-grid': TableGrid
} The key |
Thx |
@evan, why is inheritance not recommended? How would you go about using methods of parent component? You wrote in the documentation that we should not rely on |
Re: inheritance. It looks like you have confused two things. There's an object oriented inheritance (extending a component from another component), and there's the view hierarchy. Re: method on parent component. If you don't need the result, then Also, vuejs/Discussion is deprecated, you can find support in the gitter chat or on the forum. |
Q1:
Vue.extend
create a component construct of Vue, override it by pass data or $el to paramsVue.Component
register a componentBut
How to do component inherit other?is it necessary?
For Example:
TableGrid, TreeGrid inherit Grid
Q2:
a component from
vue.extend
. register it byVue.Component('my-component', Vue.extend({}))
how to use this in Father Compoent?
The text was updated successfully, but these errors were encountered: