Created
June 29, 2020 20:46
-
-
Save djeikyb/dc077792d05e45cedfe8b536777b8eef to your computer and use it in GitHub Desktop.
simple json display vue component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<pre><code>{{pretty}}</code></pre> | |
</template> | |
<script> | |
export default { | |
name: "JsonPrettily", | |
props: ["value"], | |
computed: { | |
pretty() { | |
return JSON.stringify(this.value, null, 1); | |
}, | |
}, | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment