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

使用计算属性

 <div id="flow" :style="{ height: scrollerHeight }"></div>
computed: {
    // 滚动区高度
    scrollerHeight: function () {
      return this.nodeList.length * 30 + 'px'; //自定义高度需求
    }
  },

posted @ 2023-02-13 20:24  sinceForever  阅读(15)  评论(0编辑  收藏  举报