mirror of https://github.com/layui/layui
fix(table): 修复 table 在 IE8 下报错问题 (#2437)
* fix(table): 修复 table 在 IE8 下报错问题 * update codepull/2442/head
parent
b0b387a0fe
commit
0d17679d01
|
@ -254,9 +254,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取节点的 style 属性值
|
// 获取节点的 style 属性值
|
||||||
|
// currentStyle.getAttribute 参数为 camelCase 形式的字符串
|
||||||
Layui.prototype.getStyle = function(node, name){
|
Layui.prototype.getStyle = function(node, name){
|
||||||
var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);
|
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 外部加载器
|
// css 外部加载器
|
||||||
|
|
|
@ -2898,7 +2898,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||||
Class.prototype.autoResize = function(){
|
Class.prototype.autoResize = function(){
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
that.resizeStrategy(that.elem);
|
if(typeof that.resizeStrategy === 'function'){
|
||||||
|
that.resizeStrategy(that.elem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Class.prototype.resizeStrategy = function(){
|
Class.prototype.resizeStrategy = function(){
|
||||||
|
|
Loading…
Reference in New Issue