Vue监听函数

'textFlag': {
      handler: function (newValue, oldValue) {
        console.log('新数据', newValue, '旧数据', oldValue, '数据改变了')
        this.nextTick(function () {
          alert('数据已经更新')
        });
        this.$nextTick(function () {
          alert('v-for渲染已经完成')
          常用
          可以指定调用哪个函数
        });
      },
      deep: true,
    },

 

posted @ 2021-11-25 18:42  167  阅读(251)  评论(0)    收藏  举报