mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
增加系统自定义图标,方便更新
This commit is contained in:
parent
8874d55e58
commit
b0ffcfe4bd
@ -64,6 +64,18 @@ class Plugs extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
// 读取extra自定义字体图标
|
||||
if (empty($this->extraIcons = $this->app->cache->get('ThinkAdminExtraIcons', []))) {
|
||||
$extraIconPath = syspath('public/static/extra/icon/iconfont.css');
|
||||
if (file_exists($extraIconPath)) {
|
||||
$style = file_get_contents($extraIconPath);
|
||||
if (preg_match_all('#\.(iconfont-[\w-]+):#', $style, $matches)) {
|
||||
if (count($this->extraIcons = $matches[1]) > 0) {
|
||||
$this->app->cache->set('ThinkAdminExtraIcons', $this->extraIcons, 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->field = $this->app->request->get('field', 'icon');
|
||||
$this->fetch(dirname(__DIR__, 2) . '/view/api/icon.html');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user