Optimize code to avoid duplicate types

This commit is contained in:
LittleBoy 2024-08-15 17:59:23 +08:00
parent bccd926e3f
commit 7d901cf35a

View File

@ -17,6 +17,8 @@ export function useBillTypes(){
const types = ret.filter(it=>!it.description.toUpperCase().startsWith('ADJUSTMENT'))
.map(it=>({value: it.type, label: it.description}))
setBillTypes(types)
// 避免出现多次
BillTypesCache.length = 0;
BillTypesCache.push(...types)
})
}