feat: 优化店铺和公司侧边栏

This commit is contained in:
2026-08-18 21:26:54 +08:00
parent 24ef58a217
commit 9dd4977e09
14 changed files with 414 additions and 376 deletions
@@ -22,6 +22,7 @@ const props = withDefaults(
const BuildingIcon = createIconifyIcon('lucide:building-2');
/** 无 logo 时用名称首字;仍无则显示公司图标 */
const fallbackText = computed(() => {
const text = props.name?.trim();
return text ? text.charAt(0).toUpperCase() : '';
@@ -34,9 +35,14 @@ const fallbackText = computed(() => {
:src="logo"
:alt="name"
shape="square"
class="company-logo-avatar shrink-0 !rounded-md !bg-muted"
class="company-logo-avatar shrink-0 !rounded-md !bg-slate-200 !text-slate-700 dark:!bg-slate-600 dark:!text-slate-100"
>
<span v-if="fallbackText" class="text-xs font-medium">{{ fallbackText }}</span>
<span
v-if="fallbackText"
class="company-logo-avatar__text text-xs font-semibold"
>
{{ fallbackText }}
</span>
<BuildingIcon v-else class="h-4 w-4 text-muted-foreground" />
</Avatar>
</template>
@@ -48,8 +54,9 @@ const fallbackText = computed(() => {
justify-content: center !important;
}
.company-logo-avatar span {
.company-logo-avatar__text {
display: block;
line-height: 1;
color: inherit;
}
</style>