Compare commits
2 Commits
77c1ca7d50
...
d6c302fc04
Author | SHA1 | Date |
---|---|---|
lyc | d6c302fc04 | |
lyc | 277a5ec873 |
|
@ -9,6 +9,10 @@
|
|||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -30,7 +34,18 @@ const maximizeWindow = () => {
|
|||
}
|
||||
//关闭
|
||||
const closeWindow = () => {
|
||||
ipcRenderer?.send('close-window')
|
||||
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
ipcRenderer && ipcRenderer.send('close-window')
|
||||
}).catch(()=>{
|
||||
|
||||
ipcRenderer && ipcRenderer.send('close-window')
|
||||
})
|
||||
}).catch(() => { });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ function handleCommand(command) {
|
|||
}
|
||||
|
||||
function logout() {
|
||||
ElMessageBox.confirm('确认退出系统', '提示', {
|
||||
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
|
Loading…
Reference in New Issue