index.wxml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!--weixin.wxml-->
  2. <view class="container">
  3. <view class="panel-display" style="position: relative;">
  4. <view>
  5. <icon id="icon-about" type="info" size="28" color="#aaa" bindtap="showAbout"/></view>
  6. <view id="display-num">{{calc.displayNum}}</view>
  7. <view id="display-op">{{calc.displayOp}}</view>
  8. </view>
  9. <view class="panel-btns">
  10. <view class="btns-rows">
  11. <view id="btn-c" class="btn {{tapped['c']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="c">AC</view>
  12. <view class="btn {{tapped['d']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="d">DEL</view>
  13. <view class="btn {{tapped['/']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="/" style="font-size: 24px;">÷</view>
  14. <view class="btn {{tapped['x']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="x">×</view>
  15. </view>
  16. <view class="btns-rows">
  17. <view class="btn {{tapped['7']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="7">7</view>
  18. <view class="btn {{tapped['8']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="8">8</view>
  19. <view class="btn {{tapped['9']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="9">9</view>
  20. <view class="btn {{tapped['-']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="-">-</view>
  21. </view>
  22. <view class="btns-rows">
  23. <view class="btn {{tapped['4']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="4">4</view>
  24. <view class="btn {{tapped['5']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="5">5</view>
  25. <view class="btn {{tapped['6']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="6">6</view>
  26. <view class="btn {{tapped['+']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="+">+</view>
  27. </view>
  28. <view id="btns2" class="btns-rows">
  29. <view id="btns2-left">
  30. <view class="btns2-left-part">
  31. <view class="btn {{tapped['1']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="1">1</view>
  32. <view class="btn {{tapped['2']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="2">2</view>
  33. <view class="btn {{tapped['3']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="3">3</view>
  34. </view>
  35. <view class="btns2-left-part">
  36. <view class="btn {{tapped['%']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="%">%</view>
  37. <view class="btn {{tapped['0']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="0">0</view>
  38. <view class="btn {{tapped['.']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op=".">.</view>
  39. </view>
  40. </view>
  41. <view id="btns2-right" class="btn {{tapped['=']}}" bindtap="btnClicked" bindtouchstart="btnTouchStart" bindtouchend="btnTouchEnd" data-op="=">=</view>
  42. </view>
  43. </view>
  44. </view>