[O] Pass in unique course instead of course info
This commit is contained in:
@@ -24,7 +24,7 @@ export default class CourseSelection extends Vue
|
|||||||
|
|
||||||
openedPage: string = '';
|
openedPage: string = '';
|
||||||
settings: SearchSettings = new SearchSettings();
|
settings: SearchSettings = new SearchSettings();
|
||||||
activeCourseIndex: number = -1;
|
activeCourse: UniqueCourse = new UniqueCourse('', [], -1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called before rendering
|
* Called before rendering
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-card class="left" :style="{height: cardsHeight + 'px'}">
|
<el-card class="left" :style="{height: cardsHeight + 'px'}">
|
||||||
<SearchSettings v-if="openedPage === 'settings'" ref="settings" :settings="settings"/>
|
<SearchSettings v-if="openedPage === 'settings'" ref="settings" :settings="settings"/>
|
||||||
<Welcome v-if="openedPage === ''" :app="app"/>
|
<Welcome v-if="openedPage === ''" :app="app"/>
|
||||||
<CourseDetail v-if="openedPage === 'course'" :course-info="courseInfo[activeCourseIndex]"/>
|
<CourseDetail v-if="openedPage === 'course'" :course-info="activeCourse"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Component, Prop, Vue} from 'vue-property-decorator'
|
import {Component, Prop, Vue} from 'vue-property-decorator'
|
||||||
import CourseInfo from '@/logic/course-info';
|
import CourseInfo, {UniqueCourse} from '@/logic/course-info';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class CourseDetail extends Vue
|
export default class CourseDetail extends Vue
|
||||||
{
|
{
|
||||||
@Prop({required: true}) courseInfo: CourseInfo;
|
@Prop({required: true}) courseInfo: UniqueCourse;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user