$.ajax({
          //请求数据格式见:https://www.layui.com/doc/modules/tree.html
          url: "{:url('content.Category/menu')}",
          type: 'GET',
          success: function (dataList) {
           //点击节点新窗口跳转
           tree.render({
           elem: '#categoryMenuTree',
           data: dataList,
           isJump: true,  //link 为参数匹配
           //利用回调 使url在name为articleIframe的iframe中显示
           click: function (layero, index) {
           //console.log(layero.data.href);
           myhref = {"ew-href" : layero.data.href};
           $(".layui-tree-txt").attr(myhref).removeAttr("href");
        }
    });
    }
});

//利用回调 使urlnamearticleIframeiframe中显示

click: function (layero, index) {
//console.log(layero.data.href);
myhref = {"ew-href" : layero.data.href};
$(".layui-tree-txt").attr(myhref).removeAttr("href"); 
}

重点我记的是这里

myhref = {"ew-href" : layero.data.href};
$(".layui-tree-txt").attr(myhref).removeAttr("href");
动态修改表单属性并赋值

标签: layui, table

仅有一条评论

  1. 1 1

    1

添加新评论