add missing defaults and clean code

This commit is contained in:
Nitwel
2020-09-09 19:33:40 +02:00
parent d04124563e
commit 69036d6ffd
23 changed files with 48 additions and 102 deletions

View File

@@ -275,10 +275,9 @@ export default defineComponent({
function fillTemplate() {
try {
const parse = JSON.parse(props.template);
emit('input', parse || props.template);
emit('input', JSON.parse(props.template));
} catch {
// We won't stage invalid JSON
emit('input', props.template);
}
}
},
@@ -302,12 +301,6 @@ export default defineComponent({
text-align: right;
}
::v-deep .CodeMirror {
.CodeMirror-placeholder {
color: var(--foreground-subdued);
}
}
.v-button {
position: absolute;
top: 10px;

View File

@@ -57,5 +57,4 @@ export default defineInterface(({ i18n }) => ({
},
},
],
recommendedDisplays: ['raw'],
}));