feat bugfix

This commit is contained in:
eilenexuzhe
2020-06-05 18:03:16 +08:00
parent e82437a2db
commit 8ef549de80
6 changed files with 45 additions and 18 deletions

View File

@@ -10,7 +10,7 @@ import { IClusterData } from 'types/base-type';
const TabPane = Tabs.TabPane;
const detailUrl ='/admin/cluster_detail?clusterId=';
const detailUrl = '/admin/cluster_detail?clusterId=';
const collectionColumns: Array<ColumnProps<IClusterData>> = [
{
@@ -24,7 +24,8 @@ const collectionColumns: Array<ColumnProps<IClusterData>> = [
key: 'clusterName',
sorter: (a: IClusterData, b: IClusterData) => a.clusterName.charCodeAt(0) - b.clusterName.charCodeAt(0),
render: (text, record) => {
return <a href={`${detailUrl}${record.clusterId}`}>{record.clusterName}</a>;
const url = `${detailUrl}${record.clusterId}&clusterName=${record.clusterName}`;
return <a href={encodeURI(url)}>{record.clusterName}</a>;
},
},
{