Commit 8cbb38c2 by Neo Turing

feat: 更新LAC文件列表视图和文件审核组件

parent 4ff0ebd7
...@@ -101,7 +101,11 @@ ...@@ -101,7 +101,11 @@
</n-descriptions-item> </n-descriptions-item>
</n-descriptions> </n-descriptions>
<div class="modal-footer"> <div class="modal-footer">
<n-button type="primary" @click="downloadSingleFile(currentFile!)"> <n-button
type="primary"
@click="currentFile && downloadSingleFile(currentFile)"
:disabled="!currentFile"
>
下载文件 下载文件
</n-button> </n-button>
<n-button @click="showPreviewModal = false"> <n-button @click="showPreviewModal = false">
...@@ -115,7 +119,7 @@ ...@@ -115,7 +119,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { h, ref, computed, resolveComponent, watch, withDefaults, onBeforeUnmount } from 'vue'; import { h, ref, computed, resolveComponent, watch, withDefaults, onBeforeUnmount } from 'vue';
import type { DataTableColumns } from 'naive-ui'; // import type { DataTableColumns } from 'naive-ui';
interface FileItem { interface FileItem {
Kvid: string; Kvid: string;
...@@ -650,8 +654,19 @@ function formatFileSize(size: number): string { ...@@ -650,8 +654,19 @@ function formatFileSize(size: number): string {
// 关闭并传递文件数据 // 关闭并传递文件数据
function closeWithFileData() { function closeWithFileData() {
emit('update-files', fileData.value); emit('update-files', fileData.value);
emit('close'); emit('close', fileData.value); // 在关闭时传递当前的文件数据
}
// 获取当前文件列表的方法
function getCurrentFileList() {
return fileData.value;
} }
// 暴露方法给父组件使用
defineExpose({
getCurrentFileList,
fileData
});
</script> </script>
<style scoped> <style scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment