a-table
a-table 固定列存在的情况下背景颜色问题
采用的方式是利用 scss 变量,对于不同主题选择不同的背景色(字体色等)
antdv a-table 组件存在固定列的情况下,标题行和固定列的背景色不会随着父类变化,我的解决方案是全局设置。部分代码可供参考
// 全局处理表格样式(固定列存在情况下 固定列和标题行的问题)
// 左侧固定
.ant-table-fixed-left, .ant-table-fixed-left table {
@include background_color("table-bg-color");
}
// 右侧固定
.ant-table-fixed-right, .ant-table-fixed-right table {
@include background_color("table-bg-color");
}
// 带固定的列标题行
.ant-table-fixed thead[class*="ant-table-thead"] th {
@include background_color("table-bg-color");
}
// 边框线(颜色会和表格背景色重合)
.ant-table.ant-table-layout-fixed {
@include border_style("table-border-style");
}
// 所有的表格头字体颜色
thead[class*="ant-table-thead"] th {
@include font_color("table-head-font-color");
}
// 表格体
.ant-table-tbody > tr > td {
@include font_color("table-body-font-color");
}
a-table 多选选项打开和关闭
:row-selection="editAble ? { selectedRowKeys }: undefined"
a-table 中不能嵌套 modal
否则 visible 属性失效