import React from 'react'; import { ColorPickerProps } from 'antd'; import { ColorValueType, SingleValueType } from 'antd/es/color-picker/interface'; import { BizFormItemProps } from './Item'; type GradientColor = Exclude; /** * 将颜色对象转为字符串格式的颜色值。 * * 如果颜色对象是渐变色数组,将数组中的颜色对象转为字符串格式的颜色值。 * * @param value 要转换的颜色值。 * @param format 转换格式。 * @returns 转换后的字符串颜色值。如果没有值或清除颜色,返回 undefined 。 */ declare function transformColor(value: SingleValueType, format: NonNullable): string; declare function transformColor(value: GradientColor, format: NonNullable): (Omit[0], 'color'> & { color: string; })[]; export interface BizFormItemColorPickerProps extends BizFormItemProps, Pick { colorPickerProps?: ColorPickerProps; } declare const BizFormItemColorPicker: React.FC & { transformColor: typeof transformColor; }; export default BizFormItemColorPicker;