refactor(projects): perf code

This commit is contained in:
Soybean
2024-03-24 03:02:08 +08:00
parent 187098136e
commit f91ef30bd5
54 changed files with 219 additions and 119 deletions

View File

@ -1,11 +1,10 @@
<script setup lang="ts">
import { computed } from 'vue';
import type { VNode } from 'vue';
import { useSvgIconRender } from '@sa/hooks';
import { useAuthStore } from '@/store/modules/auth';
import { useRouterPush } from '@/hooks/common/router';
import { useSvgIcon } from '@/hooks/common/icon';
import { $t } from '@/locales';
import SvgIcon from '@/components/custom/svg-icon.vue';
defineOptions({
name: 'UserAvatar'
@ -13,7 +12,7 @@ defineOptions({
const authStore = useAuthStore();
const { routerPushByKey, toLogin } = useRouterPush();
const { SvgIconVNode } = useSvgIconRender(SvgIcon);
const { SvgIconVNode } = useSvgIcon();
function loginOrRegister() {
toLogin();

View File

@ -8,7 +8,7 @@ import HorizontalMenu from '../global-menu/base-menu.vue';
import GlobalLogo from '../global-logo/index.vue';
import GlobalBreadcrumb from '../global-breadcrumb/index.vue';
import GlobalSearch from '../global-search/index.vue';
import { useMixMenuContext } from '../../hooks/use-mix-menu';
import { useMixMenuContext } from '../../context';
import ThemeButton from './components/theme-button.vue';
import UserAvatar from './components/user-avatar.vue';