Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-06-13 14:14:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9cf423ec896a23e972c157cf06a184e5d2ccda0f
9cf423ec
1 parent
4a9f3ef4
fix(进度条): 修复进度条百分比显示精度问题
将进度条百分比计算结果使用 toFixed(1) 保留一位小数,避免显示过多小数位
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
src/views/checkin/IndexCheckInPage.vue
src/views/checkin/IndexCheckInPage.vue
View file @
9cf423e
<!--
* @Date: 2025-05-29 15:34:17
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-1
1 13:38:38
* @LastEditTime: 2025-06-1
3 14:12:53
* @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
* @Description: 文件描述
-->
...
...
@@ -524,7 +524,7 @@ const getTaskDetail = async (month) => {
const { code, data } = await getTaskDetailAPI({ i: route.query.id, month });
if (code) {
taskDetail.value = data;
progress1.value = (
data.checkin_number/data.target_number)*100
; // 计算进度条百分比
progress1.value = (
(data.checkin_number/data.target_number)*100).toFixed(1)
; // 计算进度条百分比
showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条
teamAvatars.value = data.checkin_avatars;
// 获取当前用户的打卡日期
...
...
@@ -700,6 +700,7 @@ const formatData = (data) => {
.post-content {
.post-text {
color: #666;
margin-bottom: 1rem;
}
...
...
Please
register
or
login
to post a comment