File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/components/Loading/src Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
33- ** Preview** 添加新的属性及事件
44- ** Dark Theme** 新增对 tailwindcss 夜间模式的支持
5+ - ** 其它** 为 useLoading 添加 setTip 方法
56
67### 🐛 Bug Fixes
78
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ interface Fn {
1212 ( ) : void ;
1313}
1414
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 ] ;
1717
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 ] {
1921 let props : Partial < LoadingProps > ;
2022 let target : HTMLElement | Ref < ElRef > = document . body ;
2123
@@ -39,5 +41,9 @@ export function useLoading(opt: Partial<LoadingProps> | Partial<UseLoadingOption
3941 instance . close ( ) ;
4042 } ;
4143
42- return [ open , close ] ;
44+ const setTip = ( tip : string ) => {
45+ instance . setTip ( tip ) ;
46+ } ;
47+
48+ return [ open , close , setTip ] ;
4349}
You can’t perform that action at this time.
0 commit comments