jd-opensource / jd-opensource/taro-ui

AtDrawer组件嵌套AtFloatLayout组件,AtDrawer会闪现一下再触发动画展示

Open
#1,730 6 comments 0 reactions 1 assignee Claimed by @robinv8 View on GitHub
bug
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

v3.1.0-beta.4

### 问题描述

AtDrawer组件嵌套使用AtFloatLayout组件,AtDrawer会闪现一下再触发动画展示

"@tarojs/taro": "3.5.8"正常
"@tarojs/taro": "3.6.20"异常

### 复现步骤

点击AtDrawer就可

### 复现代码
```js
import Taro from '@tarojs/taro';
import React, { Component } from 'react';
import { View } from '@tarojs/components';
import { AtFloatLayout, AtDrawer } from 'taro-ui';

export default class Index extends Component {
state = {
isOpened: false,
show: false
};

handleClose = () => {
this.setState({
isOpened: false
});
}

handleAtDrawer = () => {
this.setState({
show: false
});
}

render() {

return (

this.setState({ show: true })}>AtDrawer

123
this.setState({ isOpened: true })}>AtFloatLayout

这是内容区 随你怎么写这是内容区 随你怎么写这是内容区 随你怎么写这是内容区
随你怎么写这是内容区 随你怎么写这是内容区 随你怎么写



);
}
}
```

### 报错信息

无报错

### 系统信息

Taro CLI 3.6.20 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 16.20.2 - D:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.19.4 - D:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.20 => 3.6.20
@tarojs/components: 3.6.20 => 3.6.20
@tarojs/helper: 3.6.20 => 3.6.20
@tarojs/plugin-framework-react: 3.6.20 => 3.6.20
@tarojs/plugin-platform-h5: 3.6.20 => 3.6.20
@tarojs/plugin-platform-weapp: 3.6.20 => 3.6.20
@tarojs/react: 3.6.20 => 3.6.20
@tarojs/router: 3.6.20 => 3.6.20
@tarojs/runtime: 3.6.20 => 3.6.20
@tarojs/shared: 3.6.20 => 3.6.20
@tarojs/taro: 3.6.20 => 3.6.20
@tarojs/taro-h5: 3.6.20 => 3.6.20
@tarojs/webpack5-runner: 3.6.20 => 3.6.20
babel-preset-taro: 3.6.20 => 3.6.20
eslint-config-taro: 3.6.20 => 3.6.20
react: 17.0.2 => 17.0.2
taro-ui: ^3.1.0-beta.4 => 3.2.0

### 补充信息

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.