Skip to content

Commit b9e84b2

Browse files
authored
Merge pull request #88 from tolerious/feat/refactor-app
✨ Add default data.
2 parents 6a6bdab + 05b159d commit b9e84b2

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/views/HomePage.vue

+31-2
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,44 @@ import Chart from 'chart.js/auto';
8484
import { onMounted, ref } from 'vue';
8585
import { useRouter } from 'vue-router';
8686
87-
const everyDayWordCount = ref([]);
87+
const everyDayWordCount = ref([
88+
{
89+
year: '周一',
90+
count: 0,
91+
},
92+
{
93+
year: '周二',
94+
count: 0,
95+
},
96+
{
97+
year: '周三',
98+
count: 0,
99+
},
100+
{
101+
year: '周四',
102+
count: 0,
103+
},
104+
{
105+
year: '周五',
106+
count: 0,
107+
},
108+
{
109+
year: '周六',
110+
count: 0,
111+
},
112+
{
113+
year: '周日',
114+
count: 0,
115+
},
116+
]);
88117
const todayWordCount = ref(0);
89118
const router = useRouter();
90119
const defaultGroupID = ref('');
91120
92121
onMounted(async () => {
93122
await getGroupList();
123+
getTodayWordCount();
94124
await getEveryDayWordCount();
95-
await getTodayWordCount();
96125
createCollectionChart();
97126
});
98127

0 commit comments

Comments
 (0)