1 js调用vue

Vue

mounted: function () { window.wagedialog=this.wagedialog },
methods: {
     wagedialog(item, parameter, spring_box) {
      if(item.button_position_sign=='wageFormadd'){
        this.popUp = true
      }else if(item.button_position_sign=='wageFormedit'){
        this.dialogFormVisible = true
        this.edit(parameter.id, parameter.name, parameter.type)
      }
    },

js方法

function dialog(item, parameter, spring_box){
  if(item.button_position_sign=='wageFormedit'){
    window.wagedialog(item, parameter, spring_box)
  }
  if(item.button_position_sign=='wageFormadd'){
    window.wagedialog(item)
  }
};
Logo

前往低代码交流专区

更多推荐