Files
ZDXSGYHT/library/components/VabFooter/index.vue
liangjian 836c61ac55 @@@@@@
2026-01-27 16:32:15 +08:00

64 lines
1.5 KiB
Vue

<template>
<footer v-if="theme?.showFooter" class="vab-footer">
Copyright
<vab-icon icon="copyright-line" />
{{ fullYear }} {{ title }}
<a
v-if="beian"
class="hidden-xs-only"
href="https://beian.miit.gov.cn/#/Integrated/index"
style="margin-left: 3px; color: var(--el-color-grey)"
target="_blank"
>
{{ beian }}
</a>
</footer>
</template>
<script setup>
import { useSettingsStore } from '/@/store/modules/settings'
defineOptions({
name: 'VabFooter',
})
const route = useRoute()
const fullYear = new Date().getFullYear()
const settingsStore = useSettingsStore()
const { title, theme } = storeToRefs(settingsStore)
const beian = ref(localStorage.getItem('beian'))
onBeforeMount(() => {
if (route.query && route.query.beian) {
beian.value = route.query.beian
localStorage.setItem('beian', beian.value)
} else {
// 备案号
if (location.hostname.includes('beautiful')) beian.value = ''
// 官方站点
if (location.hostname.includes('vuejs-core')) beian.value = ''
}
})
</script>
<style lang="scss" scoped>
.vab-footer {
display: flex;
align-items: center;
justify-content: center;
min-height: var(--el-footer-height);
padding: 0 var(--el-padding) 0 var(--el-padding);
margin-top: var(--el-margin);
color: var(--el-color-grey);
background: var(--el-color-white);
border: 1px solid var(--el-border-color);
border-radius: var(--el-border-radius-base);
transition: var(--el-transition);
i {
margin: 0 3px;
}
}
</style>