Skip to content

Commit

Permalink
fix region can't mouse event
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Mar 8, 2024
1 parent e5f90a7 commit 7844585
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/renderer/src/layouts/components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="titlebar">
<div class="left no-drag">
<div class="titlebar" @mousedown="handleMouseDown">
<div class="left no-drag" >
<history-control />
<search-bar class="search"/>
</div>
Expand All @@ -25,6 +25,11 @@ import Sponsor from './Sponsor.vue';
const { platform } = window.electron.process;
const handleMouseDown = (event) => {
if (event.detail === 2) {
window.electron.ipcRenderer.send('win:invoke', 'max');
}
}
</script>

<style lang="less" scoped>
Expand All @@ -46,9 +51,6 @@ const { platform } = window.electron.process;
}
.center {
margin-left: 20px;
// .search {
// }
}
.right {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/layouts/components/SystemControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const win = remote.getCurrentWindow();
const isMaxed = ref(false);
const handleWindow = (action: string): void => {
window.electron.ipcRenderer.send('win:invoke', action)
window.electron.ipcRenderer.send('win:invoke', action);
if (action === 'max') isMaxed.value = !isMaxed.value;
}
Expand Down

0 comments on commit 7844585

Please sign in to comment.