textarea 使用问题
发布于 5 年前 作者 chao04 13136 次浏览 来自 官方Issues

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>

</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)

},

我测试了 没问题啊        你具体描述下

什么错误

回到顶部