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

设置itemAutoEquWidth为true时,智能等宽判断存在异常场景 #34

Closed
Rabtman opened this issue Feb 4, 2021 · 2 comments
Closed

Comments

@Rabtman
Copy link

Rabtman commented Feb 4, 2021

场景如下:

设置3个tab item,3个item宽度长短不一,当3个item宽相加的时候并没有超过屏幕宽度,此时进行3等分,等分之后其中一个item的宽度超过了等分后的宽度,造成了布局异常。

所以应该通过最大的item宽度乘以item总数来判断是否超过屏幕宽度。

这个问题已经提了个pr,麻烦作者有空合并一下。

🙏感谢作者的开源

@angcyo
Copy link
Owner

angcyo commented Feb 20, 2021

你这种场景, 是否考虑通过关闭itemAutoEquWidth特性解决?

如果采用通过最大的item宽度乘以item总数来判断是否超过屏幕宽度。,
这样就会出现场景: 用户就是需要等分, 宽度很长的item可以多行显示.

@Rabtman
Copy link
Author

Rabtman commented Feb 22, 2021

我的理解是如果用户需要等分,那么通过关闭itemAutoEquWidth,开启等分就好了。又或者对需要多行展示的某个item做一个最大宽度限定让其换行就好了,现在的判断的话我认为失去了这个属性真正的特性。
如果作者认为我的理解有误的话,那么就直接close吧。
感谢回答

@angcyo angcyo closed this as completed Jul 22, 2022
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