+ {this.files.map(file => {
+ const fileName = file.name;
+ const fileExtension = fileName.split('.').pop()?.toLowerCase() ?? '';
+ const fileType = getFileType(fileExtension);
+ return (
+
this.handleFileClick(file)}
+ >
+ {fileType === 'image' ? (
+

+ ) : (
+ file.name
+ )}
+
+ );
+ })}
+
+ );
+ },
+});
diff --git a/src/control/grid/grid-column/grid-field-column/attachment-column/file-util.ts b/src/control/grid/grid-column/grid-field-column/attachment-column/file-util.ts
new file mode 100644
index 000000000..8ea90e576
--- /dev/null
+++ b/src/control/grid/grid-column/grid-field-column/attachment-column/file-util.ts
@@ -0,0 +1,205 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import { Ref, ref, watch } from 'vue';
+import { isString } from 'lodash-es';
+import { GridFieldColumnController } from '@ibiz-template/runtime';
+
+/** 文件总类型定义 */
+type FileType = 'image' | 'pdf' | 'other';
+
+/**
+ * 获取文件类型
+ */
+export const getFileType = (extension: string): FileType => {
+ switch (extension) {
+ case 'jpg':
+ case 'jpeg':
+ case 'png':
+ case 'gif':
+ case 'bmp':
+ case 'svg':
+ case 'webp':
+ case 'jfif':
+ // 图片类型
+ return 'image';
+ case 'pdf':
+ // pdf 类型
+ return 'pdf';
+ default:
+ // 其它文件类型
+ return 'other';
+ }
+};
+
+/**
+ * 文件内容解析的适配逻辑
+ *
+ * @export
+ * @param {IParams} props
+ * @param {UploadEditorController} c
+ * @returns {*}
+ */
+export function useFilesParse(
+ props: IParams,
+ c: GridFieldColumnController,
+): {
+ uploadUrl: Ref