diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts
index cb5313c..550b53e 100644
--- a/src/i18n/locales/en-US.ts
+++ b/src/i18n/locales/en-US.ts
@@ -285,6 +285,12 @@ export default {
allFiles: 'All Files',
editFileInfo: 'Edit File Information',
saveChanges: 'Save Changes',
+ viewText: 'View',
+ textPreview: 'Text Preview',
+ copyText: 'Copy Text',
+ copySuccess: 'Text copied to clipboard',
+ copyFailed: 'Copy failed, please try again',
+ charCount: '{count} characters',
headers: {
code: 'Retrieve Code',
name: 'Name',
diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts
index e935e6e..1596dda 100644
--- a/src/i18n/locales/zh-CN.ts
+++ b/src/i18n/locales/zh-CN.ts
@@ -284,6 +284,12 @@ export default {
allFiles: '所有文件',
editFileInfo: '编辑文件信息',
saveChanges: '保存更改',
+ viewText: '查看',
+ textPreview: '文本预览',
+ copyText: '复制文本',
+ copySuccess: '文本已复制到剪贴板',
+ copyFailed: '复制失败,请重试',
+ charCount: '共 {count} 个字符',
headers: {
code: '取件码',
name: '名称',
diff --git a/src/views/manage/FileManageView.vue b/src/views/manage/FileManageView.vue
index 635df10..f300c8f 100644
--- a/src/views/manage/FileManageView.vue
+++ b/src/views/manage/FileManageView.vue
@@ -65,17 +65,24 @@
-
-
- {{ file.text }}
+
+
+ {{ file.text || '-' }}
-
-
+
+
|
@@ -304,6 +311,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('fileManage.textPreview') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('fileManage.charCount', { count: previewText.length }) }}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -318,6 +400,9 @@ import {
TrashIcon,
PencilIcon,
CheckIcon,
+ EyeIcon,
+ CopyIcon,
+ FileTextIcon,
} from 'lucide-vue-next'
import DataTable from '@/components/common/DataTable.vue'
import DataPagination from '@/components/common/DataPagination.vue'
@@ -367,6 +452,32 @@ const editForm = ref({
expired_count: null
})
+// 文本预览相关状态
+const showTextPreview = ref(false)
+const previewText = ref('')
+
+// 打开文本预览
+const openTextPreview = (text: string) => {
+ previewText.value = text
+ showTextPreview.value = true
+}
+
+// 关闭文本预览
+const closeTextPreview = () => {
+ showTextPreview.value = false
+ previewText.value = ''
+}
+
+// 复制文本到剪贴板
+const copyText = async () => {
+ try {
+ await navigator.clipboard.writeText(previewText.value)
+ alertStore.showAlert(t('fileManage.copySuccess'), 'success')
+ } catch {
+ alertStore.showAlert(t('fileManage.copyFailed'), 'error')
+ }
+}
+
// 打开编辑模态框
const openEditModal = (file: FileListItem) => {
editForm.value = {
|