1、出错问题
import { Toolbar, Editor } from "@wangeditor/editor-for-vue";
^^^^^^
SyntaxError: Named export 'Editor' not found. The requested module '@wangeditor/editor-for-vue' is a CommonJS module, which may not support all module.exports as named exports
2、解决办法
let Editor =ref()
let Toolbar =ref()
import("@wangeditor/editor-for-vue").then((WangEditor) => {
Editor.value = WangEditor.Editor;
Toolbar.value = WangEditor.Toolbar;
// 使用 Editor 和Toolbar
});