Fix editing raw value for object fields

This commit is contained in:
rijkvanzanten
2020-10-02 17:57:04 -04:00
parent bf76244ba7
commit 25bdcb37e6
2 changed files with 11 additions and 2 deletions

View File

@@ -135,7 +135,15 @@ export default defineComponent({
const rawValue = computed({
get() {
return _value.value;
switch (type.value) {
case 'object':
return JSON.stringify(_value.value, null, '\t');
case 'string':
case 'number':
case 'boolean':
default:
return _value.value;
}
},
set(newRawValue: string) {
switch (type.value) {

View File

@@ -6,6 +6,7 @@
font-size: inherit;
font-family: inherit;
line-height: inherit;
tab-size: 2;
user-select: none;
}
@@ -120,9 +121,9 @@ dd {
}
dt {
flex-shrink: 0;
margin-right: 8px;
font-weight: 600;
flex-shrink: 0;
}
dd {