mp-jsx - add logs.jsx

This commit is contained in:
dntzhang 2019-03-30 21:53:58 +08:00
parent 357037a2cd
commit 689f7634be
2 changed files with 9 additions and 6 deletions

View File

@ -0,0 +1,5 @@
<view class="container log-list">
{logs.map((log, index) => (
<text class="log-item">{index + 1}. {log}</text>
))}
</view>

View File

@ -1,6 +1,4 @@
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
<block>
<view class="container log-list"><text class="log-item" wx:for="{{logs}}" wx:for-item="log" wx:for-index="index">{{index + 1}}. {{log}}</text>
</view>
</block>