<template>
    <div class="attachment pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
        <div class="flex justify-between">
            <div class="title">附件</div>
            <div>
                <el-button type="primary">上传</el-button>
            </div>
        </div>
        <div class="flex-1 overflow-auto pt-3">
            <el-table :data="attachmenttable" border style="width: 100%;height: 200px;">
                <el-table-column prop="fileName" label="附件名称" width="180" />
                <el-table-column prop="fileSize" label="附件大小" width="120" />
                <el-table-column prop="uploader" label="上传人" width="120" />
                <el-table-column prop="uploadTime" label="上传时间" width="180" />
                <el-table-column label="操作" width="180" fixed="right">
                    <template #default="scope">
                        <el-button link type="primary" size="large">下载</el-button>
                        <el-button link type="primary" size="large">重命名</el-button>
                        <el-button link type="danger" size="large">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'

const attachmenttable = ref([{
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}, {
    fileName: '文件附件',
    fileSize: '3.1MB',
    uploader: '张三',
    uploadTime: '2024-04-01',
}])
// 生命周期钩子
onMounted(() => {
});
</script>
<style scoped lang="scss">
.attachment {
    .title {
        font-size: 18px;
        color: #000
    }
}
</style>