为什么在npm install的过程中会报错
因为原先的tui-editor插件(也就是富文本编辑器插件)换了个名称,现在已经更名为toast-ui/editor所以安装不了,从而报错!
如何解决报错问题
1、首先将package.json中的tui-editor那一行修改为"@toast-ui/editor": “^3.1.3”
2、进入\src\components\MarkdownEditor\index.vue文件,将所有import删除换成下面四行
import Editor from '@toast-ui/editor'
import "codemirror/lib/codemirror.css"
import "@toast-ui/editor/dist/toastui-editor.css"
import defaultOptions from './default-options'