From 19c6f47e8aff04a9b837280b3b2e28e11e03d1a7 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Fri, 21 Nov 2025 09:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=80=E5=87=BA=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=89=8D=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../headers/components/setTool/setTool.vue | 102 +++++++++--------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/src/renderer/src/views/components/headers/components/setTool/setTool.vue b/src/renderer/src/views/components/headers/components/setTool/setTool.vue index 6c957e9..5f2bef5 100644 --- a/src/renderer/src/views/components/headers/components/setTool/setTool.vue +++ b/src/renderer/src/views/components/headers/components/setTool/setTool.vue @@ -13,18 +13,10 @@ --> - -
+ +
@@ -52,20 +44,29 @@ eventBus.on('settingPop', (data) => { data ? setPupRef.value.open('current') : setPupRef.value.close() }) const logout = async (e) => { - let res = await LoginApi.logout() - if (window.earth) { - window.earth.destroy() - window.earth = null - } - if (res.code === 200) { - router.push({ - path: '/', - query: { - type: 'logout' + ElMessageBox.confirm('您确定要退出当前账号?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let res = await LoginApi.logout() + if (window.earth) { + window.earth.destroy() + window.earth = null + } + if (res.code === 200) { + router.push({ + path: '/', + query: { + type: 'logout' + } + }) + // localStorage.clear() } }) - // localStorage.clear() - } + .catch(() => { + }) } const fullScreen = (item) => { @@ -78,25 +79,24 @@ const resetShow = (item) => { const setList = ref([ // 标准版本 + // {id: 4, index: 2, icon: 'layerTitleBg', className: 'header_public', callback: this.setShow}, { id: 0, index: 0, - icon: 'beidou', - name: 'locate', + icon: 'out_login', + name: 'logout', className: 'header_public', - dbcallback: (e) => {}, - callback: (e) => {} - // dbcallback: this.flyTo, - // callback: this.locate, + dbcallback: null, + callback: logout }, { id: 1, index: 1, - icon: 'sys_reset', + icon: 'sys_set', + name: 'set', className: 'header_public', - name: 'reset', dbcallback: null, - callback: resetShow + callback: setShow }, { id: 2, @@ -109,30 +109,33 @@ const setList = ref([ }, { id: 3, - index: 3, - icon: 'sys_set', - name: 'set', + index: 4, + icon: 'sys_reset', className: 'header_public', + name: 'reset', dbcallback: null, - callback: setShow + callback: resetShow }, - // {id: 4, index: 2, icon: 'layerTitleBg', className: 'header_public', callback: this.setShow}, { id: 4, index: 4, - icon: 'out_login', - name: 'logout', + icon: 'beidou', + name: 'locate', className: 'header_public', - dbcallback: null, - callback: logout - } + dbcallback: (e) => { }, + callback: (e) => { } + // dbcallback: this.flyTo, + // callback: this.locate, + }, ]) ipcRenderer.invoke('getIsFullScreen').then((res) => { setList.value[2].icon = res ? 'full_screen_exit' : 'full_screen' + setList.value[2].name = res ? 'shrink' : 'fullScreen' }) ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => { setList.value[2].icon = isFullscreen ? 'full_screen_exit' : 'full_screen' + setList.value[2].name = isFullscreen ? 'shrink' : 'fullScreen' }) @@ -147,6 +150,7 @@ ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => { // background: var(--svg-headColorbg); display: flex; align-items: center; + flex-direction: row-reverse; // justify-content: space-between; // border: 1px solid var(--svg-headColor3); padding: 10px 0; @@ -167,15 +171,13 @@ ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => { top: 0; bottom: 0; width: 1px; - background: linear-gradient( - 180deg, - rgba(var(--color-base1), 0), - rgba(var(--color-base1), 1), - rgba(204, 204, 204, 0) - ); + background: linear-gradient(180deg, + rgba(var(--color-base1), 0), + rgba(var(--color-base1), 1), + rgba(204, 204, 204, 0)); } - .set_item.last-item::after { + .set_item.first-item::after { display: none; }