vue3-element-dict 3.3.3 → 3.3.4
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/README.md +4 -0
- package/package.json +1 -1
- package/types/index.d.ts +16 -21
package/README.md
CHANGED
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -203,27 +203,6 @@ export interface IFormatFunOut {
|
|
|
203
203
|
(arr: any, treeSetting: TreeSetting): string
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
/**
|
|
207
|
-
* 防抖函数
|
|
208
|
-
*
|
|
209
|
-
* @param func 需要防抖的函数
|
|
210
|
-
* @param wait 等待时长(毫秒),默认 300
|
|
211
|
-
* @param immediate 是否先立即触发一次,默认 false
|
|
212
|
-
* @param onlyOneTime 是否只触发一次,默认false
|
|
213
|
-
* @returns 防抖处理后的函数
|
|
214
|
-
*/
|
|
215
|
-
export declare function Debounce<T extends (...args: any[]) => any>(func: T, wait?: number, immediate?: boolean, onlyOneTime?: boolean): (...args: Parameters<T>) => void
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* 节流函数
|
|
219
|
-
*
|
|
220
|
-
* @param func 需要节流的函数
|
|
221
|
-
* @param wait 等待时长(毫秒),默认 300
|
|
222
|
-
* @param immediate 是否先立即触发一次,默认 false
|
|
223
|
-
* @returns 节流处理后的函数
|
|
224
|
-
*/
|
|
225
|
-
export declare function Throttle<T extends (...args: any[]) => any>(func: T, wait?: number, immediate?: boolean): (...args: Parameters<T>) => void
|
|
226
|
-
|
|
227
206
|
export type GetTreeLabelByCodesOptions = {
|
|
228
207
|
defaultVal?: string | number
|
|
229
208
|
emptyText?: string | number
|
|
@@ -484,6 +463,16 @@ export interface IToKebabCase {
|
|
|
484
463
|
(str: string): string
|
|
485
464
|
}
|
|
486
465
|
|
|
466
|
+
/** 防抖函数 */
|
|
467
|
+
export interface IDebounce {
|
|
468
|
+
<T extends (...args: any[]) => any>(func: T, wait?: number, immediate?: boolean, onlyOneTime?: boolean): (...args: Parameters<T>) => void
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/** 节流函数 */
|
|
472
|
+
export interface IThrottle {
|
|
473
|
+
<T extends (...args: any[]) => any>(func: T, wait?: number, immediate?: boolean): (...args: Parameters<T>) => void
|
|
474
|
+
}
|
|
475
|
+
|
|
487
476
|
/**
|
|
488
477
|
* ========================================
|
|
489
478
|
* 导出的函数
|
|
@@ -613,6 +602,12 @@ export declare const toCamelCase: IToCamelCase
|
|
|
613
602
|
/** 转短横线命名 */
|
|
614
603
|
export declare const toKebabCase: IToKebabCase
|
|
615
604
|
|
|
605
|
+
/** 防抖函数 */
|
|
606
|
+
export declare const debounce: IDebounce
|
|
607
|
+
|
|
608
|
+
/** 节流函数 */
|
|
609
|
+
export declare const throttle: IThrottle
|
|
610
|
+
|
|
616
611
|
/** vue3-element-dict 插件安装函数 */
|
|
617
612
|
export interface Vue3ElementDictPlugin {
|
|
618
613
|
install(app: App, options: OptionalDictConfig): void
|