国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 熱點 > 微信 > 正文

微信小程序 textarea 組件詳解及簡單實例

2024-07-22 01:16:41
字體:
來源:轉載
供稿:網友

微信小程序textarea

相關文章:

微信小程序 Button

微信小程序 radio

微信小程序 slider

微信小程序 switch

微信小程序 textarea

微信小程序 picker-view

微信小程序 picker

微信小程序 label

微信小程序 input 

微信小程序 form

微信小程序 checkbox

多行輸入框。

屬性名 類型 默認值 說明
value String   輸入框的內容
placeholder String   輸入框為空時占位符
placeholder-style String   指定 placeholder 的樣式
placeholder-class String textarea-placeholder 指定 placeholder 的樣式類
disabled Boolean false 是否禁用
maxlength Number 140 最大輸入長度,設置為0的時候不限制最大長度
auto-focus Boolean false 自動聚焦,拉起鍵盤。頁面中只能有一個 <textarea/> 或<input/> 設置 auto-focus 屬性
focus Boolean false 獲取焦點(開發工具暫不支持)
auto-height Boolean false 是否自動增高,設置auto-height時,style.height不生效
bindfocus EventHandle   輸入框聚焦時觸發,event.detail = {value: value}
bindblur EventHandle   輸入框失去焦點時觸發,event.detail = {value: value}
bindlinechange EventHandle   輸入框行數變化時調用,event.detail = {height: 0, heightRpx: 0, lineCount: 0}

示例代碼:

<!--textarea.wxml--><view class="section"> <textarea bindblur="bindTextAreaBlur" auto-height placeholder="自動變高" /></view><view class="section"> <textarea placeholder="placeholder顏色是紅色的" placeholder-style="color:red;" /></view><view class="section"> <textarea placeholder="這是一個可以自動聚焦的textarea" auto-focus /></view><view class="section"> <textarea placeholder="這個只有在按鈕點擊的時候才聚焦" focus="{{focus}}" /> <view class="btn-area"> <button bindtap="bindButtonTap">使得輸入框獲取焦點</button> </view></view>            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 龙泉市| 铜陵市| 高邑县| 沭阳县| 新余市| 富锦市| 宜兰县| 宾川县| 嘉祥县| 九台市| 额尔古纳市| 景洪市| 滕州市| 湘潭市| 饶阳县| 阳高县| 板桥市| 永州市| 深州市| 泰顺县| 璧山县| 天峻县| 灯塔市| 资溪县| 大关县| 定襄县| 虹口区| 东光县| 栾城县| 武强县| 阳江市| 县级市| 天镇县| 天门市| 嘉兴市| 金寨县| 巫溪县| 安仁县| 大英县| 山阳县| 神木县|