[Feature]多选表格复选框垂直居中对齐

This commit is contained in:
yangchch6 2019-05-08 14:03:59 +08:00
parent b888bd0ce3
commit bbd4d1cae3
9 changed files with 27 additions and 27 deletions

View File

@ -223,7 +223,7 @@ function multiSelect(Table, Checkbox) {
key: "checkbox",
dataIndex: "checkbox",
fixed: "left",
width: 50,
width: 40,
render: function render(text, record, index) {
var attr = {};
record._disabled ? attr.disabled = record._disabled : "";

View File

@ -31,7 +31,7 @@ class Demo1304 extends Component {
render() {
let {selectedValue} = this.state;
let columns = [
{ title: "单选", dataIndex: "check", key: "check", width: 80,render(text, record, index){
{ title: "单选", dataIndex: "check", key: "check", width: 50,render(text, record, index){
return(
<Radio.RadioGroup name="fruits" selectedValue={selectedValue}>
<Radio value={record.check} />
@ -45,8 +45,11 @@ class Demo1304 extends Component {
return (
<Table
className="demo1304"
columns={columns}
data={data}
height={40}
headerheight={40}
rowClassName={(record,index,indent)=>{
if (this.state.selectedRowIndex == index) {
return 'selected';
@ -60,8 +63,6 @@ class Demo1304 extends Component {
selectedValue:record.check
});
}}
title={currentData => <div>员工信息统计表</div>}
footer={currentData => <div>合计: {data.length}条数据</div>}
/>
);
}

View File

@ -0,0 +1,7 @@
.demo1304{
.u-table-tbody .u-radio-group{
width: 16px;
height: 16px;
display: block;
}
}

File diff suppressed because one or more lines are too long

5
dist/demo.css vendored
View File

@ -1050,6 +1050,11 @@ th .drop-menu .uf {
th:hover .uf {
visibility: visible; }
.demo1304 .u-table-tbody .u-radio-group {
width: 16px;
height: 16px;
display: block; }
.demo8 .u-table {
margin-bottom: 11px; }

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

25
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -175,7 +175,7 @@ export default function multiSelect(Table, Checkbox) {
key: "checkbox",
dataIndex: "checkbox",
fixed:"left",
width: 50,
width: 40,
render: (text, record, index) => {
let attr = {};
record._disabled?attr.disabled = record._disabled:"";