0
私はEnyoアプリでアイテムのリピーターを持っています。現在のセットアップでは、リピーターアイテムはタップされたことを示すトランジションまたはビジュアルキューを表示しません。リピーターアイテムの背景色をワンタッチでスタイルするには?
私が試したのは、リピーターのontapイベントから渡されたリピーターアイテムのクラスを設定することでした。
しかし、開発ツールにステッププロパティaddClassが定義されていないことを私に伝えます:
IncidentTickets.js:653 Uncaught TypeError: Cannot read property 'addClass' of undefined
質問:
どのようにあなたがEnyoリピーターアイテムの背景色ONTAPのスタイルを設定することができますか?
.tapped {
background: #0CA281;
}
ザ・がONTAPイベントに渡されるリピータ項目にCSSクラスを追加しようとしました::
は基本的に私は緑にCSSスタイルの背景色を設定tapPopupBundle: function(inSender, inEvent) {
var item = this.$.repeaterBundle.itemAtIndex(inEvent.index);
this.item.addClass('tapped');
},
そして、これはありますリピータの種類の定義:
{kind: "Scroller", name: "scrollerBundle", touch: true, horizontal:"hidden", showing: false, style: "height: 70%", components: [
{content:"All Apps", style: "font-size: 12px; font-weight: bold; margin-left: 20px; text-decoration:underline;",ontap: 'clearFilters'},
{kind: "Repeater", name: "repeaterBundle", count: 0, onSetupItem: "setupBundle", ontap: "tapPopupBundle", components: [
{tag: "br"},
{ kind: "FittableColumns", components: [
{name: "repBundle", style: "font-size: 12px; font-weight: bold; margin-left: 20px;"}
]}
]},
]},