-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
H5 v-if 报错 #11379
Comments
等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!
Thank you so much! |
临时规避方式将 template 内最外层的 <template>
<div class="index">
<view v-if="id === 1">
<text>{{ msg }}</text>
</view>
<!-- H5中插入节点报错了 -->
<view v-if="id === 2">
<text>111</text>
</view>
</div>
</template> 问题原因分析根据报错信息提示, 对比原代码和上述临时规避方式中的代码在 进一步分析 taro/packages/taro-components/src/components/view/view.tsx Lines 64 to 69 in 93493fa
|
同样的问题 |
看来不能处理 vue 的 comment 节点,我们回归测试一下。 |
这个问题通过把v-if写成v-show 可以暂时解决。 |
相关平台
H5
复现仓库
https://gitee.com/zhenglinhai/taro-demo.git
浏览器版本: Chrome 98.0.4758.109
使用框架: Vue 3
复现步骤
这个仓库写了一个简单的demo 跑 dev:h5就行
期望结果
不报错
实际结果
报错了
环境信息
The text was updated successfully, but these errors were encountered: