テキストフィールドとテキスト領域
テキストを入力として使用するには、コンポーネント、テキストフィールドおよびテキスト領域を使用します。
JUI のテキスト領域コンポーネントは、html を表します。 <textarea/>
.
const textAreaJSON = {
"component": "textarea", //tells the component name
"id": "input_name", // can be used to give a unique identifier to a component
"data": "@name", // the variable storing the inputted text
"on-keyup": {
"name": "submitName",
"eventArgs": {
"keys": [
"ENTER"
]
}
},
},
ここで on-keyup
は、コントローラ内のコマンドを呼び出すための構文です。
これにより、 textArea が生成され、 Enter キーを押すとイベントが呼び出されます submitName
レンダリングされたテキスト領域は次のようになります。
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178