chore: update element-plus@2.2.14 and perf menu

This commit is contained in:
xiaoxian521 2022-08-19 21:41:49 +08:00
parent 0e76bd4aac
commit 102f27fe30
5 changed files with 12 additions and 39 deletions

View File

@ -49,7 +49,7 @@
"dayjs": "^1.11.4",
"driver.js": "^0.9.8",
"echarts": "^5.3.3",
"element-plus": "^2.2.13",
"element-plus": "^2.2.14",
"element-resize-detector": "^1.2.3",
"js-cookie": "^3.0.1",
"jsbarcode": "^3.11.5",

16
pnpm-lock.yaml generated
View File

@ -57,7 +57,7 @@ specifiers:
dayjs: ^1.11.4
driver.js: ^0.9.8
echarts: ^5.3.3
element-plus: ^2.2.13
element-plus: ^2.2.14
element-resize-detector: ^1.2.3
eslint: ^8.8.0
eslint-plugin-prettier: ^4.0.0
@ -145,7 +145,7 @@ dependencies:
dayjs: 1.11.5
driver.js: 0.9.8
echarts: 5.3.3
element-plus: 2.2.13_vue@3.2.37
element-plus: 2.2.14_vue@3.2.37
element-resize-detector: 1.2.4
js-cookie: 3.0.1
jsbarcode: 3.11.5
@ -1414,7 +1414,7 @@ packages:
}
dependencies:
"@element-plus/icons-vue": 2.0.9_vue@3.2.37
element-plus: 2.2.13_vue@3.2.37
element-plus: 2.2.14_vue@3.2.37
vue: 3.2.37
transitivePeerDependencies:
- "@vue/composition-api"
@ -1426,7 +1426,7 @@ packages:
integrity: sha512-mJBpMj0YkaqTM5TDz+ek/f8h74qRLhDc/gLJhBq0wpyfCgG++Jd/9i+QUj8gedA5oN8IL6LOSFbcvlGDYxHgkw==
}
dependencies:
element-plus: 2.2.13_vue@3.2.37
element-plus: 2.2.14_vue@3.2.37
vue: 3.2.37
transitivePeerDependencies:
- "@vue/composition-api"
@ -4150,10 +4150,10 @@ packages:
}
dev: true
/element-plus/2.2.13_vue@3.2.37:
/element-plus/2.2.14_vue@3.2.37:
resolution:
{
integrity: sha512-dKQ7BPZC8deUPhv+6s4GgOL0GyGj3KpUarywxm6s1nWnHjH6FqeZlUcxPqBvJd7W/d81POayx3B13GP+rfkG9g==
integrity: sha512-V5Pis0OHhePg1RgVogZrcefaVl8vjVn4Pn9Qsh/t2CbFgjg9kKOYFqf/tuP3ObSXGm3X89hpe0W+nLVAsaFnpw==
}
peerDependencies:
vue: ^3.2.0
@ -4164,7 +4164,7 @@ packages:
"@popperjs/core": /@sxzz/popperjs-es/2.11.7
"@types/lodash": 4.14.183
"@types/lodash-es": 4.17.6
"@vueuse/core": 8.9.4_vue@3.2.37
"@vueuse/core": 9.1.0_vue@3.2.37
async-validator: 4.2.5
dayjs: 1.11.5
escape-html: 1.0.3
@ -9076,7 +9076,7 @@ packages:
ace-builds: 1.9.6
ant-design-vue: 3.2.11_vue@3.2.37
core-js: 3.24.1
element-plus: 2.2.13_vue@3.2.37
element-plus: 2.2.14_vue@3.2.37
lodash: 4.17.21
uuid: 8.3.2
vue: 3.2.37

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import Search from "../search/index.vue";
import Notice from "../notice/index.vue";
import SidebarItem from "./sidebarItem.vue";
@ -9,7 +10,6 @@ import { deviceDetection } from "@pureadmin/utils";
import { useTranslationLang } from "../../hooks/useTranslationLang";
import { usePermissionStoreHook } from "/@/store/modules/permission";
import globalization from "/@/assets/svg/globalization.svg?component";
import { ref, watch, nextTick, onMounted, onBeforeUnmount } from "vue";
const menuRef = ref();
@ -21,7 +21,6 @@ const {
logout,
backHome,
onPanel,
handleResize,
menuSelect,
username,
avatarsStyle,
@ -29,20 +28,6 @@ const {
getDropdownItemClass
} = useNav();
function onResizeMenu() {
nextTick(() => {
handleResize(menuRef.value);
});
}
onMounted(() => {
window.addEventListener("resize", onResizeMenu);
});
onBeforeUnmount(() => {
window.removeEventListener("resize", onResizeMenu);
});
watch(
() => route.path,
() => {

View File

@ -6,12 +6,12 @@ import { useNav } from "/@/layout/hooks/useNav";
import { transformI18n } from "/@/plugins/i18n";
import screenfull from "../screenfull/index.vue";
import { deviceDetection } from "@pureadmin/utils";
import { ref, toRaw, watch, onMounted } from "vue";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
import { getParentPaths, findRouteByPath } from "/@/router/utils";
import { useTranslationLang } from "../../hooks/useTranslationLang";
import { usePermissionStoreHook } from "/@/store/modules/permission";
import globalization from "/@/assets/svg/globalization.svg?component";
import { ref, toRaw, watch, nextTick, onMounted, onBeforeUnmount } from "vue";
const menuRef = ref();
let defaultActive = ref(null);
@ -23,7 +23,6 @@ const {
routers,
logout,
onPanel,
handleResize,
menuSelect,
resolvePath,
username,
@ -42,19 +41,8 @@ function getDefaultActive(routePath) {
)?.children[0]?.path;
}
function onResizeMenu() {
nextTick(() => {
handleResize(menuRef.value);
});
}
onMounted(() => {
getDefaultActive(route.path);
window.addEventListener("resize", onResizeMenu);
});
onBeforeUnmount(() => {
window.removeEventListener("resize", onResizeMenu);
});
watch(

View File

@ -54,7 +54,7 @@ export interface ResponsiveStorage {
export interface RouteChildrenConfigsTable {
/** 子路由地址 `必填` */
path: string;
/** 路由名字(对应不要重复,当前组件的`name`保持一致)`必填` */
/** 路由名字(对应不要重复,当前组件的`name`保持一致)`必填` */
name?: string;
/** 路由重定向 `可选` */
redirect?: string;