Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-10-31 13:51:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
497b3de7de15dd5708e240b925eae9188e7b6542
497b3de7
1 parent
73a5a1ee
fix 头部菜单栏可能显示错误问题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
src/components/common/hagerHeader.vue
src/components/common/hagerHeader.vue
View file @
497b3de
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-
29 14:56:57
* @LastEditTime: 2024-10-
31 13:50:28
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -284,13 +284,13 @@ export default {
return false; // 元素被挡住或部分被遮挡
}
}
var $productRightWrapper = $('.product-right-wrapper');
this.$nextTick(() => {
var $productRightWrapper = $('.product-right-wrapper');
if (isElementVisible($productRightWrapper)) {
console.log(".product-right-wrapper 完全可见");
} else {
console.log(".product-right-wrapper 被部分或完全遮挡");
this.$nextTick(() => {
if (isElementVisible($productRightWrapper)) {
console.log(".product-right-wrapper 完全可见");
} else {
console.log(".product-right-wrapper 被部分或完全遮挡");
const productRightWrapper = document.querySelector('.product-right-wrapper');
// 获取窗口的高度
const windowHeight = $(window).height();
...
...
@@ -299,8 +299,8 @@ export default {
const availableHeight = windowHeight - topOffset;
// 设置 .product-right-wrapper 的最大高度,确保不会溢出窗口
productRightWrapper.style.height = availableHeight + 'px';
}
)
}
}
}
)
},
onClick (item, index) {
this.product_info = item.children;
...
...
Please
register
or
login
to post a comment