migrate new model

This commit is contained in:
AceDataCloud committed 2023-01-31 16:30:00 +08:00
1 parent 5dae704649
commit e2e17eef96
19 files changed
+202 -108

No files matched your search

+7 -5
View File
@@ -1,13 +1,13 @@
<template>
<div v-if="document" class="center">
<div v-if="document.type === 'TEXT'">
<div v-if="document.type === documentType.TEXT">
<markdown-renderer :content="document?.content" :loading="loading" />
</div>
<div v-else-if="document.type === 'API'">
<div v-else-if="document.type === documentType.API">
<api-usage v-if="document.api" v-model:form="form" :loading="loading" :api="document.api" />
</div>
</div>
<div v-if="document?.type === 'API' && document?.api" class="right">
<div v-if="document?.type === documentType.API && document?.api" class="right">
<div v-if="loading" class="p-5">
<el-skeleton />
</div>
@@ -23,7 +23,7 @@ import { defineComponent } from 'vue';
import ApiUsage from '@/components/api/Usage.vue';
import ApiTry from '@/components/api/Try.vue';
import ApiCode from '@/components/api/Code.vue';
import { documentOperator, IDocument, IDocumentDetailResponse } from '@/operators';
import { documentOperator, IDocument, IDocumentDetailResponse, IDocumentType } from '@/operators';
import { IForm } from '@/operators/api/models';
import MarkdownRenderer from '@/components/common/MarkdownRenderer.vue';
import { ElSkeleton } from 'element-plus';
@@ -32,6 +32,7 @@ export interface IData {
document: IDocument | undefined;
loading: boolean;
form: IForm;
documentType: typeof IDocumentType;
}
export default defineComponent({
@@ -47,7 +48,8 @@ export default defineComponent({
return {
document: undefined,
loading: false,
form: {}
form: {},
documentType: IDocumentType
};
},
computed: {