Browse Source

解决Vue3路由不及时刷新问题

lifanagju_citu 7 months ago
parent
commit
6cd2f18653
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/recruit/personal/position/index.vue

+ 2 - 2
src/views/recruit/personal/position/index.vue

@@ -105,14 +105,14 @@ getData()
 
 // 参数改变后刷新路由,触发数据刷新
 const updateRouter = () => {
-  let query = { index: 1 }
+  let query = {}
   if (Object.keys(routeQuery).length) {
     query = Object.keys(routeQuery).reduce((obj, key) => {
       if (routeQuery[key] !== '') obj[key] = routeQuery[key]
         return obj
     }, {})
   }
-  query.index = query.index ? (query.index-0)+1 : 1
+  query.date = new Date().getTime()
   router.push({ path: route.path, query })
   pageInfo.pageNo = 1
   getData()