style: 更多下拉按钮放出

This commit is contained in:
TsMask
2023-10-26 16:59:04 +08:00
parent d3399e5b4f
commit 5a72287fca
3 changed files with 43 additions and 57 deletions

View File

@@ -189,6 +189,14 @@ const fileModalStateFrom = Form.useForm(
* 文件对话框弹出显示为 下发或激活
*/
function fnFileModalVisible(type: string | number, row: Record<string, any>) {
if (type === 'download') {
fnDownloadFile(row);
return;
}
if (type === 'delete') {
fnRecordDelete(row);
return;
}
if (type === 'send') {
fileModalState.title = t('views.configManage.softwareManage.sendTitle');
fileModalState.content = t(
@@ -689,15 +697,25 @@ onMounted(() => {
<template v-if="column.key === 'id'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.downloadText') }}</template>
<a-button type="link" @click.prevent="fnDownloadFile(record)">
<template #icon><DownloadOutlined /></template>
<template #title>
{{ t('views.configManage.softwareManage.sendBtn') }}
</template>
<a-button
type="link"
@click.prevent="fnFileModalVisible('send', record)"
>
<template #icon><SendOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.deleteText') }}</template>
<a-button type="link" @click.prevent="fnRecordDelete(record)">
<template #icon><DeleteOutlined /></template>
<template #title>
{{ t('views.configManage.softwareManage.runBtn') }}
</template>
<a-button
type="link"
@click.prevent="fnFileModalVisible('run', record)"
>
<template #icon><ThunderboltOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip>
@@ -713,13 +731,13 @@ onMounted(() => {
<a-menu
@click="({ key }:any) => fnFileModalVisible(key, record)"
>
<a-menu-item key="send">
<SendOutlined />
{{ t('views.configManage.softwareManage.sendBtn') }}
<a-menu-item key="download">
<DownloadOutlined />
{{ t('common.downloadText') }}
</a-menu-item>
<a-menu-item key="run">
<ThunderboltOutlined />
{{ t('views.configManage.softwareManage.runBtn') }}
<a-menu-item key="delete">
<DeleteOutlined />
{{ t('common.deleteText') }}
</a-menu-item>
<a-menu-item key="back">
<UndoOutlined />