Skip to content

Commit

Permalink
feat: v1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Feb 17, 2022
1 parent 4e14480 commit 0cb3e5c
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 141 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "veact-admin",
"version": "1.3.5",
"version": "1.3.6",
"author": "Surmon",
"license": "MIT",
"repository": {
Expand Down
268 changes: 134 additions & 134 deletions public/__demo__/mock/article/calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,139 +10,139 @@
"payload": {}
},
"result": [
{ "count": 1, "day": "2017-02-10" },
{ "count": 3, "day": "2017-02-14" },
{ "count": 2, "day": "2017-02-15" },
{ "count": 1, "day": "2017-02-16" },
{ "count": 2, "day": "2017-02-20" },
{ "count": 1, "day": "2017-02-21" },
{ "count": 1, "day": "2017-02-22" },
{ "count": 1, "day": "2017-03-13" },
{ "count": 1, "day": "2017-03-14" },
{ "count": 2, "day": "2017-03-15" },
{ "count": 1, "day": "2017-03-24" },
{ "count": 1, "day": "2017-04-09" },
{ "count": 1, "day": "2017-04-10" },
{ "count": 2, "day": "2017-04-11" },
{ "count": 1, "day": "2017-04-12" },
{ "count": 1, "day": "2017-04-13" },
{ "count": 1, "day": "2017-04-14" },
{ "count": 2, "day": "2017-04-17" },
{ "count": 2, "day": "2017-04-18" },
{ "count": 1, "day": "2017-04-21" },
{ "count": 1, "day": "2017-04-27" },
{ "count": 1, "day": "2017-05-01" },
{ "count": 1, "day": "2017-05-02" },
{ "count": 1, "day": "2017-05-07" },
{ "count": 1, "day": "2017-05-08" },
{ "count": 1, "day": "2017-05-10" },
{ "count": 1, "day": "2017-06-04" },
{ "count": 1, "day": "2017-06-07" },
{ "count": 1, "day": "2017-06-17" },
{ "count": 1, "day": "2017-06-23" },
{ "count": 1, "day": "2017-06-29" },
{ "count": 1, "day": "2017-07-03" },
{ "count": 1, "day": "2017-07-05" },
{ "count": 1, "day": "2017-07-27" },
{ "count": 1, "day": "2017-08-03" },
{ "count": 1, "day": "2017-08-08" },
{ "count": 1, "day": "2017-08-09" },
{ "count": 1, "day": "2017-09-11" },
{ "count": 1, "day": "2017-09-21" },
{ "count": 1, "day": "2017-10-11" },
{ "count": 1, "day": "2017-10-14" },
{ "count": 1, "day": "2017-10-25" },
{ "count": 1, "day": "2017-11-15" },
{ "count": 1, "day": "2017-11-17" },
{ "count": 1, "day": "2018-01-05" },
{ "count": 1, "day": "2018-01-10" },
{ "count": 1, "day": "2018-01-24" },
{ "count": 1, "day": "2018-01-29" },
{ "count": 1, "day": "2018-02-24" },
{ "count": 1, "day": "2018-03-08" },
{ "count": 2, "day": "2018-03-27" },
{ "count": 1, "day": "2018-03-29" },
{ "count": 1, "day": "2018-04-05" },
{ "count": 1, "day": "2018-04-16" },
{ "count": 1, "day": "2018-07-03" },
{ "count": 2, "day": "2018-07-18" },
{ "count": 1, "day": "2018-07-20" },
{ "count": 1, "day": "2018-07-22" },
{ "count": 1, "day": "2018-07-23" },
{ "count": 1, "day": "2018-08-01" },
{ "count": 1, "day": "2018-08-07" },
{ "count": 1, "day": "2018-08-09" },
{ "count": 1, "day": "2018-08-10" },
{ "count": 1, "day": "2018-08-11" },
{ "count": 2, "day": "2018-08-30" },
{ "count": 2, "day": "2018-08-31" },
{ "count": 1, "day": "2018-09-01" },
{ "count": 1, "day": "2018-09-03" },
{ "count": 1, "day": "2018-09-05" },
{ "count": 1, "day": "2018-09-13" },
{ "count": 1, "day": "2018-09-17" },
{ "count": 1, "day": "2018-10-10" },
{ "count": 1, "day": "2018-10-18" },
{ "count": 1, "day": "2018-11-01" },
{ "count": 1, "day": "2018-11-08" },
{ "count": 1, "day": "2018-11-12" },
{ "count": 1, "day": "2018-11-19" },
{ "count": 2, "day": "2018-11-26" },
{ "count": 1, "day": "2018-12-06" },
{ "count": 1, "day": "2018-12-12" },
{ "count": 1, "day": "2018-12-25" },
{ "count": 1, "day": "2018-12-27" },
{ "count": 1, "day": "2019-01-07" },
{ "count": 1, "day": "2019-01-24" },
{ "count": 1, "day": "2019-02-01" },
{ "count": 1, "day": "2019-02-02" },
{ "count": 1, "day": "2019-03-20" },
{ "count": 1, "day": "2019-03-25" },
{ "count": 1, "day": "2019-03-30" },
{ "count": 1, "day": "2019-04-10" },
{ "count": 1, "day": "2019-04-27" },
{ "count": 1, "day": "2019-05-06" },
{ "count": 1, "day": "2019-05-12" },
{ "count": 2, "day": "2019-06-18" },
{ "count": 1, "day": "2019-07-25" },
{ "count": 1, "day": "2019-08-20" },
{ "count": 1, "day": "2019-08-29" },
{ "count": 1, "day": "2019-09-08" },
{ "count": 1, "day": "2019-09-21" },
{ "count": 1, "day": "2019-09-24" },
{ "count": 1, "day": "2019-09-25" },
{ "count": 2, "day": "2019-10-09" },
{ "count": 1, "day": "2019-10-10" },
{ "count": 1, "day": "2019-10-14" },
{ "count": 1, "day": "2019-11-10" },
{ "count": 1, "day": "2020-01-06" },
{ "count": 1, "day": "2020-02-13" },
{ "count": 2, "day": "2020-05-23" },
{ "count": 1, "day": "2020-05-24" },
{ "count": 1, "day": "2020-08-13" },
{ "count": 1, "day": "2021-03-01" },
{ "count": 1, "day": "2021-03-14" },
{ "count": 2, "day": "2021-05-26" },
{ "count": 1, "day": "2021-06-21" },
{ "count": 1, "day": "2021-07-02" },
{ "count": 1, "day": "2021-07-29" },
{ "count": 1, "day": "2021-08-05" },
{ "count": 1, "day": "2021-08-30" },
{ "count": 2, "day": "2021-09-12" },
{ "count": 1, "day": "2021-09-26" },
{ "count": 1, "day": "2021-10-05" },
{ "count": 1, "day": "2021-10-07" },
{ "count": 2, "day": "2021-10-10" },
{ "count": 1, "day": "2021-10-25" },
{ "count": 1, "day": "2021-11-02" },
{ "count": 1, "day": "2021-11-11" },
{ "count": 1, "day": "2021-12-17" },
{ "count": 1, "day": "2021-12-19" },
{ "count": 1, "day": "2022-01-01" },
{ "count": 1, "day": "2022-01-05" },
{ "count": 1, "day": "2022-01-07" },
{ "count": 1, "day": "2022-01-12" },
{ "count": 1, "day": "2022-01-26" },
{ "count": 1, "day": "2022-01-27" }
{ "count": 1, "date": "2017-02-10" },
{ "count": 3, "date": "2017-02-14" },
{ "count": 2, "date": "2017-02-15" },
{ "count": 1, "date": "2017-02-16" },
{ "count": 2, "date": "2017-02-20" },
{ "count": 1, "date": "2017-02-21" },
{ "count": 1, "date": "2017-02-22" },
{ "count": 1, "date": "2017-03-13" },
{ "count": 1, "date": "2017-03-14" },
{ "count": 2, "date": "2017-03-15" },
{ "count": 1, "date": "2017-03-24" },
{ "count": 1, "date": "2017-04-09" },
{ "count": 1, "date": "2017-04-10" },
{ "count": 2, "date": "2017-04-11" },
{ "count": 1, "date": "2017-04-12" },
{ "count": 1, "date": "2017-04-13" },
{ "count": 1, "date": "2017-04-14" },
{ "count": 2, "date": "2017-04-17" },
{ "count": 2, "date": "2017-04-18" },
{ "count": 1, "date": "2017-04-21" },
{ "count": 1, "date": "2017-04-27" },
{ "count": 1, "date": "2017-05-01" },
{ "count": 1, "date": "2017-05-02" },
{ "count": 1, "date": "2017-05-07" },
{ "count": 1, "date": "2017-05-08" },
{ "count": 1, "date": "2017-05-10" },
{ "count": 1, "date": "2017-06-04" },
{ "count": 1, "date": "2017-06-07" },
{ "count": 1, "date": "2017-06-17" },
{ "count": 1, "date": "2017-06-23" },
{ "count": 1, "date": "2017-06-29" },
{ "count": 1, "date": "2017-07-03" },
{ "count": 1, "date": "2017-07-05" },
{ "count": 1, "date": "2017-07-27" },
{ "count": 1, "date": "2017-08-03" },
{ "count": 1, "date": "2017-08-08" },
{ "count": 1, "date": "2017-08-09" },
{ "count": 1, "date": "2017-09-11" },
{ "count": 1, "date": "2017-09-21" },
{ "count": 1, "date": "2017-10-11" },
{ "count": 1, "date": "2017-10-14" },
{ "count": 1, "date": "2017-10-25" },
{ "count": 1, "date": "2017-11-15" },
{ "count": 1, "date": "2017-11-17" },
{ "count": 1, "date": "2018-01-05" },
{ "count": 1, "date": "2018-01-10" },
{ "count": 1, "date": "2018-01-24" },
{ "count": 1, "date": "2018-01-29" },
{ "count": 1, "date": "2018-02-24" },
{ "count": 1, "date": "2018-03-08" },
{ "count": 2, "date": "2018-03-27" },
{ "count": 1, "date": "2018-03-29" },
{ "count": 1, "date": "2018-04-05" },
{ "count": 1, "date": "2018-04-16" },
{ "count": 1, "date": "2018-07-03" },
{ "count": 2, "date": "2018-07-18" },
{ "count": 1, "date": "2018-07-20" },
{ "count": 1, "date": "2018-07-22" },
{ "count": 1, "date": "2018-07-23" },
{ "count": 1, "date": "2018-08-01" },
{ "count": 1, "date": "2018-08-07" },
{ "count": 1, "date": "2018-08-09" },
{ "count": 1, "date": "2018-08-10" },
{ "count": 1, "date": "2018-08-11" },
{ "count": 2, "date": "2018-08-30" },
{ "count": 2, "date": "2018-08-31" },
{ "count": 1, "date": "2018-09-01" },
{ "count": 1, "date": "2018-09-03" },
{ "count": 1, "date": "2018-09-05" },
{ "count": 1, "date": "2018-09-13" },
{ "count": 1, "date": "2018-09-17" },
{ "count": 1, "date": "2018-10-10" },
{ "count": 1, "date": "2018-10-18" },
{ "count": 1, "date": "2018-11-01" },
{ "count": 1, "date": "2018-11-08" },
{ "count": 1, "date": "2018-11-12" },
{ "count": 1, "date": "2018-11-19" },
{ "count": 2, "date": "2018-11-26" },
{ "count": 1, "date": "2018-12-06" },
{ "count": 1, "date": "2018-12-12" },
{ "count": 1, "date": "2018-12-25" },
{ "count": 1, "date": "2018-12-27" },
{ "count": 1, "date": "2019-01-07" },
{ "count": 1, "date": "2019-01-24" },
{ "count": 1, "date": "2019-02-01" },
{ "count": 1, "date": "2019-02-02" },
{ "count": 1, "date": "2019-03-20" },
{ "count": 1, "date": "2019-03-25" },
{ "count": 1, "date": "2019-03-30" },
{ "count": 1, "date": "2019-04-10" },
{ "count": 1, "date": "2019-04-27" },
{ "count": 1, "date": "2019-05-06" },
{ "count": 1, "date": "2019-05-12" },
{ "count": 2, "date": "2019-06-18" },
{ "count": 1, "date": "2019-07-25" },
{ "count": 1, "date": "2019-08-20" },
{ "count": 1, "date": "2019-08-29" },
{ "count": 1, "date": "2019-09-08" },
{ "count": 1, "date": "2019-09-21" },
{ "count": 1, "date": "2019-09-24" },
{ "count": 1, "date": "2019-09-25" },
{ "count": 2, "date": "2019-10-09" },
{ "count": 1, "date": "2019-10-10" },
{ "count": 1, "date": "2019-10-14" },
{ "count": 1, "date": "2019-11-10" },
{ "count": 1, "date": "2020-01-06" },
{ "count": 1, "date": "2020-02-13" },
{ "count": 2, "date": "2020-05-23" },
{ "count": 1, "date": "2020-05-24" },
{ "count": 1, "date": "2020-08-13" },
{ "count": 1, "date": "2021-03-01" },
{ "count": 1, "date": "2021-03-14" },
{ "count": 2, "date": "2021-05-26" },
{ "count": 1, "date": "2021-06-21" },
{ "count": 1, "date": "2021-07-02" },
{ "count": 1, "date": "2021-07-29" },
{ "count": 1, "date": "2021-08-05" },
{ "count": 1, "date": "2021-08-30" },
{ "count": 2, "date": "2021-09-12" },
{ "count": 1, "date": "2021-09-26" },
{ "count": 1, "date": "2021-10-05" },
{ "count": 1, "date": "2021-10-07" },
{ "count": 2, "date": "2021-10-10" },
{ "count": 1, "date": "2021-10-25" },
{ "count": 1, "date": "2021-11-02" },
{ "count": 1, "date": "2021-11-11" },
{ "count": 1, "date": "2021-12-17" },
{ "count": 1, "date": "2021-12-19" },
{ "count": 1, "date": "2022-01-01" },
{ "count": 1, "date": "2022-01-05" },
{ "count": 1, "date": "2022-01-07" },
{ "count": 1, "date": "2022-01-12" },
{ "count": 1, "date": "2022-01-26" },
{ "count": 1, "date": "2022-01-27" }
]
}
10 changes: 5 additions & 5 deletions src/pages/Dashboard/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const Calendar: React.FC = () => {
}, [])

const months = useComputed(() => {
const firstArticelDate = articleCalendar.value[0]?.day
const firstArticelDate = articleCalendar.value[0]?.date
if (!firstArticelDate) {
return []
}
Expand Down Expand Up @@ -88,13 +88,13 @@ export const Calendar: React.FC = () => {
calendarElement.current?.removeEventListener('wheel', handleCalendarScroll as any)
})

const renderDay = (day: string) => {
const count = articleCalendar.value.find((ac) => ac.day === day)?.count || 0
const renderDay = (date: string) => {
const count = articleCalendar.value.find((ac) => ac.date === date)?.count || 0
const title = !count ? (
day
date
) : (
<span>
{day}
{date}
<Divider type="vertical" />
<strong>{count}</strong>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/store/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getStatistics() {
}

export interface ArticleCalendarItem {
day: string
date: string
count: number
}
/** 获取文章创作日历信息 */
Expand Down

0 comments on commit 0cb3e5c

Please sign in to comment.