inleft
2022-02-09 9bcb19959eeb9da9bde2561e7278f6d0a55eb151
commit | author | age
9bcb19 1
I 2 <script>
3   import Vue from 'vue'
4   import { ACCESS_TOKEN } from '@/store/mutation-types'
5
6     export default {
7       name: 'Iframe',
8       data () {
9           return {
10           }
11       },
12       render () {
13         const { $route: { meta: { link } } } = this
14         if ({ link }.link === '') {
15            return '404'
16         }
17         let url = ''
18         if ({ link }.link.indexOf('token=') > -1) {
19           url = { link }.link + Vue.ls.get(ACCESS_TOKEN)
20         } else {
21           url = { link }.link
22         }
23         let height = ''
24         const deviceHeight = document.documentElement.clientHeight
25         height = (Number(deviceHeight) - 260) + 'px'
26         return <iframe id="iframe" height={height} src={url} style="width:100%;overflow:hidden;" frameBorder="0"></iframe>
27       }
28    }
29 </script>