import React from 'react'; import { observable, action } from 'mobx'; import { observer } from 'mobx-react'; import omit from 'omit.js'; import { Input } from '@tarojs/components'; import { ICsInputProps } from './PropType'; @observer class TextInput extends React.Component { @observable value = ''; @action handleInputChange = (e: any) => { const value = e.target?.value; this.value = value; if (this.props.onChange) this.props.onChange(value); }; @action clear = () => { this.value = ''; if (this.props.onChange) this.props.onChange(''); }; render() { const { inputStyle, password } = this.props; return ( ); } } export default TextInput;