增加系统自定义图标,方便更新

This commit is contained in:
LiuPengFeiCode 2025-02-11 15:48:05 +08:00
parent 8874d55e58
commit b0ffcfe4bd

View File

@ -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');
}