The method in the wepy framework computed, how to pass parameters in the template

there is such a demand at present:

<view wx:for="{{getUserInfo}}" wx:key="index" wx:for-index="index">
    <!-- -->
    <view>{{item.name}}</view>
    <!-- -->
    <view>{{setUserName}}</view> 
</view>
computed = {
    setUserName(name) {
       name = item.name;
       ... 
       return name;
    }
};

want to know what to do with this? Has anyone met it? How do you handle it?


gives you an idea. The two view can be placed in wx:if and wx:else respectively, so that the view in else is displayed when the data method in the calculation property changes.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c23f-2baf8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c23f-2baf8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?