微信小程序,不同的輸入框顯示


<!--pages/index/Component/TextInput/TextInput.wxml-->
<view class= "viewTitle" >
  <text class= "view-Name" >TextInput輸入框展示</text>
  <view class= "lineView" ></view>
</view>
<view class= "section" >
  <input class= "input" placeholder-style= "font-size:15px"
  placeholder= "自動聚焦彈出鍵盤,一個頁面中只能有一個" auto-focus/>
</view>
<view class= "section" >
  <input class= "input" placeholder= "此處只有在點擊下方按鈕時才聚焦" focus= "{{focus}}" />
</view>
<view class= "section1" >
  <button bindtap= "bindButtonTap" >使得輸入框獲取焦點</button>
</view>
<view class= "section" >
  <input class= "input" maxlength= "10" placeholder= "最大輸入長度10" />
</view>
<view class= "section__title" >你輸入的是:{{inputValue}}</view>
<view class= "section" >
  <input class= "input" bindinput= "bindKeyInput" placeholder= "輸入同步到view中" />
</view>
<view class= "section" >
  <input class= "input" bindinput= "bindReplaceInput" placeholder= "連續的兩個1會變成2" />
</view>
<view class= "section" >
  <input class= "input" bindinput= "bindHideKeyboard" placeholder= "輸入123自動收起鍵盤" />
</view>
<view class= "section" >
  <input class= "input" type= "number" placeholder= "這是一個數字輸入框" />
</view>
<view class= "section" >
  <input class= "input" password type= "text" placeholder= "這是一個密碼輸入框" />
</view>
<view class= "section" >
  <input class= "input" type= "digit" placeholder= "帶小數點的數字鍵盤" />
</view>
<view class= "section" >
  <input class= "input" type= "idcard" placeholder= "身份證輸入鍵盤" />
</view>
<view class= "section" >
  <input class= "input" placeholder-style= "color:red" placeholder= "占位符字體是紅色的" />
</view>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM