predict-input-value:在实际更改输入之前,在KeyDown或KeyPress事件期间预测输入值

时间:2021-05-02 05:00:17
【文件属性】:
文件名称:predict-input-value:在实际更改输入之前,在KeyDown或KeyPress事件期间预测输入值
文件大小:664KB
文件格式:ZIP
更新时间:2021-05-02 05:00:17
JavaScript 预测输入值 在实际更改输入之前,在KeyDown或KeyPress事件期间预测输入值。 tl; dr 通过执行npm install @wojtekmaj/predict-input-value或yarn add @wojtekmaj/predict-input-value 。 通过添加import predictInputValue from '@wojtekmaj/predict-input-value' 。 通过编写const nextValue = predictInputValue(event)使用它。 例子 使适应: 输入:值"hello" 选定的文本: "ello" 按键: i function onKeyPress ( event ) { const nextValue = predictInputValue ( event ) ; // "hi" } 执
【文件预览】:
predict-input-value-master
----.eslintrc.json(37B)
----.gitignore(109B)
----.babelrc(150B)
----package.json(1KB)
----src()
--------index.js(2KB)
--------index.spec.js(4KB)
----LICENSE(1KB)
----.github()
--------FUNDING.yml(18B)
--------workflows()
----README.md(2KB)
----.eslintignore(10B)
----.yarnrc.yml(66B)
----.yarn()
--------releases()
----yarn.lock(252KB)

网友评论