fix:当所有数据都为disable状态时,全选不应该默认选中

This commit is contained in:
izbz wh 2019-05-22 18:07:03 +08:00
parent 615ff1abae
commit f1c14e4d16
10 changed files with 4895 additions and 19875 deletions

View File

@ -273,7 +273,8 @@
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
padding-right: 0px; }
.u-table-fixed-header .u-table-body-inner {
height: 100%; }
height: 100%;
overflow: scroll; }
.u-table-fixed-header .u-table-scroll .u-table-header {
overflow-x: scroll;
padding-bottom: 20px;

View File

@ -385,7 +385,7 @@ var Table = function (_Component) {
}
// 是否传入 scroll中的y属性如果传入判断是否是整数如果是则进行比较 。bodyTable 的clientHeight进行判断
this.isShowScrollY();
// this.isShowScrollY();
};
Table.prototype.componentWillUnmount = function componentWillUnmount() {
@ -1007,7 +1007,7 @@ var Table = function (_Component) {
if (this.domWidthDiff <= 0) {
headStyle.marginBottom = scrollbarWidth + 'px';
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
bodyStyle.marginBottom = '-' + scrollbarWidth + 'px';
} else {
innerBodyStyle.overflowX = 'auto';
}
@ -1024,8 +1024,8 @@ var Table = function (_Component) {
headStyle.overflow = 'hidden';
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
} else {
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
}
bodyStyle.marginBottom = '-' + scrollbarWidth + 'px';
}
} else {
// 没有数据时,表头滚动条隐藏问题
if (data.length == 0 && this.domWidthDiff < 0) {

View File

@ -105,7 +105,7 @@ function multiSelect(Table, Checkbox) {
}
});
if (data.length == count + disabledCount) {
if (data.length == count + disabledCount && count > 0) {
return "all";
}
return count == 0 ? false : "indeter";

3
dist/demo.css vendored
View File

@ -259,7 +259,8 @@
.u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
padding-right: 0px; }
.u-table-fixed-header .u-table-body-inner {
height: 100%; }
height: 100%;
overflow: scroll; }
.u-table-fixed-header .u-table-scroll .u-table-header {
overflow-x: scroll;
padding-bottom: 20px;

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

24736
dist/demo.js vendored

File diff suppressed because one or more lines are too long

6
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -230,7 +230,7 @@ class Table extends Component {
}
// 是否传入 scroll中的y属性如果传入判断是否是整数如果是则进行比较 。bodyTable 的clientHeight进行判断
this.isShowScrollY();
// this.isShowScrollY();
}
componentWillUnmount() {
@ -863,7 +863,7 @@ class Table extends Component {
if(this.domWidthDiff <= 0){
headStyle.marginBottom = `${scrollbarWidth}px`;
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
bodyStyle.marginBottom = `-${scrollbarWidth}px`;
}else{
innerBodyStyle.overflowX = 'auto';
}
@ -880,7 +880,7 @@ class Table extends Component {
headStyle.overflow = 'hidden';
innerBodyStyle.overflowX = 'auto'; //兼容expand场景、子表格含有固定列的场景
}else{
// bodyStyle.marginBottom = `-${scrollbarWidth}px`;
bodyStyle.marginBottom = `-${scrollbarWidth}px`;
}
}else{

View File

@ -212,7 +212,7 @@ $icon-color:#505F79;
&-fixed-header &-body-inner {
height: 100%;
// overflow: scroll;
overflow: scroll;
}

View File

@ -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 count == 0?false:"indeter";