WXML:
<scroll-view scroll-y style="height: calc(100vh - {{statusBarHeight}}px - 46px);width: 100vw;" scroll-into-view="{{scrollviewid}}">
<view wx:for="{{answerList}}" id="{{item.id}}" wx:key="index" class="answerBox">
<view class="Title"><text>{{item.title}}</text></view>
<view class="LabelBox"><text>{{item.label}}</text></view>
</view>
<view id="none" style="height: env(safe-area-inset-bottom);width: 100vw;"></view>
</scroll-view>
JS:
onLoad(options) {
this.setData({
scrollviewid: options.id
})
}
我就这么写的 但是为什么不生效呢??请官方出来说一说我哪里写的有问题!!
id不能以数字开头