From 5c0ba37eda80d39e6ceca59bb1d5f4942f858995 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Thu, 17 Sep 2026 14:32:37 +0800 Subject: chore: establish Strategy Lab source baseline (development, not release) --- frontend/src/components/DatasetWizard.svelte | 374 +++++++++++++++++++++++++++ 1 file changed, 374 insertions(+) create mode 100644 frontend/src/components/DatasetWizard.svelte (limited to 'frontend/src/components/DatasetWizard.svelte') diff --git a/frontend/src/components/DatasetWizard.svelte b/frontend/src/components/DatasetWizard.svelte new file mode 100644 index 0000000..1e61d92 --- /dev/null +++ b/frontend/src/components/DatasetWizard.svelte @@ -0,0 +1,374 @@ + + +
+

新建数据集

+ + + + {#if caps} +
+

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

+
+ { + if (ev.key === 'Enter') doSearch(); + }} + aria-label="标的搜索" + /> + +
+ + {#if searchErr && !searchBusy} + + {/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)} + +
+ {/if} + +
+ 手动录入标的(目录未收录时) +
+

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

+
+ + + + +
+
+ +
+
+
+
+ +
+

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} + {assetTypeLabel[s.asset_type] ?? s.asset_type} + +
  • + {/each} +
+ {/if} +
+ +
+ + + +
+ +
+ + +
+ +
+ 附加原始字段(可选) +

OHLCV 必需字段由引擎要求固定获取;附加字段保持原始口径,未请求的字段不会返回。

+
    + {#each rawFieldChoices as f (f.code)} +
  • + +
  • + {/each} +
+ {#if caps.fields.some((f) => !f.raw)} +

必需字段:{caps.fields.filter((f) => !f.raw).map((f) => f.label).join(' / ')}

+ {/if} +
+ + {#if formErr.length > 0} + + {/if} + {#if submitErr} + + {/if} +

数据请求会进入队列异步获取。配置仅保存你填写的请求,不预填演示数据。

+
+ +
+ {/if} + + +
+ + -- cgit v1.2.3