2013-08-28 25 views
0

我使用sliderfunction在煎茶觸摸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.問題是這個數字被方括號所包含,我只能使用這個括號。

任何人都可以請告訴我我該如何解決這個問題?謝謝。

回答

0

您可以通過三種方式獲取價值:

  • <your component>.getValue()[0]
  • parseFloat(<your component>.getValue())
  • <your component>.getValue().toString()
+0

你幫我找到了解決方案,THX ... <你的組件> [0]工作 – user2585014