You've already forked random-web-tools
Commit
This commit is contained in:
@ -28,16 +28,22 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log(monacoResultInst);
|
||||
loader.init().then((monaco) => {
|
||||
monacoResultInst = monaco;
|
||||
|
||||
monaco.editor.create(document.querySelector(`#${this.name}`), {
|
||||
value: '',
|
||||
value: this.value,
|
||||
language: this.language,
|
||||
readOnly: this.readonly,
|
||||
});
|
||||
});
|
||||
},
|
||||
unmounted() {
|
||||
if (monacoResultInst) {
|
||||
monacoResultInst.editor.getModels().forEach(model => model.dispose());
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
// the callback will be called immediately after the start of the observation
|
||||
|
Reference in New Issue
Block a user