From a0a2e6212541dcde57041bcf2da6227002e222a0 Mon Sep 17 00:00:00 2001 From: jasminexz <491548320@qq.com> Date: Mon, 28 Aug 2023 14:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/renderer/src/api/blossom.ts | 13 +++ .../src/views/article/ArticleIndex.vue | 18 ++-- .../src/views/article/ArticleInfo.vue | 12 +-- .../src/views/article/ArticleTreeTitle.vue | 49 +++++++++-- .../src/renderer/src/views/doc/type.d.ts | 4 +- .../src/views/picture/PictureIndex.scss | 7 ++ .../src/views/picture/PictureIndex.vue | 84 +++++++++++++++---- .../src/views/picture/PictureTreeTitle.vue | 22 ++++- 8 files changed, 164 insertions(+), 45 deletions(-) diff --git a/blossom-editor/src/renderer/src/api/blossom.ts b/blossom-editor/src/renderer/src/api/blossom.ts index a7c4441..9bf3070 100644 --- a/blossom-editor/src/renderer/src/api/blossom.ts +++ b/blossom-editor/src/renderer/src/api/blossom.ts @@ -63,6 +63,10 @@ export const folderUpdApi = (data?: object): Promise> => { return rq.post>("/folder/upd", data); } +export const folderDelApi = (data?: object): Promise> => { + return rq.post>("/folder/del", data); +} + export const folderOpenApi = (data?: object): Promise> => { return rq.post>("/folder/open", data); } @@ -138,6 +142,15 @@ export const articleUpdContentApi = (data?: object): Promise> => { return rq.post>("/article/upd/content", data); } +/** + * 删除文章 + * @param data {id:文章ID} + * @returns + */ +export const articleDelApi = (data?: object): Promise> => { + return rq.post>("/article/del", data); +} + /** * star 或取消 star * @param data diff --git a/blossom-editor/src/renderer/src/views/article/ArticleIndex.vue b/blossom-editor/src/renderer/src/views/article/ArticleIndex.vue index f4ec3ae..ed2f05c 100644 --- a/blossom-editor/src/renderer/src/views/article/ArticleIndex.vue +++ b/blossom-editor/src/renderer/src/views/article/ArticleIndex.vue @@ -18,14 +18,14 @@ @@ -33,14 +33,14 @@ @@ -48,14 +48,14 @@ @@ -63,7 +63,7 @@ @@ -338,7 +338,7 @@ const getRouteQueryParams = () => { //#region ----------------------------------------< 文档列表与当前文章 >---------------------------- const docTreeLoading = ref(true) // 文档菜单的加载动画 -const showSort = ref(false) // 是否显示文章排序 +const showSort = ref(false) // 是否显示文档排序 const docTreeDefaultActive = ref('') // 文档的默认选中项, 用于外部跳转后选中菜单 const docTreeData = ref([]) // 文档菜单 const curDoc = ref() // 当前选中的文档, 包含文件夹和文章, 如果选中是文件夹, 则不会重置编辑器中的文章 @@ -655,7 +655,7 @@ const removeListenerScroll = () => { } const marginTop = 75 -const matchHtmlTags = 'p, h1, h2, h3, h4, h5, h6, ul, ol, li, pre, blockquote, hr, table, tr, iframe,span' +const matchHtmlTags = 'p, h1, h2, h3, h4, h5, h6, ul, ol, li, pre, blockquote, hr, table, tr, iframe, span' const sycnScroll = (_event: Event | string, _source?: string, _lineno?: number, _colno?: number, _error?: Error): any => { if (EditorRef.value == undefined) { return diff --git a/blossom-editor/src/renderer/src/views/article/ArticleInfo.vue b/blossom-editor/src/renderer/src/views/article/ArticleInfo.vue index c3d9e0d..744896a 100644 --- a/blossom-editor/src/renderer/src/views/article/ArticleInfo.vue +++ b/blossom-editor/src/renderer/src/views/article/ArticleInfo.vue @@ -181,16 +181,10 @@ @@ -673,4 +667,4 @@ $height-form: calc(100% - #{$height-title} - #{$height-img} - #{$height-stat} - } -../doc \ No newline at end of file + \ No newline at end of file diff --git a/blossom-editor/src/renderer/src/views/article/ArticleTreeTitle.vue b/blossom-editor/src/renderer/src/views/article/ArticleTreeTitle.vue index 571fda7..8128e56 100644 --- a/blossom-editor/src/renderer/src/views/article/ArticleTreeTitle.vue +++ b/blossom-editor/src/renderer/src/views/article/ArticleTreeTitle.vue @@ -26,7 +26,7 @@ -