up.
This commit is contained in:
parent
4b0373ca2e
commit
f50b215653
@ -45,12 +45,13 @@
|
||||
<ele-ellipsis :max-line="4" :tooltip="ellipsisTooltipProps">
|
||||
{{ data.requestHeaders }}
|
||||
</ele-ellipsis>
|
||||
<el-button size="small" @click="preview('请求头数据', 'json', data.requestHeaders)">预览</el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求参数" :span="2">
|
||||
<ele-ellipsis :max-line="4" :tooltip="ellipsisTooltipProps">
|
||||
{{ data.requestBody }}
|
||||
</ele-ellipsis>
|
||||
<el-button type="primary" @click="preview('请求参数', data.responseType, data.requestBody)">预览</el-button>
|
||||
<el-button size="small" @click="preview('请求参数', data.responseType, data.requestBody)">预览</el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="返回类型" :span="1">
|
||||
<ele-ellipsis :max-line="4" :tooltip="ellipsisTooltipProps">
|
||||
@ -66,14 +67,14 @@
|
||||
<ele-ellipsis :max-line="4" :tooltip="ellipsisTooltipProps">
|
||||
{{ data.responseData }}
|
||||
</ele-ellipsis>
|
||||
<el-button type="primary" @click="preview('返回结果',data.responseType, data.responseData)">预览</el-button>
|
||||
<el-button size="small" @click="preview('返回结果',data.responseType, data.responseData)">预览</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-dialog
|
||||
v-model="previewVisible"
|
||||
title="预览"
|
||||
width="800"
|
||||
:title="previewTitle"
|
||||
width="860"
|
||||
>
|
||||
<monaco-editor
|
||||
v-model="previewData"
|
||||
@ -127,7 +128,7 @@
|
||||
const previewTitle = ref("");
|
||||
const preview = (title, type, data)=>{
|
||||
previewTitle.value = title;
|
||||
if(type == "think\\response\\Json"){
|
||||
if(type == "think\\response\\Json" || type == 'json'){
|
||||
previewData.value = formatJson(data);
|
||||
}else{
|
||||
previewData.value = data;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user