mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90a61a1000 | ||
|
|
ad34c7b891 | ||
|
|
c5b107eab9 |
@@ -1,3 +1,9 @@
|
|||||||
|
# 3.7.1 (2022-11-22)
|
||||||
|
|
||||||
|
### 🔥 hotfix
|
||||||
|
|
||||||
|
- Fixed the problem that the tab page may not be reset when logging out when the tab page cache is not turned on
|
||||||
|
|
||||||
# 3.7.0 (2022-11-21)
|
# 3.7.0 (2022-11-21)
|
||||||
|
|
||||||
### ✔️ refactor
|
### ✔️ refactor
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
# 3.7.1 (2022-11-22)
|
||||||
|
|
||||||
|
### 🔥 hotfix
|
||||||
|
|
||||||
|
- Fixed the problem that the tab page may not be reset when logging out when the tab page cache is not turned on
|
||||||
|
|
||||||
# 3.7.0 (2022-11-21)
|
# 3.7.0 (2022-11-21)
|
||||||
|
|
||||||
### ✔️ refactor
|
### ✔️ refactor
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
# 3.7.1 (2022-11-22)
|
||||||
|
|
||||||
|
### 🔥 hotfix
|
||||||
|
|
||||||
|
- 修复在未开启标签页缓存时退出登录,可能存在标签页未重置的问题
|
||||||
|
|
||||||
# 3.7.0 (2022-11-21)
|
# 3.7.0 (2022-11-21)
|
||||||
|
|
||||||
### ✔️ refactor
|
### ✔️ refactor
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-pure-admin",
|
"name": "vue-pure-admin",
|
||||||
"version": "3.7.0",
|
"version": "3.7.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"pinia": "^2.0.23",
|
"pinia": "^2.0.24",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
|
|||||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -74,7 +74,7 @@ specifiers:
|
|||||||
nprogress: ^0.2.0
|
nprogress: ^0.2.0
|
||||||
path: ^0.12.7
|
path: ^0.12.7
|
||||||
picocolors: ^1.0.0
|
picocolors: ^1.0.0
|
||||||
pinia: ^2.0.23
|
pinia: ^2.0.24
|
||||||
postcss: ^8.4.18
|
postcss: ^8.4.18
|
||||||
postcss-html: ^1.5.0
|
postcss-html: ^1.5.0
|
||||||
postcss-import: ^15.0.0
|
postcss-import: ^15.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "3.7.0",
|
"Version": "3.7.1",
|
||||||
"Title": "PureAdmin",
|
"Title": "PureAdmin",
|
||||||
"FixedHeader": true,
|
"FixedHeader": true,
|
||||||
"HiddenSideBar": false,
|
"HiddenSideBar": false,
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import NoticeList from "./noticeList.vue";
|
|||||||
import { Tabs, TabPane } from "@pureadmin/components";
|
import { Tabs, TabPane } from "@pureadmin/components";
|
||||||
|
|
||||||
const dropdownDom = ref();
|
const dropdownDom = ref();
|
||||||
const activeKey = ref(noticesData[2].key);
|
const activeKey = ref(noticesData[0].key);
|
||||||
|
|
||||||
const notices = ref(noticesData);
|
const notices = ref(noticesData);
|
||||||
|
|
||||||
const noticesNum = ref(0);
|
const noticesNum = ref(0);
|
||||||
@@ -33,7 +34,7 @@ function tabClick() {
|
|||||||
centered
|
centered
|
||||||
class="dropdown-tabs"
|
class="dropdown-tabs"
|
||||||
:tabBarStyle="{ marginLeft: notices?.length > 4 ? '8px' : '0' }"
|
:tabBarStyle="{ marginLeft: notices?.length > 4 ? '8px' : '0' }"
|
||||||
v-model="activeKey"
|
v-model:activeKey="activeKey"
|
||||||
@tabClick="tabClick"
|
@tabClick="tabClick"
|
||||||
>
|
>
|
||||||
<template v-for="item in notices" :key="item.key">
|
<template v-for="item in notices" :key="item.key">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { storeToRefs } from "pinia";
|
||||||
import { getConfig } from "@/config";
|
import { getConfig } from "@/config";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
@@ -10,12 +11,14 @@ import { useAppStoreHook } from "@/store/modules/app";
|
|||||||
import { i18nChangeLanguage } from "@wangeditor/editor";
|
import { i18nChangeLanguage } from "@wangeditor/editor";
|
||||||
import { useUserStoreHook } from "@/store/modules/user";
|
import { useUserStoreHook } from "@/store/modules/user";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
|
|
||||||
const errorInfo = "当前路由配置不正确,请检查配置";
|
const errorInfo = "当前路由配置不正确,请检查配置";
|
||||||
|
|
||||||
export function useNav() {
|
export function useNav() {
|
||||||
const pureApp = useAppStoreHook();
|
const pureApp = useAppStoreHook();
|
||||||
const routers = useRouter().options.routes;
|
const routers = useRouter().options.routes;
|
||||||
|
const { wholeMenus } = storeToRefs(usePermissionStoreHook());
|
||||||
|
|
||||||
/** 用户名 */
|
/** 用户名 */
|
||||||
const username = computed(() => {
|
const username = computed(() => {
|
||||||
@@ -99,6 +102,7 @@ export function useNav() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function menuSelect(indexPath: string, routers): void {
|
function menuSelect(indexPath: string, routers): void {
|
||||||
|
if (wholeMenus.value.length === 0) return;
|
||||||
if (isRemaining(indexPath)) return;
|
if (isRemaining(indexPath)) return;
|
||||||
let parentPath = "";
|
let parentPath = "";
|
||||||
const parentPathIndex = indexPath.lastIndexOf("/");
|
const parentPathIndex = indexPath.lastIndexOf("/");
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ export const useUserStore = defineStore({
|
|||||||
this.username = "";
|
this.username = "";
|
||||||
this.roles = [];
|
this.roles = [];
|
||||||
removeToken();
|
removeToken();
|
||||||
router.push("/login");
|
|
||||||
useMultiTagsStoreHook().handleTags("equal", [...routerArrays]);
|
useMultiTagsStoreHook().handleTags("equal", [...routerArrays]);
|
||||||
resetRouter();
|
resetRouter();
|
||||||
|
router.push("/login");
|
||||||
},
|
},
|
||||||
/** 刷新`token` */
|
/** 刷新`token` */
|
||||||
async handRefreshToken(data) {
|
async handRefreshToken(data) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { removeToken, setToken, type DataInfo } from "./auth";
|
|||||||
import { subBefore, getQueryMap } from "@pureadmin/utils";
|
import { subBefore, getQueryMap } from "@pureadmin/utils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 简版前端单点登录,根据实际业务自行编写
|
* 简版前端单点登录,根据实际业务自行编写,平台启动后本地可以跳后面这个链接进行测试 http://localhost:8848/#/permission/page/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||||
* 划重点:
|
* 划重点:
|
||||||
* 判断是否为单点登录,不为则直接返回不再进行任何逻辑处理,下面是单点登录后的逻辑处理
|
* 判断是否为单点登录,不为则直接返回不再进行任何逻辑处理,下面是单点登录后的逻辑处理
|
||||||
* 1.清空本地旧信息;
|
* 1.清空本地旧信息;
|
||||||
|
|||||||
Reference in New Issue
Block a user