图标选择控件

This commit is contained in:
gary.fu
2024-01-02 18:13:13 +08:00
parent 7689b58b13
commit 8717b5f8c3
5 changed files with 128 additions and 16 deletions

View File

@@ -1,11 +1,9 @@
<script setup>
import { computed } from 'vue'
import { useGlobalConfigStore } from '@/stores/GlobalConfigStore'
import { useTabsViewStore } from '@/stores/TabsViewStore'
import { useRoute } from 'vue-router'
import { useMenuInfo, useMenuName } from '@/components/utils'
const globalConfigStore = useGlobalConfigStore()
const tabsViewStore = useTabsViewStore()
const route = useRoute()
@@ -20,13 +18,11 @@ const breadcrumbs = computed(() => {
} else if (item.meta && item.meta.icon) {
icon = item.meta.icon
}
const result = {
return {
path: item.path,
menuName: useMenuName(item),
icon
}
console.info(item, menuInfo)
return result
}).filter(item => {
const notExist = !exists.includes(item.menuName)
if (notExist) {
@@ -39,7 +35,6 @@ const breadcrumbs = computed(() => {
<template>
<el-breadcrumb
v-if="globalConfigStore.isShowBreadcrumb"
v-bind="$attrs"
class="common-breadcrumb"
>

View File

@@ -129,15 +129,15 @@ const selectIcon = icon => {
class="text-center"
>
<a
class="el-button el-button--large is-text"
style="height:80px;"
class="el-button el-button--large is-text icon-a"
@click="selectIcon(icon)"
>
<div>
<common-icon
size="20"
:icon="icon"
/>
/><br>
<span class="icon-text">{{ icon }}</span>
</div>
</a>
</el-col>
@@ -167,4 +167,14 @@ const selectIcon = icon => {
.icon-area {
padding: 0;
}
.icon-a {
height:80px;
display: block;
width:100%;
overflow:hidden;
padding: 15px 10px;
}
.icon-a span {
font-size: 12px;
}
</style>