push
This commit is contained in:
45
lib/saas/config/form.config.ts
Normal file
45
lib/saas/config/form.config.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
export const formConfig = {
|
||||
formLayout: {
|
||||
vertical: {
|
||||
layout: 'horizontal',
|
||||
class: 'ns-vertical-form',
|
||||
wrapperCol: { span: 16 },
|
||||
labelCol: { span: 6 },
|
||||
span: 24,
|
||||
sm: null, //≥576px <=768
|
||||
lg: null, //>= 768
|
||||
gutter: [0, 0],
|
||||
justify: 'space-around',
|
||||
},
|
||||
flex: {
|
||||
// layout: 'horizontal',
|
||||
class: 'ns-flex-form ns-flex-form-horizontal',
|
||||
wrapperCol: { span: 16 },
|
||||
span: 7,
|
||||
sm: null, //≥576px <=768
|
||||
lg: null, //>= 768
|
||||
gutter: [0, 0],
|
||||
justify: 'space-between',
|
||||
},
|
||||
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: {
|
||||
layout: 'vertical',
|
||||
class: 'ns-flex-form ns-flex-form-vertical',
|
||||
wrapperCol: {},
|
||||
span: 7,
|
||||
sm: null, //≥576px <=768
|
||||
lg: null, //>= 768
|
||||
gutter: [0, 0],
|
||||
justify: 'space-between',
|
||||
},
|
||||
},
|
||||
};
|
||||
12
lib/saas/config/router.config.ts
Normal file
12
lib/saas/config/router.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { router } from '../router';
|
||||
import { Cookies } from '/nerv-lib/util/cookie';
|
||||
export const routerConfig = {
|
||||
router: router,
|
||||
login: 'login',
|
||||
logout: () => {
|
||||
Cookies.remove('nervsid');
|
||||
Cookies.remove('token');
|
||||
sessionStorage.clear();
|
||||
router.push('/login');
|
||||
},
|
||||
};
|
||||
24
lib/saas/config/table.config.ts
Normal file
24
lib/saas/config/table.config.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
export const tableConfig = {
|
||||
pageField: 'data.page', //当前页
|
||||
pageCount: 'data.pageCount', //当前页
|
||||
sizeField: 'data.pageSize', // 每页数量
|
||||
listField: 'data.data', // 数据集合
|
||||
totalField: 'data.items', // 数据总数
|
||||
|
||||
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' },
|
||||
};
|
||||
Reference in New Issue
Block a user