From 73d56e1024cf420eff2aae3710886c84d56a385f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 04 六月 2022 14:48:36 +0800 Subject: [PATCH] 2022-06-04 --- src/tabviews/custom/components/form/tab-form/index.jsx | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 45433e2..fb57e76 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -75,6 +75,12 @@ group.subButton.OpenType = 'formSubmit' group.subButton.execError = 'never' + group.subButton.syncComponentId = group.subButton.syncComponent ? group.subButton.syncComponent.pop() : '' + + if (group.subButton.syncComponentId === config.uuid) { + group.subButton.syncComponentId = '' + } + if (group.subButton.enable === 'false') { group.subButton.style.display = 'none' group.$button = 'no-button' @@ -231,7 +237,7 @@ async loadData () { const { mainSearch, menuType } = this.props - const { config, arr_field, BID, group } = this.state + const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { this.setState({ @@ -258,14 +264,11 @@ if (result.status) { let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true} - let _group = group - this.setState({ - group: null, - data: _data || {$$empty: true}, + data: null, loading: false }, () => { - this.setState({group: _group}) + this.setState({data: _data}) }) } else { this.setState({ @@ -301,7 +304,7 @@ const { config, loading, BID, data, group, dict } = this.state return ( - <div className="custom-tab-form-box" style={{...config.style}}> + <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}> {loading ? <div className="loading-mask"> <div className="ant-spin-blur"></div> @@ -326,7 +329,6 @@ {group && data ? <div className={'mk-form-action ' + (group.$button || '')}> <NormalButton BID={BID} - position="form" btn={group.subButton} setting={config.setting} columns={config.columns} -- Gitblit v1.8.0