From 9e100b8804d43d9f7559cdf41b67ed7475a809b8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 18:30:58 +0800 Subject: [PATCH] 2021-04-07 --- src/menu/datasource/index.jsx | 25 +++++++------------------ 1 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index da1829a..9732b5a 100644 --- a/src/menu/datasource/index.jsx +++ b/src/menu/datasource/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Icon, Modal } from 'antd' @@ -35,7 +34,7 @@ } editDataSource = () => { - const { config, menu } = this.props + const { config } = this.props let search = [] let parents = [] @@ -50,7 +49,7 @@ _conf = item if (_conf.parentId && _conf.tabId) { - getParents(menu) + getParents(tab) } } else { getParents(tab) @@ -60,10 +59,10 @@ } if (config.parentId && config.tabId) { - getParents(menu) + getParents(window.GLOB.customMenu) } - parents.unshift(menu) + parents.unshift(window.GLOB.customMenu) parents.forEach(parent => { parent.components.forEach(item => { @@ -110,7 +109,7 @@ } render () { - const { config, menu } = this.props + const { config } = this.props const { visible, dict, loading, mainSearch } = this.state return ( @@ -130,7 +129,7 @@ > <VerifyCard dict={dict} - menu={menu} + menu={window.GLOB.customMenu} mainSearch={mainSearch} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} @@ -141,14 +140,4 @@ } } -const mapStateToProps = (state) => { - return { - menu: state.customMenu - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(DataSource) \ No newline at end of file +export default DataSource \ No newline at end of file -- Gitblit v1.8.0