-
-
Notifications
You must be signed in to change notification settings - Fork 13
Vue - Official v2.0.28 导致view、button、image标签类型报错 #67
Comments
按照你的描述,2.0.28 之前都没有问题,那应该是插件的问题呀,为什么来这里提问题呢?现在还有 #66 悬而未决,我也不清楚插件那边什么情况🤔 |
不是的,如果tsconfigs中不加uni-app-types,就会正常,只是会出现例如button.type类型不符的问题,所以我认为应该是这个库的问题 我可以先研究下具体的原因 |
你可以比对一下四种情况
最近一直在加班,怕是暂时没时间看了 |
目前是建议先降级,还在等官方回复 |
我测试了一番,发现 vue2 + volar 2.0.22 或以上无法提供对应的组件支持,恐怕 uni-app-types 也需要放弃 vue2 支持。如果你们测试发现可以提供支持,请告诉我怎么做,我很乐意实现并继续在这个包内提供支持。 如果各位也没有找到可行的办法,那么我计划在 8 月初发布 v1 移除 vue2 支持,并将 [email protected] + volar 2.0.21 作为支持 vue2 的推荐记录在 README 中。 感谢各位的支持和理解🙏 |
我在 volar 仓库中找到了相关的说明 vuejs/language-tools#3738 (comment)
Volar 并没有打算支持 Vue 2.6,建议使用 Vue 2.6 + Vetur 的组合,而 uni-app 并不支持 Vue 2.7+。 |
唉,volar每次更新体验都一言难尽,作者很难受,我们也很难受。。。 |
package.json {
"@uni-helper/eslint-config": "^0.0.6",
"@uni-helper/uni-app-types": "^0.5.13",
"@uni-helper/uni-cloud-types": "^0.5.3",
"@uni-helper/uni-ui-types": "^0.5.15",
"@uni-helper/unocss-preset-uni": "^0.2.9",
"@uni-helper/vite-plugin-uni-components": "^0.0.9",
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
"@uni-helper/vite-plugin-uni-manifest": "^0.2.6",
"@uni-helper/vite-plugin-uni-middleware": "^0.0.1",
"@uni-helper/vite-plugin-uni-pages": "^0.2.26",
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
"@uni-helper/vite-plugin-uni-platform-modifier": "^0.0.2",
"@vue/runtime-core": "3.4.34"
} tsconfig.json {
"extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": {
"ignoreDeprecations": "5.0",
"lib": ["esnext", "dom"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"types": [
"@dcloudio/types",
"miniprogram-api-typings",
"mini-types",
"@uni-helper/uni-cloud-types",
"@uni-helper/uni-ui-types",
"@uni-helper/uni-app-types"
],
"sourceMap": true
},
"include": [
"**/*.d.ts",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"vueCompilerOptions": {
"plugins": ["@uni-helper/uni-app-types/volar-plugin"]
}
} Vue - Official |
发布了 @uni-helper/uni-types、@uni-helper/uni-app-types、@uni-helper/uni-cloud-types、@uni-helper/uni-ui-types v1.0.0-alpha.0,但还有一些问题,比如 view 这一类自带元素会出现 { class: string } 错误提示等,可能还要找 volar 那边看看为啥 |
您因该发布错了,我看 npm 的包没有关键的 ts 定义文件 https://www.npmjs.com/package/@uni-helper/uni-app-types?activeTab=code |
迁移出错了,非常抱歉,感谢你的支出,已经发布 v1.0.0-alpha.1。近期加班有望结束,希望还能再添加一些新特性再发布正式版。最新代码可追踪 https://github.com/uni-helper/uni-types ,后续将 archive 相关几个仓库。🙏 |
vue3.3+可以使用 https://gitee.com/mxp_open/mxp-uni-types 代替,注意pinia不要升级到 2.2.0就行,可不用配置
|
https://gitee.com/mxp_open/mxp-uni-types 请看这个解决方式,注意pinia不要升级到 2.2.0就行,而且我还新增 nvue 和微短剧相关的组件 |
@ModyQyW 测试了下是 vuejs/language-tools#4581 ,移除了对 |
你能告诉我改怎么改吗,我在 https://gitee.com/mxp_open/mxp-uni-types 仓库中有一个解决方案,但是,不支持pinia 2.2.0+, |
@mxp131011 刚开了一个相关 PR,希望可以解决问题 uni-helper/uni-typed#10 |
目前没有我的解决方案好,你的解决方案会导致参数没有类型提示, 用我的解决方案,必须去掉 "plugins": [ |
目前没有我的解决方案好,你的解决方案会导致参数没有类型提示,但是我认为你的方案才是正确的解决方案,只是目前Vue - Official有bug 注意 用我的解决方案,必须去掉 "plugins": [ "mxp-uni-types/volar-plugin" ] |
可以给我一份 package.json,vite.config.ts,tsconfig.json吗 |
|
可以给我一份 package.json,vite.config.ts,tsconfig.json吗,我看看是那里有问题 |
我即将归档这个仓库并将工作迁移到 @uni-helper/uni-types 中继续进行 |
Uh oh!
There was an error while loading. Please reload this page.
描述问题
当前Vue - Official 最新版为 v2.0.28,目前仅此版本出现如图问题,低于此版本均正常,tsconfig.json 中已按照文档所述修改
复现
系统信息
提示“操作已取消”,无法获取
"@uni-helper/uni-app-types": "^0.5.13"
使用的包管理器
pnpm
核对
The text was updated successfully, but these errors were encountered: