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