feat:新增内链打开外网方式
This commit is contained in:
parent
ff1546ec82
commit
7d46792fb4
@ -1,30 +1,30 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const route = useRoute();
|
const route = useRoute()
|
||||||
const link = route.meta.link;
|
const link = route.meta.link
|
||||||
if (link === "") {
|
if (link === '') {
|
||||||
return "404";
|
return '404'
|
||||||
}
|
}
|
||||||
let url = link;
|
let url = link
|
||||||
const height = document.documentElement.clientHeight - 94.5 + "px";
|
const height = document.documentElement.clientHeight - 94.5 + 'px'
|
||||||
const style = { height: height };
|
const style = { height: height }
|
||||||
|
|
||||||
// 返回渲染函数
|
// 返回渲染函数
|
||||||
return () =>
|
return () =>
|
||||||
h(
|
h(
|
||||||
"div",
|
'div',
|
||||||
{
|
{
|
||||||
style: style,
|
style: style,
|
||||||
},
|
},
|
||||||
h("iframe", {
|
h('iframe', {
|
||||||
src: url,
|
src: url,
|
||||||
frameborder: "no",
|
frameborder: 'no',
|
||||||
width: "100%",
|
width: '100%',
|
||||||
height: "100%",
|
height: '100%',
|
||||||
scrolling: "auto",
|
scrolling: 'auto',
|
||||||
})
|
}),
|
||||||
);
|
)
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -63,11 +63,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
|
|||||||
route.component = Layout
|
route.component = Layout
|
||||||
} else if (route.component === 'ParentView') {
|
} else if (route.component === 'ParentView') {
|
||||||
route.component = ParentView
|
route.component = ParentView
|
||||||
}
|
} else if (route.component === 'InnerLink') {
|
||||||
// else if (route.component === 'InnerLink') {
|
route.component = InnerLink
|
||||||
// route.component = InnerLink
|
} else {
|
||||||
// }
|
|
||||||
else {
|
|
||||||
route.component = loadView(route.component)
|
route.component = loadView(route.component)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user