react antd-mobile 获取 TextareaItem的值报错
import {TextareaItem, InputItem, Button, Flex, SearchBar} from 'antd-mobile';class leavMessage extends Component {constructor(props){super(props);Util.setTitle("关于我们");this.stat...
·
import {TextareaItem, InputItem, Button, Flex, SearchBar} from 'antd-mobile';
class leavMessage extends Component {
constructor(props){
super(props);
Util.setTitle("关于我们");
this.state = {
list:[],
textareaValue:''
}
}
//设置textareaValue
handleTextareaChange = (e) => {
console.log(e);
this.setState({
textareaValue:e //不能使用e.target.value 获取值
})
}
}
<TextareaItem
placeholder="请输入留言"
rows={5}
count={300}
onChange={this.handleTextareaChange.bind(this)}
/>
更多推荐


所有评论(0)