From 9c6795fd3c44e46cf3955fbfd8f8eeca23acb7a9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 08 十月 2022 00:31:51 +0800 Subject: [PATCH] 2022-10-08 --- src/tabviews/zshare/actionList/tabbutton/index.jsx | 28 +++++++--------------------- 1 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 8a350a5..6158165 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/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 { Button, notification } from 'antd' @@ -153,20 +152,17 @@ primaryId: primaryId } } - } else { - let menu = null + } else if (btn.MenuID || btn.linkmenu) { + let menuId = btn.MenuID || btn.linkmenu.slice(-1)[0] + let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] - if (btn.MenuID) { - let _menu = this.props.permMenus.filter(m => m.MenuID === btn.MenuID)[0] || '' + if (!menu && btn.MenuName && btn.tabType) { menu = { MenuID: btn.MenuID, - MenuName: _menu ? _menu.MenuName : btn.MenuName, + MenuName: btn.MenuName, MenuNo: btn.MenuNo, - type: _menu ? _menu.type : btn.tabType + type: btn.tabType } - } else if (btn.linkmenu && btn.linkmenu.length > 0) { - let menu_id = btn.linkmenu.slice(-1)[0] - menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || '' } if (!menu) { @@ -242,14 +238,4 @@ } } -const mapStateToProps = (state) => { - return { - permMenus: state.permMenus, - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(TabButton) \ No newline at end of file +export default TabButton \ No newline at end of file -- Gitblit v1.8.0