fix: lint

This commit is contained in:
07akioni 2024-07-20 22:32:02 +08:00
parent 7a805289de
commit f5e791e70d
9 changed files with 17 additions and 19 deletions

View File

@ -11,11 +11,11 @@ import type { TimePickerProps } from '../../time-picker/src/TimePicker'
import type { MergedTheme } from '../../_mixins'
import { createInjectionKey } from '../../_utils'
import type { DatePickerTheme } from '../styles/light'
import type { ButtonProps } from '../../button'
import type {
dualCalendarValidation,
uniCalendarValidation
} from './validation-utils'
import { type ButtonProps } from '../../button'
export type Value = number | [number, number]
@ -28,8 +28,8 @@ export type NowButtonProps = Pick<ButtonProps, 'size' | 'onClick'>
export type ClearButtonProps = Pick<ButtonProps, 'size' | 'onClick'>
export type ConfirmButtonProps = Pick<
ButtonProps,
'size' | 'onClick' | 'type' | 'disabled'
ButtonProps,
'size' | 'onClick' | 'type' | 'disabled'
>
export type Shortcuts =

View File

@ -8,9 +8,9 @@ import {
import { NButton, NxButton } from '../../../button'
import { NBaseFocusDetector } from '../../../_internal'
import { resolveSlot, warnOnce } from '../../../_utils'
import type { ClearButtonProps, NowButtonProps } from '../interface'
import { useCalendar, useCalendarProps } from './use-calendar'
import PanelHeader from './panelHeader'
import { type ClearButtonProps, type NowButtonProps } from '../interface'
/**
* Date Panel
@ -40,9 +40,9 @@ export default defineComponent({
}
return useCalendar(props, props.type)
},
render () {
const { mergedClsPrefix, mergedTheme, shortcuts, onRender, $slots, type } =
this
render() {
const { mergedClsPrefix, mergedTheme, shortcuts, onRender, $slots, type }
= this
const nowButtonProps: NowButtonProps = {
size: 'tiny',
onClick: this.handleNowClick

View File

@ -8,9 +8,9 @@ import {
} from '../../../_internal/icons'
import { NBaseFocusDetector } from '../../../_internal'
import { resolveSlot, warnOnce } from '../../../_utils'
import type { ClearButtonProps, ConfirmButtonProps } from '../interface'
import PanelHeader from './panelHeader'
import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar'
import { type ClearButtonProps, type ConfirmButtonProps } from '../interface'
export default defineComponent({
name: 'DateRangePanel',

View File

@ -10,13 +10,13 @@ import {
} from '../../../_internal/icons'
import { NBaseFocusDetector } from '../../../_internal'
import { resolveSlot } from '../../../_utils'
import type {
ClearButtonProps,
ConfirmButtonProps,
NowButtonProps
} from '../interface'
import { useCalendar, useCalendarProps } from './use-calendar'
import PanelHeader from './panelHeader'
import {
type ClearButtonProps,
type ConfirmButtonProps,
type NowButtonProps
} from '../interface'
/**
* DateTime Panel

View File

@ -10,9 +10,9 @@ import {
} from '../../../_internal/icons'
import { NBaseFocusDetector } from '../../../_internal'
import { resolveSlot, warnOnce } from '../../../_utils'
import type { ClearButtonProps, ConfirmButtonProps } from '../interface'
import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar'
import PanelHeader from './panelHeader'
import { type ClearButtonProps, type ConfirmButtonProps } from '../interface'
export default defineComponent({
name: 'DateTimeRangePanel',

View File

@ -12,13 +12,13 @@ import {
getYearString
} from '../utils'
import { MONTH_ITEM_HEIGHT } from '../config'
import { useCalendar, useCalendarProps } from './use-calendar'
import type {
ClearButtonProps,
ConfirmButtonProps,
NowButtonProps,
OnPanelUpdateValueImpl
} from '../interface'
import { useCalendar, useCalendarProps } from './use-calendar'
/**
* Month Panel

View File

@ -21,8 +21,8 @@ import {
getYearString
} from '../utils'
import { MONTH_ITEM_HEIGHT } from '../config'
import type { ClearButtonProps, ConfirmButtonProps } from '../interface'
import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar'
import { type ClearButtonProps, type ConfirmButtonProps } from '../interface'
export default defineComponent({
name: 'MonthRangePanel',

View File

@ -31,11 +31,10 @@ import type {
OnBeforeUpload,
OnError,
OnPreview,
OnRetry,
OnUpdateFileList,
RenderIcon,
ShouldUseThumbnailUrl,
RenderIcon,
OnRetry,
UploadInternalInst,
XhrHandlers
} from './interface'

View File

@ -125,7 +125,6 @@ export type OnRetry = ({
file
}: {
file: UploadSettledFileInfo
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
}) => UploadFileInfo | undefined | void
export interface FileAndEntry {