mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
Merge branch 'main' of github.com:pure-admin/vue-pure-admin into gitee
This commit is contained in:
@@ -12,3 +12,8 @@ type Result = {
|
||||
export const getCardList = (data?: object) => {
|
||||
return http.request<Result>("post", "/getCardList", { data });
|
||||
};
|
||||
|
||||
/** 版本日志 */
|
||||
export const getReleases = () => {
|
||||
return http.request<Result>("get", "/releases");
|
||||
};
|
||||
|
||||
@@ -7,7 +7,6 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const { title } = useNav();
|
||||
const topPath = getTopMenu()?.path;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -18,7 +17,7 @@ const topPath = getTopMenu()?.path;
|
||||
key="props.collapse"
|
||||
:title="title"
|
||||
class="sidebar-logo-link"
|
||||
:to="topPath"
|
||||
:to="getTopMenu()?.path ?? '/'"
|
||||
>
|
||||
<img src="/logo.svg" alt="logo" />
|
||||
<span class="sidebar-title">{{ title }}</span>
|
||||
@@ -28,7 +27,7 @@ const topPath = getTopMenu()?.path;
|
||||
key="expand"
|
||||
:title="title"
|
||||
class="sidebar-logo-link"
|
||||
:to="topPath"
|
||||
:to="getTopMenu()?.path ?? '/'"
|
||||
>
|
||||
<img src="/logo.svg" alt="logo" />
|
||||
<span class="sidebar-title">{{ title }}</span>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user