fix(frontend): 为 table 添加 thead/tbody 消除 Vite 构建警告
HTML 规范要求 <tr> 必须是 <thead>/<tbody>/<tfoot> 的直接子元素, 不能直接作为 <table> 的子节点。Vite/Vue 会报告 warning 并可能导致 hydration 错误。 修复以下文件中的表格结构: - StatusBoard.vue: 2 个表格添加 <thead> + <tbody> - Index.vue: 1 个表格添加 <tbody> - Monitor.vue: 2 个表格添加 <tbody> - TaskCenter.vue: 1 个表格添加 <tbody>
This commit is contained in:
@@ -44,35 +44,39 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table>
|
||||
<tr><th>机房</th><th>总数</th><th>在线</th><th>健康率</th><th>状态</th></tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">YZH 机房</td>
|
||||
<td class="mono">78</td>
|
||||
<td class="mono">78</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 98%"></span></span>98%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">XS 机房</td>
|
||||
<td class="mono">64</td>
|
||||
<td class="mono">63</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill warn" style="width: 91%"></span></span>91%</td>
|
||||
<td class="status-text warn">● 1 条告警</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">JF 机房</td>
|
||||
<td class="mono">22</td>
|
||||
<td class="mono">22</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 100%"></span></span>100%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">海外 IDC(4)</td>
|
||||
<td class="mono">22</td>
|
||||
<td class="mono">21</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill err" style="width: 86%"></span></span>86%</td>
|
||||
<td class="status-text err">● 1 条严重</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr><th>机房</th><th>总数</th><th>在线</th><th>健康率</th><th>状态</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">YZH 机房</td>
|
||||
<td class="mono">78</td>
|
||||
<td class="mono">78</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 98%"></span></span>98%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">XS 机房</td>
|
||||
<td class="mono">64</td>
|
||||
<td class="mono">63</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill warn" style="width: 91%"></span></span>91%</td>
|
||||
<td class="status-text warn">● 1 条告警</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">JF 机房</td>
|
||||
<td class="mono">22</td>
|
||||
<td class="mono">22</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 100%"></span></span>100%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">海外 IDC(4)</td>
|
||||
<td class="mono">22</td>
|
||||
<td class="mono">21</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill err" style="width: 86%"></span></span>86%</td>
|
||||
<td class="status-text err">● 1 条严重</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,31 +88,35 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table>
|
||||
<tr><th>业务线</th><th>虚机数</th><th>CPU 均值</th><th>状态</th></tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">Kodo</td>
|
||||
<td class="mono">218</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 64%"></span></span>64%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">LAS</td>
|
||||
<td class="mono">164</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill warn" style="width: 82%"></span></span>82%</td>
|
||||
<td class="status-text warn">● 1 条告警</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">灵矽</td>
|
||||
<td class="mono">96</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 57%"></span></span>57%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">共享池 / 未分配</td>
|
||||
<td class="mono">34</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 31%"></span></span>31%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr><th>业务线</th><th>虚机数</th><th>CPU 均值</th><th>状态</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">Kodo</td>
|
||||
<td class="mono">218</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 64%"></span></span>64%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">LAS</td>
|
||||
<td class="mono">164</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill warn" style="width: 82%"></span></span>82%</td>
|
||||
<td class="status-text warn">● 1 条告警</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">灵矽</td>
|
||||
<td class="mono">96</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 57%"></span></span>57%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
<tr class="tr-hover">
|
||||
<td class="strong mono">共享池 / 未分配</td>
|
||||
<td class="mono">34</td>
|
||||
<td><span class="bar-wrap"><span class="bar-fill" style="width: 31%"></span></span>31%</td>
|
||||
<td class="status-text ok">● 正常</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user