fix: replace LogoIcon with el-avatar for improved icon rendering in index.vue and NodeContent.vue
This commit is contained in:
parent
bd1f75a4ae
commit
86675e9ec3
@ -1,15 +1,19 @@
|
||||
<template>
|
||||
<el-input v-model.trim="filterText" :placeholder="$t('common.search')" prefix-icon="Search" clearable
|
||||
<el-input v-model.trim="filterText" :placeholder="$t('common.search')" prefix-icon="Search"
|
||||
clearable
|
||||
style="padding: 12px 12px 0 12px;"/>
|
||||
<div class="list flex-wrap">
|
||||
<template v-if="filterList.length">
|
||||
<el-popover v-for="item in filterList" :key="item.id" placement="right" :width="280" :show-after="500">
|
||||
<el-popover v-for="item in filterList" :key="item.id" placement="right" :width="280"
|
||||
:show-after="500">
|
||||
<template #reference>
|
||||
<div class="list-item flex align-center border border-r-6 p-8-12 cursor" style="width: calc(50% - 6px)"
|
||||
<div class="list-item flex align-center border border-r-6 p-8-12 cursor"
|
||||
style="width: calc(50% - 6px)"
|
||||
@click.stop="emit('clickNodes', item)" @mousedown.stop="emit('onmousedown', item)">
|
||||
<LogoIcon v-if="item.resource_type === 'application'" height="32px" />
|
||||
<el-avatar v-else-if="isAppIcon(item?.icon)" shape="square" :size="32" style="background: none">
|
||||
<img :src="resetUrl(item?.icon)" alt="" />
|
||||
<!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px" />-->
|
||||
<el-avatar v-if="isAppIcon(item?.icon)" shape="square" :size="32"
|
||||
style="background: none">
|
||||
<img :src="resetUrl(item?.icon,resetUrl('./favicon.ico'))" alt=""/>
|
||||
</el-avatar>
|
||||
<el-avatar v-else class="avatar-green" shape="square" :size="32">
|
||||
<img src="@/assets/workflow/icon_tool.svg" style="width: 58%" alt=""/>
|
||||
@ -21,9 +25,10 @@
|
||||
<template #default>
|
||||
<div class="flex-between">
|
||||
<div class="flex align-center">
|
||||
<LogoIcon v-if="item.resource_type === 'application'" height="32px" />
|
||||
<el-avatar v-else-if="isAppIcon(item?.icon)" shape="square" :size="32" style="background: none">
|
||||
<img :src="resetUrl(item?.icon)" alt="" />
|
||||
<!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px"/>-->
|
||||
<el-avatar v-if="isAppIcon(item?.icon)" shape="square" :size="32"
|
||||
style="background: none">
|
||||
<img :src="resetUrl(item?.icon,resetUrl('./favicon.ico'))" alt=""/>
|
||||
</el-avatar>
|
||||
<el-avatar v-else class="avatar-green" shape="square" :size="32">
|
||||
<img src="@/assets/workflow/icon_tool.svg" style="width: 58%" alt=""/>
|
||||
@ -63,6 +68,7 @@ const emit = defineEmits<{
|
||||
|
||||
const filterText = ref('')
|
||||
const filterList = ref<any[]>([])
|
||||
|
||||
function filter(list: any[], filterText: string) {
|
||||
if (!filterText.length) {
|
||||
return list
|
||||
|
||||
@ -176,7 +176,9 @@
|
||||
@click="goApp(item)"
|
||||
>
|
||||
<template #icon>
|
||||
<LogoIcon height="32px" />
|
||||
<el-avatar shape="square" :size="32" style="background: none">
|
||||
<img :src="resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt="" />
|
||||
</el-avatar>
|
||||
</template>
|
||||
<template #subTitle>
|
||||
<el-text class="color-secondary" size="small">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user