#133 highlight nodes and edges

This commit is contained in:
lana-k
2026-02-07 21:18:49 +01:00
parent dd30e17ff5
commit 1e8c1761e6
7 changed files with 279 additions and 22 deletions
+21 -11
View File
@@ -75,7 +75,11 @@ export default {
props: {
cellValue: [String, Number, Uint8Array],
empty: Boolean,
emptyMessage: String
emptyMessage: String,
defaultFormat: {
type: String,
default: 'text'
}
},
data() {
return {
@@ -83,7 +87,7 @@ export default {
{ text: 'Text', value: 'text' },
{ text: 'JSON', value: 'json' }
],
currentFormat: 'text',
currentFormat: this.defaultFormat,
lineWrapping: false,
formattedJson: '',
messages: []
@@ -121,17 +125,23 @@ export default {
}
},
watch: {
currentFormat() {
this.messages = []
this.formattedJson = ''
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
currentFormat: {
immediate: true,
handler() {
this.messages = []
this.formattedJson = ''
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
}
}
},
cellValue() {
this.messages = []
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
cellValue: {
immediate: true,
handler() {
this.messages = []
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
}
}
}
},