UNPKG
@neosjs/cli
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
Neos(奈欧斯)是一个帮助开发者快速地创建 Vue3 应用并自动配置项目编译的脚手架
docs.neosjs.com/cli/
@neosjs/cli
/
lib
/
create
/
template
/
base
/
src
/
hooks
/
useLoading.ts
17 lines
(15 loc)
•
307 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import
{ ref }
from
'vue'
export
const
useLoading
= (
initValue =
false
) => {
const
loading =
ref
(initValue)
const
setLoading
= (
value
:
boolean
) => { loading.
value
= value }
const
toggle
= (
) => { loading.
value
= !loading.
value
}
return
{ loading, setLoading, toggle, } }