add publication view

This commit is contained in:
AceDataCloud committed 2021-11-07 17:16:29 +08:00
1 parent 811b8fd296
commit f76834563e
8 files changed
+109 -5

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
<template>
<el-row :gutter="20"> </el-row>
</template>
<script lang="ts">
import { Breadcrumb } from '@/components/common/index';
import PublicationService from '@/services/content/Publication/service';
import { IPublication, IPublicationListResponse } from '@/services/content/Publication/types';
import { defineComponent } from 'vue';
import { Check, Close } from '@element-plus/icons';
interface IData {
items: IPublication[];
loading: boolean;
}
export default defineComponent({
components: {
Breadcrumb,
Check,
Close
},
data(): IData {
return {
items: [],
loading: false
};
},
computed: {},
async mounted() {
this.loading = true;
PublicationService.getAll().then(({ data: data }: { data: IPublicationListResponse }): void => {
this.items = data.results;
this.loading = false;
});
},
methods: {}
});
</script>
<style lang="scss" scoped>
.el-card {
height: calc(100vh - 100px);
}
</style>