vue项目中动态控制table高度
給table加上如下属性
:max-height="maxHeight"
data中定义最大高度
maxHeight:''
在钩子函数中改变最大高度
mounted(){ this.$nextTick(()=>{ this.maxHeight = document.body.offsetHeight - this.$refs.tabel.$el.getBoundingClientRect().top - 70 }) },
vue项目中动态控制table高度
給table加上如下属性
:max-height="maxHeight"
data中定义最大高度
maxHeight:''
在钩子函数中改变最大高度
mounted(){ this.$nextTick(()=>{ this.maxHeight = document.body.offsetHeight - this.$refs.tabel.$el.getBoundingClientRect().top - 70 }) },