mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
feature:优化数据源字段和数组字段展示
This commit is contained in:
@@ -23,6 +23,12 @@ export const filterDict = (value, options) => {
|
||||
}
|
||||
|
||||
export const filterDataSource = (dataSource, value) => {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(item => {
|
||||
const rowLabel = dataSource && dataSource.find(i => i.value === item)
|
||||
return rowLabel?.label
|
||||
})
|
||||
}
|
||||
const rowLabel = dataSource && dataSource.find(item => item.value === value)
|
||||
return rowLabel?.label
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user