mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
amis-saas-3413 [Feature] 「组件配置」组件 - Timeline
Change-Id: I85dae7a7102b42c1195c74d636f3353061145aa5
This commit is contained in:
parent
bae221d8cc
commit
6b6e5ca872
@ -1,8 +1,11 @@
|
||||
import React from 'react';
|
||||
import {getEventControlConfig} from '../util';
|
||||
import {tipedLabel} from '../component/BaseControl';
|
||||
import {registerEditorPlugin, getSchemaTpl} from 'amis-editor-core';
|
||||
import { RendererAction, RendererEvent } from 'amis-editor-comp/dist/renderers/event-action';
|
||||
import {
|
||||
registerEditorPlugin,
|
||||
getSchemaTpl
|
||||
} from 'amis-editor-core';
|
||||
import { RendererEvent } from 'amis-editor-comp/dist/renderers/event-action';
|
||||
import {BasePlugin, BaseEventContext} from 'amis-editor-core';
|
||||
|
||||
export class TimelinePlugin extends BasePlugin {
|
||||
@ -29,24 +32,8 @@ export class TimelinePlugin extends BasePlugin {
|
||||
...this.scaffold
|
||||
};
|
||||
|
||||
// 事件定义
|
||||
events: RendererEvent[] = [
|
||||
// {
|
||||
// eventName: 'add',
|
||||
// eventLabel: '新增选项',
|
||||
// description: '新增选项'
|
||||
// },
|
||||
// {
|
||||
// eventName: 'edit',
|
||||
// eventLabel: '编辑选项',
|
||||
// description: '编辑选项'
|
||||
// },
|
||||
// {
|
||||
// eventName: 'delete',
|
||||
// eventLabel: '删除选项',
|
||||
// description: '删除选项'
|
||||
// }
|
||||
];
|
||||
// TODO 事件定义
|
||||
events: RendererEvent[] = [];
|
||||
|
||||
panelTitle = '时间轴';
|
||||
panelJustify = true;
|
||||
@ -86,7 +73,7 @@ export class TimelinePlugin extends BasePlugin {
|
||||
},
|
||||
{
|
||||
label: tipedLabel(
|
||||
'文字方向',
|
||||
'文字位置',
|
||||
'文字相对时间轴位置'
|
||||
),
|
||||
name: 'mode',
|
||||
@ -94,9 +81,9 @@ export class TimelinePlugin extends BasePlugin {
|
||||
type: 'button-group-select',
|
||||
visibleOn: 'data.direction === "vertical"',
|
||||
options: [
|
||||
{label: '偏左', value: 'right'},
|
||||
{label: '偏右', value: 'left'},
|
||||
{label: '左右交替', value: 'alternate'},
|
||||
{label: '左侧', value: 'right'},
|
||||
{label: '右侧', value: 'left'},
|
||||
{label: '两侧交替', value: 'alternate'},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user