小程序
小游戏
企业微信
微信支付
扫描小程序码分享
在cover-view容器里使用 textarea组件,使用wx:if条件的时候会出现错误。
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
<scroll-view bindscroll="calendarmove" scroll-y="true" class='content1' wx:if="{{mark7==true}}">
<view class="asktab">
<button id="1" bindtap="newask1" class="asktab1 {{ask==1?'one':'' }}">最新提问</button>
<button id="2" bindtap="newask2" class="asktab1 {{ask==2?'one':'' }}">我的提问</button>
<button id="3" bindtap="newask3" class="asktab1 {{ask==3?'one':'' }}">发帖</button>
</view>
<view wx:if="{{ask==1}}" class="head">
<image bindtap="bindViewTap" class="userinfo-avatar1" src="{{askmuster[0].avatarUrl}}" mode="cover"></image>
<view class="userinfo-nickname">
<text class="askname">{{askmuster[0].nickName}}</text>
<text>{{askmuster[0].Title}}</text>
<text>{{askmuster[0].content}}</text>
<view wx:if="{{focus==false}}" class="commentbutton" bindtap="focus1">
<view class="commentimg"><image class="commentimg" mode="scaleToFill" src="https://hf360.com.cn/pic/problem/comment.png"></image></view>
<view>回复 </view></view>
<view class="commentbutton2" wx:else>
<button class="commentbutton1" size="mini">发送</button>
<input class="input" bindblur="Losefoucus" focus="{{focus}}"></input> </view>
</view></view>
<view wx:if="{{ask==2}}"></view>
<view wx:if="{{ask==3}}">
<view class="Title"><view>问题标题</view>
<input class="Titleinput" bindblur="bindblurTitle" placeholder="提出一个讨论问题或软件bug"/></view>
<textarea class="contenttext" bindinput="bindTextcontent" placeholder="我们欢迎真诚友善的讨论"></textarea >
<button class="Publish" size="mini" bindtap="Publish"hover-class ="button1click">发表</button>
</scroll-view>
//js
newask2: function (e) {
var ask1 = e.currentTarget.id;
this.setData({
ask: Number(ask1),
})
console.log(this.data.ask)
},
newask3: function (e) {
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
我测试了 没问题啊 你具体描述下
什么错误
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
<scroll-view bindscroll="calendarmove" scroll-y="true" class='content1' wx:if="{{mark7==true}}">
<view class="asktab">
<button id="1" bindtap="newask1" class="asktab1 {{ask==1?'one':'' }}">最新提问</button>
<button id="2" bindtap="newask2" class="asktab1 {{ask==2?'one':'' }}">我的提问</button>
<button id="3" bindtap="newask3" class="asktab1 {{ask==3?'one':'' }}">发帖</button>
</view>
<view wx:if="{{ask==1}}" class="head">
<image bindtap="bindViewTap" class="userinfo-avatar1" src="{{askmuster[0].avatarUrl}}" mode="cover"></image>
<view class="userinfo-nickname">
<text class="askname">{{askmuster[0].nickName}}</text>
<text>{{askmuster[0].Title}}</text>
<text>{{askmuster[0].content}}</text>
<view wx:if="{{focus==false}}" class="commentbutton" bindtap="focus1">
<view class="commentimg"><image class="commentimg" mode="scaleToFill" src="https://hf360.com.cn/pic/problem/comment.png"></image></view>
<view>回复 </view></view>
<view class="commentbutton2" wx:else>
<button class="commentbutton1" size="mini">发送</button>
<input class="input" bindblur="Losefoucus" focus="{{focus}}"></input> </view>
</view></view>
<view wx:if="{{ask==2}}"></view>
<view wx:if="{{ask==3}}">
<view class="Title"><view>问题标题</view>
<input class="Titleinput" bindblur="bindblurTitle" placeholder="提出一个讨论问题或软件bug"/></view>
<textarea class="contenttext" bindinput="bindTextcontent" placeholder="我们欢迎真诚友善的讨论"></textarea >
<button class="Publish" size="mini" bindtap="Publish"hover-class ="button1click">发表</button>
</view>
</scroll-view>
//js
newask2: function (e) {
var ask1 = e.currentTarget.id;
this.setData({
ask: Number(ask1),
})
console.log(this.data.ask)
},
newask3: function (e) {
var ask1 = e.currentTarget.id;
this.setData({
ask: Number(ask1),
})
console.log(this.data.ask)
},
我测试了 没问题啊 你具体描述下
什么错误