From a7aab01f051487327e5ce52b6a8905208c546e8c Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 15:49:44 +0800 Subject: [变更性质] feat(frontend) [新增功能] 12 页面组件全量 shadcn:Card/Button/Table/Tabs/Select/Alert;375 底部 Tab Bar 改用 Tabs 组件实现 [实现方案] 页面级手写 class 全部移除(.btn/.banner/table.data/.badge/.tabs/.metric-row/.m-tile/.hint 等改为 shadcn + tailwind 工具类);Modal/DatasetWizard/DatasetCard/DiffView/CodeEditor/Status/Layout 同步 [影响范围] src/pages/*.svelte、src/components/*.svelte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DatasetWizard.svelte | 223 +++++++++++++-------------- 1 file changed, 110 insertions(+), 113 deletions(-) (limited to 'frontend/src/components/DatasetWizard.svelte') diff --git a/frontend/src/components/DatasetWizard.svelte b/frontend/src/components/DatasetWizard.svelte index d9e923a..e6ec105 100644 --- a/frontend/src/components/DatasetWizard.svelte +++ b/frontend/src/components/DatasetWizard.svelte @@ -3,6 +3,11 @@ import { Button } from '$lib/components/ui/button'; import { Badge } from '$lib/components/ui/badge'; import { Alert } from '$lib/components/ui/alert'; + import { Input } from '$lib/components/ui/input'; + import { Label } from '$lib/components/ui/label'; + import * as Card from '$lib/components/ui/card'; + import * as Select from '$lib/components/ui/select'; + import * as Table from '$lib/components/ui/table'; import { getCapabilities, searchInstruments, createDataset } from '../lib/client'; import { extractStatusMessage } from '../lib/state'; import { adjustmentLabel, assetTypeLabel, itemSourceLabel } from '../lib/format'; @@ -180,17 +185,16 @@ } -
+

新建数据集

{#if caps} -
-

1) 选择标的 最多 {maxSymbols} 个 · 日频 POC

-
- +

1) 选择标的 最多 {maxSymbols} 个 · 日频 POC

+
+ doSearch()}>重试 {/if} {#if searchItems.length > 0} - - - - - - {#each searchItems as inst (inst.market + '.' + inst.symbol + inst.asset_type + '.' + (inst.source ?? 'unknown'))} - - - - - - - - {/each} - -
代码类型名称来源
{inst.market}.{inst.symbol}{assetTypeLabel[inst.asset_type] ?? inst.asset_type}{inst.name ?? '—'}{itemSourceLabel(inst.source, searchSource)} - -
+
+ + + 代码类型名称来源 + + + {#each searchItems as inst (inst.market + '.' + inst.symbol + inst.asset_type + '.' + (inst.source ?? 'unknown'))} + + {inst.market}.{inst.symbol} + {assetTypeLabel[inst.asset_type] ?? inst.asset_type} + {inst.name ?? '—'} + {itemSourceLabel(inst.source, searchSource)} + + + + + {/each} + + +
{/if}
手动录入标的(目录未收录时) -
-

仅接受确切标识,不会推断市场或类型。请与供应商页面核对后再录入。

-
- - - - + +

仅接受确切标识,不会推断市场或类型。请与供应商页面核对后再录入。

+
+
+ + +
+
+ + (market = v)}> + {market} + + {#each ['SH', 'SZ', 'BJ'] as m (m)} + {m} + {/each} + + +
+
+ + (assetType = v)}> + {assetTypeLabel[assetType] ?? assetType} + + {#each caps.asset_types as t (t)} + {assetTypeLabel[t] ?? t} + {/each} + + +
+
+ + +
-
- +
+
-
+
-

2) 已选标的 {selected.length}/{maxSymbols}

+

2) 已选标的 {selected.length}/{maxSymbols}

{#if selected.length === 0} -

尚未选择标的。指数仅可作研究中枢,不可直接交易。

+

尚未选择标的。指数仅可作研究中枢,不可直接交易。

{:else} -
    +
      {#each selected as s, i (s.market + '.' + s.symbol + s.asset_type)} -
    • - {s.market}.{s.symbol} - {#if s.name}{s.name}{/if} +
    • + {s.market}.{s.symbol} + {#if s.name}{s.name}{/if} {assetTypeLabel[s.asset_type] ?? s.asset_type}
    • @@ -285,67 +297,72 @@ {/if}
-
- - -