```javascript
watch: {
warningData: function (arr) {
this.$nextTick(() => {
this.setScroll();
});
},
},
setScroll() {
this.InnerHeight = this.getStyleHeight(this.$refs.scrollInner);
this.isShowScroll = this.isNeedScroll(
Number(this.scrollHeight),
this.InnerHeight,
);
this.copyHtml = this.isShowScroll ? this.$refs.scrollInner.innerHTML : '';
},
监听接口返回数组更新,更新完后用$nextTick调用函数,即页面二次更新后调用函数,获取div的属性。