Skip to content

Commit

Permalink
Merge pull request 1Panel-dev#258 from 1Panel-dev/pr@main@fix-bugs
Browse files Browse the repository at this point in the history
修复设置Logo问题
  • Loading branch information
wangdan-fit2cloud authored Apr 26, 2024
2 parents 9e48ab5 + 2a4d079 commit ecb44bc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
45 changes: 32 additions & 13 deletions ui/src/layout/components/breadcrumb/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@
<div class="breadcrumb-hover flex-between cursor">
<div class="flex align-center">
<AppAvatar
v-if="isApplication"
:name="currentName"
v-if="isApplication && isAppIcon(current?.icon)"
shape="square"
:size="24"
style="background: none"
class="mr-8"
>
<img :src="current?.icon" alt="" />
</AppAvatar>
<AppAvatar
v-else-if="isApplication"
:name="current?.name"
pinyinColor
shape="square"
class="mr-8"
:size="24"
/>

<AppAvatar
v-else-if="isDataset && currentType === '1'"
v-else-if="isDataset && current?.type === '1'"
class="mr-8 avatar-purple"
shape="square"
:size="24"
Expand All @@ -30,7 +39,7 @@
<AppAvatar v-else class="mr-8" shape="square" :size="24">
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
</AppAvatar>
<div class="ellipsis">{{ currentName }}</div>
<div class="ellipsis">{{ current?.name }}</div>
</div>

<el-button text>
Expand All @@ -46,7 +55,16 @@
<el-dropdown-item :command="item.id">
<div class="flex align-center">
<AppAvatar
v-if="isApplication"
v-if="isApplication && isAppIcon(item?.icon)"
shape="square"
:size="24"
style="background: none"
class="mr-8"
>
<img :src="item?.icon" alt="" />
</AppAvatar>
<AppAvatar
v-else-if="isApplication"
:name="item.name"
pinyinColor
class="mr-12"
Expand Down Expand Up @@ -102,6 +120,7 @@
<script setup lang="ts">
import { ref, onMounted, computed } from 'vue'
import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router'
import { isAppIcon } from '@/utils/application'
import useStore from '@/stores'
const { common, dataset, application } = useStore()
const route = useRoute()
Expand All @@ -120,18 +139,18 @@ const loading = ref(false)
const breadcrumbData = computed(() => common.breadcrumb)
const currentName = computed(() => {
const {
params: { id }
} = route
return list.value?.filter((v) => v.id === id)?.[0]?.name
})
const currentType = computed(() => {
const current = computed(() => {
const {
params: { id }
} = route
return list.value?.filter((v) => v.id === id)?.[0]?.type
return list.value?.filter((v) => v.id === id)?.[0]
})
// const current = computed(() => {
// const {
// params: { id }
// } = route
// return list.value?.filter((v) => v.id === id)?.[0]?.type
// })
const isApplication = computed(() => {
const { meta } = route as any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
action="#"
:auto-upload="false"
:show-file-list="false"
:limit="1"
accept="image/*"
:on-change="onChange"
>
Expand Down

0 comments on commit ecb44bc

Please sign in to comment.