-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用<template></template>
标签报错,类型“IntrinsicElements”上不存在属性“template”
#189
Comments
暂时添加配置后不飘红了 import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
interface Element extends VNode {}
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any
}
}
} |
重启一下vue扩展就可以,扩展的问题 |
在哪里配置 |
解决了嘛同样的问题 |
解决了 修改tsconfig.json文件 {
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"noImplicitThis": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"sourceMap": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"#/*": ["./src/types/*"]
},
"outDir": "dist",
"lib": ["esnext", "dom"],
"types": [
"@dcloudio/types",
"@uni-helper/uni-types",
"@types/wechat-miniprogram",
"wot-design-uni/global.d.ts",
+ "vue/jsx" // 添加这一行
]
},
// ... orther config
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report(问题描述)
我在使用unibest模版时,使用
<template></template>
标签时会标红,报错内容:【类型“IntrinsicElements”上不存在属性“template”。ts-plugin(2339)】我的其他自己搭建的uniapp vue3 项目没有这个问题
Steps to reproduce(问题复现步骤)
pnpm create unibest my-project
创建项目pnpm i
安装依赖,写一个标签<template>123</template>
Screenshot or Gif(截图或动态图)
minimal reproduction(最小可还原代码)
按步骤创建就可复现
System Info
npx envinfo --system --npmPackages vue --binaries --browsers
执行上面命令,将结果贴下面
The text was updated successfully, but these errors were encountered: