优化节点设置交互

This commit is contained in:
刘祥超
2021-09-13 16:47:34 +08:00
parent 5e09ba302a
commit 084eddecbf
32 changed files with 793 additions and 397 deletions

View File

@@ -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
},