diff --git a/src/types/component.d.ts b/src/types/component.d.ts new file mode 100644 index 0000000..10a5d6e --- /dev/null +++ b/src/types/component.d.ts @@ -0,0 +1,11 @@ +/** + * declare module '@vue/runtime-core' + * 现调整为 + * declare module 'vue' + */ +import 'vue' +declare module 'vue' { + export interface GlobalComponents { + // + } +} diff --git a/tsconfig.json b/tsconfig.json index 85fd34a..4cf77dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "@vue/tsconfig/tsconfig.json", "compilerOptions": { + "allowJs": true, "sourceMap": true, "baseUrl": ".", "paths": { @@ -9,5 +10,9 @@ "lib": ["esnext", "dom"], "types": ["@dcloudio/types", "miniprogram-api-typings", "@uni-helper/uni-app-types"] }, + "vueCompilerOptions": { + // experimentalRuntimeMode 已废弃,现调整为 nativeTags,请升级 Volar 插件至最新版本 + "nativeTags": ["block", "component", "template", "slot"] + }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] }