1
0

index.wxml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <navigation-bar background="#FFF"></navigation-bar>
  2. <view wx:if="{{toastText}}" class="page-toast page-toast--{{toastType}}">
  3. {{toastText}}
  4. </view>
  5. <scroll-view class="scrollarea" scroll-y type="list">
  6. <view class="page-shell">
  7. <view class="panel control-panel">
  8. <view class="panel-header panel-header--with-actions">
  9. <view class="panel-icon icon-control"></view>
  10. <view class="panel-title">控制指令</view>
  11. <view class="panel-actions panel-actions--three control-actions">
  12. <view
  13. class="panel-action-button {{connectedDevice ? '' : 'is-disabled'}}"
  14. bindtap="readControlStatus"
  15. >
  16. 读取
  17. </view>
  18. <view
  19. wx:for="{{controlActionButtons}}"
  20. wx:key="key"
  21. class="panel-action-button {{connectedDevice ? '' : 'is-disabled'}}"
  22. data-key="{{item.key}}"
  23. bindtap="onControlButtonTap"
  24. >
  25. {{item.name}}
  26. </view>
  27. </view>
  28. </view>
  29. <view class="param-row input-row">
  30. <view class="param-main">
  31. <view class="param-name">{{speedCommand.name}}</view>
  32. <view class="param-meta {{speedCommand.isDirty ? 'param-meta--dirty' : ''}}">{{speedCommand.addressDisplay}} {{speedCommand.writeValue}}</view>
  33. </view>
  34. <view class="input-wrap">
  35. <input
  36. class="value-input"
  37. type="{{speedCommand.unit ? 'text' : 'digit'}}"
  38. placeholder="--"
  39. value="{{speedCommand.inputValue}}"
  40. bindinput="onSpeedCommandInput"
  41. bindblur="onSpeedCommandBlur"
  42. />
  43. </view>
  44. </view>
  45. <view class="control-grid">
  46. <view wx:for="{{controlButtons}}" wx:key="key" class="control-cell control-cell--{{item.key}}">
  47. <button
  48. class="control-button control-button--{{item.key}}"
  49. disabled="{{!connectedDevice}}"
  50. data-key="{{item.key}}"
  51. bindtap="onControlButtonTap"
  52. >
  53. <text class="control-name">{{item.name}}</text>
  54. </button>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </scroll-view>