diff --git a/frontend/src/components/Config/ConfigList.vue b/frontend/src/components/Config/ConfigList.vue
index 7b7c7ffd..1c127ca3 100644
--- a/frontend/src/components/Config/ConfigList.vue
+++ b/frontend/src/components/Config/ConfigList.vue
@@ -538,6 +538,16 @@ export default {
},
onTabClick (tab) {
this.activeTab = tab.name
+ },
+ update () {
+ if (this.activeTab !== 'stages') return
+
+ // 手动显示tab下划线
+ const elBar = document.querySelector('.el-tabs__active-bar')
+ const elStages = document.querySelector('#tab-stages')
+ const totalWidth = Number(getComputedStyle(elStages).width.replace('px', ''))
+ const paddingRight = Number(getComputedStyle(elStages).paddingRight.replace('px', ''))
+ elBar.setAttribute('style', 'width:' + (totalWidth - paddingRight) + 'px')
}
},
created () {
diff --git a/frontend/src/views/spider/SpiderDetail.vue b/frontend/src/views/spider/SpiderDetail.vue
index b42e750d..29b531ef 100644
--- a/frontend/src/views/spider/SpiderDetail.vue
+++ b/frontend/src/views/spider/SpiderDetail.vue
@@ -13,8 +13,8 @@
-
-
+
+
@@ -77,6 +77,10 @@ export default {
setTimeout(() => {
this.$refs['spider-stats'].update()
}, 0)
+ } else if (this.activeTabName === 'config') {
+ setTimeout(() => {
+ this.$refs['config'].update()
+ }, 0)
}
this.$st.sendEv('爬虫详情', '切换标签', tab.name)
},