2021-07-10 19:35:06 +08:00
|
|
|
/*
|
|
|
|
* @Author: yehuozhili
|
|
|
|
* @Date: 2021-02-27 21:33:36
|
|
|
|
* @LastEditors: yehuozhili
|
2021-08-03 23:28:00 +08:00
|
|
|
* @LastEditTime: 2021-08-03 23:21:01
|
2021-07-10 19:35:06 +08:00
|
|
|
* @FilePath: \dooringx\packages\dooringx-example\src\plugin\index.tsx
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { InitConfig } from 'dooringx-lib';
|
|
|
|
import { LeftRegistComponentMapItem } from 'dooringx-lib/dist/core/crossDrag';
|
|
|
|
import { ContainerOutlined, HighlightOutlined } from '@ant-design/icons';
|
|
|
|
import commandModules from './commanderModules';
|
|
|
|
import { functionMap } from './functionMap';
|
|
|
|
import { Formmodules } from './formComponentModules';
|
|
|
|
|
|
|
|
const LeftRegistMap: LeftRegistComponentMapItem[] = [
|
|
|
|
{
|
|
|
|
type: 'basic',
|
|
|
|
component: 'button',
|
|
|
|
img: 'icon-anniu',
|
|
|
|
displayName: '按钮',
|
|
|
|
urlFn: () => import('./registComponents/button'),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const defaultConfig: Partial<InitConfig> = {
|
|
|
|
leftAllRegistMap: LeftRegistMap,
|
|
|
|
leftRenderListCategory: [
|
|
|
|
{
|
|
|
|
type: 'basic',
|
|
|
|
icon: <HighlightOutlined />,
|
|
|
|
displayName: '基础组件',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'xxc',
|
|
|
|
icon: <ContainerOutlined />,
|
|
|
|
custom: true,
|
|
|
|
customRender: <div>我是自定义渲染</div>,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
initComponentCache: {},
|
|
|
|
rightRenderListCategory: [
|
|
|
|
{
|
|
|
|
type: 'style',
|
|
|
|
icon: (
|
|
|
|
<div className="right-tab-item" style={{ width: 50, textAlign: 'center' }}>
|
|
|
|
外观
|
|
|
|
</div>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'animate',
|
|
|
|
icon: (
|
|
|
|
<div className="right-tab-item" style={{ width: 50, textAlign: 'center' }}>
|
|
|
|
动画
|
|
|
|
</div>
|
|
|
|
),
|
|
|
|
},
|
2021-08-03 11:05:40 +08:00
|
|
|
{
|
|
|
|
type: 'fn',
|
|
|
|
icon: (
|
|
|
|
<div className="right-tab-item" style={{ width: 50, textAlign: 'center' }}>
|
|
|
|
函数
|
|
|
|
</div>
|
|
|
|
),
|
|
|
|
},
|
2021-07-10 19:35:06 +08:00
|
|
|
{
|
|
|
|
type: 'actions',
|
|
|
|
icon: (
|
|
|
|
<div className="right-tab-item" style={{ width: 50, textAlign: 'center' }}>
|
|
|
|
事件
|
|
|
|
</div>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
initFunctionMap: functionMap,
|
|
|
|
initCommandModule: commandModules,
|
|
|
|
initFormComponents: Formmodules,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default defaultConfig;
|