安装类型声明文件
npm i -D @dcloudio/types miniprogram-api-typings @uni-helper/uni-app-types @uni-helper/uni-ui-types
// tsconfig.json { "compilerOptions": { // ... "types": [ "@dcloudio/types", // uni-app API 类型 "miniprogram-api-typings", // 原生微信小程序类型 "@uni-helper/uni-app-types", // uni-app 组件类型 "@uni-helper/uni-ui-types" // uni-ui 组件类型 // [!code ++] ] }, // vue 编译器类型,校验标签类型 "vueCompilerOptions": { "nativeTags": ["block", "component", "template", "slot"] }
}
标签:uniapp,helper,button,ts,ui,类型,uni,app,types From: https://www.cnblogs.com/peter-web/p/17759323.html