优化游戏页面进度显示逻辑,新增剩余积分计算和展示格式选择,提升用户体验
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
<div class="tab-header">
|
||||
<div class="tab-item active">{{ regionDesc || (region === 'Q' ? 'QQ区' : region === 'V' ? '微信区' : region) }}</div>
|
||||
<div class="tab-item status-tab">{{ displayStatus }}</div>
|
||||
<div class="tab-item target-tab">{{ completedPoints || 0 }}/{{ totalPoints || 0 }}</div>
|
||||
<div class="tab-item target-tab" v-if="progressDisplayFormat === '1'">{{ completedPoints || 0 }}/{{ totalPoints || 0 }}</div>
|
||||
<div class="tab-item target-tab" v-else>差:{{ remainingPoints }}</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,6 +95,10 @@ export default {
|
||||
codeNo: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
progressDisplayFormat: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -100,6 +106,14 @@ export default {
|
||||
timestamp: Date.now()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
remainingPoints() {
|
||||
const total = this.totalPoints || 0
|
||||
const completed = this.completedPoints || 0
|
||||
const diff = total - completed
|
||||
return diff > 0 ? diff : 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setupImageRefresh()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user