in src/setter/object-setter/index.tsx [143:197]
render() {
const { items } = this.state;
const { field, config } = this.props;
if (!this.pipe) {
this.pipe = (this.context as PopupPipe).create({
width: 320,
canCloseByOutSideClick: config.canCloseByOutSideClick
});
}
const title = (
<Fragment>
<Title title={this.state.descriptor} />
</Fragment>
);
this.pipe.send(<FormSetter key={field.id} field={field} config={config} />, title);
if (items && items.length) {
return (
<div className="lc-setter-object-row">
<Button
className="lc-setter-object-row-edit"
size="small"
ghost="light"
onClick={(e) => {
this.pipe.show((e as any).target, field.id);
}}
>
<CustomIcon type="icon-ic_edit" />
</Button>
<div className="lc-setter-object-row-body">
{items.map((item) => createSettingFieldView(item, field))}
</div>
</div>
);
}
return (
<div className="lc-setter-object-row">
<Button
className="lc-setter-object-row-edit"
size="small"
ghost="light"
onClick={(e) => {
this.pipe.show((e as any).target, field.id);
}}
>
<CustomIcon type="icon-ic_edit" />
</Button>
<div className="lc-setter-object-row-body">{this.state.descriptor}:未配置快捷编辑项</div>
</div>
);
}