2025-12-25 04:22:35 +00:00
|
|
|
|
/* 覆盖MainLayout的content-wrapper padding */
|
|
|
|
|
|
.document-editor-page {
|
|
|
|
|
|
height: calc(100vh - 64px);
|
|
|
|
|
|
width: calc(100% + 32px);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.document-editor-container {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.document-sider {
|
|
|
|
|
|
border-right: 1px solid #f0f0f0;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-header {
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-header h3 {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-actions .ant-btn {
|
|
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
|
border: 1px solid #e8e8e8;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-actions .ant-btn:hover {
|
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
|
background: #e6f7ff;
|
|
|
|
|
|
border-color: #91d5ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree {
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-31 05:44:03 +00:00
|
|
|
|
/* 修复Tree组件文档名过长的显示问题 */
|
|
|
|
|
|
.file-tree .ant-tree-title {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree .ant-tree-node-content-wrapper {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree .ant-tree-treenode {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 确保Tree节点标题区域不折行 */
|
|
|
|
|
|
.file-tree .ant-tree-node-content-wrapper .ant-tree-title {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
max-width: calc(100% - 24px); /* 预留图标空间 */
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap !important;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 修复文档名过长的显示问题(Menu组件,已废弃但保留兼容) */
|
|
|
|
|
|
.file-tree .ant-menu-title-content {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
flex: 1; /* Ensure it allows children to fill width */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Increase hit area for context menu */
|
|
|
|
|
|
.tree-node-wrapper {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree .ant-menu-item,
|
|
|
|
|
|
.file-tree .ant-menu-submenu-title {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
display: flex !important; /* Ensure flex layout for item */
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-25 04:22:35 +00:00
|
|
|
|
.document-content {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 强制覆盖 Ant Design Content 的默认样式 */
|
|
|
|
|
|
.document-editor-container .ant-layout-content {
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
flex-direction: column !important;
|
|
|
|
|
|
flex: 1 !important;
|
|
|
|
|
|
min-width: 0 !important;
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.content-header {
|
|
|
|
|
|
padding: 16px 24px;
|
|
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.editor-container {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-wrapper {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column; /* Changed to column to force child stretch width */
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 5px 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Fix for bytemd-react wrapper div */
|
|
|
|
|
|
.bytemd-wrapper > div {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
height: 100% !important;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-editor {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ByteMD 编辑器样式覆盖 */
|
|
|
|
|
|
.bytemd {
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
height: 100% !important;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
flex-direction: column !important;
|
|
|
|
|
|
border: 1px solid #d9d9d9;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
max-width: none !important; /* Ensure no max-width constraint */
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 工具栏样式 */
|
|
|
|
|
|
.bytemd-toolbar {
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
border-bottom: 1px solid #d9d9d9;
|
|
|
|
|
|
background-color: #fafafa;
|
|
|
|
|
|
box-sizing: border-box; /* Added for consistent box model */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 编辑和预览区域容器 */
|
|
|
|
|
|
.bytemd-body {
|
|
|
|
|
|
flex: 1 !important;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
box-sizing: border-box; /* Added for consistent box model */
|
|
|
|
|
|
min-width: 0; /* Prevent flex item from overflowing */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 编辑区域 - 固定50%宽度 */
|
|
|
|
|
|
.bytemd-editor {
|
|
|
|
|
|
width: 50% !important;
|
|
|
|
|
|
flex: 0 0 50% !important;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
flex-direction: column !important;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
max-width: 50% !important;
|
|
|
|
|
|
box-sizing: border-box; /* Added for consistent box model */
|
|
|
|
|
|
min-width: 0; /* Prevent flex item from overflowing */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 预览区域 - 固定50%宽度 */
|
|
|
|
|
|
.bytemd-preview {
|
|
|
|
|
|
width: 50% !important;
|
|
|
|
|
|
flex: 0 0 50% !important;
|
|
|
|
|
|
overflow-y: auto !important;
|
|
|
|
|
|
overflow-x: hidden !important;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.8;
|
|
|
|
|
|
max-width: 50% !important;
|
|
|
|
|
|
box-sizing: border-box; /* Added for consistent box model */
|
|
|
|
|
|
min-width: 0; /* Prevent flex item from overflowing */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* CodeMirror 容器 */
|
|
|
|
|
|
.bytemd-editor .CodeMirror {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.8;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* CodeMirror 滚动容器 */
|
|
|
|
|
|
.bytemd-editor .CodeMirror-scroll {
|
|
|
|
|
|
overflow-y: scroll !important;
|
|
|
|
|
|
overflow-x: auto !important;
|
|
|
|
|
|
min-height: 100% !important;
|
|
|
|
|
|
height: 100% !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 预览区域的markdown样式 */
|
|
|
|
|
|
.bytemd-preview h1,
|
|
|
|
|
|
.bytemd-preview h2,
|
|
|
|
|
|
.bytemd-preview h3,
|
|
|
|
|
|
.bytemd-preview h4,
|
|
|
|
|
|
.bytemd-preview h5,
|
|
|
|
|
|
.bytemd-preview h6 {
|
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1.25;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview h1 {
|
|
|
|
|
|
font-size: 2em;
|
|
|
|
|
|
border-bottom: 1px solid #eaecef;
|
|
|
|
|
|
padding-bottom: 0.3em;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview h2 {
|
|
|
|
|
|
font-size: 1.5em;
|
|
|
|
|
|
border-bottom: 1px solid #eaecef;
|
|
|
|
|
|
padding-bottom: 0.3em;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview p {
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview code {
|
|
|
|
|
|
padding: 0.2em 0.4em;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 85%;
|
|
|
|
|
|
background-color: rgba(27, 31, 35, 0.05);
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview pre {
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
font-size: 85%;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
background-color: #f6f8fa;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview pre code {
|
|
|
|
|
|
display: inline;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow: visible;
|
|
|
|
|
|
line-height: inherit;
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview img {
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
box-sizing: content-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview table {
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
border-spacing: 0;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview table th,
|
|
|
|
|
|
.bytemd-preview table td {
|
|
|
|
|
|
padding: 6px 13px;
|
|
|
|
|
|
border: 1px solid #dfe2e5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview table th {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
background-color: #f6f8fa;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview blockquote {
|
|
|
|
|
|
margin: 0 0 16px;
|
|
|
|
|
|
padding: 0 1em;
|
|
|
|
|
|
color: #6a737d;
|
|
|
|
|
|
border-left: 0.25em solid #dfe2e5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview ul,
|
|
|
|
|
|
.bytemd-preview ol {
|
|
|
|
|
|
padding-left: 2em;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bytemd-preview li {
|
|
|
|
|
|
margin-bottom: 0.25em;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 文件名过长时显示省略号,不折行 */
|
|
|
|
|
|
.content-header h3 {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
max-width: 600px;
|
2025-12-31 05:44:03 +00:00
|
|
|
|
}
|