b2nil / taro-ui-vue3

采用 Vue 3.0 重写的 Taro UI 组件库
https://b2nil.github.io/taro-ui-vue3/
MIT License
160 stars 51 forks source link

Taro Vue 3.0 报错: SVGElement is not defined #91

Closed yangjisen closed 3 years ago

yangjisen commented 3 years ago

问题描述 taro-ui-vue3 在微信小程序开发者工具报错

复现步骤 taro init myapp cd myapp npm install taro-ui-vue3 npm install npm run dev:weapp

报错信息 image

系统信息 $ taro info � Taro v3.1.4

Taro CLI 3.1.4 environment info: System: OS: Windows 10 Binaries: Node: 14.4.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD

补充信息 微信开发者工具 Stable 1.05.2103190

b2nil commented 3 years ago

你把 vue 相关的依赖版本降低到 3.0.7 试试。 怀疑是 vue@3.0.8 开始支持将 app 挂载到 svg 容器导致的。跟 #71 一样。 如果是这个原因的话,需要 taro 来修复小程序的 runtime。

yangjisen commented 3 years ago

将vue固定在3.0.7问题暂时己解决,坐等官方修复更新

b2nil commented 3 years ago

Fix will be released in Taro v3.1.5

zhuyukun119 commented 3 years ago

如何降低相关依赖呀,为啥进入myapp之后里面显示版本是3.0.11而退出之后是3.0.7呀

b2nil commented 3 years ago

@zhuyukun119 假设你使用 yarn, 并且你想使用的 vue 版本是 3.0.7:

yarn add vue@3.0.7
yarn add -D @vue/compiler-sfc@3.0.7

执行 yarn list vue @vue/compiler-sfc 可查看具体安装的版本。

npm 的操作类似,具体你查一下。

zhuyukun119 commented 3 years ago

感谢,大佬

---原始邮件--- 发件人: "Ken @.> 发送时间: 2021年4月4日(周日) 下午5:11 收件人: @.>; 抄送: @.**@.>; 主题: Re: [b2nil/taro-ui-vue3] Taro Vue 3.0 报错: SVGElement is not defined (#91)

@zhuyukun119 假设你使用 yarn, 并且你想使用的 vue 版本是 3.0.7: yarn add @. yarn add -D @@.

执行 yarn list vue @vue/compiler-sfc 可查看具体安装的版本。

npm 的操作类似,具体你查一下。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.