mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
amis-saas-6518 [Bug] 测试:【组件优化第五批】时间轴-数据-接口获取,通过输入框、API中心、高级配置的API,配置后无法获取数据;
Change-Id: If39046a5e2f2a83ec9ebd2b7f4c3433853466007
This commit is contained in:
parent
b0d31df615
commit
b07c7ad24b
@ -20,8 +20,9 @@ export class TimelinePlugin extends BasePlugin {
|
||||
label: '时间轴',
|
||||
name: 'timeline',
|
||||
items: [
|
||||
{time: '2012-12-21', title: '节点数据'},
|
||||
{time: '2012-12-24', title: '节点数据'}
|
||||
{time: '2012-12-21', title: '节点示例数据'},
|
||||
{time: '2012-12-24', title: '节点示例数据'},
|
||||
{time: '2012-12-27', title: '节点示例数据'}
|
||||
]
|
||||
};
|
||||
previewSchema = {
|
||||
|
@ -77,6 +77,9 @@ export default class TimelineItemControl extends React.Component<
|
||||
data.items = items.map(item => ({...item}));
|
||||
}
|
||||
if (source === 'api') {
|
||||
const {items, api} = this.state;
|
||||
data.items = items.map(item => ({...item}));
|
||||
data.source = api;
|
||||
}
|
||||
onBulkChange && onBulkChange(data);
|
||||
}
|
||||
@ -396,6 +399,7 @@ export default class TimelineItemControl extends React.Component<
|
||||
|
||||
renderOption(props: TimelineItem & {index: number}) {
|
||||
const {time, title, index} = props;
|
||||
const delDisabled = !(this.state.items.length > 2);
|
||||
return (
|
||||
<li className="ae-TimelineItemControlItem" key={index}>
|
||||
<div className="ae-TimelineItemControlItem-Main">
|
||||
@ -472,6 +476,7 @@ export default class TimelineItemControl extends React.Component<
|
||||
type: 'button',
|
||||
className: 'ae-TimelineItemControlItem-action',
|
||||
label: '删除',
|
||||
disabled: delDisabled,
|
||||
onClick: () => this.toggleDelete(index)
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user