Skip to content

Commit

Permalink
优化界面
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiAiAc committed Mar 23, 2023
1 parent 265a800 commit 97da8b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ app.whenReady().then(() => {
const win = new BrowserWindow({
height: 700,
width: 800,
useContentSize: true,
autoHideMenuBar: true,
webPreferences: {
preload: preload as string
}
})

const child = new BrowserWindow({
parent: win,
height: 700,
width: 400,
height: 730,
width: 700,
frame: false,
show: false,
webPreferences: {
preload: preload as string
Expand All @@ -31,12 +34,12 @@ app.whenReady().then(() => {
win.once('ready-to-show', () => {
setTimeout(() => {
const [x, y] = win.getPosition()
child.setPosition(x + 790, y)
child.setPosition(x + 810, y + 1)
child.show()
}, 1000)
})

win.on('will-move', (event, newBounds) => {
child.setPosition(newBounds.x + 790, newBounds.y)
child.setPosition(newBounds.x + 810, newBounds.y + 1)
})
})
3 changes: 2 additions & 1 deletion render/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ console.log(import.meta.env)

setTimeout(() => {
const app = createApp(App)
app.use(createPinia()).mount('#app')
app.use(createPinia())
.mount('#app')
}, 2000)

0 comments on commit 97da8b0

Please sign in to comment.