Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs 高度问题 如第一个 TabPane 不设置高度 之后的 TabPane 都固定高度为0 内容无法显示 #149

Closed
dorthl opened this issue Dec 10, 2018 · 6 comments
Assignees

Comments

@dorthl
Copy link

dorthl commented Dec 10, 2018

Version

0.9.10

Environment

浏览器

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-mobile-start-t6vjw4

Steps to reproduce

Tabs 中 TabPane 不设置高度 由内容体撑起高度

What is expected?

由于 业务需求 这边期望 TabPane 里面的 内容是异步加载的 高度为不确定 如果设置了固定高度内容无法正常显示

What is actually happening?

如实例

Other?

@fisherspy
Copy link
Collaborator

@TombarthiteL 目前TabPane(React与Angular版本)在设计时就需要写明高度,对于动态内容你可以尝试先指定一个min-height,如果不行的话我们这边看看该如何处理,有可能需要修改组件实现。

@fisherspy fisherspy self-assigned this Dec 10, 2018
@dorthl
Copy link
Author

dorthl commented Dec 10, 2018

@fisherspy 谢谢 我在使用 min-height 之后 第一个TabPane的 高度可以自适应 但之后的TabPane还是 根据第一个设置的高度显示 在style中重新设置也没用
还有就是这边 默认 组件的style 在调用时都不需要另外定义的 通常都会有一个默认值 如 ng-zorro-antd,这边在使用 Badge这个组件的时候 发现红点总是会覆盖掉下面的文字 直到我在示例中发现了 /deep/... 类似的 在 ng-zorro-antd 这通常会是一个属性 而且具有默认值 (一个小建议)

@dorthl
Copy link
Author

dorthl commented Dec 10, 2018

@fisherspy 还有就是刚才在使用 Badge中 我发现 Badge 并不能异步的去设置 dot text 等属性 比如当业务满足需求的时候 dot 为 true 不满足为 false 这通常是异步获取的数据 默认是 false 加载数据完成后设置为 true 结果 Badge的高度被设置为文字高度 当异步回来之后 显示的小红点会直接覆盖掉下面的文字 text 也是一样 如果之前设置为null 之后再设置文字 高度只会是下面文字的高度

@fisherspy
Copy link
Collaborator

@TombarthiteL 感谢建议,这些可以分别给我们提issue。

@fisherspy
Copy link
Collaborator

#399

@fisherspy
Copy link
Collaborator

fisherspy commented Apr 29, 2019

@TombarthiteL 看0.12.0版本是否满足需求。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants