!644 feat: add current year calculation to footer component

Merge pull request !644 from AhJindeg/feature/footer-currentYear
This commit is contained in:
芋道源码 2025-01-04 00:24:28 +00:00 committed by Gitee
commit 39486d6696
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -12,6 +12,9 @@ const prefixCls = getPrefixCls('footer')
const appStore = useAppStore()
const title = computed(() => appStore.getTitle)
//
const currentYear = computed(() => new Date().getFullYear())
</script>
<template>
@ -19,6 +22,6 @@ const title = computed(() => appStore.getTitle)
:class="prefixCls"
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"
>
<span class="text-14px">Copyright ©2022-{{ title }}</span>
<span class="text-14px">Copyright ©{{ currentYear }} {{ title }}</span>
</div>
</template>