发送信件时必须要选择一项,并且内容描述不能为空,这个应该怎么判断并绑定发送事件呢(:| ?
<view class="content"> <view class="list-box">
<view v-for="(item,index) in list" :key="index" @click="choice(index,item)"
:class="[style[index]==item?'selde':'noselde']">
{{item}}
</view>
</view>
<view class="textarea_box">
<textarea class="textarea" placeholder="请您描述一下您的留言" maxlength="500" @input="descInput" v-model="desc" />
<view class="num">{{ desc.length }}/500</view>
</view>
<easy-upload :dataList="dataList" uploadUrl="https://wmcs.jlbstv.com/index.php?m=api&c=v1.Api&a=upload_head_pic&_ajax=1"
deleteUrl='' :types="types" @successImage="successImage"
@successVideo="successvideo" @delImage="delImage" autoUpload="true" uploadCount="9"/>
<button type="primary" @click="postMail()">发 布</button>
</view>
回答:
<button @click="style.length && desc.trim() && postMail()">发布</button>
以上是 发送信件时必须要选择一项,并且内容描述不能为空,这个应该怎么判断并绑定发送事件呢(:| ? 的全部内容, 来源链接: utcz.com/p/936006.html