chore: update

This commit is contained in:
xiaoxian521
2023-05-27 13:11:04 +08:00
parent b29500c4ed
commit 0c12cba474
3 changed files with 226 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
<script setup lang="ts">
import dayjs from "dayjs";
import axios from "axios";
import MdEditor from "md-editor-v3";
import Bar from "./components/Bar.vue";
import Pie from "./components/Pie.vue";
import Line from "./components/Line.vue";
import { getReleases } from "@/api/list";
import TypeIt from "@/components/ReTypeit";
import { useWindowSize } from "@vueuse/core";
import { ref, computed, markRaw } from "vue";
@@ -29,23 +29,19 @@ setTimeout(() => {
loading.value = !loading.value;
}, 800);
axios
.get(
"https://gitee.com/api/v5/repos/yiming_chang/vue-pure-admin/releases?page=1&per_page=50&direction=desc"
)
.then(res => {
list.value = res.data.map(v => {
return {
content: v.body,
timestamp: dayjs(v.published_at).format("YYYY/MM/DD hh:mm:ss A"),
icon: markRaw(
useRenderFlicker({
background: randomColor({ type: "hex" }) as string
})
)
};
});
getReleases().then(({ data }) => {
list.value = data.list.map(v => {
return {
content: v.body,
timestamp: dayjs(v.published_at).format("YYYY/MM/DD hh:mm:ss A"),
icon: markRaw(
useRenderFlicker({
background: randomColor({ type: "hex" }) as string
})
)
};
});
});
</script>
<template>