mirror of
https://github.com/MCSManager/UI.git
synced 2025-02-17 18:39:30 +08:00
fix: 触发右键菜单位置
This commit is contained in:
parent
40a1210a87
commit
bf1afe50df
@ -1,10 +1,8 @@
|
||||
<template>
|
||||
<div v-menus:right="menus">
|
||||
<Panel>
|
||||
<div>
|
||||
<Panel v-menus:right="menus">
|
||||
<template #title>
|
||||
<span id="fileManagerTop">
|
||||
{{ $t("fileManager.title") }}
|
||||
</span>
|
||||
<span id="fileManagerTop">{{ $t("fileManager.title") }}</span>
|
||||
</template>
|
||||
<template #default>
|
||||
<div>
|
||||
@ -24,9 +22,7 @@
|
||||
:style="{ 'padding-left': index == 0 ? '8px' : '4px' }"
|
||||
v-if="item"
|
||||
@click="changeDir(item.value)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</div>
|
||||
>{{ item.label }}</div>
|
||||
<i class="el-icon-arrow-right" v-if="index < currentDirArray.length - 1"></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -35,60 +31,71 @@
|
||||
<FunctionGroup :container="true">
|
||||
<FunctionComponent>
|
||||
<el-button size="small" type="primary" plain @click="back">
|
||||
<i class="el-icon-pie-chart"></i> {{ $t("schedule.backToConsole") }}
|
||||
<i class="el-icon-pie-chart"></i>
|
||||
{{ $t("schedule.backToConsole") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="refresh">
|
||||
<i class="el-icon-refresh"></i> {{ $t("general.refresh") }}
|
||||
<i class="el-icon-refresh"></i>
|
||||
{{ $t("general.refresh") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
|
||||
<FunctionGroup align="right">
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="touch">
|
||||
<i class="el-icon-document-add"></i> {{ $t("fileManager.touch") }}
|
||||
<i class="el-icon-document-add"></i>
|
||||
{{ $t("fileManager.touch") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="mkdir">
|
||||
<i class="el-icon-folder-add"></i> {{ $t("fileManager.mkdir") }}
|
||||
<i class="el-icon-folder-add"></i>
|
||||
{{ $t("fileManager.mkdir") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="compress(1)">
|
||||
<i class="el-icon-box"></i> {{ $t("fileManager.zip") }}
|
||||
<i class="el-icon-box"></i>
|
||||
{{ $t("fileManager.zip") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="compress(2)">
|
||||
<i class="el-icon-files"></i> {{ $t("fileManager.unzip") }}
|
||||
<i class="el-icon-files"></i>
|
||||
{{ $t("fileManager.unzip") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="rename">
|
||||
<i class="el-icon-document"></i> {{ $t("fileManager.rename") }}
|
||||
<i class="el-icon-document"></i>
|
||||
{{ $t("fileManager.rename") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="move">
|
||||
<i class="el-icon-scissors"></i> {{ $t("fileManager.cut") }}
|
||||
<i class="el-icon-scissors"></i>
|
||||
{{ $t("fileManager.cut") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="copy">
|
||||
<i class="el-icon-document-copy"></i> {{ $t("fileManager.copy") }}
|
||||
<i class="el-icon-document-copy"></i>
|
||||
{{ $t("fileManager.copy") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" @click="paste">
|
||||
<i class="el-icon-tickets"></i> {{ $t("fileManager.paste") }}
|
||||
<i class="el-icon-tickets"></i>
|
||||
{{ $t("fileManager.paste") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
<FunctionComponent>
|
||||
<el-button size="small" type="danger" @click="deleteFiles">
|
||||
<i class="el-icon-document-delete"></i> {{ $t("general.delete") }}
|
||||
<i class="el-icon-document-delete"></i>
|
||||
{{ $t("general.delete") }}
|
||||
</el-button>
|
||||
</FunctionComponent>
|
||||
</FunctionGroup>
|
||||
@ -104,12 +111,13 @@
|
||||
style="display: inline-block"
|
||||
>
|
||||
<el-button size="small" type="success" @click="upload">
|
||||
<i class="el-icon-plus"></i> {{ $t("fileManager.uploadFile") }}
|
||||
<i class="el-icon-plus"></i>
|
||||
{{ $t("fileManager.uploadFile") }}
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</FunctionComponent>
|
||||
</FunctionGroup></el-col
|
||||
>
|
||||
</FunctionGroup>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -123,9 +131,7 @@
|
||||
@click="toDisk(item)"
|
||||
type="success"
|
||||
plain
|
||||
>
|
||||
{{ $t("fileManager.disk") }} {{ item }}
|
||||
</el-button>
|
||||
>{{ $t("fileManager.disk") }} {{ item }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -135,19 +141,13 @@
|
||||
<span>
|
||||
<i class="el-icon-loading"></i>
|
||||
</span>
|
||||
<span>
|
||||
{{ $t("fileManager.unzipInfo", { tasks: statusInfo.instanceFileTask }) }}</span
|
||||
>
|
||||
<span>{{ $t("fileManager.unzipInfo", { tasks: statusInfo.instanceFileTask }) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-mt" v-show="percentComplete > 0">
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="14"
|
||||
:percentage="percentComplete"
|
||||
></el-progress>
|
||||
<el-progress :text-inside="true" :stroke-width="14" :percentage="percentComplete"></el-progress>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
@ -159,7 +159,7 @@
|
||||
@selection-change="selectionChange"
|
||||
@row-contextmenu="fileRightClick"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="name" :label="$t('fileManager.name')" min-width="240">
|
||||
<template #default="scope">
|
||||
<div
|
||||
@ -176,56 +176,46 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="typeText"
|
||||
:label="$t('fileManager.fileType')"
|
||||
width="120"
|
||||
></el-table-column>
|
||||
<el-table-column prop="typeText" :label="$t('fileManager.fileType')" width="120"></el-table-column>
|
||||
<el-table-column :label="$t('fileManager.fileSize')" width="110">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.size > 1024 * 1024 * 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024 / 1024 / 1024).toFixed(0) }} GB</span
|
||||
>
|
||||
<span v-if="scope.row.size > 1024 * 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024 / 1024).toFixed(0) }} MB</span
|
||||
>
|
||||
<span v-else-if="scope.row.size > 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024).toFixed(0) }} KB</span
|
||||
>
|
||||
<span v-else-if="scope.row.size > 0"
|
||||
>{{ Number(Number(scope.row.size)).toFixed(0) }} B</span
|
||||
>
|
||||
<span
|
||||
v-if="scope.row.size > 1024 * 1024 * 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024 / 1024 / 1024).toFixed(0) }} GB</span>
|
||||
<span
|
||||
v-if="scope.row.size > 1024 * 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024 / 1024).toFixed(0) }} MB</span>
|
||||
<span
|
||||
v-else-if="scope.row.size > 1024"
|
||||
>{{ Number(Number(scope.row.size) / 1024).toFixed(0) }} KB</span>
|
||||
<span v-else-if="scope.row.size > 0">{{ Number(Number(scope.row.size)).toFixed(0) }} B</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="!isWindows" :label="$t('general.permission')" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.mode }}
|
||||
</template>
|
||||
<template #default="scope">{{ scope.row.mode }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="timeText"
|
||||
:label="$t('fileManager.lastEdit')"
|
||||
width="160"
|
||||
></el-table-column>
|
||||
<el-table-column prop="timeText" :label="$t('fileManager.lastEdit')" width="160"></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('general.operate')"
|
||||
style="text-align: center"
|
||||
:width="isWindows ? 180 : 220"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button size="mini" v-if="!isWindows" @click="toEditFilePermission(scope.row)">
|
||||
{{ $t("general.permission") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="!isWindows"
|
||||
@click="toEditFilePermission(scope.row)"
|
||||
>{{ $t("general.permission") }}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
:disabled="scope.row.type != 1"
|
||||
@click="toEditFilePage(scope.row)"
|
||||
>
|
||||
{{ $t("general.edit") }}
|
||||
</el-button>
|
||||
<el-button size="mini" :disabled="scope.row.type != 1" @click="download(scope.row)">
|
||||
{{ $t("fileManager.download") }}
|
||||
</el-button>
|
||||
>{{ $t("general.edit") }}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
:disabled="scope.row.type != 1"
|
||||
@click="download(scope.row)"
|
||||
>{{ $t("fileManager.download") }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
Loading…
Reference in New Issue
Block a user