|
|
@ -10,7 +10,7 @@ |
|
|
|
<!-- Cancel --> |
|
|
|
<!-- Cancel --> |
|
|
|
{{ $t('general.cancel') }} |
|
|
|
{{ $t('general.cancel') }} |
|
|
|
</v-btn> |
|
|
|
</v-btn> |
|
|
|
<v-btn x-small color="primary" @click="save"> |
|
|
|
<v-btn x-small color="primary" :disabled="!isValid" @click="save"> |
|
|
|
<!-- Save --> |
|
|
|
<!-- Save --> |
|
|
|
{{ $t('general.save') }} |
|
|
|
{{ $t('general.save') }} |
|
|
|
</v-btn> |
|
|
|
</v-btn> |
|
|
@ -25,13 +25,18 @@ |
|
|
|
v-model="localState" |
|
|
|
v-model="localState" |
|
|
|
class="text-left caption" |
|
|
|
class="text-left caption" |
|
|
|
style="width: 300px;min-height:min(600px,80vh);min-width:100%; " |
|
|
|
style="width: 300px;min-height:min(600px,80vh);min-width:100%; " |
|
|
|
|
|
|
|
@validate="validate" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<monaco-json-object-editor |
|
|
|
<monaco-json-object-editor |
|
|
|
v-else |
|
|
|
v-else |
|
|
|
v-model="localState" |
|
|
|
v-model="localState" |
|
|
|
class="text-left caption" |
|
|
|
class="text-left caption" |
|
|
|
style="width: 300px;min-height:200px;min-width:100%;" |
|
|
|
style="width: 300px;min-height:200px;min-width:100%;" |
|
|
|
|
|
|
|
@validate="validate" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
<div v-show="error" class="px-2 py-1 text-left caption error--text"> |
|
|
|
|
|
|
|
{{ error }} |
|
|
|
|
|
|
|
</div> |
|
|
|
</v-dialog> |
|
|
|
</v-dialog> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -47,7 +52,9 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: () => ({ |
|
|
|
data: () => ({ |
|
|
|
localState: '', |
|
|
|
localState: '', |
|
|
|
expand: false |
|
|
|
expand: false, |
|
|
|
|
|
|
|
isValid: true, |
|
|
|
|
|
|
|
error: undefined |
|
|
|
}), |
|
|
|
}), |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
|
|
|
|
|
|
|
@ -91,6 +98,10 @@ export default { |
|
|
|
save() { |
|
|
|
save() { |
|
|
|
this.expand = false |
|
|
|
this.expand = false |
|
|
|
this.$emit('input', JSON.stringify(this.localState)) |
|
|
|
this.$emit('input', JSON.stringify(this.localState)) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
validate(n, e) { |
|
|
|
|
|
|
|
this.isValid = n |
|
|
|
|
|
|
|
this.error = e |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|