add common filter

This commit is contained in:
2022-08-10 10:58:21 +08:00
parent ffd095b6b8
commit df3b11b6dd
2 changed files with 13 additions and 10 deletions

7
src/utils/filters.js Normal file
View File

@@ -0,0 +1,7 @@
/** filters */
export const dictFilter = dictTypeId => {
return val => {
return JSON.parse(localStorage.getItem('dictList'))[dictTypeId].find(item => item.dictValue === val)?.dictLabel || '-'
}
}