Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(projects): use transformObjectToOption to generate option of obj…
…ect labels
- Loading branch information
1 parent
eb8e49e
commit da611fb
Showing
3 changed files
with
18 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export function transformObjectToOption<T extends object>(obj: T) { | ||
return Object.entries(obj).map(([value, label]) => ({ | ||
value, | ||
label | ||
})) as Common.OptionWithKey<keyof T>[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
da611fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
soybean-admin – ./
soybean-admin-git-main-honghuangdc.vercel.app
soybean-admin-honghuangdc.vercel.app
soybean-admin.vercel.app
soybean.pro
www.soybean.pro