parent
6a4d740781
commit
e9ffb370b9
@ -55,6 +55,7 @@ class ListeningToQuery extends React.Component {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
dataSource: [],
|
||||
totalDataSource: [],
|
||||
};
|
||||
this.field = new Field(this);
|
||||
this.group = getParams('listeningGroup') || '';
|
||||
@ -127,8 +128,9 @@ class ListeningToQuery extends React.Component {
|
||||
}
|
||||
}
|
||||
self.setState({
|
||||
dataSource: dataSoureTmp || [],
|
||||
totalDataSource: dataSoureTmp || [],
|
||||
total: dataSoureTmp.length || 0,
|
||||
dataSource: dataSoureTmp.slice(0, self.state.pageSize),
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -141,8 +143,10 @@ class ListeningToQuery extends React.Component {
|
||||
showMore() {}
|
||||
|
||||
changePage = value => {
|
||||
const startIndex = (value - 1) * this.state.pageSize;
|
||||
this.setState({
|
||||
currentPage: value,
|
||||
dataSource: this.state.totalDataSource.slice(startIndex, startIndex + this.state.pageSize),
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
|
||||
<!-- 第三方css结束 -->
|
||||
<link href="./css/main.css?c8c3e819b0fa18cbca1c" rel="stylesheet"></head>
|
||||
<link href="./css/main.css?ee1639a1849b1f838f1a" rel="stylesheet"></head>
|
||||
|
||||
<body>
|
||||
<div id="root" style="overflow:hidden"></div>
|
||||
@ -56,6 +56,6 @@
|
||||
<script src="console-ui/public/js/merge.js"></script>
|
||||
<script src="console-ui/public/js/loader.js"></script>
|
||||
<!-- 第三方js结束 -->
|
||||
<script type="text/javascript" src="./js/main.js?c8c3e819b0fa18cbca1c"></script></body>
|
||||
<script type="text/javascript" src="./js/main.js?ee1639a1849b1f838f1a"></script></body>
|
||||
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user