feat(layout): 在导航栏和页面布局中添加空菜单项并优化菜单显示

- 在 nav-layout.vue 和 page-layout.vue 中添加空菜单项,用于占位
-优化菜单项的样式,设置最小宽度并允许使用 HTML 渲染
This commit is contained in:
陈昱达
2025-07-18 14:56:07 +08:00
parent bc9529db27
commit d452012bad
2 changed files with 12 additions and 4 deletions

View File

@@ -31,6 +31,10 @@ export default {
{
title: '联系我们',
path: '/page/contact'
},
{
title: ' ',
path: '/pages'
}
]
}
@@ -85,8 +89,8 @@ export default {
<img src="@/assets/images/rs/logo.png" alt="logo" @click="goHome()" />
<ul class="flex align-items-c justify-content-c">
<li v-for="menu in menus" :key="menu.path">
<button @click="handleClick(menu.path)">
<span :class="{ active: $route.path.startsWith(menu.path) }">{{ menu.title }}</span>
<button @click="handleClick(menu.path)" style="min-width:50px ">
<span :class="{ active: $route.path.startsWith(menu.path) }" v-html="menu.title"></span>
</button>
</li>
</ul>

View File

@@ -31,6 +31,10 @@ export default {
{
title: '生活优享',
path: '/pages/LifeEnrichment'
},
{
title: '&nbsp;',
path: '/page'
}
]
}
@@ -85,8 +89,8 @@ export default {
<img src="@/assets/images/rs/logo.png" alt="logo" @click="goHome()" />
<ul class="flex align-items-c justify-content-c">
<li v-for="menu in menus" :key="menu.path">
<button @click="handleClick(menu.path)">
<span :class="{ active: $route.path.startsWith(menu.path) }">{{ menu.title }}</span>
<button @click="handleClick(menu.path)" style="min-width:50px ">
<span :class="{ active: $route.path.startsWith(menu.path) }" v-html="menu.title"></span>
</button>
</li>
</ul>