From a39a4aba46139d6e84a8b007c3e68b5be4a92b03 Mon Sep 17 00:00:00 2001 From: rickcole Date: Tue, 12 May 2020 14:41:00 +0800 Subject: [PATCH] =?UTF-8?q?form=E4=B8=AD=E5=AE=B9=E5=99=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E9=85=8D=E7=BD=AEform=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=B1=82=E7=9A=84form=E4=BC=9A?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=A7=A6=E5=8F=91=E4=B8=8A=E5=B1=82form?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E4=BA=A4=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/Container.tsx | 2 ++ src/renderers/Form/Grid.tsx | 2 +- src/renderers/Form/HBox.tsx | 2 +- src/renderers/Form/Panel.tsx | 1 + src/renderers/Form/Service.tsx | 1 + src/renderers/Form/Tabs.tsx | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/renderers/Form/Container.tsx b/src/renderers/Form/Container.tsx index 738b0d5ea..0075495bd 100644 --- a/src/renderers/Form/Container.tsx +++ b/src/renderers/Form/Container.tsx @@ -12,6 +12,8 @@ export interface ContainerProps extends FormControlProps {} sizeMutable: false }) export class ContainerControlRenderer extends Container { + static propsList: Array = ['onChange']; + renderBody(): JSX.Element | null { const { renderFormItems, diff --git a/src/renderers/Form/Grid.tsx b/src/renderers/Form/Grid.tsx index 15d88556b..36b12667c 100644 --- a/src/renderers/Form/Grid.tsx +++ b/src/renderers/Form/Grid.tsx @@ -20,7 +20,7 @@ const defaultHorizontal = { sizeMutable: false }) export class GridRenderer extends Grid { - static propsList: Array = ['columns']; + static propsList: Array = ['columns', 'onChange']; static defaultProps = {}; renderChild(region: string, node: Schema, key: number, length: number) { diff --git a/src/renderers/Form/HBox.tsx b/src/renderers/Form/HBox.tsx index 8750831fd..61a9e97e6 100644 --- a/src/renderers/Form/HBox.tsx +++ b/src/renderers/Form/HBox.tsx @@ -16,7 +16,7 @@ interface HBoxProps extends FormControlProps { sizeMutable: false }) export class HBoxRenderer extends React.Component { - static propsList: Array = ['columns']; + static propsList: Array = ['columns', 'onChange']; static defaultProps: Partial = {}; renderColumn(column: any, key: number, length: number) { diff --git a/src/renderers/Form/Panel.tsx b/src/renderers/Form/Panel.tsx index 41b4735bc..5c7535e8e 100644 --- a/src/renderers/Form/Panel.tsx +++ b/src/renderers/Form/Panel.tsx @@ -10,6 +10,7 @@ import cx from 'classnames'; name: 'panel-control' }) export class PanelRenderer extends Panel { + static propsList: Array = ['onChange']; renderBody(): JSX.Element | null { const { render, diff --git a/src/renderers/Form/Service.tsx b/src/renderers/Form/Service.tsx index 616c123e9..1d293cf29 100644 --- a/src/renderers/Form/Service.tsx +++ b/src/renderers/Form/Service.tsx @@ -15,6 +15,7 @@ import {ServiceStore, IServiceStore} from '../../store/service'; name: 'service-control' }) export class ServiceRenderer extends BasicService { + static propsList: Array = ['onChange']; static contextType = ScopedContext; componentWillMount() { diff --git a/src/renderers/Form/Tabs.tsx b/src/renderers/Form/Tabs.tsx index 97361c7d4..1e053e21e 100644 --- a/src/renderers/Form/Tabs.tsx +++ b/src/renderers/Form/Tabs.tsx @@ -14,6 +14,7 @@ export class TabsRenderer extends Tabs { static defaultProps = { mountOnEnter: false // form 中的不按需渲染 }; + static propsList: Array = ['onChange', 'tabs']; renderTab = (tab: any, props: any, key: number) => { const {