监听父组件传入子组件的props 值

  <workflowicon :state="scope.row.state" ></workflowicon>

 props: {
    state: {
      type: String,
      default() {
        return false
      }
    }
  }

监听值的变化

watch:{
    state: {
      handler(newV) {
        console.log("--=-=-=-=-=-=-=-=")
        console.log(newV)
        if(newV === 'SUCCESS'){
          this.isReRun=true
        }else {
          this.isReRun=false
        }
      },
      deep: true,
      immediate: true
    },
  },

你可能感兴趣的:(前端,javascript,开发语言)