83 lines
2.7 KiB
Vue
83 lines
2.7 KiB
Vue
<template>
|
|
<Footer :class="prefixCls" v-if="true" ref="footerRef">
|
|
<div class="footer-text">中国船舶集团有限公司第七〇四研究所 数智化中心@2026</div>
|
|
</Footer>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { computed, defineComponent, unref, ref } from 'vue';
|
|
import { Layout } from 'ant-design-vue';
|
|
|
|
import { GithubFilled } from '@ant-design/icons-vue';
|
|
|
|
import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting';
|
|
import { openWindow } from '/@/utils';
|
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
|
import { useRouter } from 'vue-router';
|
|
import { useDesign } from '/@/hooks/web/useDesign';
|
|
import { useLayoutHeight } from '../content/useContentViewHeight';
|
|
import { ThemeEnum } from '/@/enums/appEnum';
|
|
|
|
export default defineComponent({
|
|
name: 'LayoutFooter',
|
|
components: { Footer: Layout.Footer, GithubFilled },
|
|
setup() {
|
|
const { t } = useI18n();
|
|
const { getShowFooter } = useRootSetting();
|
|
const { currentRoute } = useRouter();
|
|
const { prefixCls } = useDesign('layout-footer');
|
|
|
|
const footerRef = ref<ComponentRef>(null);
|
|
const { setFooterHeight } = useLayoutHeight();
|
|
//当前主题
|
|
const { getDarkMode } = useRootSetting();
|
|
const isDark = computed(() => getDarkMode.value === ThemeEnum.DARK);
|
|
|
|
// const getShowLayoutFooter = computed(() => {
|
|
// if (unref(getShowFooter)) {
|
|
// const footerEl = unref(footerRef)?.$el;
|
|
// setFooterHeight(footerEl?.offsetHeight || 0);
|
|
// } else {
|
|
// setFooterHeight(0);
|
|
// }
|
|
// return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter;
|
|
// });
|
|
//鼠标移入的颜色设置
|
|
const hoverColor = computed(() => {
|
|
return unref(isDark) ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 0, 0, 0.85)';
|
|
});
|
|
return {
|
|
// getShowLayoutFooter,
|
|
prefixCls,
|
|
t,
|
|
DOC_URL,
|
|
GITHUB_URL,
|
|
SITE_URL,
|
|
openWindow,
|
|
footerRef,
|
|
hoverColor,
|
|
};
|
|
},
|
|
});
|
|
</script>
|
|
<style lang="less" scoped>
|
|
@prefix-cls: ~'@{namespace}-layout-footer';
|
|
|
|
@normal-color: rgba(0, 0, 0, 0.45);
|
|
// update-begin-author:liusq date:2023-7-12 for: [issues/608] dark 模式下底部 footer 文字 hover 样式导致文字消失
|
|
@hover-color: v-bind(hoverColor);
|
|
// update-end-author:liusq date:2023-7-12 for: [issues/608] dark 模式下底部 footer 文字 hover 样式导致文字消失
|
|
.@{prefix-cls} {
|
|
color: rgba(0, 0, 0, 0.65);
|
|
text-align: center;
|
|
padding: 16px 0;
|
|
margin-top: auto;
|
|
|
|
.footer-text {
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
</style>
|