index.axml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. style="{{ style }}"
  27. animationType="{{ animationType }}"
  28. options="{{ columns }}"
  29. value="{{ currentValue }}"
  30. disabled="{{ disabled }}"
  31. title="{{ title }}"
  32. placeholder="{{ placeholder }}"
  33. okText="{{ okText }}"
  34. cancelText="{{ cancelText }}"
  35. maskStyle="{{ maskStyle }}"
  36. maskClassName="{{ maskClassName }}"
  37. indicatorStyle="{{ indicatorStyle }}"
  38. indicatorClassName="{{ indicatorClassName }}"
  39. onChange="onChange"
  40. onCancel="onCancel"
  41. onOk="onOk"
  42. onVisibleChange="onVisibleChange"
  43. maskClosable="{{ maskClosable }}">
  44. <view
  45. class="ant-range-picker-selector"
  46. slot="content-header">
  47. <template
  48. is="selector"
  49. data="{{ placeholder: startPlaceholder, active: pickerType === 'start', type: 'start', value: currentStartValueStr, precision: precision }}" />
  50. <view class="ant-range-picker-selector-split">{{ splitCharacter }}</view>
  51. <template
  52. is="selector"
  53. data="{{ placeholder: endPlaceholder, active: pickerType === 'end', type: 'end', value: currentEndValueStr, precision: precision }}" />
  54. </view>
  55. <slot
  56. name="content"
  57. slot="content" />
  58. <slot
  59. name="title"
  60. slot="title" />
  61. <slot
  62. name="prefix"
  63. slot="prefix" />
  64. <slot
  65. name="suffix"
  66. slot="suffix" />
  67. </ant-picker>