feat: 头像全局配置功能

This commit is contained in:
hujinbin
2025-01-15 19:42:56 +08:00
parent 15d1fd9229
commit 7732e4a92c
4 changed files with 40 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ export const useGlobalConfig = defineStore('global', {
globalConfig: {
rowCount: 17,
isSHowPrizeList: true,
isShowAvatar: true,
topTitle: '大明内阁六部御前奏对',
theme: {
name: 'dracula',
@@ -93,8 +94,11 @@ export const useGlobalConfig = defineStore('global', {
// 获取是否显示奖品列表
getIsShowPrizeList(state) {
return state.globalConfig.isSHowPrizeList;
},
// 获取是否显示头像
getIsShowAvatar(state) {
return state.globalConfig.isShowAvatar;
}
},
actions: {
// 设置rowCount
@@ -207,12 +211,17 @@ export const useGlobalConfig = defineStore('global', {
// 设置是否显示奖品列表
setIsShowPrizeList(isShowPrizeList: boolean) {
this.globalConfig.isSHowPrizeList = isShowPrizeList;
},
// 设置是否显示头像
setIsShowAvatar(isShowAvatar: boolean) {
this.globalConfig.isShowAvatar = isShowAvatar;
},
// 重置所有配置
reset() {
this.globalConfig = {
rowCount: 17,
isSHowPrizeList: true,
isShowAvatar: false,
topTitle: '大明内阁六部御前奏对',
theme: {
name: 'dracula',