From 4b2db7c3d48c6b12bf5e69f4cc75392e95d8250f Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 May 2019 17:39:15 +0800 Subject: [PATCH] use Link over router.push --- src/pages/List/TableList.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pages/List/TableList.js b/src/pages/List/TableList.js index 1230c509..f3b9a1dd 100644 --- a/src/pages/List/TableList.js +++ b/src/pages/List/TableList.js @@ -1,7 +1,7 @@ import React, { PureComponent, Fragment } from 'react'; import { connect } from 'dva'; import moment from 'moment'; -import router from 'umi/router'; +import Link from 'umi/link'; import { Row, Col, @@ -293,7 +293,7 @@ class TableList extends PureComponent { { title: '规则名称', dataIndex: 'name', - render: text => this.previewItem(text)}>{text}, + render: text => {text}, }, { title: '描述', @@ -383,10 +383,6 @@ class TableList extends PureComponent { }); }; - previewItem = id => { - router.push(`/profile/basic/${id}`); - }; - handleFormReset = () => { const { form, dispatch } = this.props; form.resetFields(); -- GitLab