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
}
相关推荐
东东5162 分钟前
果园预售系统的设计与实现spingboot+vue
前端·javascript·vue.js·spring boot·个人开发
rainbow68894 分钟前
Python学生管理系统:JSON持久化实战
java·前端·python
打小就很皮...7 分钟前
React Router 7 全局路由保护
前端·react.js·router
起风的蛋挞16 分钟前
Matlab提示词语法
前端·javascript·matlab
有味道的男人17 分钟前
1688获得商品类目调取商品榜单
java·前端·spring
txwtech24 分钟前
第20篇esp32s3小智设置横屏
前端·html
Exquisite.31 分钟前
企业高性能web服务器---Nginx(2)
服务器·前端·nginx
DFT计算杂谈38 分钟前
VASP+PHONOPY+pypolymlpj计算不同温度下声子谱,附批处理脚本
java·前端·数据库·人工智能·python
广州华水科技42 分钟前
如何选择合适的单北斗变形监测系统来保障水库安全?
前端
Mr_Xuhhh1 小时前
MySQL表的内连接与外连接详解
java·前端·数据库