minutool 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -0
- package/dist/minutool.js +187 -168
- package/dist/minutool.js.map +1 -1
- package/dist/minutool.umd.cjs +5 -5
- package/dist/minutool.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -161,6 +161,15 @@ export declare const bindDomEvent: <E extends Event = Event>(element: EventTarge
|
|
|
161
161
|
*/
|
|
162
162
|
export declare const bindDoubleClick: (element: EventTarget | string, payload: (event: MouseEvent) => void) => () => void;
|
|
163
163
|
|
|
164
|
+
/**
|
|
165
|
+
* 为 input/textarea 绑定支持 IME 的防抖函数
|
|
166
|
+
* @param element - DOM 元素
|
|
167
|
+
* @param callback - 回调,参数为 { value, event }
|
|
168
|
+
* @param delay - 防抖延迟(ms),默认 300
|
|
169
|
+
* @returns { destroy, cancel, flush }
|
|
170
|
+
*/
|
|
171
|
+
export declare const bindInputDebounce: (element: HTMLInputElement | HTMLTextAreaElement, callback: (value: string, event: InputEvent) => void, delay?: number) => (() => void);
|
|
172
|
+
|
|
164
173
|
/**
|
|
165
174
|
* 绑定键盘按键按下事件,并返回一个解绑函数
|
|
166
175
|
* @param element - 要绑定事件的元素
|