style: 优化 table 示例样式
This commit is contained in:
parent
da63f9e204
commit
fa55b36d3e
@ -5,7 +5,7 @@ import { Setting } from "@element-plus/icons-vue"
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
buttonTop: {
|
buttonTop: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 250
|
default: 350
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ VXETable.setup({
|
|||||||
showHeaderOverflow: "tooltip",
|
showHeaderOverflow: "tooltip",
|
||||||
autoResize: true,
|
autoResize: true,
|
||||||
// stripe: false,
|
// stripe: false,
|
||||||
border: false,
|
border: "inner",
|
||||||
// round: false,
|
// round: false,
|
||||||
emptyText: "暂无数据",
|
emptyText: "暂无数据",
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
@ -30,7 +30,7 @@ VXETable.setup({
|
|||||||
isCurrent: true
|
isCurrent: true
|
||||||
},
|
},
|
||||||
columnConfig: {
|
columnConfig: {
|
||||||
resizable: true
|
resizable: false
|
||||||
},
|
},
|
||||||
align: "center",
|
align: "center",
|
||||||
headerAlign: "center",
|
headerAlign: "center",
|
||||||
|
8
src/styles/element-plus.scss
Normal file
8
src/styles/element-plus.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/** 自定义 Element Plus 样式 */
|
||||||
|
|
||||||
|
.el-table {
|
||||||
|
// 表头
|
||||||
|
th.el-table__cell {
|
||||||
|
background-color: var(--el-fill-color-light) !important;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,8 @@
|
|||||||
@import "./variables.css";
|
@import "./variables.css";
|
||||||
// Transition
|
// Transition
|
||||||
@import "./transition.scss";
|
@import "./transition.scss";
|
||||||
|
// Element Plus
|
||||||
|
@import "./element-plus.scss";
|
||||||
// Vxe Table
|
// Vxe Table
|
||||||
@import "./vxe-table.scss";
|
@import "./vxe-table.scss";
|
||||||
// 注册多主题
|
// 注册多主题
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
&--pager-wrapper {
|
&--pager-wrapper {
|
||||||
.vxe-pager {
|
.vxe-pager {
|
||||||
height: 70px !important;
|
height: 70px !important;
|
||||||
|
padding: 0 20px !important;
|
||||||
&--wrapper {
|
&--wrapper {
|
||||||
@media screen and (max-width: 750px) {
|
@media screen and (max-width: 750px) {
|
||||||
.vxe-pager--total,
|
.vxe-pager--total,
|
||||||
|
@ -158,7 +158,7 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-wrapper">
|
<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 type="selection" width="50" align="center" />
|
||||||
<el-table-column prop="username" label="用户名" align="center" />
|
<el-table-column prop="username" label="用户名" align="center" />
|
||||||
<el-table-column prop="roles" label="角色" align="center">
|
<el-table-column prop="roles" label="角色" align="center">
|
||||||
@ -236,9 +236,6 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
|
|||||||
|
|
||||||
.table-wrapper {
|
.table-wrapper {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
:deep(.table-header) {
|
|
||||||
background-color: var(--el-fill-color-light) !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pager-wrapper {
|
.pager-wrapper {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user