jd-opensource / jd-opensource/taro-ui
AtTabs, AtTabsPane,组件布局问题
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**问题描述**
```
需求为常见的一个订单列表页面,需要使用tabs进行不同状态的订单展示,需要使用scrollView进行上拉分页获取数据,再结合scrollView的时候,由于scrollView需要固定高度所以修改类名:
AtTabs样式:
display: flex;
flex-direction: column;
height: 100%;
.at-tabs__body:
flex: 1;
overflow:hidden;
.at-tabs-pane:
height:100%;
这个时候会造成一个问题 由于.at-tabs__body设置了超出隐藏,所以在切换tabs的时候,无法显示除第一个tab以外的其他页面。
但实际上在设计这种组件的时候,不是应该分为三个部分,wrapper,content,content-view这三个部分的么。wrapper为显示视图,content为并行排列的视图容器,content-view为每个tab的视图, 现在看来是由于少了一层content,直接在wrapper上进行transform:translate3d的操作了。
```
**复现步骤**
无
**期望行为**
期望进行修改组件,这样在组合使用的时候会更好
**报错信息**
**系统信息**
Taro CLI 3.0.9 environment info:
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.4 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 3.0.8 => 3.0.8
@tarojs/mini-runner: 3.0.8 => 3.0.8
@tarojs/react: 3.0.8 => 3.0.8
@tarojs/runtime: 3.0.8 => 3.0.8
@tarojs/taro: 3.0.8 => 3.0.8
@tarojs/webpack-runner: 3.0.8 => 3.0.8
babel-preset-taro: 3.0.8 => 3.0.8
eslint-config-taro: 3.0.8 => 3.0.8
react: ^16.10.0 => 16.13.1
taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.3
npmGlobalPackages:
typescript: 3.1.6
**补充信息**
Contributor guide
Research direction
Start by inspecting the AtTabs and AtTabsPane component styles and layout described in the issue, especially the wrapper, .at-tabs__body, and pane behavior with scrollView. Reproduce the fixed-height scrollView case if possible; done means switching tabs displays every pane correctly while preserving the requested scrolling and pagination layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100