forked from TangSY/vue3-hash-calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vant.config.mjs
163 lines (160 loc) · 4.14 KB
/
vant.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
const componentsProp = [
'calendar',
'picker-type',
'select-type',
'model',
'visible',
'scroll-change-date',
'default-datetime',
'min-date',
'max-date',
'max-range',
'format',
'week-start',
'mark-date',
'minute-step',
'change-year-fast',
'show-today-button',
'show-week-view',
'show-arrow',
'show-action',
'show-not-current-month-day',
'disabled-week-view',
'disabled-date',
'disabled-time',
'disabled-scroll',
'theme-color',
'lang',
'disabled-class-name',
'not-current-month-day-class-name',
'checked-day-class-name',
'today-class-name',
'first-day-of-month-class-name',
];
const propConfig = componentsProp.map((dir) => ({
path: dir,
title: dir === 'calendar' ? '最简配置' : dir,
}));
const componentsSlot = ['day', 'week', 'arrow', 'action', 'today', 'confirm'];
const slotConfig = componentsSlot.map((dir) => ({
path: `${dir}-slot`,
title: dir,
}));
if (typeof window !== 'undefined') {
Object.defineProperty(window, 'process', {
get() {
return { env: {} };
},
set() {},
});
}
export default {
name: 'vue3-hash-calendar',
build: {
css: {
removeSourceFile: true,
},
namedExport: true,
site: {
publicPath: '/calendar/',
},
srcDir:
process.env.npm_lifecycle_event === 'build' ? './src/calendar' : './src',
},
site: {
title: 'vue3-hash-calendar',
logo: 'https://calendar.hxkj.vip/public/logo.png',
description: '基于 vue3 版本的周 月 时间选择器',
baiduAnalytics: {
seed: 'b0668f30d62e1597bdb36d05edea8960',
},
headHtml: `<style type="text/css">
.hash-demo-title {
padding: 24px;
font-size: 20px;
text-align: center;
}
.hash-notify {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 10px;
color: #fff;
font-size: 14px;
background: #1c71fb;
white-space: pre-wrap;
text-align: center;
word-wrap: break-word;
}
.van-theme-dark .hash-calendar .calendar_group_li {
background: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .calendar_week {
background: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .calendar_title_date {
background: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .calendar_title {
background: var(--van-doc-background-2);
border-bottom: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .calendar_content {
background: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .calendar_group_ul {
background: var(--van-doc-background-2);
}
.van-theme-dark .hash-calendar .year-body {
background: rgb(45, 46, 49);
}
</style>`,
darkModeClass: 'van-theme-dark',
lightModeClass: 'van-theme-light',
links: [
{
logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/weapp.svg',
url: 'https://gitee.com/HashTang/vue3-hash-calendar',
},
{
logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/github.svg',
url: 'https://github.com/TangSY/vue3-hash-calendar',
},
],
nav: [
{
title: '开发指南',
items: [
{ path: 'home', title: '介绍' },
{ path: 'quickstart', title: '快速上手' },
{ path: 'api', title: 'API' },
{ path: 'question', title: '常见问题' },
{ path: 'changelog', title: '更新日志' },
{ path: 'sponsor', title: '赞助' },
],
},
{
title: 'Props 使用指南',
items: propConfig,
},
{
title: 'Event 使用指南',
items: [{ title: '事件回调', path: 'event' }],
},
{
title: 'Method 使用指南',
items: [
{ title: '切换月份', path: 'switch-month' },
{ title: '切换星期', path: 'switch-week' },
{ title: '返回今日', path: 'today' },
{ title: '重置日历到指定日期', path: 'reset' },
],
},
{
title: 'Slot 使用指南',
items: slotConfig,
},
],
},
};