| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="pdf-container"> |
| | | <div class="pdf-container" v-show="pdfViewer"> |
| | | <PDFViewer :pdfUrl="'/helloworld.pdf'"></PDFViewer> |
| | | <div class="close-btn"> |
| | | <el-button type="danger" size="large" circle @click="closeViewer"> |
| | | <template #icon> |
| | | <el-icon :size="18"> |
| | | <Close /> |
| | | </el-icon> |
| | | </template> |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue'; |
| | | import { Close } from '@element-plus/icons-vue'; |
| | | import NormalHeader from '@/components/NormalHeader/index.vue'; |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | import { getFileList } from '@/api/modules/file.js'; |
| | |
| | | } |
| | | }, |
| | | 'pdf': { |
| | | iconPath: '/static/icons/file_type_image.png', |
| | | iconPath: '/static/icons/file_type_pdf.png', |
| | | handle: (item) => { |
| | | console.log(item); |
| | | pdfViewer.value = true; |
| | | } |
| | | }, |
| | | }; |
| | | |
| | | const loading = ref(false); |
| | | const searchText = ref(''); |
| | | |
| | | const pdfViewer = ref(false); |
| | | const imageViewer = ref(false); |
| | | const videoViewer = ref(false); |
| | | |
| | | const fileList = ref([ |
| | | { |
| | |
| | | } |
| | | ]); |
| | | |
| | | const loading = ref(false); |
| | | |
| | | const checkRow = (item) => { |
| | | fileType[item.type] && fileType[item.type].handle(item); |
| | | }; |
| | | |
| | | const closeViewer = () => { |
| | | pdfViewer.value = false; |
| | | imageViewer.value = false; |
| | | videoViewer.value = false; |
| | | } |
| | | |
| | | const getData = () => { |
| | | getFileList().then(res => { |
| | |
| | | } |
| | | |
| | | .pdf-container { |
| | | width: 800px; |
| | | height: 800px; |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | z-index: 2; |
| | | z-index: 99999; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | .close-btn { |
| | | position: absolute; |
| | | top: 2px; |
| | | right: 30px; |
| | | z-index: 9999999; |
| | | :deep(.el-button) { |
| | | width: fit-content; |
| | | height: fit-content; |
| | | padding: 5px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |