fix(ui): MarkdownRenderer 内建列表样式,根治非聊天容器列表偏左

- 删除 _resource-panel.scss 中仅绑定 .text-content 容器的列表样式补丁
- 列表样式(padding-left 缩进/list-style)迁移至 MarkdownRenderer 自身,任何容器(聊天/批准弹窗/预览等)渲染一致
- 解决计划批准弹窗等非 .text-content 容器内列表 marker 贴左、文字无缩进的问题
This commit is contained in:
JOJO 2026-08-30 00:33:54 +08:00
parent a30b03fb93
commit d08cc693b3
2 changed files with 28 additions and 26 deletions

View File

@ -107,4 +107,32 @@ watch(() => props.content, renderMath, { immediate: true });
.markdown-text-segment > *:last-child {
margin-bottom: 0;
}
/*
全局 reset 清掉了 ul/ol 默认 padding此处置回标准缩进
保证 MarkdownRenderer 在任何容器内聊天/批准弹窗/预览等表现一致
标记在左文字缩进靠右 */
.markdown-text-segment :deep(ul),
.markdown-text-segment :deep(ol) {
padding-left: 24px;
margin-bottom: 12px;
}
.markdown-text-segment :deep(ul) {
list-style-type: disc;
}
.markdown-text-segment :deep(ul ul) {
list-style-type: circle;
margin-top: 6px;
}
.markdown-text-segment :deep(ol) {
list-style-type: decimal;
}
.markdown-text-segment :deep(li) {
margin-bottom: 6px;
line-height: 1.6;
}
</style>

View File

@ -549,32 +549,6 @@ body[data-theme='dark'] {
}
}
/* Markdown列表样式 - 修复偏左问题 */
.text-content ul,
.text-content ol {
margin-left: 24px; /* 增加左边距 */
padding-left: 0;
margin-bottom: 12px;
}
.text-content ul {
list-style-type: disc; /* 实心圆点 */
}
.text-content ul ul {
list-style-type: circle; /* 空心圆点 */
margin-top: 6px;
}
.text-content ol {
list-style-type: decimal; /* 数字列表 */
}
.text-content li {
margin-bottom: 6px;
line-height: 1.6;
}
/* 搜索结果展示 */
.search-meta {
font-size: 14px;