Vue.js Ag网格-事件和方法(Vuejs)

Vue.js Ag网格-事件和方法(Vuejs),vue.js,events,ag-grid,Vue.js,Events,Ag Grid,我无法使用save方法保存对表数据的更改 我正在使用cellValueChanged方法编辑和保存表格单元格 <ag-grid-vue :cellValueChanged="save"></ag-grid-vue> methods: { save() { const method = this.instituicao.id ? 'put' : 'post' const id = this.instituicao.id ? `/${

我无法使用save方法保存对表数据的更改

我正在使用cellValueChanged方法编辑和保存表格单元格

<ag-grid-vue :cellValueChanged="save"></ag-grid-vue>

methods: {
    save() {
        const method = this.instituicao.id ? 'put' : 'post'
        const id = this.instituicao.id ? `/${this.instituicao.id}` : ''
        axios[method](`${baseApiUrl}/instituicao${id}`, this.instituicao)
            .then(() => {
                this.$toasted.global.defaultSuccess()
                this.reset()
            })
            .catch(showError)
},
错误消息:

要获得预期结果,请使用@cell value changed的事件回调

将事件更改为@cell value changed=save 使用事件回调获取单元格的新旧值 保存事件{ console.log'onCellValueChanged:'+event.oldValue+'改为'+event.newValue; }

从该事件回调中获取所需的id值,并将其用于POST调用
你有没有尝试过这个机构的console.log,它似乎是未定义的,我可以查看机构数据:mounted{this.columnDefs=[{headerName:'ID',field:'ID',filter:false,editable:true},{headerName:'Código do Banco',field:'codigo',filter:false,editable:true},{headerName:'Nome do Banco',field:'Nome',filter:false,editable:true}];axios.get${baseapirl}/instituico.then{data}=>this.rowData=data},尝试使用this.instituicao&instituicao.id哪行代码?const method=this.instituicao&instituicao.id?'put':'post'我能够通过请求参数使用axios应用post方法:axios[method]${baseApiUrl}/institution/${event.data.id},event.data我如何在多行上应用方法?