fix: 优化iframe样式
This commit is contained in:
parent
262a591cfd
commit
be6bafa29f
|
@ -25,7 +25,7 @@
|
||||||
<UserInfo />
|
<UserInfo />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<Iframe :key="route.path" />
|
<Iframe :key="route.path" noMargin />
|
||||||
</j-pro-layout>
|
</j-pro-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container>
|
<page-container class="iframe-warp">
|
||||||
<full-page>
|
<full-page>
|
||||||
<iframe
|
<iframe
|
||||||
v-if="loading"
|
v-if="loading"
|
||||||
|
@ -26,6 +26,21 @@ import { TokenLose} from "@/utils/request";
|
||||||
const iframeUrl = ref<string>('');
|
const iframeUrl = ref<string>('');
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
noMargin: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const className = computed(() => {
|
||||||
|
return {
|
||||||
|
'iframe-warp': true,
|
||||||
|
'margin-full': props.hasOwnProperty('noMargin') && props.noMargin !== false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const handle = async (appId: string, url: string) => {
|
const handle = async (appId: string, url: string) => {
|
||||||
const res = await getAppInfo_api(appId);
|
const res = await getAppInfo_api(appId);
|
||||||
let menuUrl: any = url;
|
let menuUrl: any = url;
|
||||||
|
@ -63,7 +78,7 @@ const handle = async (appId: string, url: string) => {
|
||||||
iframeUrl.value = urlOther;
|
iframeUrl.value = urlOther;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const lowCode = () => {
|
const lowCode = () => {
|
||||||
lowCodeUrl().then(res => {
|
lowCodeUrl().then(res => {
|
||||||
|
@ -78,7 +93,6 @@ const lowCode = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const onMessage = (msg: any) => {
|
const onMessage = (msg: any) => {
|
||||||
console.log('onMessage',msg)
|
|
||||||
if (msg?.data?.token === 'LOSE') {
|
if (msg?.data?.token === 'LOSE') {
|
||||||
TokenLose()
|
TokenLose()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -115,7 +129,5 @@ watchEffect(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='less' scoped>
|
<style lang='less' scoped>
|
||||||
:deep(.children-full-height) {
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue