import { getCookieInDomain } from '@/utils/theme' import getters from '@/store/modules/theme/getters' import mutations from '@/store/modules/theme/mutations' import actions from '@/store/modules/theme/actions' const normalNavbarTheme = { label: '普通', icon: '', key: 'normal', colors: ['#4ea5ed', '#3c7fff'] } const store = { state: () => { const navbarTheme = getCookieInDomain('navbarTheme') return { theme: getCookieInDomain('theme') || 'default', themeColor: getCookieInDomain('themeColor'), navbarTheme: navbarTheme ? JSON.parse(navbarTheme) : normalNavbarTheme, layoutConfig: getCookieInDomain('layoutConfig') || 'default', layoutMenuConfig: getCookieInDomain('layoutMenuConfig') || 'vertical', configThemeColor: null, hideThemeControl: false } }, getters, mutations, actions } export default store