ポリマーのchange notificationは、ネイティブ<input>
が続かないという命名規則イベントが必要なため、双方向のデータは、あなたが求めて結合ここに示すように、special syntaxが必要です。あなたの場合
target-prop="{{hostProp::target-change-event}}"
、それは次のようになります。
<input value="{{first::input}}>
これはinput
イベントは<input>
から発生時value
に等しいfirst
を設定するためにポリマーを告げます。これは同等です:
また
const inputEl = this.shadowRoot.querySelector('input');
inputEl.addEventListener('input',() => this.first = value);
demo
、あなたが<input>
のvalue
を反映し、<iron-input>.bindValue
にfirst
をバインドすることができます:
<iron-input bind-value="{{first}}">
<input>
</iron-input>
demo
yの場合OUはまた
のフォントサイズを助けるポリマー2.0で紙入力のユーザ入力テキストサイズを大きくする方法を知っている<paper-input>
のインナー<input>
<paper-input-container>
の--paper-input-container-input
CSSプロパティでスタイリングすることができます。
<dom-module id="x-foo">
<template>
<style>
paper-input {
--paper-input-container-input: {
font-size: 40px;
};
}
</style>
<paper-input label="My label" value="My value"></paper-input>
</template>
</dom-module>
demo
美しい答えが、本当に、おかげで私を助けて! –
@ L.Lasiter問題はありません:) – tony19