From 572029b82108f8d013990589edbf3ec6c1e2dcff Mon Sep 17 00:00:00 2001 From: ronger Date: Wed, 6 Mar 2024 16:30:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(component):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E5=88=B7=E6=96=B0=E4=B8=A2=E5=A4=B1=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/admin.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/admin.vue b/pages/admin.vue index d5bd9a0..d6e9635 100644 --- a/pages/admin.vue +++ b/pages/admin.vue @@ -189,11 +189,13 @@ export default { _ts.$store.commit('admin/pushTags', _ts.menus[index]) reset = '1' } + let params = _ts.$route.params + params.reset = reset + let query = _ts.$route.query _ts.$router.push({ name: item, - params: { - reset: reset - } + params, + query }) }, handleSelectMenu(item) { From 14c2fccc56c08bb493810fc830455fcfbac986e2 Mon Sep 17 00:00:00 2001 From: ronger Date: Mon, 11 Mar 2024 08:12:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(component):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E7=95=8C=E9=9D=A2=E6=B8=B2=E6=9F=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chats/_account.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pages/chats/_account.vue b/pages/chats/_account.vue index f3db671..cead88b 100644 --- a/pages/chats/_account.vue +++ b/pages/chats/_account.vue @@ -131,15 +131,23 @@ export default { tab: '\t', cdn: apiConfig.VDITOR, cache: { - enable: this.postId ? false : true, - id: this.postId ? this.postId : '', + enable: false }, after() { _ts.contentEditor.setValue(data.value ? data.value : ''); }, preview: { + hljs: { + enable: true, + lineNumber: true, + style: 'github' + }, markdown: { toc: true, + autoSpace: true + }, + math: { + inlineDigit: true }, delay: 500, mode: data.mode, @@ -188,7 +196,9 @@ export default { }); _ts.contentEditor.setValue('') _ts.$axios.$post('/api/openai/new-chat', _ts.messages).then(async res => { - const html = await Vue.Vditor.md2html(_ts.message); + const html = await Vue.Vditor.md2html(_ts.message, { + cdn: apiConfig.VDITOR + }); _ts.messages.push({ to: _ts.user.account, from: _ts.to.account,