perf: dict

This commit is contained in:
xingyu4j
2022-11-10 14:38:16 +08:00
parent d22620a7ce
commit d2a4eb9254
6 changed files with 161 additions and 165 deletions

View File

@ -121,10 +121,10 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema[]): VxeFormItemProps[] =>
props: { placeholder: t('common.selectText') }
}
}
const searchSchemaItem = {
// 默认为 input
span: 6,
span: 8,
folding: searchSchema.length > 2,
itemRender: itemRender,
...schemaItem.search,
field: schemaItem.field,
@ -140,7 +140,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema[]): VxeFormItemProps[] =>
const buttons: VxeFormItemProps = {
span: 24,
align: 'center',
collapseNode: true,
collapseNode: searchSchema.length > 3,
itemRender: {
name: '$buttons',
children: [

View File

@ -38,7 +38,7 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => {
const gridOptions = reactive<VxeGridProps>({
loading: true,
size: currentSize as any,
height: 800,
height: 700,
rowConfig: {
isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
isHover: true // 当鼠标移到行时,是否要高亮当前行
@ -97,9 +97,11 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => {
}
})
const delList = (ids: string | number | string[] | number[]) => {
message.delConfirm().then(() => {
config?.delListApi && config?.delListApi(ids)
message.success(t('common.delSuccess'))
return new Promise(async () => {
message.delConfirm().then(() => {
config?.delListApi && config?.delListApi(ids)
message.success(t('common.delSuccess'))
})
})
}
return {