czh-20260609-增加门户卡片数据获取前端接口;增加顶部栏相应logo
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<Footer :class="prefixCls" v-if="true" ref="footerRef">
|
||||
<div class="footer-text">中国船舶集团有限公司第七〇四研究所 数智化中心@2026</div>
|
||||
<Footer :class="prefixCls" v-if="getShowLayoutFooter" ref="footerRef">
|
||||
<div class="footer-text">中国船舶集团有限公司第七〇四研究所 数智化中心©2026</div>
|
||||
</Footer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, unref, ref } from 'vue';
|
||||
import { computed, defineComponent, unref, ref, watch, nextTick } from 'vue';
|
||||
import { Layout } from 'ant-design-vue';
|
||||
|
||||
import { GithubFilled } from '@ant-design/icons-vue';
|
||||
// import { GithubFilled } from '@ant-design/icons-vue';
|
||||
|
||||
import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting';
|
||||
import { openWindow } from '/@/utils';
|
||||
// import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting';
|
||||
// import { openWindow } from '/@/utils';
|
||||
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
// import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useDesign } from '/@/hooks/web/useDesign';
|
||||
@@ -22,40 +22,50 @@
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LayoutFooter',
|
||||
components: { Footer: Layout.Footer, GithubFilled },
|
||||
components: { Footer: Layout.Footer /* , GithubFilled */ },
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
// 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;
|
||||
// });
|
||||
//鼠标移入的颜色设置
|
||||
// 是否显示 footer:受全局设置 + 路由 meta.hiddenFooter 控制
|
||||
const getShowLayoutFooter = computed(() => {
|
||||
return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter;
|
||||
});
|
||||
|
||||
// 监听 footer 显隐,同步高度到内容布局
|
||||
watch(
|
||||
getShowLayoutFooter,
|
||||
async (show) => {
|
||||
if (show) {
|
||||
await nextTick();
|
||||
const footerEl = unref(footerRef)?.$el;
|
||||
setFooterHeight(footerEl?.offsetHeight || 0);
|
||||
} else {
|
||||
setFooterHeight(0);
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
// 鼠标移入的颜色设置
|
||||
const hoverColor = computed(() => {
|
||||
return unref(isDark) ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 0, 0, 0.85)';
|
||||
});
|
||||
return {
|
||||
// getShowLayoutFooter,
|
||||
getShowLayoutFooter,
|
||||
prefixCls,
|
||||
t,
|
||||
DOC_URL,
|
||||
GITHUB_URL,
|
||||
SITE_URL,
|
||||
openWindow,
|
||||
// t,
|
||||
// DOC_URL,
|
||||
// GITHUB_URL,
|
||||
// SITE_URL,
|
||||
// openWindow,
|
||||
footerRef,
|
||||
hoverColor,
|
||||
};
|
||||
@@ -65,7 +75,7 @@
|
||||
<style lang="less" scoped>
|
||||
@prefix-cls: ~'@{namespace}-layout-footer';
|
||||
|
||||
@normal-color: rgba(0, 0, 0, 0.45);
|
||||
// @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 样式导致文字消失
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
<template>
|
||||
<Dropdown placement="bottomLeft" :overlayClassName="`${prefixCls}-dropdown-overlay`">
|
||||
<span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex">
|
||||
<!-- <img :class="`${prefixCls}__header`" :src="getAvatarUrl" /> -->
|
||||
<span :class="`${prefixCls}__info hidden md:block`">
|
||||
<span :class="`${prefixCls}__name `" class="truncate">
|
||||
{{ getUserInfo.realname }}
|
||||
</span>
|
||||
</span>
|
||||
<img :class="`${prefixCls}__logo`" :src="deptLogo" />
|
||||
</span>
|
||||
|
||||
<template #overlay>
|
||||
@@ -47,6 +42,7 @@
|
||||
import { useMessage } from '/src/hooks/web/useMessage';
|
||||
import { useGo } from '/@/hooks/web/usePage';
|
||||
import headerImg from '/@/assets/images/header.jpg';
|
||||
import deptLogo from '/@/assets/images/department-logo.png';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { openWindow } from '/@/utils';
|
||||
|
||||
@@ -178,6 +174,7 @@
|
||||
return {
|
||||
prefixCls,
|
||||
t,
|
||||
deptLogo,
|
||||
getUserInfo,
|
||||
// getAvatarUrl,
|
||||
handleMenuClick,
|
||||
@@ -207,15 +204,20 @@
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
&__header {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&__name {
|
||||
font-size: 14px;
|
||||
img&__logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 0;
|
||||
vertical-align: middle;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
&--dark {
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
/>
|
||||
<!-- <LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" /> -->
|
||||
<!-- 欢迎语 -->
|
||||
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']"> {{t('layout.header.welcomeIn')}} {{ title }} </span>
|
||||
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']">
|
||||
<img src="../../../assets/images/header-brand.png" class="header-logo" />
|
||||
{{t('layout.header.welcomeIn')}} {{ title }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- left end -->
|
||||
|
||||
@@ -239,6 +242,14 @@
|
||||
margin-bottom: 2px;
|
||||
border-bottom: 0px;
|
||||
border-left: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
height: 32px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
&--light {
|
||||
|
||||
Reference in New Issue
Block a user