This commit is contained in:
xuziqiang
2024-05-15 17:29:42 +08:00
commit d0155dbe3c
7296 changed files with 1832517 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
export const formConfig = {
formLayout: {
vertical: {
layout: 'horizontal',
class: 'ns-vertical-form',
labelCol: { flex: '100px' },
wrapperCol: { span: 20 },
span: 24,
justify: 'start',
labelAlign: 'left',
},
flex: {
class: 'ns-flex-form ns-flex-form-horizontal',
labelCol: { span: 2 },
wrapperCol: { span: 22 },
span: 5,
justify: 'end',
},
flexv2: {
// layout: 'horizontal',
class: 'ns-flex-form ns-flex-form-horizontal',
wrapperCol: { span: 16 },
span: 6,
sm: 8, //≥576px <=768
lg: 6, //>= 768
gutter: [16, 16],
justify: 'space-between',
},
flexVertical: {
class: 'ns-flex-form ns-flex-form-vertical',
labelCol: { span: 8 },
wrapperCol: { span: 16 },
span: 7,
justify: 'space-between',
},
},
};

View File

@@ -0,0 +1,23 @@
import Cookies from 'js-cookie';
export const routerConfig = {
login: () => {
sessionStorage.clear();
if (window.location.href.includes('localhost')) {
window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`;
} else if (window.location.href.includes('http://100.68.2.97:4200/')) {
window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`;
} else {
window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`;
}
},
logout: () => {
Cookies.remove('nervsid');
sessionStorage.clear();
if (window.location.href.includes('localhost')) {
window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`;
} else {
window.location.href = '/logout';
}
},
};

View File

@@ -0,0 +1,22 @@
export const tableConfig = {
pageField: 'page', //当前页
sizeField: 'pageSize', // 每页数量
listField: 'data', // 数据集合
totalField: 'totalCount', // 数据总数
pageFieldOffset: 1, //前端页码1开始后端0 偏移量 1
pageSizeOptions: ['10', '20', '40'], // 分页设置种类
defaultPageSize: 10, // 默认每页数量
paramsPageSizeField: 'pageSize',
paramsPageField: 'page',
paramsOrderField: 'order',
columnActions: {
title: '操作',
width: 106,
dataIndex: 'tableAction',
fixed: 'right',
autoMergeAction: true,
autoCalcWidth: true,
actions: [],
},
scroll: { x: 'max-content' },
};