show platform list
This commit is contained in:
1 parent
0b64df7b38
commit
32fd986555
6 files changed
+40
-10
No files matched your search
@@ -1,3 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
|
setup: '配置'
|
||||||
}
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export default {
|
||||||
|
platform: '平台',
|
||||||
|
icon: '图标',
|
||||||
|
status: '状态',
|
||||||
|
operation: '操作',
|
||||||
|
description: '描述'
|
||||||
|
};
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
import button from './button';
|
import button from './button';
|
||||||
import message from './message';
|
import message from './message';
|
||||||
import nav from './nav';
|
import nav from './nav';
|
||||||
|
import entity from './entity';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
nav,
|
nav,
|
||||||
button,
|
button,
|
||||||
message
|
message,
|
||||||
|
entity
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
editor: '编辑器',
|
editor: '编辑器',
|
||||||
home: '首页',
|
home: '首页',
|
||||||
content: '内容'
|
content: '内容',
|
||||||
|
platform: '平台'
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
</el-header>
|
</el-header>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="200px"> side</el-aside>
|
<el-aside width="200px"> side</el-aside>
|
||||||
<el-main> <router-view/ > </el-main>
|
<el-main> <router-view /> </el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-table :data="items" style="width: 100%" height="250">
|
<el-table :data="items" v-loading="loading">
|
||||||
<el-table-column prop="name" label="姓名" width="120"> </el-table-column>
|
<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-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -9,24 +21,32 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import PlatformService from '@/services/platform/service';
|
import PlatformService from '@/services/platform/service';
|
||||||
import { IPlatform, IPlatformListResponse } from '@/services/platform/types';
|
import { IPlatform, IPlatformListResponse } from '@/services/platform/types';
|
||||||
import { defineComponent, PropType } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
interface IData {
|
interface IData {
|
||||||
items: IPlatform[];
|
items: IPlatform[];
|
||||||
|
loading: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data(): IData {
|
data(): IData {
|
||||||
return {
|
return {
|
||||||
items: []
|
items: [],
|
||||||
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
this.loading = true;
|
||||||
PlatformService.getAll().then(({ data: data }: { data: IPlatformListResponse }): void => {
|
PlatformService.getAll().then(({ data: data }: { data: IPlatformListResponse }): void => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
this.items = data.results;
|
this.items = data.results;
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
onSetup() {
|
||||||
|
console.log('333');
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user