Appropriately type calendarOptions and calendars list
This commit is contained in:
parent
959cd7e8b0
commit
3a6890e3cb
@ -10,6 +10,7 @@
|
|||||||
"@babel/core": "^7.8.7",
|
"@babel/core": "^7.8.7",
|
||||||
"@babel/plugin-transform-runtime": "^7.8.3",
|
"@babel/plugin-transform-runtime": "^7.8.3",
|
||||||
"@babel/preset-env": "^7.8.7",
|
"@babel/preset-env": "^7.8.7",
|
||||||
|
"@types/fullcalendar__vue": "^4.4.0",
|
||||||
"@vue/component-compiler-utils": "^3.0.0",
|
"@vue/component-compiler-utils": "^3.0.0",
|
||||||
"sass": "^1.23.1",
|
"sass": "^1.23.1",
|
||||||
"typescript": "^3.6.4",
|
"typescript": "^3.6.4",
|
||||||
|
@ -7,6 +7,7 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
|
|||||||
import equicolor from 'equicolor';
|
import equicolor from 'equicolor';
|
||||||
|
|
||||||
import FullCalendar from '@fullcalendar/vue';
|
import FullCalendar from '@fullcalendar/vue';
|
||||||
|
import { CalendarProps } from '@fullcalendar/vue/options';
|
||||||
import timeGridPlugin from '@fullcalendar/timegrid';
|
import timeGridPlugin from '@fullcalendar/timegrid';
|
||||||
import googleCalendarPlugin from '@fullcalendar/google-calendar';
|
import googleCalendarPlugin from '@fullcalendar/google-calendar';
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ import '@fullcalendar/core/main.css';
|
|||||||
import '@fullcalendar/daygrid/main.css';
|
import '@fullcalendar/daygrid/main.css';
|
||||||
import '@fullcalendar/timegrid/main.css';
|
import '@fullcalendar/timegrid/main.css';
|
||||||
|
|
||||||
const calendars = {
|
const calendars: { [key: string]: string } = {
|
||||||
computer_lab: '6mmjp85e4732ru6skf1dda54ls@group.calendar.google.com',
|
computer_lab: '6mmjp85e4732ru6skf1dda54ls@group.calendar.google.com',
|
||||||
electronics: '1g8atbdschshrg2inf162rcqt4@group.calendar.google.com',
|
electronics: '1g8atbdschshrg2inf162rcqt4@group.calendar.google.com',
|
||||||
wood_shop: '4unv3ia1n9mc9u31n2n5lv8nd8@group.calendar.google.com',
|
wood_shop: '4unv3ia1n9mc9u31n2n5lv8nd8@group.calendar.google.com',
|
||||||
@ -31,7 +32,7 @@ const colors = equicolor.findNextColors(
|
|||||||
|
|
||||||
@Component({ components: { FullCalendar } })
|
@Component({ components: { FullCalendar } })
|
||||||
export default class App extends Vue {
|
export default class App extends Vue {
|
||||||
calendarOptions = {
|
calendarOptions: CalendarProps = {
|
||||||
plugins: [timeGridPlugin, googleCalendarPlugin],
|
plugins: [timeGridPlugin, googleCalendarPlugin],
|
||||||
allDaySlot: false,
|
allDaySlot: false,
|
||||||
nowIndicator: true,
|
nowIndicator: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user