mirror of
https://gitee.com/layui/layui.git
synced 2025-11-24 08:33:12 +08:00
fix(table): 修复 table 的浏览器兼容性问题 (#2850)
This commit is contained in:
@@ -2952,7 +2952,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
that.unobserveResize();
|
that.unobserveResize();
|
||||||
for (const propName in that) {
|
for (var propName in that) {
|
||||||
if(lay.hasOwn(that, propName) && propName !== 'config'){
|
if(lay.hasOwn(that, propName) && propName !== 'config'){
|
||||||
that[propName] = null;
|
that[propName] = null;
|
||||||
}
|
}
|
||||||
@@ -2981,7 +2981,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rightTrs.length) {
|
if (rightTrs.length) {
|
||||||
rightTrs.each(function(i) {
|
rightTrs.each(function(i) {
|
||||||
if (heights[i]) {
|
if (heights[i]) {
|
||||||
@@ -2996,7 +2996,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||||||
var that = this;
|
var that = this;
|
||||||
var style = that.elem.children('style')[0];
|
var style = that.elem.children('style')[0];
|
||||||
var selector = '.' + FIXED_HEIGHT_PATCH;
|
var selector = '.' + FIXED_HEIGHT_PATCH;
|
||||||
|
|
||||||
trsElem.toggleClass(FIXED_HEIGHT_PATCH, isEnter);
|
trsElem.toggleClass(FIXED_HEIGHT_PATCH, isEnter);
|
||||||
// 将当前鼠标悬停行的高度同步到 FIXED_HEIGHT_PATCH (所有区域)类名的样式中
|
// 将当前鼠标悬停行的高度同步到 FIXED_HEIGHT_PATCH (所有区域)类名的样式中
|
||||||
if (isEnter) {
|
if (isEnter) {
|
||||||
@@ -3028,7 +3028,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||||||
|
|
||||||
Class.prototype.observeResize = function(){
|
Class.prototype.observeResize = function(){
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
if(!resizeObserver) return;
|
if(!resizeObserver) return;
|
||||||
|
|
||||||
that.unobserveResize();
|
that.unobserveResize();
|
||||||
@@ -3046,7 +3046,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||||||
|
|
||||||
if(needSyncFixedRowHeight){
|
if(needSyncFixedRowHeight){
|
||||||
resizeObserver.observe(
|
resizeObserver.observe(
|
||||||
tableEl,
|
tableEl,
|
||||||
$.proxy(that.calcFixedRowHeight, that)
|
$.proxy(that.calcFixedRowHeight, that)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user