chore: upgrade to VueUse v10
This commit is contained in:
parent
076c47b7b0
commit
61526df93f
8 changed files with 106 additions and 61 deletions
|
@ -1,4 +1,4 @@
|
|||
import type { MaybeComputedRef, MaybeRef, UseTimeAgoOptions } from '@vueuse/core'
|
||||
import type { MaybeRef, MaybeRefOrGetter, UseTimeAgoOptions } from '@vueuse/core'
|
||||
|
||||
const formatter = Intl.NumberFormat()
|
||||
|
||||
|
@ -29,7 +29,7 @@ export function useHumanReadableNumber() {
|
|||
}
|
||||
}
|
||||
|
||||
export function useFormattedDateTime(value: MaybeComputedRef<string | number | Date | undefined | null>,
|
||||
export function useFormattedDateTime(value: MaybeRefOrGetter<string | number | Date | undefined | null>,
|
||||
options: Intl.DateTimeFormatOptions = { dateStyle: 'long', timeStyle: 'medium' }) {
|
||||
const { locale } = useI18n()
|
||||
const formatter = $computed(() => Intl.DateTimeFormat(locale.value, options))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue