🐛 修复 windows 文件备份失败.

This commit is contained in:
lijiahangmax
2024-07-14 21:24:53 +08:00
parent 849e010bc3
commit c20c83245f
12 changed files with 68 additions and 20 deletions

View File

@@ -50,7 +50,11 @@
// 打开新增
const open = (session: string, path: string, isTouch: boolean) => {
sessionId.value = session;
formModel.value.path = path;
if (path === '/') {
formModel.value.path = path;
} else {
formModel.value.path = path + '/';
}
touch.value = isTouch;
setVisible(true);
// 自动聚焦

View File

@@ -285,12 +285,12 @@
// 创建文件
const createFile = () => {
openSftpCreateModal(props.session?.sessionId as string, props.currentPath + '/', true);
openSftpCreateModal(props.session?.sessionId as string, props.currentPath, true);
};
// 创建文件夹
const createDir = () => {
openSftpCreateModal(props.session?.sessionId as string, props.currentPath + '/', false);
openSftpCreateModal(props.session?.sessionId as string, props.currentPath, false);
};
// 删除选中文件

View File

@@ -106,7 +106,8 @@
return false;
}
if (!fileList.value.length) {
return true;
Message.error('请选择文件');
return false;
}
// 添加到上传列表
const files = fileList.value.map(s => s.file as File);
@@ -168,6 +169,10 @@
margin-right: 0 !important;
}
:deep(.arco-upload-list-item-name-link) {
width: 100%;
}
:deep(.arco-upload-list-item-name-text) {
width: 100%;
}

View File

@@ -3,7 +3,7 @@ import { TransferOperatorType, TransferStatus } from '../types/terminal.const';
import { getFileName, getPath } from '@/utils/file';
import { saveAs } from 'file-saver';
// sftp 上传器实现
// sftp 下载器实现
export default class SftpTransferDownloader implements ISftpTransferDownloader {
public abort: boolean;