design.wxml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <custom style="height:{{CustomBar}}px;">
  2. <bar class="fixed gradual-blue" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
  3. <navigator class='action' open-type="navigateBack" delta="1" hover-class="none">
  4. <text class='icon-back'></text> 按钮 / 设计
  5. </navigator>
  6. </bar>
  7. </custom>
  8. <view class="padding-xl">
  9. <view class="box bg-white text-center radius {{block?'flex-direction':''}}">
  10. <button class='{{border?"line":"bg"}}{{bordersize?bordersize:""}}-{{color}} {{round?"round":""}} {{size}} {{shadow?"shadow":""}} {{block?"block":""}}'>我是一个按钮</button>
  11. </view>
  12. <view class='padding text-center'> class="<text wx:if="{{color}}">{{border?"line":"bg"}}{{bordersize?bordersize:""}}-{{color}} {{round?"round":""}} {{size}} {{shadow?"shadow":""}} {{block?"block":""}}</text>" </view>
  13. </view>
  14. <form-group class="margin-top" bindtap="showModal" data-target="ColorModal">
  15. <view class='title'>选择颜色</view>
  16. <view class='padding-sm bg-{{color}} solid radius shadow-blur'></view>
  17. </form-group>
  18. <form-group>
  19. <view class='title'>是否圆角</view>
  20. <switch class='sm' bindchange='SetRound'></switch>
  21. </form-group>
  22. <form-group>
  23. <view class='title'>选择尺寸</view>
  24. <radio-group bindchange='SetSize'>
  25. <label class='margin-left-sm'>
  26. <radio class='blue sm radio' value='sm'></radio>
  27. <text> 小</text>
  28. </label>
  29. <label class='margin-left-sm'>
  30. <radio class='blue sm radio' value='' checked></radio>
  31. <text> 中</text>
  32. </label>
  33. <label class='margin-left-sm'>
  34. <radio class='blue sm radio' value='lg'></radio>
  35. <text> 大</text>
  36. </label>
  37. </radio-group>
  38. </form-group>
  39. <form-group>
  40. <view class='title'>是否添加阴影</view>
  41. <switch class='sm' bindchange='SetShadow'></switch>
  42. </form-group>
  43. <form-group>
  44. <view class='title'>是否镂空</view>
  45. <switch class='sm' bindchange='SetBorder'></switch>
  46. </form-group>
  47. <form-group wx:if="{{border}}">
  48. <view class='title'>边框大小</view>
  49. <radio-group bindchange='SetBorderSize'>
  50. <label class='margin-left-sm'>
  51. <radio class='blue sm radio' value='' checked></radio>
  52. <text> 小</text>
  53. </label>
  54. <label class='margin-left-sm'>
  55. <radio class='blue sm radio' value='s'></radio>
  56. <text> 大</text>
  57. </label>
  58. </radio-group>
  59. </form-group>
  60. <!-- <form-group>
  61. <view class='title'>定义为块元素</view>
  62. <switch class='sm' bindchange='SetBlock'></switch>
  63. </form-group> -->
  64. <modal-box class="{{modalName=='ColorModal'?'show':''}}">
  65. <dialog>
  66. <bar class="justify-end">
  67. <view class='content'>选择颜色</view>
  68. <view class='action' bindtap='hideModal'>
  69. <text class='icon-close text-red'></text>
  70. </view>
  71. </bar>
  72. <view class='grid col-5 padding'>
  73. <view class='padding-xs' wx:for="{{ColorList}}" wx:key bindtap='SetColor' data-color='{{item.name}}'>
  74. <view class='padding-tb bg-{{item.name}} radius'> {{item.title}} </view>
  75. </view>
  76. </view>
  77. </dialog>
  78. </modal-box>