mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 06:10:26 +08:00
优化节点设置交互
This commit is contained in:
@@ -5,6 +5,12 @@ Vue.component("dns-route-selector", {
|
||||
if (routes == null) {
|
||||
routes = []
|
||||
}
|
||||
routes.$sort(function (v1, v2) {
|
||||
if (v1.domainId == v2.domainId) {
|
||||
return v1.code < v2.code
|
||||
}
|
||||
return (v1.domainId < v2.domainId) ? 1 : -1
|
||||
})
|
||||
return {
|
||||
routes: routes,
|
||||
routeCodes: routes.$map(function (k, v) {
|
||||
@@ -49,6 +55,13 @@ Vue.component("dns-route-selector", {
|
||||
this.routeCodes.push(this.routeCode)
|
||||
this.routes.push(route)
|
||||
|
||||
this.routes.$sort(function (v1, v2) {
|
||||
if (v1.domainId == v2.domainId) {
|
||||
return v1.code < v2.code
|
||||
}
|
||||
return (v1.domainId < v2.domainId) ? 1 : -1
|
||||
})
|
||||
|
||||
this.routeCode = ""
|
||||
this.isAdding = false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user