| | |
| | | query.select('.select-site').boundingClientRect(rect => { |
| | | if (rect) { |
| | | const contentHeight = rect.height; |
| | | const baseHeight = 266; |
| | | const baseHeight = bannerList.length > 0 ? 266 : contentHeight; |
| | | fullHeight.current = Math.max(contentHeight, baseHeight); |
| | | minHeight.current = baseHeight; |
| | | setBoxHeight(baseHeight); |
| | | } else { |
| | | // 兜底逻辑 |
| | | minHeight.current = 266; |
| | | fullHeight.current = 266; |
| | | setBoxHeight(266); |
| | | const baseHeight = bannerList.length > 0 ? 266 : 0; |
| | | minHeight.current = baseHeight; |
| | | fullHeight.current = baseHeight; |
| | | setBoxHeight(baseHeight); |
| | | } |
| | | }).exec(); |
| | | }, 500); |