feat:新增内链打开外网方式

This commit is contained in:
不做码农
2022-07-02 16:50:56 +08:00
parent ff1546ec82
commit 7d46792fb4
2 changed files with 19 additions and 21 deletions
+16 -16
View File
@@ -1,30 +1,30 @@
<script>
export default {
setup() {
const route = useRoute();
const link = route.meta.link;
if (link === "") {
return "404";
const route = useRoute()
const link = route.meta.link
if (link === '') {
return '404'
}
let url = link;
const height = document.documentElement.clientHeight - 94.5 + "px";
const style = { height: height };
let url = link
const height = document.documentElement.clientHeight - 94.5 + 'px'
const style = { height: height }
// 返回渲染函数
return () =>
h(
"div",
'div',
{
style: style,
},
h("iframe", {
h('iframe', {
src: url,
frameborder: "no",
width: "100%",
height: "100%",
scrolling: "auto",
})
);
frameborder: 'no',
width: '100%',
height: '100%',
scrolling: 'auto',
}),
)
},
};
}
</script>