2025-12-25 04:22:35 +00:00
|
|
|
|
.document-editor-page {
|
2026-01-01 14:41:10 +00:00
|
|
|
|
height: calc(100vh - 64px);
|
2025-12-31 07:12:56 +00:00
|
|
|
|
/* width: calc(100% + 32px); */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.document-editor-container {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.document-sider {
|
|
|
|
|
|
border-right: 1px solid #f0f0f0;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
overflow: hidden;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-header {
|
2026-01-01 14:41:10 +00:00
|
|
|
|
padding: 16px 20px;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 12px;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
background: #fff;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.sider-header h2 {
|
2025-12-25 04:22:35 +00:00
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
color: #262626;
|
|
|
|
|
|
line-height: 1.5;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sider-actions {
|
|
|
|
|
|
display: flex;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
gap: 8px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mode-toggle-btn {
|
|
|
|
|
|
border-radius: 6px !important;
|
|
|
|
|
|
font-weight: 500 !important;
|
|
|
|
|
|
height: 32px !important;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
align-items: center !important;
|
|
|
|
|
|
padding: 0 12px !important;
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mode-toggle-btn.exit-edit {
|
|
|
|
|
|
background: linear-gradient(135deg, #00b96b 0%, #52c41a 100%) !important;
|
|
|
|
|
|
color: white !important;
|
|
|
|
|
|
box-shadow: 0 2px 6px rgba(0, 185, 107, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mode-toggle-btn:hover {
|
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
|
filter: brightness(1.05);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mode-toggle-btn.exit-edit:hover {
|
|
|
|
|
|
box-shadow: 0 4px 10px rgba(0, 185, 107, 0.3);
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.sider-actions .ant-btn:not(.mode-toggle-btn) {
|
|
|
|
|
|
background: #f0f0f0;
|
|
|
|
|
|
border: 1px solid #d9d9d9;
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.sider-actions .ant-btn:not(.mode-toggle-btn):hover {
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
border-color: #d9d9d9;
|
|
|
|
|
|
color: #1677ff;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree {
|
|
|
|
|
|
padding: 8px;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow-y: auto;
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
max-width: calc(100% - 24px);
|
|
|
|
|
|
/* 预留图标空间 */
|
2025-12-31 05:44:03 +00:00
|
|
|
|
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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
/* Ensure it allows children to fill width */
|
2025-12-31 05:44:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Increase hit area for context menu */
|
|
|
|
|
|
.tree-node-wrapper {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
user-select: none;
|
2025-12-31 07:12:56 +00:00
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
margin: -4px -8px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 选中的文件夹样式 */
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.file-tree .folder-selected>.ant-menu-submenu-title {
|
2025-12-31 07:12:56 +00:00
|
|
|
|
background-color: #e6f7ff !important;
|
|
|
|
|
|
color: #1890ff !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.file-tree .folder-selected>.ant-menu-submenu-title:hover {
|
2025-12-31 07:12:56 +00:00
|
|
|
|
background-color: #bae7ff !important;
|
2025-12-31 05:44:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.file-tree .ant-menu-item,
|
|
|
|
|
|
.file-tree .ant-menu-submenu-title {
|
|
|
|
|
|
overflow: hidden;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
display: flex !important;
|
|
|
|
|
|
/* Ensure flex layout for item */
|
2025-12-31 05:44:03 +00:00
|
|
|
|
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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
/* Changed to column to force child stretch width */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
min-height: 0;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 5px 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Fix for bytemd-react wrapper div */
|
2026-01-01 14:41:10 +00:00
|
|
|
|
.bytemd-wrapper>div {
|
2025-12-25 04:22:35 +00:00
|
|
|
|
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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
max-width: none !important;
|
|
|
|
|
|
/* Ensure no max-width constraint */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 工具栏样式 */
|
|
|
|
|
|
.bytemd-toolbar {
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
border-bottom: 1px solid #d9d9d9;
|
|
|
|
|
|
background-color: #fafafa;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/* Added for consistent box model */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 编辑和预览区域容器 */
|
|
|
|
|
|
.bytemd-body {
|
|
|
|
|
|
flex: 1 !important;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
min-height: 0;
|
|
|
|
|
|
width: 100% !important;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/* Added for consistent box model */
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
/* Prevent flex item from overflowing */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 编辑区域 - 固定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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/* Added for consistent box model */
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
/* Prevent flex item from overflowing */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 预览区域 - 固定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;
|
2026-01-01 14:41:10 +00:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/* Added for consistent box model */
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
/* Prevent flex item from overflowing */
|
2025-12-25 04:22:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
}
|