mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-14 17:01:14 +08:00
fix: 移动端人员选择静态展示头像url回显 (#5976)
* 调整 saveAs fileName 优先级 * feat: 移动端人员选择增加确定按钮 * Update UserSelect.tsx * fix: 人员选择ts 类型错误 * fix: 城市选择组件移动端回显问题 * fix: 移动端级联选择器选中值bug修复 * Update Cascader.tsx * fix: 城市选择香港、澳门不能选择市 * fix: 删除错误城市数据 * feat: 移动端人员选择支持字段配置 * feat: 人员选择组件支持字段配置 * Update UserSelect.tsx * fix: 移动端人员选择静态展示头像url回显 Co-authored-by: zhangxulong <zhangxulong@baidu.com>
This commit is contained in:
parent
f2b267b15f
commit
ffe7fdda77
@ -207,7 +207,17 @@ export default class UserSelectControl extends React.Component<
|
||||
}
|
||||
|
||||
renderStatic() {
|
||||
const {selectedOptions, labelField = 'label'} = this.props;
|
||||
const {selectedOptions, labelField = 'label', classnames: cx} = this.props;
|
||||
if (labelField === 'avatar') {
|
||||
return selectedOptions.map((item: Option, index: number) => (
|
||||
<img
|
||||
key={index}
|
||||
className={cx('UserSelect-avatar-img')}
|
||||
src={item[labelField]}
|
||||
alt=""
|
||||
/>
|
||||
));
|
||||
}
|
||||
return selectedOptions.map((item: Option) => item[labelField]).join(',');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user