fix: 修复页面展现XML格式数据时会自动转化标签的问题

修复页面展现XML格式数据时会自动转化标签的问题
This commit is contained in:
song.tianyang 2021-03-29 17:28:56 +08:00
parent 809142af53
commit 2fac88cca8
1 changed files with 10 additions and 1 deletions

View File

@ -178,6 +178,10 @@
<div v-else-if="apiInfo.requestBodyParamType == 'JSON-SCHEMA'" style="margin-left: 10px">
<ms-json-code-edit :body="apiInfo.jsonSchemaBody" ref="jsonCodeEdit"/>
</div>
<!-- <div v-else-if="apiInfo.requestBodyParamType == 'XML'" style="margin-left: 10px">-->
<!-- <ms-json-code-edit :body="apiInfo.jsonSchemaBody" ref="jsonCodeEdit"/>-->
<!-- <editor v-model="formatData" :lang="mode" @init="editorInit" :theme="theme" :height="height"/>-->
<!-- </div>-->
<div v-else class="showDataDiv">
<br/>
<p style="margin: 0px 20px;"
@ -423,8 +427,13 @@ export default {
formatRowData(dataType, data) {
var returnData = data;
if (data) {
if(dataType === 'XML'){
returnData = "<xmp>"+returnData+"</xmp>";
}else{
returnData = data.replace(/\n/g, '<br>');
}
}
return returnData;
},
changeFixed(clientHeight) {