commit
ecb44bc1e7
@ -11,8 +11,17 @@
|
|||||||
<div class="breadcrumb-hover flex-between cursor">
|
<div class="breadcrumb-hover flex-between cursor">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<AppAvatar
|
<AppAvatar
|
||||||
v-if="isApplication"
|
v-if="isApplication && isAppIcon(current?.icon)"
|
||||||
:name="currentName"
|
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
|
pinyinColor
|
||||||
shape="square"
|
shape="square"
|
||||||
class="mr-8"
|
class="mr-8"
|
||||||
@ -20,7 +29,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<AppAvatar
|
<AppAvatar
|
||||||
v-else-if="isDataset && currentType === '1'"
|
v-else-if="isDataset && current?.type === '1'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="24"
|
:size="24"
|
||||||
@ -30,7 +39,7 @@
|
|||||||
<AppAvatar v-else class="mr-8" shape="square" :size="24">
|
<AppAvatar v-else class="mr-8" shape="square" :size="24">
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
<div class="ellipsis">{{ currentName }}</div>
|
<div class="ellipsis">{{ current?.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button text>
|
<el-button text>
|
||||||
@ -46,7 +55,16 @@
|
|||||||
<el-dropdown-item :command="item.id">
|
<el-dropdown-item :command="item.id">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<AppAvatar
|
<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"
|
:name="item.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
class="mr-12"
|
class="mr-12"
|
||||||
@ -102,6 +120,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router'
|
import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router'
|
||||||
|
import { isAppIcon } from '@/utils/application'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
const { common, dataset, application } = useStore()
|
const { common, dataset, application } = useStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@ -120,18 +139,18 @@ const loading = ref(false)
|
|||||||
|
|
||||||
const breadcrumbData = computed(() => common.breadcrumb)
|
const breadcrumbData = computed(() => common.breadcrumb)
|
||||||
|
|
||||||
const currentName = computed(() => {
|
const current = computed(() => {
|
||||||
const {
|
const {
|
||||||
params: { id }
|
params: { id }
|
||||||
} = route
|
} = route
|
||||||
return list.value?.filter((v) => v.id === id)?.[0]?.name
|
return list.value?.filter((v) => v.id === id)?.[0]
|
||||||
})
|
|
||||||
const currentType = computed(() => {
|
|
||||||
const {
|
|
||||||
params: { id }
|
|
||||||
} = route
|
|
||||||
return list.value?.filter((v) => v.id === id)?.[0]?.type
|
|
||||||
})
|
})
|
||||||
|
// const current = computed(() => {
|
||||||
|
// const {
|
||||||
|
// params: { id }
|
||||||
|
// } = route
|
||||||
|
// return list.value?.filter((v) => v.id === id)?.[0]?.type
|
||||||
|
// })
|
||||||
|
|
||||||
const isApplication = computed(() => {
|
const isApplication = computed(() => {
|
||||||
const { meta } = route as any
|
const { meta } = route as any
|
||||||
|
|||||||
@ -32,7 +32,6 @@
|
|||||||
action="#"
|
action="#"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
:on-change="onChange"
|
:on-change="onChange"
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user