feat(for): for
This commit is contained in:
@@ -7,6 +7,7 @@ export const useGlobalConfig = defineStore('global', {
|
||||
globalConfig: {
|
||||
rowCount: 12,
|
||||
isSHowPrizeList:true,
|
||||
topTitle:'大明内阁六部御前奏对',
|
||||
theme: {
|
||||
name: 'dark',
|
||||
detail: { primary: '#0f5fd3' },
|
||||
@@ -27,6 +28,10 @@ export const useGlobalConfig = defineStore('global', {
|
||||
getGlobalConfig(state) {
|
||||
return state.globalConfig;
|
||||
},
|
||||
// 获取标题
|
||||
getTopTitle(state) {
|
||||
return state.globalConfig.topTitle;
|
||||
},
|
||||
// 获取行数
|
||||
getRowCount(state) {
|
||||
return state.globalConfig.rowCount;
|
||||
@@ -77,6 +82,10 @@ export const useGlobalConfig = defineStore('global', {
|
||||
setRowCount(rowCount: number) {
|
||||
this.globalConfig.rowCount = rowCount;
|
||||
},
|
||||
// 设置标题
|
||||
setTopTitle(topTitle: string) {
|
||||
this.globalConfig.topTitle = topTitle;
|
||||
},
|
||||
// 设置主题
|
||||
setTheme(theme: any) {
|
||||
const { name, detail } = theme;
|
||||
@@ -165,6 +174,7 @@ export const useGlobalConfig = defineStore('global', {
|
||||
reset() {
|
||||
this.globalConfig = {
|
||||
rowCount: 12,
|
||||
topTitle:'大明内阁六部御前奏对',
|
||||
isSHowPrizeList:true,
|
||||
theme: {
|
||||
name: 'dark',
|
||||
|
||||
Reference in New Issue
Block a user