小编Seb*_*sin的帖子

Vuetify 2 类型错误:找不到名称“DefaultProps”

由于我更新了我的项目以使用 Vuetify ( https://vuetifyjs.com )的新 2.x 版本,我在编译过程中遇到了一些类型错误,我不知道如何摆脱它们。正确地只是我的 tsconfig 以某种方式关闭。

我检查了文档并确保在我的 tsconfig.json 的类型部分中包含 vuetify,如下所示:

{
  "compilerOptions": {
    ...

    "types": [
      "webpack-env",
      "jest",
      "vuetify",
      "axios"
      ],

     ...
  }
}
Run Code Online (Sandbox Code Playgroud)

我在这里不做任何花哨的事情:

import Vue from 'vue';
import App from './App.vue';
import vuetify from './plugins/vuetify';
import router from './router';
import store from './store';

Vue.config.productionTip = false;

new Vue({
  vuetify,
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
Run Code Online (Sandbox Code Playgroud)

然后我运行开发服务器: yarn serve

ERROR in /Users/sebe/workspace/app/frontend/arena/src/main.ts
12:3 Argument of type '{ vuetify: Vuetify; router: VueRouter; store: Store<any>; render: (h: …
Run Code Online (Sandbox Code Playgroud)

typescript vue.js ts-loader vuetify.js vue-cli

6
推荐指数
1
解决办法
1351
查看次数

标签 统计

ts-loader ×1

typescript ×1

vue-cli ×1

vue.js ×1

vuetify.js ×1