From 1eda36201af83f63f4f33afef109730895956aa2 Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail>
Date: 星期五, 21 四月 2023 11:17:07 +0800
Subject: [PATCH] update code style

---
 src/layout/components/topBar/search.vue |   20 +++++-----
 src/layout/components/Navbar.vue        |   56 ++++++++++++++--------------
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 8b9624e..960bc2d 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -73,18 +73,18 @@
 </template>
 
 <script setup lang="ts">
-import SearchMenu from './topBar/search.vue'
-import useAppStore from '@/store/modules/app'
-import useUserStore from '@/store/modules/user'
-import useSettingsStore from '@/store/modules/settings'
+import SearchMenu from './topBar/search.vue';
+import useAppStore from '@/store/modules/app';
+import useUserStore from '@/store/modules/user';
+import useSettingsStore from '@/store/modules/settings';
 import { getTenantList } from "@/api/login";
 import { dynamicClear, dynamicTenant } from "@/api/system/tenant";
 import { ComponentInternalInstance } from "vue";
 import { TenantVO } from "@/api/types";
 
-const appStore = useAppStore()
-const userStore = useUserStore()
-const settingsStore = useSettingsStore()
+const appStore = useAppStore();
+const userStore = useUserStore();
+const settingsStore = useSettingsStore();
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
@@ -99,48 +99,48 @@
 const searchMenuRef = ref<InstanceType<typeof SearchMenu>>();
 
 const openSearchMenu = () => {
-  searchMenuRef.value?.openSearch()
+  searchMenuRef.value?.openSearch();
 }
 
 // 鍔ㄦ�佸垏鎹�
 const dynamicTenantEvent = async (tenantId: string) => {
-    if (companyName.value != null && companyName.value !== '') {
-        await dynamicTenant(tenantId);
-        dynamic.value = true;
-        proxy?.$tab.closeAllPage();
-        proxy?.$router.push('/');
-    }
+  if (companyName.value != null && companyName.value !== '') {
+    await dynamicTenant(tenantId);
+    dynamic.value = true;
+    proxy?.$tab.closeAllPage();
+    proxy?.$router.push('/');
+  }
 }
 
 const dynamicClearEvent = async () => {
-    await dynamicClear();
-    dynamic.value = false;
-    proxy?.$tab.closeAllPage();
-    proxy?.$router.push('/')
+  await dynamicClear();
+  dynamic.value = false;
+  proxy?.$tab.closeAllPage();
+  proxy?.$router.push('/');
 }
 
 /** 绉熸埛鍒楄〃 */
 const initTenantList = async () => {
-    const { data } = await getTenantList();
-    tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled;
-    if (tenantEnabled.value) {
-        tenantList.value = data.voList;
-    }
+  const { data } = await getTenantList();
+  tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled;
+  if (tenantEnabled.value) {
+    tenantList.value = data.voList;
+  }
 }
 
 defineExpose({
-    initTenantList,
+  initTenantList,
 })
 
 const toggleSideBar = () => {
-    appStore.toggleSideBar(false)
+  appStore.toggleSideBar(false);
 }
 
 const logout = async () => {
     await ElMessageBox.confirm('纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
+      confirmButtonText: '纭畾',
+      cancelButtonText: '鍙栨秷',
+      type: 'warning'
     })
     await userStore.logout()
     location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index';
diff --git a/src/layout/components/topBar/search.vue b/src/layout/components/topBar/search.vue
index 3b707e4..9dee360 100644
--- a/src/layout/components/topBar/search.vue
+++ b/src/layout/components/topBar/search.vue
@@ -87,12 +87,12 @@
 					title: [...prefixTitle]
 				}
 				if (r.meta && r.meta.title) {
-						data.title = [...data.title, r.meta.title];
-						if (r.redirect !== 'noRedirect') {
-								// only push the routes with title
-								// special case: need to exclude parent router without redirect
-								res.push(data);
-						}
+					data.title = [...data.title, r.meta.title];
+					if (r.redirect !== 'noRedirect') {
+						// only push the routes with title
+						// special case: need to exclude parent router without redirect
+            res.push(data);
+					}
 				}
 				// recursive child routes
 				if (r.children) {
@@ -114,11 +114,11 @@
 const onHandleSelect = (val: any) => {
 	const paths = val.path;
 	if (isHttp(paths)) {
-			// http(s):// 璺緞鏂扮獥鍙f墦寮�
-			const pindex = paths.indexOf("http");
-			window.open(paths.substring(pindex, paths.length), "_blank");
+		// http(s):// 璺緞鏂扮獥鍙f墦寮�
+		const pindex = paths.indexOf("http");
+		window.open(paths.substring(pindex, paths.length), "_blank");
 	} else {
-			router.push(paths)
+		router.push(paths);
 	}
 	state.menuQuery = ''
 	closeSearch();

--
Gitblit v1.9.3