💄 Display new line in JSON data

This commit is contained in:
Jan Oberhauser 2019-11-16 23:36:50 +01:00
parent 959271e4f5
commit edf216ba24
2 changed files with 12 additions and 9 deletions

View file

@ -71,7 +71,7 @@
"typescript": "~3.5.2", "typescript": "~3.5.2",
"vue": "^2.6.9", "vue": "^2.6.9",
"vue-cli-plugin-webpack-bundle-analyzer": "^1.3.0", "vue-cli-plugin-webpack-bundle-analyzer": "^1.3.0",
"vue-json-pretty": "^1.4.1", "vue-json-viewer": "^2.2.8",
"vue-prism-editor": "^0.3.0", "vue-prism-editor": "^0.3.0",
"vue-router": "^3.0.6", "vue-router": "^3.0.6",
"vue-template-compiler": "^2.5.17", "vue-template-compiler": "^2.5.17",

View file

@ -95,11 +95,12 @@
</tr> </tr>
</table> </table>
</div> </div>
<vue-json-pretty <json-viewer
v-else-if="displayMode === 'JSON'" v-else-if="displayMode === 'JSON'"
class="json-data" class="json-data"
:data="jsonData"> :value="jsonData"
</vue-json-pretty> :expand-depth=10
></json-viewer>
</div> </div>
<div v-else-if="displayMode === 'Binary'"> <div v-else-if="displayMode === 'Binary'">
<div v-if="binaryData.length === 0" class="no-data"> <div v-if="binaryData.length === 0" class="no-data">
@ -162,7 +163,7 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
// @ts-ignore // @ts-ignore
import VueJsonPretty from 'vue-json-pretty'; import JsonViewer from 'vue-json-viewer';
import { import {
GenericValue, GenericValue,
IBinaryData, IBinaryData,
@ -200,7 +201,7 @@ export default mixins(
name: 'RunData', name: 'RunData',
components: { components: {
BinaryDataDisplay, BinaryDataDisplay,
VueJsonPretty, JsonViewer,
}, },
data () { data () {
return { return {
@ -572,9 +573,11 @@ export default mixins(
} }
.json-data { .json-data {
overflow-x: hidden; background: none;
white-space: initial;
word-wrap: break-word; .jv-code {
padding: 0;
}
} }
.error-display, .error-display,