-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Closed
Labels
Description
Version
Vben Admin V5
Describe the bug?
- 文件地址:packages/@core/ui-kit/shadcn-ui/src/components/logo/logo.vue
- 问题描述:logoSize没有作为props传入VbenAvatar组件
Reproduction
<script setup lang="ts">
import { VbenAvatar } from '../avatar';
interface Props {
/**
* @zh_CN 是否收起文本
*/
collapsed?: boolean;
/**
* @zh_CN Logo 跳转地址
*/
href?: string;
/**
* @zh_CN Logo 图片大小
*/
logoSize?: number;
/**
* @zh_CN Logo 图标
*/
src?: string;
/**
* @zh_CN Logo 文本
*/
text: string;
/**
* @zh_CN Logo 主题
*/
theme?: string;
}
defineOptions({
name: 'VbenLogo',
});
withDefaults(defineProps<Props>(), {
collapsed: false,
href: 'javascript:void 0',
logoSize: 20,
src: '',
theme: 'light',
});
</script>
<template>
<div :class="theme" class="flex h-full items-center text-lg">
<a
:class="$attrs.class"
:href="href"
class="flex h-full items-center gap-2 overflow-hidden px-3 text-lg leading-normal transition-all duration-500"
>
<VbenAvatar
v-if="src"
:alt="text"
:src="src"
class="relative w-8 rounded-none bg-transparent"
/>
<span
v-if="!collapsed"
class="text-foreground truncate text-nowrap font-semibold"
>
{{ text }}
</span>
</a>
</div>
</template>
System Info
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
Memory: 24.08 GB / 38.87 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
pnpm: 9.15.6 - ~/.nvm/versions/node/v20.18.1/bin/pnpm
Browsers:
Chrome: 133.0.6943.141
Chromium: 133.0.6943.141Relevant log output
Validations
- Read the docs
- Ensure the code is up to date. (Some issues have been fixed in the latest version)
- I have searched the existing issues and checked that my issue does not duplicate any existing issues.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.