简体   繁体   English

Vetur 在模板中无法正常工作(不检查数据、方法...)

[英]Vetur does not work properly in template(not checking data, method...)

I'm using the vetur extension of the vscode in my vue project with typescript.我在我的带有打字稿的 vue 项目中使用了 vscode 的 vetur 扩展。 I just found out that vetur can actually check inside template tag for my prop, method... and even type checking for the variable.我刚刚发现 vetur 实际上可以检查我的道具、方法的模板标签内部……甚至可以检查变量的类型。 But in my case, it does nothing, no type check, no valid name-checking, no hover information (the thing I want the most).但就我而言,它什么都不做,没有类型检查,没有有效的名称检查,没有悬停信息(我最想要的东西)。 I wonder if there needs to be some setting for this to work.我想知道是否需要一些设置才能使其工作。 Some information in my case :在我的情况下的一些信息:

  • vscode version 1.49.0 vscode 版本 1.49.0

  • vetur version v0.27.3 vetur 版本 v0.27.3

  • using vue v2.6.11 with vue-class-component使用 vue v2.6.11 和 vue-class-component

对于任何寻找答案的人,我必须转到设置 json 文件并添加

vetur.experimental.templateInterpolationService: true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 泛型方法以泛型类型作为参数的类型不能正常工作 - Generic method's typing with generic type as a parameter does not work properly 检查用户名的验证器不能正常工作 - Validators for checking taken usernames doesnt work properly Vue/TypeScript/ESLint/Prettier/Vetur 格式化不起作用 - Vue/TypeScript/ESLint/Prettier/Vetur formatting doesn't work VSCode(Vetur) 无法识别组件中的自定义 Vue 属性 - VSCode(Vetur) does not recognize customized Vue property in component 检查对象是否未定义变量不起作用打字稿 - Checking if object is undefined with variable does not work Typescript 数组类型检查在嵌套 object 中不起作用 - Array types checking does not work in nested object NgIf-Else 条件无法正常工作 - NgIf-Else condition does not work properly 当“@”用于打字稿类组件模板中的事件绑定时,Vetur 无法正确读取函数名称 - Vetur is not reading the function name correctly when '@' is used for event binding in template of a typescript class component Vetur 说在模板上使用道具时道具不存在于类型“从不”上 - Vetur says prop doesn't exist on type "never" when using a prop on template NativeScript-Vue with Typescript in VSCode with Vetur: Alert with then giving Property 'then' does not exist on type 'void' - NativeScript-Vue with Typescript in VSCode with Vetur: Alert with then giving Property 'then' does not exist on type 'void'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM