2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-20 20:00:37 +03:00

add support for 'function' values in json objects

This commit is contained in:
STAFYNIAK Sacha
2018-09-17 05:53:02 +02:00
parent a33910098a
commit f0ce8278c9
4 changed files with 29 additions and 6 deletions
+6 -5
View File
@@ -4,19 +4,19 @@ Simple json display component, based on vue
## Installing:
Using npm:
```
```
$ npm install vue-json-viewer
```
Using bower:
```
```
$ yarn add vue-json-viewer
```
## Example:
``` html
``` html
<json-viewer :value="jsonData" :show-copy="true" icon-prefix="ion" :show-bigger="true"></json-viewer>
```
@@ -31,6 +31,7 @@ export default {
{key: 'hello word'},
],
val: {
c: () = {},
b: 'a',
a: 'hello word',
asd2: 1,
@@ -42,12 +43,12 @@ export default {
}
```
## Result:
![ABC](http://oxqqtdux0.bkt.clouddn.com/WX20180702-172158.png)
![ABC](http://oxqqtdux0.bkt.clouddn.com/WX20180702-172158.png)
## Options:
| Property | Description |
| Property | Description |
| ----------- |:-------------|
| value | json data |
| show-copy | display the copy button |