From 86c8081934396b7c85ab18d352dda6f7845d2417 Mon Sep 17 00:00:00 2001 From: ronger Date: Mon, 29 Mar 2021 09:58:58 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D``=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=83=8C=E6=99=AF=E8=89=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api.config.js | 2 +- layouts/default.vue | 3 ++- package.json | 2 +- pages/article/_article_id.vue | 6 ++++++ pages/draft/_draft_id.vue | 6 ++++++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/config/api.config.js b/config/api.config.js index 822f132..23b8e51 100644 --- a/config/api.config.js +++ b/config/api.config.js @@ -6,7 +6,7 @@ const apisMap = { BASE: 'http://localhost:8099/forest', CDN: '', PROXY: '/proxy', - SOCKET: 'http://localhost:3000/wss', + SOCKET: 'http://localhost:3000/ws', GRAVATAR: '/proxy/static.rymcu.com/avatar' }, production: { diff --git a/layouts/default.vue b/layouts/default.vue index e3f9856..7c0020a 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -185,7 +185,8 @@ p { /* 设置滚动条的样式 */ ::-webkit-scrollbar { - width: 1px; + width: 7px; + height: 7px; } /* 滚动槽 */ diff --git a/package.json b/package.json index 739f50f..6650076 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "save-svg-as-png": "^1.4.17", "sockjs-client": "^1.5.0", "stompjs": "^2.3.3", - "vditor": "^3.8.3", + "vditor": "^3.8.4", "vue-cropperjs": "^4.2.0", "vuejs-avataaars": "^4.0.1" }, diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue index 7bb74b3..4160679 100644 --- a/pages/article/_article_id.vue +++ b/pages/article/_article_id.vue @@ -134,6 +134,7 @@ import {mapState} from 'vuex'; import ShareBox from '~/components/widget/share'; import PortfoliosWidget from '~/components/widget/portfolios'; import EditTags from '~/components/widget/tags'; +import 'vditor/dist/css/content-theme/light.css'; export default { name: "ArticleDetail", @@ -382,6 +383,11 @@ export default { Vue.VditorPreview.mediaRender(previewElement); Vue.VditorPreview.lazyLoadImageRender(previewElement); //VditorPreview.outlineRender(previewElement, outLineElement); + previewElement.addEventListener("click", (event) => { + if (event.target.tagName === "IMG") { + Vue.VditorPreview.previewImage(event.target); + } + }); window.scrollTo(0, 0); _ts.$set(_ts, 'isPerfect', _ts.article.articlePerfect === '1') }) diff --git a/pages/draft/_draft_id.vue b/pages/draft/_draft_id.vue index 74fd8d8..02fb57b 100644 --- a/pages/draft/_draft_id.vue +++ b/pages/draft/_draft_id.vue @@ -67,6 +67,7 @@