Skip to content

Commit

Permalink
style:优化前台动态菜单样式
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed May 16, 2023
1 parent ebe28df commit b8b4899
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions web/src/layouts/frontend/components/headerDynamicMenus.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<template>
<div>
<template v-for="(item, idx) in props.menus" :key="idx">
<template v-if="!isEmpty(item.children)">
<el-sub-menu v-blur :index="`column-${item.id}`">
<template #title>{{ item.title }}</template>
<el-menu-item
v-for="(subItem, subIndex) in item.children"
:key="subIndex"
@click="onClickMenu(subItem)"
v-blur
:index="'column-' + subItem.id"
>
{{ subItem.title }}
</el-menu-item>
</el-sub-menu>
</template>
<template v-else>
<el-menu-item @click="onClickMenu(item)" v-blur :index="'column-' + item.id">
{{ item.title }}
<template v-for="(item, idx) in props.menus" :key="idx">
<template v-if="!isEmpty(item.children)">
<el-sub-menu v-blur :index="`column-${item.id}`">
<template #title>{{ item.title }}</template>
<el-menu-item
v-for="(subItem, subIndex) in item.children"
:key="subIndex"
@click="onClickMenu(subItem)"
v-blur
:index="'column-' + subItem.id"
>
{{ subItem.title }}
</el-menu-item>
</template>
</el-sub-menu>
</template>
</div>
<template v-else>
<el-menu-item @click="onClickMenu(item)" v-blur :index="'column-' + item.id">
{{ item.title }}
</el-menu-item>
</template>
</template>
</template>

<script setup lang="ts">
Expand Down

0 comments on commit b8b4899

Please sign in to comment.