perf: update

This commit is contained in:
xiaoxian521
2022-11-12 09:55:20 +08:00
parent df71c7f75c
commit 4f5f18f61c
17 changed files with 368 additions and 377 deletions

View File

@@ -2,11 +2,10 @@
import { ref } from "vue";
import { noticesData } from "./data";
import NoticeList from "./noticeList.vue";
import { templateRef } from "@vueuse/core";
import { Tabs, TabPane } from "@pureadmin/components";
const dropdownDom = templateRef<ElRef | null>("dropdownDom", null);
const activeName = ref(noticesData[0].name);
const dropdownDom = ref();
const activeKey = ref(noticesData[2].key);
const notices = ref(noticesData);
const noticesNum = ref(0);
@@ -33,7 +32,8 @@ function tabClick() {
<Tabs
centered
class="dropdown-tabs"
v-model:activeName="activeName"
:tabBarStyle="{ marginLeft: notices?.length > 4 ? '8px' : '0' }"
v-model="activeKey"
@tabClick="tabClick"
>
<template v-for="item in notices" :key="item.key">

View File

@@ -13,7 +13,6 @@ import { useRouter } from "vue-router";
import panel from "../panel/index.vue";
import { emitter } from "@/utils/mitt";
import { resetRouter } from "@/router";
import { templateRef } from "@vueuse/core";
import { removeToken } from "@/utils/auth";
import { routerArrays } from "@/layout/types";
import { useNav } from "@/layout/hooks/useNav";
@@ -38,9 +37,9 @@ const { isDark } = useDark();
const { isSelect } = useCssModule();
const { $storage } = useGlobal<GlobalPropertiesApi>();
const mixRef = templateRef<HTMLElement | null>("mixRef", null);
const verticalRef = templateRef<HTMLElement | null>("verticalRef", null);
const horizontalRef = templateRef<HTMLElement | null>("horizontalRef", null);
const mixRef = ref();
const verticalRef = ref();
const horizontalRef = ref();
const {
body,

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { isEqual } from "lodash-unified";
import { isEqual } from "@pureadmin/utils";
import { transformI18n } from "@/plugins/i18n";
import { ref, watch, onMounted, toRaw } from "vue";
import { getParentPaths, findRouteByPath } from "@/router/utils";

View File

@@ -9,7 +9,7 @@ import {
getCurrentInstance
} from "vue";
import { tagsViewsType } from "../types";
import { isEqual } from "lodash-unified";
import { isEqual } from "@pureadmin/utils";
import type { StorageConfigs } from "/#/index";
import { useEventListener } from "@vueuse/core";
import { useRoute, useRouter } from "vue-router";