修复: 切换到SFTP设置页面时使用switchView方法

- 修正switchStorage方法中跳转设置页面的逻辑
- 从直接修改currentView改为调用switchView方法
- 确保视图切换时正确触发数据加载(如SFTP配置表单)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
WanWanYun
2025-11-12 22:59:29 +08:00
parent a791569b17
commit fd52594b83

View File

@@ -1581,7 +1581,7 @@ handleDragLeave(e) {
if (type === 'sftp' && !this.user.has_ftp_config) { if (type === 'sftp' && !this.user.has_ftp_config) {
const goToSettings = confirm('您还未配置SFTP服务器。\n\n是否现在前往设置页面进行配置配置完成后将自动切换到SFTP存储。'); const goToSettings = confirm('您还未配置SFTP服务器。\n\n是否现在前往设置页面进行配置配置完成后将自动切换到SFTP存储。');
if (goToSettings) { if (goToSettings) {
this.currentView = 'settings'; this.switchView('settings');
} }
return; return;
} }