diff --git a/src/views/manage-add/index.vue b/src/views/manage-add/index.vue index 4f6fbe0..1c78e58 100644 --- a/src/views/manage-add/index.vue +++ b/src/views/manage-add/index.vue @@ -1,519 +1,592 @@ \ No newline at end of file + diff --git a/src/views/manage-info/index.vue b/src/views/manage-info/index.vue index 301c930..b494dfe 100644 --- a/src/views/manage-info/index.vue +++ b/src/views/manage-info/index.vue @@ -22,7 +22,7 @@ -
+
= 0; i--) { + const element = document.getElementById(this.sections[i].id); + if (element) { + // 计算元素相对于滚动容器的位置 + const elementPosition = element.offsetTop - container.offsetTop; + + if (elementPosition <= scrollPosition) { + if (this.activeSection !== this.sections[i].id) { + this.activeSection = this.sections[i].id; + } + break; + } + } + } + }, // 子组件的 handleDataUpdate(dataKey, updatedData) { if (dataKey === 'projectOtherInfos' || dataKey === 'wysmxInformations') {