wkw před 7 měsíci
rodič
revize
930871896b
1 změnil soubory, kde provedl 19 přidání a 3 odebrání
  1. 19 3
      src/views/search/index.vue

+ 19 - 3
src/views/search/index.vue

@@ -13,7 +13,7 @@
 							<div class="tabs flex align-center">
 								<!-- 可横向滚动区域 -->
 								<div class="tabs-box">
-									<div class="tabs-box-inner">
+									<div class="tabs-box-inner" ref="tabsBoxInner">
 										<div v-for="(item, index) in tabs" :key="index" class="tabs-box-item"
 											:class="tabsCurr === index ? 'tabs-box-item-active' : ''"
 											@click="selectTabs(index)">
@@ -31,7 +31,7 @@
 
 							<div class="condizione-box-c-search flex justify-between">
 								<div class="condizione-box-c-search-in flex align-center justify-center">
-									<el-dropdown style="flex-shrink: 0;margin-left: 10px;line-height: 0;">
+									<el-dropdown style="flex-shrink: 0;margin-left: 10px;line-height:32px;">
 										<span class="el-dropdown-link">
 											{{ searchType }}
 											<el-icon class="el-icon--right">
@@ -405,7 +405,7 @@ export default {
 			city: '', //当前选中的地区
 			jobDataList: [], //岗位列表
 			page: 1, //分页
-			limit: 10, //每页条数
+			limit: 5, //每页条数
 			pages: 1, //总页数
 			loading: false, //加载工
 			isTop: false,
@@ -481,6 +481,22 @@ export default {
 		},
 		selectTabs(index) {
 			this.tabsCurr = index;
+			
+			// 滚动到选中的标签页,确保其在可视区域内
+			this.$nextTick(() => {
+				if (this.$refs.tabsBoxInner) {
+					const tabsBoxInner = this.$refs.tabsBoxInner;
+					const selectedTab = tabsBoxInner.children[index];
+					if (selectedTab) {
+						selectedTab.scrollIntoView({
+							behavior: 'smooth',
+							block: 'nearest',
+							inline: 'center'
+						});
+					}
+				}
+			});
+			
 			//重新获取岗位
 			this.page = 1
 			this.getUserList()