Skip to content

Commit 39486d6

Browse files
YunaiVgitee-org
authored andcommitted
!644 feat: ✨ add current year calculation to footer component
Merge pull request !644 from AhJindeg/feature/footer-currentYear
2 parents 25484a9 + 700efd7 commit 39486d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/layout/components/Footer/src/Footer.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ const prefixCls = getPrefixCls('footer')
1212
const appStore = useAppStore()
1313
1414
const title = computed(() => appStore.getTitle)
15+
16+
// 添加当前年份计算属性
17+
const currentYear = computed(() => new Date().getFullYear())
1518
</script>
1619

1720
<template>
1821
<div
1922
:class="prefixCls"
2023
class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)] overflow-hidden"
2124
>
22-
<span class="text-14px">Copyright ©2022-{{ title }}</span>
25+
<span class="text-14px">Copyright ©{{ currentYear }} {{ title }}</span>
2326
</div>
2427
</template>

0 commit comments

Comments
 (0)