Merge remote-tracking branch 'origin'

This commit is contained in:
Uyarn 2022-09-17 00:30:31 +08:00
commit 094339b1c4
3 changed files with 3 additions and 9 deletions

View File

@ -5,7 +5,7 @@
:layout="settingStore.layout"
:is-fixed="settingStore.isSidebarFixed"
:menu="sideMenu"
:theme="settingStore.mode"
:theme="settingStore.displayMode"
:is-compact="settingStore.isSidebarCompact"
/>
</template>

View File

@ -1,6 +1,6 @@
import { defineStore } from 'pinia';
import { TOKEN_NAME } from '@/config/global';
import { store, usePermissionStore } from '@/store';
import { store } from '@/store';
const InitUserInfo = {
roles: [],
@ -79,12 +79,6 @@ export const useUserStore = defineStore('user', {
this.token = '';
},
},
persist: {
afterRestore: (ctx) => {
const permissionStore = usePermissionStore();
permissionStore.initRoutes(ctx.store.roles);
},
},
});
export function getUserStore() {

View File

@ -57,7 +57,7 @@ const transform: AxiosTransform = {
const { apiUrl, isJoinPrefix, urlPrefix, joinParamsToUrl, formatDate, joinTime = true } = options;
// 添加接口前缀
if (isJoinPrefix) {
if (isJoinPrefix && urlPrefix && isString(urlPrefix)) {
config.url = `${urlPrefix}${config.url}`;
}