Taro: Taro3.0.21项目中使用TaroUI的AtSwipeAction未正常显示

Created on 27 Dec 2020  ·  4Comments  ·  Source: NervJS/taro


相关平台

微信小程序

小程序基础库: 2.14.0
使用框架: React

复现步骤

新建Taro3.0.21项目,引入TaroUI中AtSwipeAction,编译微信小程序

期望结果

AtSwipeAction正常显示

实际结果

AtSwipeAction没有显示

环境信息

Taro CLI 3.0.21 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD
      npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD   

补充信息

旧版本taro更新到Taro3.0.21后,看组件AtSwipeAction代码发现有两个props值(maxDistance, areaWidth)没有正确取值。
areaWidth值被设为0导致宽度为0组件直接不显示。
旧版taro不需要专门去设这两个props值即可正常显示。

F-react T-weapp V-3

Most helpful comment

同样的问题

All 4 comments

遇到同样问题

遇到同样问题.
"version": "3.0.0-alpha.9"
感觉很奇怪,AtSwipeAction 中有这样一个依赖
import { Text, View, MovableArea, MovableView } from '@tarojs/components';
但是tarojs3中根本没有 MovableArea, MovableView 模块,只有 MoveableArea, MoveableView。官方没有测试过 AtSwipeAction 么???

同样的问题

需要安装taro-ui组件(npm install taro-ui)并且引用相关组件(import { AtButton } from 'taro-ui'),属性areaWidth必须设置且要设置合适的数值

Was this page helpful?
0 / 5 - 0 ratings