'admin-22.04.20:优化地址栏有参数退出登录,再次登录不跳之前界面问题'

This commit is contained in:
lyt 2022-04-20 20:57:11 +08:00
parent c180c24769
commit c942aec7f1
2 changed files with 4 additions and 2 deletions

View File

@ -14,6 +14,7 @@
- 🎯 优化 图标选择器 [#I4YAHB](https://gitee.com/lyt-top/vue-next-admin/issues/I4YAHB),感谢[@真有你的](https://gitee.com/sunliusen)
- 🎯 优化 去掉开发环境 i18n 控制台警告,页面代码:[i18n/index.ts](https://gitee.com/lyt-top/vue-next-admin/blob/master/src/i18n/index.ts)
- 🎯 优化 登录页添加 `NextLoading.start()` 方法,防止第一次进入界面时出现短暂空白
- 🎯 优化 地址栏有参数退出登录,再次登录不跳之前界面问题 `src/layout/navBars/breadcrumb/user.vue`
- 🎯 优化 `SvgIcon` 组件,防止 `开启 Tagsview 图标` 时,`tagsView 右键菜单关闭` 报错问题
- 🎉 新增 [vuex](https://vuex.vuejs.org/) 替换成 [pinia](https://pinia.vuejs.org/getting-started.html)
- 🎉 新增 tagsView 支持自定义 tagsView 名称(文章详情时有用),前往体验:[路由参数/普通路由](https://lyt-top.gitee.io/vue-next-admin-preview/#/params/common)

View File

@ -78,7 +78,7 @@
<script lang="ts">
import { ref, getCurrentInstance, computed, reactive, toRefs, onMounted, defineComponent } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { ElMessageBox, ElMessage } from 'element-plus';
import screenfull from 'screenfull';
import { useI18n } from 'vue-i18n';
@ -97,6 +97,7 @@ export default defineComponent({
setup() {
const { t } = useI18n();
const { proxy } = <any>getCurrentInstance();
const route = useRoute();
const router = useRouter();
const stores = useUserInfo();
const storesThemeConfig = useThemeConfig();
@ -165,7 +166,7 @@ export default defineComponent({
await resetRoute(); // /
ElMessage.success(t('message.user.logOutSuccess'));
setTimeout(() => {
window.location.href = ''; //
window.location.href = `#/login?redirect=${route.path}&params=${JSON.stringify(route.query ? route.query : route.params)}`; //
}, 500);
})
.catch(() => {});