diff --git a/src/components/SystemSet/index.vue b/src/components/SystemSet/index.vue index a66945c8..e161bde1 100644 --- a/src/components/SystemSet/index.vue +++ b/src/components/SystemSet/index.vue @@ -1,7 +1,9 @@ - - {{ item.tip }} - + {{ item.tip }} @@ -40,6 +40,8 @@ import { reactive } from 'vue' import { ListType } from './index.d' import { useLangStore } from '@/store/modules/langStore/langStore' import { useDesignStore } from '@/store/modules/designStore/designStore' +import { useSettingStore } from '@/store/modules/settingStore/settingStore' +import { SettingStoreEnums } from '@/store/modules/settingStore/settingStore.d' import { icon } from '@/plugins' const { HelpOutlineIcon } = icon.ionicons5 @@ -52,23 +54,31 @@ defineProps({ const langStore = useLangStore() const designStore = useDesignStore() +const settingStore = useSettingStore() const list = reactive([ - { - key: 'lang', - value: langStore.getReload, - type: 'switch', - name: '切换语言', - desc: '切换语言是否重新加载页面', - tip: '不重载有较低可能性导致部分区域语言切换失败' - }, { key: 'aollapsed', value: designStore.asideAllCollapsed, type: 'switch', name: '菜单折叠', - desc: '左侧菜单是否全部折叠', - } + desc: '左侧菜单全部折叠', + }, + { + key: SettingStoreEnums.HIDE_PACKAGE_ONE_CATEGORY, + value: settingStore.getHidePackageOneCategory, + type: 'switch', + name: '隐藏分类', + desc: '工作空间表单分类只有单项时隐藏', + }, + { + key: 'lang', + value: langStore.getReload, + type: 'switch', + name: '切换语言', + desc: '切换语言重新加载页面', + tip: '若遇到部分区域语言切换失败,则开启' + }, ]) const closeHandle = () => { @@ -83,12 +93,15 @@ const handleChange = (e: Event, item: ListType) => { case 'aollapsed': designStore.changeAsideAllCollapsed() break + case SettingStoreEnums.HIDE_PACKAGE_ONE_CATEGORY: + settingStore.setItem(SettingStoreEnums.HIDE_PACKAGE_ONE_CATEGORY, item.value) + break } }