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 CHANGED
@@ -20,6 +20,10 @@ vue3-element-dict是在vue3框架下对element-plus组件库的部分组件进
20
20
 
21
21
  ## 更新日志
22
22
 
23
+ ### 3.3.4
24
+
25
+ 1. 【优化】修复防抖和节流函数ts未声明问题
26
+
23
27
  ### 3.3.3
24
28
 
25
29
  1. 【修复】修复`dict-checkbox`组件全选功能无效的问题
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue3-element-dict",
3
3
  "private": false,
4
- "version": "3.3.3",
4
+ "version": "3.3.4",
5
5
  "author": {
6
6
  "name": "shenxiaobu",
7
7
  "url": "https://shenxiaobu.github.io"
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