<template>
<el-table
:data="tableData"
class="table-fixed"
>
<el-table-column prop="contractcode" fixed label="合同编号"> </el-table-column>
<el-table-column prop="contractcode" label="合同编号"> </el-table-column>
<el-table-column prop="contractcode" label="合同编号"> </el-table-column>
</el-table>
</template>
<style lang="scss" rel="stylesheet/scss" scoped>
//这里用的 sass预编译器
.table-fixed ::v-deep .el-table__body-wrapper {
z-index: 2;
}
.table-fixed ::v-deep .el-table__fixed-right {
bottom: 13px !important;
right: 8px !important;
}
.table-fixed ::v-deep .el-table__fixed-body-wrapper {
padding-bottom: 13px !important;
}
</style>
最好改一下全局滚动条样式
<template>
<div id="app">
<router-view />
</div>
</template>
<style lang="scss" >
::-webkit-scrollbar {
width: 8px;
height: 13px;
background-color: #F5F5F5;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
height: 8px;
-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0);
border-radius: 10px;
background-color: #F5F5F5;
}
//
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
height: 8px;
border-radius: 4px;
-webkit-box-shadow: inset 0 0 6px rgba(208, 230, 250, .3);
background-color: #c5daff;
}
</style>
这篇博客介绍了如何在Vue项目中使用Sass预处理器来优化CSS,并展示了如何自定义滚动条的样式,以提升网页的视觉效果。内容包括在表格组件中应用Sass的类选择器和伪类选择器,以及如何修改全局滚动条的宽度、颜色和形状。
6941

被折叠的 条评论
为什么被折叠?



