show platform list

This commit is contained in:
AceDataCloud committed 2021-08-28 20:09:09 +08:00
1 parent 0b64df7b38
commit 32fd986555
6 files changed
+40 -10

No files matched your search

+2 -2
View File
@@ -1,3 +1,3 @@
export default {
}
setup: '配置'
};
+7
View File
@@ -0,0 +1,7 @@
export default {
platform: '平台',
icon: '图标',
status: '状态',
operation: '操作',
description: '描述'
};
+3 -1
View File
@@ -1,9 +1,11 @@
import button from './button';
import message from './message';
import nav from './nav';
import entity from './entity';
export default {
nav,
button,
message
message,
entity
};
+2 -1
View File
@@ -1,5 +1,6 @@
export default {
editor: '编辑器',
home: '首页',
content: '内容'
content: '内容',
platform: '平台'
};
+1 -1
View File
@@ -5,7 +5,7 @@
</el-header>
<el-container>
<el-aside width="200px"> side</el-aside>
<el-main> <router-view/ > </el-main>
<el-main> <router-view /> </el-main>
</el-container>
</el-container>
</template>
+25 -5
View File
@@ -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>