Added basic year view
This commit is contained in:
@@ -1,28 +1,30 @@
|
||||
<script lang="ts" setup>
|
||||
import { useCalendar } from '@/stores/CalendarStore'
|
||||
import { computed } from 'vue'
|
||||
|
||||
import CalendarMenu from './CalendarMenu.vue'
|
||||
import Century from './state/Century.vue'
|
||||
import Decade from './state/Decade.vue'
|
||||
import Monthly from './state/Monthly.vue'
|
||||
import Year from './state/Year.vue'
|
||||
|
||||
import MonthlyLayout from './state/monthly/Layout.vue'
|
||||
import CenturyLayout from './state/centennially/Layout.vue'
|
||||
import DecadeLayout from './state/decennially/Layout.vue'
|
||||
import YearLayout from './state/yearly/Layout.vue'
|
||||
|
||||
const { currentConfig } = useCalendar()
|
||||
|
||||
const currentViewComponent = computed(() => {
|
||||
switch (currentConfig.viewType) {
|
||||
case 'month':
|
||||
return Monthly
|
||||
return MonthlyLayout
|
||||
|
||||
case 'year':
|
||||
return Year
|
||||
return YearLayout
|
||||
|
||||
case 'decade':
|
||||
return Decade
|
||||
return DecadeLayout
|
||||
|
||||
case 'century':
|
||||
default:
|
||||
return Century
|
||||
return CenturyLayout
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user