欧洲变态另类zozo,欧美xxxx做受欧美gaybdsm,欧洲熟妇色xxxx欧美老妇软件,免费人成视频xvideos入口 ,欧美.日韩.国产.中文字幕

歡迎光臨本站
我們一直在努力

微信小程序表單驗(yàn)證錯(cuò)誤提示效果

這篇文章主要為大家詳細(xì)介紹了微信小程序表單驗(yàn)證錯(cuò)誤提示效果,點(diǎn)擊確認(rèn)發(fā)布不能為空錯(cuò)誤提示,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

微信小程序表單驗(yàn)證,點(diǎn)擊確認(rèn)發(fā)布不能為空錯(cuò)誤提示,具體內(nèi)容如下

以下是效果圖:

代碼如下:

WXML:

<view class="ad_popError" wx:if="{{popErrorMsg}}">{{popErrorMsg}}</view> 
<view class="ad_popFt"> 
<form bindsubmit="goDetail" > 
  <textarea class="ad_popArea" bindinput="commentTxtFn" focus="{{isPopOpen}}" placeholder="請(qǐng)輸入留言內(nèi)容" placeholder-style="color:#cccccc;" name="textarea" /> 
 <view class="ad_popCout"> 
 <text class="one_star">你還可以輸入</text> 
 <text class="one_stars {{!!tips?'danger':''}}">{{commentTxtCount}}</text> 
 <text class="one_star">字</text> 
 </view> 
 <button class="informBtn" form-type="submit">確認(rèn)發(fā)布</button> 
</form> 
</view>
登錄后復(fù)制

WXSS:

page{background: #f4f4f4;} 
.ad_popHd{height: 76rpx; line-height: 76rpx; font-size: 32rpx;text-align: center; border-bottom: 1px solid #cdd1cd; padding: 0 20rpx;color: #202120;} 
.ad_popFt{ margin: 20rpx ; margin-top: 50rpx;} 
.ad_popArea{ width: 708rpx; height:400rpx;font-size:30rpx;padding: 20rpx; box-sizing: border-box; -webkit-box-sizing: border-box; line-height: 40rpx; color: #333; background: #fff; } 
.ad_popCout{ color: #969899; font-size: 24rpx; text-align: right; line-height: 58rpx; padding: 0 20rpx;} 
.informBtn{background: #09bb07;color: #fff;font-size: 34rpx; margin-top: 38rpx;height: 88rpx;} 
.one_stars{color: #999;} 
.one_star{font-size: 20rpx;color: #999;} 
.danger{ color: #f64400;} 
.ad_popError{ background: #de352d; color: #fff; height: 58rpx; line-height: 58rpx; font-size: 24rpx; text-align: center; position: absolute; left: 0; top: 0; width: 100%; z-index:3;}
登錄后復(fù)制

JS:

// pages/informLeaveMsg/informLeaveMsg.js 
Page({ 

 /** 
 * 頁(yè)面的初始數(shù)據(jù) 
 */ 
 data: { 

 }, 
 //確認(rèn)發(fā)布 
 goDetail:function(e){ 
 setTimeout(()=>{ 
  var subValue = e.detail.value.textarea 
  console.log(subValue) 
  if (subValue == null || subValue == "") { 
  console.log("不能為空") 
  this.setData( 
   { popErrorMsg: "發(fā)布的留言內(nèi)容不能為空" } 
  ); 
  this.ohShitfadeOut(); 
  return;  
  } 

 },100) 

 }, 

 ohShitfadeOut() { 
 var fadeOutTimeout = setTimeout(() => { 
  this.setData({ popErrorMsg: '' }); 
  clearTimeout(fadeOutTimeout); 
 }, 3000); 
 }, 

})
登錄后復(fù)制

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,更多相關(guān)內(nèi)容請(qǐng)關(guān)注PHP中文網(wǎng)!

相關(guān)推薦:

以上就是微信小程序表單驗(yàn)證錯(cuò)誤提示效果的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注有卡有網(wǎng)。

版權(quán)聲明:本文采用知識(shí)共享 署名4.0國(guó)際許可協(xié)議 [BY-NC-SA] 進(jìn)行授權(quán)
文章名稱:《微信小程序表單驗(yàn)證錯(cuò)誤提示效果》
文章鏈接:http://www.ljxxtl.cn/kaquan-baike/xcx/154593.html
本站資源僅供個(gè)人學(xué)習(xí)交流,請(qǐng)于下載后24小時(shí)內(nèi)刪除,不允許用于商業(yè)用途,否則法律問(wèn)題自行承擔(dān)。