index.wxml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <wux-cell
  2. wux-class="{{ classes.cell }}"
  3. prefixCls="{{ cellPrefixCls }}"
  4. thumb="{{ context.iconPosition === 'right' ? thumb : '' }}"
  5. title="{{ title }}"
  6. label="{{ label }}"
  7. hasLine="{{ !context.hasFieldDecorator ? (hasLine || context.hasLine) && !isLast : false }}"
  8. disabled="{{ disabled || context.disabled }}"
  9. hoverClass="{{ !(readOnly || context.readOnly || context.hasFieldDecorator) ? 'default' : 'none' }}"
  10. wrapStyle="{{ !context.hasFieldDecorator ? wrapStyle : { paddingLeft: 0, paddingRight: 0, ...wrapStyle } }}"
  11. wx:if="{{ context.withListComponent }}"
  12. >
  13. <block wx:if="{{ context.iconPosition === 'right' }}">
  14. <wux-selectable
  15. slot="footer"
  16. wux-class="{{ classes.selectable }}"
  17. prefixCls="{{ selectablePrefixCls }}"
  18. type="radio"
  19. value="{{ value }}"
  20. checked="{{ inputChecked }}"
  21. color="{{ color }}"
  22. disabled="{{ disabled || context.disabled }}"
  23. readOnly="{{ readOnly || context.readOnly }}"
  24. iconSize="{{ context.iconSize }}"
  25. iconOn="{{ context.iconOn }}"
  26. iconOff="{{ context.iconOff }}"
  27. controlled
  28. bind:change="radioChange"
  29. />
  30. </block>
  31. <block wx:else>
  32. <view slot="header" class="{{ classes.iconPosition }}">
  33. <view class="{{ classes.iconSelectable }}">
  34. <wux-selectable
  35. wux-class="{{ classes.selectable }}"
  36. prefixCls="{{ selectablePrefixCls }}"
  37. type="radio"
  38. value="{{ value }}"
  39. checked="{{ inputChecked }}"
  40. color="{{ color }}"
  41. disabled="{{ disabled || context.disabled }}"
  42. readOnly="{{ readOnly || context.readOnly }}"
  43. iconSize="{{ context.iconSize }}"
  44. iconOn="{{ context.iconOn }}"
  45. iconOff="{{ context.iconOff }}"
  46. controlled
  47. bind:change="radioChange"
  48. />
  49. </view>
  50. <block wx:if="{{ thumb }}">
  51. <image class="{{ classes.thumb }}" src="{{ thumb }}" />
  52. </block>
  53. </view>
  54. </block>
  55. </wux-cell>
  56. <block wx:else>
  57. <wux-selectable
  58. wux-class="{{ classes.selectableH }}"
  59. prefixCls="{{ selectablePrefixCls }}"
  60. type="radio"
  61. value="{{ value }}"
  62. checked="{{ inputChecked }}"
  63. color="{{ color }}"
  64. disabled="{{ disabled || context.disabled }}"
  65. readOnly="{{ readOnly || context.readOnly }}"
  66. iconSize="{{ context.iconSize }}"
  67. iconOn="{{ context.iconOn }}"
  68. iconOff="{{ context.iconOff }}"
  69. controlled
  70. bind:change="radioChange"
  71. >
  72. {{ title }}
  73. </wux-selectable>
  74. </block>