File tree 2 files changed +11
-4
lines changed
src/components/Loading/src
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- ** Preview** 添加新的属性及事件
4
4
- ** Dark Theme** 新增对 tailwindcss 夜间模式的支持
5
+ - ** 其它** 为 useLoading 添加 setTip 方法
5
6
6
7
### 🐛 Bug Fixes
7
8
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ interface Fn {
12
12
( ) : void ;
13
13
}
14
14
15
- export function useLoading ( props : Partial < LoadingProps > ) : [ Fn , Fn ] ;
16
- export function useLoading ( opt : Partial < UseLoadingOptions > ) : [ Fn , Fn ] ;
15
+ export function useLoading ( props : Partial < LoadingProps > ) : [ Fn , Fn , ( string ) => void ] ;
16
+ export function useLoading ( opt : Partial < UseLoadingOptions > ) : [ Fn , Fn , ( string ) => void ] ;
17
17
18
- export function useLoading ( opt : Partial < LoadingProps > | Partial < UseLoadingOptions > ) : [ Fn , Fn ] {
18
+ export function useLoading (
19
+ opt : Partial < LoadingProps > | Partial < UseLoadingOptions >
20
+ ) : [ Fn , Fn , ( string ) => void ] {
19
21
let props : Partial < LoadingProps > ;
20
22
let target : HTMLElement | Ref < ElRef > = document . body ;
21
23
@@ -39,5 +41,9 @@ export function useLoading(opt: Partial<LoadingProps> | Partial<UseLoadingOption
39
41
instance . close ( ) ;
40
42
} ;
41
43
42
- return [ open , close ] ;
44
+ const setTip = ( tip : string ) => {
45
+ instance . setTip ( tip ) ;
46
+ } ;
47
+
48
+ return [ open , close , setTip ] ;
43
49
}
You can’t perform that action at this time.
0 commit comments