feat: 优化可两栏布局的页面都改成两栏

This commit is contained in:
2026-08-18 16:54:08 +08:00
parent 5d965e91e3
commit 15d0bdacb7
15 changed files with 1604 additions and 1497 deletions
@@ -0,0 +1,55 @@
<script setup lang="ts">
import { computed } from 'vue';
import { createIconifyIcon } from '@vben/icons';
import { Avatar } from 'ant-design-vue';
defineOptions({ name: 'CompanyLogoAvatar' });
const props = withDefaults(
defineProps<{
logo?: string;
name?: string;
size?: number;
}>(),
{
logo: undefined,
name: undefined,
size: 36,
},
);
const BuildingIcon = createIconifyIcon('lucide:building-2');
const fallbackText = computed(() => {
const text = props.name?.trim();
return text ? text.charAt(0).toUpperCase() : '';
});
</script>
<template>
<Avatar
:size="size"
:src="logo"
:alt="name"
shape="square"
class="company-logo-avatar shrink-0 !rounded-md !bg-muted"
>
<span v-if="fallbackText" class="text-xs font-medium">{{ fallbackText }}</span>
<BuildingIcon v-else class="h-4 w-4 text-muted-foreground" />
</Avatar>
</template>
<style scoped>
.company-logo-avatar {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
}
.company-logo-avatar span {
display: block;
line-height: 1;
}
</style>