如何在Vue JS上过滤$ emit

时间:2019-10-16 14:47:11

标签: vue.js vue-component vuex

如何捕获发出的事件并更改值而不创建新的数据流

  

我旨在使其更易于理解:http://prntscr.com/pk4kid


编辑:

我使用vue-form-generator生成动态表单,但是当它是文件时,我需要转到服务器并仅使用变量,否则文件的重量会冻结浏览器...

  

这是从vue-form-generator http://prntscr.com/pk5y6o发出的事件

1 个答案:

答案 0 :(得分:0)

此代码解决了我的问题:

  watch: {
    list: {
      deep: true,

      // We have to move our method to a handler field
      handler() {
        console.log("The list of colours has changed!");
      }
    }
  }