typescript 如何输入react-currency-masked-input

ix0qys7i  于 2023-04-22  发布在  TypeScript
关注(0)|答案(1)|浏览(74)

当我正在建立我的项目,这个组件ware崩溃de进程

wrrgggsh

wrrgggsh1#

对于这个问题,我使用了这个解决方案。

declare module 'react-currency-masked-input' {
  import { Component } from 'react';

  export interface CurrencyMaskedInputProps {
    name?: string;
    value?: any;
    onChange?: (event:Event,value:any) => void;
    onBlur?: (event: { target: { name: string, value: string } }) => void;
    onFocus?: (event: { target: { name: string, value: string } }) => void;
    prefix?: string;
    suffix?: string;
    thousandsSeparatorSymbol?: string;
    decimalSymbol?: string;
    decimalPlaces?: number;
    inputMode?: string;
    disabled?: boolean;
    readOnly?: boolean;
    customInput?: React.ReactNode;
    className?: string;
    style?: React.CSSProperties;
  }
    
  export default class CurrencyMaskedInput extends Component<CurrencyMaskedInputProps> {}
}

相关问题