diff --git a/src/modules/dashboard/Dashboard.vue b/src/modules/dashboard/Dashboard.vue index 8520b0d90..a9daa0e6c 100644 --- a/src/modules/dashboard/Dashboard.vue +++ b/src/modules/dashboard/Dashboard.vue @@ -54,7 +54,12 @@ - + import { VCard } from "@halo-dev/components"; +import { onMounted, ref } from "vue"; +import { apiClient } from "@halo-dev/admin-shared"; + +const postTotal = ref(0); + +const handleFetchPosts = async () => { + const { data } = + await apiClient.extension.post.listcontentHaloRunV1alpha1Post(); + postTotal.value = data.total; +}; + +onMounted(handleFetchPosts); diff --git a/src/modules/dashboard/widgets/UserStatsWidget.vue b/src/modules/dashboard/widgets/UserStatsWidget.vue index e283cd764..085c97d96 100644 --- a/src/modules/dashboard/widgets/UserStatsWidget.vue +++ b/src/modules/dashboard/widgets/UserStatsWidget.vue @@ -1,9 +1,13 @@