Skip to content

Commit e01bce1

Browse files
committed
fix: 添加模型时选择框里的模型按照名称排序
--bug=1048208 --user=刘瑞斌 优化:【系统管理-模型设置】添加模型,显示的供应商里列表和左边的供应商列表排序不一致 https://www.tapd.cn/57709429/s/1599397
1 parent f3c84ee commit e01bce1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/src/views/template/component/SelectProviderDialog.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const open = () => {
6464
dialogVisible.value = true
6565
ModelApi.getProvider(loading).then((ok) => {
6666
list_provider.value = ok.data
67+
list_provider.value.sort((a, b) => a.provider.localeCompare(b.provider))
6768
})
6869
}
6970
@@ -75,6 +76,7 @@ const checkModelType = (model_type: string) => {
7576
currentModelType.value = modelTypeOptions.value.filter((item) => item.value === model_type)[0].text
7677
ModelApi.getProviderByModelType(model_type, loading).then((ok) => {
7778
list_provider.value = ok.data
79+
list_provider.value.sort((a, b) => a.provider.localeCompare(b.provider))
7880
})
7981
}
8082

0 commit comments

Comments
 (0)