{{# if(d.isActive == ){ }} <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="forbidden">禁用</a> {{# } }} {{# if(d.isActive == ){ }} <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="open">启用</a> {{# } }}实现效果: