首页切换导航bug修复
This commit is contained in:
@@ -678,7 +678,9 @@ async function loadData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scrollBottom() {
|
function scrollBottom() {
|
||||||
|
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
||||||
loadmoreRef.value.change('loading');
|
loadmoreRef.value.change('loading');
|
||||||
|
}
|
||||||
if (state.tabIndex === 'all') {
|
if (state.tabIndex === 'all') {
|
||||||
getJobRecommend();
|
getJobRecommend();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -229,7 +229,13 @@ export default {
|
|||||||
query
|
query
|
||||||
.select(`#waterfalls_flow_column_${i}`)
|
.select(`#waterfalls_flow_column_${i}`)
|
||||||
.boundingClientRect((data) => {
|
.boundingClientRect((data) => {
|
||||||
|
// 添加 null 检查,防止 data 为 null 时访问 height 属性
|
||||||
|
if (data && data.height !== undefined) {
|
||||||
heightArr.push({ column: i, height: data.height });
|
heightArr.push({ column: i, height: data.height });
|
||||||
|
} else {
|
||||||
|
// 如果元素不存在或高度未定义,使用默认高度 0
|
||||||
|
heightArr.push({ column: i, height: 0 });
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.exec(() => {
|
.exec(() => {
|
||||||
if (this.data.column <= heightArr.length) {
|
if (this.data.column <= heightArr.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user