如何禁用TabBarButton? 我希望它是無法點擊和灰色的。Dojo:如何禁用TabBarButton?
沒有任何參數可以在指南中進行設置。 https://dojotoolkit.org/reference-guide/1.9/dojox/mobile/TabBarButton.html
createFooter : function() {
this.inherited(arguments);
this.footer = new Footer({}, this.footerNode);
this.settingsBtn = new TabBarButton(
{
clickable:false,
icon : "images/settingsIcon.png",
}, domConstruct.create("li"));
this.footer.addChild(this.settingsBtn);
this.settingsBtn.onClick = lang.hitch(this, "settings");
},
settings : function() {
alert("settings started");
}
itembase的文檔不說,如果你設置的假小部件的onclick行不通點擊。如果設置爲true,則即使未指定轉場目標(moveTo等),該項目也可以點擊。 如果我將clickable設置爲false,我仍然可以點擊它。 (我將lang.hitch鏈接到該項目) –
你能發佈你的代碼嗎? –
我收錄了我的代碼 –