🐞 fix: ts lint

This commit is contained in:
m1m1sha 2024-10-07 16:25:13 +08:00
parent 5d2d8848fa
commit 6f264c663d
6 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<CalendarNextButton />
</CalendarHeader>
<div class="mt-4 flex flex-col gap-y-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
<CalendarGrid v-for="month in grid" :key="month.value.toString()">
<CalendarGridHead>
<CalendarGridRow>

View File

@ -16,12 +16,12 @@ const forwardedProps = useForwardProps(delegatedProps)
<template>
<CalendarHeading
v-slot="{ headingValue }"
:class="cn('text-sm font-medium', props.class)"
v-bind="forwardedProps"
>
<slot :heading-value>
<!-- <slot :heading-value>
{{ headingValue }}
</slot>
</slot> -->
</CalendarHeading>
</template>

View File

@ -92,7 +92,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
<template v-for="(category, i) in categories" :key="category">
<VisArea
:x="(d: Data, i: number) => i" :y="(d: Data) => d[category]" color="auto" :curve-type="curveType"
:x="(_d: Data, i: number) => i" :y="(d: Data) => d[category]" color="auto" :curve-type="curveType"
:attributes="{
[Area.selectors.area]: {
fill: `url(#${chartRef}-color-${i})`,
@ -103,7 +103,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
<template v-for="(category, i) in categories" :key="category">
<VisLine
:x="(d: Data, i: number) => i" :y="(d: Data) => d[category]" :color="colors[i]" :curve-type="curveType"
:x="(_d: Data, i: number) => i" :y="(d: Data) => d[category]" :color="colors[i]" :curve-type="curveType"
:attributes="{
[Line.selectors.line]: {
opacity: legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1,

View File

@ -71,14 +71,14 @@ const selectorsBar = computed(() => props.type === 'grouped' ? GroupedBar.select
<ChartCrosshair v-if="showTooltip" :colors="colors" :items="legendItems" :custom-tooltip="customTooltip" :index="index" />
<VisBarComponent
:x="(d: Data, i: number) => i"
:x="(_d: Data, i: number) => i"
:y="categories.map(category => (d: Data) => d[category]) "
:color="colors"
:rounded-corners="roundedCorners"
:bar-padding="0.05"
:attributes="{
[selectorsBar]: {
opacity: (d: Data, i:number) => {
opacity: (_d: Data, i:number) => {
const pos = i % categories.length
return legendItems[pos]?.inactive ? filterOpacity : 1
},

View File

@ -64,7 +64,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
<template v-for="(category, i) in categories" :key="category">
<VisLine
:x="(d: Data, i: number) => i"
:x="(_d: Data, i: number) => i"
:y="(d: Data) => d[category]"
:curve-type="curveType"
:color="colors[i]"

View File

@ -33,7 +33,7 @@ function template(d: any) {
}
}
function color(d: unknown, i: number) {
function color(_d: unknown, i: number) {
return props.colors[i] ?? 'transparent'
}
</script>