layerui工具欄根據狀態動態顯示
<script type="text/html" id="toolbar">
<a class="layui-btn layui-btn-xs" lay-event="detail" title="詳情">詳情</a>
<!-- 這裡同樣支援 laytpl 語法,如: -->
{{# if(d.status == 'unsubmit'){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" title="編輯">編輯</a>
{{# } }}
{{# if(d.status == 'issubmit'){ }}
<a class="layui-btn layui-btn-xs layui-btn-disabled" lay-event="" title="編輯">編輯</a>
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="export" title="匯出">匯出</a>
{{# if("${sessionScope.userOnlineBean.level}" >1 && d.status == 'issubmit'){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="rebut" title="退回">退回</a>
{{# } }}
{{# if("${sessionScope.userOnlineBean.level}" >1 && d.status == 'unsubmit'){ }}
<a class="layui-btn layui-btn-xs layui-btn-disabled" lay-event="" title="退回">退回</a>
{{# } }}
</script>