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