mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 05:16:54 +08:00
### What problem does this PR solve? fix(dataset): Optimized the dataset configuration page UI - Added the DataPipelineSelect component for selecting data pipelines - Restructured the layout and style of the dataset settings page - Removed unnecessary components and code - Optimized data pipeline configuration - Adjusted the Create Dataset dialog box - Updated the processing log modal style ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
export function buildSelectOptions(list: Array<string>) {
|
||||
export function buildSelectOptions(
|
||||
list: Array<any>,
|
||||
keyName?: string,
|
||||
valueName?: string,
|
||||
) {
|
||||
if (keyName && valueName) {
|
||||
return list.map((x) => ({ label: x[valueName], value: x[keyName] }));
|
||||
}
|
||||
return list.map((x) => ({ label: x, value: x }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user