🎨chore: 使用 oxlint, oxfmt&格式化代码

This commit is contained in:
2026-02-08 21:16:25 +08:00
parent 9d35c6a9d8
commit 3a801ba016
78 changed files with 3367 additions and 1468 deletions

View File

@@ -1,18 +1,23 @@
<script setup lang="ts">
import { DatePicker as VCalendarDatePicker } from 'v-calendar'
// @ts-ignore
import type { DatePickerDate, DatePickerRangeObject } from 'v-calendar/dist/types/src/use/datePicker'
import type {
DatePickerDate,
DatePickerRangeObject,
} from 'v-calendar/dist/types/src/use/datePicker'
import 'v-calendar/dist/style.css'
defineOptions({
inheritAttrs: false
inheritAttrs: false,
})
const props = defineProps({
modelValue: {
type: [Date, Object] as PropType<DatePickerDate | DatePickerRangeObject | null>,
default: null
}
type: [Date, Object] as PropType<
DatePickerDate | DatePickerRangeObject | null
>,
default: null,
},
})
const emit = defineEmits(['update:model-value', 'close'])
@@ -22,15 +27,15 @@ const date = computed({
set: (value) => {
emit('update:model-value', value)
emit('close')
}
},
})
const attrs = {
'transparent': true,
'borderless': true,
'color': 'primary',
transparent: true,
borderless: true,
color: 'primary',
'is-dark': { selector: 'html', darkClass: 'dark' },
'first-day-of-week': 2
'first-day-of-week': 2,
}
function onDayClick(_: any, event: MouseEvent): void {
@@ -41,7 +46,11 @@ function onDayClick(_: any, event: MouseEvent): void {
<template>
<VCalendarDatePicker
v-if="date && (date as DatePickerRangeObject)?.start && (date as DatePickerRangeObject)?.end"
v-if="
date &&
(date as DatePickerRangeObject)?.start &&
(date as DatePickerRangeObject)?.end
"
v-model.range="date"
:columns="2"
v-bind="{ ...attrs, ...$attrs }"
@@ -82,7 +91,8 @@ function onDayClick(_: any, event: MouseEvent): void {
--vc-accent-900: rgb(var(--color-primary-900));
}
.vc-container .vc-weekday-1, .vc-container .vc-weekday-7 {
.vc-container .vc-weekday-1,
.vc-container .vc-weekday-7 {
@apply text-primary;
}
</style>