File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ Table with editable cells.
1414 <a-button class =" editable-add-btn" @click =" handleAdd" >Add</a-button >
1515 <a-table bordered :dataSource =" dataSource" :columns =" columns" >
1616 <template slot =" name" slot-scope =" text, record" >
17- <editable-cell :text =" text" @change =" onCellChange(record.key, 'name')" />
17+ <editable-cell :text =" text" @change =" onCellChange(record.key, 'name', $event )" />
1818 </template >
1919 <template slot =" operation" slot-scope =" text, record" >
2020 <a-popconfirm
@@ -69,15 +69,13 @@ export default {
6969 }
7070 },
7171 methods: {
72- onCellChange (key , dataIndex ) {
73- return (value ) => {
72+ onCellChange (key , dataIndex , value ) {
7473 const dataSource = [... this .dataSource ]
7574 const target = dataSource .find (item => item .key === key)
7675 if (target) {
7776 target[dataIndex] = value
7877 this .dataSource = dataSource
7978 }
80- }
8179 },
8280 onDelete (key ) {
8381 const dataSource = [... this .dataSource ]
You can’t perform that action at this time.
0 commit comments