fix: 优化 Dashboard 页面和类型定义
- Dashboard 页面样式调整 - 添加数据库相关 TypeScript 类型定义 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -192,17 +192,8 @@ const topRequestsTab = ref<'general' | 'errors'>('general')
|
||||
<h3 class="font-semibold text-lg">Active Agents</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-sm text-gray-400">Errors</span>
|
||||
<!-- 开启状态开关 -->
|
||||
<div
|
||||
class="w-10 h-5 rounded-full relative cursor-pointer transition-colors"
|
||||
:class="agentErrorEnabled ? 'bg-primary-orange' : 'bg-dark-500'"
|
||||
@click="agentErrorEnabled = !agentErrorEnabled"
|
||||
>
|
||||
<div
|
||||
class="absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform"
|
||||
:class="agentErrorEnabled ? 'right-0.5' : 'left-0.5'"
|
||||
></div>
|
||||
</div>
|
||||
<!-- 使用 Element Plus 开关组件 -->
|
||||
<el-switch v-model="agentErrorEnabled" class="error-switch" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-4xl font-bold mb-4">{{ displayStats.activeAgents }}</div>
|
||||
@@ -394,3 +385,13 @@ const topRequestsTab = ref<'general' | 'errors'>('general')
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.error-switch {
|
||||
--el-switch-on-color: #f97316;
|
||||
--el-switch-off-color: #374151;
|
||||
}
|
||||
.error-switch :deep(.el-switch__action) {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user