[Feature]多选表格复选框垂直居中对齐
This commit is contained in:
parent
b888bd0ce3
commit
bbd4d1cae3
|
@ -223,7 +223,7 @@ function multiSelect(Table, Checkbox) {
|
||||||
key: "checkbox",
|
key: "checkbox",
|
||||||
dataIndex: "checkbox",
|
dataIndex: "checkbox",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
width: 50,
|
width: 40,
|
||||||
render: function render(text, record, index) {
|
render: function render(text, record, index) {
|
||||||
var attr = {};
|
var attr = {};
|
||||||
record._disabled ? attr.disabled = record._disabled : "";
|
record._disabled ? attr.disabled = record._disabled : "";
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Demo1304 extends Component {
|
||||||
render() {
|
render() {
|
||||||
let {selectedValue} = this.state;
|
let {selectedValue} = this.state;
|
||||||
let columns = [
|
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(
|
return(
|
||||||
<Radio.RadioGroup name="fruits" selectedValue={selectedValue}>
|
<Radio.RadioGroup name="fruits" selectedValue={selectedValue}>
|
||||||
<Radio value={record.check} />
|
<Radio value={record.check} />
|
||||||
|
@ -45,8 +45,11 @@ class Demo1304 extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
|
className="demo1304"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={data}
|
data={data}
|
||||||
|
height={40}
|
||||||
|
headerheight={40}
|
||||||
rowClassName={(record,index,indent)=>{
|
rowClassName={(record,index,indent)=>{
|
||||||
if (this.state.selectedRowIndex == index) {
|
if (this.state.selectedRowIndex == index) {
|
||||||
return 'selected';
|
return 'selected';
|
||||||
|
@ -60,8 +63,6 @@ class Demo1304 extends Component {
|
||||||
selectedValue:record.check
|
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 {
|
th:hover .uf {
|
||||||
visibility: visible; }
|
visibility: visible; }
|
||||||
|
|
||||||
|
.demo1304 .u-table-tbody .u-radio-group {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
|
||||||
.demo8 .u-table {
|
.demo8 .u-table {
|
||||||
margin-bottom: 11px; }
|
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",
|
key: "checkbox",
|
||||||
dataIndex: "checkbox",
|
dataIndex: "checkbox",
|
||||||
fixed:"left",
|
fixed:"left",
|
||||||
width: 50,
|
width: 40,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
let attr = {};
|
let attr = {};
|
||||||
record._disabled?attr.disabled = record._disabled:"";
|
record._disabled?attr.disabled = record._disabled:"";
|
||||||
|
|
Loading…
Reference in New Issue