Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Commit

Permalink
chore: release 1.0.0-alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
b2nil committed Sep 23, 2020
1 parent 17f7f82 commit 1ae3420
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,39 @@ yarn add taro-ui-vue3
- [] 组件展示页面
- [] theme

- [] 兼容 h5
- [x] 兼容 h5


## 已知问题 - 暂时需要等 Taro 更新支持
## 已知问题
- Alipay 小程序端
- `AtCalendar`: 由于 Taro 的 `Swiper` 组件暂不支持支付宝内置 `Swiper` 组件的 `onAnimationEnd` 属性, 编译后,需手动修改 `base.axml` 中的 `<template name="tmpl_0_swiper">` 基础模板, 将 `swiper` 节点中的 `onAnimationFinish` 修改为 `onAnimationEnd`, 否则滑动切换时不能更新月份

- `AtTextarea`: 由于 Taro 的 `Textarea` 组件不支持支付宝 `textarea` 组件的 `show-count` 属性,所以字数统计不能通过设置 :count="false" 直接关闭, 需要手动修改编译后的 `base.axml`, 在 `<template name="tmpl_0_textarea_focus">``<template name="tmpl_0_textarea_blur">` 基础模板下的 `textarea` 节点中添加 `show-count="{{i.showCount}}"`

- 百度 Swan 小程序端
- 百度 Swan 小程序端 (问题较多,影响体验)
- 部分样式失效
- Taro Issue [#7293](https://github.com/NervJS/taro/issues/7293): Taro 3 百度小程序每次 setData 都会导致页面全量重新渲染,导致图片闪烁、输入框无法正常使用等问题

- H5 端
- 由于所有组件均采用渲染函数编写,编译为 h5 后,`taro-ui-vue3` 的组件无法找到从 `@tarojs/components` 中引入的组件, 如 `View``Text`
- 若采用 `taro-core-view` 等标签替换对应的 `View` 等组件,使用 render 函数渲染节点后, onTap 不能触发点击事件 [Taro issue #7329](https://github.com/NervJS/taro/issues/7329)
- 部分组件功能异常,打开浏览器开发工具后才能正常工作,如 `AtInput`, `AtSearchBar`, `AtSlider`
- Taro 的适配 Vue 3.0 的组件全部通过 `app.component` 注册为全局组件 `taro-xxx`,但使用 render 函数渲染 `taro-xxx-core``taro-xxx` 组件节点后, onTap 不能触发点击事件 [Taro issue #7329](https://github.com/NervJS/taro/issues/7329)
- 已经向 Taro 方面提交 [PR #7699](https://github.com/NervJS/taro/pull/7699),希望 Taro 能够将适配 Vue 3.0 的组件全部导出,按需引用。

- 若开发者使用 `taro-ui-vue3` 时有兼容 h5 的需求,在 Taro 官方没有正式采纳 PR 或采用别的方式解决问题之前,可采用以下 h5 编译配置方案:

- 在项目的 config 目录下增加一个 h5 构建脚本: [h5-building-script.js](./config/h5-building-script.js)

-`package.json` 下的 `build:h5` 命令修改为:
`"build:h5": "node ./config/h5-building-script.js && taro build --type h5",`

-[config/index.js](./config/index.js) 中的 `h5` 下添加 webpack `alias` 设置:
```typescript
webpackChain(chain) {
chain.resolve.alias
.set('@tarojs/components$', path.resolve(__dirname, '..','node_modules/@tarojs/components/dist-h5/vue3/index.js'))
.set('@tarojs/components/dist/taro-components/taro-components.css', path.resolve(__dirname, '..','node_modules/@tarojs/components/dist/taro-components/taro-components.css'))
}
```


## License
[MIT](./LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro-ui-vue3",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"description": "Taro UI Rewritten in Vue 3.0",
"browser": "dist/index.umd.js",
"module": "dist/index.esm.js",
Expand Down

0 comments on commit 1ae3420

Please sign in to comment.