feat: first commit

This commit is contained in:
ilhamtahir committed 2024-11-15 08:03:29 +08:00
commit bba2d5c21b
43 files changed
+15159

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
export function useCount() {
const count = ref(Math.round(Math.random() * 20))
function inc() {
count.value += 1
}
function dec() {
count.value -= 1
}
return {
count,
inc,
dec,
}
}
+10
View File
@@ -0,0 +1,10 @@
import type { MaybeRef } from '@vueuse/core'
export function useQuery(key?: MaybeRef<string>) {
const query = ref<AnyObject>({})
onLoad((q) => {
query.value = q || {}
})
const value = computed(() => (key ? query.value[unref(key)] : null))
return { query, value }
}