You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
710 B
31 lines
710 B
2 years ago
|
<template>
|
||
|
<div>
|
||
|
<i-frame v-if="!loading" :src="url" />
|
||
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
|
import iFrame from "@/components/iFrame/index";
|
||
|
import { getConfigKey } from "@/api/infra/config";
|
||
|
export default {
|
||
|
name: "InfraSwagger",
|
||
|
components: { iFrame },
|
||
|
data() {
|
||
|
return {
|
||
|
url: process.env.VUE_APP_BASE_API + "/doc.html", // Knife4j UI
|
||
|
// url: process.env.VUE_APP_BASE_API + "/swagger-ui", // Swagger UI
|
||
|
loading: true
|
||
|
};
|
||
|
},
|
||
|
created() {
|
||
|
getConfigKey("url.swagger").then(response => {
|
||
|
if (!response.data || response.data.length === 0) {
|
||
|
return
|
||
|
}
|
||
|
this.url = response.data;
|
||
|
}).finally(() => {
|
||
|
this.loading = false;
|
||
|
})
|
||
|
}
|
||
|
};
|
||
|
</script>
|