diff --git a/src/components/GameBox.vue b/src/components/GameBox.vue index 0368c1d..304a5c5 100644 --- a/src/components/GameBox.vue +++ b/src/components/GameBox.vue @@ -7,7 +7,7 @@ {{gameBox.IP}}:{{gameBox.Port}} - {{gameBox.Score}} 分 + {{utils.FormatFloat(gameBox.Score)}} 分 diff --git a/src/components/Info.vue b/src/components/Info.vue index ccb2efd..3275664 100644 --- a/src/components/Info.vue +++ b/src/components/Info.vue @@ -13,7 +13,7 @@ - #{{ info.Rank }} / {{ info.Score }} 分 + #{{ info.Rank }} / {{ utils.FormatFloat(info.Score) }} 分 diff --git a/src/components/SubmitFlag.vue b/src/components/SubmitFlag.vue new file mode 100644 index 0000000..c30050a --- /dev/null +++ b/src/components/SubmitFlag.vue @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/src/utils.js b/src/utils.js index 081ac50..4e0f49d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -61,6 +61,10 @@ export default { }) }, + FormatFloat: (number) => { + return number.toFixed(2) + }, + FormatGoTime: (timeString) => { return new Date(timeString.split('+')[0].replace('T', ' ')) }, diff --git a/src/views/Main.vue b/src/views/Main.vue index 57e44a4..bd60ff3 100644 --- a/src/views/Main.vue +++ b/src/views/Main.vue @@ -1,7 +1,5 @@