Hello! Please tell me how to insert a picture on a condition in Itemtpl. I tried to insert a function but does not work ... Thanks in advance.


Code:
itemTpl :
                          '<img src="{this.resolveImage(values)}" width=100 height=80 margin-left=50px>'
                         +'<b style="color:#F00">{f1} {mode} {f2} {f3}</b>'
                         +'<p style=color:Gray style=font-size:40px style=font-weight:bold>{f14}</p>'
                         +'<p style=color:Gray style=font-size:40px style=font-weight:bold>{f4} {f13}</p>',

                           resolveImage: function () {
                               if (value.mode == cp && value.f2 == 2 && value.f3 == 0) {
                                   return 'resources/images/goods-dlv.png';
                               }
                               return 'resources/images/goods-cap.png';

                           },