0
点赞
收藏
分享

微信扫一扫

PUG jade 模板数组过滤

梅梅的时光 2023-03-04 阅读 117


PUG jade  模板数组过滤

-if(utility.path("accounts", data))
each account in (data.accounts || []).filter(x=> ["depository", "credit"].includes(x.type))
.list-group-item.list-group-item-action.cursor-pointer.p-1
.list-group-item-heading
p.font-medium-1.pb-0
| #{account.official_name}
span.text-bold-600.font-medium-2.blue-grey.darken-1.float-xs-right #{utility.formatMoney(account.balances.current)}

.list-group-item-text
span.mr-sub.tag.text-capitalize.tag-default.bg-lighten-2
| #{account.name}
span.mr-sub.tag.text-capitalize.tag-warning.bg-lighten-2
| #{account.type}

 

举报

相关推荐

0 条评论