diff --git a/src/common/components/JsonEditor/JsonElement.vue b/src/common/components/JsonEditor/JsonElement.vue
index 525f726..592582d 100644
--- a/src/common/components/JsonEditor/JsonElement.vue
+++ b/src/common/components/JsonEditor/JsonElement.vue
@@ -2,12 +2,16 @@
- "{{label}}"
- :
+
+ "{{label}}"
+
+ :
true
@@ -20,24 +24,22 @@
'json-value-string': typeof value_internal === 'string'
}"
>
-
+
+ "
+ {{value_internal}}
+
"
+
+
{{value_internal}}
-
- ✔
-
-
-
-
- "{{value_internal}}"
-
-
- {{value_internal}}
- ,
-
+ ,
@@ -69,12 +71,13 @@ export default {
this.$emit('change', this.value_internal);
},
changeValue() {
- const newValue = this.$refs['element-edit-area'].textContent;
+ this.$refs['element-edit-area'].blur();
+ const newValue = this.$refs['element-edit-area'].textContent.replace(/\n/g, '');
if (isNaN(newValue)) {
this.value_internal = newValue;
this.$emit('change', newValue);
} else {
- this.value_internal.value = +newValue;
+ this.value_internal = +newValue;
this.$emit('change', +newValue);
}
this.editing = false;
diff --git a/src/common/components/JsonEditor/json.scss b/src/common/components/JsonEditor/json.scss
index 6b6b307..8492023 100644
--- a/src/common/components/JsonEditor/json.scss
+++ b/src/common/components/JsonEditor/json.scss
@@ -2,15 +2,21 @@
padding-left: 2em !important;
}
.item-key {
- color: #fa6;
+ color: rgb(255, 196, 148);
+}
+.item-key-boolean-false {
+ color: rgb(207, 149, 101)
}
-.json-value-boolean {
- color: rgb(53, 179, 120);
+.json-value-boolean-true {
+ color: rgb(150, 240, 198);
+}
+.json-value-boolean-false {
+ color: rgb(241, 21, 21);
}
.json-value-number {
- color: rgb(73, 73, 160);
+ color: rgb(121, 121, 238);
}
.json-value-string {
- color: rgb(195, 35, 35);
+ color: rgb(226, 175, 7);
}