From b0ffcfe4bd4566c354ff827625b8c0be31e4f4a8 Mon Sep 17 00:00:00 2001 From: LiuPengFeiCode <525833532@qq.com> Date: Tue, 11 Feb 2025 15:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=B3=BB=E7=BB=9F=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=9B=BE=E6=A0=87=EF=BC=8C=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../think-plugs-admin/src/controller/api/Plugs.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugin/think-plugs-admin/src/controller/api/Plugs.php b/plugin/think-plugs-admin/src/controller/api/Plugs.php index 1f2a7ee44..9cf71f850 100644 --- a/plugin/think-plugs-admin/src/controller/api/Plugs.php +++ b/plugin/think-plugs-admin/src/controller/api/Plugs.php @@ -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'); }