废话不罗嗦,上硬菜。
1.html下:
:disabled="Disabled[scope.$index]" @keydown.enter.native="Enter(scope.row,scope.$index)">
2.data--->>>return中:
Disabled:[], // 该行是否禁止编辑
3.函数中:
Enter( row,index){ this.Disabled[index] = true, // 使input不可编辑 }