fix(treeTable): treeTable data 模式非深度重载时,如果 reload 参数中没有 data 选项,会清除表格数据的问题 (#1938)

pull/1942/head
morning-star 6 months ago committed by GitHub
parent a1472b3561
commit 7c82e15e85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -176,6 +176,7 @@ layui.define(['table'], function (exports) {
options.parseData.mod = true
}
} else {
if(options.data !== undefined){
options.data = options.data || [];
// 处理 isSimpleData
if (treeOptions.data.isSimpleData) {
@ -183,6 +184,7 @@ layui.define(['table'], function (exports) {
}
that.initData(options.data);
}
}
if (!reload || (reload && done && !done.mod)) {
options.done = function () {

Loading…
Cancel
Save