前端项目实战209-识别pda小demo

import React, {useState} from 'react';
import {Input, Button} from 'antd';
function App() {
  const [content, setContent] = useState('');
  const handleChange=(e)=>{
    setContent(e.target.value);
  }
  const cleanText=()=>{
    setContent('');
  }
  return (
    <div>
      <Input id='scanid' value = {content} onChange={handleChange}></Input>
      <Button onClick={cleanText}>清除</Button>
    </div>
  );
}

export default App;

posted @ 2022-11-28 19:16  前端导师歌谣  阅读(12)  评论(0)    收藏  举报