fix:当所有数据都为disable状态时,全选不应该默认选中
This commit is contained in:
parent
615ff1abae
commit
f1c14e4d16
|
@ -273,7 +273,8 @@
|
||||||
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
|
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
|
||||||
padding-right: 0px; }
|
padding-right: 0px; }
|
||||||
.u-table-fixed-header .u-table-body-inner {
|
.u-table-fixed-header .u-table-body-inner {
|
||||||
height: 100%; }
|
height: 100%;
|
||||||
|
overflow: scroll; }
|
||||||
.u-table-fixed-header .u-table-scroll .u-table-header {
|
.u-table-fixed-header .u-table-scroll .u-table-header {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
|
|
@ -385,7 +385,7 @@ var Table = function (_Component) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||||
this.isShowScrollY();
|
// this.isShowScrollY();
|
||||||
};
|
};
|
||||||
|
|
||||||
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||||
|
@ -1007,7 +1007,7 @@ var Table = function (_Component) {
|
||||||
|
|
||||||
if (this.domWidthDiff <= 0) {
|
if (this.domWidthDiff <= 0) {
|
||||||
headStyle.marginBottom = scrollbarWidth + 'px';
|
headStyle.marginBottom = scrollbarWidth + 'px';
|
||||||
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
bodyStyle.marginBottom = '-' + scrollbarWidth + 'px';
|
||||||
} else {
|
} else {
|
||||||
innerBodyStyle.overflowX = 'auto';
|
innerBodyStyle.overflowX = 'auto';
|
||||||
}
|
}
|
||||||
|
@ -1024,8 +1024,8 @@ var Table = function (_Component) {
|
||||||
headStyle.overflow = 'hidden';
|
headStyle.overflow = 'hidden';
|
||||||
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
|
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
|
||||||
} else {
|
} else {
|
||||||
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
bodyStyle.marginBottom = '-' + scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 没有数据时,表头滚动条隐藏问题
|
// 没有数据时,表头滚动条隐藏问题
|
||||||
if (data.length == 0 && this.domWidthDiff < 0) {
|
if (data.length == 0 && this.domWidthDiff < 0) {
|
||||||
|
|
|
@ -105,7 +105,7 @@ function multiSelect(Table, Checkbox) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.length == count + disabledCount) {
|
if (data.length == count + disabledCount && count > 0) {
|
||||||
return "all";
|
return "all";
|
||||||
}
|
}
|
||||||
return count == 0 ? false : "indeter";
|
return count == 0 ? false : "indeter";
|
||||||
|
|
|
@ -259,7 +259,8 @@
|
||||||
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
|
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
|
||||||
padding-right: 0px; }
|
padding-right: 0px; }
|
||||||
.u-table-fixed-header .u-table-body-inner {
|
.u-table-fixed-header .u-table-body-inner {
|
||||||
height: 100%; }
|
height: 100%;
|
||||||
|
overflow: scroll; }
|
||||||
.u-table-fixed-header .u-table-scroll .u-table-header {
|
.u-table-fixed-header .u-table-scroll .u-table-header {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
|
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
|
@ -230,7 +230,7 @@ class Table extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||||
this.isShowScrollY();
|
// this.isShowScrollY();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
@ -863,7 +863,7 @@ class Table extends Component {
|
||||||
|
|
||||||
if(this.domWidthDiff <= 0){
|
if(this.domWidthDiff <= 0){
|
||||||
headStyle.marginBottom = `${scrollbarWidth}px`;
|
headStyle.marginBottom = `${scrollbarWidth}px`;
|
||||||
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
||||||
}else{
|
}else{
|
||||||
innerBodyStyle.overflowX = 'auto';
|
innerBodyStyle.overflowX = 'auto';
|
||||||
}
|
}
|
||||||
|
@ -880,7 +880,7 @@ class Table extends Component {
|
||||||
headStyle.overflow = 'hidden';
|
headStyle.overflow = 'hidden';
|
||||||
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
|
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
|
||||||
}else{
|
}else{
|
||||||
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
bodyStyle.marginBottom = `-${scrollbarWidth}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -212,7 +212,7 @@ $icon-color:#505F79;
|
||||||
|
|
||||||
&-fixed-header &-body-inner {
|
&-fixed-header &-body-inner {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ export default function multiSelect(Table, Checkbox) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if(data.length == count + disabledCount){
|
if(data.length == count + disabledCount && count>0){
|
||||||
return "all";
|
return "all";
|
||||||
}
|
}
|
||||||
return count == 0?false:"indeter";
|
return count == 0?false:"indeter";
|
||||||
|
|
Loading…
Reference in New Issue