文档:补充关键业务代码注释
This commit is contained in:
@@ -545,7 +545,7 @@ const beforeUpload = (file: File) => {
|
||||
return isImage && isLt2M
|
||||
}
|
||||
|
||||
// Banner图片上传
|
||||
// Banner 与门店环境图分开维护上传任务,便于表单回显和删除时分别同步 fileId 列表。
|
||||
const handleUploadBanner = async (options: any) => {
|
||||
const { file, onSuccess, onError, onProgress } = options
|
||||
const taskKey = `banner:${String(file.uid)}`
|
||||
@@ -625,7 +625,7 @@ const handleBannerRemove = (file: any) => {
|
||||
return true
|
||||
}
|
||||
|
||||
// 店铺图片上传
|
||||
// 店铺环境图与 Banner 走同一套分片上传协议,但写入不同业务字段。
|
||||
const handleUploadImage = async (options: any) => {
|
||||
const { file, onSuccess, onError, onProgress } = options
|
||||
const taskKey = `image:${String(file.uid)}`
|
||||
@@ -665,6 +665,7 @@ const handleUploadImage = async (options: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 编辑态下 Upload 里的文件可能只剩 fileId,所以预览时需要兼容本地 URL 与远端签名地址两种来源。
|
||||
const handlePreview = async (file: any) => {
|
||||
try {
|
||||
const cachedPreviewUrl = getPreviewUrlFromFile(file)
|
||||
|
||||
Reference in New Issue
Block a user