<el-tab-pane label="首页" name="third">
<planIndexBanner v-if="activeName == 'third'" :style="{height:(screenHeight-80)+'px'}" ref="planIndexBanner"/>
</el-tab-pane>
data() {
return {
screenHeight: document.documentElement.clientHeight,
}
},
watch: {
'screenHeight': function (val) {
var oIframe = document.getElementById('maindiv')
oIframe.style.height = (Number(val) - 40) + 'px'
}
},
mounted() {
var _this = this
window.onresize = function () {
_this.screenHeight = document.documentElement.clientHeight
}
},