update api view

This commit is contained in:
AceDataCloud committed 2023-01-20 20:28:06 +08:00
1 parent 2b32240fe0
commit f8f34b0084
9 files changed
+326 -56

No files matched your search

+85
View File
@@ -0,0 +1,85 @@
<template>
<div v-if="responses" class="wrapper">
<div v-for="(response, responseKey) in responses" :key="responseKey" class="item">
<div>
{{ response }}
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { IResponse, ISchema } from '@/operators/api/models';
interface IData {
value: {
[key: string]: string | number;
};
}
export default defineComponent({
name: 'ApiResult',
props: {
responses: {
type: Object as () => IResponse[] | [],
required: true
}
},
// emits: ['change'],
data(): IData {
return {
value: {}
};
},
watch: {},
methods: {}
});
</script>
<style lang="scss" scoped>
.wrapper {
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 10px;
overflow: hidden;
.item {
display: block;
overflow: hidden;
background-color: rgb(248, 248, 248);
padding: 10px;
.left {
width: 70%;
float: left;
.info {
.key {
font-size: 14px;
font-weight: bold;
display: inline-block;
padding: 6px;
}
.type {
font-size: 14px;
display: inline-block;
padding: 6px;
}
.required {
font-size: 12px;
color: #dd1e2e;
display: inline-block;
padding: 6px;
}
}
.description {
font-size: 12px;
color: #666;
}
}
.right {
width: 30%;
float: left;
}
}
}
</style>