app/docs/components/Dash.vue
Snowykami cf7cb71464
Some checks failed
Docker Image Build / build (push) Failing after 7s
Pre-commit checks / pre-commit (3.11) (push) Failing after 1m57s
Deploy VitePress site to Liteyuki PaaS / build (push) Failing after 2m14s
Pre-commit checks / pre-commit (3.13) (push) Failing after 3m21s
Pre-commit checks / pre-commit (3.12) (push) Failing after 3m23s
Pre-commit checks / pre-commit (3.10) (push) Failing after 14m32s
📝 更新所有链接至新的域名 "liteyuki.org"
2025-06-16 00:29:03 +08:00

38 lines
770 B
Vue
Executable File

<script setup lang="ts">
import {ref} from "vue";
let total = ref(0);
let online = ref(0);
fetch("https://api.liteyuki.org/count")
.then(res => res.json())
.then(data => {
total.value = data.register;
})
.catch(err => console.error(err));
fetch("https://api.liteyuki.org/online")
.then(res => res.json())
.then(data => {
online.value = data.online;
})
.catch(err => console.error(err));
</script>
<template>
<div class="info-box">
<h1>Dashboard</h1>
<div class="info">
<div class="info-item">
<h2>Total</h2>
<p>{{ total }}</p>
</div>
<div class="info-item">
<h2>Online</h2>
<p>{{ online }}</p>
</div>
</div>
</div>
</template>
<style scoped>
</style>