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

fix(components): [tabs] Layout issues #16894

Closed
wants to merge 1 commit into from

Conversation

Yolo-00
Copy link

@Yolo-00 Yolo-00 commented May 17, 2024

修复 tabs 组件 addable 设置为 true 时导致的布局问题
fix #16835

Copy link

👋 @Yolo-00, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels May 17, 2024
Copy link

github-actions bot commented May 17, 2024

Copy link

Hello @Yolo-00, thank you for contributing to element-plus, please see our guideline to see how to make contribution

Copy link

🧪 Playground Preview: https://element-plus.run/?pr=16894
Please comment the example via this playground if needed.

@btea
Copy link
Collaborator

btea commented May 19, 2024

There is also a problem with your adjusted layout. The add button should be at the bottom.

image

@Yolo-00
Copy link
Author

Yolo-00 commented May 20, 2024

  1. 当前pr修复的是 tabs 组件 addable 为 true ,tab-position 为 left 时导致的 添加按钮布局问题

image

  1. 之前的线上版本设计的是 tab-position 为 right 时 添加按钮在右侧显示,所以我以为 left 时应该在左侧

image

@Yolo-00
Copy link
Author

Yolo-00 commented May 20, 2024

目前的组件设计好像也不太满足添加按钮放置底部的设计

image

@btea
Copy link
Collaborator

btea commented May 22, 2024

According to my understanding, perhaps it should be added below. But it seems a bit strange, so let's ask more people for their opinions. cc @element-plus/backers

@Yolo-00
Copy link
Author

Yolo-00 commented May 23, 2024

我调研了几个别的组件库,他们的设计理念是 不管 tabs 所在位置是 top || right || bottom || left , 他们的新增按钮都是跟随在选项卡后面的

image

@btea
Copy link
Collaborator

btea commented May 24, 2024

在左侧的时候我们可以考虑新增按钮放在选项卡下面,默认情况不变。

@Yolo-00
Copy link
Author

Yolo-00 commented May 24, 2024

这样的布局是否可以接受?

image

@btea
Copy link
Collaborator

btea commented May 25, 2024

看起来可以。 👍

@Yolo-00 Yolo-00 closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants