selectedKpCode = $request->query('kp_code'); $this->activeTab = $request->query('tab', 'graph'); } #[Computed] public function tabs() { return [ 'graph' => [ 'label' => '知识图谱', 'icon' => 'heroicon-o-share', 'component' => 'knowledge-graph', ], 'list' => [ 'label' => '知识点列表', 'icon' => 'heroicon-o-list-bullet', 'component' => 'knowledge-points-list', ], 'stats' => [ 'label' => '题库统计', 'icon' => 'heroicon-o-chart-bar', 'component' => 'knowledge-point-stats', ], 'network' => [ 'label' => '关联网络', 'icon' => 'heroicon-o-squares-2x2', 'component' => 'knowledge-network', ], ]; } public function setActiveTab(string $tab): void { $this->activeTab = $tab; $this->dispatch('tabChanged', tab: $tab); } public function toggleSidebar() { $this->showSidebar = !$this->showSidebar; } public function clearSelection() { $this->selectedKpCode = null; $this->dispatch('clearAllSelections'); } public function updatedSelectedKpCode($value) { if ($value) { $this->dispatch('kpSelected', kpCode: $value); } } public function getBreadcrumbs(): array { return [ 'knowledge-graph-integration' => '知识图谱整合视图', ]; } }