feat(selection): 集成 B1 FastDTW 图形评分
This commit is contained in:
@@ -5,7 +5,9 @@ import { ComponentsPreviewPage } from "@/features/components/pages/components-pr
|
||||
import { HomePage } from "@/features/home/pages/home-page"
|
||||
import {
|
||||
selectionCategoryFilters,
|
||||
selectionSorts,
|
||||
type SelectionCategoryFilter,
|
||||
type SelectionSort,
|
||||
} from "@/features/selection/api/selection.types"
|
||||
import { SelectionResultsPage } from "@/features/selection/pages/selection-results-page"
|
||||
import { SyncPage } from "@/features/sync/pages/sync-page"
|
||||
@@ -44,7 +46,13 @@ const selectionRoute = createRoute({
|
||||
)
|
||||
? (rawCategory as SelectionCategoryFilter)
|
||||
: "all"
|
||||
return { page, pageSize, search: searchValue, category }
|
||||
const rawSort = typeof search.sort === "string" ? search.sort : "code"
|
||||
const sort: SelectionSort = selectionSorts.includes(
|
||||
rawSort as SelectionSort,
|
||||
)
|
||||
? (rawSort as SelectionSort)
|
||||
: "code"
|
||||
return { page, pageSize, search: searchValue, category, sort }
|
||||
},
|
||||
component: SelectionResultsPage,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user