Unverified Commit 4b2db7c3 authored by afc163's avatar afc163

use Link over router.push

parent 348c6284
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 => <a onClick={() => this.previewItem(text)}>{text}</a>,
render: text => <Link to={`/profile/basic/${text.replace(/\s+/gi, '-')}`}>{text}</Link>,
},
{
title: '描述',
......@@ -383,10 +383,6 @@ class TableList extends PureComponent {
});
};
previewItem = id => {
router.push(`/profile/basic/${id}`);
};
handleFormReset = () => {
const { form, dispatch } = this.props;
form.resetFields();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment