<template>
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }" class="h100 right-card w100">
|
<div class="bg-[#fff] mb-[10px] flex items-center">
|
<el-button style="margin-left: 8px; width: 40px" text @click="handleExitFlow">
|
<el-icon style="font-size: 24px !important">
|
<ArrowLeft />
|
</el-icon>
|
</el-button>
|
<span class="text-[24px] text-[#26244c] font-[700]">{{ state.detailTitle }}</span>
|
</div>
|
</el-card>
|
</template>
|
|
<script setup lang="ts">
|
import { reactive } from 'vue';
|
import { useRouter } from 'vue-router';
|
// 定义变量内容
|
const state = reactive({
|
detailTitle: '文档详情',
|
currentFile: null, // 当前选中文件的索引
|
currentFileData: null, // 当前选中文件的数据
|
});
|
const router = useRouter();
|
//返回
|
const handleExitFlow = () => {
|
//是否显示返回
|
router.back();
|
};
|
// 预览文件
|
const previewFile = (file, index) => {
|
if (['.pdf', '.doc', '.docx', '.txt', '.md', '.pptx', '.ppt'].includes(file.type)) {
|
state.currentFile = index;
|
state.currentFileData = file;
|
} else {
|
// 文件类型不支持,处理错误或给出提示
|
}
|
};
|
</script>
|
<style scoped lang="scss"></style>
|