添加vue.d.ts 文件

重启VS Code  错误消失了。

解决 vue+ts通过Vue.prototype绑定的属性方法,能够调用到,但是编译报错
1 import Vue from "vue";
2 
3 declare module "vue/types/vue" {
4   interface Vue {
5     $moment: any
6   }
7 }
解决 vue+ts通过Vue.prototype绑定的属性方法,能够调用到,但是编译报错

相关文章:

  • 2021-08-22
  • 2021-08-01
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2021-08-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-11-29
  • 2021-08-12
  • 2021-04-24
相关资源
相似解决方案