0.1.4 • Published 2 years ago

auto-input-fox v0.1.4

Weekly downloads
-
License
WTFPL
Repository
github
Last release
2 years ago

介绍

fox-auto-width-input 根据字符自动计算input宽度

依赖

react >= 16.9

API

APItypeDesc
valuestringinput value
inputElref (useRef)ref
inputChange(value:string,e:React.ChangeEvent)=>voidinput的onChang事件
inputDel(e:React.ChangeEvent)=>voidbackspace事件
inputEnter(e:React.ChangeEvent)=>voidenter事件
classNamestringcalssName

demo

import {AutoWidthInput,useInputFocuse} from 'fox-auto-width-input'

const App = () => {
  const [ inputEl, focusAutoWidthInput ] = useInputFocuse()
  return (
    <div className="content" onClick={focusAutoWidthInput}>
      <AutoWidthInput
        value={ 'qq' }
        inputEl={ inputEl }
        inputDel={ e => { console.log('inputdel', e) } }
        inputEnter={ e => { console.log('inputenter', e) } }
        inputChange={(value,e)=>{ console.log('inputChange',value,e) } }
      />
    </div>
  )
}

"webpack": "^4.44.1", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.0"

0.1.4

2 years ago

0.1.3

2 years ago

0.1.0

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago