新聞中心
- textarea 多行輸入框
- 屬性說明
- 示例
- 代碼示例
- 代碼示例
textarea 多行輸入框
解釋:自定義多行輸入框,支持白色主題(默認(rèn))、 邊框主題和深色模式主題,可配置字符限制、錯誤提示方式等

屬性說明
| 屬性名 | 類型 | 必填 | 默認(rèn)值 | 說明 |
|---|---|---|---|---|
|
theme |
String |
否 |
default |
多行輸入框主題。default:默認(rèn)白色主題,border:邊框主題,dark:深色模式主題 |
|
placeholder |
String |
否 |
請輸入內(nèi)容 |
輸入內(nèi)容默認(rèn)文案 |
|
placeholderStyle |
String |
否 |
輸入內(nèi)容默認(rèn)文案的樣式 |
|
|
contentLimit |
Number |
否 |
120 |
輸入內(nèi)容長度限制 |
|
width |
String |
否 |
auto |
輸入框?qū)挾?/p> |
|
autoHeight |
Boolean |
否 |
false |
輸入框高度是否自適應(yīng) |
|
promptType |
String |
否 |
toast |
輸入超限提示類型。text:框下文字提示;toast:toast 提示超限;none:不提示 |
|
tipsEdge |
Number |
否 |
20 |
promptType 為 text 時,出現(xiàn)提示時的剩余可輸入字符個數(shù) |
|
toastText |
String |
否 |
超出字?jǐn)?shù)限制 |
promptType 為 toast 時,提示文案內(nèi)容 |
|
submitText |
String |
否 |
發(fā)表 |
發(fā)布按鈕的文字內(nèi)容 |
示例
跳轉(zhuǎn)編輯工具
在開發(fā)者工具中打開
在 WEB IDE 中打開
掃碼體驗
代碼示例
請使用百度APP掃碼
代碼示例
- SWAN
- JS
- CSS
- JSON
{{item.titleBar}} theme="{{item.theme}}"placeholder="{{item.placeholder}}"placeholder-style="{{placeholderStyle}}"autoHeight="{{item.autoHeight}}"promptType="{{item.promptType}}"width="{{item.width}}"textarea-class="external-textarea-container"textarea-content-class="external-textarea-content"textarea-input-class="external-textarea-input"textarea-button-class="external-textarea-button"/>沉浸式主題
設(shè)計指南
必須要有輸入超限提示(promptType),不可不提示
正確
字?jǐn)?shù)超出有明確提示
錯誤
字?jǐn)?shù)超出限制時,無提示
文章題目:創(chuàng)新互聯(lián)百度小程序教程:textarea多行輸入框
標(biāo)題路徑:http://m.fisionsoft.com.cn/article/ccejejo.html


咨詢
建站咨詢
