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 @@