Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
lls_program
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-08-27 17:24:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3549bec8ccd904f9fa788c285989cd3689929742
3549bec8
1 parent
ba6c8fcf
fix: 修正模拟数据中步数对应的value值错误
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/components/PointsCollector.vue
src/components/PointsCollector.vue
View file @
3549bec
...
...
@@ -60,16 +60,16 @@ const isCollecting = ref(false) // 是否正在收集,防止重复触发
*/
const generateMockData = () => {
const mockItems = [
{ id: 1, type: 'steps', value: 500
0
, steps: 5000 },
{ id: 1, type: 'steps', value: 500, steps: 5000 },
{ id: 2, type: 'points', value: 500 },
{ id: 3, type: 'steps', value: 800
0
, steps: 5000 },
{ id: 3, type: 'steps', value: 800, steps: 5000 },
{ id: 4, type: 'points', value: 30 },
{ id: 5, type: 'steps', value: 1200
0
, steps: 12000 },
{ id: 5, type: 'steps', value: 1200, steps: 12000 },
{ id: 6, type: 'points', value: 800 },
{ id: 7, type: 'points', value: 250 },
{ id: 8, type: 'steps', value: 600
0
, steps: 6000 },
{ id: 8, type: 'steps', value: 600, steps: 6000 },
{ id: 9, type: 'points', value: 1000 },
{ id: 10, type: 'steps', value: 1000
0
, steps: 10000 },
{ id: 10, type: 'steps', value: 1000, steps: 10000 },
].map(item => ({ ...item, collecting: false })); // 初始化collecting状态
const maxValue = Math.max(...mockItems.map(i => i.value));
...
...
Please
register
or
login
to post a comment