diff options
Diffstat (limited to 'frontend/src/pages/ProjectResultsTab.svelte')
| -rw-r--r-- | frontend/src/pages/ProjectResultsTab.svelte | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/frontend/src/pages/ProjectResultsTab.svelte b/frontend/src/pages/ProjectResultsTab.svelte index 860fab2..2afb7c1 100644 --- a/frontend/src/pages/ProjectResultsTab.svelte +++ b/frontend/src/pages/ProjectResultsTab.svelte @@ -18,6 +18,7 @@ import { Alert } from '$lib/components/ui/alert'; import { Badge } from '$lib/components/ui/badge'; import * as Card from '$lib/components/ui/card'; + import * as Collapsible from '$lib/components/ui/collapsible'; import * as Table from '$lib/components/ui/table'; import * as Select from '$lib/components/ui/select'; import * as Tabs from '$lib/components/ui/tabs'; @@ -197,6 +198,24 @@ import type { Run, BacktestResult } from '../lib/types'; </Alert> {/if} + {#if result.assumptions && Object.keys(result.assumptions).length} + <Collapsible.Root> + <Collapsible.Trigger + class="flex w-full items-center justify-between p-4 text-sm font-medium hover:bg-muted/50" + data-testid="assumptions-toggle">技术口径</Collapsible.Trigger> + <Collapsible.Content class="px-4 pb-4"> + <dl class="text-xs" data-testid="assumptions-list"> + {#each Object.entries(result.assumptions) as [k, v] (k)} + <div class="flex gap-4 py-1"> + <dt class="text-muted-foreground shrink-0">{k}</dt> + <dd>{v}</dd> + </div> + {/each} + </dl> + </Collapsible.Content> + </Collapsible.Root> + {/if} + <Card.Root size="sm" class="p-4 flex flex-col gap-4"> {#if result.metrics} {@const mrow = result.metrics} |
