revert(顶栏): 移除 LOGO 文字显示(用户反馈子应用不展示,仅门户展示)(LOGO文字与主题JSON化增补)
build / build (push) Successful in 1m59s
build / build (push) Successful in 1m59s
This commit is contained in:
@@ -21,30 +21,14 @@ const readLogoUrl = () => {
|
|||||||
}
|
}
|
||||||
logoUrl.value = v || defaultLogo;
|
logoUrl.value = v || defaultLogo;
|
||||||
};
|
};
|
||||||
// LOGO 文字(平台/学校名称,2026-10-09 LOGO 文字轮):localStorage["yh-logo-text"](同一异步补齐段写入),空=不展示。
|
|
||||||
const logoText = ref("");
|
|
||||||
const readLogoText = () => {
|
|
||||||
let v: string | null = null;
|
|
||||||
try {
|
|
||||||
v = localStorage.getItem("yh-logo-text");
|
|
||||||
} catch {
|
|
||||||
v = null;
|
|
||||||
}
|
|
||||||
logoText.value = v || "";
|
|
||||||
};
|
|
||||||
const onLogoError = () => {
|
const onLogoError = () => {
|
||||||
if (logoUrl.value !== defaultLogo) logoUrl.value = defaultLogo;
|
if (logoUrl.value !== defaultLogo) logoUrl.value = defaultLogo;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
readLogoUrl();
|
readLogoUrl();
|
||||||
readLogoText();
|
|
||||||
document.addEventListener("yh-appearance-updated", readLogoUrl);
|
document.addEventListener("yh-appearance-updated", readLogoUrl);
|
||||||
document.addEventListener("yh-appearance-updated", readLogoText);
|
|
||||||
});
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
document.removeEventListener("yh-appearance-updated", readLogoUrl);
|
|
||||||
document.removeEventListener("yh-appearance-updated", readLogoText);
|
|
||||||
});
|
});
|
||||||
|
onBeforeUnmount(() => document.removeEventListener("yh-appearance-updated", readLogoUrl));
|
||||||
|
|
||||||
const isPanel = ref(false);
|
const isPanel = ref(false);
|
||||||
const currPath = ref<string>("");
|
const currPath = ref<string>("");
|
||||||
@@ -203,7 +187,6 @@ function linkHomePage() {
|
|||||||
<header class="header-container fix">
|
<header class="header-container fix">
|
||||||
<!-- 云海 logo 徽标(结构与 Notice layout 对齐,皮肤见通道 base.layout.css .logo-badge) -->
|
<!-- 云海 logo 徽标(结构与 Notice layout 对齐,皮肤见通道 base.layout.css .logo-badge) -->
|
||||||
<span class="logo-badge fl"><img :src="logoUrl" alt="云海" @error="onLogoError" /></span>
|
<span class="logo-badge fl"><img :src="logoUrl" alt="云海" @error="onLogoError" /></span>
|
||||||
<span v-if="logoText" class="logo-text">{{ logoText }}</span>
|
|
||||||
<div class="fl align-middle icon-box">
|
<div class="fl align-middle icon-box">
|
||||||
<div title="首页" class="icon-btn" @click="linkHomePage">
|
<div title="首页" class="icon-btn" @click="linkHomePage">
|
||||||
<i class="iconfont icon-shouye"></i>
|
<i class="iconfont icon-shouye"></i>
|
||||||
@@ -322,12 +305,4 @@ function linkHomePage() {
|
|||||||
position: static;
|
position: static;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
/* LOGO 文字(平台/学校名称):贴徽标右侧,顶栏品牌色深底上白字,禁止换行挤压布局 */
|
|
||||||
.header-container .logo-text {
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #fff;
|
|
||||||
white-space: nowrap;
|
|
||||||
letter-spacing: 0.4px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user