props.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. format: {
  40. type: [String, Function, Array]
  41. },
  42. // Value
  43. // format: string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
  44. // Render
  45. // suffixIcon?: VueNode;
  46. // clearIcon?: VueNode;
  47. // prevIcon?: VueNode;
  48. // nextIcon?: VueNode;
  49. // superPrevIcon?: VueNode;
  50. // superNextIcon?: VueNode;
  51. getPopupContainer: {
  52. type: Function
  53. },
  54. panelRender: {
  55. type: Function
  56. },
  57. // // Events
  58. onChange: {
  59. type: Function
  60. },
  61. 'onUpdate:value': {
  62. type: Function
  63. },
  64. onOk: {
  65. type: Function
  66. },
  67. onOpenChange: {
  68. type: Function
  69. },
  70. 'onUpdate:open': {
  71. type: Function
  72. },
  73. onFocus: {
  74. type: Function
  75. },
  76. onBlur: {
  77. type: Function
  78. },
  79. onMousedown: {
  80. type: Function
  81. },
  82. onMouseup: {
  83. type: Function
  84. },
  85. onMouseenter: {
  86. type: Function
  87. },
  88. onMouseleave: {
  89. type: Function
  90. },
  91. onClick: {
  92. type: Function
  93. },
  94. onContextmenu: {
  95. type: Function
  96. },
  97. onKeydown: {
  98. type: Function
  99. },
  100. // WAI-ARIA
  101. role: String,
  102. name: String,
  103. autocomplete: String,
  104. direction: {
  105. type: String
  106. },
  107. showToday: {
  108. type: Boolean,
  109. default: undefined
  110. },
  111. showTime: {
  112. type: [Boolean, Object],
  113. default: undefined
  114. },
  115. locale: {
  116. type: Object
  117. },
  118. size: {
  119. type: String
  120. },
  121. bordered: {
  122. type: Boolean,
  123. default: undefined
  124. },
  125. dateRender: {
  126. type: Function
  127. },
  128. disabledDate: {
  129. type: Function
  130. },
  131. mode: {
  132. type: String
  133. },
  134. picker: {
  135. type: String
  136. },
  137. valueFormat: String,
  138. /** @deprecated Please use `disabledTime` instead. */
  139. disabledHours: Function,
  140. /** @deprecated Please use `disabledTime` instead. */
  141. disabledMinutes: Function,
  142. /** @deprecated Please use `disabledTime` instead. */
  143. disabledSeconds: Function
  144. };
  145. }
  146. function datePickerProps() {
  147. return {
  148. defaultPickerValue: {
  149. type: [String, Object]
  150. },
  151. defaultValue: {
  152. type: [String, Object]
  153. },
  154. value: {
  155. type: [String, Object]
  156. },
  157. disabledTime: {
  158. type: Function
  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. renderExtraFooter: {
  200. type: Function
  201. },
  202. separator: {
  203. type: String
  204. },
  205. ranges: {
  206. type: Object
  207. },
  208. placeholder: Array,
  209. mode: {
  210. type: Array
  211. },
  212. onChange: {
  213. type: Function
  214. },
  215. 'onUpdate:value': {
  216. type: Function
  217. },
  218. onCalendarChange: {
  219. type: Function
  220. },
  221. onPanelChange: {
  222. type: Function
  223. },
  224. onOk: {
  225. type: Function
  226. }
  227. };
  228. }
  229. export { commonProps, datePickerProps, rangePickerProps };