ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
 
import { decodeByBase64 } from '@jnpf/utils';
 
import { useTabs } from '@vben/hooks';
 
defineOptions({ name: 'ExternalLink' });
 
const route = useRoute();
const { setTabTitle } = useTabs();
const url = ref('');
 
onMounted(() => {
  const { query } = route;
  if (!query.href) return;
  const href = decodeByBase64(query.href as string);
  url.value = href;
  if (query.name) setTabTitle(query.name as string);
});
</script>
<template>
  <div class="jnpf-content-wrapper jnpf-content-wrapper-form">
    <iframe width="100%" height="100%" frameborder="0" scrolling="yes" :src="url"></iframe>
  </div>
</template>