amis-saas-3413 [Feature] 「组件配置」组件 - Timeline

Change-Id: Ic8ac872e462038fe24db7964e88bcf1ff96b5203
This commit is contained in:
liqiu03 2022-06-23 11:17:58 +08:00
parent d3c0bcf65e
commit 1fa792840d

View File

@ -37,8 +37,6 @@ export interface TimelineItemState {
items: Array<Partial<TimelineItem>>;
source: 'custom' | 'api';
api: SchemaApi;
labelField: string;
valueField: string;
}
export default class TimelineItemControl extends React.Component<
@ -55,8 +53,6 @@ export default class TimelineItemControl extends React.Component<
this.state = {
items: props.value,
api: props.data.source,
labelField: props.data.labelField,
valueField: props.data.valueField,
source: props.data.source ? 'api' : 'custom'
}
}
@ -73,16 +69,6 @@ export default class TimelineItemControl extends React.Component<
this.setState({api: source}, this.onChange);
}
@autobind
handleLableFieldChange(labelField: string) {
this.setState({labelField}, this.onChange);
}
@autobind
handleValueFieldChange(valueField: string) {
this.setState({valueField}, this.onChange);
}
onChange() {
const {source} = this.state;
const {onBulkChange} = this.props;