{{#  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>
{{# } }}

实现效果:

layui table 行按钮事件,启用禁用切换-LMLPHP

05-23 23:04