🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 代码 ``` <!doctype html> <html> <head> <meta charset="utf-8"> <link href="http://www.ijquery.cn/ui/layui/layui-v2.1.5/css/layui.css" rel="stylesheet"> </head> <body style="padding: 15px;"> <!--中间内容/start--> <table class="layui-table"> <thead> <tr> <th width="40">ID</th> <th align="left">角色名称</th> <th align="left">角色描述</th> <th width="60" align="left">状态</th> <th width="160">操作</th> </tr> </thead> <tbody> <foreach name="agent_roles" item="vo"> <tr> <td>{$vo.id}</td> <td>{$vo.name}</td> <td>{$vo.remark}</td> <td> <if condition="$vo['status'] eq 1"> <font color="red">√</font> <else/> <font color="red">╳</font> </if> </td> <td> <a href="{:url('Rbac/authorize',array('id'=>$vo['id']))}">权限设置</a> <a href="{:url('Rbac/roleedit',array('id'=>$vo['id']))}">编辑</a> <a class="js-ajax-delete" href="{:url('Rbac/roledelete',array('id'=>$vo['id']))}">删除</a> </td> </tr> </foreach> </tbody> </table> <!--中间内容/end--> <script src="http://www.ijquery.cn/ui/layui/layui-v2.1.5/layui.js"></script> <script> layui.use(['laydate','form', 'laypage', 'layer', 'table', 'carousel', 'upload', 'element'],function(){ var laydate = layui.laydate //日期 ,form = layui.form //分页 ,laypage = layui.laypage //分页 ,layer = layui.layer //弹层 ,table = layui.table //表格 ,carousel = layui.carousel //轮播 ,upload = layui.upload //上传 ,element = layui.element; //元素操作 }); </script> </body> </html> ```