File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
frontend/packages/web/src/components/business/crm-sub-table Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 203203 title: field .showLabel ? field .name : ' ' ,
204204 width:
205205 maxPictureCountMap .value [field .id ] > 0 && field .type === FieldTypeEnum .PICTURE
206- ? maxPictureCountMap .value [field .id ] * 118
206+ ? maxPictureCountMap .value [field .id ] * 108
207207 : 120 ,
208208 key ,
209209 fieldId: key ,
433433 };
434434 }
435435 if (field .type === FieldTypeEnum .PICTURE ) {
436+ let finalPictureColWidth = 0 ;
437+ if (maxPictureCountMap .value [field .id ]) {
438+ if (field .uploadLimit && maxPictureCountMap .value [field .id ] >= field .uploadLimit ) {
439+ finalPictureColWidth = field .uploadLimit * 108 ;
440+ } else {
441+ finalPictureColWidth = maxPictureCountMap .value [field .id ] * 108 + 32 ;
442+ }
443+ }
436444 return {
437445 title ,
438- width: maxPictureCountMap . value [ field . id ] > 0 ? maxPictureCountMap . value [ field . id ] * 118 + 32 : 150 , // 每个卡片 110px + 8px间距 + 上传按钮宽度 32px
446+ width: finalPictureColWidth || 150 , // 每个卡片 100px + 8px间距 + 上传按钮宽度 32px
439447 key ,
440448 fieldId: key ,
441449 render : (row : any , rowIndex : number ) =>
You can’t perform that action at this time.
0 commit comments