fix: 修复左侧菜单收起时无法展开子菜单的bug

This commit is contained in:
xiaojunnuo
2024-12-24 17:09:06 +08:00
parent 8ebf95a222
commit 005622307e
21 changed files with 367 additions and 172 deletions
@@ -5,7 +5,7 @@
{{ label }}
</template>
<template v-else>
<FsTimeHumanize :model-value="value" :use-format-greater="1000000000000" :options="{ units: ['d'] }"></FsTimeHumanize>
<FsTimeHumanize :model-value="value" :use-format-greater="1000000000000000" :options="{ units: ['y', 'd'] }"></FsTimeHumanize>
</template>
</component>
</span>
@@ -35,12 +35,14 @@ const color = computed(() => {
if (props.value == null) {
return "";
}
if (props.value === -1) {
//距离今天多少天
const days = dayjs(props.value).diff(dayjs(), "day");
if (props.value === -1 || days > 365) {
return "green";
}
//小于3天 红色
if (dayjs().add(3, "day").valueOf() > props.value) {
if (days <= 6) {
return "red";
}