我无法使用“保存”方法来保存对表数据的更改
我使用"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)
},错误消息:在这里输入图像描述
发布于 2019-11-13 15:37:49
若要达到预期结果,请使用@cell-value-changed的事件回调。
`save(event) { console.log('onCellValueChanged: ' + event.oldValue + ' to ' + event.newValue); }` https://stackoverflow.com/questions/58823944
复制相似问题