feat: 移动端兼容优化

This commit is contained in:
Gsh
2026-01-03 23:46:31 +08:00
parent f8f2d7568c
commit accbaf3ecb
5 changed files with 87 additions and 4 deletions

View File

@@ -9,7 +9,21 @@
// el 弹框不知道为啥宽度会变大
.el-popup-parent--hidden {
width: 100% !important;
overflow: hidden;
overflow: hidden !important;
}
// 移动端 Drawer 遮罩层样式修复
.mobile-drawer-modal {
z-index: 2000;
}
// 防止移动端 drawer 打开时页面溢出
@media (max-width: 768px) {
body.el-popup-parent--hidden {
position: fixed;
width: 100%;
height: 100%;
}
}

View File

@@ -1,6 +1,8 @@
//需要重写的样式放这里
.elx-xmarkdown-container {
padding: 0 ;
max-width: 100%;
overflow-x: auto;
}
.el-bubble-content p{
margin: 0 !important;
@@ -11,6 +13,9 @@
font-size: 16px !important;
font-weight: 400 !important;
line-height: 28px !important;
max-width: 100%;
overflow-wrap: break-word;
word-break: break-word;
}
.chat-with-id-container{
//待定
@@ -18,7 +23,52 @@
}
.el-bubble-content-wrapper {
--bubble-content-max-width: 800px;
max-width: 100%;
}
.markdown-language-header-div{
z-index: 0 !important;
}
/* 移动端 markdown 优化 */
@media (max-width: 768px) {
.el-bubble-content-wrapper {
--bubble-content-max-width: 100%;
max-width: calc(100vw - 80px);
}
.el-bubble-content {
font-size: 14px !important;
line-height: 24px !important;
padding: 8px !important;
}
.elx-xmarkdown-container {
max-width: 100%;
overflow-x: auto;
}
/* markdown 内容元素优化 */
.markdown-body {
font-size: 14px !important;
pre {
max-width: 100%;
overflow-x: auto;
}
code {
word-break: break-all;
}
table {
display: block;
max-width: 100%;
overflow-x: auto;
}
img {
max-width: 100%;
height: auto;
}
}
}