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
}
相关推荐
大猫会长7 分钟前
mac中创建 .command 文件,执行node服务
前端·chrome
旧时光_7 分钟前
Zustand 状态管理库完全指南 - 进阶篇
前端·react.js
snakeshe10109 分钟前
深入理解useState:批量更新与非函数参数支持
前端
windliang9 分钟前
Cursor 排查 eslint 问题全过程记录
前端·cursor
boleixiongdi10 分钟前
# Bsin-App Uni:面向未来的跨端开发框架深度解析
前端
G等你下课13 分钟前
AJAX请求跨域问题
前端·javascript·http
前端西瓜哥14 分钟前
pixijs 的填充渲染错误,如何处理?
前端
snakeshe101014 分钟前
6-1. 实现 useState
前端
呆呆没有脑袋16 分钟前
深入浅出 JavaScript 闭包:从核心概念到框架实践
前端
snakeshe101018 分钟前
用100行代码实现React useState钩子:多状态管理揭秘
前端