fix: banner移入content-wrapper,标签栏下方直接是两栏布局
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
const editorPanel = document.getElementById('editor-panel');
|
||||
const previewPanel = document.getElementById('preview-panel');
|
||||
const mainContent = document.getElementById('main-content');
|
||||
const contentWrapper = document.getElementById('content-wrapper');
|
||||
const tabList = document.getElementById('tab-list');
|
||||
|
||||
// Sidebar
|
||||
@@ -822,7 +823,7 @@
|
||||
|
||||
document.addEventListener('mousemove', (e) => {
|
||||
if (!isResizing) return;
|
||||
const rect = mainContent.getBoundingClientRect();
|
||||
const rect = contentWrapper.getBoundingClientRect();
|
||||
const pct = Math.max(20, Math.min(80, ((e.clientX - rect.left) / rect.width) * 100));
|
||||
editorPanel.style.flex = `0 0 ${pct}%`;
|
||||
previewPanel.style.flex = `0 0 ${100 - pct}%`;
|
||||
|
||||
Reference in New Issue
Block a user