update 0.14.0

This commit is contained in:
yehuozhili
2022-04-08 01:57:49 +08:00
parent 0c9309956c
commit 5d3ae2dee3
12 changed files with 27 additions and 15 deletions

View File

@@ -155,5 +155,6 @@ MIT
## Todo
重构弹窗
重构数据源
完善文档

View File

@@ -1,5 +1,5 @@
{
"version": "0.13.3",
"version": "0.14.0",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/dooringx-lib.esm.js",

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-02-04 10:32:45
* @LastEditors: yehuozhili
* @LastEditTime: 2021-10-07 12:35:38
* @LastEditTime: 2022-04-08 01:35:32
* @FilePath: \dooringx\packages\dooringx-lib\src\components\leftConfig.tsx
*/
import React, { ReactNode, useEffect, useMemo, useState } from 'react';
@@ -169,7 +169,7 @@ function LeftConfig(props: LeftConfigProps) {
);
} else {
const render = leftMapRenderListCategory[parseInt(menuSelect, 10)]?.customRender;
setLeftRender(<div className={styles.leftco}>{render}</div>);
setLeftRender(<div className={styles.leftco}>{render && render(props.config)}</div>);
}
}, [menuSelect, props.config, leftMapRenderListCategory, search]);

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-03-14 05:42:13
* @LastEditors: yehuozhili
* @LastEditTime: 2022-04-06 22:59:57
* @LastEditTime: 2022-04-08 01:37:25
* @FilePath: \dooringx\packages\dooringx-lib\src\components\rightConfig.tsx
*/
import { CreateOptionsRes } from '../core/components/formTypes';
@@ -150,7 +150,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
width: 380,
}}
>
{v.custom && v.customRender && v.customRender(v.type, current)}
{v.custom && v.customRender && v.customRender(v.type, current, props.config)}
{!v.custom && render(v.type, current)}
</div>
</Tabs.TabPane>

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-02-25 21:16:58
* @LastEditors: yehuozhili
* @LastEditTime: 2022-04-06 22:27:51
* @LastEditTime: 2022-04-08 01:37:07
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
*/
import React from 'react';
@@ -60,7 +60,7 @@ export interface LeftMapRenderListPropsItemCategory {
type: string;
icon: ReactNode;
custom?: boolean;
customRender?: ReactNode;
customRender?: (config: UserConfig) => ReactNode;
displayName?: string;
}
@@ -74,7 +74,7 @@ export interface RightMapRenderListPropsItemCategory {
type: string;
icon: ReactNode;
custom?: boolean;
customRender?: (type: string, current: IBlockType) => ReactNode;
customRender?: (type: string, current: IBlockType, config: UserConfig) => ReactNode;
}
// 设置部分