Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 19:09:21 +08:00

style: 优化 table 示例样式

This commit is contained in:
pany 2022-10-28 14:27:35 +08:00
parent da63f9e204
commit fa55b36d3e
6 changed files with 15 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import { Setting } from "@element-plus/icons-vue"
const props = defineProps({
buttonTop: {
type: Number,
default: 250
default: 350
}
})

View File

@ -22,7 +22,7 @@ VXETable.setup({
showHeaderOverflow: "tooltip",
autoResize: true,
// stripe: false,
border: false,
border: "inner",
// round: false,
emptyText: "暂无数据",
rowConfig: {
@ -30,7 +30,7 @@ VXETable.setup({
isCurrent: true
},
columnConfig: {
resizable: true
resizable: false
},
align: "center",
headerAlign: "center",

View File

@ -0,0 +1,8 @@
/** 自定义 Element Plus 样式 */
.el-table {
// 表头
th.el-table__cell {
background-color: var(--el-fill-color-light) !important;
}
}

View File

@ -2,6 +2,8 @@
@import "./variables.css";
// Transition
@import "./transition.scss";
// Element Plus
@import "./element-plus.scss";
// Vxe Table
@import "./vxe-table.scss";
// 注册多主题

View File

@ -20,6 +20,7 @@
&--pager-wrapper {
.vxe-pager {
height: 70px !important;
padding: 0 20px !important;
&--wrapper {
@media screen and (max-width: 750px) {
.vxe-pager--total,

View File

@ -158,7 +158,7 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
</div>
</div>
<div class="table-wrapper">
<el-table :data="tableData" header-cell-class-name="table-header">
<el-table :data="tableData">
<el-table-column type="selection" width="50" align="center" />
<el-table-column prop="username" label="用户名" align="center" />
<el-table-column prop="roles" label="角色" align="center">
@ -236,9 +236,6 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
.table-wrapper {
margin-bottom: 20px;
:deep(.table-header) {
background-color: var(--el-fill-color-light) !important;
}
}
.pager-wrapper {