2012-03-06 33 views
0

我希望我的div像这样煎茶 - 添加自定义属性元素

<div id="example" customAtt="try"></div> 

我如何可以添加自定义属性面板,按钮等,在煎茶?

谢谢

+0

在哪个版本的sencha库? – 2012-03-12 17:51:12

回答

-1

你可以很容易地添加自定义属性,就像你定义配置属性一样。

mycont = { 
     xtype: 'container', 
     id: 'cont123', 
     width: 300, 
     height: 100, 
     customAttribute1: customAttribute1Value 
     customAttribute2: customAttribute2Value 
     ... 
    } 
+0

它不会像OP所指向的那样向dom元素添加任何自定义属性。 – albanx 2015-06-04 14:15:23