11<template >
2- <el-input v-model.trim =" filterText" :placeholder =" $t('common.search')" prefix-icon =" Search" clearable
3- style =" padding : 12px 12px 0 12px ;" />
2+ <el-input v-model.trim =" filterText" :placeholder =" $t('common.search')" prefix-icon =" Search"
3+ clearable
4+ style =" padding : 12px 12px 0 12px ;" />
45 <div class =" list flex-wrap" >
56 <template v-if =" filterList .length " >
6- <el-popover v-for =" item in filterList" :key =" item.id" placement =" right" :width =" 280" :show-after =" 500" >
7+ <el-popover v-for =" item in filterList" :key =" item.id" placement =" right" :width =" 280"
8+ :show-after =" 500" >
79 <template #reference >
8- <div class =" list-item flex align-center border border-r-6 p-8-12 cursor" style =" width : calc (50% - 6px )"
9- @click.stop =" emit('clickNodes', item)" @mousedown.stop =" emit('onmousedown', item)" >
10- <LogoIcon v-if =" item.resource_type === 'application'" height =" 32px" />
11- <el-avatar v-else-if =" isAppIcon(item?.icon)" shape =" square" :size =" 32" style =" background : none " >
12- <img :src =" resetUrl(item?.icon)" alt =" " />
10+ <div class =" list-item flex align-center border border-r-6 p-8-12 cursor"
11+ style =" width : calc (50% - 6px )"
12+ @click.stop =" emit('clickNodes', item)" @mousedown.stop =" emit('onmousedown', item)" >
13+ <!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px" />-->
14+ <el-avatar v-if =" isAppIcon(item?.icon)" shape =" square" :size =" 32"
15+ style =" background : none " >
16+ <img :src =" resetUrl(item?.icon,resetUrl('./favicon.ico'))" alt =" " />
1317 </el-avatar >
1418 <el-avatar v-else class =" avatar-green" shape =" square" :size =" 32" >
15- <img src =" @/assets/workflow/icon_tool.svg" style =" width : 58% " alt =" " />
19+ <img src =" @/assets/workflow/icon_tool.svg" style =" width : 58% " alt =" " />
1620 </el-avatar >
1721 <span class =" ml-8 ellipsis" :title =" item.name" >{{ item.name }}</span >
1822 </div >
2125 <template #default >
2226 <div class =" flex-between" >
2327 <div class =" flex align-center" >
24- <LogoIcon v-if =" item.resource_type === 'application'" height =" 32px" />
25- <el-avatar v-else-if =" isAppIcon(item?.icon)" shape =" square" :size =" 32" style =" background : none " >
26- <img :src =" resetUrl(item?.icon)" alt =" " />
28+ <!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px"/>-->
29+ <el-avatar v-if =" isAppIcon(item?.icon)" shape =" square" :size =" 32"
30+ style =" background : none " >
31+ <img :src =" resetUrl(item?.icon,resetUrl('./favicon.ico'))" alt =" " />
2732 </el-avatar >
2833 <el-avatar v-else class =" avatar-green" shape =" square" :size =" 32" >
29- <img src =" @/assets/workflow/icon_tool.svg" style =" width : 58% " alt =" " />
34+ <img src =" @/assets/workflow/icon_tool.svg" style =" width : 58% " alt =" " />
3035 </el-avatar >
3136 <span class =" font-medium ml-8 break-all" :title =" item.name" >{{ item.name }}</span >
3237 </div >
4348 </template >
4449 </el-popover >
4550 </template >
46- <el-empty v-else :description =" $t('common.noData')" />
51+ <el-empty v-else :description =" $t('common.noData')" />
4752 </div >
4853</template >
4954
5055<script setup lang="ts">
51- import { watch , ref } from ' vue'
52- import { isAppIcon , resetUrl } from ' @/utils/common'
53- import { isWorkFlow } from ' @/utils/application'
56+ import {watch , ref } from ' vue'
57+ import {isAppIcon , resetUrl } from ' @/utils/common'
58+ import {isWorkFlow } from ' @/utils/application'
5459
5560const props = defineProps <{
5661 list: any []
@@ -63,6 +68,7 @@ const emit = defineEmits<{
6368
6469const filterText = ref (' ' )
6570const filterList = ref <any []>([])
71+
6672function filter(list : any [], filterText : string ) {
6773 if (! filterText .length ) {
6874 return list
0 commit comments