fix:表头错位问题
This commit is contained in:
parent
4b4bdcd588
commit
cc103f4e69
|
@ -330,7 +330,6 @@ var Table = function (_Component) {
|
||||||
}
|
}
|
||||||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||||
this.isShowScrollY();
|
this.isShowScrollY();
|
||||||
this.scrollbarWidth = (0, _utils.measureScrollbar)();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||||
|
|
|
@ -47,8 +47,7 @@ function measureScrollbar() {
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
var tableDom = document.querySelector('.u-table');
|
var currentDom = document.body;
|
||||||
var currentDom = tableDom ? tableDom : document.body;
|
|
||||||
|
|
||||||
if (scrollbarSize) {
|
if (scrollbarSize) {
|
||||||
return scrollbarSize;
|
return scrollbarSize;
|
||||||
|
|
|
@ -34182,7 +34182,6 @@
|
||||||
}
|
}
|
||||||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||||
this.isShowScrollY();
|
this.isShowScrollY();
|
||||||
this.scrollbarWidth = (0, _utils.measureScrollbar)();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||||
|
@ -37223,8 +37222,7 @@
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
var tableDom = document.querySelector('.u-table');
|
var currentDom = document.body;
|
||||||
var currentDom = tableDom ? tableDom : document.body;
|
|
||||||
|
|
||||||
if (scrollbarSize) {
|
if (scrollbarSize) {
|
||||||
return scrollbarSize;
|
return scrollbarSize;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -221,7 +221,6 @@ class Table extends Component {
|
||||||
}
|
}
|
||||||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||||
this.isShowScrollY();
|
this.isShowScrollY();
|
||||||
this.scrollbarWidth = measureScrollbar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
@ -17,8 +17,7 @@ export function measureScrollbar(direction = 'vertical') {
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
const tableDom =document.querySelector('.u-table');
|
let currentDom = document.body;
|
||||||
let currentDom = tableDom?tableDom:document.body;
|
|
||||||
|
|
||||||
if (scrollbarSize) {
|
if (scrollbarSize) {
|
||||||
return scrollbarSize;
|
return scrollbarSize;
|
||||||
|
|
Loading…
Reference in New Issue