|
1 | 1 | <template>
|
2 |
| - <h1 class="hash-demo-title">默认</h1> |
| 2 | + <h1 class="hash-demo-title">默认标记方式</h1> |
3 | 3 | <vue-hash-calendar
|
4 | 4 | :mark-date="[
|
5 |
| - '2022/11/11', |
6 |
| - '2022/12/11', |
7 |
| - '2023/01/11', |
8 |
| - '2023/02/11', |
9 |
| - '2023/03/11', |
10 |
| - '2023/04/11', |
11 |
| - '2023/05/11', |
| 5 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/01`, |
| 6 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/05`, |
| 7 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/10`, |
| 8 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/15`, |
| 9 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/20`, |
| 10 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/25`, |
| 11 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/28`, |
| 12 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/16`, |
| 13 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/18`, |
12 | 14 | ]"
|
13 | 15 | />
|
14 | 16 |
|
|
18 | 20 | {
|
19 | 21 | color: '#f00',
|
20 | 22 | date: [
|
21 |
| - '2022/11/11', |
22 |
| - '2022/12/11', |
23 |
| - '2023/01/11', |
24 |
| - '2023/02/11', |
25 |
| - '2023/03/11', |
26 |
| - '2023/04/11', |
27 |
| - '2023/05/11', |
| 23 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/01`, |
| 24 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/05`, |
| 25 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/10`, |
| 26 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/15`, |
| 27 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/20`, |
| 28 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/25`, |
| 29 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/28`, |
| 30 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/16`, |
| 31 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/18`, |
28 | 32 | ],
|
29 | 33 | },
|
30 | 34 | ]"
|
|
34 | 38 | <vue-hash-calendar
|
35 | 39 | :mark-date="[
|
36 | 40 | {
|
37 |
| - type: 'dot', |
| 41 | + type: 'circle', |
38 | 42 | date: [
|
39 |
| - '2022/11/11', |
40 |
| - '2022/12/11', |
41 |
| - '2023/01/11', |
42 |
| - '2023/02/11', |
43 |
| - '2023/03/11', |
44 |
| - '2023/04/11', |
45 |
| - '2023/05/11', |
| 43 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/01`, |
| 44 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/05`, |
| 45 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/10`, |
| 46 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/15`, |
| 47 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/20`, |
| 48 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/25`, |
| 49 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/28`, |
| 50 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/16`, |
| 51 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/18`, |
46 | 52 | ],
|
47 | 53 | },
|
48 | 54 | ]"
|
|
54 | 60 | {
|
55 | 61 | color: '#f00',
|
56 | 62 | type: 'dot+circle',
|
57 |
| - date: ['2022/11/11', '2022/12/11', '2023/04/11'], |
| 63 | + date: [ |
| 64 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/01`, |
| 65 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/05`, |
| 66 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/10`, |
| 67 | + ], |
58 | 68 | },
|
59 | 69 | {
|
60 |
| - type: 'dot', |
61 |
| - date: ['2023/01/11', '2023/02/11', '2023/03/11'], |
| 70 | + color: '#0f0', |
| 71 | + type: 'circle', |
| 72 | + date: [ |
| 73 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/15`, |
| 74 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/20`, |
| 75 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/25`, |
| 76 | + ], |
62 | 77 | },
|
63 |
| - '2023/05/11', |
| 78 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/28`, |
| 79 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/16`, |
| 80 | + `${new Date().getFullYear()}/${new Date().getMonth() + 1}/18`, |
64 | 81 | ]"
|
65 | 82 | />
|
66 | 83 | </template>
|
|
0 commit comments