css-Ant-Menu 导航菜单更改为左侧列表行选中

1.Ant-Menu导航菜单

导航菜单是一个网站的灵魂,用户依赖导航在各个页面中进行跳转。一般分为顶部导航和侧边导航,顶部导航提供全局性的类目和功能,侧边导航提供多级结构来收纳和排列网站架构。

2.具体代码

html

html 复制代码
 <!-- 左侧切换 -->
                <div class="fileLeft">
                    <div class="content_left_name">类型</div>
                    <a-menu style="width: 100%" mode="vertical">
                        <a-menu-item v-for="(item, index) in componentList" :key="index">
                            <div class="content_left_select"  @click="handleClick(item.id)">
                                <IconComponent :statues="item.statues" style="width:35px"></IconComponent>
                                <div class="content_left_title">{{item.name}}</div>
                            </div>
                        </a-menu-item>
                    </a-menu>
                </div>

css

css 复制代码
// 左侧结构
.fileLeft {
    width: 20%;
    height: 100%;
    float: left;
    background-color: #ffffff;
    border-radius: 8px;
}
// 左侧name
.content_left_name{
	height:40px;
	width: 100%;
	padding-left: 2%;
	line-height:40px;
	text-align:left;
	background-color: #fafafa;
	font-weight: 600;
	font-size: 15px;
	border-bottom: 1px solid #e8e8e8;
}
// icon与文本
.content_left_select{
	display:flex;
	flex-direction:row;
}
//文本
.content_left_title{
	height:40px;
	width:60px
}
相关推荐
Jolyne_15 小时前
Taro小程序接入微信客服过程记录
前端
勇往直前plus15 小时前
前端三基石:从后端视角理解 HTML、CSS 与 JavaScript
前端·css·html
用户693717500138415 小时前
Google 推 AppFunctions:手机上的 AI 终于能自己干活了
android·前端·人工智能
用户693717500138415 小时前
AI让编码变简单,真正拉开差距的是UI设计和产品思考
android·前端·人工智能
孟祥_成都15 小时前
别再吹牛了,100% Vibe Coding 存在无法自洽的逻辑漏洞!
前端·ai编程·vibecoding
ai超级个体16 小时前
别再吹牛了,100% Vibe Coding 存在无法自洽的逻辑漏洞!
前端·ai·ai编程·vibe coding
Mike_jia16 小时前
🎓 OpenMAIC 终极指南:清华开源的多智能体 AI 互动课堂平台
前端
踩着两条虫16 小时前
告别低代码“黑盒”!VTJ.PRO 2.0:用AI与自由重塑Vue3开发
前端·低代码·ai编程
OpenTiny社区16 小时前
WebAgent :基于 MCP 协议打造的智能应用“超级路由器”
前端·agent·mcp
dweizhao17 小时前
别再用 Figma 画线框图了,Google 这款免费工具直接出 UI 稿
前端