mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
fix: 合并PR优化,进一步完善自定义字体图标机制
This commit is contained in:
parent
673479e9b7
commit
659412d17c
@ -48,7 +48,7 @@ class Menu extends Controller
|
||||
$this->pid = $this->get['pid'] ?? '';
|
||||
|
||||
// 查询顶级菜单集合
|
||||
$this->menup_list = SystemMenu::mk()->where(['pid' => 0, 'status' => 1])->order('sort desc,id asc')->column('id,pid,title', 'id');
|
||||
$this->menupList = SystemMenu::mk()->where(['pid' => 0, 'status' => 1])->order('sort desc,id asc')->column('id,pid,title', 'id');
|
||||
|
||||
SystemMenu::mQuery()->layTable();
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class Plugs extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
// 读取自定义字体图标
|
||||
// 读取 ThinkAdmin 字体图标
|
||||
if (empty($this->thinkIcons = $this->app->cache->get('ThinkAdminSelfIcons', []))) {
|
||||
$style = file_get_contents(syspath('public/static/theme/css/iconfont.css'));
|
||||
if (preg_match_all('#\.(iconfont-[\w-]+):#', $style, $matches)) {
|
||||
@ -55,16 +55,7 @@ class Plugs extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
// 读取extra自定义字体图标
|
||||
if (empty($this->extraIcons = $this->app->cache->get('ThinkAdminExtraIcons', []))) {
|
||||
$style = file_get_contents(syspath('public/static/extra/icon/iconfont.css'));
|
||||
if (preg_match_all('#\.(iconfont-[\w-]+):#', $style, $matches)) {
|
||||
if (count($this->thinkIcons = $matches[1]) > 0) {
|
||||
$this->app->cache->set('ThinkAdminExtraIcons', $this->extraIcons, 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 读取extra自定义字体图标
|
||||
// 读取 extra 自定义字体图标
|
||||
if (empty($this->extraIcons = $this->app->cache->get('ThinkAdminExtraIcons', []))) {
|
||||
$extraIconPath = syspath('public/static/extra/icon/iconfont.css');
|
||||
if (file_exists($extraIconPath)) {
|
||||
|
||||
@ -13,6 +13,9 @@
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/iconfont.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/extra/style.css?at={:date('md')}">
|
||||
{if file_exists(syspath("public/static/extra/icon/iconfont.css"))}
|
||||
<link rel="stylesheet" href="__ROOT__/static/extra/icon/iconfont.css?at={:date('md')}">
|
||||
{/if}
|
||||
{block name="style"}{/block}
|
||||
<script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
|
||||
<script src="{:url('admin/api.plugs/script',[],false,false)}"></script>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
{/if}{/foreach}
|
||||
|
||||
<!--顶级菜单-->
|
||||
<!--{foreach $menup_list as $k=>$v}-->
|
||||
<!--{foreach $menupList as $k=>$v}-->
|
||||
<li data-open="{:url('index')}?type=index&pid={$v.id}" {if isset($pid) and $pid eq $v.id}class="layui-this"{/if} >{$v.title}</li>
|
||||
<!--{/foreach}-->
|
||||
</ul>
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/iconfont.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/extra/style.css?at={:date('md')}">
|
||||
{if file_exists(syspath("public/static/extra/icon/iconfont.css"))}
|
||||
<link rel="stylesheet" href="__ROOT__/static/extra/icon/iconfont.css?at={:date('md')}">
|
||||
{/if}
|
||||
{block name="style"}{/block}
|
||||
<script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
|
||||
<script src="{:url('admin/api.plugs/script',[],false,false)}"></script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user