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
}
相关推荐
We་ct24 分钟前
LeetCode 173. 二叉搜索树迭代器:BSTIterator类 实现与解析
前端·算法·leetcode·typescript
weixin_3954489130 分钟前
main.c_0222cursor
c语言·前端·算法
无尽的沉默1 小时前
Thymeleaf 表达式
java·开发语言·前端
无尽的沉默1 小时前
Spring Boot 整合 Thymeleaf 模板引擎
java·前端·spring boot
We་ct1 小时前
从输入URL到页面显示的完整技术流程
前端·edge·edge浏览器
先做个垃圾出来………1 小时前
DeepDiff差异语义化特性
服务器·前端
蓝帆傲亦2 小时前
前端常用可视化图表组件大全
前端
CappuccinoRose2 小时前
HTML语法学习文档(九)
前端·学习·架构·html5
NEXT062 小时前
BFC布局
前端·css·面试
菜鸟小芯2 小时前
【GLM-5 陪练式前端新手入门】第四篇:卡片布局 —— 让个人主页内容更有层次
前端·人工智能