We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vben Admin V5
当菜单(一级、二级)比较多 出现了滚动条。
第一种:如果指定的homePath 比较靠后 第二种:当前进入了比较靠后的 菜单节点,进行刷新浏览器
期望能够自动滚动到 高亮的菜单处
使用 scrollIntoView API 粗暴示意
scrollIntoView
// app.vue onMounted(() => { setTimeout(() => { document.querySelectorAll('aside .is-active').forEach((item) => { item.scrollIntoView({ behavior: 'smooth' }); }); }, 500); });
No response
The text was updated successfully, but these errors were encountered:
菜单项如果比较多,点击 标签 ,也希望 左侧菜单能自动滚动到高亮处
为了防止做框架层面的大量修改,目前我暂时在 apps/web-ele/app.vue 下简单使用以下代码,实现 上述提到的 需求。
apps/web-ele/app.vue
watch( () => route.path, () => { setTimeout(() => { document.querySelectorAll('aside .is-active').forEach((item) => { item.scrollIntoView({ behavior: 'smooth' }); }); }, 500); }, );
也许这个功能,可以做成一个偏好设置。
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Version
Vben Admin V5
Description
当菜单(一级、二级)比较多 出现了滚动条。
第一种:如果指定的homePath 比较靠后
第二种:当前进入了比较靠后的 菜单节点,进行刷新浏览器
期望能够自动滚动到 高亮的菜单处
Proposed Solution
使用
scrollIntoView
API 粗暴示意Alternatives Considered
No response
Additional Context
No response
Validations
The text was updated successfully, but these errors were encountered: