props.js 4.2 KB

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