mirror of
https://github.com/EasyTier/EasyTier.git
synced 2024-11-16 11:42:27 +08:00
🐞 fix: ts lint
This commit is contained in:
parent
5d2d8848fa
commit
6f264c663d
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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]"
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user