🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 视图 ![mark](https://box.kancloud.cn/68048ea448e262597126927495c42a3a_876x174.) ## 代码 ``` <!doctype html> <html> <head> <meta charset="utf-8"> <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <table class="table table-hover table-bordered table-list"> <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="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> <if condition="$vo['id'] eq 1"> <font color="#cccccc">权限设置</font> <font color="#cccccc">编辑</font> <font color="#cccccc">删除</font> <else /> <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> </if> </td> </tr> </foreach> </tbody> </table> </body> </html> ```