26 lines
694 B
Vue
26 lines
694 B
Vue
<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> |