feat: 优化了聊天的效果
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
<image
|
<image
|
||||||
v-if="isLoading"
|
v-if="isLoading"
|
||||||
class="loading-img"
|
class="loading-img"
|
||||||
src="/static/msg_loading.svg"
|
src="/static/chat_msg_loading.gif"
|
||||||
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<!-- <loading v-if="isLoading" /> -->
|
<!-- <loading v-if="isLoading" /> -->
|
||||||
<ChatMarkdown :key="textKey" :text="processedText" />
|
<ChatMarkdown :key="textKey" :text="processedText" />
|
||||||
@@ -94,8 +95,8 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.loading-img {
|
.loading-img {
|
||||||
margin-left: -4px;
|
margin-right: 8px;
|
||||||
width: 32px;
|
width: 30px;
|
||||||
height: 32px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
static/chat_msg_loading.gif
Normal file
BIN
static/chat_msg_loading.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -94,15 +94,15 @@ export default {
|
|||||||
const fontFamily = this.fontFamily
|
const fontFamily = this.fontFamily
|
||||||
let zeroStyle = {
|
let zeroStyle = {
|
||||||
p: `
|
p: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height:1.65;
|
line-height:1.65;
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
`,
|
`,
|
||||||
// 一级标题
|
// 一级标题
|
||||||
h1: `
|
h1: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size: 24px;
|
font-size: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: ${themeColor};
|
color: ${themeColor};
|
||||||
@@ -115,8 +115,8 @@ export default {
|
|||||||
`,
|
`,
|
||||||
// 二级标题
|
// 二级标题
|
||||||
h2: `
|
h2: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
color:${themeColor};
|
color:${themeColor};
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
@@ -126,8 +126,8 @@ export default {
|
|||||||
`,
|
`,
|
||||||
// 三级标题
|
// 三级标题
|
||||||
h3: `
|
h3: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
color: ${themeColor};
|
color: ${themeColor};
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
padding-left:10px;
|
padding-left:10px;
|
||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
`,
|
`,
|
||||||
// 引用
|
// 引用
|
||||||
blockquote: `
|
blockquote: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size:15px;
|
font-size:15px;
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
color: #777777;
|
color: #777777;
|
||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
`,
|
`,
|
||||||
// 列表
|
// 列表
|
||||||
ul: `
|
ul: `
|
||||||
margin: 6px 0;
|
margin: 4px 0;
|
||||||
color: #555;
|
color: #555;
|
||||||
`,
|
`,
|
||||||
li: `
|
li: `
|
||||||
@@ -208,7 +208,7 @@ export default {
|
|||||||
const fontFamily = this.fontFamily
|
const fontFamily = this.fontFamily
|
||||||
let zeroStyle = {
|
let zeroStyle = {
|
||||||
p: `
|
p: `
|
||||||
margin:6px 0;
|
margin:4px 0;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height:1.55;
|
line-height:1.55;
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
|
|||||||
Reference in New Issue
Block a user