index.vue 810 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div>
  3. <doc-alert title="数据库 MyBatis" url="https://doc.iocoder.cn/mybatis/" />
  4. <doc-alert title="多数据源(读写分离)" url="https://doc.iocoder.cn/dynamic-datasource/" />
  5. <i-frame v-if="!loading" :src="url" />
  6. </div>
  7. </template>
  8. <script>
  9. import iFrame from "@/components/iFrame/index";
  10. import { getConfigKey } from "@/api/infra/config";
  11. export default {
  12. name: "Druid",
  13. components: { iFrame },
  14. data() {
  15. return {
  16. url: process.env.VUE_APP_BASE_API + "/druid/index.html",
  17. loading: true
  18. };
  19. },
  20. created() {
  21. getConfigKey("url.druid").then(response => {
  22. if (!response.data || response.data.length === 0) {
  23. return
  24. }
  25. this.url = response.data;
  26. }).finally(() => {
  27. this.loading = false;
  28. })
  29. }
  30. };
  31. </script>