22import { computed , onMounted , reactive , ref , useTemplateRef } from ' vue'
33import PortalApi from ' @/api/admin/system/chat-management/portal-setting.ts'
44import type { PortalSetting , PortalSettingPayload } from ' @/api/types'
5- import LogoIcon from ' @/components/mk-logo/LogoIcon.vue'
65import { copyText } from ' @/utils/clipboard'
7- import { resetUrl } from ' @/utils/icon'
86import { MsgSuccess } from ' @/utils/message'
97import { perm } from ' @/permission'
108import PortalPreview from ' ./components/PortalPreview.vue'
@@ -99,7 +97,6 @@ const portalCorsOrigins = computed({
9997 },
10098})
10199const previewName = computed (() => portalSetting .name )
102- const previewLogo = computed (() => resetUrl (portalSetting .logo ))
103100
104101onMounted (() => loadPortalSetting ())
105102
@@ -114,8 +111,7 @@ const canEditPortal = computed(() => perm.system.portal.edit())
114111 <el-card shadow =" never" >
115112 <div class =" flex-between gap-3" >
116113 <div class =" flex-align-center min-w-0 gap-2" >
117- <img v-if =" previewLogo" :src =" previewLogo" alt =" 门户 Logo" class =" size-6 shrink-0 object-contain" />
118- <LogoIcon v-else :height =" 24 " class="shrink-0" />
114+ <PortalIcon :icon =" portalSetting .logo ?? undefined " />
119115 <h4 class =" truncate" :title =" previewName" >{{ previewName }}</h4 >
120116 </div >
121117 <!-- 编辑门户名称与 Logo -->
@@ -220,7 +216,7 @@ const canEditPortal = computed(() => perm.system.portal.edit())
220216 </div >
221217 </el-card >
222218 </div >
223- <PortalPreview :name =" previewName " :logo =" previewLogo " />
219+ <PortalPreview :name =" previewName " :logo =" portalSetting . logo " />
224220 </div >
225221 </MkViewLayout >
226222</template >
0 commit comments