Skip to content

Commit

Permalink
[*] 自动按名称分类节点
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Oct 10, 2024
1 parent bac2377 commit 0dcddf4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/views/proxies/AddView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,17 @@ onMounted(async () => {
}
if (!rs) return
let i = 0
rs.data.list.forEach((s) => {
const list = rs.data.list
list.sort((a, b) => {
if (a.name < b.name) {
return -1
}
if (a.name > b.name) {
return 1
}
return 0
})
list.forEach((s) => {
// 默认选择第一个节点
if (i === 0) {
proxyInfo.value.nodeId = s.id
Expand Down

0 comments on commit 0dcddf4

Please sign in to comment.