mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 09:25:53 +08:00
增加可链接外部页面
This commit is contained in:
26
manager/src/views/external-link/index.vue
Normal file
26
manager/src/views/external-link/index.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="iframediv">
|
||||
<iframe :src="link" ref="ifram" scrolling="auto" id="ifram"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ExternalLink",
|
||||
data() {
|
||||
return {
|
||||
link: this.$router.currentRoute.name,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let iframe = document.getElementById("ifram");
|
||||
const deviceWidth = document.body.clientWidth;
|
||||
const deviceHeight = document.body.clientHeight;
|
||||
iframe.style.width = deviceWidth + "px";
|
||||
iframe.style.height = deviceHeight + "px";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user