修复heropanel无法下拉背景页面
This commit is contained in:
23
app.py
23
app.py
@@ -10788,12 +10788,23 @@ def get_calendar_combined_data():
|
||||
try:
|
||||
with open(daily_file, 'r', encoding='utf-8') as f:
|
||||
daily_data = json.load(f)
|
||||
# 优先使用词云图最高频词
|
||||
word_freq = daily_data.get('word_freq_data', [])
|
||||
if word_freq:
|
||||
data_map[date_str]['top_sector'] = word_freq[0].get('name', '')
|
||||
elif daily_data.get('sector_data'):
|
||||
# 找出涨停数最多的板块
|
||||
# 优先统计 core_sectors 出现次数最多的板块
|
||||
stocks_data = daily_data.get('stocks') or daily_data.get('stock_infos') or []
|
||||
if stocks_data:
|
||||
from collections import Counter
|
||||
sector_counter = Counter()
|
||||
for stock in stocks_data:
|
||||
core_sectors = stock.get('core_sectors', [])
|
||||
for sector in core_sectors:
|
||||
if sector:
|
||||
sector_counter[sector] += 1
|
||||
if sector_counter:
|
||||
# 找出出现次数最多的板块
|
||||
top_sector = sector_counter.most_common(1)[0][0]
|
||||
data_map[date_str]['top_sector'] = top_sector
|
||||
continue
|
||||
# 备选:使用 sector_data 中涨停数最多的板块
|
||||
if daily_data.get('sector_data'):
|
||||
max_sector = ''
|
||||
max_count = 0
|
||||
for sector, info in daily_data['sector_data'].items():
|
||||
|
||||
@@ -488,13 +488,18 @@ export const FullCalendarPro: React.FC<FullCalendarProProps> = ({
|
||||
bg: 'rgba(212, 175, 55, 0.15) !important',
|
||||
animation: `${glow} 2s ease-in-out infinite`,
|
||||
},
|
||||
// 单元格框架 - 保证足够高度且支持层级布局
|
||||
'.fc-daygrid-day-frame': {
|
||||
minHeight: '110px',
|
||||
position: 'relative',
|
||||
},
|
||||
// 日期内容区域 - 在最上层,确保不被事件条遮挡
|
||||
'.fc-daygrid-day-top': {
|
||||
width: '100%',
|
||||
padding: '0 !important',
|
||||
flexDirection: 'column',
|
||||
position: 'relative',
|
||||
zIndex: 3,
|
||||
},
|
||||
// 隐藏 FullCalendar 默认的日期数字链接
|
||||
'.fc-daygrid-day-top a.fc-daygrid-day-number': {
|
||||
@@ -508,21 +513,27 @@ export const FullCalendarPro: React.FC<FullCalendarProProps> = ({
|
||||
'.fc-custom-cell-content': {
|
||||
width: '100%',
|
||||
},
|
||||
// 日期内容区域
|
||||
// 事件区域 - 在日期内容下方
|
||||
'.fc-daygrid-day-events': {
|
||||
marginTop: '0 !important',
|
||||
position: 'relative',
|
||||
zIndex: 2,
|
||||
},
|
||||
// 事件
|
||||
// 事件条样式
|
||||
'.fc-daygrid-event': {
|
||||
borderRadius: '8px',
|
||||
border: 'none !important',
|
||||
margin: '3px 4px !important',
|
||||
margin: '2px 4px !important',
|
||||
},
|
||||
'.fc-event-main': {
|
||||
padding: '0 !important',
|
||||
},
|
||||
'.fc-daygrid-event-harness': {
|
||||
marginTop: '3px',
|
||||
marginTop: '4px !important',
|
||||
},
|
||||
// 跨周事件底部容器
|
||||
'.fc-daygrid-day-bottom': {
|
||||
marginTop: '0 !important',
|
||||
},
|
||||
// 更多事件链接
|
||||
'.fc-daygrid-more-link': {
|
||||
|
||||
Reference in New Issue
Block a user