mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 08:57:14 +08:00
feat: 文件管理增加复制文件 URL 按钮
This commit is contained in:
@@ -206,6 +206,7 @@ export type FileItem = {
|
||||
extension: string
|
||||
type: number
|
||||
storageId: string
|
||||
storageName: string
|
||||
createUserString: string
|
||||
createTime: string
|
||||
updateUserString: string
|
||||
|
@@ -6,10 +6,16 @@
|
||||
</a-row>
|
||||
<a-row style="margin-top: 15px">
|
||||
<a-descriptions :column="1" layout="inline-vertical">
|
||||
<a-descriptions-item label="名称">{{ getFileName(data) }}</a-descriptions-item>
|
||||
<a-descriptions-item label="名称">
|
||||
<a-typography-paragraph copyable :copy-text="data.url">
|
||||
<template #copy-tooltip>复制链接</template>
|
||||
{{ getFileName(data) }}
|
||||
</a-typography-paragraph>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="大小">{{ formatFileSize(data.size) }}</a-descriptions-item>
|
||||
<a-descriptions-item label="创建时间">{{ data.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="上传时间">{{ data.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="修改时间">{{ data.updateTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="存储名称">{{ data.storageName }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-row>
|
||||
</template>
|
||||
|
@@ -6,7 +6,7 @@ import type { FileItem } from '@/apis'
|
||||
/** 打开 详情 弹窗 */
|
||||
export function openFileDetailModal(fileItem: FileItem) {
|
||||
return Modal.open({
|
||||
title: fileItem.extension ? `${fileItem.name}.${fileItem.extension}` : `${fileItem.name}`,
|
||||
title: '文件详情',
|
||||
titleAlign: 'start',
|
||||
modalAnimationName: 'el-fade',
|
||||
modalStyle: { maxWidth: '320px' },
|
||||
|
@@ -27,7 +27,10 @@
|
||||
<div class="file-image">
|
||||
<FileImage :data="record"></FileImage>
|
||||
</div>
|
||||
<span>{{ getFileName(record) }}</span>
|
||||
<a-typography-paragraph copyable :copy-text="record.url">
|
||||
<template #copy-tooltip>复制链接</template>
|
||||
{{ getFileName(record) }}
|
||||
</a-typography-paragraph>
|
||||
</section>
|
||||
<template #content>
|
||||
<FileRightMenu :data="record" @click="handleRightMenuClick($event, record)"></FileRightMenu>
|
||||
@@ -38,7 +41,8 @@
|
||||
<a-table-column title="大小" data-index="size" :width="150">
|
||||
<template #cell="{ record }">{{ formatFileSize(record.size) }}</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="修改时间" data-index="updateTime" :width="200"></a-table-column>
|
||||
<a-table-column title="存储名称" data-index="storageName" :width="200" />
|
||||
<a-table-column title="修改时间" data-index="updateTime" :width="200" />
|
||||
<a-table-column title="操作" :width="120" align="center">
|
||||
<template #cell="{ record }">
|
||||
<a-popover trigger="click" position="bottom" :content-style="{ 'padding': 0, 'margin-top': 0 }">
|
||||
@@ -48,7 +52,7 @@
|
||||
:file-info="record"
|
||||
:shadow="false"
|
||||
@click="handleRightMenuClick($event, record)"
|
||||
></FileRightMenu>
|
||||
/>
|
||||
</template>
|
||||
</a-popover>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user