1. vue 页面摘要:
<div id="app" style="overflow:auto">
<div id="div_main_container" style="margin: 10px;" v-cloak>
bala bala ...
</div>
</div>
2. bootstrap-tab.js 中新增函数:
function changeIframeHeight( iframeId,height ){
$( "#" + iframeId ).height( height );
$(".tab-content").css('height',height );
$(".tab-pane.active").css('height',height );
}
3. vue对象新增 watch 监听函数:
new Vue({
el: '#app',
data: function() {
return {
bala bala...
}
},
created: function () {
bala bala...
},
watch:{
dataList: function(){
this.$nextTick(function(){
window.parent.changeIframeHeight( "我是 iframe 的 id", $("#div_main_container")[0].clientHeight + 50 );
});
}
},
methods: {
bala bala...
}
}