import React from 'react' import { Row, Col, Select, Checkbox, InputNumber } from 'antd' const Option = Select.Option import { CheckboxChangeEvent } from 'antd/lib/checkbox' import ColorPicker from 'components/ColorPicker' import { IRadarConfig } from './' import { chartFontFamilyOptions, chartFontSizeOptions } from './constants' import styles from '../Workbench.less' interface IRadarSectionProps { config: IRadarConfig onChange: ( value: string | number | boolean, propPath: string | string[] ) => void } const BasePropPath = ['radar'] const change = ( onChange: IRadarSectionProps['onChange'], propPath: | Exclude | ['name', keyof IRadarConfig['name']] ) => (e: CheckboxChangeEvent | string | number) => { const value: string | number | boolean = (e as CheckboxChangeEvent).target ? (e as CheckboxChangeEvent).target.checked : (e as string | number) onChange(value, BasePropPath.concat(propPath as string | string[])) } function RadarSection (props: IRadarSectionProps) { const { config, onChange } = props const { shape, name, nameGap, splitNumber } = config const { show, fontFamily, fontSize, color } = name return (
形状 轴段数 显示外标签 {show && ( <> 距离 )} {show && ( <> void} /> )}
) } export default RadarSection