import React, { useState, useCallback } from 'react';
import { ConfigProvider, Drawer, Switch, Tooltip } from 'antd';
import { SettingOutlined } from '@ant-design/icons';
import { Form, FormItem, RadioButton, InputNumber, combine } from 'common';
export const Setting = combine(({ stores }) => {
const { setting, setSetting } = stores.layout;
const [visible, setVisible] = useState(false);
const onShow = useCallback(() => setVisible(true), []);
const onClose = useCallback(() => setVisible(false), []);
return (
<>
>
);
});
const componentSizeOptions = [
{ label: '默认' },
{ label: '大', value: 'large' },
{ label: '中', value: 'middle' },
{ label: '小', value: 'small' },
];
const themeOptions = { dark: '暗色', light: '亮色' };
/**
* 页面配置
*/
export type TSetting = {
componentSize: 'large' | 'middle' | 'small'; // 全局组件尺寸
theme: 'light' | 'dark'; // 主题色
hiddenMenu: boolean; // 隐藏菜单
hiddenHeader: boolean; // 默认隐藏头部
menuIconTop: number; // 菜单开关按钮位置
headerIconRight: number; // 页头开关按钮位置
};