解决所有bug 优化table内容
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<template v-for="val in menuLists">
|
||||
<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
|
||||
<template #title>
|
||||
<SvgIcon :name="val.meta.icon"/>
|
||||
<SvgIcon :name="getMenuIcon(val.meta.icon)"/>
|
||||
<span class="font-semibold">{{ $t(val.name.split('_')[0]) }}</span>
|
||||
</template>
|
||||
<SubItem :chil="val.children"/>
|
||||
@@ -15,12 +15,12 @@
|
||||
<el-menu-item :index="val.path" :key="val.path">
|
||||
<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
|
||||
<!-- 此处可 指定 color='red' 等指定顶栏SVG颜色 -->
|
||||
<SvgIcon :name="val.meta.icon"/>
|
||||
<SvgIcon :name="getMenuIcon(val.meta.icon)"/>
|
||||
<p class="font-semibold">{{ $t(val.name.split('_')[0]) }}</p>
|
||||
</template>
|
||||
<template #title v-else>
|
||||
<a class="w100" @click.prevent="onALinkClick(val)">
|
||||
<SvgIcon :name="val.meta.icon"/>
|
||||
<SvgIcon :name="getMenuIcon(val.meta.icon)"/>
|
||||
{{ $t(val.name.split('_')[0]) }}
|
||||
</a>
|
||||
</template>
|
||||
@@ -66,6 +66,10 @@ const state = reactive({
|
||||
const menuLists = computed(() => {
|
||||
return <RouteItems>props.menuList;
|
||||
});
|
||||
// 获取菜单图标,如果没有则返回默认图标
|
||||
const getMenuIcon = (icon?: string) => {
|
||||
return icon && icon.trim() ? icon : 'ele-Menu';
|
||||
};
|
||||
// 设置横向滚动条可以鼠标滚轮滚动
|
||||
const onElMenuHorizontalScroll = (e: WheelEventType) => {
|
||||
const eventDelta = e.wheelDelta || -e.deltaY * 40;
|
||||
|
||||
Reference in New Issue
Block a user