you need to click the add button after clicking the row to complete the addition of the multi-level menu. After listening to the event with the layui of table.on, the data cannot be sent to the click event. How to implement
my code
var thisRowData;
table.on("row(table1)", function (obj){
obj.tr.addClass("layui-table-click2").siblings().removeClass("layui-table-click2");
var data = obj.data;
var id = data.parentId;
console.log(id);
thisRowData(data);
});
window.openAddLayer = function(obj){
function thisRowData(obj);
layer.open({
type:2,
title:"/",
area:["400px","500px"],
fix:false,
content:"add.html",
success:function(layero,index){
},
error:function(layero,index){
errmsg(res);
}
})
}