vue 两种计算高度
computed: {// (滚动区高度:iframe图片响应式适配)scrollerHeight: function() {return (window.innerHeight - 80) + ‘px’;}},mounted() {this.$nextTick(() => {let h = this.$refs.main.offsetHeight;let h_btngroup = this
·
computed: {
// (滚动区高度:iframe图片响应式适配)
scrollerHeight: function() {
return (window.innerHeight - 80) + ‘px’;
}
},
mounted() {
this.$nextTick(() => {
let h = this.$refs.main.offsetHeight;
let h_btngroup = this.$refs.btngroup.offsetHeight;
let h_main = h - 40 - h_btngroup;
this.style_form =
"height:" + h_main + "px;overflow-y:auto;overflow-x:hidden;";
});
},
更多推荐
已为社区贡献1条内容
所有评论(0)