/** * @description 数字输入框和slider滑动条绑定 * * @date 创建时间 2022-10-27 15:33 * @author 开发人员 yena */ import React, { forwardRef, ForwardedRef } from "react"; import { PlaceOrderInput } from "./index"; import { SuffixQuantity, SuffixQuantityProps } from "./SuffixQuantity"; import { CenterQuantity } from "./SuffixQuantity/CenterQuantity"; export interface QuantityInputProps extends SuffixQuantityProps { scale?: number; error?: boolean; showCenter: boolean; value?: any; sideQuantity: { buy: string; sell: string; }; onChangeQuantityInput: (val: string) => void; handleClearQuantityInput: (bool?: boolean) => void; name?: any; isLogin: boolean; } export const QuantityInput = forwardRef((props: QuantityInputProps, ref: ForwardedRef) => { const { baseOn, scale, sideQuantity } = props; return ( } proOnFocus={() => props.showCenter && props.handleClearQuantityInput(true)} centerAdornment={ props.showCenter ? (
props.handleClearQuantityInput(true)} >
) : ( ) } scale={scale} error={props.error} /> ); });