react 防抖文本框

import React from 'react' import { Input } from 'antd'; import debounce from 'lodash/debounce'
const DebounceInput = (props) => {   const { onChange } = props;
  const debounceChange = debounce(onChange, 1000)
  const handleChange = (e) => {     debounceChange(e.target.value)   }
  return <Input {...props} onChange={handleChange} /> }
export default DebounceInput;
上一篇:简易电子表格的设计


下一篇:js防抖和节流