b2nil / taro-ui-vue3

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

h5 taro-xxx-core 组件点击时会被隐藏 #14

Closed b2nil closed 3 years ago

b2nil commented 4 years ago

编译到 h5 后,点击部分监听事件的 taro-xxx-core 组件后,组件样式会被设置为 visibility: hidden。 受影响的组件包括: AtCalendar, AtCheckBox 等等……

b2nil commented 3 years ago

暂时通过 58bb20faea5f16a54051da02ea24f3cc15021d4f 解决。

将项目编译成 h5,需要进行如下配置:

b2nil commented 3 years ago

编译至 h5, 不能直接使用渲染函数渲染 Taro 组件标签,而是需要使用 resolveComponent 先将标签解析为组件,然后再渲染:

import { resolveComponent } from 'vue'

h('taro-view')  // 错误
h(resolveComponent('taro-view'))  // 正确