Merge branch 'master' into feature/prettier-formatting
This commit is contained in:
@@ -81,6 +81,13 @@ export default {
|
|||||||
...this.options,
|
...this.options,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Set the theme and show the editor only after it's been set to prevent FOUC.
|
||||||
|
editor.setTheme(`ace/theme/${this.defineTheme()}`, () => {
|
||||||
|
this.$nextTick().then(() => {
|
||||||
|
this.initialized = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if (this.value) editor.setValue(this.value, 1);
|
if (this.value) editor.setValue(this.value, 1);
|
||||||
|
|
||||||
this.editor = editor
|
this.editor = editor
|
||||||
@@ -102,9 +109,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
destroyed() {
|
||||||
this.editor.destroy();
|
this.editor.destroy();
|
||||||
this.editor.container.remove();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -97,6 +97,13 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Set the theme and show the editor only after it's been set to prevent FOUC.
|
||||||
|
editor.setTheme(`ace/theme/${this.defineTheme()}`, () => {
|
||||||
|
this.$nextTick().then(() => {
|
||||||
|
this.initialized = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
const completer = {
|
const completer = {
|
||||||
getCompletions: (editor, _session, { row, column }, _prefix, callback) => {
|
getCompletions: (editor, _session, { row, column }, _prefix, callback) => {
|
||||||
if (this.validationSchema) {
|
if (this.validationSchema) {
|
||||||
|
|||||||
Reference in New Issue
Block a user