+
+
+
+
+
+
+
+
+
+
-
- updateSettingState('keepAliveConfig', {
- maxKeepAliveLength: val!,
- })
- }
- />
-
-
-
-
-
-
+
+ {
+ if (value !== null)
+ updateSettingState('keepAliveConfig', {
+ maxKeepAliveLength: value,
+ })
+ }}
+ />
+
+
+
+ updateSettingState('keepAliveConfig', { keepAliveExclude })
+ }
+ />
+
+
+
+
)
},
})
diff --git a/src/layout/components/SiderBar/components/SettingDrawer/segment-views/CustomMenu.tsx b/src/layout/components/SiderBar/components/SettingDrawer/segment-views/CustomMenu.tsx
index 9c3f807d..0e37cd9c 100644
--- a/src/layout/components/SiderBar/components/SettingDrawer/segment-views/CustomMenu.tsx
+++ b/src/layout/components/SiderBar/components/SettingDrawer/segment-views/CustomMenu.tsx
@@ -1,166 +1,74 @@
-import { RIcon } from '@/components'
-import { useSettingActions } from '@/store'
-import {
- NButton,
- NDivider,
- NFlex,
- NForm,
- NFormItem,
- NInputNumber,
- NSwitch,
- NText,
- NTooltip,
-} from 'naive-ui'
-import { SETTING_DRAWER_INJECT_KEY } from '../constant'
+import { useI18n } from '@/hooks'
+import { useMenuActions, useSettingActions, useSettingGetters } from '@/store'
+import { NButton, NForm, NFormItem, NInputNumber, NSwitch } from 'naive-ui'
+import SettingsSection from '../components/SettingsSection'
+
+const sizes = [
+ 'menuWidth',
+ 'collapsedWidth',
+ 'collapsedIndent',
+ 'iconSize',
+ 'collapsedIconSize',
+] as const
+const switches = [
+ 'inverted',
+ 'menuSiderBarLogo',
+ 'accordion',
+ 'nativeScrollbar',
+] as const
export default defineComponent({
name: 'SegmentViewsCustomMenu',
setup() {
- const model = inject(SETTING_DRAWER_INJECT_KEY, {})
+ const { t } = useI18n('preferences')
+ const { getMenuConfig } = useSettingGetters()
const { updateSettingState } = useSettingActions()
+ const { setupAppMenu } = useMenuActions()
- return {
- model,
- updateSettingState,
- }
- },
- render() {
- const { model, updateSettingState } = this
-
- return (
-