From 6531d6c4967f74585306a19002cca0bb9c895092 Mon Sep 17 00:00:00 2001 From: hufeixiong <673632758@qq.com> Date: Thu, 5 Aug 2021 15:32:03 +0800 Subject: [PATCH] update doc --- packages/dooringx-doc/src/docs/3.3.md | 2 +- packages/dooringx-doc/src/docs/3.5.md | 4 +--- .../dooringx-example/src/plugin/formComponents/input.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/dooringx-doc/src/docs/3.3.md b/packages/dooringx-doc/src/docs/3.3.md index bcb6f74..ef13c9c 100644 --- a/packages/dooringx-doc/src/docs/3.3.md +++ b/packages/dooringx-doc/src/docs/3.3.md @@ -45,7 +45,6 @@ const MButton = new ComponentItemFactory( createPannelOptions('input', { receive: 'text', label: '文字', - text: 'yehuozhili', }), ], animate: [createPannelOptions('animateControl', {})], @@ -54,6 +53,7 @@ const MButton = new ComponentItemFactory( { props: { ... + text:'yehuozhili'// input配置项组件接收的初始值 }, }, (data, context, store, config) => { diff --git a/packages/dooringx-doc/src/docs/3.5.md b/packages/dooringx-doc/src/docs/3.5.md index 6fac5d4..0a9810e 100644 --- a/packages/dooringx-doc/src/docs/3.5.md +++ b/packages/dooringx-doc/src/docs/3.5.md @@ -22,7 +22,6 @@ export interface FormBaseType { } export interface FormInputType extends FormBaseType { label: string; - text: string; } export interface FormActionButtonType {} export interface FormAnimateControlType {} @@ -34,7 +33,7 @@ export interface FormMap { ``` formMap的键名就是initFormComponents键名,formMap的值对应组件需要收到的值。 -以input组件为例,FormInputType此时有3个属性,label,text,receive。 +以input组件为例,FormInputType此时有2个属性,label,receive。 那么在其开发该组件时,props会收到: @@ -55,7 +54,6 @@ style: [ createPannelOptions('input', { receive: 'text', label: '文字', - text: 'yehuozhili', }), ], diff --git a/packages/dooringx-example/src/plugin/formComponents/input.tsx b/packages/dooringx-example/src/plugin/formComponents/input.tsx index 9b03439..5ea2ce6 100644 --- a/packages/dooringx-example/src/plugin/formComponents/input.tsx +++ b/packages/dooringx-example/src/plugin/formComponents/input.tsx @@ -2,7 +2,7 @@ * @Author: yehuozhili * @Date: 2021-07-07 14:32:55 * @LastEditors: yehuozhili - * @LastEditTime: 2021-07-13 15:07:08 + * @LastEditTime: 2021-08-05 15:27:21 * @FilePath: \dooringx\packages\dooringx-example\src\plugin\formComponents\input.tsx */ import { deepCopy, UserConfig } from 'dooringx-lib'; @@ -21,17 +21,17 @@ interface MInputProps { function MInput(props: MInputProps) { const option = useMemo(() => { - return props.data?.option || {}; + return props.data.option || {}; }, [props.data]); const store = props.config.getStore(); return ( - {(option as any)?.label || '文字'}: + {option.label || '文字'}: { const receive = (option as any).receive; const clonedata = deepCopy(store.getData());