feat: add user about page
This commit is contained in:
20
composables/count.ts
Normal file
20
composables/count.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useStorage } from '@vueuse/core'
|
||||
|
||||
export function useCount() {
|
||||
const count = useStorage('count', 5)
|
||||
|
||||
function inc() {
|
||||
count.value += 1
|
||||
}
|
||||
function dec() {
|
||||
if (count.value <= 1)
|
||||
return
|
||||
count.value -= 1
|
||||
}
|
||||
|
||||
return {
|
||||
count,
|
||||
inc,
|
||||
dec,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user