<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>
|