Browse Source

✨ feat: 关闭登录器页面时关闭代理

Pchen. 10 months ago
parent
commit
b0d0b59030
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/pages/openProxy/index.vue

+ 7 - 2
src/pages/openProxy/index.vue

@@ -21,11 +21,10 @@
             </div>
             </div>
         </a-card>
         </a-card>
     </div>
     </div>
-
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { ref } from 'vue'
+import { ref, onUnmounted } from 'vue'
 
 
 const ready = ref(false)
 const ready = ref(false)
 const loading = ref(false)
 const loading = ref(false)
@@ -89,6 +88,12 @@ const closeProxy = async () => {
     loading.value = false
     loading.value = false
 }
 }
 
 
+onUnmounted(() => {
+    if(ready.value) {
+        closeProxy()
+    }
+})
+
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>