This is an automated email from the ASF dual-hosted git repository. dengliming pushed a commit to branch revert-255-dev@gentlehao in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git
commit 1a7a4f69db25b2d7515cdacca8ebc73b66bea7ff Author: Liming Deng <[email protected]> AuthorDate: Wed Dec 21 21:17:47 2022 +0800 Revert "Add link from plugin to pluginList (#255)" This reverts commit e31422448ba85440aa51583f5783279d47ab5647. --- src/components/SiderMenu/SiderMenu.js | 18 ++---------------- src/routes/System/Plugin/index.js | 5 ++--- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index 675a80d1..7880c1be 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -18,7 +18,7 @@ import React, { PureComponent } from "react"; import { Layout, Menu, Icon, Switch } from "antd"; import pathToRegexp from "path-to-regexp"; -import { withRouter, Link } from "dva/router"; +import { Link } from "dva/router"; import styles from "./index.less"; import { urlToList } from "../_utils/pathTools"; import { getCurrentLocale, getIntlContent } from "../../utils/IntlUtils"; @@ -77,7 +77,7 @@ export const getMenuMatchKeys = (flatMenuKeys, paths) => [] ); -class SiderMenu extends PureComponent { +export default class SiderMenu extends PureComponent { constructor(props) { super(props); this.flatMenuKeys = getFlatMenuKeys(props.menuData); @@ -89,16 +89,6 @@ class SiderMenu extends PureComponent { }; } - componentDidMount() { - this.props.history.listen(location => { - if (this.props.location.pathname !== location.pathname) { - this.setState({ - openKeys: this.getDefaultCollapsedSubMenus(this.props) - }); - } - }); - } - componentWillReceiveProps(nextProps) { const { location, menuData } = this.props; this.flatMenuKeys = getFlatMenuKeys(menuData); @@ -349,8 +339,6 @@ class SiderMenu extends PureComponent { theme={this.state.theme} mode={this.state.mode} style={{ padding: "16px 0", width: "100%" }} - selectedKeys={selectedKeys} - openKeys={openKeys} > {this.getNavMenuItems(menuData)} </Menu> @@ -358,5 +346,3 @@ class SiderMenu extends PureComponent { ); } } - -export default withRouter(SiderMenu); diff --git a/src/routes/System/Plugin/index.js b/src/routes/System/Plugin/index.js index c6234477..da2b68cf 100644 --- a/src/routes/System/Plugin/index.js +++ b/src/routes/System/Plugin/index.js @@ -16,7 +16,6 @@ */ import React, { Component } from "react"; -import { Link } from "dva/router"; import { Table, Input, Button, message, Popconfirm, Select, Popover, Tag, Typography } from "antd"; import { connect } from "dva"; import { resizableComponents } from "../../../utils/resizable"; @@ -370,8 +369,8 @@ export default class Plugin extends Component { key: "name", ellipsis: true, width: 120, - render: (text, record) => { - return <Link to={`/plug/${record.role}/${text}`} style={{color: "#260033","fontWeight":"bold"}}>{text || "----"}</Link>; + render: text => { + return <div style={{color: "#260033","fontWeight":"bold"}}>{text || "----"}</div>; } }, {
