在线编辑文件.

This commit is contained in:
lijiahang
2024-02-20 13:42:19 +08:00
parent f7ca8f0bf1
commit 8acb8730bd
6 changed files with 245 additions and 16 deletions

View File

@@ -93,6 +93,18 @@
emits('editor-mounted', editor);
};
// 获取值
const getValue = () => {
return editor?.getValue();
};
// 设置值
const setValue = (value: string) => {
editor?.setValue(value);
};
defineExpose({ getValue, setValue });
// 监听主题变更
watch(() => appStore.theme, (v) => {
if (editor && props.theme === true) {