super() in a method overriden via Vue.extend
See original GitHub issueIt would be great to have super()
method available to be able to call parent implementation.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Vue.js inheritance call parent method - Stack Overflow
No, vue doesn't work with a direct inheritance model. You can't A.extend an component, as far as I know. It's parent-child relationships ...
Read more >Call the overrided method from extend/mixin (think 'super')
It allows you to call parent component's method just by this.$super(...arguments) in child component's method (and also in mixin's methods).
Read more >Call super method in Vue Component - DEV Community
Calling super method from Vue Component to Parent Component's method or mixin's method. It really doesn't matter.
Read more >Extending Vue.js Components
What's the best way to "extend" a Vue component, i.e. use one component ... method override // the mixin `increment` method? increment() {...
Read more >11.9. Using Super to call an Overridden Method
Sometimes you want the child class to do more than what a parent method is doing. You want to still execute the parent...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this.constructor.super.options.methods.method.call(this)
- this is obviously super verbose, but you can easily write a helper to shorten it to something likecallSuper(this, 'methodName')
.@yyx990803 It’s not about deep class inheritance, it’s about using “extends” property according to how it’s done everywhere and how it is described in the docs. Are you planning to remove “extends” in future releases of vue?