Browse Source

1.增加分类图标显示

2.数据库增加链接图标字段
3.增加默认图标
pull/117/head
wmgang@qq.com 2 years ago
parent
commit
d9d2790b6c
  1. BIN
      db/onenav.simple.db3
  2. BIN
      static/images/default.png
  3. 13
      templates/admin/static/embed.js

BIN
db/onenav.simple.db3

Binary file not shown.

BIN
static/images/default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

13
templates/admin/static/embed.js

@ -21,6 +21,9 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){ @@ -21,6 +21,9 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
,page: true //开启分页
,cols: [[ //表头
{field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
,{field: 'font_icon', title: '图标', width:60, templet: function(d){
return '<i class="fa-lg '+d.font_icon+'"></i>';
}}
,{field: 'name', title: '分类名称', width:160}
,{field: 'fname', title: '父级分类', width:160}
,{field: 'add_time', title: '添加时间', width:160, sort: true,templet:function(d){
@ -84,6 +87,16 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){ @@ -84,6 +87,16 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
,cols: [[ //表头
{type:'checkbox'} //开启复选框
,{field: 'id', title: 'ID', width:80, sort: true}
,{field: 'font_icon', title: '图标', width:60, templet:function(d){
if(d.font_icon==null)
{
return '<img src="static/images/default.png" width="28" height="28">';
}
else
{
return '<img src="'+d.font_icon+'" width="28" height="28">';
}
}}
// ,{field: 'fid', title: '分类ID',sort:true, width:90}
,{field: 'category_name', title: '所属分类',sort:true,width:120}
,{field: 'url', title: 'URL',width:140,templet:function(d){

Loading…
Cancel
Save