mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
修复访问日志耗时可能显示NaN的Bug
This commit is contained in:
@@ -16,13 +16,16 @@ Vue.component("http-access-log-box", {
|
||||
},
|
||||
methods: {
|
||||
formatCost: function (seconds) {
|
||||
var s = (seconds * 1000).toString();
|
||||
var pieces = s.split(".");
|
||||
if (seconds == null) {
|
||||
return "0"
|
||||
}
|
||||
let s = (seconds * 1000).toString();
|
||||
let pieces = s.split(".");
|
||||
if (pieces.length < 2) {
|
||||
return s;
|
||||
}
|
||||
|
||||
return pieces[0] + "." + pieces[1].substr(0, 3);
|
||||
return pieces[0] + "." + pieces[1].substring(0, 3);
|
||||
},
|
||||
showLog: function () {
|
||||
let that = this
|
||||
|
||||
Reference in New Issue
Block a user