123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /** @format */
- import { defineStore } from 'pinia'
- import { useUserStore } from './user'
- export const useCommonStore = defineStore(
- 'commonStore',
- () => {
- const navigateTextColor = ref('#ffffff')
- const navigateBgColor = ref('#0F0820')
- // const userStore = useUserStore()
- const setNavigateBgColor = (color: string) => {
- if (!color)
- return
- color = color.toUpperCase()
- console.log('newColor-----color', color)
- if (color === '#0F0820') {
- navigateTextColor.value = '#ffffff'
- navigateBgColor.value = `${color}`
- }
- else if (color === '#F3F4FB') {
- navigateTextColor.value = '#0F0820'
- navigateBgColor.value = `${color}`
- }
- else if (color === '#FFFFFF') {
- console.log('newColor-----color---2', color)
- navigateTextColor.value = '#0F0820'
- navigateBgColor.value = `${color}`
- }
- }
- return {
- navigateTextColor,
- navigateBgColor,
- setNavigateBgColor,
- }
- },
- {
- persist: true,
- },
- )
|