You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

20 lines
639 B

2 years ago
<template>
<div v-if="showFrame">
<template v-for="frame in getFramePages" :key="frame.path">
<FramePage v-if="frame.meta.frameSrc && hasRenderFrame(frame.name)" v-show="showIframe(frame)" :frameSrc="frame.meta.frameSrc" />
</template>
</div>
</template>
<script lang="ts" setup>
2 years ago
import { unref, computed } from 'vue'
import FramePage from '@/views/base/iframe/index.vue'
2 years ago
import { useFrameKeepAlive } from './useFrameKeepAlive'
defineOptions({ name: 'FrameLayout' })
2 years ago
const { getFramePages, hasRenderFrame, showIframe } = useFrameKeepAlive()
const showFrame = computed(() => unref(getFramePages).length > 0)
</script>