feat: 合并main至dev

This commit is contained in:
LOG1997
2025-01-08 00:07:04 +08:00
parent 4e1fe3bd7c
commit 0e5eb525aa
20 changed files with 1599 additions and 314 deletions

View File

@@ -22,6 +22,7 @@ export const useGlobalConfig = defineStore('global', {
textSize: 30,
patternColor: '#1b66c9',
patternList: defaultPatternList as number[],
background: {}, // 背景颜色或图片
},
musicList: defaultMusicList as IMusic[],
imageList: defaultImageList as IImage[],
@@ -100,6 +101,10 @@ export const useGlobalConfig = defineStore('global', {
getLanguage(state) {
return state.globalConfig.language
},
// 获取背景图片设置
getBackground(state) {
return state.globalConfig.theme.background
},
},
actions: {
// 设置rowCount
@@ -218,6 +223,10 @@ export const useGlobalConfig = defineStore('global', {
this.globalConfig.language = language
i18n.global.locale.value = language
},
// 设置背景图片
setBackground(background: any) {
this.globalConfig.theme.background = background
},
// 重置所有配置
reset() {
this.globalConfig = {
@@ -236,6 +245,7 @@ export const useGlobalConfig = defineStore('global', {
textSize: 30,
patternColor: '#1b66c9',
patternList: defaultPatternList as number[],
background: {}, // 背景颜色或图片
},
musicList: defaultMusicList as IMusic[],
imageList: defaultImageList as IImage[],