diff --git a/.env.development b/.env.development index df0b713..f3b45f2 100644 --- a/.env.development +++ b/.env.development @@ -15,3 +15,5 @@ VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api' VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/' VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/' + +VITE_SHOW_DEV_TOOLS = 'true' diff --git a/.env.production b/.env.production index 79007b1..05e26a6 100644 --- a/.env.production +++ b/.env.production @@ -17,3 +17,5 @@ VITE_BUILD_COMPRESS = gzip VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/' VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/' + +VITE_SHOW_DEV_TOOLS = 'true' diff --git a/src/main/index.js b/src/main/index.js index 44b0d89..87a0ef1 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -73,8 +73,7 @@ function createLoginWindow() { loginWindow.loadFile(join(__dirname, '../renderer/index.html'), { hash: 'login' }) updateInit(loginWindow) } - - loginWindow.webContents.openDevTools() + if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') loginWindow.webContents.openDevTools() loginWindow.once('ready-to-show', () => { loginWindow.show() }) @@ -96,7 +95,6 @@ function createMainWindow() { frame: false, // 无边框 autoHideMenuBar: true, maximizable: false, - fullscreen: true, icon: join(__dirname, '../../resources/logo2.ico'), ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { @@ -129,7 +127,7 @@ function createMainWindow() { shell.openExternal(details.url) return { action: 'deny' } }) - mainWindow.webContents.openDevTools() + if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') mainWindow.webContents.openDevTools() if (is.dev && process.env['ELECTRON_RENDERER_URL']) { mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) @@ -139,6 +137,7 @@ function createMainWindow() { // mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口 // mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 + mainWindow.maximize(); // 第三步: 开启remote服务 remote.enable(mainWindow.webContents) } diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index 85966bb..cf960da 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -34,6 +34,7 @@ export const editListItem = (row, courseObj) => { chooseWorkLists: [],// 设计中的框架梳理list fileHomeworkList: [],// 设计中的常规作业list whiteboardObj: '',// 设计中的课堂展示对象 + question: '', // 设计中的[课堂展示]的问题 }; console.log('编辑的行', row); @@ -99,7 +100,7 @@ export const editListItem = (row, courseObj) => { console.log('row.课堂展示', row.workcodes); const workcodes = JSON.parse(row.workcodes); classtaskObj.whiteboardObj = JSON.stringify(workcodes.json); - // + classtaskObj.question = row.worktag; // console.log('课堂展示', classtaskObj); return resolve(classtaskObj); } diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js index 937b498..445cf22 100644 --- a/src/renderer/src/utils/tool.js +++ b/src/renderer/src/utils/tool.js @@ -138,7 +138,7 @@ export const createWindow = async (type, data) => { wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口 wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口 wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 - wins_tool.webContents.openDevTools() // 打开调试工具 + if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') wins_tool.webContents.openDevTools() // 打开调试工具 eventHandles(type, wins_tool) // 事件监听处理 return wins_tool } @@ -165,7 +165,7 @@ export const createWindow = async (type, data) => { win.type = type // 唯一标识 win.show() win.setFullScreen(true) // 设置窗口为全屏 - win.webContents.openDevTools() // 打开调试工具 + if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') win.webContents.openDevTools() // 打开调试工具 eventHandles(type, win) // 事件监听处理 winPdf=win break diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index 7f16a8d..8b58f5b 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -6,7 +6,7 @@ :collapse="isCollapse" > -
-