/* * @Author: your name * @Date: 2021-12-17 14:41:42 * @Description: * @FilePath: \zl-business\src\components\Unit\inputAndDel\index.tsx */ import React, { useMemo } from 'react'; import Wrap from '../wrap/Wrap'; import Icon from '../../Icon/index'; import { returnClass } from '../unit'; import { Input } from 'antd'; import '../g.scss'; function LabelInputAndDelect(props: IInputAndDel) { const { title = 'label', value = '', change, size = 'normal', paddingSize = 'normal', wrapStyle = { padding: '6px 20px 6px 20px' } } = props; const Redio = useMemo(() => { return (
{title}
change?.(e.target.value, 'change')} onPressEnter={(e) => { e.preventDefault(); e.stopPropagation(); change?.(e.target.value, 'blur'); }} onBlur={(e) => change?.(e.target.value, 'blur')} /> change?.(e, 'del')} />
); }, [title, value, paddingSize]); return Redio; } export default LabelInputAndDelect; export interface IInputAndDel { title?: string | number; value?: string | number; change?: Function; size?: string; paddingSize?: string; wrapStyle?: React.CSSProperties; }