想問下使用element table實現行內編輯的話如何實現雙向綁定,直接把內嵌的input 通過v-model綁定到表格的data上呢? <yl-onlytable @current-change="_currentChange" :configs="tableConfig" :tableloading="mainTableLoading" :tableData="tableData" > <template :slot="item.name" scope="scope" v-for="(item,index) in tableEditColSlotConfig.formConfig"> <rowComs :option="item" :val="scope.row[item.name]"></rowComs> </template> </yl-onlytable>其中rowComs 是一個組件,渲染單個組件用的 在組件內部用的v-model綁定 直接綁定到了scope.row[item.name] 但是scope.row[item.name]的值更新后是無法更新tableData的值得。所以雙向綁定這塊無法實現了 請高手相助~
elementui table行內編輯如何實現雙向綁定?
慕桂英3389331
2018-11-22 18:18:19