Compare commits

...

2 Commits

Author SHA1 Message Date
Lykin eefa7b1346 style: change chart time to 24-hour format 2024-05-27 16:52:20 +08:00
Lykin 3321fbf6fd style: fix the width and height of the redis type tag 2024-05-27 16:05:13 +08:00
2 changed files with 12 additions and 2 deletions

View File

@ -68,6 +68,7 @@ const label = computed(() => {
'redis-type-tag-small': !props.short && props.size === 'small',
'redis-type-tag-round': props.round,
'redis-type-tag-loading': props.loading,
'redis-type-tag': props.short,
}"
:color="{ color: backgroundColor, textColor: fontColor }"
:size="props.size"
@ -112,4 +113,13 @@ const label = computed(() => {
opacity: 0.4;
}
}
.redis-type-tag {
width: 22px;
height: 22px;
justify-content: center;
align-items: center;
text-align: center;
vertical-align: middle;
}
</style>

View File

@ -94,7 +94,7 @@ const refreshInfo = async (force) => {
const _updateChart = (info) => {
let timeLabels = toRaw(cmdRate.value.labels)
timeLabels = timeLabels.concat(dayjs().format('hh:mm:ss'))
timeLabels = timeLabels.concat(dayjs().format('HH:mm:ss'))
timeLabels = slice(timeLabels, Math.max(0, timeLabels.length - statusHistory))
// commands per seconds
@ -146,7 +146,7 @@ const _updateChart = (info) => {
const _mockChart = () => {
const timeLabels = []
for (let i = 0; i < 5; i++) {
timeLabels.push(dayjs().add(5, 'seconds').format('hh:mm:ss'))
timeLabels.push(dayjs().add(5, 'seconds').format('HH:mm:ss'))
}
// commands per seconds