UnisKB/ui/src/workflow/icons/application-node-icon.vue

23 lines
441 B
Vue
Raw Normal View History

2025-06-03 08:08:49 +00:00
<template>
2025-06-05 09:28:07 +00:00
<el-avatar
2025-06-03 08:08:49 +00:00
v-if="isAppIcon(item?.icon)"
shape="square"
2025-09-29 09:58:45 +00:00
:size="size || 32"
2025-06-03 08:08:49 +00:00
style="background: none"
class="mr-8"
>
<img :src="item?.icon" alt="" />
2025-06-05 09:28:07 +00:00
</el-avatar>
2025-09-29 09:58:45 +00:00
<LogoIcon v-else :height="`${size}px`" />
2025-06-03 08:08:49 +00:00
</template>
<script setup lang="ts">
import { isAppIcon } from '@/utils/common'
const props = defineProps<{
item: {
name: string
icon: string
}
2025-09-29 09:58:45 +00:00
size?: string | number
2025-06-03 08:08:49 +00:00
}>()
</script>