vue-element-admin npm install 失败解决

git地址:https://github.com/PanJiaChen/vue-element-admin/tree/master

原因:

tui-editor插件改名导致

解决方法:

第一步:

package.json文件

javascript 复制代码
"tui-editor": "1.3.3",

修改为

javascript 复制代码
"@toast-ui/editor": "^3.1.3",
第二步:

src/components/MarkdownEditor/index.vue文件

javascript 复制代码
// deps for editor
import 'codemirror/lib/codemirror.css' // codemirror
import 'tui-editor/dist/tui-editor.css' // editor ui
import 'tui-editor/dist/tui-editor-contents.css' // editor content

import Editor from 'tui-editor'
import defaultOptions from './default-options'

改为

javascript 复制代码
// deps for editor
import 'codemirror/lib/codemirror.css'
import '@toast-ui/editor/dist/toastui-editor.css'
import Editor from '@toast-ui/editor'
import defaultOptions from './default-options'

文件中的getValue换成getMarkdown ;setValue换成setMarkdown

然后我们重新npm i 就可以了

相关推荐
时清云27 分钟前
【算法】合并两个有序链表
前端·算法·面试
小爱丨同学35 分钟前
宏队列和微队列
前端·javascript
持久的棒棒君1 小时前
ElementUI 2.x 输入框回车后在调用接口进行远程搜索功能
前端·javascript·elementui
2401_857297911 小时前
秋招内推2025-招联金融
java·前端·算法·金融·求职招聘
一 乐1 小时前
租拼车平台|小区租拼车管理|基于java的小区租拼车管理信息系统小程序设计与实现(源码+数据库+文档)
java·数据库·vue.js·微信·notepad++·拼车
undefined&&懒洋洋2 小时前
Web和UE5像素流送、通信教程
前端·ue5
大前端爱好者4 小时前
React 19 新特性详解
前端
小程xy4 小时前
react 知识点汇总(非常全面)
前端·javascript·react.js
随云6324 小时前
WebGL编程指南之着色器语言GLSL ES(入门GLSL ES这篇就够了)
前端·webgl
随云6324 小时前
WebGL编程指南之进入三维世界
前端·webgl