mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-15 09:21:13 +08:00
Merge branch 'pre-release' of ssh://icode.baidu.com:8235/baidu/amis/editor into pre-release
Change-Id: Iafc5d28e31c60ee0afc14175e4d1e44a98fb1022
This commit is contained in:
commit
13def8c43b
@ -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