修复断言背景色

This commit is contained in:
q4speed 2020-05-11 14:25:48 +08:00
parent c80344813b
commit 599774ef0a
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template>
<el-table :data="assertions" style="width: 100%">
<el-table :data="assertions" :row-style="getRowStyle" :header-cell-style="getRowStyle">
<el-table-column prop="name" :label="$t('api_report.assertions_name')" width="300">
</el-table-column>
<el-table-column prop="message" :label="$t('api_report.assertions_message')">
@ -23,6 +23,12 @@
props: {
assertions: Array
},
methods: {
getRowStyle() {
return {backgroundColor: "#F5F5F5"};
}
}
}
</script>

View File

@ -12,7 +12,7 @@
<el-tab-pane label="Headers" name="headers" class="pane">
<pre>{{response.headers}}</pre>
</el-tab-pane>
<el-tab-pane :label="$t('api_report.assertions')" name="assertions" class="pane">
<el-tab-pane :label="$t('api_report.assertions')" name="assertions" class="pane assertions">
<ms-assertion-results :assertions="response.assertions"/>
</el-tab-pane>
</el-tabs>
@ -71,6 +71,10 @@
overflow-y: auto;
}
.text-container .pane.assertions {
padding: 0;
}
pre {
margin: 0;
}