You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
363 B
17 lines
363 B
4 years ago
|
import 'dayjs/locale/zh-cn';
|
||
|
|
||
|
import dayjs from 'dayjs';
|
||
|
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
||
|
|
||
|
dayjs.locale('zh-cn');
|
||
|
dayjs.extend(isSameOrBefore);
|
||
|
|
||
|
export function setupDayjs(app) {
|
||
|
app.config.globalProperties.$moment = dayjs;
|
||
|
app.config.globalProperties.$dayjs = dayjs;
|
||
|
uni.$moment = dayjs;
|
||
|
uni.$dayjs = dayjs;
|
||
|
}
|
||
|
|
||
|
export { dayjs };
|