hsiangleev / layuiExtend

layui框架扩展
MIT License
305 stars 123 forks source link

刷新出现错误Laytpl Error:TypeError: Cannot read property 'visible' of null #79

Open shnno13 opened 5 years ago

shnno13 commented 5 years ago

这貌似是个大错误,刷新页面和展开树节点都会出现此错误

shnno13 commented 5 years ago

// 这是代码 集成到layuiadmin中了,

layui.config({ base: "../../layuiadmin/" }).extend({ index: "lib/index" }).use(["index", "eleTree", 'systemUtils'], function () { var eleTree = layui.eleTree,$ = layui.jquery; // 填充数据 eleTree.render({ elem: "#categoryList", url: baseUrl + "parent", method: "GET", lazy: true, load: function (d,callback) { console.log(d) $.get(baseUrl + "parent?pid="+d.id,function (res) { callback(res.data) }) }, request: { name: "name", key: "id", } }); });

hsiangleev commented 5 years ago

@Fool-Joker 数据结构不太对吧,可以看下你的树的部分数据吗?还有报错信息的截图方便看下吗

shnno13 commented 5 years ago

代码结构改掉了,暂时没有复现,如果复现再贴上来