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

@ -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 {