如何使用系统配置
配置文件路径:/application/extra/site.php
若需要修改或者新增配置栏
site配置文件中configgroup数组
然后在语言包中添加中文标题
语言包路径:\application\admin\lang\zh-cn\config.php
在字典配置添加分组
表格操作栏ids为0
如果出现表格内操作栏ids的值为0的话,有几种可能
可能是没有在控制器中传id的值
在控制器中加入id的值,问题解决
可能是js中没有设置id主键
又或者是数据库表id字段没有设置自增主键
根据状态决定是否显示工具栏中的按钮
修改对应控制器的js文件中的工具栏字段
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
formatter: function (value, row, index) {
var that = $.extend({},this);
var table = $(that.table).clone(true);
if (row.status != 0) {//当状态不等于0时隐藏编辑按钮
$(table).data("operate-edit", null);
}
that.table = table;
return Table.api.formatter.operate.call(that, value, row, index);
}
}
效果如下
开关状态提示没权限
修改 app\common\controller\Backend 类的 $multiFields 属性