v3.14.0 更新;【新增】EasyExcel重磅升级为FastExcel;【新增】使用最强Argon2算法作为密码存储;【新增】大家吐槽的数据字典改为可重复;【新增】前端布局再增加多种样式;

This commit is contained in:
zhuoda
2025-03-12 21:30:24 +08:00
parent e74f179a91
commit fecb3a9d81
207 changed files with 4260 additions and 2019 deletions

View File

@@ -46,7 +46,6 @@ let currentRoute = useRoute();
function updateSelectKeyAndOpenKey() {
// 第一步,根据路由 更新选中 顶级菜单
let parentList = useUserStore().menuParentIdListMap.get(currentRoute.name) || [];
console.log('parentList', parentList)
if (parentList.length === 0) {
topMenuRef.value.updateSelectKey(currentRoute.name);
return;

View File

@@ -1,11 +1,11 @@
<!--
* 递归菜单
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-09-06 20:29:12
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-09-06 20:29:12
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<div class="recursion-container" v-show="topMenu.children && topMenu.children.length > 0">
@@ -39,10 +39,11 @@
</div>
</template>
<script setup>
import { ref, computed } from 'vue';
import { ref, computed, watch } from 'vue';
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
import SubMenu from './sub-menu.vue';
import { router } from '/@/router';
import { useRoute } from 'vue-router';
import _ from 'lodash';
import menuEmitter from './top-expand-menu-mitt';
import { useAppConfigStore } from '/@/store/modules/system/app-config';
@@ -59,10 +60,23 @@ const props = defineProps({
},
});
//菜单宽度
const sideMenuWidth = computed(() => useAppConfigStore().$state.sideMenuWidth);
// 选中的顶级菜单
let topMenu = ref({});
menuEmitter.on('selectTopMenu', onSelectTopMenu);
//动态通知顶部菜单栏侧边栏状态
watch(
topMenu,
(value) => {
let hasSideMenu = value.children && value.children.length > 0;
menuEmitter.emit('sideMenuChange', hasSideMenu);
},
{ immediate: true, deep: true }
);
// 监听选中顶级菜单事件
function onSelectTopMenu(selectedTopMenu) {
topMenu.value = selectedTopMenu;
@@ -75,6 +89,7 @@ function onSelectTopMenu(selectedTopMenu) {
}
//展开的菜单
let currentRoute = useRoute();
const selectedKeys = ref([]);
const openKeys = ref([]);
@@ -87,6 +102,15 @@ function updateSelectKeyAndOpenKey(parentList, currentSelectKey) {
selectedKeys.value = [currentSelectKey];
}
watch(
currentRoute,
(value) => {
selectedKeys.value = [value.name];
},
{
immediate: true,
}
);
// 页面跳转
function turnToPage(route) {
useUserStore().deleteKeepAliveIncludes(route.menuId.toString());
@@ -113,22 +137,22 @@ const color = computed(() => {
background-color: v-bind('color.background');
}
.min-logo {
height: @header-user-height;
line-height: @header-user-height;
padding: 0px 15px 0px 15px;
// background-color: v-bind('color.background');
.min-logo {
height: @header-user-height;
line-height: @header-user-height;
padding: 0px 15px 0px 15px;
// background-color: v-bind('color.background');
width: 80px;
z-index: 21;
display: flex;
justify-content: center;
align-items: center;
.logo-img {
width: 30px;
height: 30px;
}
width: 80px;
z-index: 21;
display: flex;
justify-content: center;
align-items: center;
.logo-img {
width: 30px;
height: 30px;
}
}
.top-menu {
overflow: hidden;
display: flex;

View File

@@ -75,19 +75,22 @@ function updateSelectKey(key) {
defineExpose({ updateSelectKey });
// 动态计算当前导航宽度
let menuInfo = computed(() => {
let hasSideMenu = ref(false);
menuEmitter.on('sideMenuChange', (data) => {
hasSideMenu.value = data;
});
const menuInfo = computed(() => {
let width = '100vw';
let right = '-100vw';
let selectedItem = _.find(menuTree.value, { menuId: Number(selectedKeys.value[0]) });
const hasSecoundMenu = selectedItem && !_.isEmpty(selectedItem.children) && selectedItem.children.some((e) => e.visibleFlag);
if (hasSecoundMenu) {
if (props.collapsed) {
width = 'calc(100vw - 80px)';
right = 'calc(-100vw + 80px)';
} else {
width = 'calc(100vw - 180px)';
right = 'calc(-100vw + 180px)';
}
if (hasSideMenu.value) {
if (props.collapsed) {
width = 'calc(100vw - 80px)';
right = 'calc(-100vw + 80px)';
} else {
width = 'calc(100vw - 180px)';
right = 'calc(-100vw + 180px)';
}
}
return {
width,