记录排序

old
宇天 2019-12-13 17:00:01 +08:00
parent ceb4f48903
commit 7b9b9f281a
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "dns-host", "name": "dns-host",
"version": "1.1.0", "version": "1.1.1",
"description": "伪域名解析", "description": "伪域名解析",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -75,7 +75,7 @@ Anot({
}, },
toggleDomain(name) { toggleDomain(name) {
this.activeDomain = name this.activeDomain = name
this.records = dict[name] this.records = dict[name].sort((a, b) => a.record.localeCompare(b.record))
tmp_records = Object.create(null) tmp_records = Object.create(null)
for (let it of this.records) { for (let it of this.records) {
if (tmp_records[it.record]) { if (tmp_records[it.record]) {