Ant design vue 样式调整(包含导航栏、a-table表格、分页)

需求描述

以下样式均为ant design vue样式调整,进行一些界面上的优化

修改左侧导航栏改变颜色(选中及悬浮)

如果你想修改左侧导航选中后 以及鼠标悬浮在某个菜单栏上改变样式时,把下面的三段代码复制到 你项目下的public文件夹下的index.html文件里,注意要把这段代码放到<style></style>标签里

鼠标点击菜单后改变背景颜色

     .ant-menu-item-selected{
    
    
      background: linear-gradient(270.00deg, rgba(125,178,217,0.50),rgba(196,196,196,0.00) 100%) !important;
    }

鼠标选中后改变颜色

    .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td,.ant-table-row-hover,.ant-table-row-hover>td{
    
    
      background-color: rgb(239, 242, 245) !important;
    }
        .ant-menu-inline .ant-menu-item::after{
    
    
      border-right: 3px solid rgb(18, 92, 179)!important;
    }

鼠标点击菜单后改变字体颜色

在你的项目下src--->components--->layouts--->TabLayout.vue文件里进行修改

  .ant-menu-item-selected > a, .ant-menu-item-selected > a:hover{
    
    
    color: #125CB3 !important;
  }

鼠标悬浮菜单改变字体颜色

在你的项目下src--->components--->layouts--->TabLayout.vue文件里进行修改

  .ant-menu-inline > a, .ant-menu-item > a:hover{
    
    
    color: #125CB3 !important;
  }

修改a-table表格中字体颜色

.ant-table-tbody > tr > td {
    
    
  color: white;
  background: #3071b9 !important;
}

修改分页页数颜色

.ant-pagination-item-active a{
    
    
    color: #125CB3 !important;
  }

猜你喜欢

转载自blog.csdn.net/xiaohua616/article/details/131020456
今日推荐