mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-20 20:00:37 +03:00
add ref to JsonNull component
This commit is contained in:
@@ -4,19 +4,19 @@ Simple json display component, based on vue
|
|||||||
|
|
||||||
## Installing:
|
## Installing:
|
||||||
Using npm:
|
Using npm:
|
||||||
```
|
```
|
||||||
$ npm install vue-json-viewer
|
$ npm install vue-json-viewer
|
||||||
```
|
```
|
||||||
Using bower:
|
Using bower:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn add vue-json-viewer
|
$ yarn add vue-json-viewer
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example:
|
## Example:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
<json-viewer :value="jsonData" :show-copy="true" icon-prefix="ion" :show-bigger="true"></json-viewer>
|
<json-viewer :value="jsonData" :show-copy="true" icon-prefix="ion" :show-bigger="true"></json-viewer>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -34,7 +34,9 @@ export default {
|
|||||||
b: 'a',
|
b: 'a',
|
||||||
a: 'hello word',
|
a: 'hello word',
|
||||||
asd2: 1,
|
asd2: 1,
|
||||||
asd: false
|
asd: false,
|
||||||
|
foo: null,
|
||||||
|
bar: undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,12 +44,12 @@ export default {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
## Result:
|
## Result:
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Options:
|
## Options:
|
||||||
|
|
||||||
| Property | Description |
|
| Property | Description |
|
||||||
| ----------- |:-------------|
|
| ----------- |:-------------|
|
||||||
| value | json data |
|
| value | json data |
|
||||||
| show-copy | display the copy button |
|
| show-copy | display the copy button |
|
||||||
|
|||||||
+2
-1
@@ -16,7 +16,8 @@ new Vue({
|
|||||||
a: 'hello word',
|
a: 'hello word',
|
||||||
asd2: 1,
|
asd2: 1,
|
||||||
asd: false,
|
asd: false,
|
||||||
foo: null
|
foo: null,
|
||||||
|
bar: undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export default {
|
|||||||
JsonBoolean,
|
JsonBoolean,
|
||||||
JsonObject,
|
JsonObject,
|
||||||
JsonArray,
|
JsonArray,
|
||||||
|
JsonNull,
|
||||||
JIcon
|
JIcon
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user