vuerouter4.1.4更新导致路由缓存页面刷新出现404错误
parent
dfdb2ec106
commit
3f3035fbb8
|
@ -60,7 +60,7 @@ export const useRedo = (_router?: Router) => {
|
|||
params['_redirect_type'] = 'path';
|
||||
params['path'] = fullPath;
|
||||
}
|
||||
push({ name: REDIRECT_NAME, params, query }).then(() => resolve(true));
|
||||
push({ name: REDIRECT_NAME, state: { params }, query }).then(() => resolve(true));
|
||||
});
|
||||
}
|
||||
return redo;
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
import { unref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const { currentRoute, replace } = useRouter();
|
||||
const { currentRoute, replace, options } = useRouter();
|
||||
|
||||
const { params, query } = unref(currentRoute);
|
||||
const { query } = unref(currentRoute);
|
||||
const { params } = options.history.state as Recordable;
|
||||
const { path, _redirect_type = 'path' } = params;
|
||||
|
||||
Reflect.deleteProperty(params, '_redirect_type');
|
||||
|
|
Loading…
Reference in New Issue