ServiceApi.vue 574 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <div>
  3. <div v-for="tag in api.tags" :key="tag.name"><h1>{{ tag.name }}</h1> {{ tag.description }}</div>>
  4. </div>
  5. </template>
  6. <script>
  7. import Axios from "axios";
  8. export default {
  9. name: "ServiceApi",
  10. data: function() {
  11. return {
  12. api: {}
  13. };
  14. },
  15. props: ["sys"],
  16. created: function() {
  17. Axios.get(
  18. `${window.location.origin}/${this.sys}/v2/api-docs`,
  19. {}
  20. ).then(res => {
  21. this.api = res.data;
  22. console.log(this.api);
  23. });
  24. }
  25. }
  26. </script>