mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-20 20:00:37 +03:00
#39 | expand property added
This commit is contained in:
@@ -151,6 +151,7 @@ import 'vue-json-viewer/style.css'
|
|||||||
| `sort` | Sort keys before displaying | `false` |
|
| `sort` | Sort keys before displaying | `false` |
|
||||||
| `boxed` | Add a fancy "boxed" style to component | `false` |
|
| `boxed` | Add a fancy "boxed" style to component | `false` |
|
||||||
| `theme` | Add a custom CSS class for theming purposes | `jv-light` |
|
| `theme` | Add a custom CSS class for theming purposes | `jv-light` |
|
||||||
|
| `expanded` | Default expand the view | `false` |
|
||||||
|
|
||||||
## Listeners
|
## Listeners
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -56,6 +56,10 @@ export default {
|
|||||||
type: [Object, Array, String, Number, Boolean, Function],
|
type: [Object, Array, String, Number, Boolean, Function],
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
expanded: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
expandDepth: {
|
expandDepth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1
|
||||||
@@ -86,7 +90,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
copied: false,
|
copied: false,
|
||||||
expandableCode: false,
|
expandableCode: false,
|
||||||
expandCode: false
|
expandCode: this.expanded
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
Reference in New Issue
Block a user