File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ module.exports = {
68
68
src : '@/plugins/firebase-admin.js' ,
69
69
ssr : true ,
70
70
} ,
71
+ {
72
+ src : '@/plugins/dayjs.js' ,
73
+ ssr : true ,
74
+ } ,
71
75
] ,
72
76
/*
73
77
** Nuxt.js dev-modules
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" MainPage" >
3
3
<v-row class =" DataBlock" >
4
- <v-col
5
- v-for =" (item, i) in Lessons['2020-04-04']"
6
- :key =" i"
7
- cols =" 12"
8
- md =" 6"
9
- >
4
+ <v-col v-for =" (item, i) in Lessons[today]" :key =" i" cols =" 12" md =" 6" >
10
5
<StudyCard
11
6
:schooltime =" i + 1"
12
7
:realtime =" item.realTime"
@@ -27,6 +22,11 @@ export default {
27
22
computed: {
28
23
... mapGetters (' modules/class' , [' Lessons' ]),
29
24
},
25
+ data () {
26
+ return {
27
+ today: this .$dayjs ().format (' YYYY-MM-DD' ),
28
+ }
29
+ },
30
30
}
31
31
</script >
32
32
Original file line number Diff line number Diff line change
1
+ import dayjs from 'dayjs'
2
+
3
+ export default ( { app } , inject ) => {
4
+ inject ( 'dayjs' , ( string ) => dayjs ( string ) )
5
+ }
You can’t perform that action at this time.
0 commit comments