diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c382f0..1467f13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.14.0 + +修复左右侧配置取不到config的问题。 + ## 0.13.3 修复title失效,增加右侧面板配置 diff --git a/README.md b/README.md index 956e7c7..339e7db 100644 --- a/README.md +++ b/README.md @@ -155,5 +155,6 @@ MIT ## Todo +重构弹窗 重构数据源 完善文档 diff --git a/packages/dooringx-dumi-doc/docs/ChangeLog/index.en.md b/packages/dooringx-dumi-doc/docs/ChangeLog/index.en.md index c8019fb..9fd27ff 100644 --- a/packages/dooringx-dumi-doc/docs/ChangeLog/index.en.md +++ b/packages/dooringx-dumi-doc/docs/ChangeLog/index.en.md @@ -5,6 +5,8 @@ nav: title: Change log order: 6 --- +## 0.14.0 +Fix the problem that the left and right configurations cannot get config. ## 0.13.3 Fix the Title Failure and add the right panel configuration ## 0.13.2 @@ -19,7 +21,7 @@ Modify the timeline color and style to optimize the selected state. ## 0.12.3 Fix double click positioning problem ## 0.12.2 -Add double click positioning frame. +New double click positioning frame. Fixed drag frame reset pointer behavior after pause. ## 0.12.0 The operation of adding frames to the animation can accurately view the animation status every 0.1 seconds! @@ -136,7 +138,7 @@ Remove the runtime export and get all properties from config. 2. Control component adds ruler control. ## 0.3.0 1. Add a ruler. The containerwrapper needs to pass config before it can be used. -2. Drag the smallest container 667. Fix the inconsistency between the distance between the canvas and the mouse when zooming down and dragging. +2. Modify container minimum drag 667. Fix the inconsistency between the distance between the canvas and the mouse when zooming down and dragging. 3. Innercontainerdragup needs to pass config. ## 0.2.0 Modify the transmission of the commander to obtain the config. The commander will no longer be exported from the index. When it needs to be used, it will be obtained from the config. Add the class name on the left to facilitate customization. diff --git a/packages/dooringx-dumi-doc/docs/ChangeLog/index.md b/packages/dooringx-dumi-doc/docs/ChangeLog/index.md index d0dd2a9..a8a4d1c 100644 --- a/packages/dooringx-dumi-doc/docs/ChangeLog/index.md +++ b/packages/dooringx-dumi-doc/docs/ChangeLog/index.md @@ -5,6 +5,10 @@ nav: title: 变更日志 order: 6 --- +## 0.14.0 + +修复左右侧配置取不到config的问题。 + ## 0.13.3 修复title失效,增加右侧面板配置 diff --git a/packages/dooringx-example/src/plugin/index.tsx b/packages/dooringx-example/src/plugin/index.tsx index 78c0530..22fd739 100644 --- a/packages/dooringx-example/src/plugin/index.tsx +++ b/packages/dooringx-example/src/plugin/index.tsx @@ -1,8 +1,8 @@ /* * @Author: yehuozhili * @Date: 2021-02-27 21:33:36 - * @LastEditors: Please set LastEditors - * @LastEditTime: 2021-08-18 19:54:56 + * @LastEditors: yehuozhili + * @LastEditTime: 2022-04-08 01:35:05 * @FilePath: \dooringx\packages\dooringx-example\src\plugin\index.tsx */ @@ -56,7 +56,7 @@ export const defaultConfig: Partial = { icon: , custom: true, displayName: '自定义', - customRender:
我是自定义渲染
, + customRender: () =>
我是自定义渲染
, }, ], initComponentCache: { diff --git a/packages/dooringx-lib/README.md b/packages/dooringx-lib/README.md index 956e7c7..339e7db 100644 --- a/packages/dooringx-lib/README.md +++ b/packages/dooringx-lib/README.md @@ -155,5 +155,6 @@ MIT ## Todo +重构弹窗 重构数据源 完善文档 diff --git a/packages/dooringx-lib/package.json b/packages/dooringx-lib/package.json index 5cfd90c..09ee349 100644 --- a/packages/dooringx-lib/package.json +++ b/packages/dooringx-lib/package.json @@ -1,5 +1,5 @@ { - "version": "0.13.3", + "version": "0.14.0", "license": "MIT", "main": "dist/index.js", "module": "dist/dooringx-lib.esm.js", diff --git a/packages/dooringx-lib/src/components/leftConfig.tsx b/packages/dooringx-lib/src/components/leftConfig.tsx index 203a085..b09f802 100644 --- a/packages/dooringx-lib/src/components/leftConfig.tsx +++ b/packages/dooringx-lib/src/components/leftConfig.tsx @@ -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(
{render}
); + setLeftRender(
{render && render(props.config)}
); } }, [menuSelect, props.config, leftMapRenderListCategory, search]); diff --git a/packages/dooringx-lib/src/components/rightConfig.tsx b/packages/dooringx-lib/src/components/rightConfig.tsx index fc71a65..aa1cfc3 100644 --- a/packages/dooringx-lib/src/components/rightConfig.tsx +++ b/packages/dooringx-lib/src/components/rightConfig.tsx @@ -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) { 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)} diff --git a/packages/dooringx-lib/src/config/index.tsx b/packages/dooringx-lib/src/config/index.tsx index 9017a5b..c8c4317 100644 --- a/packages/dooringx-lib/src/config/index.tsx +++ b/packages/dooringx-lib/src/config/index.tsx @@ -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; } // 设置部分 diff --git a/packages/dooringx-plugin-template/package.json b/packages/dooringx-plugin-template/package.json index 7fbe537..467779c 100644 --- a/packages/dooringx-plugin-template/package.json +++ b/packages/dooringx-plugin-template/package.json @@ -1,6 +1,6 @@ { "name": "dooringx-plugin-template", - "version": "0.13.3", + "version": "0.14.0", "description": "> TODO: description", "author": "yehuozhili <673632758@qq.com>", "homepage": "https://github.com/H5-Dooring/dooringx#readme", diff --git a/packages/dooringx-plugin-template/template/template.json b/packages/dooringx-plugin-template/template/template.json index ce45f63..090d6fe 100644 --- a/packages/dooringx-plugin-template/template/template.json +++ b/packages/dooringx-plugin-template/template/template.json @@ -40,7 +40,7 @@ "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@svgr/rollup": "^5.5.0", - "dooringx-lib": "^0.13.3", + "dooringx-lib": "^0.14.0", "postcss": "^8.3.6", "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-postcss": "^4.0.1",