index.axml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template name="selector">
  2. <view
  3. class="ant-range-picker-selector-item {{ active ? 'ant-range-picker-selector-item-active' : '' }}"
  4. onTap="onChangeCurrentPickerType"
  5. data-type="{{ type }}">
  6. <view
  7. a:if="{{ value }}"
  8. class="ant-range-picker-selector-item-value">
  9. {{ value }}
  10. </view>
  11. <view
  12. a:else
  13. class="ant-range-picker-selector-item-placeholder">
  14. {{ placeholder }}
  15. </view>
  16. <icon
  17. a:if="{{ precision === 'year' || precision === 'month' || precision === 'day' || precision === 'hour' }}"
  18. type="CalendarOutline"
  19. className="ant-range-picker-selector-item-icon" />
  20. </view>
  21. </template>
  22. <ant-picker
  23. formattedValueText="{{ formattedValueText }}"
  24. className="ant-range-picker {{ className || '' }}"
  25. popClassName="{{ !currentStartDate || !currentEndDate ? 'ant-range-picker-confirm-disabled' : '' }} {{ popClassName || '' }}"
  26. visible="{{ visible }}"
  27. style="{{ style }}"
  28. animationType="{{ animationType }}"
  29. options="{{ columns }}"
  30. value="{{ currentValue }}"
  31. disabled="{{ disabled }}"
  32. title="{{ title }}"
  33. placeholder="{{ placeholder }}"
  34. okText="{{ okText }}"
  35. cancelText="{{ cancelText }}"
  36. maskStyle="{{ maskStyle }}"
  37. maskClassName="{{ maskClassName }}"
  38. indicatorStyle="{{ indicatorStyle }}"
  39. indicatorClassName="{{ indicatorClassName }}"
  40. onChange="onChange"
  41. onCancel="onCancel"
  42. onOk="onOk"
  43. onVisibleChange="onVisibleChange"
  44. maskClosable="{{ maskClosable }}">
  45. <view
  46. class="ant-range-picker-selector"
  47. slot="content-header">
  48. <template
  49. is="selector"
  50. data="{{ placeholder: startPlaceholder, active: pickerType === 'start', type: 'start', value: currentStartValueStr, precision: precision }}" />
  51. <view class="ant-range-picker-selector-split">{{ splitCharacter }}</view>
  52. <template
  53. is="selector"
  54. data="{{ placeholder: endPlaceholder, active: pickerType === 'end', type: 'end', value: currentEndValueStr, precision: precision }}" />
  55. </view>
  56. <slot
  57. name="content"
  58. slot="content" />
  59. <slot
  60. name="title"
  61. slot="title" />
  62. <slot
  63. name="prefix"
  64. slot="prefix" />
  65. <slot
  66. name="suffix"
  67. slot="suffix" />
  68. </ant-picker>