index.vue 568 B

123456789101112131415161718192021222324252627282930
  1. <script setup lang="ts">
  2. import { ref } from "vue";
  3. import { loadEnv } from "@build/index";
  4. defineOptions({
  5. name: "Button"
  6. });
  7. const { VITE_PUBLIC_PATH } = loadEnv();
  8. const url = ref(`${VITE_PUBLIC_PATH}html/button.html`);
  9. </script>
  10. <template>
  11. <el-card>
  12. <template #header>
  13. <div class="card-header">
  14. <span class="font-medium">通过iframe引入按钮页面</span>
  15. </div>
  16. </template>
  17. <iframe :src="url" frameborder="0" class="iframe" />
  18. </el-card>
  19. </template>
  20. <style scoped>
  21. .iframe {
  22. width: 100%;
  23. height: 60vh;
  24. }
  25. </style>