修复: 解决切换到SFTP配置页面无响应的根本问题
问题分析: 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user