Add prop type
This commit is contained in:
parent
46f46f319e
commit
8185ca056f
|
|
@ -119,7 +119,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue, {PropType} from 'vue';
|
||||||
import Toggle from '@/components/ui/Toggle.vue';
|
import Toggle from '@/components/ui/Toggle.vue';
|
||||||
import ContentFormSection from '@/components/content-block-form/ContentFormSection.vue';
|
import ContentFormSection from '@/components/content-block-form/ContentFormSection.vue';
|
||||||
import InputWithLabel from '@/components/ui/InputWithLabel.vue';
|
import InputWithLabel from '@/components/ui/InputWithLabel.vue';
|
||||||
|
|
@ -141,7 +141,7 @@
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
contentBlock: {
|
contentBlock: {
|
||||||
type: Object,
|
type: Object as PropType<ContentBlock>,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
export type numberOrUndefined = number | undefined;
|
export type numberOrUndefined = number | undefined;
|
||||||
|
|
||||||
|
type types = 'task' | 'normal' | 'base_communication' | 'base_society' | 'base_interdisciplinary';
|
||||||
|
|
||||||
export interface ContentBlock {
|
export interface ContentBlock {
|
||||||
title: string;
|
title: string;
|
||||||
contents: any[];
|
contents: any[];
|
||||||
id: string | undefined;
|
id: string | undefined;
|
||||||
isAssignment: boolean;
|
isAssignment: boolean;
|
||||||
|
type: types;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue