pull/5752/head
parent
be0838c440
commit
61d65b48cf
@ -1,34 +1,39 @@ |
|||||||
<template> |
<template> |
||||||
<div class="bg-gray-100 rounded-xl p-2 shadow-md"> |
<div class="course-tool"> |
||||||
<div class="flex flex-col flex-center"> |
<BaseAppLink |
||||||
<div class="mx-auto"> |
:url="url" |
||||||
<a :href="goToShortCut(shortcut)"> |
class="course-tool__link" |
||||||
|
> |
||||||
<img |
<img |
||||||
:alt="shortcut.title" |
:alt="shortcut.title" |
||||||
:src="`/img/tools/${shortcut.type}.png`" |
:src="`/img/tools/${shortcut.type}.png`" |
||||||
class="w-32 h-32 object-contain" |
class="course-tool__icon" |
||||||
/> |
/> |
||||||
</a> |
</BaseAppLink> |
||||||
</div> |
<BaseAppLink |
||||||
|
:url="url" |
||||||
<div class="flex flex-row gap-2 text-gray-500 pt-3"> |
class="course-tool__title" |
||||||
<a> |
> |
||||||
{{ shortcut.title }} |
{{ shortcut.title }} |
||||||
</a> |
</BaseAppLink> |
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script setup> |
<script setup> |
||||||
defineProps({ |
import { computed } from "vue" |
||||||
|
import { storeToRefs } from "pinia" |
||||||
|
import BaseAppLink from "../basecomponents/BaseAppLink.vue" |
||||||
|
import { useCidReqStore } from "../../store/cidReq" |
||||||
|
|
||||||
|
const cidReqStore = useCidReqStore() |
||||||
|
const { course, session } = storeToRefs(cidReqStore) |
||||||
|
|
||||||
|
const props = defineProps({ |
||||||
shortcut: { |
shortcut: { |
||||||
type: Object, |
type: Object, |
||||||
required: true, |
required: true, |
||||||
}, |
}, |
||||||
goToShortCut: { |
|
||||||
type: Function, |
|
||||||
required: true, |
|
||||||
}, |
|
||||||
}) |
}) |
||||||
|
|
||||||
|
const url = computed(() => `${props.shortcut.url}?cid=${course.value.id}&sid=${session.value?.id || 0}`) |
||||||
</script> |
</script> |
||||||
|
After Width: | Height: | Size: 6.1 KiB |
Loading…
Reference in new issue