Appearance
useWatchLoading
▸ useWatchLoading(source, title?, options?): void
监听状态自动切换 loading
参数
| Name | Type | Default value | Description |
|---|---|---|---|
source | Function | Ref<any> | undefined | 需要监听的状态,支持传入 ref 和监听函数 |
title? | string | '' | |
options? | ShowLoadingOptions | {} |
返回值
void
示例
ts
useWatchLoading(isLoading)
useWatchLoading(() => props.isLoading)