fix: stocks 字段支持对象格式 {code, name}
- investment.ts: stocks 类型改为 Array<{code, name} | string>
- EventFormModal: 编辑时兼容对象格式,保存时附带股票名称
This commit is contained in:
@@ -46,8 +46,8 @@ export interface InvestmentEvent {
|
||||
/** 重要度 (1-5) */
|
||||
importance?: number;
|
||||
|
||||
/** 相关股票代码列表 */
|
||||
stocks?: string[];
|
||||
/** 相关股票列表 */
|
||||
stocks?: Array<{ code: string; name: string } | string>;
|
||||
|
||||
/** 标签列表 */
|
||||
tags?: string[];
|
||||
@@ -85,8 +85,8 @@ export interface PlanFormData {
|
||||
/** 事件类型 */
|
||||
type: EventType;
|
||||
|
||||
/** 相关股票代码列表 */
|
||||
stocks: string[];
|
||||
/** 相关股票列表 */
|
||||
stocks: Array<{ code: string; name: string } | string>;
|
||||
|
||||
/** 标签列表 */
|
||||
tags: string[];
|
||||
|
||||
Reference in New Issue
Block a user