feat(image): 添加图片删除功能并优化 Markdown 编辑器
- 在 ImageController 中添加删除图片的接口 - 在 ImageService 中实现删除图片和批量更新图片 ID 的方法 - 在前端集成复制代码插件并优化 Markdown 编辑器配置 - 修复后端分组相关接口的参数类型问题
This commit is contained in:
@@ -4,33 +4,47 @@ import router from './router/'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
|
||||
import VMdEditor from '@kangc/v-md-editor';
|
||||
import '@kangc/v-md-editor/lib/style/base-editor.css';
|
||||
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
|
||||
import '@kangc/v-md-editor/lib/theme/style/github.css';
|
||||
// 1. 导入编辑器和预览组件
|
||||
import VMdEditor from '@kangc/v-md-editor'
|
||||
import VMdPreview from '@kangc/v-md-editor/lib/preview'
|
||||
|
||||
import VMdPreview from '@kangc/v-md-editor/lib/preview';
|
||||
import '@kangc/v-md-editor/lib/style/preview.css';
|
||||
import '@kangc/v-md-editor/lib/theme/style/github.css';
|
||||
// 2. 导入基础样式
|
||||
import '@kangc/v-md-editor/lib/style/base-editor.css'
|
||||
import '@kangc/v-md-editor/lib/style/preview.css'
|
||||
|
||||
// 3. 导入主题和样式
|
||||
import githubTheme from '@kangc/v-md-editor/lib/theme/github'
|
||||
import '@kangc/v-md-editor/lib/theme/style/github.css'
|
||||
|
||||
// 4. 导入复制代码插件及其样式
|
||||
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index'
|
||||
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css'
|
||||
|
||||
// 5. 导入高亮库
|
||||
import hljs from 'highlight.js'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
// highlightjs
|
||||
import hljs from 'highlight.js';
|
||||
// 6. 配置编辑器
|
||||
VMdEditor.use(githubTheme, {
|
||||
Hljs: hljs,
|
||||
});
|
||||
})
|
||||
|
||||
// 7. 配置预览组件
|
||||
VMdPreview.use(githubTheme, {
|
||||
Hljs: hljs,
|
||||
});
|
||||
})
|
||||
|
||||
// // 配置Markdown编辑器
|
||||
app.use(VMdEditor);
|
||||
app.use(VMdPreview);
|
||||
// 8. 为编辑器和预览分别添加复制插件
|
||||
VMdEditor.use(createCopyCodePlugin())
|
||||
VMdPreview.use(createCopyCodePlugin()) // 注意这里使用同一个插件创建函数
|
||||
|
||||
// 使用Element Plus和路由
|
||||
// 9. 注册组件
|
||||
app.use(VMdEditor)
|
||||
app.use(VMdPreview)
|
||||
|
||||
// 10. 使用Element Plus和路由
|
||||
app.use(ElementPlus)
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
app.mount('#app')
|
||||
Reference in New Issue
Block a user