fix: ico改变

This commit is contained in:
100011797 2023-03-29 22:04:09 +08:00
parent 922624cbc2
commit 55cd57269d
4 changed files with 20 additions and 5 deletions

View File

@ -12,6 +12,19 @@
<script setup lang="ts">
import { ConfigProvider } from 'jetlinks-ui-components'
import zhCN from 'jetlinks-ui-components/es/locale/zh_CN';
import { storeToRefs } from 'pinia';
import { useSystem } from './store/system';
import DefaultSetting from '../config/config'
const system = useSystem();
const {configInfo} = storeToRefs(system);
watchEffect(() => {
const ico: any = document.querySelector('link[rel="icon"]');
if(ico !== null){
ico.href = configInfo.value?.front?.ico || DefaultSetting?.logo
}
})
</script>

View File

@ -38,6 +38,7 @@ import { useMenuStore } from '@/store/menu';
import { clearMenuItem } from 'jetlinks-ui-components/es/ProLayout/util';
import { AccountMenu } from '@/router/menu'
import { useSystem } from '@/store/system';
import { storeToRefs } from 'pinia';
type StateType = {
collapsed: boolean;
@ -52,13 +53,13 @@ const route = useRoute();
const menu = useMenuStore();
const system = useSystem();
const configInfo = system.configInfo;
const {configInfo} = storeToRefs(system);
const layoutConf = reactive({
theme: configInfo.front?.headerTheme || DefaultSetting.layout.theme,
theme: configInfo.value.front?.headerTheme || DefaultSetting.layout.theme,
siderWidth: DefaultSetting.layout.siderWidth,
logo: configInfo.front?.logo || DefaultSetting.layout.logo,
title: configInfo.front?.title || DefaultSetting.layout.title,
logo: configInfo.value.front?.logo || DefaultSetting.layout.logo,
title: configInfo.value.front?.title || DefaultSetting.layout.title,
menuData: [...clearMenuItem(menu.siderMenus), AccountMenu],
// menuData: menu.siderMenus,
splitMenus: true,

View File

@ -154,6 +154,7 @@ const columns = [
scopedSlots: true,
search: {
type: 'date',
rename: 'registryTime'
},
},
{

View File

@ -427,7 +427,7 @@ const uploader: uploaderType = {
},
//
beforeIconUpload: (file) => {
const typeBool = uploader.iconTypes.includes(file.type);
const typeBool = file.type.includes('.icon');
const sizeBool = file.size / 1024 / 1024 < 1;
if (!typeBool) {
message.error(`请上传ico格式的图片`);