mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-14 18:42:31 +03:00
fix value change and height not resize
This commit is contained in:
@@ -82,6 +82,11 @@ export default {
|
||||
expandCode: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
this.onResized()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
jvClass () {
|
||||
return 'jv-container ' + this.theme + (this.boxed ? ' boxed' : '')
|
||||
@@ -96,6 +101,7 @@ export default {
|
||||
methods: {
|
||||
onResized () {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.$refs.jsonBox.$el.clientHeight)
|
||||
if (this.$refs.jsonBox.$el.clientHeight >= 250) {
|
||||
this.expandableCode = true
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user