feat: Performance API done.
This commit is contained in:
@@ -1,5 +1,39 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>ProformanceIndex</h2>
|
||||
</div>
|
||||
<main class="h-screen-main relative">
|
||||
<div class="h-full relative bg-neutral-50">
|
||||
performance: {{ this.performanceData }}
|
||||
</div>
|
||||
|
||||
<StatusBar></StatusBar>
|
||||
</main>
|
||||
</template>
|
||||
<script>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import PerformanceStore from '@/stores/performance.js';
|
||||
import StatusBar from '@/components/Discover/StatusBar.vue';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const loadingStore = LoadingStore();
|
||||
const performanceStore = PerformanceStore();
|
||||
const { isLoading } = storeToRefs(loadingStore);
|
||||
const { performanceData } = storeToRefs(performanceStore);
|
||||
|
||||
return { isLoading, performanceStore, performanceData }
|
||||
},
|
||||
components: {
|
||||
StatusBar,
|
||||
},
|
||||
async created() {
|
||||
this.isLoading = true;
|
||||
const routeParams = this.$route.params;
|
||||
let id = routeParams.fileId;
|
||||
let type = routeParams.type;
|
||||
|
||||
// 取得 Performance Data
|
||||
await this.performanceStore.getPerformance(type, id);
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user