#
zhou zhou
1 天以前 4259deb19122a4807d50c99ed4a95405ebe4a47c
rsf-design/src/store/modules/setting.js
@@ -3,7 +3,6 @@
import AppConfig from '@/config'
import { SystemThemeEnum } from '@/enums/appEnum'
import { setElementThemeColor } from '@/utils/ui'
import { useCeremony } from '@/hooks/core/useCeremony'
import { StorageConfig } from '@/utils'
import { SETTING_DEFAULT_CONFIG } from '@/config/setting'
const useSettingStore = defineStore(
@@ -25,19 +24,16 @@
    const showLanguage = ref(SETTING_DEFAULT_CONFIG.showLanguage)
    const showNprogress = ref(SETTING_DEFAULT_CONFIG.showNprogress)
    const showSettingGuide = ref(SETTING_DEFAULT_CONFIG.showSettingGuide)
    const showFestivalText = ref(SETTING_DEFAULT_CONFIG.showFestivalText)
    const watermarkVisible = ref(SETTING_DEFAULT_CONFIG.watermarkVisible)
    const autoClose = ref(SETTING_DEFAULT_CONFIG.autoClose)
    const uniqueOpened = ref(SETTING_DEFAULT_CONFIG.uniqueOpened)
    const colorWeak = ref(SETTING_DEFAULT_CONFIG.colorWeak)
    const refresh = ref(SETTING_DEFAULT_CONFIG.refresh)
    const holidayFireworksLoaded = ref(SETTING_DEFAULT_CONFIG.holidayFireworksLoaded)
    const boxBorderMode = ref(SETTING_DEFAULT_CONFIG.boxBorderMode)
    const pageTransition = ref(SETTING_DEFAULT_CONFIG.pageTransition)
    const tabStyle = ref(SETTING_DEFAULT_CONFIG.tabStyle)
    const customRadius = ref(SETTING_DEFAULT_CONFIG.customRadius)
    const containerWidth = ref(SETTING_DEFAULT_CONFIG.containerWidth)
    const festivalDate = ref('')
    const getMenuTheme = computed(() => {
      const list = AppConfig.themeList.filter((item) => item.theme === menuThemeType.value)
      if (isDark.value) {
@@ -54,9 +50,6 @@
    })
    const getCustomRadius = computed(() => {
      return customRadius.value + 'rem' || SETTING_DEFAULT_CONFIG.customRadius + 'rem'
    })
    const isShowFireworks = computed(() => {
      return festivalDate.value === useCeremony().currentFestivalData.value?.date ? false : true
    })
    const switchMenuLayouts = (type) => {
      menuType.value = type
@@ -137,15 +130,6 @@
      customRadius.value = radius
      document.documentElement.style.setProperty('--custom-radius', `${radius}rem`)
    }
    const setholidayFireworksLoaded = (isLoad) => {
      holidayFireworksLoaded.value = isLoad
    }
    const setShowFestivalText = (show) => {
      showFestivalText.value = show
    }
    const setFestivalDate = (date) => {
      festivalDate.value = date
    }
    const setDualMenuShowText = (show) => {
      dualMenuShowText.value = show
    }
@@ -174,16 +158,12 @@
      refresh,
      watermarkVisible,
      customRadius,
      holidayFireworksLoaded,
      showFestivalText,
      festivalDate,
      dualMenuShowText,
      containerWidth,
      getMenuTheme,
      isDark,
      getMenuOpenWidth,
      getCustomRadius,
      isShowFireworks,
      switchMenuLayouts,
      setMenuOpenWidth,
      setGlopTheme,
@@ -209,9 +189,6 @@
      reload,
      setWatermarkVisible,
      setCustomRadius,
      setholidayFireworksLoaded,
      setShowFestivalText,
      setFestivalDate,
      setDualMenuShowText
    }
  },