chore: remove menu mini bg img

This commit is contained in:
vben 2020-10-15 23:08:44 +08:00
parent 6211ba877a
commit 508109e727
3 changed files with 10 additions and 8 deletions

View File

@ -4,8 +4,8 @@ import { Layout } from 'ant-design-vue';
import SideBarTrigger from './SideBarTrigger';
import { menuStore } from '/@/store/modules/menu';
import darkMiniIMg from '/@/assets/images/sidebar/dark-mini.png';
import lightMiniImg from '/@/assets/images/sidebar/light-mini.png';
// import darkMiniIMg from '/@/assets/images/sidebar/dark-mini.png';
// import lightMiniImg from '/@/assets/images/sidebar/light-mini.png';
import darkImg from '/@/assets/images/sidebar/dark.png';
import lightImg from '/@/assets/images/sidebar/light.png';
import { appStore } from '/@/store/modules/app';
@ -27,15 +27,17 @@ export default defineComponent({
// 根据展开状态设置背景图片
const getStyle = computed((): any => {
const collapse = unref(collapseRef);
// const collapse = unref(collapseRef);
const theme = unref(getProjectConfigRef).menuSetting.theme;
let bg = '';
if (theme === MenuThemeEnum.DARK) {
bg = collapse ? darkMiniIMg : darkImg;
// bg = collapse ? darkMiniIMg : darkImg;
bg = darkImg;
}
if (theme === MenuThemeEnum.LIGHT) {
bg = collapse ? lightMiniImg : lightImg;
bg = lightImg;
// bg = collapse ? lightMiniImg : lightImg;
}
return {
'background-image': `url(${bg})`,

View File

@ -38,7 +38,7 @@ export function useFrameKeepAlive() {
const getOpenTabList = computed((): string[] => {
return tabStore.getTabsState.reduce((prev: string[], next) => {
if (next.meta && Reflect.has(next.meta, 'frameSrc')) {
prev.push(next.path);
prev.push(next.path!);
}
return prev;
}, []);

View File

@ -60,8 +60,8 @@
const openLoginVerifyRef = computed(() => appStore.getProjectConfig.openLoginVerify);
const formData = reactive({
account: '',
password: '',
account: 'vben',
password: '123456',
verify: undefined,
});
const formState = reactive({