diff --git a/app/admin/controller/api/Plugs.php b/app/admin/controller/api/Plugs.php index aabb79164..1f2a7ee44 100644 --- a/app/admin/controller/api/Plugs.php +++ b/app/admin/controller/api/Plugs.php @@ -55,6 +55,15 @@ 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); + } + } + } $this->field = $this->app->request->get('field', 'icon'); $this->fetch(dirname(__DIR__, 2) . '/view/api/icon.html'); } diff --git a/app/admin/view/api/icon.html b/app/admin/view/api/icon.html index 9100e2987..7b85e18e8 100644 --- a/app/admin/view/api/icon.html +++ b/app/admin/view/api/icon.html @@ -2,7 +2,7 @@ - {block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block} + {block name="title"}{$title|default=''}{if !empty($title)} 路 {/if}{:sysconf('site_name')}{/block} @@ -10,6 +10,7 @@ +