upper attachment-selector to lib
This commit is contained in:
@@ -19,3 +19,16 @@ export function getAttachmentReadURL(id: string, thumbnailSize?: number): string
|
||||
const separator = url.includes("?") ? "&" : "?";
|
||||
return `${url}${separator}${params.toString()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务附件类型的显示名称。
|
||||
*/
|
||||
export function getAttachmentTypeText(attachType?: string): string {
|
||||
if (attachType === "POINT_CARD") {
|
||||
return "积分卡";
|
||||
}
|
||||
if (attachType === "OTHER") {
|
||||
return "其他文件";
|
||||
}
|
||||
return "照片";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user