diff --git a/src/views/apartmentDetail.vue b/src/views/apartmentDetail.vue index 22bb015..5a4d71b 100644 --- a/src/views/apartmentDetail.vue +++ b/src/views/apartmentDetail.vue @@ -225,7 +225,7 @@
{{ item.alias }}
- +
@@ -844,11 +844,13 @@ let annexSchoolList = ref([]) // 附近院校数据 let academyPitchIndex = ref(0) // 附近学校距离选中院校 下标 let targetAcademyPitch = ref({}) // 附近学校距离选中院校 数据 let specialSchoolDistance = ref(null) // 特殊的 用户带有school参数 则需要特殊显示 学校距离 +const elscrollbarRef = ref(null) // 滚动条 // 选择附近学校距离的学校下标 const selectAcademyIndex = index => { academyPitchIndex.value = index || 0 targetAcademyPitch.value = annexSchoolList.value[academyPitchIndex.value] + elscrollbarRef.value.setScrollTop(0) } // 选择附近学校距离的学校下标 diff --git a/src/views/detail.vue b/src/views/detail.vue index 4edef15..5249644 100644 --- a/src/views/detail.vue +++ b/src/views/detail.vue @@ -363,7 +363,7 @@
{{ item.alias }}
- +
@@ -1309,13 +1309,17 @@ let annexSchoolList = ref([]) // 附近院校数据 let academyPitchIndex = ref(0) // 附近学校距离选中院校 下标 let targetAcademyPitch = ref({}) // 附近学校距离选中院校 数据 let specialSchoolDistance = ref(null) // 特殊的 用户带有school参数 则需要特殊显示 学校距离 +const elscrollbarRef = ref(null) // 滚动条 // 选择附近学校距离的学校下标 const selectAcademyIndex = index => { academyPitchIndex.value = index || 0 targetAcademyPitch.value = annexSchoolList.value[academyPitchIndex.value] + elscrollbarRef.value.setScrollTop(0) } + + // 选择附近学校距离的学校下标 const selectIndex = id => { if (!id) id = pitchSchool