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

Menu 压缩后,弹出子菜单过长时内部无滚动 #2885

Closed
Air-Cooled opened this issue May 4, 2022 · 4 comments
Closed

Menu 压缩后,弹出子菜单过长时内部无滚动 #2885

Air-Cooled opened this issue May 4, 2022 · 4 comments

Comments

@Air-Cooled
Copy link

TuSimple/naive-ui version (版本)

2.28.2

Vue version (Vue 版本)

3.2.33

Browser and its version (浏览器及其版本)

Chrome(101.0.4951.54)

System and its version (系统及其版本)

win 10

Node version (Node 版本)

v16.13.2

Reappearance steps (重现步骤)

动画15

Expected results (期望的结果)

弹出框高度不要超出可视区

@github-actions github-actions bot added the untriaged need to sort label May 4, 2022
@07akioni
Copy link
Collaborator

07akioni commented May 4, 2022

未来会想办法优化一下,不过建议不要放这么多 item 进去

@07akioni 07akioni added priority: low and removed untriaged need to sort labels May 4, 2022
@Yhspehy
Copy link
Contributor

Yhspehy commented Jul 6, 2022

在下个版本可以使用dropdown-props来开启滚动和设置滚动高度
:dropdown-props="{ scrollable: true, menuProps: () => ({ style: 'max-height: 100px;' }) }"

@u10k
Copy link

u10k commented Aug 6, 2022

在下个版本可以使用dropdown-props来开启滚动和设置滚动高度 :dropdown-props="{ scrollable: true, menuProps: () => ({ style: 'max-height: 100px;' }) }"

应该是
:menu-props="() => ({ style: { maxHeight: '200px', overflow: 'auto' }})"

如果能用嵌套组件n-scrollbar 实现就更好了

@XieZongChen
Copy link
Collaborator

在下个版本可以使用dropdown-props来开启滚动和设置滚动高度 :dropdown-props="{ scrollable: true, menuProps: () => ({ style: 'max-height: 100px;' }) }"

应该是 :menu-props="() => ({ style: { maxHeight: '200px', overflow: 'auto' }})"

如果能用嵌套组件n-scrollbar 实现就更好了

用 scrollable 那个是推荐的解决方式

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

No branches or pull requests

5 participants