diff --git a/.npmrc b/.npmrc index 2462d6db..dfe2ca70 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ always-auth=true -registry=https://registry.jetlinks.cn/ \ No newline at end of file +registry=http://registry.jetlinks.cn/ \ No newline at end of file diff --git a/src/components/MonacoEditor/index.vue b/src/components/MonacoEditor/index.vue index 21f8ba61..d748341b 100644 --- a/src/components/MonacoEditor/index.vue +++ b/src/components/MonacoEditor/index.vue @@ -75,7 +75,7 @@ watchEffect(() => { }); const insert = (val) => { - if (!instance) return + if (!instance) return; const position = instance.getPosition(); instance.executeEdits(instance.getValue(), [ { @@ -88,17 +88,19 @@ const insert = (val) => { text: val, }, ]); -} +}; -watch(() => props.modelValue, - (val) => { - instance.setValue(val) - }) +// watch( +// () => props.modelValue, +// (val) => { +// instance.setValue(val); +// }, +// ); defineExpose({ editorFormat, insert, -}) +});