perf: vxe

This commit is contained in:
xingyu4j
2022-11-12 16:46:24 +08:00
parent 725cc4e41b
commit ac47638249
6 changed files with 34 additions and 4 deletions

View File

@ -131,12 +131,12 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
}
const searchSchemaItem = {
// 默认为 input
span: 8,
folding: searchSchema.length > 2,
itemRender: itemRender,
...schemaItem.search,
field: schemaItem.field,
title: schemaItem.search?.title || schemaItem.title
title: schemaItem.search?.title || schemaItem.title,
span: 8
}
// 删除不必要的字段
delete searchSchemaItem.show

View File

@ -85,7 +85,7 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => {
props: { result: 'list', total: 'total' },
ajax: {
query: ({ page, form }) => {
const queryParams = Object.assign({}, form)
const queryParams = Object.assign({}, JSON.parse(JSON.stringify(form)))
queryParams.pageSize = page.pageSize
queryParams.pageNo = page.currentPage
gridOptions.loading = false