我使用Sencha Touch 2中的滑块功能
我的容器如下所示:
xtype: 'container',
height: 149,
minHeight: 480,
ui: 'dark', width: 283,
items: [ {
xtype: 'sliderfield',
border: 4,
docked: 'top',
height: 42,
itemId: 'alphaSliderField',
width: 280,
label: 'Profilgewichtung',
labelWidth: '44%',
value: [ 0 ],
increment: 0.5,
maxValue: 1
},现在我想使用它的值,它可以是0,0.5和1。问题是这个数字包含在方括号中,我只能用它去掉这些括号。
有没有人能告诉我我该怎么解决这个问题?谢谢。
发布于 2013-08-29 00:04:23
您可以通过三种方式提取值:
<your component>.getValue()[0]parseFloat(<your component>.getValue())<your component>.getValue().toString()https://stackoverflow.com/questions/18492297
复制相似问题