<!--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>