props.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. function commonProps() {
  2. return {
  3. id: String,
  4. dropdownClassName: String,
  5. dropdownAlign: {
  6. type: Object
  7. },
  8. popupStyle: {
  9. type: Object
  10. },
  11. transitionName: String,
  12. placeholder: String,
  13. allowClear: {
  14. type: Boolean,
  15. default: undefined
  16. },
  17. autofocus: {
  18. type: Boolean,
  19. default: undefined
  20. },
  21. disabled: {
  22. type: Boolean,
  23. default: undefined
  24. },
  25. tabindex: Number,
  26. open: {
  27. type: Boolean,
  28. default: undefined
  29. },
  30. defaultOpen: {
  31. type: Boolean,
  32. default: undefined
  33. },
  34. /** Make input readOnly to avoid popup keyboard in mobile */
  35. inputReadOnly: {
  36. type: Boolean,
  37. default: undefined
  38. },
  39. // Value
  40. // format: string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
  41. // Render
  42. // suffixIcon?: VueNode;
  43. // clearIcon?: VueNode;
  44. // prevIcon?: VueNode;
  45. // nextIcon?: VueNode;
  46. // superPrevIcon?: VueNode;
  47. // superNextIcon?: VueNode;
  48. getPopupContainer: {
  49. type: Function
  50. },
  51. panelRender: {
  52. type: Function
  53. },
  54. // // Events
  55. onChange: {
  56. type: Function
  57. },
  58. 'onUpdate:value': {
  59. type: Function
  60. },
  61. onOk: {
  62. type: Function
  63. },
  64. onOpenChange: {
  65. type: Function
  66. },
  67. 'onUpdate:open': {
  68. type: Function
  69. },
  70. onFocus: {
  71. type: Function
  72. },
  73. onBlur: {
  74. type: Function
  75. },
  76. onMousedown: {
  77. type: Function
  78. },
  79. onMouseup: {
  80. type: Function
  81. },
  82. onMouseenter: {
  83. type: Function
  84. },
  85. onMouseleave: {
  86. type: Function
  87. },
  88. onClick: {
  89. type: Function
  90. },
  91. onContextmenu: {
  92. type: Function
  93. },
  94. onKeydown: {
  95. type: Function
  96. },
  97. // WAI-ARIA
  98. role: String,
  99. name: String,
  100. autocomplete: String,
  101. direction: {
  102. type: String
  103. },
  104. showToday: {
  105. type: Boolean,
  106. default: undefined
  107. },
  108. showTime: {
  109. type: [Boolean, Object],
  110. default: undefined
  111. },
  112. locale: {
  113. type: Object
  114. },
  115. size: {
  116. type: String
  117. },
  118. bordered: {
  119. type: Boolean,
  120. default: undefined
  121. },
  122. dateRender: {
  123. type: Function
  124. },
  125. disabledDate: {
  126. type: Function
  127. },
  128. mode: {
  129. type: String
  130. },
  131. picker: {
  132. type: String
  133. },
  134. valueFormat: String,
  135. /** @deprecated Please use `disabledTime` instead. */
  136. disabledHours: Function,
  137. /** @deprecated Please use `disabledTime` instead. */
  138. disabledMinutes: Function,
  139. /** @deprecated Please use `disabledTime` instead. */
  140. disabledSeconds: Function
  141. };
  142. }
  143. function datePickerProps() {
  144. return {
  145. defaultPickerValue: {
  146. type: [String, Object]
  147. },
  148. defaultValue: {
  149. type: [String, Object]
  150. },
  151. value: {
  152. type: [String, Object]
  153. },
  154. disabledTime: {
  155. type: Function
  156. },
  157. format: {
  158. type: [String, Function, Array]
  159. },
  160. renderExtraFooter: {
  161. type: Function
  162. },
  163. showNow: {
  164. type: Boolean,
  165. default: undefined
  166. },
  167. monthCellRender: {
  168. type: Function
  169. },
  170. // deprecated Please use `monthCellRender"` instead.',
  171. monthCellContentRender: {
  172. type: Function
  173. }
  174. };
  175. }
  176. function rangePickerProps() {
  177. return {
  178. allowEmpty: {
  179. type: Array
  180. },
  181. dateRender: {
  182. type: Function
  183. },
  184. defaultPickerValue: {
  185. type: Array
  186. },
  187. defaultValue: {
  188. type: Array
  189. },
  190. value: {
  191. type: Array
  192. },
  193. disabledTime: {
  194. type: Function
  195. },
  196. disabled: {
  197. type: [Boolean, Array]
  198. },
  199. format: String,
  200. renderExtraFooter: {
  201. type: Function
  202. },
  203. separator: {
  204. type: String
  205. },
  206. ranges: {
  207. type: Object
  208. },
  209. placeholder: Array,
  210. mode: {
  211. type: Array
  212. },
  213. onChange: {
  214. type: Function
  215. },
  216. 'onUpdate:value': {
  217. type: Function
  218. },
  219. onCalendarChange: {
  220. type: Function
  221. },
  222. onPanelChange: {
  223. type: Function
  224. },
  225. onOk: {
  226. type: Function
  227. }
  228. };
  229. }
  230. export { commonProps, datePickerProps, rangePickerProps };