kun-galgame-vue/src/store/modules/settings.ts

23 lines
684 B
TypeScript
Raw Normal View History

2023-05-12 18:23:22 +00:00
// KUNGalgame 设置面板的 store
import { ref } from 'vue'
import { defineStore } from 'pinia'
import kungalgameSettings from '@/config/setting-panel'
export const useSettingsPanelStore = defineStore('settings', () => {
const showSettings = ref<boolean>(kungalgameSettings.showSettings)
const showDarkMode = ref<boolean>(kungalgameSettings.showDarkMode)
const pageWidth = ref<number>(kungalgameSettings.pageWidth)
const kungalgameBackground = ref<number>(
kungalgameSettings.kungalgameBackground
)
const fixLoli = ref<boolean>(kungalgameSettings.fixLoli)
return {
showSettings,
showDarkMode,
pageWidth,
kungalgameBackground,
fixLoli,
}
})