vetur
vetur copied to clipboard
variables from mixins not recognized in component template
Info
- Platform: Linux
- Vetur version: 0.19.0
- VS Code version: 1.33.1
Problem
Since the last release of Vetur html template no longer uses values from mixins
example error in template where mixin has data.config
Property 'config' does not exist on type 'CombinedVueInstance...'.
Reproducible Case
- create a
base
component with a data and/or computed variable - create a
extends
component that uses the basecomponent
as a mixin - use variable/computed in template of
extends
component
That's correct, there's no support for mixin yet. It's not easy to do this...
I guess roll-back to 0.18.1 for now if needed
You can also do vetur.validation.template: false
or vetur.experimental.templateInterpolationService: false
FYI: If you want to type mixins, you may want to use this. https://github.com/ktsn/vue-typed-mixins
I am using mac. After I upgraded to the latest vscode, I also encountered this problem. Now, whether I downgrade to 1.3.1 or use vetur0.18.1, the properties of mixins are always unrecognizable. . .
Related to #1156
You can also do
vetur.validation.template: false
orvetur.experimental.templateInterpolationService: false
Hm, I tried that and I still get errors regarding a property not being on type. I'm not using TypeScript.
Also, where can I find all the settings Vetur supports?