feat: 消息的展示样式调整

This commit is contained in:
2025-10-23 20:33:23 +08:00
parent c9587d2006
commit 3094211152
2 changed files with 33 additions and 14 deletions

View File

@@ -16,6 +16,6 @@
} }
.tag-text { .tag-text {
color: #00a6ff; /* 蓝色文字,可根据设计调整 */ color: #2d91ff; /* 蓝色文字,可根据设计调整 */
font-size: $uni-font-size-base; font-size: $uni-font-size-base;
} }

View File

@@ -35,7 +35,7 @@ export default {
}, },
themeColor: { themeColor: {
type: String, type: String,
default: "#00A6FF", default: "#2D91FF",
}, },
codeBgColor: { codeBgColor: {
type: String, type: String,
@@ -45,6 +45,14 @@ export default {
type: String, type: String,
default: "PingFang SC, PingFang SC", default: "PingFang SC, PingFang SC",
}, },
fontColor: {
type: String,
default: "#171717",
},
fontSubColor: {
type: String,
default: "#4D4D4D",
},
aiMode: { aiMode: {
type: Boolean, type: Boolean,
default: false, default: false,
@@ -97,12 +105,15 @@ export default {
const themeColor = this.themeColor; const themeColor = this.themeColor;
const codeBgColor = this.codeBgColor; const codeBgColor = this.codeBgColor;
const fontFamily = this.fontFamily; const fontFamily = this.fontFamily;
const fontColor = this.fontColor;
const fontSubColor = this.fontSubColor;
let zeroStyle = { let zeroStyle = {
p: ` p: `
margin:4px 0; margin:4px 0;
font-size: 15px; font-size: 15px;
line-height:1.65; line-height:1.55;
font-family: ${fontFamily}; font-family: ${fontFamily};
color: ${fontColor};
`, `,
// 一级标题 // 一级标题
h1: ` h1: `
@@ -149,12 +160,14 @@ export default {
`, `,
// 列表 // 列表
ul: ` ul: `
font-size: 14px;
margin: 4px 0; margin: 4px 0;
color: #555; color: ${fontSubColor};
`, `,
li: ` li: `
font-size: 14px;
margin: 4px 0; margin: 4px 0;
color: #555; color: ${fontSubColor};
`, `,
// 链接 // 链接
a: ` a: `
@@ -168,6 +181,7 @@ export default {
`, `,
// 斜体 // 斜体
em: ` em: `
font-size: 14px;
color: ${themeColor}; color: ${themeColor};
font-family: ${fontFamily}; font-family: ${fontFamily};
letter-spacing:0.3em; letter-spacing:0.3em;
@@ -191,11 +205,11 @@ export default {
`, `,
th: ` th: `
border: 1px solid #202121; border: 1px solid #202121;
color: #555; color: ${fontSubColor};
`, `,
td: ` td: `
color:#555; color: ${fontSubColor};
border: 1px solid #555555; border: 1px solid ${fontSubColor};
`, `,
pre: ` pre: `
border-radius: 5px; border-radius: 5px;
@@ -211,12 +225,15 @@ export default {
const themeColor = this.themeColor; const themeColor = this.themeColor;
const codeBgColor = this.codeBgColor; const codeBgColor = this.codeBgColor;
const fontFamily = this.fontFamily; const fontFamily = this.fontFamily;
const fontColor = this.fontColor;
const fontSubColor = this.fontSubColor;
let zeroStyle = { let zeroStyle = {
p: ` p: `
margin:4px 0; margin:4px 0;
font-size: 15px; font-size: 15px;
line-height:1.55; line-height:1.55;
font-family: ${fontFamily}; font-family: ${fontFamily};
color: ${fontColor};
`, `,
// 一级标题 // 一级标题
h1: ` h1: `
@@ -272,11 +289,13 @@ export default {
// 列表 // 列表
ul: ` ul: `
margin: 4px 0; margin: 4px 0;
color: #555; font-size: 14px;
color: ${fontSubColor};
`, `,
li: ` li: `
margin: 4px 0; margin: 4px 0;
color: #555; font-size: 14px;
color: ${fontSubColor};
`, `,
// 链接 // 链接
a: ` a: `
@@ -311,12 +330,12 @@ export default {
border-collapse: collapse; border-collapse: collapse;
`, `,
th: ` th: `
border: 1px solid #202121; border: 1px solid ${fontSubColor};
color: #555; color: ${fontSubColor};
`, `,
td: ` td: `
color:#555; color: ${fontSubColor};
border: 1px solid #555555; border: 1px solid ${fontSubColor};
`, `,
pre: ` pre: `
border-radius: 5px; border-radius: 5px;