使用计算属性
<div id="flow" :style="{ height: scrollerHeight }"></div>
computed: {
// 滚动区高度
scrollerHeight: function () {
return this.nodeList.length * 30 + 'px'; //自定义高度需求
}
},
根据某数据数量改变区域高度
阅读 72
2023-03-26
使用计算属性
<div id="flow" :style="{ height: scrollerHeight }"></div>
computed: {
// 滚动区高度
scrollerHeight: function () {
return this.nodeList.length * 30 + 'px'; //自定义高度需求
}
},
相关推荐
精彩评论(0)