File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1335
1335
var that = this ,
1336
1336
html = [ ] ,
1337
1337
data = this . getData ( ) ;
1338
+
1339
+ function getItemField ( item , field ) {
1340
+ var props = field . split ( '.' ) ;
1341
+ var value = item ;
1342
+ for ( var p in props ) {
1343
+ value = value [ props [ p ] ] ;
1344
+ }
1345
+ return value ;
1346
+ }
1338
1347
1339
1348
this . trigger ( 'pre-body' , data ) ;
1340
1349
1410
1419
1411
1420
$ . each ( this . header . fields , function ( j , field ) {
1412
1421
var text = '' ,
1413
- value = item [ field ] ,
1422
+ value = getItemField ( item , field ) ,
1414
1423
type = '' ,
1415
1424
cellStyle = { } ,
1416
1425
id_ = '' ,
1537
1546
index = $td [ 0 ] . cellIndex ,
1538
1547
field = that . header . fields [ that . options . detailView && ! that . options . cardView ? index - 1 : index ] ,
1539
1548
colomn = that . columns [ getFieldIndex ( that . columns , field ) ] ,
1540
- value = item [ field ] ;
1549
+ value = getItemField ( item , field ) ;
1541
1550
1542
1551
if ( $td . find ( '.detail-icon' ) . length ) {
1543
1552
return ;
You can’t perform that action at this time.
0 commit comments