diff --git a/components/DataView/index.js b/components/DataView/index.js index fb1a1a61e85cd43c0dabe3242c11c76cde2f2174..8ed058920ffc3a8ae48510e08a17ec0cee99163a 100644 --- a/components/DataView/index.js +++ b/components/DataView/index.js @@ -37,7 +37,7 @@ function reduceDimension(arr) { // userTree/orgTree数据转成{id,name} function formatUser(obj) { let name = obj.label; - if(!name){ + if (!name) { return undefined; } if (typeof name !== 'string') { @@ -451,11 +451,12 @@ export default class DataView extends React.Component { search() { const { beforeSearch } = this.props; - window.history.replaceState( - { pageNum: 1 }, - '', - `${window.location.search && window.location.search.indexOf('?pageNum') < 0 ? `${window.location.search}&` : '?'}pageNum=1`, - ); + window.history.replaceState({ pageNum: 1 }, '', `?pageNum=${1}`); + // window.history.replaceState( + // { pageNum: 1 }, + // '', + // `${window.location.search && window.location.search.indexOf('?pageNum') < 0 ? `${window.location.search}&` : '?'}pageNum=1`, + // ); if (typeof beforeSearch === 'function') { beforeSearch(); }