How to call the click event in the line monitoring event of layui

clipboard.png
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);
                }
            })
        }
Feb.08,2022

because you cannot access your thisRowData function in table.on, you should visit openAddLayer


does this work? Why can't obj find

after I monitor?
Menu