<script type="text/html" id="barTable">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="phone">打电话</a>
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
{{# if(d.is_lock =='1'){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="state_0">解锁</a>
{{# }if(d.is_lock =='0') { }}
<a class="layui-btn layui-btn-xs layui-btn-xs" lay-event="state_1">锁定</a>
{{# } }}
</script>
转载于:https://www.cnblogs.com/huangzhen22/p/11157331.html