76c0ee1d by lxs

入表功调整

1 parent 5be8f1fd
...@@ -427,8 +427,7 @@ const inputEventChange = (val, scope, field) => { ...@@ -427,8 +427,7 @@ const inputEventChange = (val, scope, field) => {
427 } 427 }
428 428
429 // 重命名 429 // 重命名
430 const setName = (name, level) => { 430 const setName = (name, level, rIndex) => {
431 const rIndex = currentRow.value.$index;
432 let rowData = tableData.value[rIndex]; 431 let rowData = tableData.value[rIndex];
433 rowData[`name${level}`] = name; 432 rowData[`name${level}`] = name;
434 } 433 }
...@@ -516,7 +515,7 @@ const btnClick = async (btn, bType = null) => { ...@@ -516,7 +515,7 @@ const btnClick = async (btn, bType = null) => {
516 const name = value.trim(); 515 const name = value.trim();
517 if (type == 'edit') { 516 if (type == 'edit') {
518 if (value == inputVal) return 517 if (value == inputVal) return
519 setName(name, level); 518 setName(name, level, rIndex);
520 } else if (type == 'add-same') { 519 } else if (type == 'add-same') {
521 const tData = rowList.at(-1); 520 const tData = rowList.at(-1);
522 const tIndex = tableData.value.findIndex(t => (tData.code4 ? t.code4 === tData.code4 : t.code3 === tData.code3)); 521 const tIndex = tableData.value.findIndex(t => (tData.code4 ? t.code4 === tData.code4 : t.code3 === tData.code3));
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!