[Feature]多选表格复选框垂直居中对齐
This commit is contained in:
parent
b888bd0ce3
commit
bbd4d1cae3
|
@ -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 : "";
|
||||
|
|
|
@ -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>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
@ -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; }
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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:"";
|
||||
|
|
Loading…
Reference in New Issue