也没搞懂你想要表达的需求,看你代码没有涉及到递增倍数只是纯提示。看是不是这样的,我按最简单办法搞。
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241012/9a0623bb16a4b456e8cbae17c0779c88.png)
保存
export default {
data() {
return {
tableData: [
{
id: "12987122",
name: "王小虎",
price: "1",
amount2: "3.2",
amount3: 10,
},
{
id: "12987123",
name: "王小虎",
price: "2",
amount2: "4.43",
amount3: 12,
},
{
id: "12987124",
name: "王小虎",
price: "3",
amount2: "1.9",
amount3: 9,
},
{
id: "12987125",
name: "王小虎",
price: "4",
amount2: "2.2",
amount3: 17,
},
{
id: "12987126",
name: "王小虎",
price: "5",
amount2: "4.1",
amount3: 15,
},
],
};
},
methods: {
handleSave(e) {
if (e.$index != 0) {
let inputPrice = e.row.price;
let row = e.$index - 1;
if (inputPrice