@mzzsfy/dsh-stock-assistant 0.8.1 → 0.9.0
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/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/client.js +86 -52
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## 未发布
|
|
4
4
|
|
|
5
|
+
### 顶部两条无效带子让位给行情列表
|
|
6
|
+
|
|
7
|
+
面板原先顶部占三行:标题带(「股票」+「自选行情 · 沪深A股、港股、美股」)、视图页签、分组节头(「自选 · 20」+「20 只 · 3 涨 17 跌 · 1m44s前更新」)。标题与副标题跟左侧入口、行内沪/深/港/美标记重复;只数字段跟分组页签上的「全部 · 20」重复。两块合计压掉约两行行情。
|
|
8
|
+
|
|
9
|
+
- **标题只留给读屏**:`h1` 仍在但不占视觉行,面板身份由左侧入口与顶部页签承担;副标题连同生成它的市场面映射一起删除
|
|
10
|
+
- **动作并入页签行**:刷新 / 悬浮盯盘 / 更多与自选 / 市场 / 搜索同一行,窄屏(≤479px)自动换行
|
|
11
|
+
- **概览并入分组页签行**:涨跌只数、持仓合计与更新时间成一串 11px 淡色小字贴在页签行右端,分组与排序下拉同占这一行;只数不再重复
|
|
12
|
+
- **更新时间降级**:原「1m44s前更新」原是节头里的正文色内容,现随概览小字走淡色;容器 ≤700px 时先隐藏这串小字,把位置让给分组页签
|
|
13
|
+
- **节头不再存在**:列表表头之上直接是页签行,`ssb-section-head` 只留给详情与设置
|
|
14
|
+
|
|
5
15
|
### 来源要求人机验证时给出可操作提示
|
|
6
16
|
|
|
7
17
|
东财触发风控时返回的是 HTML 验证页,原来一律报「来源响应不是JSON」,用户看不出该去浏览器过验证,只能看着「—」猜。
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -737,14 +737,6 @@ window.__ModuleLoader__.load({
|
|
|
737
737
|
const MARKET_LABEL = { XSHG: '沪', XSHE: '深', XHKG: '港', XNAS: '美', XNYS: '美', XJPX: '日', XKRX: '韩', XLON: '英' }
|
|
738
738
|
// 客户端 K线数据保鲜期, 与服务端 kline-cache 同量级: 分时是实时数据, 日K盘中会动, 周月K一天一换
|
|
739
739
|
const KLINE_MAX_AGE = { trend: 60 * 1000, '1d': 60 * 60 * 1000, '1w': 24 * 60 * 60 * 1000, '1M': 24 * 60 * 60 * 1000 }
|
|
740
|
-
// 副标题市场面: 沪深两所合并一档, 按固定优先级输出, 避免随添加顺序抖动
|
|
741
|
-
const MARKET_SCOPE = { XSHG: '沪深A股', XSHE: '沪深A股', XHKG: '港股', XNAS: '美股', XNYS: '美股', XJPX: '日股', XKRX: '韩股', XLON: '英股' }
|
|
742
|
-
const SCOPE_ORDER = ['沪深A股', '港股', '美股', '日股', '韩股', '英股']
|
|
743
|
-
const scopeText = ids => {
|
|
744
|
-
const present = new Set(ids.map(id => MARKET_SCOPE[id.split(':')[0]]).filter(Boolean))
|
|
745
|
-
const listed = SCOPE_ORDER.filter(scope => present.has(scope))
|
|
746
|
-
return `自选行情 · ${listed.length ? listed.join('、') : SCOPE_ORDER.join('、')}`
|
|
747
|
-
}
|
|
748
740
|
function Button({ children, onClick, primary, danger, className = '', ...props }) { return h('button', { type: 'button', className: `ssb-button${primary ? ' ssb-primary' : ''}${danger ? ' ssb-danger' : ''} ${className}`, onClick, ...props }, children) }
|
|
749
741
|
function Toggle({ label, checked, onChange, disabled = false }) {
|
|
750
742
|
return h('label', { className: 'ssb-switch' }, h('input', { type: 'checkbox', checked, disabled, onChange: e => onChange(e.target.checked) }), h('span', { className: 'ssb-switch__track' }, h('span', { className: 'ssb-switch__thumb' })), h('span', null, label))
|
|
@@ -860,11 +852,11 @@ window.__ModuleLoader__.load({
|
|
|
860
852
|
for (const id of order) merged.push(sequence.includes(id) ? visible[index++] : id)
|
|
861
853
|
return merged
|
|
862
854
|
}
|
|
855
|
+
const pinnedFirst = (items, a, b) => Number(!!items[b]?.pinned) - Number(!!items[a]?.pinned)
|
|
863
856
|
function Watchlist({ runtime, state }) {
|
|
864
857
|
const { data, view, busy } = state, control = data.control, w = control.watchlist
|
|
865
858
|
const sortedOrder = [...w.order].sort((a, b) => {
|
|
866
|
-
|
|
867
|
-
const pinned = Number(!!w.items[b].pinned) - Number(!!w.items[a].pinned)
|
|
859
|
+
const pinned = pinnedFirst(w.items, a, b)
|
|
868
860
|
if (pinned || view.sort === 'manual') return pinned
|
|
869
861
|
const qa = data.quotes[a]?.quote, qb = data.quotes[b]?.quote
|
|
870
862
|
const aa = qa?.changePct == null ? null : Number(qa.changePct), bb = qb?.changePct == null ? null : Number(qb.changePct)
|
|
@@ -892,7 +884,9 @@ window.__ModuleLoader__.load({
|
|
|
892
884
|
const stats = active.ids.reduce((acc, id) => { const pct = Number(data.quotes[id]?.quote?.changePct); if (Number.isNaN(pct)) return acc; acc.up += pct > 0; acc.down += pct < 0; const item = w.items[id], last = Number(data.quotes[id]?.quote?.last), costBase = costBaseOf(item.marks); if (costBase != null && last) { acc.held += 1; acc.pl += (last - costBase) / costBase * 100 } return acc }, { up: 0, down: 0, held: 0, pl: 0 })
|
|
893
885
|
// 持仓合计为等权均值(无仓位数量数据, 百分比求和会随只数放大; 均值是最不坏近似)
|
|
894
886
|
const heldText = stats.held ? ` · 持仓盈亏 ${signed(Number((stats.pl / stats.held).toFixed(1)))}%(等权)` : ''
|
|
895
|
-
|
|
887
|
+
// 只数已由分组 tab 自带, 概览只留涨跌与更新时间: 一行淡色小字挂在 tab 条右侧
|
|
888
|
+
const freshness = freshnessText(data.quotes)
|
|
889
|
+
const metaText = `${stats.up} 涨 ${stats.down} 跌${heldText}${freshness ? ` · ${freshness}` : ''}`
|
|
896
890
|
const isTagTab = active.key.startsWith(TAG_PREFIX)
|
|
897
891
|
// 重命名草稿绑定的是标签名: 切换 tab 后残留的草稿不再渲染
|
|
898
892
|
const renameDraft = isTagTab && view.tagRename?.from === active.label ? view.tagRename : null
|
|
@@ -902,6 +896,11 @@ window.__ModuleLoader__.load({
|
|
|
902
896
|
h(Button, { disabled: busy.write, onClick: () => runtime.updateView({ tagRename: { from: active.label, to: active.label, error: '' } }) }, '重命名'),
|
|
903
897
|
// 解散成功后激活键失效, 显式回到全部而不是让 resolveTab 静默兜底; 失败时保留原地由顶部横幅报错
|
|
904
898
|
h(Button, { disabled: busy.write, onClick: () => runtime.mutate('tagRemove', { tag: active.label }).then(() => runtime.updateView({ activeTab: ALL_TAB_KEY, tagRename: null })).catch(() => { }) }, '解散')) : null
|
|
899
|
+
const sortSelect = h(Select, { value: view.sort, label: '自选排序', options: [{ value: 'manual', label: '手动顺序' }, { value: 'desc', label: '涨幅优先' }, { value: 'asc', label: '跌幅优先' }], onChange: value => runtime.updateView({ sort: value }) })
|
|
900
|
+
// 列表条: 分组 tab 与概览/标签管理/排序共用一行, 节头取消后表头之上不再有空带
|
|
901
|
+
const listBar = w.order.length ? h('div', { className: 'ssb-listbar' },
|
|
902
|
+
tabBar,
|
|
903
|
+
h('div', { className: 'ssb-listbar-tools' }, h('span', { className: 'ssb-listbar-meta' }, metaText), tagTools, sortSelect)) : null
|
|
905
904
|
const renameForm = renameDraft ? h('form', { className: 'ssb-inline-form ssb-tag-rename', onSubmit: e => {
|
|
906
905
|
e.preventDefault()
|
|
907
906
|
const to = String(renameDraft.to || '').trim()
|
|
@@ -916,9 +915,8 @@ window.__ModuleLoader__.load({
|
|
|
916
915
|
renameDraft.error ? h('small', { className: 'ssb-form-error', role: 'alert' }, renameDraft.error) : null) : null
|
|
917
916
|
return h('section', { className: 'ssb-list-pane' },
|
|
918
917
|
sourcesBanner,
|
|
919
|
-
|
|
918
|
+
listBar,
|
|
920
919
|
renameForm,
|
|
921
|
-
tabBar,
|
|
922
920
|
!w.order.length ? h('div', { className: 'ssb-empty' }, h('p', null, '添加第一只自选,集中查看价格和来源。'), h(Button, { primary: true, onClick: () => runtime.updateView({ view: 'search' }) }, '添加自选')) :
|
|
923
921
|
h('div', { className: 'ssb-table-scroll', role: 'tabpanel', id: WATCHLIST_PANEL_ID, 'aria-label': active.label, onScroll: e => runtime.updateView({ scrollTop: e.currentTarget.scrollTop }), ref: node => { if (node && Math.abs(node.scrollTop - (view.scrollTop || 0)) > 1) node.scrollTop = view.scrollTop || 0 } },
|
|
924
922
|
// 表头: 让每列含义自解释; 窄容器整体隐藏(降级为行内键值对)
|
|
@@ -989,12 +987,13 @@ window.__ModuleLoader__.load({
|
|
|
989
987
|
q?.changePct == null ? h('span', { className: 'ssb-cell-pct ssb-muted' }, '—') : h('span', { className: `ssb-cell-pct ssb-pill${direction}` }, `${signed(q.changePct)}%`),
|
|
990
988
|
q?.change == null ? h('span', { className: 'ssb-cell-change ssb-muted' }, '—') : h('span', { className: `ssb-cell-change ssb-change${direction}` }, signed(q.change)),
|
|
991
989
|
h('span', { className: 'ssb-cell-open' }, priceTextOf(q?.open, item.priceScale)),
|
|
992
|
-
h('span', { className: 'ssb-cell-range' }, `${priceTextOf(q?.high, item.priceScale)}
|
|
990
|
+
h('span', { className: 'ssb-cell-range' }, `${priceTextOf(q?.high, item.priceScale)} / ${priceTextOf(q?.low, item.priceScale)}`),
|
|
993
991
|
h('span', { className: 'ssb-cell-amount' }, formatAmount(q?.amount)),
|
|
994
992
|
h('span', { className: 'ssb-cell-amplitude' }, amplitude == null ? '—' : `${amplitude}%`),
|
|
995
993
|
h('span', { className: `ssb-cell-pl${toneClass(pl?.pct)}` }, pl?.pct == null ? '—' : `${signed(pl.pct.toFixed(1))}%`),
|
|
996
994
|
h(QuoteStatus, { entry, short: true })),
|
|
997
995
|
h('div', { className: 'ssb-row-sub' },
|
|
996
|
+
h('span', { className: `ssb-kv ssb-kv-change${direction}` }, '涨跌额', q?.change == null ? '—' : signed(q.change)),
|
|
998
997
|
h('span', { className: 'ssb-kv' }, '开', priceTextOf(q?.open, item.priceScale)),
|
|
999
998
|
h('span', { className: 'ssb-kv' }, '高', priceTextOf(q?.high, item.priceScale)),
|
|
1000
999
|
h('span', { className: 'ssb-kv' }, '低', priceTextOf(q?.low, item.priceScale)),
|
|
@@ -1653,7 +1652,9 @@ window.__ModuleLoader__.load({
|
|
|
1653
1652
|
// 时段取最新的一份: 自己拉的和面板的都可能旧, 不能无条件让自己的压过面板的。
|
|
1654
1653
|
// 时间戳相同取自己那份——自己那份刚由这一拍的刷新拿到, 而面板可能在本次渲染前就已冻结
|
|
1655
1654
|
const stateOf = id => pickNewest(fetched?.[id]?.quote, quotes?.[id]?.quote)?.sessionState
|
|
1656
|
-
|
|
1655
|
+
// 轮询只关心选中了哪些标的,不因显示顺序变化而重启
|
|
1656
|
+
const requestIds = [...picked].sort()
|
|
1657
|
+
const pickedKey = requestIds.join(','), stateKey = requestIds.map(stateOf).join(',')
|
|
1657
1658
|
React.useEffect(() => {
|
|
1658
1659
|
if (!open || !picked.length || live === false) return
|
|
1659
1660
|
let dead = false
|
|
@@ -1867,7 +1868,7 @@ window.__ModuleLoader__.load({
|
|
|
1867
1868
|
h('button', { type: 'button', className: 'ssb-float-icon', 'aria-label': picker ? '完成选择' : '选择观测目标', 'aria-expanded': picker, onClick: () => onPicker(!picker) }, picker ? '✓' : '☰'),
|
|
1868
1869
|
h('button', { type: 'button', className: 'ssb-float-icon', 'aria-label': '关闭悬浮盯盘', onClick: () => onClose() }, '✕'))
|
|
1869
1870
|
}
|
|
1870
|
-
//
|
|
1871
|
+
// 选择器平铺全部标的,避免多标签重复列出同一只股票
|
|
1871
1872
|
function FloatPicker({ order, items, picked, onPicked }) {
|
|
1872
1873
|
const toggleMany = (ids, on) => { const set = new Set(picked); ids.forEach(id => on ? set.add(id) : set.delete(id)); onPicked([...set]) }
|
|
1873
1874
|
// 与 tagTabs 同口径: 只有确实存在的标的参与勾选, 否则渲染时读不到名字会整块浮窗消失
|
|
@@ -1878,6 +1879,7 @@ window.__ModuleLoader__.load({
|
|
|
1878
1879
|
h('div', { key: 'summary', className: 'ssb-picker-head' },
|
|
1879
1880
|
h('span', null, `已选 ${ids.filter(id => picked.includes(id)).length}/${ids.length}`),
|
|
1880
1881
|
h('button', { type: 'button', className: 'ssb-picker-all', onClick: () => toggleMany(ids, !allOn) }, allOn ? '全不选' : '全选')),
|
|
1882
|
+
h('p', { key: 'order-hint', className: 'ssb-picker-hint' }, '跟随自选页手动排序'),
|
|
1881
1883
|
...ids.map(id => h(Toggle, { key: id, label: items[id].alias || items[id].officialName, checked: picked.includes(id), onChange: () => toggleMany([id], !picked.includes(id)) })),
|
|
1882
1884
|
]
|
|
1883
1885
|
: [h('p', { key: 'empty', className: 'ssb-muted' }, '自选为空')]))
|
|
@@ -1939,17 +1941,25 @@ window.__ModuleLoader__.load({
|
|
|
1939
1941
|
const [error, setError] = React.useState('')
|
|
1940
1942
|
const [picker, setPicker] = React.useState(false)
|
|
1941
1943
|
const items = state.data?.control?.watchlist?.items || {}
|
|
1942
|
-
const order = state.data?.control?.watchlist?.order || []
|
|
1943
|
-
//
|
|
1944
|
-
const
|
|
1944
|
+
const order = (state.data?.control?.watchlist?.order || []).filter(id => items[id]).sort((a, b) => pinnedFirst(items, a, b))
|
|
1945
|
+
// 勾选只决定成员,显示顺序始终取自选手动顺序
|
|
1946
|
+
const pickedIds = new Set(Array.isArray(floating.ids) ? floating.ids : order.slice(0, 5))
|
|
1947
|
+
const picked = order.filter(id => pickedIds.has(id))
|
|
1945
1948
|
const mode = floating.mode === 'kline' ? 'kline' : 'list'
|
|
1946
1949
|
const open = !!floating.open
|
|
1947
|
-
const
|
|
1950
|
+
const [lastChartId, setLastChartId] = React.useState(null)
|
|
1951
|
+
const preferredId = picked.includes(floating.securityId) ? floating.securityId : null
|
|
1952
|
+
const chartFallbackId = mode === 'kline' && picked.includes(lastChartId) ? lastChartId : null
|
|
1953
|
+
const securityId = preferredId ?? chartFallbackId ?? picked[0] ?? null
|
|
1948
1954
|
const update = next => setFloating(next)
|
|
1955
|
+
// 快照短暂落后时只在本页选择替代项,不能覆盖其他标签页的选择
|
|
1956
|
+
React.useEffect(() => {
|
|
1957
|
+
setLastChartId(open && mode === 'kline' ? securityId : null)
|
|
1958
|
+
}, [open, mode, securityId])
|
|
1949
1959
|
const drag = useFloatingDrag(update)
|
|
1950
1960
|
// 悬浮窗节奏取自独立偏好, 列表间隔不再参与
|
|
1951
1961
|
const floatRefresh = floatIntervalOf(state.data?.control?.preferences?.floatRefreshSeconds)
|
|
1952
|
-
useFloatingPolling({ open, mode, securityId, picked, items, live: floating.live, floatSeconds: floatRefresh, quotes: state.data?.quotes, fetched, revision: state.data?.control?.revision, setFetched, setTrend, setError })
|
|
1962
|
+
useFloatingPolling({ open, mode, securityId: mode === 'kline' ? securityId : null, picked, items, live: floating.live, floatSeconds: floatRefresh, quotes: state.data?.quotes, fetched, revision: state.data?.control?.revision, setFetched, setTrend, setError })
|
|
1953
1963
|
// 面板已经刷过的报价先拿来渲染, 悬浮窗自己的 refresh 结果回来后再按 receivedAt 择优:
|
|
1954
1964
|
// 否则首次打开要干等一轮上游请求, 列表是空的
|
|
1955
1965
|
const entryOf = id => {
|
|
@@ -2365,7 +2375,8 @@ window.__ModuleLoader__.load({
|
|
|
2365
2375
|
.ssb-root { height:100%; min-width:0; overflow:auto; color:var(--ssb-text); background:var(--ssb-bg); font:inherit; font-size:13px; line-height:20px; }
|
|
2366
2376
|
.ssb-float-root { color:var(--ssb-text); font:inherit; font-size:13px; line-height:20px; }
|
|
2367
2377
|
.ssb-root *,.ssb-float-root * { box-sizing:border-box; }
|
|
2368
|
-
.ssb-page { max-width:
|
|
2378
|
+
.ssb-page { height:100%; max-width:1280px; margin:0 auto; display:flex; flex-direction:column; padding:24px; }
|
|
2379
|
+
.ssb-page > :not(.ssb-content) { flex-shrink:0; }
|
|
2369
2380
|
.ssb-root h1 { margin:0; font-size:20px; font-weight:500; line-height:28px; }.ssb-root h2 { margin:0; font-size:16px; font-weight:600; line-height:24px; }.ssb-root h3 { margin:24px 0 12px; font-size:14px; }
|
|
2370
2381
|
.ssb-tablist { display:flex; gap:24px; border-bottom:.5px solid var(--ssb-border); margin:0 0 16px; }
|
|
2371
2382
|
/* 自选分组 tab: 横向可滚动, 与设置页 tab 同一形态, 只在容器边距上去掉页面级间距 */
|
|
@@ -2375,7 +2386,18 @@ window.__ModuleLoader__.load({
|
|
|
2375
2386
|
.ssb-tag-chip { display:inline-flex; align-items:center; height:24px; padding:0 4px 0 8px; border-radius:999px; background:var(--ssb-accent-wash); color:var(--ssb-accent); font-size:11px; }
|
|
2376
2387
|
.ssb-tag-x { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; border:0; background:transparent; color:inherit; font:inherit; line-height:1; padding:0; cursor:pointer; }.ssb-tag-x:hover { color:var(--ssb-danger); }
|
|
2377
2388
|
.ssb-tag-pill { border:1px dashed var(--ssb-border); background:transparent; color:var(--ssb-text-sub); border-radius:999px; height:24px; padding:0 10px; font:inherit; font-size:11px; cursor:pointer; }.ssb-tag-pill:hover { border-color:var(--ssb-accent); color:var(--ssb-accent); }
|
|
2378
|
-
.ssb-tag-rename { padding:0 16px 8px; }.ssb-section-head .ssb-toolbar { margin:0; }.ssb-tab { font:inherit; font-size:13px; color:var(--ssb-text-sub); background:transparent; border:0; border-bottom:2px solid transparent; padding:10px 2px; cursor:pointer; }.ssb-tab-on { color:var(--ssb-text); border-bottom-color:var(--ssb-accent); font-weight:600; }.ssb-
|
|
2389
|
+
.ssb-tag-rename { padding:0 16px 8px; }.ssb-section-head .ssb-toolbar { margin:0; }.ssb-tab { font:inherit; font-size:13px; color:var(--ssb-text-sub); background:transparent; border:0; border-bottom:2px solid transparent; padding:10px 2px; cursor:pointer; }.ssb-tab-on { color:var(--ssb-text); border-bottom-color:var(--ssb-accent); font-weight:600; }.ssb-toolbar,.ssb-section-head,.ssb-row-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }.ssb-section-head { justify-content:space-between; padding:16px; }.ssb-root h2[tabindex="-1"]:focus { outline:none; }.ssb-toolbar { margin:12px 0; }
|
|
2390
|
+
/* 顶栏与列表条各占一行: 标题区与节头取消后, 视图切换+操作、分组+概览+排序各挤进一行 */
|
|
2391
|
+
.ssb-sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
|
|
2392
|
+
.ssb-topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 16px; border-bottom:.5px solid var(--ssb-border); }
|
|
2393
|
+
.ssb-topbar .ssb-tablist { flex:1 1 auto; min-width:0; overflow-x:auto; border-bottom:0; margin:0; }
|
|
2394
|
+
.ssb-topbar-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; flex-wrap:wrap; }
|
|
2395
|
+
.ssb-listbar { display:flex; align-items:center; gap:8px; padding:0 16px; border-bottom:.5px solid var(--ssb-border); }
|
|
2396
|
+
.ssb-listbar .ssb-tabs { flex:1 1 auto; min-width:0; border-bottom:0; padding:0; }
|
|
2397
|
+
.ssb-listbar .ssb-toolbar { margin:0; }
|
|
2398
|
+
.ssb-listbar-tools { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
|
|
2399
|
+
/* 概览只剩涨跌与更新时间: 11px 淡色小字挂在 tab 条右端, 不另占横幅 */
|
|
2400
|
+
.ssb-listbar-meta { font-size:11px; line-height:16px; color:var(--ssb-text-dim); white-space:nowrap; }
|
|
2379
2401
|
.ssb-button { color:var(--ssb-text); background:transparent; border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-sm); min-height:32px; padding:0 12px; font:inherit; font-size:13px; cursor:pointer; transition:background .15s; white-space:nowrap; }.ssb-button:hover { background:var(--dsw-alias-interactive-bg-hover); }.ssb-button.ssb-primary { background:var(--ssb-accent); color:var(--ssb-on-accent); border-color:var(--ssb-accent); }.ssb-button.ssb-primary:hover { background:var(--ssb-accent-deep); }.ssb-button.ssb-danger { color:var(--ssb-danger); }.ssb-root button:disabled { opacity:.5; cursor:not-allowed; }.ssb-root :focus-visible { outline:2px solid var(--dsw-alias-state-business-primary); outline-offset:2px; }
|
|
2380
2402
|
.ssb-root input:not([type=checkbox]) { background:var(--ssb-bg); color:var(--ssb-text); border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-sm); min-height:32px; padding:6px 8px; font:inherit; max-width:100%; }
|
|
2381
2403
|
.ssb-select { position:relative; display:inline-flex; min-width:0; max-width:100%; }
|
|
@@ -2390,9 +2412,9 @@ window.__ModuleLoader__.load({
|
|
|
2390
2412
|
.ssb-select-option-active { background:var(--ssb-hover); }
|
|
2391
2413
|
.ssb-select-option[aria-selected="true"] { color:var(--ssb-accent); }
|
|
2392
2414
|
.ssb-select-option[aria-selected="true"].ssb-select-option-active { background:var(--ssb-accent-wash); }.ssb-select-option-unavailable { color:var(--ssb-danger); cursor:default; }.ssb-select-value-invalid { color:var(--ssb-danger); }.ssb-field { display:flex; flex-direction:column; gap:6px; min-width:0; }.ssb-muted { color:var(--ssb-text-sub); }.ssb-code,.ssb-source { display:block; font-size:11px; }.ssb-code,.ssb-number { font-family:var(--ds-font-family-code); font-variant-numeric:tabular-nums; }.ssb-code { color:var(--ssb-text-sub); margin-top:4px; }.ssb-small { font-size:13px; margin-left:12px; }
|
|
2393
|
-
.ssb-content { display:
|
|
2415
|
+
.ssb-content { display:flex; flex:1 0 0; min-height:min-content; }
|
|
2394
2416
|
/* 浮层须压过宿主侧栏拖拽手柄; 取 60 与其它插件弹窗同档, 仍在宿主抽屉遮罩之下 */
|
|
2395
|
-
.ssb-overlay { position:fixed; inset:0; background:color-mix(in srgb, var(--dsw-alias-label-primary) 45%, transparent); display:flex; z-index:60; animation:ssb-fade .15s ease-out; }.ssb-drawer { animation:ssb-slide .2s ease-out; }.ssb-modal-card {}@keyframes ssb-fade { from { opacity:0; } }@keyframes ssb-slide { from { transform:translateX(40px); opacity:0; } }.ssb-overlay-drawer { justify-content:flex-end; }.ssb-overlay-modal { align-items:center; justify-content:center; padding:24px; }.ssb-drawer { width:min(80vw,94vw); height:100%; overflow:auto; background:var(--ssb-bg); border-left:1px solid var(--ssb-border); box-shadow:var(--dsw-shadow-lv3); padding:16px; }.ssb-modal-card { width:min(880px,94vw); max-height:88vh; overflow:auto; background:var(--ssb-bg); border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-lg); box-shadow:var(--dsw-shadow-lv3); padding:16px; }.ssb-drawer-head { display:flex; justify-content:flex-end; }.ssb-drawer .ssb-detail, .ssb-drawer .ssb-settings { border:0; padding:0; background:transparent; }.ssb-list-pane,.ssb-detail { border:.5px solid var(--ssb-border); border-radius:var(--ssb-radius-md); min-width:0; }.ssb-detail { padding:16px; background:var(--ssb-bg-sub); }.ssb-detail .ssb-section-head { padding:0; }.ssb-detail-price { font-size:28px; margin:20px 0 4px; }.ssb-table-scroll {
|
|
2417
|
+
.ssb-overlay { position:fixed; inset:0; background:color-mix(in srgb, var(--dsw-alias-label-primary) 45%, transparent); display:flex; z-index:60; animation:ssb-fade .15s ease-out; }.ssb-drawer { animation:ssb-slide .2s ease-out; }.ssb-modal-card {}@keyframes ssb-fade { from { opacity:0; } }@keyframes ssb-slide { from { transform:translateX(40px); opacity:0; } }.ssb-overlay-drawer { justify-content:flex-end; }.ssb-overlay-modal { align-items:center; justify-content:center; padding:24px; }.ssb-drawer { width:min(80vw,94vw); height:100%; overflow:auto; background:var(--ssb-bg); border-left:1px solid var(--ssb-border); box-shadow:var(--dsw-shadow-lv3); padding:16px; }.ssb-modal-card { width:min(880px,94vw); max-height:88vh; overflow:auto; background:var(--ssb-bg); border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-lg); box-shadow:var(--dsw-shadow-lv3); padding:16px; }.ssb-drawer-head { display:flex; justify-content:flex-end; }.ssb-drawer .ssb-detail, .ssb-drawer .ssb-settings { border:0; padding:0; background:transparent; }.ssb-list-pane,.ssb-detail { border:.5px solid var(--ssb-border); border-radius:var(--ssb-radius-md); min-width:0; }.ssb-detail { padding:16px; background:var(--ssb-bg-sub); }.ssb-detail .ssb-section-head { padding:0; }.ssb-detail-price { font-size:28px; margin:20px 0 4px; }.ssb-table-scroll { min-height:0; overflow:auto; border-radius:0 0 var(--ssb-radius-md) var(--ssb-radius-md); }.ssb-table { width:100%; border-collapse:collapse; table-layout:auto; }.ssb-table th { color:var(--ssb-text-sub); font-weight:400; font-size:12px; background:var(--ssb-bg-sub); position:sticky; top:0; z-index:1; }.ssb-table td,.ssb-table th { padding:8px 12px; text-align:left; border-top:.5px solid var(--ssb-border); }.ssb-table td.ssb-number { text-align:right; white-space:nowrap; }.ssb-table tr:hover { background:var(--dsw-alias-interactive-bg-hover); }.ssb-selected { background:var(--ssb-accent-wash); }.ssb-stock-name { font:inherit; color:inherit; background:transparent; border:0; padding:0; text-align:left; cursor:pointer; }.ssb-stale td.ssb-number { opacity:.65; }.ssb-up { color:var(--ssb-danger); }.ssb-down { color:var(--ssb-ok); }.ssb-green-up .ssb-up { color:var(--ssb-ok); }.ssb-green-up .ssb-down { color:var(--ssb-danger); }
|
|
2396
2418
|
/* 列表悬停浮层由宿主 Tooltip 挂在 portal 上, 拿不到插件根作用域的调色变量与色偏, 在这里补一份 */
|
|
2397
2419
|
.ssb-row-tip { --ssb-ok:var(--dsw-alias-state-success-primary); --ssb-danger:var(--dsw-alias-state-error-primary); }
|
|
2398
2420
|
/* 离线兜底提示: 图下方一行小字, 说清这条线是当日缓存与补了几个点, 不抢图的视线 */
|
|
@@ -2401,12 +2423,13 @@ window.__ModuleLoader__.load({
|
|
|
2401
2423
|
.ssb-table td { vertical-align:middle; padding-top:8px; padding-bottom:8px; }.ssb-table td:first-child { max-width:240px; }
|
|
2402
2424
|
.ssb-stock-name { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
|
|
2403
2425
|
/* 行情列表: 单行紧凑, 列宽定宽右对齐, 行高按 32px 量级标尺(见 design 规范) */
|
|
2404
|
-
.ssb-list-pane { container-type:inline-size; }
|
|
2405
|
-
|
|
2406
|
-
.ssb-list-pane > .ssb-
|
|
2426
|
+
.ssb-list-pane { container-type:inline-size; display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }
|
|
2427
|
+
/* 矮窗口优先让整页溢出,保留表头和至少一行行情的滚动空间 */
|
|
2428
|
+
.ssb-list-pane > .ssb-table-scroll { flex:1 0 calc(32px + 40px); contain:size; }
|
|
2429
|
+
.ssb-list-pane > :not(.ssb-table-scroll) { flex-shrink:0; }
|
|
2407
2430
|
.ssb-rows { display:flex; flex-direction:column; }
|
|
2408
2431
|
/* 表头与数据行共用同一套列模板, 保证逐列对齐; 数值列右对齐且等宽数字, 长内容不再挤占相邻列 */
|
|
2409
|
-
.ssb-row-head,.ssb-row-main { display:grid; grid-template-columns:12px minmax(140px,1fr)
|
|
2432
|
+
.ssb-row-head,.ssb-row-main { display:grid; grid-template-columns:12px minmax(140px,1fr) 76px 72px 72px 80px 132px 88px 56px 64px 16px; column-gap:12px; align-items:center; font-variant-numeric:tabular-nums; }
|
|
2410
2433
|
.ssb-row-head { height:32px; padding:0 12px; font-size:12px; color:var(--ssb-text-sub); border-bottom:1px solid var(--ssb-border); }
|
|
2411
2434
|
.ssb-row-head .ssb-cell-price,.ssb-row-head .ssb-cell-pct,.ssb-row-head .ssb-cell-change,.ssb-row-head .ssb-cell-range,.ssb-row-head .ssb-cell-amount,.ssb-row-head .ssb-cell-amplitude,.ssb-row-head .ssb-cell-pl { font-family:inherit; color:inherit; }
|
|
2412
2435
|
.ssb-row-main > .ssb-cell-price,.ssb-row-main > .ssb-cell-pct,.ssb-row-main > .ssb-cell-change,.ssb-row-main > .ssb-cell-open,.ssb-row-main > .ssb-cell-range,.ssb-row-main > .ssb-cell-amount,.ssb-row-main > .ssb-cell-amplitude,.ssb-row-main > .ssb-cell-pl,.ssb-row-head > span:nth-child(n+3) { justify-self:end; }
|
|
@@ -2435,14 +2458,23 @@ window.__ModuleLoader__.load({
|
|
|
2435
2458
|
|
|
2436
2459
|
|
|
2437
2460
|
|
|
2438
|
-
/*
|
|
2439
|
-
.ssb-row-sub { display:none; }
|
|
2440
|
-
@container (max-width:
|
|
2461
|
+
/* 宽度不足以保留完整列间距时,次要指标排到下一行 */
|
|
2462
|
+
.ssb-row-sub, .ssb-row-sub > .ssb-kv-change { display:none; }
|
|
2463
|
+
@container (max-width:976px) {
|
|
2441
2464
|
.ssb-row-head { display:none; }
|
|
2442
2465
|
.ssb-row { padding:6px 10px; }
|
|
2443
|
-
.ssb-row-main { grid-template-columns:12px minmax(
|
|
2466
|
+
.ssb-row-main { grid-template-columns:12px minmax(0,1fr) 68px 64px 56px 16px; column-gap:8px; height:auto; }
|
|
2444
2467
|
.ssb-cell-open,.ssb-cell-range,.ssb-cell-amount,.ssb-cell-amplitude,.ssb-cell-pl { display:none; }
|
|
2445
|
-
.ssb-row-sub { display:flex; gap:10px; margin-top:2px; padding-left:20px; font-size:12px; color:var(--ssb-text-dim); font-variant-numeric:tabular-nums; font-family:var(--ds-font-family-code); }
|
|
2468
|
+
.ssb-row-sub { display:flex; flex-wrap:wrap; gap:2px 10px; margin-top:2px; padding-left:20px; font-size:12px; color:var(--ssb-text-dim); font-variant-numeric:tabular-nums; font-family:var(--ds-font-family-code); }
|
|
2469
|
+
}
|
|
2470
|
+
@container (max-width:700px) {
|
|
2471
|
+
/* 窄容器先让出概览小字: 分组 tab 与排序比"几分钟前更新"更需要位置 */
|
|
2472
|
+
.ssb-listbar-meta { display:none; }
|
|
2473
|
+
}
|
|
2474
|
+
@container (max-width:380px) {
|
|
2475
|
+
.ssb-row-main { grid-template-columns:12px minmax(0,1fr) 68px 64px 16px; column-gap:4px; }
|
|
2476
|
+
.ssb-row-main > .ssb-cell-change { display:none; }
|
|
2477
|
+
.ssb-row-sub > .ssb-kv-change { display:inline-flex; }
|
|
2446
2478
|
}
|
|
2447
2479
|
.ssb-kv { display:inline-flex; gap:4px; white-space:nowrap; }
|
|
2448
2480
|
/* 悬浮盯盘: 固定右下角, 尺寸以 4px 刻度, 只做轻边框分层不挂阴影 */
|
|
@@ -2503,6 +2535,7 @@ window.__ModuleLoader__.load({
|
|
|
2503
2535
|
.ssb-picker-head { display:flex; align-items:center; gap:6px; padding:4px 2px 2px; font-size:11px; color:var(--ssb-text-dim); border-top:1px solid var(--ssb-border); }
|
|
2504
2536
|
.ssb-float-picker .ssb-picker-head:first-child { border-top:none; }
|
|
2505
2537
|
.ssb-picker-head > span { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
2538
|
+
.ssb-picker-hint { margin:0; padding:0 2px 4px; color:var(--ssb-text-sub); font-size:11px; line-height:16px; }
|
|
2506
2539
|
.ssb-picker-all { flex:0 0 auto; padding:1px 6px; font:inherit; font-size:11px; color:var(--ssb-accent); background:transparent; border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-sm); cursor:pointer; }
|
|
2507
2540
|
.ssb-picker-all:hover { border-color:var(--ssb-accent); }
|
|
2508
2541
|
.ssb-float-row { display:flex; align-items:baseline; column-gap:8px; padding:4px 6px; font:inherit; text-align:left; color:inherit; background:transparent; border:0; border-radius:var(--ssb-radius-sm); cursor:pointer; }
|
|
@@ -2567,8 +2600,8 @@ window.__ModuleLoader__.load({
|
|
|
2567
2600
|
.ssb-empty { padding:48px 16px; color:var(--ssb-text-sub); text-align:center; font-size:14px; }.ssb-banner { border:1px solid var(--ssb-border); border-left:3px solid var(--ssb-warn); border-radius:var(--ssb-radius-sm); padding:12px; margin:12px 0; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }.ssb-banner-ok { border-left-color:var(--ssb-ok); }.ssb-error { border-left-color:var(--ssb-danger); }.ssb-banner-floating { position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:80; width:min(720px,92vw); margin:0; background:var(--ssb-bg); box-shadow:var(--dsw-shadow-lv3); }.ssb-banner p { margin:0; }.ssb-search-view { max-width:760px; border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-md); background:var(--ssb-bg); padding-bottom:4px; }.ssb-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border-bottom:.5px solid var(--ssb-border); flex-wrap:wrap; }.ssb-panel-head h2 { font-size:16px; margin:0; }.ssb-panel-body { padding:16px; display:flex; flex-direction:column; gap:12px; }.ssb-form-row { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }.ssb-form-row > .ssb-field { flex:0 0 176px; }.ssb-search-label { display:grid; gap:8px; margin-top:20px; }.ssb-form-row > .ssb-search-label { flex:1 1 300px; margin-top:0; }.ssb-results { display:grid; gap:8px; margin:16px; }.ssb-candidate { padding:10px 12px; display:flex; justify-content:space-between; align-items:center; gap:12px; background:transparent; border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-sm); color:var(--ssb-text); font:inherit; cursor:pointer; }.ssb-candidate:hover { border-color:var(--ssb-accent); }.ssb-candidate.ssb-selected { background:var(--ssb-accent-wash); border-color:var(--ssb-accent); }.ssb-peek { display:flex; flex:1; flex-direction:column; gap:2px; text-align:left; cursor:pointer; min-width:0; }.ssb-peek:hover strong { text-decoration:underline; }.ssb-provider { border:1px solid var(--ssb-border); border-radius:var(--ssb-radius-md); padding:16px; margin:12px 0; min-width:0; }.ssb-provider legend { padding:0 6px; color:var(--ssb-text-sub); }.ssb-provider details { grid-column:1 / -1; }.ssb-provider summary { cursor:pointer; }.ssb-reqlog { margin:8px 0 0; padding:0 0 0 18px; color:var(--ssb-text-sub); }.ssb-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.ssb-route-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:12px; }.ssb-route-cell { display:grid; gap:6px; min-width:0; }.ssb-route-cell-label { color:var(--ssb-text-sub); font-size:11px; }.ssb-route-cell select { width:100%; min-width:0; }.ssb-route-advanced { margin-top:12px; }.ssb-route-advanced > summary { cursor:pointer; }.ssb-route-tune { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; padding:8px 0; border-top:1px solid var(--ssb-border); }.ssb-route-tune-label { min-width:32px; color:var(--ssb-text-sub); }.ssb-route-delay { flex:0 0 120px; }
|
|
2568
2601
|
.ssb-switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer; position:relative; }.ssb-switch input[type="checkbox"] { position:absolute; opacity:0; width:1px; height:1px; }.ssb-switch__track { display:inline-flex; flex-shrink:0; align-items:center; width:34px; height:19px; padding:3px; border-radius:999px; background:var(--ssb-bg-muted); border:1px solid var(--ssb-border); transition:background .15s ease; }.ssb-switch__thumb { width:13px; height:13px; border-radius:50%; background:var(--ssb-text-sub); transition:transform .15s ease; }.ssb-switch input[type="checkbox"]:checked + .ssb-switch__track { background:var(--ssb-accent); }.ssb-switch input[type="checkbox"]:checked + .ssb-switch__track .ssb-switch__thumb { transform:translateX(13px); background:var(--ssb-bg); }.ssb-switch input[type="checkbox"]:focus-visible + .ssb-switch__track { outline:2px solid var(--dsw-alias-state-business-primary); outline-offset:2px; }.ssb-switch input[type="checkbox"]:disabled + .ssb-switch__track { opacity:.5; cursor:not-allowed; }.ssb-switch:hover .ssb-switch__track { border-color:var(--ssb-accent); }
|
|
2569
2602
|
@media(max-width:720px) { .ssb-detail-grid { grid-template-columns:minmax(0,1fr); } }
|
|
2570
|
-
@media(max-width:959px) { .ssb-
|
|
2571
|
-
@media(max-width:479px) { .ssb-page { padding:12px; }.ssb-
|
|
2603
|
+
@media(max-width:959px) { .ssb-page { padding:16px; } }
|
|
2604
|
+
@media(max-width:479px) { .ssb-page { padding:12px; }.ssb-topbar { flex-wrap:wrap; gap:8px; }.ssb-table td,.ssb-table th { padding:8px; }.ssb-form-grid { grid-template-columns:minmax(0,1fr); }.ssb-detail-price { font-size:24px; }.ssb-button { min-height:36px; }.ssb-section-head { padding:12px; }.ssb-listbar { padding:0 12px; } }
|
|
2572
2605
|
@media(prefers-reduced-motion:reduce) { .ssb-root * { transition:none; } }
|
|
2573
2606
|
`
|
|
2574
2607
|
function StockPage({ runtime, layout }) {
|
|
@@ -2583,20 +2616,22 @@ window.__ModuleLoader__.load({
|
|
|
2583
2616
|
}, [view.view])
|
|
2584
2617
|
return h('div', { className: `ssb-root${data?.control?.preferences?.colorMode === 'green-up' ? ' ssb-green-up' : ''}`, ref: root },
|
|
2585
2618
|
React.createElement('style', { 'data-plugin': '@mzzsfy/dsh-stock-assistant', dangerouslySetInnerHTML: { __html: CSS } }),
|
|
2586
|
-
h('div', { className: 'ssb-page' },
|
|
2587
|
-
|
|
2588
|
-
h('div', { className: 'ssb-
|
|
2589
|
-
h(
|
|
2590
|
-
h(
|
|
2591
|
-
|
|
2592
|
-
h('
|
|
2593
|
-
h('
|
|
2594
|
-
|
|
2595
|
-
h(Button, { onClick: () =>
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2619
|
+
h('div', { className: 'ssb-page' },
|
|
2620
|
+
// 面板身份由侧栏入口与页签承担, 标题只留给读屏: 顶部不再有一条标题带把行情往下压
|
|
2621
|
+
h('div', { className: 'ssb-topbar' },
|
|
2622
|
+
h('h1', { className: 'ssb-sr-only' }, '股票'),
|
|
2623
|
+
h('nav', { className: 'ssb-tablist', 'aria-label': '股票视图' },
|
|
2624
|
+
h('button', { type: 'button', className: 'ssb-tab' + (view.view === 'list' ? ' ssb-tab-on' : ''), 'aria-current': view.view === 'list' ? 'page' : undefined, onClick: () => runtime.updateView({ view: 'list' }) }, '自选'),
|
|
2625
|
+
h('button', { type: 'button', className: 'ssb-tab' + (view.view === 'browse' ? ' ssb-tab-on' : ''), 'aria-current': view.view === 'browse' ? 'page' : undefined, onClick: () => { runtime.updateView({ view: 'browse' }); if (!runtime.getSnapshot().view.browseRows) quiet(() => runtime.loadBrowse('XSHG', 0))() } }, '市场'),
|
|
2626
|
+
h('button', { type: 'button', className: 'ssb-tab' + (view.view === 'search' ? ' ssb-tab-on' : ''), 'aria-current': view.view === 'search' ? 'page' : undefined, onClick: () => runtime.updateView({ view: 'search' }) }, '搜索')),
|
|
2627
|
+
h('div', { className: 'ssb-topbar-actions' },
|
|
2628
|
+
h(Button, { disabled: !data || state.busy.refresh, onClick: quiet(() => runtime.refresh()) }, state.busy.refresh ? '刷新中…' : '刷新'),
|
|
2629
|
+
h(Button, { primary: floating.open, 'aria-pressed': floating.open, onClick: () => setFloating({ open: !floating.open }) }, floating.open ? '收起盯盘' : '悬浮盯盘'),
|
|
2630
|
+
h('div', { className: 'ssb-more', style: { position: 'relative' } }, h(Button, { 'aria-label': '更多操作', 'aria-expanded': !!view.menuOpen, onClick: () => runtime.updateView({ menuOpen: !view.menuOpen }) }, '更多'), view.menuOpen ? h('div', { className: 'ssb-menu', style: { position: 'absolute', right: 0, top: 'calc(100% + 4px)', background: 'var(--ssb-bg)', border: '1px solid var(--ssb-border)', borderRadius: 'var(--ssb-radius-md)', padding: '8px', display: 'flex', flexDirection: 'column', gap: '4px', zIndex: 10, minWidth: '140px' }, role: 'menu' },
|
|
2631
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', padding: '4px 8px' } }, h(Toggle, { label: '暂停采集', checked: state.paused, onChange: runtime.setPaused })),
|
|
2632
|
+
h('div', { className: 'ssb-muted', style: { padding: '0 8px', fontSize: '11px' } }, `${(data?.control?.providers || []).filter(p => p.enabled).length}/${(data?.control?.providers || []).length} 源启用${state.data?.klineReady ? ` · K线 ${Object.keys(state.data.klineReady).length} 市场` : ''}`),
|
|
2633
|
+
h(Button, { onClick: () => { runtime.updateView({ view: 'list', overlay: 'settings', menuOpen: false }) } }, '设置'),
|
|
2634
|
+
h(Button, { onClick: () => { runtime.updateView({ menuOpen: false }); layout.selectPanel(null) } }, '返回对话')) : null))),
|
|
2600
2635
|
// 浮层(z-index 60)盖住页面后, 普通文档流里的错误横幅会被压在下面: 保存 409/500 用户完全看不到。
|
|
2601
2636
|
// 浮层打开时把横幅提到浮层之上固定在顶部, 关掉浮层恢复文档流布局。
|
|
2602
2637
|
state.error ? h('div', { className: `ssb-banner ssb-error${view.overlay ? ' ssb-banner-floating' : ''}`, role: 'alert' }, state.error, h(Button, { onClick: () => runtime.updateView({ view: 'list', overlay: 'settings' }) }, '检查设置'), h(Button, { onClick: () => runtime.clearError() }, '关闭')) : null,
|
|
@@ -2609,8 +2644,7 @@ window.__ModuleLoader__.load({
|
|
|
2609
2644
|
state.paused ? h('div', { className: 'ssb-banner', role: 'status' }, '自动采集已暂停,保留当前行情。', h(Button, { onClick: () => runtime.setPaused(false) }, '恢复采集')) : null,
|
|
2610
2645
|
state.undo && state.undo.until > Date.now() ? h('div', { className: 'ssb-banner', role: 'status' }, '已移除自选。', h(Button, { disabled: state.busy.write, onClick: quiet(() => runtime.mutate('restore', { removeOperationId: state.undo.removeOperationId })) }, '撤销')) : null,
|
|
2611
2646
|
!data ? h('div', { className: 'ssb-empty', role: 'status' }, '正在加载股票工具…') : view.view === 'search' ? h(SearchView, { runtime, state }) : view.view === 'browse' ? h(BrowseView, { runtime, state }) : h('div', { className: 'ssb-content' }, h(Watchlist, { runtime, state })),
|
|
2612
|
-
data && view.overlay ? h(Overlay, { runtime, state, layout }) : null
|
|
2613
|
-
h('p', { className: 'ssb-foot ssb-muted' }, '价格与涨跌来自同一数据源。延迟未知表示来源未明确承诺时效。')))
|
|
2647
|
+
data && view.overlay ? h(Overlay, { runtime, state, layout }) : null))
|
|
2614
2648
|
}
|
|
2615
2649
|
return {
|
|
2616
2650
|
inject: ['slots', 'locale', 'layout'],
|