// 使用EasyUI textbox组件的setValue方法赋值
$('#dlgStartLocationCode').textbox('setValue', row.startlocationcode);
$('#dlgTargetLocationCode').textbox('setValue', row.targetlocationcode);
$('#dlgStartLocationName').textbox('setValue', row.startlocationname);
$('#dlgTargetLocationName').textbox('setValue', row.targetlocationname);
$('#dlgDistance').textbox('setValue', row.distance);
$('#dlgRemark').textbox('setValue', row.remark);
- 直接使用 原生DOM 的
val()方法$('#dlgStartLocationCode').val(...)只能操作底层<input>,但 EasyUI 组件会维护自己的状态,导致界面不更新。