收藏
回答

微信小程序可以实现多多选题吗?不是复选框的那个

微信小程序可以实现多多选题吗?不是复选框的那个,我只能实现单选,然后多选就不可以


代码

<view wx:for-index="index" wx:if="{{!answerLimit}}" wx:for="{{questionList}}">

<view class="content-title">

{{item.questionTitle}}

</view>

<view class="content-questionA {{showView && key==index && clickSelect ? 'content-questionA-select' : (!showView && key==index && clickSelect && item.answer == items.questionSelect) ? 'content-answer-select' : (!showView && key==index && clickSelect && item.answer !== items.questionSelect) ? 'content-questionA-select' : 'content-questionA' }}"

wx:for="{{item.questions}}" wx:for-index="index" wx:for-item="items" bindtap='selectAnswer' data-index='{{index}}'>

<text class="question-select {{showView && key==index && clickSelect ? 'question-select' : (!showView && key==index && clickSelect && item.answer == items.questionSelect) ? 'question-select-srue' : (!showView && key==index && clickSelect && item.answer !== items.questionSelect) ? 'question-select' : 'question-no-select' }}">{{items.questionSelect}}</text>{{items.question}}

<image wx:if="{{!showView && key==index  && item.answer != items.questionSelect }}" src="../../resource/imgs/cancel.png" class="question-cancel"></image>

<image wx:if="{{!showView && key==index && item.answer == items.questionSelect }}" src="../../resource/imgs/srue.png" class="question-cancel"></image>

</view>

<view class="set-readable" wx:if="{{!showView}}"></view>

<view class="answer-analysis" wx:if="{{!showView}}">

<view class="answer-select">正确答案:{{item.answer}}</view>

<view class="answer-analysis-centent">{{item.answerAnalysis}}</view>

</view>

<view class="select-button">

<button class="submite" wx:if="{{showView}}" bindtap="srue">确定</button>

<button class="next-question" wx:else="{{!showView}}" bindtap="nextQuestion">下一题</button>

</view>

</view>


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签