EasyUi datagrid取值问题
有两张关联的表,通过JSON输出结果
{"rows":[{"id":1,"createDate":null,"creatorId":null,"modifyDate":null,"modifierId":null,"enabled":true,"pbsOrganize":{"id":1,"createDate":null,"creatorId":null,"modifyDate":null,"modifierId":null,"enabled":true,"parent":null,"areaId":1,"name":"系统构建单位","ipAddress":null,"validateIp":null,"unitId":null,"show":null,"sort":null,"address":null},"name":"aaa","amount":"1","usefulness":"1313","departmentId":null,"responsible":null,"mobilePhone":null,"protectionwork":null}]}
字段取法是这样的
<data-options="field:'name',width:150">名称</th>
但如果是对象属性怎么取
<data-options="field:'pbsOrganize.name',width:150">名称</th>
这样好像取不出来,正确的应该怎么样的?
想象中正确取值应该是“系统构建单”可结果为空
------解决方案--------------------API中应该有相关说明
相信这类的帖子有很多的 LZ 多找找
------解决方案--------------------<data-options="field:'" + pbsOrganize.name + "'",width:150">名称</th>