From 1c58e498c5ac03d86425cc56ef680be14ae3993c Mon Sep 17 00:00:00 2001 From: WanWanYun Date: Wed, 12 Nov 2025 23:20:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0SFTP=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E5=93=8D=E5=BA=94=E7=9A=84=E6=A0=B9=E6=9C=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题分析: 1. SFTP配置区域的v-if条件包含了storageType检查 2. 当用户为local存储时,SFTP配置区域被隐藏 3. 即使跳转到settings页面,用户也看不到SFTP配置表单 修复内容: 1. 移除SFTP配置区域v-if中的storageType检查 2. 只要用户权限允许SFTP,配置区域就始终可见 3. 添加id属性,方便定位和滚动 4. 在switchStorage中添加平滑滚动到SFTP配置区域的逻辑 5. 使用$nextTick确保DOM更新后再滚动 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend/app.html | 2 +- frontend/app.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/app.html b/frontend/app.html index 7bd7339..e3f52d4 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -1005,7 +1005,7 @@ -
+

SFTP配置

请配置SFTP服务器 diff --git a/frontend/app.js b/frontend/app.js index 1921b52..d182048 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -1587,6 +1587,13 @@ handleDragLeave(e) { if (this.user && !this.user.is_admin) { this.loadFtpConfig(); } + // 等待DOM更新后滚动到SFTP配置区域 + this.$nextTick(() => { + const sftpSection = document.getElementById('sftp-config-section'); + if (sftpSection) { + sftpSection.scrollIntoView({ behavior: 'smooth', block: 'start' }); + } + }); } return; }