| | |
| | | <template> |
| | | <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> |
| | | {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} |
| | | </a> |
| | | <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} </a> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | const state = reactive<LinkViewState>({ |
| | | currentRouteMeta: { |
| | | isLink: '', |
| | | title: '', |
| | | }, |
| | | title: '' |
| | | } |
| | | }); |
| | | // 设置 link 的高度 |
| | | const setLinkHeight = computed(() => { |
| | |
| | | state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | }, |
| | | { |
| | | immediate: true, |
| | | immediate: true |
| | | } |
| | | ); |
| | | return { |
| | | setLinkHeight, |
| | | ...toRefs(state), |
| | | ...toRefs(state) |
| | | }; |
| | | }, |
| | | } |
| | | }); |
| | | </script> |