dsh-xueqiu 1.22.3 → 1.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -0
- package/README.md +2 -0
- package/dynamic/client.js +4 -2
- package/package.json +1 -1
- package/src/client/index.js +4 -2
package/README.en.md
CHANGED
|
@@ -135,6 +135,7 @@ The data layer is defended in depth — safe to leave open for hours:
|
|
|
135
135
|
|
|
136
136
|
## Changelog
|
|
137
137
|
|
|
138
|
+
- **1.22.4** (2026-08-26) — **Fix: switching to the minute tab crashed the whole panel** (1.22.3 regression). The double-click-to-latest cleanup used `boxRef.current.removeEventListener`, but React clears refs before running effect cleanup on unmount, so `boxRef.current` was null → TypeError → the `conversation.input.dock` slot crashed entirely, leaving only the mini badge with no way back in. Now the node is captured in a closure inside the effect. Regression-tested: K-line↔minute 4 toggle rounds + collapse/badge-reopen/re-enter detail, 0 errors.
|
|
138
139
|
- **1.22.3** (2026-08-26) — **Fix: K-line OHLC legend permanently drawn over the candles**. KLineChart v10 defaults `candle.tooltip.showRule` to `'always'`, painting time/OHLC/volume in the candle pane's top-left corner at all times (pixel-scan measured 1394 text pixels covering candles from y=23). Changed to `'follow_cross'` (shown on crosshair hover, like Xueqiu) — the indicator tooltip had been disabled but the candle's own legend was missed. Also: the chart footer promised "double-click to return to latest" but no dblclick handler existed (verified: after left-drag loaded 999 bars, double-click did nothing) — now wired to `chart.scrollToRealTime()` (verified: visible range 132→430-500). Minor: K-line date label now includes the year (a 500-bar daily range showed "08-26 ~ 08-24", reading like time travel across two years); the detail-page hero price/change now follows the quote's actual decimal digits (HK 00700 previously 440.40 → 440.4).
|
|
139
140
|
- **1.22.2** (2026-08-24) — **Fix: MA / avg-price lines landed in sub-panes instead of overlaying the main chart**. KLineChart v10's `createIndicator('MA')` opens a new pane by default — MAs were not on the candle pane (squeezed to 72px) and the minute chart's avg/prev-close lived in their own sub-pane. The fix passes `{ name, paneId: 'candle_pane' }` to explicitly overlay the main pane (pane id confirmed from engine source). Result: candlestick pane at 173px with MA5/10/30/60 overlaid (volume remains the only sub-pane); minute chart is a single pane with price + avg + prev-close overlaid, matching Xueqiu's layout. Also a Xueqiu-inspired detail-page restyle: hero quote header (large red/green price + change + pct), lighter 16-stat grid (tinted cards, tabular numerals), accent bar on card titles, theme-tinted active states for mode/period buttons, chart height 264→300px, harmonized 4-color MA palette, and high/low duplicate price marks disabled.
|
|
140
141
|
- **1.22.1** (2026-08-24) — chore: drop peerDependencies to silence install warnings; static smoke script falls back to local `npx dsh` (dsh not on PATH under prepublishOnly).
|
package/README.md
CHANGED
|
@@ -190,6 +190,8 @@ dsh-xueqiu/
|
|
|
190
190
|
|
|
191
191
|
## 📋 更新日志
|
|
192
192
|
|
|
193
|
+
- **1.22.4**(2026-08-26)
|
|
194
|
+
- 修复:**切分时整个面板崩溃消失**(1.22.3 回归)。双击回最新的清理函数里用了 `boxRef.current.removeEventListener`,但 React 卸载组件时先清 ref 再跑 effect 清理,此时 `boxRef.current` 已是 null → 抛 TypeError → `conversation.input.dock` 槽位整体崩溃,只剩自选股小徽章且无法重开。改为 effect 内闭包捕获节点。回归:K线↔分时来回 4 轮 + 收起/徽章重开/再进详情,0 报错。
|
|
193
195
|
- **1.22.3**(2026-08-26)
|
|
194
196
|
- 修复:**K线 OHLC 图例常驻压蜡烛**。KLineChart v10 默认 `candle.tooltip.showRule: 'always'` 把 time/open/high/low/close/volume 永久画在蜡烛区左上角(像素级实测 1394 个文字像素自 y=23 起覆盖蜡烛)。改为 `follow_cross`(十字光标悬停才显示,与雪球一致),此前只关了指标 tooltip 漏了蜡烛自身的。
|
|
195
197
|
- 修复:**"双击回最新"标签承诺无实现**。图表下方文案写了"双击回最新"但代码没有 dblclick 处理(实测左拖加载 999 根后双击无反应)。现监听容器 dblclick → `chart.scrollToRealTime()`(实测可视区 132→430-500 回到最新)。
|
package/dynamic/client.js
CHANGED
|
@@ -479,10 +479,12 @@ return {
|
|
|
479
479
|
chart.createIndicator('VOL')
|
|
480
480
|
chart.setOffsetRightDistance(16)
|
|
481
481
|
// 双击回最新(标签文案承诺过;kline v10 自带 dblclick 仅做空十字,需手动 scrollToRealTime)
|
|
482
|
+
const box = boxRef.current
|
|
482
483
|
const onDbl = function () { try { chart.scrollToRealTime() } catch (e) { /* 忽略 */ } }
|
|
483
|
-
|
|
484
|
+
box.addEventListener('dblclick', onDbl)
|
|
484
485
|
return function () {
|
|
485
|
-
boxRef.current
|
|
486
|
+
// 卸载清理时 boxRef.current 已被 React 置 null(切 tab 触发,曾致槽位整体崩溃),须闭包捕获节点
|
|
487
|
+
try { box.removeEventListener('dblclick', onDbl) } catch (e) { /* 忽略 */ }
|
|
486
488
|
h.dispose()
|
|
487
489
|
}
|
|
488
490
|
}, [])
|
package/package.json
CHANGED
package/src/client/index.js
CHANGED
|
@@ -510,10 +510,12 @@ exports.default = {
|
|
|
510
510
|
chart.createIndicator('VOL')
|
|
511
511
|
chart.setOffsetRightDistance(16)
|
|
512
512
|
// 双击回最新(标签文案承诺过;kline v10 自带 dblclick 仅做空十字,需手动 scrollToRealTime)
|
|
513
|
+
const box = boxRef.current
|
|
513
514
|
const onDbl = function () { try { chart.scrollToRealTime() } catch (e) { /* 忽略 */ } }
|
|
514
|
-
|
|
515
|
+
box.addEventListener('dblclick', onDbl)
|
|
515
516
|
return function () {
|
|
516
|
-
boxRef.current
|
|
517
|
+
// 卸载清理时 boxRef.current 已被 React 置 null(切 tab 触发,曾致槽位整体崩溃),须闭包捕获节点
|
|
518
|
+
try { box.removeEventListener('dblclick', onDbl) } catch (e) { /* 忽略 */ }
|
|
517
519
|
h.dispose()
|
|
518
520
|
}
|
|
519
521
|
}, [])
|