feat 系统修改

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-05-26 16:33:40 +08:00
parent 9fd64e62da
commit ad6c6aa9c1
3 changed files with 22 additions and 5 deletions

View File

@@ -2,12 +2,12 @@
<div class="sidebar-logo-container" :class="{ collapse: collapse }">
<transition :enter-active-class="proxy?.animate.logoAnimate.enter" mode="out-in">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 v-else class="sidebar-title">可视化电子围栏管理系统</h1>
<img v-if="logo" :src="logoUrl" class="sidebar-logo" />
<h1 v-else class="sidebar-title">{{ logoName }}</h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 class="sidebar-title">可视化电子围栏管理系统</h1>
<img v-if="logo" :src="logoUrl" class="sidebar-logo" />
<h1 class="sidebar-title">{{ logoName }}</h1>
</router-link>
</transition>
</div>
@@ -19,6 +19,7 @@ import logo from '@/assets/logo/logo.png';
import { useSettingsStore } from '@/store/modules/settings';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { NavTypeEnum } from '@/enums/NavTypeEnum';
import { getDemo } from '@/api/systemList/index';
defineProps({
collapse: {
@@ -52,6 +53,18 @@ const getLogoTextColor = computed(() => {
}
return sideTheme.value === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor;
});
// 获取Logo图片
const logoUrl = ref();
const logoName = ref();
onMounted(() => {
getDemo().then((res) => {
console.log('系统11111111111', res);
logoName.value = res.data.name;
logoUrl.value = res.data.url;
});
});
</script>
<style lang="scss" scoped>