Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/pages/Home.vue

29 lines
685 B

<template>
<div class="flex flex-col gap-4">
<div v-if="announcements.length">
<SystemAnnouncementCardList :announcements="announcements" />
</div>
<PageCardList />
</div>
</template>
<script setup>
import axios from "axios";
import { ref } from "vue";
import PageCardList from "../components/page/PageCardList";
import SystemAnnouncementCardList from "../components/systemannouncement/SystemAnnouncementCardList";
const announcements = ref([]);
axios
.get("/news/list")
.then((response) => {
if (Array.isArray(response.data)) {
announcements.value = response.data;
}
})
.catch(function (error) {
console.log(error);
});
</script>