mirror of https://github.com/layui/layui
Merge branch '2.x' of github.com:layui/layui into 2.x
commit
4a42e9dcc5
|
@ -131,7 +131,7 @@ layui.use(['element', 'layer', 'util'], function(){
|
||||||
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
|
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
|
||||||
,area: ['260px', '100%']
|
,area: ['260px', '100%']
|
||||||
,offset: 'rt' //右上角
|
,offset: 'rt' //右上角
|
||||||
,anim: 5
|
,anim: 'slideLeft'
|
||||||
,shadeClose: true
|
,shadeClose: true
|
||||||
,scrollbar: false
|
,scrollbar: false
|
||||||
});
|
});
|
||||||
|
|
|
@ -1115,7 +1115,7 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||||
.layui-table-tips-c:before{position: relative; right: -2px;}
|
.layui-table-tips-c:before{position: relative; right: -2px;}
|
||||||
|
|
||||||
/** 树表 **/
|
/** 树表 **/
|
||||||
.layui-table-tree-nodeIcon {width: 20px;}
|
.layui-table-tree-nodeIcon {max-width: 20px;}
|
||||||
.layui-table-tree-nodeIcon > * {width: 100%;}
|
.layui-table-tree-nodeIcon > * {width: 100%;}
|
||||||
.layui-table-tree-flexIcon,.layui-table-tree-nodeIcon {margin-right: 2px;}
|
.layui-table-tree-flexIcon,.layui-table-tree-nodeIcon {margin-right: 2px;}
|
||||||
.layui-table-tree-flexIcon {cursor: pointer;}
|
.layui-table-tree-flexIcon {cursor: pointer;}
|
||||||
|
|
|
@ -233,7 +233,6 @@ layui.define(['table'], function (exports) {
|
||||||
onExpand: null, // 展开之后的回调
|
onExpand: null, // 展开之后的回调
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoSort: false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Class.prototype.getOptions = function () {
|
Class.prototype.getOptions = function () {
|
||||||
|
@ -821,7 +820,7 @@ layui.define(['table'], function (exports) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// 对参数进行深度或浅扩展
|
// 对参数进行深度或浅扩展
|
||||||
that.config = $.extend(deep, {}, that.config, options, {autoSort: false});
|
that.config = $.extend(deep, {}, that.config, options);
|
||||||
|
|
||||||
// 执行渲染
|
// 执行渲染
|
||||||
that.render(type);
|
that.render(type);
|
||||||
|
@ -894,6 +893,14 @@ layui.define(['table'], function (exports) {
|
||||||
treeTable.reloadData(id);
|
treeTable.reloadData(id);
|
||||||
} else {
|
} else {
|
||||||
// url异步取数的表格一般需要自己添加监听之后进行reloadData并且把排序参数加入到where中
|
// url异步取数的表格一般需要自己添加监听之后进行reloadData并且把排序参数加入到where中
|
||||||
|
if (options.autoSort) {
|
||||||
|
var tableData = that.initData();
|
||||||
|
var res = {};
|
||||||
|
res[options.response.dataName] = tableData;
|
||||||
|
typeof options.done === 'function' && options.done(
|
||||||
|
res, that.page, that.count
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue