Merge branch 'rymcu:master' into master

This commit is contained in:
Amanda 2024-03-15 10:28:58 +08:00 committed by GitHub
commit f6c36c4b34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,15 +131,23 @@ export default {
tab: '\t', tab: '\t',
cdn: apiConfig.VDITOR, cdn: apiConfig.VDITOR,
cache: { cache: {
enable: this.postId ? false : true, enable: false
id: this.postId ? this.postId : '',
}, },
after() { after() {
_ts.contentEditor.setValue(data.value ? data.value : ''); _ts.contentEditor.setValue(data.value ? data.value : '');
}, },
preview: { preview: {
hljs: {
enable: true,
lineNumber: true,
style: 'github'
},
markdown: { markdown: {
toc: true, toc: true,
autoSpace: true
},
math: {
inlineDigit: true
}, },
delay: 500, delay: 500,
mode: data.mode, mode: data.mode,
@ -188,7 +196,9 @@ export default {
}); });
_ts.contentEditor.setValue('') _ts.contentEditor.setValue('')
_ts.$axios.$post('/api/openai/new-chat', _ts.messages).then(async res => { _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({ _ts.messages.push({
to: _ts.user.account, to: _ts.user.account,
from: _ts.to.account, from: _ts.to.account,