四个合约页面统一添加表头
This commit is contained in:
+13
-2
@@ -37,7 +37,10 @@
|
||||
.toggle-btn:hover { opacity: 0.8; }
|
||||
|
||||
.section { margin-bottom: 8px; }
|
||||
.section h2 { font-size: 1.1rem; margin: 28px 0 10px; padding: 4px 0; }
|
||||
.section h2 { font-size: 1.1rem; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; margin: 28px 0 10px; padding: 4px 0; }
|
||||
.section h2 .arrow { display: inline-block; transition: transform .2s; font-size: 0.8rem; }
|
||||
.section.collapsed h2 .arrow { transform: rotate(-90deg); }
|
||||
.section.collapsed table { display: none; }
|
||||
|
||||
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 99; display: none; }
|
||||
.drawer-overlay.show { display: block; }
|
||||
@@ -64,6 +67,8 @@
|
||||
<p class="sub"><a href="index.html">返回总览</a> | <a href="fg2609.html">FG2609</a> | <span>FG2610</span> | <a href="fg2611.html">FG2611</a> | <a href="fg2701.html">FG2701</a></p>
|
||||
<p class="formula">振幅算法:近 5 日均振幅 = 过去 5 个交易日 (最高 − 最低) 的均值,结果四舍五入取整</p>
|
||||
|
||||
<div class="section" id="sec-fg2610">
|
||||
<h2 onclick="toggleSection('sec-fg2610')"><span class="arrow">▼</span> FG2610 玻璃</h2>
|
||||
<table>
|
||||
<tr><th>日期</th><th>星期</th><th>开盘</th><th>收盘</th><th>最高</th><th>最低</th><th>最高最低差价</th><th>振幅</th></tr>
|
||||
<tr><td>2026/7/1</td><td>周三</td><td>1015</td><td>1007</td><td>1015</td><td>1000</td><td>15</td><td class="na">-</td></tr>
|
||||
@@ -86,6 +91,7 @@
|
||||
<tr><td>2026/7/24</td><td>周五</td><td>938</td><td>944</td><td>947</td><td>928</td><td>19</td><td class="amp-cell">21</td></tr>
|
||||
<tr><td>2026/7/27</td><td>周一</td><td class="na">-</td><td class="na">-</td><td class="na">-</td><td class="na">-</td><td>0</td><td class="amp-cell">18</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="drawer-overlay" id="overlay" onclick="closeDrawer()"></div>
|
||||
<div class="drawer" id="drawer">
|
||||
@@ -119,6 +125,10 @@ function toggleTheme() {
|
||||
} catch(e) {}
|
||||
})();
|
||||
|
||||
function toggleSection(id) {
|
||||
document.getElementById(id).classList.toggle('collapsed');
|
||||
}
|
||||
|
||||
var activeRow = null;
|
||||
function closeDrawer() {
|
||||
document.getElementById('overlay').classList.remove('show');
|
||||
@@ -131,7 +141,8 @@ document.querySelectorAll('.amp-cell').forEach(function(cell) {
|
||||
var row = cell.parentElement;
|
||||
var tbl = row.closest('table');
|
||||
var rows = tbl.querySelectorAll('tr');
|
||||
var product = 'FG2610 玻璃';
|
||||
var h2 = tbl.closest('.section').querySelector('h2');
|
||||
var product = h2.childNodes[h2.childNodes.length - 1].textContent.trim();
|
||||
|
||||
var ranges = [];
|
||||
for (var i = 1; i < rows.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user