在使用uniapp+ts开发小程序的时候会遇到各种各样的类型错误或冲突.
- 在使用uniapp默认button组件,type类型报错,不能将类型'default'分配给button的错误
解决方案: 在tsconfig.json 中,添加 vueCompilerOptions
{
"compilerOptions":{
...
}
...
"vueCompilerOptions": {
"nativeTags": ["block", "component", "template", "slot"]
}
}