From 5944c2832820a8bfa86e3efb5085f5a2463897f9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 22 九月 2020 09:14:49 +0800 Subject: [PATCH] 2020-09-22 --- src/menu/searchcomponent/index.jsx | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/menu/searchcomponent/index.jsx b/src/menu/searchcomponent/index.jsx index f498a71..7dd780a 100644 --- a/src/menu/searchcomponent/index.jsx +++ b/src/menu/searchcomponent/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' +import {connect} from 'react-redux' import { Modal, notification } from 'antd' import moment from 'moment' @@ -19,7 +20,7 @@ class SearchComponent extends Component { static propTpyes = { config: PropTypes.object, // 閰嶇疆淇℃伅 - sysRoles: PropTypes.array, // 瑙掕壊鍒楄〃锛岄粦鍚嶅崟 + // optionLibs: PropTypes.any, // 涓嬫媺瀛楀吀 updatesearch: PropTypes.func // 鏇存柊 } @@ -86,7 +87,7 @@ this.setState({ visible: true, card: card, - formlist: getSearchForm(card, this.props.sysRoles, linkableFields) + formlist: getSearchForm(card, this.props.menu.sysRoles, linkableFields) }) } @@ -304,4 +305,14 @@ } } -export default SearchComponent \ No newline at end of file +const mapStateToProps = (state) => { + return { + menu: state.customMenu + } +} + +const mapDispatchToProps = () => { + return {} +} + +export default connect(mapStateToProps, mapDispatchToProps)(SearchComponent) \ No newline at end of file -- Gitblit v1.8.0