mirror of
https://gitee.com/layui/layui.git
synced 2025-04-05 17:38:02 +08:00
fix(table): 修复 table 在 IE8 下报错问题 (#2437)
* fix(table): 修复 table 在 IE8 下报错问题 * update code
This commit is contained in:
parent
b0b387a0fe
commit
0d17679d01
@ -254,9 +254,12 @@
|
||||
};
|
||||
|
||||
// 获取节点的 style 属性值
|
||||
// currentStyle.getAttribute 参数为 camelCase 形式的字符串
|
||||
Layui.prototype.getStyle = function(node, name){
|
||||
var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);
|
||||
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
||||
return style.getPropertyValue
|
||||
? style.getPropertyValue(name)
|
||||
: style.getAttribute(name.replace(/-(\w)/g, function(_, c){ return c ? c.toUpperCase() : '';}));
|
||||
};
|
||||
|
||||
// css 外部加载器
|
||||
|
@ -2898,7 +2898,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||
Class.prototype.autoResize = function(){
|
||||
var that = this;
|
||||
|
||||
that.resizeStrategy(that.elem);
|
||||
if(typeof that.resizeStrategy === 'function'){
|
||||
that.resizeStrategy(that.elem);
|
||||
}
|
||||
}
|
||||
|
||||
Class.prototype.resizeStrategy = function(){
|
||||
|
Loading…
Reference in New Issue
Block a user