buildContent()); } /** * 构建内容 * * @return string */ protected function buildContent(): string { $actions = [ [ 'title' => '清理缓存', 'icon' => 'fa-broom', 'color' => 'warning', 'url' => '/admin/admin-cache', 'description' => '清理系统缓存', ], [ 'title' => '系统信息', 'icon' => 'fa-info-circle', 'color' => 'info', 'url' => '/admin/system-info', 'description' => '查看系统详细信息', ], [ 'title' => '日志管理', 'icon' => 'fa-file-alt', 'color' => 'primary', 'url' => '/admin/logs', 'description' => '查看和管理系统日志', ], [ 'title' => '系统维护', 'icon' => 'fa-tools', 'color' => 'danger', 'url' => '#', 'description' => '执行系统维护操作', 'onclick' => 'performMaintenance()', ], [ 'title' => '备份系统', 'icon' => 'fa-archive', 'color' => 'success', 'url' => '#', 'description' => '创建系统备份', 'onclick' => 'createBackup()', ], [ 'title' => '性能监控', 'icon' => 'fa-chart-line', 'color' => 'secondary', 'url' => '/admin/performance', 'description' => '查看性能监控数据', ], ]; $html = '
'; foreach ($actions as $action) { $onclick = isset($action['onclick']) ? "onclick=\"{$action['onclick']}\"" : ''; $href = isset($action['onclick']) ? 'javascript:void(0)' : $action['url']; $html .= ''; $html .= '
'; $html .= '
'; $html .= ""; $html .= "{$action['title']}"; $html .= "
{$action['description']}"; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; } $html .= '
'; // 添加JavaScript函数 $html .= $this->getQuickActionsScript(); return $html; } /** * 获取快捷操作JavaScript * * @return string */ protected function getQuickActionsScript(): string { return ' '; } }