optimize size
This commit is contained in:
1 parent
277ef9a325
commit
5f20de55e7
36 files changed
+386
-104
No files matched your search
@@ -35,6 +35,7 @@ import phpTemplate from '@/assets/templates/php.tpl';
|
||||
import javaTemplate from '@/assets/templates/java.tpl';
|
||||
import CodeSnippet from '../common/CodeSnippet.vue';
|
||||
import queryString from 'query-string';
|
||||
import { ElImage } from 'element-plus';
|
||||
|
||||
interface IOption {
|
||||
name: ILang;
|
||||
@@ -69,7 +70,8 @@ interface IRenderData {
|
||||
export default defineComponent({
|
||||
name: 'ApiCode',
|
||||
components: {
|
||||
CodeSnippet
|
||||
CodeSnippet,
|
||||
ElImage
|
||||
},
|
||||
props: {
|
||||
api: {
|
||||
|
||||
@@ -58,7 +58,12 @@
|
||||
:allow-create="true"
|
||||
:placeholder="$t('common.title.placeholderOfSelect')"
|
||||
>
|
||||
<el-option :label="appliedApplication?.api_key" :value="appliedApplication?.api_key" class="select-option">
|
||||
<el-option
|
||||
v-if="appliedApplication?.api_key"
|
||||
:label="appliedApplication?.api_key"
|
||||
:value="appliedApplication.api_key"
|
||||
class="select-option"
|
||||
>
|
||||
<span class="select-option-main">{{ appliedApplication?.api_key }}</span>
|
||||
<span class="select-option-description">{{ $t('application.message.yourApplication') }}</span>
|
||||
</el-option>
|
||||
@@ -86,6 +91,7 @@ import { ISchema } from '@/operators/api/models';
|
||||
import { IService } from '@/operators/service/models';
|
||||
import { IApplication } from '@/operators';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { ElPopover, ElInput, ElSelect, ElButton, ElTooltip, ElOption } from 'element-plus';
|
||||
|
||||
interface IData {
|
||||
value: {
|
||||
@@ -96,7 +102,13 @@ interface IData {
|
||||
export default defineComponent({
|
||||
name: 'ApiForm',
|
||||
components: {
|
||||
FontAwesomeIcon
|
||||
FontAwesomeIcon,
|
||||
ElPopover,
|
||||
ElInput,
|
||||
ElSelect,
|
||||
ElButton,
|
||||
ElTooltip,
|
||||
ElOption
|
||||
},
|
||||
props: {
|
||||
schema: {
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { IResponse } from '@/operators/api/models';
|
||||
import CodeSnippet from '../common/CodeSnippet.vue';
|
||||
import { ElCollapse, ElCollapseItem, ElTag } from 'element-plus';
|
||||
|
||||
interface IData {
|
||||
value: {
|
||||
@@ -63,7 +64,10 @@ interface IData {
|
||||
export default defineComponent({
|
||||
name: 'ApiResult',
|
||||
components: {
|
||||
CodeSnippet
|
||||
CodeSnippet,
|
||||
ElCollapse,
|
||||
ElCollapseItem,
|
||||
ElTag
|
||||
},
|
||||
props: {
|
||||
responses: {
|
||||
|
||||
@@ -21,11 +21,14 @@ import { defineComponent } from 'vue';
|
||||
import axios, { Method } from 'axios';
|
||||
import urlJoin from 'url-join';
|
||||
import CodeSnippet from '../common/CodeSnippet.vue';
|
||||
import { ElButton, ElSkeleton } from 'element-plus';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ApiTry',
|
||||
components: {
|
||||
CodeSnippet
|
||||
CodeSnippet,
|
||||
ElButton,
|
||||
ElSkeleton
|
||||
},
|
||||
props: {
|
||||
api: {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{ api?.title }}
|
||||
</div>
|
||||
<div class="url">
|
||||
<el-tag class="method" size="mini" type="primary" effect="dark">{{ api?.request?.method }}</el-tag>
|
||||
<el-tag class="method" effect="dark">{{ api?.request?.method }}</el-tag>
|
||||
<span v-if="api?.endpoint && api?.path" class="endpoint">{{ urlJoin(api?.endpoint, api?.path) }}</span>
|
||||
</div>
|
||||
<div class="introduction">
|
||||
@@ -59,6 +59,7 @@ import ApiResult from './Result.vue';
|
||||
import urlJoin from 'url-join';
|
||||
import { applicationOperator } from '@/operators/application/operator';
|
||||
import { IApplication, IApplicationListResponse } from '@/operators/application/models';
|
||||
import { ElSkeleton, ElDivider, ElTag } from 'element-plus';
|
||||
|
||||
export interface IData {
|
||||
formValue: IForm;
|
||||
@@ -69,7 +70,10 @@ export default defineComponent({
|
||||
name: 'ApiUsage',
|
||||
components: {
|
||||
ApiForm,
|
||||
ApiResult
|
||||
ApiResult,
|
||||
ElSkeleton,
|
||||
ElDivider,
|
||||
ElTag
|
||||
},
|
||||
props: {
|
||||
api: {
|
||||
|
||||
Reference in new issue
Block a user