xuliangzhan / vue-element-extends

🌴 基于 ElementUI 2.x 的扩展组件(已废弃 Have been abandoned)
MIT License
493 stars 166 forks source link

使用elem表格原来的方法setCurrentRow()报错 #112

Closed wekerSnail closed 5 years ago

wekerSnail commented 5 years ago

问题描述 Describe the bug

需要设置高亮行,传入row之后报错 重现问题的步骤 To Reproduce

在updated中调用setCurrentRow()方法 下面是我的代码 image

请提供能重现问题的链接(jsfiddle、jsrun) Expected behavior

报错信息或截图 Error message or screenshots

image

image

期望的结果 Expected behavior

调用成功,设置高亮行 请填写以下版本信息 please complete the following information

xuliangzhan commented 5 years ago

这个 currentRow 相关参数打印看下

wekerSnail commented 5 years ago

周末没法跑代码,不过参数我记得,是我点击的表格那行的数据参数,大致这个样子{name:'',id:'',...}

wekerSnail commented 5 years ago

image 我在下拉菜单选择完,那选择的结果去查询一个值,在设置当前编辑行的数据,通关reloadRow(row)方法重置当前行的数据,但是没有效果,数据并没有变

row打印出来是这样的 image

wekerSnail commented 5 years ago

貌似搞清楚了,数据得保持引用关系,使用接收值修改属性在传入,不能使用新变量去传入