diff --git a/dashboard/src/components/platform/AddNewPlatform.vue b/dashboard/src/components/platform/AddNewPlatform.vue index 549c818de..c537dc529 100644 --- a/dashboard/src/components/platform/AddNewPlatform.vue +++ b/dashboard/src/components/platform/AddNewPlatform.vue @@ -2,7 +2,7 @@ - +
@@ -74,7 +74,7 @@ 默认使用默认配置文件 “default”。您也可以稍后配置。
- + {{ showConfigSection ? 'mdi-chevron-up' : 'mdi-chevron-down' }}
@@ -491,6 +491,11 @@ export default { if (newValue && !this.updatingMode && this.aBConfigRadioVal === '0') { this.getConfigForPreview(this.selectedAbConfId); } + if (newValue) { + this.$nextTick(() => { + this.scrollDialogToBottom(); + }); + } }, // 监听编辑模式变化,自动展开配置文件部分 updatingMode: { @@ -923,6 +928,9 @@ export default { toggleEditMode() { this.isEditingRoutes = !this.isEditingRoutes; }, + toggleConfigSection() { + this.showConfigSection = !this.showConfigSection; + }, // 根据配置文件ID获取名称 getConfigName(configId) { @@ -960,6 +968,19 @@ export default { if (this.updatingMode && this.updatingPlatformConfig && this.updatingPlatformConfig.id) { this.getPlatformConfigs(this.updatingPlatformConfig.id); } + }, + scrollDialogToBottom() { + const containerRef = this.$refs.dialogScrollContainer; + const el = containerRef?.$el || containerRef; + if (!el) { + return; + } + const scrollOptions = { top: el.scrollHeight, behavior: 'smooth' }; + if (typeof el.scrollTo === 'function') { + el.scrollTo(scrollOptions); + } else { + el.scrollTop = el.scrollHeight; + } } },