- picker-view示例代码有问题
https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html 直接用示例代码里面的在开发者工具中预览效果 后提示 VM32:1 ./index/index.wxml Now you can provide attr `wx:key` for a `wx:for` to improve performance. 3 | <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange"> 4 | <picker-view-column> > 5 | <view wx:for="{{years}}" style="line-height: 50px">{{item}}年</view> | ^ 6 | </picker-view-column> 7 | <picker-view-column> 8 | <view wx:for="{{months}}" style="line-height: 50px">{{item}}月</view> 如果复制样例中带有wx:key的代码则提示 VM54:1 ./index/index.wxml wx:key="{{days}}" does not look like a valid key name (did you mean wx:key="days" ?) 10 | </picker-view-column> 11 | <picker-view-column> > 12 | <view wx:for="{{days}}" wx:key="{{days}}" style="line-height: 50px; text-align: center;">{{item}}日</view> | ^ 13 | </picker-view-column> 14 | <picker-view-column> 15 | <view class="icon-container">
2020-06-09 - 用云函数获取openid有什么节省资源的方法吗?
目前是用的login,删去了获取信息的代码,直接获取event里面的openId const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) exports.main = async (event) => { return { event, } } js获取res的时候直接从event提取openId,目前开发的测试阶段中,云函数内存消耗稳定是33~35MB,运行时间不一定,1ms~9ms都又出现过,也出现过异常的84ms。 不知道还有更节省资源(内存x时间)的方法吗😌
2020-06-07