feat: 切换标签异常问题修复

This commit is contained in:
duanshuwen
2025-12-25 23:03:53 +08:00
parent 7ff7232fc6
commit 63b72cbd8e
10 changed files with 84 additions and 16 deletions

View File

@@ -177,7 +177,7 @@ export class TabManager {
const HEADER_HEIGHT = 88
const PADDING = 8
const RIGHT_PANEL_WIDTH = 392 + 80 + 8 // TaskList + SideMenu + Gap
const RIGHT_PANEL_WIDTH = 392 + 80 + 8 + 8 // TaskList + SideMenu + Gap + RightPadding
const x = PADDING
const y = HEADER_HEIGHT + PADDING

View File

@@ -28,6 +28,8 @@ interface SizeOptions {
const SHARED_WINDOW_OPTIONS = {
frame: false,
titleBarStyle: 'hidden',
trafficLightPosition: { x: -100, y: -100 },
show: false,
title: 'NIANXX',
darkTheme: themeManager.isDark,

View File

@@ -136,7 +136,8 @@ export function setupMainWindow() {
mainWindow.webContents.on('did-finish-load', () => {
const url = mainWindow.webContents.getURL()
if (url.includes('/html/index.html') || url.endsWith('index.html')) {
const isDevRoot = MAIN_WINDOW_VITE_DEV_SERVER_URL && (url === MAIN_WINDOW_VITE_DEV_SERVER_URL || url === `${MAIN_WINDOW_VITE_DEV_SERVER_URL}/`)
if (url.includes('/html/index.html') || url.endsWith('index.html') || isDevRoot) {
initTabs()
}
})