mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复外观设置bug
This commit is contained in:
parent
6e251e6a10
commit
e3b9db6847
|
|
@ -92,8 +92,7 @@ const useUserStore = defineStore({
|
|||
|
||||
async theme() {
|
||||
return await ThemeApi.getThemeInfo().then((ok) => {
|
||||
this.themeInfo = ok.data
|
||||
changeTheme(this.themeInfo['theme'])
|
||||
this.setTheme(ok.data)
|
||||
window.document.title = this.themeInfo['title'] || 'MaxKB'
|
||||
const link = document.querySelector('link[rel="icon"]') as any
|
||||
if (link) {
|
||||
|
|
@ -103,9 +102,9 @@ const useUserStore = defineStore({
|
|||
},
|
||||
|
||||
async profile() {
|
||||
return UserApi.profile().then((ok) => {
|
||||
return UserApi.profile().then(async (ok) => {
|
||||
this.userInfo = ok.data
|
||||
this.theme()
|
||||
await this.theme()
|
||||
return this.asyncGetProfile()
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, computed, watch } from 'vue'
|
||||
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue'
|
||||
import { onBeforeRouteLeave } from 'vue-router'
|
||||
import type { FormInstance, FormRules, UploadFiles } from 'element-plus'
|
||||
import { cloneDeep } from 'lodash'
|
||||
|
|
|
|||
Loading…
Reference in New Issue