Files
smart_venue/oms/oms-h5/src/views/member/health/show.vue
2021-03-08 17:30:58 +08:00

47 lines
1.0 KiB
Vue

<template>
<div class="filter-container">
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleCancel">返回</el-button>
<div>
<iframe :src="docPath" scrolling="auto" frameborder="0" id="iframe"></iframe>
</div>
</div>
</template>
<script>
import waves from '@/directive/waves.js'// 水波纹指令
export default {
directives: {
waves
},
data() {
return {
docPath: undefined
}
},
created() {
// 初始化
this.docPath = this.$route.query.docPath
},
mounted() {
/**
* iframe-宽高自适应显示
*/
const oIframe = document.getElementById('iframe')
const deviceWidth = document.documentElement.clientWidth
const deviceHeight = document.documentElement.clientHeight
oIframe.style.width = (Number(deviceWidth) - 220) + 'px'
oIframe.style.height = (Number(deviceHeight) - 120) + 'px'
},
methods: {
/**
* 取消
*/
handleCancel() {
this.$router.go(-1)
}
}
}
</script>