ServiceApi.vue 597 B

1234567891011121314151617181920212223242526272829
  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. console.log(Location)
  18. Axios.get(
  19. `${Location.origin}/${this.sys}/v2/api-docs`,
  20. {}
  21. ).then(res => {
  22. this.api = res.data;
  23. console.log(this.api);
  24. });
  25. }
  26. }
  27. </script>