优化代码

This commit is contained in:
刘祥超
2022-06-08 19:55:57 +08:00
parent 9361a27dca
commit 248ac43f28
3 changed files with 21 additions and 1 deletions

View File

@@ -10,6 +10,16 @@ Vue.component("http-access-log-box", {
}
}
// 对TAG去重
if (accessLog.tags != null && accessLog.tags.length > 0) {
let tagMap = {}
accessLog.tags = accessLog.tags.$filter(function (k, tag) {
let b = (typeof (tagMap[tag]) == "undefined")
tagMap[tag] = true
return b
})
}
return {
accessLog: accessLog
}