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">
|
<script setup lang="ts">
|
||||||
import { ConfigProvider } from 'jetlinks-ui-components'
|
import { ConfigProvider } from 'jetlinks-ui-components'
|
||||||
import zhCN from 'jetlinks-ui-components/es/locale/zh_CN';
|
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>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import { useMenuStore } from '@/store/menu';
|
||||||
import { clearMenuItem } from 'jetlinks-ui-components/es/ProLayout/util';
|
import { clearMenuItem } from 'jetlinks-ui-components/es/ProLayout/util';
|
||||||
import { AccountMenu } from '@/router/menu'
|
import { AccountMenu } from '@/router/menu'
|
||||||
import { useSystem } from '@/store/system';
|
import { useSystem } from '@/store/system';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
||||||
type StateType = {
|
type StateType = {
|
||||||
collapsed: boolean;
|
collapsed: boolean;
|
||||||
|
@ -52,13 +53,13 @@ const route = useRoute();
|
||||||
const menu = useMenuStore();
|
const menu = useMenuStore();
|
||||||
|
|
||||||
const system = useSystem();
|
const system = useSystem();
|
||||||
const configInfo = system.configInfo;
|
const {configInfo} = storeToRefs(system);
|
||||||
|
|
||||||
const layoutConf = reactive({
|
const layoutConf = reactive({
|
||||||
theme: configInfo.front?.headerTheme || DefaultSetting.layout.theme,
|
theme: configInfo.value.front?.headerTheme || DefaultSetting.layout.theme,
|
||||||
siderWidth: DefaultSetting.layout.siderWidth,
|
siderWidth: DefaultSetting.layout.siderWidth,
|
||||||
logo: configInfo.front?.logo || DefaultSetting.layout.logo,
|
logo: configInfo.value.front?.logo || DefaultSetting.layout.logo,
|
||||||
title: configInfo.front?.title || DefaultSetting.layout.title,
|
title: configInfo.value.front?.title || DefaultSetting.layout.title,
|
||||||
menuData: [...clearMenuItem(menu.siderMenus), AccountMenu],
|
menuData: [...clearMenuItem(menu.siderMenus), AccountMenu],
|
||||||
// menuData: menu.siderMenus,
|
// menuData: menu.siderMenus,
|
||||||
splitMenus: true,
|
splitMenus: true,
|
||||||
|
|
|
@ -154,6 +154,7 @@ const columns = [
|
||||||
scopedSlots: true,
|
scopedSlots: true,
|
||||||
search: {
|
search: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
|
rename: 'registryTime'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -427,7 +427,7 @@ const uploader: uploaderType = {
|
||||||
},
|
},
|
||||||
// 浏览器页签格式校验
|
// 浏览器页签格式校验
|
||||||
beforeIconUpload: (file) => {
|
beforeIconUpload: (file) => {
|
||||||
const typeBool = uploader.iconTypes.includes(file.type);
|
const typeBool = file.type.includes('.icon');
|
||||||
const sizeBool = file.size / 1024 / 1024 < 1;
|
const sizeBool = file.size / 1024 / 1024 < 1;
|
||||||
if (!typeBool) {
|
if (!typeBool) {
|
||||||
message.error(`请上传ico格式的图片`);
|
message.error(`请上传ico格式的图片`);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
:params="queryParams"
|
:params="queryParams"
|
||||||
:rowSelection="{
|
:rowSelection="{
|
||||||
selectedRowKeys: selectedRowKeys,
|
selectedRowKeys: selectedRowKeys,
|
||||||
onChange: (keys:string[])=>selectedRowKeys = keys,
|
onSelect: changeSelect,
|
||||||
}"
|
}"
|
||||||
@cancelSelect="selectedRowKeys = []"
|
@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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue