props.js 4.2 KB

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