update code style

This commit is contained in:
LiuHao 2023-04-21 11:17:07 +08:00
parent 4722a8ef9b
commit 1eda36201a
2 changed files with 38 additions and 38 deletions

View File

@ -73,18 +73,18 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import SearchMenu from './topBar/search.vue' import SearchMenu from './topBar/search.vue';
import useAppStore from '@/store/modules/app' import useAppStore from '@/store/modules/app';
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user';
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings';
import { getTenantList } from "@/api/login"; import { getTenantList } from "@/api/login";
import { dynamicClear, dynamicTenant } from "@/api/system/tenant"; import { dynamicClear, dynamicTenant } from "@/api/system/tenant";
import { ComponentInternalInstance } from "vue"; import { ComponentInternalInstance } from "vue";
import { TenantVO } from "@/api/types"; import { TenantVO } from "@/api/types";
const appStore = useAppStore() const appStore = useAppStore();
const userStore = useUserStore() const userStore = useUserStore();
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore();
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -99,7 +99,7 @@ const tenantEnabled = ref(true);
const searchMenuRef = ref<InstanceType<typeof SearchMenu>>(); const searchMenuRef = ref<InstanceType<typeof SearchMenu>>();
const openSearchMenu = () => { const openSearchMenu = () => {
searchMenuRef.value?.openSearch() searchMenuRef.value?.openSearch();
} }
// //
@ -116,7 +116,7 @@ const dynamicClearEvent = async () => {
await dynamicClear(); await dynamicClear();
dynamic.value = false; dynamic.value = false;
proxy?.$tab.closeAllPage(); proxy?.$tab.closeAllPage();
proxy?.$router.push('/') proxy?.$router.push('/');
} }
/** 租户列表 */ /** 租户列表 */
@ -133,7 +133,7 @@ defineExpose({
}) })
const toggleSideBar = () => { const toggleSideBar = () => {
appStore.toggleSideBar(false) appStore.toggleSideBar(false);
} }
const logout = async () => { const logout = async () => {

View File

@ -118,7 +118,7 @@ const onHandleSelect = (val: any) => {
const pindex = paths.indexOf("http"); const pindex = paths.indexOf("http");
window.open(paths.substring(pindex, paths.length), "_blank"); window.open(paths.substring(pindex, paths.length), "_blank");
} else { } else {
router.push(paths) router.push(paths);
} }
state.menuQuery = '' state.menuQuery = ''
closeSearch(); closeSearch();