-
Notifications
You must be signed in to change notification settings - Fork 122
/
custom.tsx
54 lines (50 loc) · 1.19 KB
/
custom.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* eslint-disable max-classes-per-file */
/* eslint-disable react/static-property-placement */
import { AmisEditor } from '@ovine/editor/lib/index'
const { RendererEditor, BasicEditor } = AmisEditor
@RendererEditor('my-renderer', {
name: '自定义渲染器',
description: '这只是个示例',
// docLink: '/docs/renderers/Nav',
type: 'my-renderer',
previewSchema: {
// 用来生成预览图的
type: 'my-renderer',
target: 'demo',
},
scaffold: {
// 拖入组件里面时的初始数据
type: 'my-renderer',
target: '233',
},
})
export class MyRendererEditor extends BasicEditor {
tipName = '自定义组件'
settingsSchema = {
title: '自定义组件',
controls: [
{
type: 'tabs',
tabsMode: 'line',
className: 'm-t-n-xs',
contentClassName: 'no-border p-l-none p-r-none',
tabs: [
{
title: '常规',
controls: [
{
name: 'target',
label: 'Target',
type: 'text',
},
],
},
{
title: '外观',
controls: [],
},
],
},
],
}
}