修复一个错误

This commit is contained in:
洛洛希雅Lolosia 2023-06-25 17:26:31 +08:00
parent 959cf74392
commit 1d9a65387e
4 changed files with 11 additions and 43 deletions

View File

@ -22,11 +22,7 @@ export interface IUserRole {
}
export async function getMyInfo(): Promise<IUser> {
const rs = await post<IUser>('/user/myInfo')
if (rs.avatar && !/^((https?|data):|\/\/)/.test(rs.avatar)) {
rs.avatar = `${baseUrl}/api/user/avatar?id=${rs.id}`
}
return rs
return post<IUser>('/user/myInfo')
}
export async function getMyRole(): Promise<IUserRole> {

View File

@ -10,32 +10,6 @@
<p>显示页面布局网格</p>
<el-switch v-model="ui.showLayoutGrid" />
</div>
<hr />
<p>消息面板</p>
<div class="switch-item">
<p>始终显示消息面板</p>
<el-switch v-model="messageFrame.alwaysShow" />
</div>
<div class="switch-item">
<p>页面变更时打印间隔消息</p>
<el-switch v-model="messageFrame.showPageSwitchMsg" />
</div>
<hr />
<p>网络</p>
<div class="switch-item">
<p>打印网络请求至消息面板</p>
<el-switch v-model="network.printMsg.enable" />
</div>
<template v-if="network.printMsg.enable">
<div class="switch-item">
<p>> 显示请求时间</p>
<el-switch v-model="network.printMsg.showTime" />
</div>
<div class="switch-item">
<p>> 等待消息面板显示</p>
<el-switch v-model="network.printMsg.waitMessageFrameShow" />
</div>
</template>
</div>
</el-dialog>
<div v-if="ui.showLayoutGrid" v-html="data.gridHtml" />
@ -48,7 +22,7 @@ import { useDebuggerStore } from "@/store/debuger";
import bus from "@/utils/bus";
const store = useDebuggerStore();
const { ui, network, messageFrame } = storeToRefs(store);
const { ui } = storeToRefs(store);
const data = reactive({
dialog: false,

View File

@ -11,6 +11,7 @@ export const useBasicStore = defineStore('basic', {
return {
token: '',
getUserInfo: false,
online: true,
userInfo: {
username: '',
realName: '',

View File

@ -1,18 +1,15 @@
import { defineStore } from "pinia";
import { defineStore } from 'pinia'
export const useDebuggerStore = defineStore('debugger',{
state(){
export const useDebuggerStore = defineStore('debugger', {
state() {
return {
ui: {
showLayoutGrid: false
}
},
persist:{
storage: localStorage,
paths: ['showLayoutGrid']
},
actions:{
setShowLayoutGrid(value){
this.showLayoutGrid = value
}
},
persist: {
storage: localStorage,
paths: undefined
}
})