From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/sharecomponent/settingcalcomponent/index.jsx | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/templates/sharecomponent/settingcalcomponent/index.jsx b/src/templates/sharecomponent/settingcalcomponent/index.jsx index 9aa21fa..0c7b0d2 100644 --- a/src/templates/sharecomponent/settingcalcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/index.jsx @@ -1,11 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Modal } from 'antd' +import { Modal } from 'antd' +import { SettingOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import VerifyCard from './verifycard' +import MKEmitter from '@/utils/events.js' import './index.scss' class DataSource extends Component { @@ -37,6 +39,7 @@ this.setState({ visible: true }) + MKEmitter.emit('modalStatus', '鏁版嵁婧�') } verifySubmit = () => { @@ -56,8 +59,17 @@ }) } + res.show = config.setting.show || 'true' + res.advanceType = config.setting.advanceType || 'modal' + res.advanceWidth = config.setting.advanceWidth || 1000 + res.drawerPlacement = config.setting.drawerPlacement || 'right' + res.searchRatio = config.setting.searchRatio || 6 + res.searchLwidth = config.setting.searchLwidth !== undefined ? config.setting.searchLwidth : 33.3 + this.setState({loading: false, visible: false}) this.props.updateConfig({...config, ...res}) + + MKEmitter.emit('modalStatus', false) }, () => { this.setState({loading: false}) }) @@ -69,17 +81,17 @@ return ( <div className="model-datasource"> - <Icon type="setting" onClick={() => this.editDataSource()} /> + <SettingOutlined onClick={() => this.editDataSource()} /> <Modal wrapClassName="popview-modal" - title={'鏁版嵁婧愰厤缃�'} + title="鏁版嵁婧愰厤缃�" visible={visible} width={'75vw'} maskClosable={false} okText={dict['model.submit']} onOk={this.verifySubmit} confirmLoading={loading} - onCancel={() => { this.setState({ visible: false }) }} + onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false }) }} destroyOnClose > <VerifyCard -- Gitblit v1.8.0