| | |
| | | help: '填 0 表示不限名额', |
| | | }, |
| | | { |
| | | fieldName: 'coverUrl', |
| | | // 封面走附件中间表:这里提交 blobIds,回显读 attachmentList(见 form.vue 的映射函数) |
| | | fieldName: 'blobIds', |
| | | label: '封面图', |
| | | component: 'Input', |
| | | componentProps: { placeholder: '封面图地址(选填)', disabled: readonly }, |
| | | component: 'ImageUpload', |
| | | componentProps: { |
| | | valueKey: 'id', |
| | | // 关键:ImageUpload 在 maxNumber=1 时 getValue() 只吐 URL 字符串, |
| | | // form-ui 的 valueKey 转换又要求「值是带 status 的对象数组」,字符串会被跳过, |
| | | // 结果 blobIds 被 normalizeBlobIds 转成 NaN → [],后端把空数组理解为「清空封面」。 |
| | | // resultField 非空时组件改返回 item.response(上传响应对象 {url,name,id}), |
| | | // 才拿得到真正的 blobId。 |
| | | resultField: 'id', |
| | | maxNumber: 1, |
| | | multiple: false, |
| | | disabled: readonly, |
| | | }, |
| | | help: '选填,建议 16:9;保存后展示在活动报名页顶部', |
| | | formItemClass: 'col-span-2', |
| | | }, |
| | | { |