mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
32 lines
636 B
Vue
32 lines
636 B
Vue
<template>
|
|
<a-space fill>
|
|
<a-avatar :size="24" shape="circle">
|
|
<img :src="props.avatar" alt="avatar" />
|
|
</a-avatar>
|
|
<a-link v-if="props.isLink" @click="emit('click')">{{ props.name }}</a-link>
|
|
<span v-else>{{ props.name }}</span>
|
|
</a-space>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
defineOptions({ name: 'GiCellAvatar' })
|
|
|
|
interface Props {
|
|
avatar: string
|
|
name: string
|
|
isLink?: boolean
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
avatar: '',
|
|
name: '',
|
|
isLink: false // 是否可以点击
|
|
})
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'click'): void
|
|
}>()
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|