layuiExtend icon indicating copy to clipboard operation
layuiExtend copied to clipboard

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

Open shnno13 opened this issue 6 years ago • 3 comments

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

shnno13 avatar Sep 18 '19 10:09 shnno13

// 这是代码 集成到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", } }); });

shnno13 avatar Sep 18 '19 10:09 shnno13

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

hsiangleev avatar Sep 19 '19 02:09 hsiangleev

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

shnno13 avatar Sep 19 '19 06:09 shnno13