fix SalesOrderPayment.vue style
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { AttachmentAPI } from "timi-web-api";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import { compressUploadImageList } from "@/utils/imageCompression";
|
||||
|
||||
/** 压缩并上传照片,返回可直接交给照片滚动组件展示的临时附件。 */
|
||||
export async function uploadPhotoList(fileList: File[]): Promise<PhotoItem[]> {
|
||||
const tempFileList = await AttachmentAPI.upload(await compressUploadImageList(fileList));
|
||||
return tempFileList
|
||||
.filter(item => !!item.id)
|
||||
.map(item => ({
|
||||
tempFileId: item.id,
|
||||
attachType: "PHOTO",
|
||||
url: AttachmentAPI.getTempReadURL(item.id || "")
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user