Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
e61efa5832
13
src/App.vue
13
src/App.vue
|
@ -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>
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -154,6 +154,7 @@ const columns = [
|
|||
scopedSlots: true,
|
||||
search: {
|
||||
type: 'date',
|
||||
rename: 'registryTime'
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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格式的图片`);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
:params="queryParams"
|
||||
:rowSelection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: (keys:string[])=>selectedRowKeys = keys,
|
||||
onSelect: changeSelect,
|
||||
}"
|
||||
@cancelSelect="selectedRowKeys = []"
|
||||
>
|
||||
|
@ -99,4 +99,14 @@ const confirm = () => {
|
|||
});
|
||||
}
|
||||
};
|
||||
const changeSelect = (item: any, state: boolean) => {
|
||||
const arr = new Set(selectedRowKeys.value);
|
||||
console.log(item,state);
|
||||
if(state){
|
||||
arr.add(item.id)
|
||||
}else{
|
||||
arr.delete(item.id)
|
||||
}
|
||||
selectedRowKeys.value = [...arr.values()];
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue