feat(策略持仓): 持仓行展开关联交易 + 成本价/最后成交价 + 隐藏输入框(迭代 08,R-010)

- strategy-positions 附加 holding_id + avgPrice/lastTradePrice(无关联默认成本价)
- trades/by-holding 端点(按 holding 查委托汇总)
- StrategyTab 持仓行展开(懒加载 + 内嵌汇总表,含交易日/时间列)
- 神之一手 tab 激活时隐藏 AI 对话输入框(纯 CSS :has() 方案)
This commit is contained in:
2026-09-02 01:20:58 +08:00
parent b3526c7693
commit 2790b92378
4 changed files with 229 additions and 49 deletions
+13
View File
@@ -75,6 +75,19 @@ export function apply(ctx) {
ctx.logger?.warn?.('[one-divine-lot] connection 服务不可用');
}
// 神之一手 tab 激活时隐藏会话输入框(composer)
// 借鉴 dsh-context 的纯 CSS 方案::has(.odl-root) 命中 → 隐藏 [data-composer-seat]
// 我们的 tab 根元素带 odl-root classchat/其他 tab 无此 class → 输入框正常显示
const ODL_HIDE_COMPOSER_CSS = `
[data-conversation-scroll]:has(.odl-root)>[data-composer-seat]{display:none}
`;
if (typeof document !== 'undefined' && !document.querySelector('style[data-plugin-css="one-divine-lot/hide-composer"]')) {
const tag = document.createElement('style');
tag.dataset.pluginCss = 'one-divine-lot/hide-composer';
tag.textContent = ODL_HIDE_COMPOSER_CSS;
document.head.appendChild(tag);
}
const withConnection = (render) => (props) =>
createElement(ConnectionProvider, { connection },
createElement(MarketDataProvider, null, render(props)));