介绍
本文档主要用于描述 ShadcnContribution 组件的一些特性和用法。
用法
查看代码
vue
<template>
<ShadcnContribution :data="data" />
</template>颜色 (color-scheme)
查看代码
vue
<template>
<ShadcnContribution :data="data" :colorScheme="colorScheme" />
</template>统计的年数 (year-count)
查看代码
vue
<template>
<ShadcnContribution :data="data" :yearCount="1" />
</template>显示图例 (show-legend)
查看代码
vue
<template>
<ShadcnContribution :data="data" showLegend />
<ShadcnContribution :data="data" :showLegend="false" />
</template>显示周 (show-week)
查看代码
vue
<template>
<ShadcnContribution :data="data" showWeek />
<ShadcnContribution :data="data" :showWeek="false" />
</template>显示月 (show-month)
查看代码
vue
<template>
<ShadcnContribution :data="data" showMonth />
<ShadcnContribution :data="data" :showMonth="false" />
</template>单元格尺寸 (cell-size)
查看代码
vue
<template>
<ShadcnContribution :data="data" :cellSize="15" />
</template>单元格间距 (cell-gap)
查看代码
vue
<template>
<ShadcnContribution :data="data" :cellGap="4" />
</template>年 (year)
查看代码
vue
<template>
<ShadcnContribution :data="data" :year="2023" />
</template>液态玻璃效果 (glass)
查看代码
vue
<template>
<ShadcnContribution :data="data" glass :dark="darkMode" :year="2024" />
</template>