show platform list
This commit is contained in:
1 parent
0b64df7b38
commit
32fd986555
6 files changed
+40
-10
No files matched your search
@@ -1,7 +1,19 @@
|
||||
<template>
|
||||
<el-card shadow="hover">
|
||||
<el-table :data="items" style="width: 100%" height="250">
|
||||
<el-table-column prop="name" label="姓名" width="120"> </el-table-column>
|
||||
<el-table :data="items" v-loading="loading">
|
||||
<el-table-column prop="icon" :label="$t('common.entity.icon')">
|
||||
<template #default="scope">
|
||||
<img :src="scope.row.icon" class="w-10" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" :label="$t('common.entity.platform')"> </el-table-column>
|
||||
<el-table-column prop="description" :label="$t('common.entity.description')"> </el-table-column>
|
||||
<el-table-column :label="$t('common.entity.status')"> </el-table-column>
|
||||
<el-table-column :label="$t('common.entity.operation')">
|
||||
<el-button @click="onSetup" round type="primary" size="small">
|
||||
{{ $t('common.button.setup') }}
|
||||
</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
@@ -9,24 +21,32 @@
|
||||
<script lang="ts">
|
||||
import PlatformService from '@/services/platform/service';
|
||||
import { IPlatform, IPlatformListResponse } from '@/services/platform/types';
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
interface IData {
|
||||
items: IPlatform[];
|
||||
loading: boolean;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
data(): IData {
|
||||
return {
|
||||
items: []
|
||||
items: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
this.loading = true;
|
||||
PlatformService.getAll().then(({ data: data }: { data: IPlatformListResponse }): void => {
|
||||
console.log('data', data);
|
||||
this.items = data.results;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
onSetup() {
|
||||
console.log('333');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user