refactor: no reactivity transform (#2600)
This commit is contained in:
parent
b9394c2fa5
commit
ccfa7a8d10
102 changed files with 649 additions and 652 deletions
|
@ -32,10 +32,10 @@ export function useHumanReadableNumber() {
|
|||
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))
|
||||
const formatter = computed(() => Intl.DateTimeFormat(locale.value, options))
|
||||
return computed(() => {
|
||||
const v = resolveUnref(value)
|
||||
return v ? formatter.format(new Date(v)) : ''
|
||||
return v ? formatter.value.format(new Date(v)) : ''
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue