当前依赖
├── @vitejs/[email protected]
├── @vitejs/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
方法0
官方方法,修改 tsconfig.json
,截止写文章时,这个方法没用,具体请查看我提的 issue
// tsconfig.json
{
"vueCompilerOptions": {
"strictTemplates": false,
}
}
方法1
手动添加类型声明
//env.d.ts
import type { HTMLAttributes } from "vue";
declare module 'vue' {
export interface AllowedComponentProps extends HTMLAttributes {}
}
export {}
标签:HTMLAttributes,vue,json,报错,tsx,vitejs
From: https://www.cnblogs.com/ltxhhz/p/18130918