update 优化 控制台debuger位置错误问题

update 优化 TopNav 菜单样式
fix 修复 布局配置失效问题
This commit is contained in:
疯狂的狮子Li 2023-09-01 11:38:13 +08:00
parent 78d120c423
commit c85f0a1995
12 changed files with 54 additions and 25 deletions

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2019 RuoYi-Vue-Plus
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -76,7 +76,7 @@
"vite": "4.3.1", "vite": "4.3.1",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1", "vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-setup-extend": "^0.4.0", "unplugin-vue-setup-extend-plus": "0.4.9",
"vitest": "^0.29.7", "vitest": "^0.29.7",
"vue-eslint-parser": "9.1.0", "vue-eslint-parser": "9.1.0",
"vue-tsc": "0.35.0" "vue-tsc": "0.35.0"

View File

@ -2,7 +2,9 @@
<el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect" :ellipsis="false"> <el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect" :ellipsis="false">
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
><svg-icon :icon-class="item.meta ? item.meta.icon : '' " /> {{ item.meta?.title }}</el-menu-item ><svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta ? item.meta.icon : '' " /> {{ item.meta?.title }}</el-menu-item
> >
</template> </template>
@ -180,4 +182,14 @@ onMounted(() => {
padding: 0 5px !important; padding: 0 5px !important;
margin: 0 10px !important; margin: 0 10px !important;
} }
/* 背景色隐藏 */
.topmenu-container.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .topmenu-container.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .topmenu-container.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
background-color: #ffffff !important;
}
/* 图标右间距 */
.topmenu-container .svg-icon {
margin-right: 4px;
}
</style> </style>

View File

@ -58,7 +58,7 @@
<router-link to="/user/profile" v-if="!dynamic"> <router-link to="/user/profile" v-if="!dynamic">
<el-dropdown-item>{{ $t('navbar.personalCenter') }}</el-dropdown-item> <el-dropdown-item>{{ $t('navbar.personalCenter') }}</el-dropdown-item>
</router-link> </router-link>
<el-dropdown-item command="setLayout"> <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">
<span>{{ $t('navbar.layoutSetting') }}</span> <span>{{ $t('navbar.layoutSetting') }}</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided command="logout"> <el-dropdown-item divided command="logout">
@ -73,7 +73,7 @@
</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';

View File

@ -278,7 +278,7 @@ onMounted(() => {
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
position: relative; position: relative;
margin-right: 2px; margin-right: 5px;
} }
} }
} }

View File

@ -13,7 +13,7 @@ const setting: DefaultSettings = {
/** /**
* *
*/ */
showSettings: false, showSettings: true,
/** /**
* *

View File

@ -11,13 +11,13 @@ export const useSettingsStore = defineStore('setting', () => {
title: ref<string>(''), title: ref<string>(''),
theme: ref<string>(storageSetting.theme || defaultSettings.theme), theme: ref<string>(storageSetting.theme || defaultSettings.theme),
sideTheme: ref<string>(storageSetting.sideTheme || defaultSettings.sideTheme), sideTheme: ref<string>(storageSetting.sideTheme || defaultSettings.sideTheme),
showSettings: ref<boolean>(storageSetting.showSettings), showSettings: ref<boolean>(storageSetting.showSettings || defaultSettings.showSettings),
topNav: ref<boolean>(storageSetting.topNav || defaultSettings.topNav), topNav: ref<boolean>(storageSetting.topNav === undefined ? defaultSettings.topNav : storageSetting.topNav),
tagsView: ref<boolean>(storageSetting.tagsView || defaultSettings.tagsView), tagsView: ref<boolean>(storageSetting.tagsView === undefined ? defaultSettings.tagsView : storageSetting.tagsView),
fixedHeader: ref<boolean>(storageSetting.fixedHeader || defaultSettings.fixedHeader), fixedHeader: ref<boolean>(storageSetting.fixedHeader === undefined ? defaultSettings.fixedHeader : storageSetting.fixedHeader),
sidebarLogo: ref<boolean>(storageSetting.sidebarLogo || defaultSettings.sidebarLogo), sidebarLogo: ref<boolean>(storageSetting.sidebarLogo === undefined ? defaultSettings.sidebarLogo : storageSetting.sidebarLogo),
dynamicTitle: ref<boolean>(storageSetting.dynamicTitle || defaultSettings.dynamicTitle), dynamicTitle: ref<boolean>(storageSetting.dynamicTitle === undefined ? defaultSettings.dynamicTitle : storageSetting.dynamicTitle),
animationEnable: ref<boolean>(storageSetting.animationEnable || defaultSettings.animationEnable), animationEnable: ref<boolean>(storageSetting.animationEnable === undefined ? defaultSettings.animationEnable : storageSetting.animationEnable),
dark: ref<boolean>(storageSetting.dark || defaultSettings.dark) dark: ref<boolean>(storageSetting.dark || defaultSettings.dark)
}; };

View File

@ -10,7 +10,7 @@
</template> </template>
<div> <div>
<div class="text-center"> <div class="text-center">
<userAvatar :user="state.user" /> <userAvatar/>
</div> </div>
<ul class="list-group list-group-striped"> <ul class="list-group list-group-striped">
<li class="list-group-item"> <li class="list-group-item">
@ -66,10 +66,7 @@
</template> </template>
<script setup name="Profile" lang="ts"> <script setup name="Profile" lang="ts">
import userAvatar from "./userAvatar.vue"; import UserAvatar from "./userAvatar.vue";
import userInfo from "./userInfo.vue";
import resetPwd from "./resetPwd.vue";
import thirdParty from "./thirdParty.vue";
import { getAuthList } from "@/api/system/social/auth"; import { getAuthList } from "@/api/system/social/auth";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";

View File

@ -5,7 +5,7 @@ import createComponents from './components';
import createIcons from './icons'; import createIcons from './icons';
import createSvgIconsPlugin from './svg-icon'; import createSvgIconsPlugin from './svg-icon';
import createCompression from './compression'; import createCompression from './compression';
import createVueSetupExtend from './vue-setup-extend'; import createSetupExtend from './setup-extend';
import path from 'path'; import path from 'path';
export default (viteEnv: any, isBuild = false): [] => { export default (viteEnv: any, isBuild = false): [] => {
@ -17,6 +17,6 @@ export default (viteEnv: any, isBuild = false): [] => {
vitePlusgins.push(createCompression(viteEnv)); vitePlusgins.push(createCompression(viteEnv));
vitePlusgins.push(createIcons()); vitePlusgins.push(createIcons());
vitePlusgins.push(createSvgIconsPlugin(path, isBuild)); vitePlusgins.push(createSvgIconsPlugin(path, isBuild));
vitePlusgins.push(createVueSetupExtend()); vitePlusgins.push(createSetupExtend());
return vitePlusgins; return vitePlusgins;
}; };

View File

@ -0,0 +1,5 @@
import setupExtend from 'unplugin-vue-setup-extend-plus/vite'
export default () => {
return setupExtend({})
};

View File

@ -1,5 +0,0 @@
import VueSetupExtend from 'vite-plugin-vue-setup-extend';
export default () => {
return VueSetupExtend();
};