update 完善了部分开发文档
This commit is contained in:
5
Web/src/pages/system/doc/api/index.vue
Normal file
5
Web/src/pages/system/doc/api/index.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<section>
|
||||
<p>在本框架中,只需要进行简单的接口配置,就可以实现调用。</p>
|
||||
</section>
|
||||
</template>
|
||||
26
Web/src/pages/system/doc/api/queue.vue
Normal file
26
Web/src/pages/system/doc/api/queue.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<section>
|
||||
<p>有些场景下,需要对几个接口同时进行调用,并且同时返回数据。</p>
|
||||
<p>
|
||||
当然可以直接使用关键字
|
||||
<a-tag class="mr-none" color="orange">await</a-tag>;也可以使用已经封装好的
|
||||
<a-tag class="mr-none" color="orange">$queue</a-tag>,并在接口函数后增加
|
||||
<a-tag class="mr-none" color="orange">Await</a-tag>后缀。
|
||||
</p>
|
||||
<Highlight :code="codes['/api/queue.js']" language="javascript" />
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import Highlight from '../highlight';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Highlight,
|
||||
},
|
||||
props: {
|
||||
codes: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
23
Web/src/pages/system/doc/api/setting.vue
Normal file
23
Web/src/pages/system/doc/api/setting.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<section>
|
||||
<p>
|
||||
维护接口地址在
|
||||
<a-tag class="mr-none" color="orange">@/src/common/api/requests</a-tag>中
|
||||
</p>
|
||||
<Highlight :code="codes['/api/setting.js']" language="javascript" />
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import Highlight from '../highlight';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Highlight,
|
||||
},
|
||||
props: {
|
||||
codes: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
21
Web/src/pages/system/doc/api/usage.vue
Normal file
21
Web/src/pages/system/doc/api/usage.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<section>
|
||||
<p>调用时可以直接使用全局函数。</p>
|
||||
<p>接口的函数名对应到上面配置的接口名称即可。</p>
|
||||
<Highlight :code="codes['/api/usage.js']" language="javascript" />
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import Highlight from '../highlight';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Highlight,
|
||||
},
|
||||
props: {
|
||||
codes: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user