优化访问日志Header显示

This commit is contained in:
刘祥超
2022-04-05 15:43:49 +08:00
parent beff326001
commit 77140d01a0
2 changed files with 12 additions and 4 deletions

View File

@@ -81,7 +81,10 @@
<table class="ui table selectable small"> <table class="ui table selectable small">
<tbody v-for="header in responseHeaders"> <tbody v-for="header in responseHeaders">
<tr v-for="value in header.values"> <tr v-for="value in header.values">
<td class="title">{{header.name}}</td> <td class="title">
<span v-if="header.isGeneral">{{header.name}}</span>
<span style="font-style: italic" v-else>{{header.name}}</span>
</td>
<td>{{value}}</td> <td>{{value}}</td>
</tr> </tr>
</tbody> </tbody>
@@ -92,7 +95,10 @@
<table class="ui table selectable small"> <table class="ui table selectable small">
<tbody v-for="header in requestHeaders"> <tbody v-for="header in requestHeaders">
<tr v-for="value in header.values"> <tr v-for="value in header.values">
<td class="title">{{header.name}}</td> <td class="title">
<span v-if="header.isGeneral">{{header.name}}</span>
<span style="font-style: italic" v-else>{{header.name}}</span>
</td>
<td>{{value}}</td> <td>{{value}}</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -14,7 +14,8 @@ Tea.context(function () {
} }
this.requestHeaders.push({ this.requestHeaders.push({
name: k, name: k,
values: v.values values: v.values,
isGeneral: !k.startsWith("X-")
}) })
} }
} }
@@ -32,7 +33,8 @@ Tea.context(function () {
} }
this.responseHeaders.push({ this.responseHeaders.push({
name: k, name: k,
values: v.values values: v.values,
isGeneral: !k.startsWith("X-")
}) })
} }
} }