0
点赞
收藏
分享

微信扫一扫

根据某数据数量改变区域高度

蓝莲听雨 2023-03-26 阅读 72

使用计算属性

<div id="flow" :style="{ height: scrollerHeight }"></div>

computed: {
    // 滚动区高度
    scrollerHeight: function () {
      return this.nodeList.length * 30 + 'px'; //自定义高度需求
    }
  },



举报

相关推荐

0 条评论