mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决选择单个文件复制再选多个文件之后显示异常的问题 (#2852)
This commit is contained in:
parent
7082e2fa43
commit
253776d6fe
@ -955,7 +955,7 @@ const message = {
|
||||
downloading: 'Downloading...',
|
||||
infoDetail: 'File Properties',
|
||||
list: 'File List',
|
||||
sub: 'Include subdirectory',
|
||||
sub: 'Subdirectory',
|
||||
downlodSuccess: 'Download Success',
|
||||
theme: 'Theme',
|
||||
language: 'Language',
|
||||
|
@ -919,7 +919,7 @@ const message = {
|
||||
infoDetail: '文件屬性',
|
||||
root: '根目錄',
|
||||
list: '文件列表',
|
||||
sub: '包含子目錄',
|
||||
sub: '子目錄',
|
||||
downlodSuccess: '下載完成',
|
||||
theme: '主題',
|
||||
language: '語言',
|
||||
|
@ -920,7 +920,7 @@ const message = {
|
||||
infoDetail: '文件属性',
|
||||
root: '根目录',
|
||||
list: '文件列表',
|
||||
sub: '包含子目录',
|
||||
sub: '子目录',
|
||||
downlodSuccess: '下载完成',
|
||||
theme: '主题',
|
||||
language: '语言',
|
||||
|
@ -95,7 +95,9 @@
|
||||
|
||||
<el-button-group class="copy-button" v-if="moveOpen">
|
||||
<el-tooltip class="box-item" effect="dark" :content="$t('file.paste')" placement="bottom">
|
||||
<el-button plain @click="openPaste">{{ $t('file.paste') }}</el-button>
|
||||
<el-button plain @click="openPaste">
|
||||
{{ $t('file.paste') }}({{ fileMove.count }})
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" :content="$t('file.cancel')" placement="bottom">
|
||||
<el-button plain class="close" @click="closeMove">
|
||||
@ -369,7 +371,7 @@ const codeReq = reactive({ path: '', expand: false, page: 1, pageSize: 100 });
|
||||
const fileUpload = reactive({ path: '' });
|
||||
const fileRename = reactive({ path: '', oldName: '' });
|
||||
const fileWget = reactive({ path: '' });
|
||||
const fileMove = reactive({ oldPaths: [''], type: '', path: '', name: '' });
|
||||
const fileMove = reactive({ oldPaths: [''], type: '', path: '', name: '', count: 0 });
|
||||
const processPage = reactive({ open: false });
|
||||
|
||||
const createRef = ref();
|
||||
@ -690,10 +692,12 @@ const openRename = (item: File.File) => {
|
||||
|
||||
const openMove = (type: string) => {
|
||||
fileMove.type = type;
|
||||
fileMove.name = '';
|
||||
const oldpaths = [];
|
||||
for (const s of selects.value) {
|
||||
oldpaths.push(s['path']);
|
||||
}
|
||||
fileMove.count = selects.value.length;
|
||||
fileMove.oldPaths = oldpaths;
|
||||
if (selects.value.length == 1) {
|
||||
fileMove.name = selects.value[0].name;
|
||||
@ -706,6 +710,7 @@ const closeMove = () => {
|
||||
tableRef.value.clearSelects();
|
||||
fileMove.oldPaths = [];
|
||||
fileMove.name = '';
|
||||
fileMove.count = 0;
|
||||
moveOpen.value = false;
|
||||
};
|
||||
|
||||
|
@ -140,6 +140,7 @@ const acceptParams = async (props: MoveProps) => {
|
||||
addForm.oldPaths = props.oldPaths;
|
||||
addForm.type = props.type;
|
||||
addForm.newPath = props.path;
|
||||
addForm.name = '';
|
||||
type.value = props.type;
|
||||
if (props.name && props.name != '') {
|
||||
oldName.value = props.name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user