import React, { ReactNode } from 'react'; import { Switch, Divider, InputNumber } from '@arco-design/web-react'; import { useSelector, useDispatch } from 'react-redux'; import { ReducerState } from '../../redux'; import useLocale from '../../utils/useLocale'; import styles from './style/block.module.less'; export interface BlockProps { title?: ReactNode; options?: { name: string; value: string; type?: 'switch' | 'number' }[]; children?: ReactNode; } export default function Block(props: BlockProps) { const { title, options, children } = props; const locale = useLocale(); const settings = useSelector((state: ReducerState) => state.global.settings); const dispatch = useDispatch(); return (