mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 14:16:31 +08:00
Merge remote-tracking branch 'origin'
This commit is contained in:
commit
094339b1c4
|
@ -5,7 +5,7 @@
|
||||||
:layout="settingStore.layout"
|
:layout="settingStore.layout"
|
||||||
:is-fixed="settingStore.isSidebarFixed"
|
:is-fixed="settingStore.isSidebarFixed"
|
||||||
:menu="sideMenu"
|
:menu="sideMenu"
|
||||||
:theme="settingStore.mode"
|
:theme="settingStore.displayMode"
|
||||||
:is-compact="settingStore.isSidebarCompact"
|
:is-compact="settingStore.isSidebarCompact"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { TOKEN_NAME } from '@/config/global';
|
import { TOKEN_NAME } from '@/config/global';
|
||||||
import { store, usePermissionStore } from '@/store';
|
import { store } from '@/store';
|
||||||
|
|
||||||
const InitUserInfo = {
|
const InitUserInfo = {
|
||||||
roles: [],
|
roles: [],
|
||||||
|
@ -79,12 +79,6 @@ export const useUserStore = defineStore('user', {
|
||||||
this.token = '';
|
this.token = '';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
persist: {
|
|
||||||
afterRestore: (ctx) => {
|
|
||||||
const permissionStore = usePermissionStore();
|
|
||||||
permissionStore.initRoutes(ctx.store.roles);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export function getUserStore() {
|
export function getUserStore() {
|
||||||
|
|
|
@ -57,7 +57,7 @@ const transform: AxiosTransform = {
|
||||||
const { apiUrl, isJoinPrefix, urlPrefix, joinParamsToUrl, formatDate, joinTime = true } = options;
|
const { apiUrl, isJoinPrefix, urlPrefix, joinParamsToUrl, formatDate, joinTime = true } = options;
|
||||||
|
|
||||||
// 添加接口前缀
|
// 添加接口前缀
|
||||||
if (isJoinPrefix) {
|
if (isJoinPrefix && urlPrefix && isString(urlPrefix)) {
|
||||||
config.url = `${urlPrefix}${config.url}`;
|
config.url = `${urlPrefix}${config.url}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user