@penggy/element-ui 2.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (790) hide show
  1. package/CHANGELOG.en-US.md +748 -0
  2. package/CHANGELOG.es.md +756 -0
  3. package/CHANGELOG.zh-CN.md +748 -0
  4. package/LICENSE +21 -0
  5. package/README.md +237 -0
  6. package/lib/alert.js +343 -0
  7. package/lib/aside.js +277 -0
  8. package/lib/autocomplete.js +767 -0
  9. package/lib/badge.js +316 -0
  10. package/lib/breadcrumb-item.js +303 -0
  11. package/lib/breadcrumb.js +290 -0
  12. package/lib/button-group.js +267 -0
  13. package/lib/button.js +345 -0
  14. package/lib/card.js +280 -0
  15. package/lib/carousel-item.js +378 -0
  16. package/lib/carousel.js +532 -0
  17. package/lib/cascader.js +1338 -0
  18. package/lib/checkbox-button.js +446 -0
  19. package/lib/checkbox-group.js +310 -0
  20. package/lib/checkbox.js +481 -0
  21. package/lib/col.js +172 -0
  22. package/lib/collapse-item.js +404 -0
  23. package/lib/collapse.js +326 -0
  24. package/lib/color-picker.js +1826 -0
  25. package/lib/container.js +288 -0
  26. package/lib/date-picker.js +4396 -0
  27. package/lib/dialog.js +490 -0
  28. package/lib/directives/mousewheel.js +26 -0
  29. package/lib/directives/repeat-click.js +30 -0
  30. package/lib/dropdown-item.js +305 -0
  31. package/lib/dropdown-menu.js +330 -0
  32. package/lib/dropdown.js +623 -0
  33. package/lib/element-ui.common.js +32381 -0
  34. package/lib/footer.js +277 -0
  35. package/lib/form-item.js +610 -0
  36. package/lib/form.js +428 -0
  37. package/lib/header.js +277 -0
  38. package/lib/icon.js +270 -0
  39. package/lib/index.js +1 -0
  40. package/lib/input-number.js +590 -0
  41. package/lib/input.js +735 -0
  42. package/lib/loading.js +616 -0
  43. package/lib/locale/format.js +56 -0
  44. package/lib/locale/index.js +63 -0
  45. package/lib/locale/lang/af-ZA.js +112 -0
  46. package/lib/locale/lang/ar.js +111 -0
  47. package/lib/locale/lang/bg.js +112 -0
  48. package/lib/locale/lang/ca.js +111 -0
  49. package/lib/locale/lang/cs-CZ.js +114 -0
  50. package/lib/locale/lang/da.js +111 -0
  51. package/lib/locale/lang/de.js +113 -0
  52. package/lib/locale/lang/ee.js +112 -0
  53. package/lib/locale/lang/el.js +112 -0
  54. package/lib/locale/lang/en.js +112 -0
  55. package/lib/locale/lang/es.js +111 -0
  56. package/lib/locale/lang/eu.js +112 -0
  57. package/lib/locale/lang/fa.js +112 -0
  58. package/lib/locale/lang/fi.js +112 -0
  59. package/lib/locale/lang/fr.js +111 -0
  60. package/lib/locale/lang/he.js +112 -0
  61. package/lib/locale/lang/hu.js +111 -0
  62. package/lib/locale/lang/id.js +112 -0
  63. package/lib/locale/lang/it.js +111 -0
  64. package/lib/locale/lang/ja.js +112 -0
  65. package/lib/locale/lang/km.js +112 -0
  66. package/lib/locale/lang/ko.js +112 -0
  67. package/lib/locale/lang/ku.js +112 -0
  68. package/lib/locale/lang/kz.js +112 -0
  69. package/lib/locale/lang/lt.js +112 -0
  70. package/lib/locale/lang/lv.js +112 -0
  71. package/lib/locale/lang/mn.js +112 -0
  72. package/lib/locale/lang/nb-NO.js +111 -0
  73. package/lib/locale/lang/nl.js +112 -0
  74. package/lib/locale/lang/pl.js +112 -0
  75. package/lib/locale/lang/pt-br.js +112 -0
  76. package/lib/locale/lang/pt.js +112 -0
  77. package/lib/locale/lang/ro.js +112 -0
  78. package/lib/locale/lang/ru-RU.js +112 -0
  79. package/lib/locale/lang/sk.js +114 -0
  80. package/lib/locale/lang/sl.js +112 -0
  81. package/lib/locale/lang/sr.js +112 -0
  82. package/lib/locale/lang/sv-SE.js +112 -0
  83. package/lib/locale/lang/ta.js +111 -0
  84. package/lib/locale/lang/th.js +112 -0
  85. package/lib/locale/lang/tk.js +112 -0
  86. package/lib/locale/lang/tr-TR.js +112 -0
  87. package/lib/locale/lang/ua.js +112 -0
  88. package/lib/locale/lang/ug-CN.js +112 -0
  89. package/lib/locale/lang/vi.js +112 -0
  90. package/lib/locale/lang/zh-CN.js +112 -0
  91. package/lib/locale/lang/zh-TW.js +112 -0
  92. package/lib/main.js +269 -0
  93. package/lib/menu-item-group.js +302 -0
  94. package/lib/menu-item.js +444 -0
  95. package/lib/menu.js +915 -0
  96. package/lib/message-box.js +917 -0
  97. package/lib/message.js +483 -0
  98. package/lib/mixins/emitter.js +36 -0
  99. package/lib/mixins/focus.js +15 -0
  100. package/lib/mixins/locale.js +17 -0
  101. package/lib/mixins/migrating.js +64 -0
  102. package/lib/notification.js +539 -0
  103. package/lib/option-group.js +327 -0
  104. package/lib/option.js +443 -0
  105. package/lib/pagination.js +1000 -0
  106. package/lib/popover.js +545 -0
  107. package/lib/progress.js +406 -0
  108. package/lib/radio-button.js +389 -0
  109. package/lib/radio-group.js +370 -0
  110. package/lib/radio.js +402 -0
  111. package/lib/rate.js +607 -0
  112. package/lib/row.js +144 -0
  113. package/lib/scrollbar.js +441 -0
  114. package/lib/select.js +1691 -0
  115. package/lib/slider.js +938 -0
  116. package/lib/spinner.js +284 -0
  117. package/lib/step.js +439 -0
  118. package/lib/steps.js +338 -0
  119. package/lib/submenu.js +689 -0
  120. package/lib/switch.js +445 -0
  121. package/lib/tab-pane.js +316 -0
  122. package/lib/table-column.js +670 -0
  123. package/lib/table.js +3941 -0
  124. package/lib/tabs.js +960 -0
  125. package/lib/tag.js +292 -0
  126. package/lib/theme-chalk/alert.css +1 -0
  127. package/lib/theme-chalk/aside.css +1 -0
  128. package/lib/theme-chalk/autocomplete.css +1 -0
  129. package/lib/theme-chalk/badge.css +1 -0
  130. package/lib/theme-chalk/base.css +1 -0
  131. package/lib/theme-chalk/breadcrumb-item.css +0 -0
  132. package/lib/theme-chalk/breadcrumb.css +1 -0
  133. package/lib/theme-chalk/button-group.css +0 -0
  134. package/lib/theme-chalk/button.css +1 -0
  135. package/lib/theme-chalk/card.css +1 -0
  136. package/lib/theme-chalk/carousel-item.css +1 -0
  137. package/lib/theme-chalk/carousel.css +1 -0
  138. package/lib/theme-chalk/cascader.css +1 -0
  139. package/lib/theme-chalk/checkbox-button.css +0 -0
  140. package/lib/theme-chalk/checkbox-group.css +0 -0
  141. package/lib/theme-chalk/checkbox.css +1 -0
  142. package/lib/theme-chalk/col.css +1 -0
  143. package/lib/theme-chalk/collapse-item.css +0 -0
  144. package/lib/theme-chalk/collapse.css +1 -0
  145. package/lib/theme-chalk/color-picker.css +1 -0
  146. package/lib/theme-chalk/container.css +1 -0
  147. package/lib/theme-chalk/date-picker.css +1 -0
  148. package/lib/theme-chalk/dialog.css +1 -0
  149. package/lib/theme-chalk/display.css +1 -0
  150. package/lib/theme-chalk/dropdown-item.css +0 -0
  151. package/lib/theme-chalk/dropdown-menu.css +0 -0
  152. package/lib/theme-chalk/dropdown.css +1 -0
  153. package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
  154. package/lib/theme-chalk/fonts/element-icons.woff +0 -0
  155. package/lib/theme-chalk/footer.css +1 -0
  156. package/lib/theme-chalk/form-item.css +0 -0
  157. package/lib/theme-chalk/form.css +1 -0
  158. package/lib/theme-chalk/header.css +1 -0
  159. package/lib/theme-chalk/icon.css +1 -0
  160. package/lib/theme-chalk/index.css +1 -0
  161. package/lib/theme-chalk/input-number.css +1 -0
  162. package/lib/theme-chalk/input.css +1 -0
  163. package/lib/theme-chalk/loading.css +1 -0
  164. package/lib/theme-chalk/main.css +1 -0
  165. package/lib/theme-chalk/menu-item-group.css +0 -0
  166. package/lib/theme-chalk/menu-item.css +0 -0
  167. package/lib/theme-chalk/menu.css +1 -0
  168. package/lib/theme-chalk/message-box.css +1 -0
  169. package/lib/theme-chalk/message.css +1 -0
  170. package/lib/theme-chalk/notification.css +1 -0
  171. package/lib/theme-chalk/option-group.css +1 -0
  172. package/lib/theme-chalk/option.css +1 -0
  173. package/lib/theme-chalk/pagination.css +1 -0
  174. package/lib/theme-chalk/popover.css +1 -0
  175. package/lib/theme-chalk/popper.css +1 -0
  176. package/lib/theme-chalk/progress.css +1 -0
  177. package/lib/theme-chalk/radio-button.css +1 -0
  178. package/lib/theme-chalk/radio-group.css +1 -0
  179. package/lib/theme-chalk/radio.css +1 -0
  180. package/lib/theme-chalk/rate.css +1 -0
  181. package/lib/theme-chalk/reset.css +1 -0
  182. package/lib/theme-chalk/row.css +1 -0
  183. package/lib/theme-chalk/scrollbar.css +1 -0
  184. package/lib/theme-chalk/select-dropdown.css +1 -0
  185. package/lib/theme-chalk/select.css +1 -0
  186. package/lib/theme-chalk/slider.css +1 -0
  187. package/lib/theme-chalk/spinner.css +1 -0
  188. package/lib/theme-chalk/step.css +1 -0
  189. package/lib/theme-chalk/steps.css +1 -0
  190. package/lib/theme-chalk/submenu.css +0 -0
  191. package/lib/theme-chalk/switch.css +1 -0
  192. package/lib/theme-chalk/tab-pane.css +0 -0
  193. package/lib/theme-chalk/table-column.css +1 -0
  194. package/lib/theme-chalk/table.css +1 -0
  195. package/lib/theme-chalk/tabs.css +1 -0
  196. package/lib/theme-chalk/tag.css +1 -0
  197. package/lib/theme-chalk/time-picker.css +1 -0
  198. package/lib/theme-chalk/time-select.css +1 -0
  199. package/lib/theme-chalk/tooltip.css +1 -0
  200. package/lib/theme-chalk/transfer.css +1 -0
  201. package/lib/theme-chalk/tree.css +1 -0
  202. package/lib/theme-chalk/upload.css +1 -0
  203. package/lib/time-picker.js +2553 -0
  204. package/lib/time-select.js +1839 -0
  205. package/lib/tooltip.js +397 -0
  206. package/lib/transfer.js +883 -0
  207. package/lib/transitions/collapse-transition.js +91 -0
  208. package/lib/tree.js +2138 -0
  209. package/lib/umd/locale/af-ZA.js +128 -0
  210. package/lib/umd/locale/ar.js +127 -0
  211. package/lib/umd/locale/bg.js +128 -0
  212. package/lib/umd/locale/ca.js +127 -0
  213. package/lib/umd/locale/cs-CZ.js +130 -0
  214. package/lib/umd/locale/da.js +127 -0
  215. package/lib/umd/locale/de.js +129 -0
  216. package/lib/umd/locale/ee.js +128 -0
  217. package/lib/umd/locale/el.js +128 -0
  218. package/lib/umd/locale/en.js +128 -0
  219. package/lib/umd/locale/es.js +127 -0
  220. package/lib/umd/locale/eu.js +128 -0
  221. package/lib/umd/locale/fa.js +128 -0
  222. package/lib/umd/locale/fi.js +128 -0
  223. package/lib/umd/locale/fr.js +127 -0
  224. package/lib/umd/locale/he.js +128 -0
  225. package/lib/umd/locale/hu.js +127 -0
  226. package/lib/umd/locale/id.js +128 -0
  227. package/lib/umd/locale/it.js +127 -0
  228. package/lib/umd/locale/ja.js +128 -0
  229. package/lib/umd/locale/km.js +128 -0
  230. package/lib/umd/locale/ko.js +128 -0
  231. package/lib/umd/locale/ku.js +128 -0
  232. package/lib/umd/locale/kz.js +128 -0
  233. package/lib/umd/locale/lt.js +128 -0
  234. package/lib/umd/locale/lv.js +128 -0
  235. package/lib/umd/locale/mn.js +128 -0
  236. package/lib/umd/locale/nb-NO.js +127 -0
  237. package/lib/umd/locale/nl.js +128 -0
  238. package/lib/umd/locale/pl.js +128 -0
  239. package/lib/umd/locale/pt-br.js +128 -0
  240. package/lib/umd/locale/pt.js +128 -0
  241. package/lib/umd/locale/ro.js +128 -0
  242. package/lib/umd/locale/ru-RU.js +128 -0
  243. package/lib/umd/locale/sk.js +130 -0
  244. package/lib/umd/locale/sl.js +128 -0
  245. package/lib/umd/locale/sr.js +128 -0
  246. package/lib/umd/locale/sv-SE.js +128 -0
  247. package/lib/umd/locale/ta.js +127 -0
  248. package/lib/umd/locale/th.js +128 -0
  249. package/lib/umd/locale/tk.js +128 -0
  250. package/lib/umd/locale/tr-TR.js +128 -0
  251. package/lib/umd/locale/ua.js +128 -0
  252. package/lib/umd/locale/ug-CN.js +128 -0
  253. package/lib/umd/locale/vi.js +128 -0
  254. package/lib/umd/locale/zh-CN.js +128 -0
  255. package/lib/umd/locale/zh-TW.js +128 -0
  256. package/lib/upload.js +1301 -0
  257. package/lib/utils/after-leave.js +35 -0
  258. package/lib/utils/aria-dialog.js +104 -0
  259. package/lib/utils/aria-utils.js +125 -0
  260. package/lib/utils/clickoutside.js +79 -0
  261. package/lib/utils/date.js +345 -0
  262. package/lib/utils/dom.js +188 -0
  263. package/lib/utils/menu/aria-menubar.js +24 -0
  264. package/lib/utils/menu/aria-menuitem.js +62 -0
  265. package/lib/utils/menu/aria-submenu.js +69 -0
  266. package/lib/utils/merge.js +21 -0
  267. package/lib/utils/popper.js +1261 -0
  268. package/lib/utils/popup/index.js +241 -0
  269. package/lib/utils/popup/popup-manager.js +205 -0
  270. package/lib/utils/resize-event.js +57 -0
  271. package/lib/utils/scroll-into-view.js +38 -0
  272. package/lib/utils/scrollbar-width.js +39 -0
  273. package/lib/utils/shared.js +12 -0
  274. package/lib/utils/util.js +138 -0
  275. package/lib/utils/vdom.js +20 -0
  276. package/lib/utils/vue-popper.js +204 -0
  277. package/package.json +143 -0
  278. package/packages/alert/index.js +8 -0
  279. package/packages/alert/src/main.vue +88 -0
  280. package/packages/aside/index.js +8 -0
  281. package/packages/aside/src/main.vue +20 -0
  282. package/packages/autocomplete/index.js +8 -0
  283. package/packages/autocomplete/src/autocomplete-suggestions.vue +76 -0
  284. package/packages/autocomplete/src/autocomplete.vue +269 -0
  285. package/packages/badge/index.js +8 -0
  286. package/packages/badge/src/main.vue +53 -0
  287. package/packages/breadcrumb/index.js +8 -0
  288. package/packages/breadcrumb/src/breadcrumb-item.vue +41 -0
  289. package/packages/breadcrumb/src/breadcrumb.vue +34 -0
  290. package/packages/breadcrumb-item/index.js +8 -0
  291. package/packages/button/index.js +8 -0
  292. package/packages/button/src/button-group.vue +10 -0
  293. package/packages/button/src/button.vue +78 -0
  294. package/packages/button-group/index.js +8 -0
  295. package/packages/card/index.js +8 -0
  296. package/packages/card/src/main.vue +23 -0
  297. package/packages/carousel/index.js +8 -0
  298. package/packages/carousel/src/item.vue +114 -0
  299. package/packages/carousel/src/main.vue +262 -0
  300. package/packages/carousel-item/index.js +8 -0
  301. package/packages/cascader/index.js +8 -0
  302. package/packages/cascader/src/main.vue +456 -0
  303. package/packages/cascader/src/menu.vue +376 -0
  304. package/packages/checkbox/index.js +8 -0
  305. package/packages/checkbox/src/checkbox-button.vue +191 -0
  306. package/packages/checkbox/src/checkbox-group.vue +48 -0
  307. package/packages/checkbox/src/checkbox.vue +219 -0
  308. package/packages/checkbox-button/index.js +8 -0
  309. package/packages/checkbox-group/index.js +8 -0
  310. package/packages/col/index.js +9 -0
  311. package/packages/col/src/col.js +71 -0
  312. package/packages/collapse/index.js +9 -0
  313. package/packages/collapse/src/collapse-item.vue +113 -0
  314. package/packages/collapse/src/collapse.vue +73 -0
  315. package/packages/collapse-item/index.js +8 -0
  316. package/packages/color-picker/index.js +8 -0
  317. package/packages/color-picker/src/color.js +316 -0
  318. package/packages/color-picker/src/components/alpha-slider.vue +132 -0
  319. package/packages/color-picker/src/components/hue-slider.vue +123 -0
  320. package/packages/color-picker/src/components/picker-dropdown.vue +121 -0
  321. package/packages/color-picker/src/components/predefine.vue +61 -0
  322. package/packages/color-picker/src/components/sv-panel.vue +100 -0
  323. package/packages/color-picker/src/draggable.js +36 -0
  324. package/packages/color-picker/src/main.vue +188 -0
  325. package/packages/container/index.js +8 -0
  326. package/packages/container/src/main.vue +33 -0
  327. package/packages/date-picker/index.js +8 -0
  328. package/packages/date-picker/src/basic/date-table.vue +437 -0
  329. package/packages/date-picker/src/basic/month-table.vue +105 -0
  330. package/packages/date-picker/src/basic/time-spinner.vue +301 -0
  331. package/packages/date-picker/src/basic/year-table.vue +101 -0
  332. package/packages/date-picker/src/panel/date-range.vue +640 -0
  333. package/packages/date-picker/src/panel/date.vue +579 -0
  334. package/packages/date-picker/src/panel/time-range.vue +248 -0
  335. package/packages/date-picker/src/panel/time-select.vue +177 -0
  336. package/packages/date-picker/src/panel/time.vue +186 -0
  337. package/packages/date-picker/src/picker/date-picker.js +40 -0
  338. package/packages/date-picker/src/picker/time-picker.js +39 -0
  339. package/packages/date-picker/src/picker/time-select.js +21 -0
  340. package/packages/date-picker/src/picker.vue +924 -0
  341. package/packages/date-picker/src/util/index.js +273 -0
  342. package/packages/dialog/index.js +8 -0
  343. package/packages/dialog/src/component.vue +201 -0
  344. package/packages/dropdown/index.js +8 -0
  345. package/packages/dropdown/src/dropdown-item.vue +35 -0
  346. package/packages/dropdown/src/dropdown-menu.vue +60 -0
  347. package/packages/dropdown/src/dropdown.vue +271 -0
  348. package/packages/dropdown-item/index.js +8 -0
  349. package/packages/dropdown-menu/index.js +8 -0
  350. package/packages/footer/index.js +8 -0
  351. package/packages/footer/src/main.vue +20 -0
  352. package/packages/form/index.js +8 -0
  353. package/packages/form/src/form-item.vue +290 -0
  354. package/packages/form/src/form.vue +148 -0
  355. package/packages/form-item/index.js +8 -0
  356. package/packages/header/index.js +8 -0
  357. package/packages/header/src/main.vue +20 -0
  358. package/packages/icon/index.js +8 -0
  359. package/packages/icon/src/icon.vue +13 -0
  360. package/packages/input/index.js +8 -0
  361. package/packages/input/src/calcTextareaHeight.js +104 -0
  362. package/packages/input/src/input.vue +349 -0
  363. package/packages/input-number/index.js +8 -0
  364. package/packages/input-number/src/input-number.vue +255 -0
  365. package/packages/loading/index.js +11 -0
  366. package/packages/loading/src/directive.js +128 -0
  367. package/packages/loading/src/index.js +106 -0
  368. package/packages/loading/src/loading.vue +41 -0
  369. package/packages/main/index.js +8 -0
  370. package/packages/main/src/main.vue +12 -0
  371. package/packages/menu/index.js +8 -0
  372. package/packages/menu/src/menu-item-group.vue +45 -0
  373. package/packages/menu/src/menu-item.vue +112 -0
  374. package/packages/menu/src/menu-mixin.js +44 -0
  375. package/packages/menu/src/menu.vue +311 -0
  376. package/packages/menu/src/submenu.vue +335 -0
  377. package/packages/menu-item/index.js +8 -0
  378. package/packages/menu-item-group/index.js +8 -0
  379. package/packages/message/index.js +2 -0
  380. package/packages/message/src/main.js +72 -0
  381. package/packages/message/src/main.vue +112 -0
  382. package/packages/message-box/index.js +2 -0
  383. package/packages/message-box/src/main.js +216 -0
  384. package/packages/message-box/src/main.vue +327 -0
  385. package/packages/notification/index.js +2 -0
  386. package/packages/notification/src/main.js +93 -0
  387. package/packages/notification/src/main.vue +152 -0
  388. package/packages/option/index.js +8 -0
  389. package/packages/option-group/index.js +8 -0
  390. package/packages/pagination/index.js +8 -0
  391. package/packages/pagination/src/pager.vue +163 -0
  392. package/packages/pagination/src/pagination.js +430 -0
  393. package/packages/popover/index.js +14 -0
  394. package/packages/popover/src/directive.js +20 -0
  395. package/packages/popover/src/main.vue +207 -0
  396. package/packages/progress/index.js +8 -0
  397. package/packages/progress/src/progress.vue +138 -0
  398. package/packages/radio/index.js +8 -0
  399. package/packages/radio/src/radio-button.vue +114 -0
  400. package/packages/radio/src/radio-group.vue +100 -0
  401. package/packages/radio/src/radio.vue +126 -0
  402. package/packages/radio-button/index.js +8 -0
  403. package/packages/radio-group/index.js +8 -0
  404. package/packages/rate/index.js +8 -0
  405. package/packages/rate/src/main.vue +350 -0
  406. package/packages/row/index.js +9 -0
  407. package/packages/row/src/row.js +47 -0
  408. package/packages/scrollbar/index.js +8 -0
  409. package/packages/scrollbar/src/bar.js +88 -0
  410. package/packages/scrollbar/src/main.js +130 -0
  411. package/packages/scrollbar/src/util.js +34 -0
  412. package/packages/select/index.js +8 -0
  413. package/packages/select/src/navigation-mixin.js +54 -0
  414. package/packages/select/src/option-group.vue +60 -0
  415. package/packages/select/src/option.vue +159 -0
  416. package/packages/select/src/select-dropdown.vue +74 -0
  417. package/packages/select/src/select.vue +878 -0
  418. package/packages/slider/index.js +8 -0
  419. package/packages/slider/src/button.vue +235 -0
  420. package/packages/slider/src/main.vue +385 -0
  421. package/packages/spinner/index.js +8 -0
  422. package/packages/spinner/src/spinner.vue +27 -0
  423. package/packages/step/index.js +8 -0
  424. package/packages/steps/README.md +69 -0
  425. package/packages/steps/index.js +8 -0
  426. package/packages/steps/src/step.vue +180 -0
  427. package/packages/steps/src/steps.vue +68 -0
  428. package/packages/submenu/index.js +8 -0
  429. package/packages/switch/index.js +9 -0
  430. package/packages/switch/src/component.vue +163 -0
  431. package/packages/tab-pane/index.js +8 -0
  432. package/packages/table/index.js +8 -0
  433. package/packages/table/src/dropdown.js +28 -0
  434. package/packages/table/src/filter-panel.vue +203 -0
  435. package/packages/table/src/layout-observer.js +68 -0
  436. package/packages/table/src/table-body.js +392 -0
  437. package/packages/table/src/table-column.js +462 -0
  438. package/packages/table/src/table-footer.js +147 -0
  439. package/packages/table/src/table-header.js +522 -0
  440. package/packages/table/src/table-layout.js +231 -0
  441. package/packages/table/src/table-store.js +657 -0
  442. package/packages/table/src/table.vue +660 -0
  443. package/packages/table/src/util.js +122 -0
  444. package/packages/table-column/index.js +8 -0
  445. package/packages/tabs/index.js +8 -0
  446. package/packages/tabs/src/tab-bar.vue +57 -0
  447. package/packages/tabs/src/tab-nav.vue +280 -0
  448. package/packages/tabs/src/tab-pane.vue +58 -0
  449. package/packages/tabs/src/tabs.vue +185 -0
  450. package/packages/tag/index.js +8 -0
  451. package/packages/tag/src/tag.vue +39 -0
  452. package/packages/theme-chalk/README.md +33 -0
  453. package/packages/theme-chalk/lib/alert.css +1 -0
  454. package/packages/theme-chalk/lib/aside.css +1 -0
  455. package/packages/theme-chalk/lib/autocomplete.css +1 -0
  456. package/packages/theme-chalk/lib/badge.css +1 -0
  457. package/packages/theme-chalk/lib/base.css +1 -0
  458. package/packages/theme-chalk/lib/breadcrumb-item.css +0 -0
  459. package/packages/theme-chalk/lib/breadcrumb.css +1 -0
  460. package/packages/theme-chalk/lib/button-group.css +0 -0
  461. package/packages/theme-chalk/lib/button.css +1 -0
  462. package/packages/theme-chalk/lib/card.css +1 -0
  463. package/packages/theme-chalk/lib/carousel-item.css +1 -0
  464. package/packages/theme-chalk/lib/carousel.css +1 -0
  465. package/packages/theme-chalk/lib/cascader.css +1 -0
  466. package/packages/theme-chalk/lib/checkbox-button.css +0 -0
  467. package/packages/theme-chalk/lib/checkbox-group.css +0 -0
  468. package/packages/theme-chalk/lib/checkbox.css +1 -0
  469. package/packages/theme-chalk/lib/col.css +1 -0
  470. package/packages/theme-chalk/lib/collapse-item.css +0 -0
  471. package/packages/theme-chalk/lib/collapse.css +1 -0
  472. package/packages/theme-chalk/lib/color-picker.css +1 -0
  473. package/packages/theme-chalk/lib/container.css +1 -0
  474. package/packages/theme-chalk/lib/date-picker.css +1 -0
  475. package/packages/theme-chalk/lib/dialog.css +1 -0
  476. package/packages/theme-chalk/lib/display.css +1 -0
  477. package/packages/theme-chalk/lib/dropdown-item.css +0 -0
  478. package/packages/theme-chalk/lib/dropdown-menu.css +0 -0
  479. package/packages/theme-chalk/lib/dropdown.css +1 -0
  480. package/packages/theme-chalk/lib/fonts/element-icons.ttf +0 -0
  481. package/packages/theme-chalk/lib/fonts/element-icons.woff +0 -0
  482. package/packages/theme-chalk/lib/footer.css +1 -0
  483. package/packages/theme-chalk/lib/form-item.css +0 -0
  484. package/packages/theme-chalk/lib/form.css +1 -0
  485. package/packages/theme-chalk/lib/header.css +1 -0
  486. package/packages/theme-chalk/lib/icon.css +1 -0
  487. package/packages/theme-chalk/lib/index.css +1 -0
  488. package/packages/theme-chalk/lib/input-number.css +1 -0
  489. package/packages/theme-chalk/lib/input.css +1 -0
  490. package/packages/theme-chalk/lib/loading.css +1 -0
  491. package/packages/theme-chalk/lib/main.css +1 -0
  492. package/packages/theme-chalk/lib/menu-item-group.css +0 -0
  493. package/packages/theme-chalk/lib/menu-item.css +0 -0
  494. package/packages/theme-chalk/lib/menu.css +1 -0
  495. package/packages/theme-chalk/lib/message-box.css +1 -0
  496. package/packages/theme-chalk/lib/message.css +1 -0
  497. package/packages/theme-chalk/lib/notification.css +1 -0
  498. package/packages/theme-chalk/lib/option-group.css +1 -0
  499. package/packages/theme-chalk/lib/option.css +1 -0
  500. package/packages/theme-chalk/lib/pagination.css +1 -0
  501. package/packages/theme-chalk/lib/popover.css +1 -0
  502. package/packages/theme-chalk/lib/popper.css +1 -0
  503. package/packages/theme-chalk/lib/progress.css +1 -0
  504. package/packages/theme-chalk/lib/radio-button.css +1 -0
  505. package/packages/theme-chalk/lib/radio-group.css +1 -0
  506. package/packages/theme-chalk/lib/radio.css +1 -0
  507. package/packages/theme-chalk/lib/rate.css +1 -0
  508. package/packages/theme-chalk/lib/reset.css +1 -0
  509. package/packages/theme-chalk/lib/row.css +1 -0
  510. package/packages/theme-chalk/lib/scrollbar.css +1 -0
  511. package/packages/theme-chalk/lib/select-dropdown.css +1 -0
  512. package/packages/theme-chalk/lib/select.css +1 -0
  513. package/packages/theme-chalk/lib/slider.css +1 -0
  514. package/packages/theme-chalk/lib/spinner.css +1 -0
  515. package/packages/theme-chalk/lib/step.css +1 -0
  516. package/packages/theme-chalk/lib/steps.css +1 -0
  517. package/packages/theme-chalk/lib/submenu.css +0 -0
  518. package/packages/theme-chalk/lib/switch.css +1 -0
  519. package/packages/theme-chalk/lib/tab-pane.css +0 -0
  520. package/packages/theme-chalk/lib/table-column.css +1 -0
  521. package/packages/theme-chalk/lib/table.css +1 -0
  522. package/packages/theme-chalk/lib/tabs.css +1 -0
  523. package/packages/theme-chalk/lib/tag.css +1 -0
  524. package/packages/theme-chalk/lib/time-picker.css +1 -0
  525. package/packages/theme-chalk/lib/time-select.css +1 -0
  526. package/packages/theme-chalk/lib/tooltip.css +1 -0
  527. package/packages/theme-chalk/lib/transfer.css +1 -0
  528. package/packages/theme-chalk/lib/tree.css +1 -0
  529. package/packages/theme-chalk/lib/upload.css +1 -0
  530. package/packages/theme-chalk/package.json +35 -0
  531. package/packages/theme-chalk/src/alert.scss +105 -0
  532. package/packages/theme-chalk/src/aside.scss +7 -0
  533. package/packages/theme-chalk/src/autocomplete.scss +82 -0
  534. package/packages/theme-chalk/src/badge.scss +57 -0
  535. package/packages/theme-chalk/src/base.scss +2 -0
  536. package/packages/theme-chalk/src/breadcrumb-item.scss +0 -0
  537. package/packages/theme-chalk/src/breadcrumb.scss +55 -0
  538. package/packages/theme-chalk/src/button-group.scss +0 -0
  539. package/packages/theme-chalk/src/button.scss +260 -0
  540. package/packages/theme-chalk/src/card.scss +32 -0
  541. package/packages/theme-chalk/src/carousel-item.scss +50 -0
  542. package/packages/theme-chalk/src/carousel.scss +134 -0
  543. package/packages/theme-chalk/src/cascader.scss +180 -0
  544. package/packages/theme-chalk/src/checkbox-button.scss +0 -0
  545. package/packages/theme-chalk/src/checkbox-group.scss +0 -0
  546. package/packages/theme-chalk/src/checkbox.scss +358 -0
  547. package/packages/theme-chalk/src/col.scss +156 -0
  548. package/packages/theme-chalk/src/collapse-item.scss +0 -0
  549. package/packages/theme-chalk/src/collapse.scss +57 -0
  550. package/packages/theme-chalk/src/color-picker.scss +384 -0
  551. package/packages/theme-chalk/src/common/popup.scss +41 -0
  552. package/packages/theme-chalk/src/common/transition.scss +99 -0
  553. package/packages/theme-chalk/src/common/var.scss +713 -0
  554. package/packages/theme-chalk/src/container.scss +14 -0
  555. package/packages/theme-chalk/src/date-picker/date-picker.scss +97 -0
  556. package/packages/theme-chalk/src/date-picker/date-range-picker.scss +104 -0
  557. package/packages/theme-chalk/src/date-picker/date-table.scss +151 -0
  558. package/packages/theme-chalk/src/date-picker/month-table.scss +40 -0
  559. package/packages/theme-chalk/src/date-picker/picker-panel.scss +117 -0
  560. package/packages/theme-chalk/src/date-picker/picker.scss +190 -0
  561. package/packages/theme-chalk/src/date-picker/time-picker.scss +85 -0
  562. package/packages/theme-chalk/src/date-picker/time-range-picker.scss +31 -0
  563. package/packages/theme-chalk/src/date-picker/time-spinner.scss +110 -0
  564. package/packages/theme-chalk/src/date-picker/year-table.scss +44 -0
  565. package/packages/theme-chalk/src/date-picker.scss +12 -0
  566. package/packages/theme-chalk/src/dialog.scss +122 -0
  567. package/packages/theme-chalk/src/display.scss +12 -0
  568. package/packages/theme-chalk/src/dropdown-item.scss +0 -0
  569. package/packages/theme-chalk/src/dropdown-menu.scss +0 -0
  570. package/packages/theme-chalk/src/dropdown.scss +169 -0
  571. package/packages/theme-chalk/src/fonts/element-icons.ttf +0 -0
  572. package/packages/theme-chalk/src/fonts/element-icons.woff +0 -0
  573. package/packages/theme-chalk/src/footer.scss +8 -0
  574. package/packages/theme-chalk/src/form-item.scss +0 -0
  575. package/packages/theme-chalk/src/form.scss +174 -0
  576. package/packages/theme-chalk/src/header.scss +8 -0
  577. package/packages/theme-chalk/src/icon.scss +186 -0
  578. package/packages/theme-chalk/src/index.scss +67 -0
  579. package/packages/theme-chalk/src/input-number.scss +180 -0
  580. package/packages/theme-chalk/src/input.scss +310 -0
  581. package/packages/theme-chalk/src/loading.scss +96 -0
  582. package/packages/theme-chalk/src/main.scss +12 -0
  583. package/packages/theme-chalk/src/menu-item-group.scss +0 -0
  584. package/packages/theme-chalk/src/menu-item.scss +0 -0
  585. package/packages/theme-chalk/src/menu.scss +289 -0
  586. package/packages/theme-chalk/src/message-box.scss +223 -0
  587. package/packages/theme-chalk/src/message.scss +120 -0
  588. package/packages/theme-chalk/src/mixins/_button.scss +81 -0
  589. package/packages/theme-chalk/src/mixins/config.scss +4 -0
  590. package/packages/theme-chalk/src/mixins/function.scss +44 -0
  591. package/packages/theme-chalk/src/mixins/mixins.scss +190 -0
  592. package/packages/theme-chalk/src/mixins/utils.scss +39 -0
  593. package/packages/theme-chalk/src/notification.scss +98 -0
  594. package/packages/theme-chalk/src/option-group.scss +42 -0
  595. package/packages/theme-chalk/src/option.scss +36 -0
  596. package/packages/theme-chalk/src/pagination.scss +295 -0
  597. package/packages/theme-chalk/src/popover.scss +39 -0
  598. package/packages/theme-chalk/src/popper.scss +101 -0
  599. package/packages/theme-chalk/src/progress.scss +130 -0
  600. package/packages/theme-chalk/src/radio-button.scss +113 -0
  601. package/packages/theme-chalk/src/radio-group.scss +9 -0
  602. package/packages/theme-chalk/src/radio.scss +198 -0
  603. package/packages/theme-chalk/src/rate.scss +49 -0
  604. package/packages/theme-chalk/src/reset.scss +79 -0
  605. package/packages/theme-chalk/src/row.scss +39 -0
  606. package/packages/theme-chalk/src/scrollbar.scss +71 -0
  607. package/packages/theme-chalk/src/select-dropdown.scss +59 -0
  608. package/packages/theme-chalk/src/select.scss +148 -0
  609. package/packages/theme-chalk/src/slider.scss +228 -0
  610. package/packages/theme-chalk/src/spinner.scss +44 -0
  611. package/packages/theme-chalk/src/step.scss +317 -0
  612. package/packages/theme-chalk/src/steps.scss +20 -0
  613. package/packages/theme-chalk/src/submenu.scss +0 -0
  614. package/packages/theme-chalk/src/switch.scss +116 -0
  615. package/packages/theme-chalk/src/tab-pane.scss +0 -0
  616. package/packages/theme-chalk/src/table-column.scss +97 -0
  617. package/packages/theme-chalk/src/table.scss +552 -0
  618. package/packages/theme-chalk/src/tabs.scss +587 -0
  619. package/packages/theme-chalk/src/tag.scss +146 -0
  620. package/packages/theme-chalk/src/time-picker.scss +8 -0
  621. package/packages/theme-chalk/src/time-select.scss +37 -0
  622. package/packages/theme-chalk/src/tooltip.scss +141 -0
  623. package/packages/theme-chalk/src/transfer.scss +227 -0
  624. package/packages/theme-chalk/src/tree.scss +122 -0
  625. package/packages/theme-chalk/src/upload.scss +602 -0
  626. package/packages/time-picker/index.js +8 -0
  627. package/packages/time-select/index.js +8 -0
  628. package/packages/tooltip/index.js +8 -0
  629. package/packages/tooltip/src/main.js +216 -0
  630. package/packages/transfer/index.js +8 -0
  631. package/packages/transfer/src/main.vue +231 -0
  632. package/packages/transfer/src/transfer-panel.vue +251 -0
  633. package/packages/tree/index.js +8 -0
  634. package/packages/tree/src/model/node.js +481 -0
  635. package/packages/tree/src/model/tree-store.js +333 -0
  636. package/packages/tree/src/model/util.js +27 -0
  637. package/packages/tree/src/tree-node.vue +277 -0
  638. package/packages/tree/src/tree.vue +495 -0
  639. package/packages/upload/index.js +8 -0
  640. package/packages/upload/src/ajax.js +85 -0
  641. package/packages/upload/src/index.vue +315 -0
  642. package/packages/upload/src/upload-dragger.vue +70 -0
  643. package/packages/upload/src/upload-list.vue +103 -0
  644. package/packages/upload/src/upload.vue +211 -0
  645. package/src/directives/mousewheel.js +18 -0
  646. package/src/directives/repeat-click.js +24 -0
  647. package/src/index.js +251 -0
  648. package/src/locale/format.js +46 -0
  649. package/src/locale/index.js +48 -0
  650. package/src/locale/lang/af-ZA.js +109 -0
  651. package/src/locale/lang/ar.js +108 -0
  652. package/src/locale/lang/bg.js +109 -0
  653. package/src/locale/lang/ca.js +108 -0
  654. package/src/locale/lang/cs-CZ.js +111 -0
  655. package/src/locale/lang/da.js +108 -0
  656. package/src/locale/lang/de.js +110 -0
  657. package/src/locale/lang/ee.js +109 -0
  658. package/src/locale/lang/el.js +109 -0
  659. package/src/locale/lang/en.js +109 -0
  660. package/src/locale/lang/es.js +108 -0
  661. package/src/locale/lang/eu.js +109 -0
  662. package/src/locale/lang/fa.js +109 -0
  663. package/src/locale/lang/fi.js +109 -0
  664. package/src/locale/lang/fr.js +108 -0
  665. package/src/locale/lang/he.js +109 -0
  666. package/src/locale/lang/hu.js +108 -0
  667. package/src/locale/lang/id.js +109 -0
  668. package/src/locale/lang/it.js +108 -0
  669. package/src/locale/lang/ja.js +109 -0
  670. package/src/locale/lang/km.js +109 -0
  671. package/src/locale/lang/ko.js +109 -0
  672. package/src/locale/lang/ku.js +109 -0
  673. package/src/locale/lang/kz.js +109 -0
  674. package/src/locale/lang/lt.js +109 -0
  675. package/src/locale/lang/lv.js +109 -0
  676. package/src/locale/lang/mn.js +109 -0
  677. package/src/locale/lang/nb-NO.js +108 -0
  678. package/src/locale/lang/nl.js +109 -0
  679. package/src/locale/lang/pl.js +109 -0
  680. package/src/locale/lang/pt-br.js +109 -0
  681. package/src/locale/lang/pt.js +109 -0
  682. package/src/locale/lang/ro.js +109 -0
  683. package/src/locale/lang/ru-RU.js +109 -0
  684. package/src/locale/lang/sk.js +111 -0
  685. package/src/locale/lang/sl.js +109 -0
  686. package/src/locale/lang/sr.js +109 -0
  687. package/src/locale/lang/sv-SE.js +109 -0
  688. package/src/locale/lang/ta.js +108 -0
  689. package/src/locale/lang/th.js +109 -0
  690. package/src/locale/lang/tk.js +109 -0
  691. package/src/locale/lang/tr-TR.js +109 -0
  692. package/src/locale/lang/ua.js +109 -0
  693. package/src/locale/lang/ug-CN.js +109 -0
  694. package/src/locale/lang/vi.js +109 -0
  695. package/src/locale/lang/zh-CN.js +109 -0
  696. package/src/locale/lang/zh-TW.js +109 -0
  697. package/src/mixins/emitter.js +33 -0
  698. package/src/mixins/focus.js +9 -0
  699. package/src/mixins/locale.js +9 -0
  700. package/src/mixins/migrating.js +51 -0
  701. package/src/transitions/collapse-transition.js +77 -0
  702. package/src/utils/after-leave.js +27 -0
  703. package/src/utils/aria-dialog.js +90 -0
  704. package/src/utils/aria-utils.js +121 -0
  705. package/src/utils/clickoutside.js +76 -0
  706. package/src/utils/date.js +344 -0
  707. package/src/utils/dom.js +174 -0
  708. package/src/utils/menu/aria-menubar.js +14 -0
  709. package/src/utils/menu/aria-menuitem.js +49 -0
  710. package/src/utils/menu/aria-submenu.js +59 -0
  711. package/src/utils/merge.js +15 -0
  712. package/src/utils/popper.js +1276 -0
  713. package/src/utils/popup/index.js +226 -0
  714. package/src/utils/popup/popup-manager.js +194 -0
  715. package/src/utils/resize-event.js +35 -0
  716. package/src/utils/scroll-into-view.js +27 -0
  717. package/src/utils/scrollbar-width.js +29 -0
  718. package/src/utils/shared.js +7 -0
  719. package/src/utils/util.js +122 -0
  720. package/src/utils/vdom.js +9 -0
  721. package/src/utils/vue-popper.js +200 -0
  722. package/types/alert.d.ts +27 -0
  723. package/types/aside.d.ts +7 -0
  724. package/types/autocomplete.d.ts +78 -0
  725. package/types/badge.d.ts +16 -0
  726. package/types/breadcrumb-item.d.ts +10 -0
  727. package/types/breadcrumb.d.ts +10 -0
  728. package/types/button-group.d.ts +4 -0
  729. package/types/button.d.ts +37 -0
  730. package/types/card.d.ts +26 -0
  731. package/types/carousel-item.d.ts +10 -0
  732. package/types/carousel.d.ts +53 -0
  733. package/types/cascader.d.ts +57 -0
  734. package/types/checkbox-button.d.ts +22 -0
  735. package/types/checkbox-group.d.ts +22 -0
  736. package/types/checkbox.d.ts +34 -0
  737. package/types/col.d.ts +46 -0
  738. package/types/collapse-item.d.ts +23 -0
  739. package/types/collapse.d.ts +10 -0
  740. package/types/color-picker.d.ts +21 -0
  741. package/types/component.d.ts +13 -0
  742. package/types/container.d.ts +7 -0
  743. package/types/date-picker.d.ts +124 -0
  744. package/types/dialog.d.ts +59 -0
  745. package/types/dropdown-item.d.ts +13 -0
  746. package/types/dropdown-menu.d.ts +4 -0
  747. package/types/dropdown.d.ts +26 -0
  748. package/types/element-ui.d.ts +294 -0
  749. package/types/footer.d.ts +7 -0
  750. package/types/form-item.d.ts +37 -0
  751. package/types/form.d.ts +82 -0
  752. package/types/header.d.ts +7 -0
  753. package/types/index.d.ts +4 -0
  754. package/types/input-number.d.ts +44 -0
  755. package/types/input.d.ts +98 -0
  756. package/types/loading.d.ts +62 -0
  757. package/types/main.d.ts +4 -0
  758. package/types/menu-item-group.d.ts +7 -0
  759. package/types/menu-item.d.ts +10 -0
  760. package/types/menu.d.ts +46 -0
  761. package/types/message-box.d.ts +176 -0
  762. package/types/message.d.ts +75 -0
  763. package/types/notification.d.ts +84 -0
  764. package/types/option-group.d.ts +10 -0
  765. package/types/option.d.ts +13 -0
  766. package/types/pagination.d.ts +40 -0
  767. package/types/popover.d.ts +65 -0
  768. package/types/progress.d.ts +31 -0
  769. package/types/radio-button.d.ts +16 -0
  770. package/types/radio-group.d.ts +18 -0
  771. package/types/radio.d.ts +19 -0
  772. package/types/rate.d.ts +52 -0
  773. package/types/row.d.ts +25 -0
  774. package/types/select.d.ts +90 -0
  775. package/types/slider.d.ts +62 -0
  776. package/types/step.d.ts +34 -0
  777. package/types/steps.d.ts +28 -0
  778. package/types/submenu.d.ts +22 -0
  779. package/types/switch.d.ts +40 -0
  780. package/types/tab-pane.d.ts +19 -0
  781. package/types/table-column.d.ts +117 -0
  782. package/types/table.d.ts +157 -0
  783. package/types/tabs.d.ts +31 -0
  784. package/types/tag.d.ts +24 -0
  785. package/types/time-picker.d.ts +63 -0
  786. package/types/time-select.d.ts +56 -0
  787. package/types/tooltip.d.ts +49 -0
  788. package/types/transfer.d.ts +73 -0
  789. package/types/tree.d.ts +264 -0
  790. package/types/upload.d.ts +124 -0
@@ -0,0 +1,1839 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, {
41
+ /******/ configurable: false,
42
+ /******/ enumerable: true,
43
+ /******/ get: getter
44
+ /******/ });
45
+ /******/ }
46
+ /******/ };
47
+ /******/
48
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
49
+ /******/ __webpack_require__.n = function(module) {
50
+ /******/ var getter = module && module.__esModule ?
51
+ /******/ function getDefault() { return module['default']; } :
52
+ /******/ function getModuleExports() { return module; };
53
+ /******/ __webpack_require__.d(getter, 'a', getter);
54
+ /******/ return getter;
55
+ /******/ };
56
+ /******/
57
+ /******/ // Object.prototype.hasOwnProperty.call
58
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
59
+ /******/
60
+ /******/ // __webpack_public_path__
61
+ /******/ __webpack_require__.p = "/dist/";
62
+ /******/
63
+ /******/ // Load entry module and return exports
64
+ /******/ return __webpack_require__(__webpack_require__.s = 192);
65
+ /******/ })
66
+ /************************************************************************/
67
+ /******/ ({
68
+
69
+ /***/ 0:
70
+ /***/ (function(module, exports) {
71
+
72
+ /* globals __VUE_SSR_CONTEXT__ */
73
+
74
+ // IMPORTANT: Do NOT use ES2015 features in this file.
75
+ // This module is a runtime utility for cleaner component module output and will
76
+ // be included in the final webpack user bundle.
77
+
78
+ module.exports = function normalizeComponent (
79
+ rawScriptExports,
80
+ compiledTemplate,
81
+ functionalTemplate,
82
+ injectStyles,
83
+ scopeId,
84
+ moduleIdentifier /* server only */
85
+ ) {
86
+ var esModule
87
+ var scriptExports = rawScriptExports = rawScriptExports || {}
88
+
89
+ // ES6 modules interop
90
+ var type = typeof rawScriptExports.default
91
+ if (type === 'object' || type === 'function') {
92
+ esModule = rawScriptExports
93
+ scriptExports = rawScriptExports.default
94
+ }
95
+
96
+ // Vue.extend constructor export interop
97
+ var options = typeof scriptExports === 'function'
98
+ ? scriptExports.options
99
+ : scriptExports
100
+
101
+ // render functions
102
+ if (compiledTemplate) {
103
+ options.render = compiledTemplate.render
104
+ options.staticRenderFns = compiledTemplate.staticRenderFns
105
+ options._compiled = true
106
+ }
107
+
108
+ // functional template
109
+ if (functionalTemplate) {
110
+ options.functional = true
111
+ }
112
+
113
+ // scopedId
114
+ if (scopeId) {
115
+ options._scopeId = scopeId
116
+ }
117
+
118
+ var hook
119
+ if (moduleIdentifier) { // server build
120
+ hook = function (context) {
121
+ // 2.3 injection
122
+ context =
123
+ context || // cached call
124
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
125
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
126
+ // 2.2 with runInNewContext: true
127
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
128
+ context = __VUE_SSR_CONTEXT__
129
+ }
130
+ // inject component styles
131
+ if (injectStyles) {
132
+ injectStyles.call(this, context)
133
+ }
134
+ // register component module identifier for async chunk inferrence
135
+ if (context && context._registeredComponents) {
136
+ context._registeredComponents.add(moduleIdentifier)
137
+ }
138
+ }
139
+ // used by ssr in case component is cached and beforeCreate
140
+ // never gets called
141
+ options._ssrRegister = hook
142
+ } else if (injectStyles) {
143
+ hook = injectStyles
144
+ }
145
+
146
+ if (hook) {
147
+ var functional = options.functional
148
+ var existing = functional
149
+ ? options.render
150
+ : options.beforeCreate
151
+
152
+ if (!functional) {
153
+ // inject component registration as beforeCreate hook
154
+ options.beforeCreate = existing
155
+ ? [].concat(existing, hook)
156
+ : [hook]
157
+ } else {
158
+ // for template-only hot-reload because in that case the render fn doesn't
159
+ // go through the normalizer
160
+ options._injectStyles = hook
161
+ // register for functioal component in vue file
162
+ options.render = function renderWithStyleInjection (h, context) {
163
+ hook.call(context)
164
+ return existing(h, context)
165
+ }
166
+ }
167
+ }
168
+
169
+ return {
170
+ esModule: esModule,
171
+ exports: scriptExports,
172
+ options: options
173
+ }
174
+ }
175
+
176
+
177
+ /***/ }),
178
+
179
+ /***/ 1:
180
+ /***/ (function(module, exports) {
181
+
182
+ module.exports = require("element-ui/lib/mixins/emitter");
183
+
184
+ /***/ }),
185
+
186
+ /***/ 10:
187
+ /***/ (function(module, exports) {
188
+
189
+ module.exports = require("element-ui/lib/utils/clickoutside");
190
+
191
+ /***/ }),
192
+
193
+ /***/ 11:
194
+ /***/ (function(module, exports, __webpack_require__) {
195
+
196
+ "use strict";
197
+
198
+
199
+ exports.__esModule = true;
200
+ exports.extractTimeFormat = exports.extractDateFormat = exports.nextYear = exports.prevYear = exports.nextMonth = exports.prevMonth = exports.changeYearMonthAndClampDate = exports.timeWithinRange = exports.limitTimeRange = exports.clearMilliseconds = exports.clearTime = exports.modifyWithTimeString = exports.modifyTime = exports.modifyDate = exports.range = exports.getRangeMinutes = exports.getRangeHours = exports.getWeekNumber = exports.getStartDateOfMonth = exports.nextDate = exports.prevDate = exports.getFirstDayOfMonth = exports.getDayCountOfYear = exports.getDayCountOfMonth = exports.parseDate = exports.formatDate = exports.isDateObject = exports.isDate = exports.toDate = undefined;
201
+
202
+ var _date = __webpack_require__(29);
203
+
204
+ var _date2 = _interopRequireDefault(_date);
205
+
206
+ var _locale = __webpack_require__(12);
207
+
208
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
209
+
210
+ var weeks = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
211
+ var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
212
+ var getI18nSettings = function getI18nSettings() {
213
+ return {
214
+ dayNamesShort: weeks.map(function (week) {
215
+ return (0, _locale.t)('el.datepicker.weeks.' + week);
216
+ }),
217
+ dayNames: weeks.map(function (week) {
218
+ return (0, _locale.t)('el.datepicker.weeks.' + week);
219
+ }),
220
+ monthNamesShort: months.map(function (month) {
221
+ return (0, _locale.t)('el.datepicker.months.' + month);
222
+ }),
223
+ monthNames: months.map(function (month, index) {
224
+ return (0, _locale.t)('el.datepicker.month' + (index + 1));
225
+ }),
226
+ amPm: ['am', 'pm']
227
+ };
228
+ };
229
+
230
+ var newArray = function newArray(start, end) {
231
+ var result = [];
232
+ for (var i = start; i <= end; i++) {
233
+ result.push(i);
234
+ }
235
+ return result;
236
+ };
237
+
238
+ var toDate = exports.toDate = function toDate(date) {
239
+ return isDate(date) ? new Date(date) : null;
240
+ };
241
+
242
+ var isDate = exports.isDate = function isDate(date) {
243
+ if (date === null || date === undefined) return false;
244
+ if (isNaN(new Date(date).getTime())) return false;
245
+ if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
246
+ return true;
247
+ };
248
+
249
+ var isDateObject = exports.isDateObject = function isDateObject(val) {
250
+ return val instanceof Date;
251
+ };
252
+
253
+ var formatDate = exports.formatDate = function formatDate(date, format) {
254
+ date = toDate(date);
255
+ if (!date) return '';
256
+ return _date2.default.format(date, format || 'yyyy-MM-dd', getI18nSettings());
257
+ };
258
+
259
+ var parseDate = exports.parseDate = function parseDate(string, format) {
260
+ return _date2.default.parse(string, format || 'yyyy-MM-dd', getI18nSettings());
261
+ };
262
+
263
+ var getDayCountOfMonth = exports.getDayCountOfMonth = function getDayCountOfMonth(year, month) {
264
+ if (month === 3 || month === 5 || month === 8 || month === 10) {
265
+ return 30;
266
+ }
267
+
268
+ if (month === 1) {
269
+ if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
270
+ return 29;
271
+ } else {
272
+ return 28;
273
+ }
274
+ }
275
+
276
+ return 31;
277
+ };
278
+
279
+ var getDayCountOfYear = exports.getDayCountOfYear = function getDayCountOfYear(year) {
280
+ var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
281
+ return isLeapYear ? 366 : 365;
282
+ };
283
+
284
+ var getFirstDayOfMonth = exports.getFirstDayOfMonth = function getFirstDayOfMonth(date) {
285
+ var temp = new Date(date.getTime());
286
+ temp.setDate(1);
287
+ return temp.getDay();
288
+ };
289
+
290
+ // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
291
+ // {prev, next} Date should work for Daylight Saving Time
292
+ // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
293
+ var prevDate = exports.prevDate = function prevDate(date) {
294
+ var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
295
+
296
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
297
+ };
298
+
299
+ var nextDate = exports.nextDate = function nextDate(date) {
300
+ var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
301
+
302
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
303
+ };
304
+
305
+ var getStartDateOfMonth = exports.getStartDateOfMonth = function getStartDateOfMonth(year, month) {
306
+ var result = new Date(year, month, 1);
307
+ var day = result.getDay();
308
+
309
+ if (day === 0) {
310
+ return prevDate(result, 7);
311
+ } else {
312
+ return prevDate(result, day);
313
+ }
314
+ };
315
+
316
+ var getWeekNumber = exports.getWeekNumber = function getWeekNumber(src) {
317
+ if (!isDate(src)) return null;
318
+ var date = new Date(src.getTime());
319
+ date.setHours(0, 0, 0, 0);
320
+ // Thursday in current week decides the year.
321
+ date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
322
+ // January 4 is always in week 1.
323
+ var week1 = new Date(date.getFullYear(), 0, 4);
324
+ // Adjust to Thursday in week 1 and count number of weeks from date to week 1.
325
+ // Rounding should be fine for Daylight Saving Time. Its shift should never be more than 12 hours.
326
+ return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);
327
+ };
328
+
329
+ var getRangeHours = exports.getRangeHours = function getRangeHours(ranges) {
330
+ var hours = [];
331
+ var disabledHours = [];
332
+
333
+ (ranges || []).forEach(function (range) {
334
+ var value = range.map(function (date) {
335
+ return date.getHours();
336
+ });
337
+
338
+ disabledHours = disabledHours.concat(newArray(value[0], value[1]));
339
+ });
340
+
341
+ if (disabledHours.length) {
342
+ for (var i = 0; i < 24; i++) {
343
+ hours[i] = disabledHours.indexOf(i) === -1;
344
+ }
345
+ } else {
346
+ for (var _i = 0; _i < 24; _i++) {
347
+ hours[_i] = false;
348
+ }
349
+ }
350
+
351
+ return hours;
352
+ };
353
+
354
+ function setRangeData(arr, start, end, value) {
355
+ for (var i = start; i < end; i++) {
356
+ arr[i] = value;
357
+ }
358
+ }
359
+
360
+ var getRangeMinutes = exports.getRangeMinutes = function getRangeMinutes(ranges, hour) {
361
+ var minutes = new Array(60);
362
+
363
+ if (ranges.length > 0) {
364
+ ranges.forEach(function (range) {
365
+ var start = range[0];
366
+ var end = range[1];
367
+ var startHour = start.getHours();
368
+ var startMinute = start.getMinutes();
369
+ var endHour = end.getHours();
370
+ var endMinute = end.getMinutes();
371
+ if (startHour === hour && endHour !== hour) {
372
+ setRangeData(minutes, startMinute, 60, true);
373
+ } else if (startHour === hour && endHour === hour) {
374
+ setRangeData(minutes, startMinute, endMinute + 1, true);
375
+ } else if (startHour !== hour && endHour === hour) {
376
+ setRangeData(minutes, 0, endMinute + 1, true);
377
+ } else if (startHour < hour && endHour > hour) {
378
+ setRangeData(minutes, 0, 60, true);
379
+ }
380
+ });
381
+ } else {
382
+ setRangeData(minutes, 0, 60, true);
383
+ }
384
+ return minutes;
385
+ };
386
+
387
+ var range = exports.range = function range(n) {
388
+ // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
389
+ return Array.apply(null, { length: n }).map(function (_, n) {
390
+ return n;
391
+ });
392
+ };
393
+
394
+ var modifyDate = exports.modifyDate = function modifyDate(date, y, m, d) {
395
+ return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
396
+ };
397
+
398
+ var modifyTime = exports.modifyTime = function modifyTime(date, h, m, s) {
399
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
400
+ };
401
+
402
+ var modifyWithTimeString = exports.modifyWithTimeString = function modifyWithTimeString(date, time) {
403
+ if (date == null || !time) {
404
+ return date;
405
+ }
406
+ time = parseDate(time, 'HH:mm:ss');
407
+ return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
408
+ };
409
+
410
+ var clearTime = exports.clearTime = function clearTime(date) {
411
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
412
+ };
413
+
414
+ var clearMilliseconds = exports.clearMilliseconds = function clearMilliseconds(date) {
415
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
416
+ };
417
+
418
+ var limitTimeRange = exports.limitTimeRange = function limitTimeRange(date, ranges) {
419
+ var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
420
+
421
+ // TODO: refactory a more elegant solution
422
+ if (ranges.length === 0) return date;
423
+ var normalizeDate = function normalizeDate(date) {
424
+ return _date2.default.parse(_date2.default.format(date, format), format);
425
+ };
426
+ var ndate = normalizeDate(date);
427
+ var nranges = ranges.map(function (range) {
428
+ return range.map(normalizeDate);
429
+ });
430
+ if (nranges.some(function (nrange) {
431
+ return ndate >= nrange[0] && ndate <= nrange[1];
432
+ })) return date;
433
+
434
+ var minDate = nranges[0][0];
435
+ var maxDate = nranges[0][0];
436
+
437
+ nranges.forEach(function (nrange) {
438
+ minDate = new Date(Math.min(nrange[0], minDate));
439
+ maxDate = new Date(Math.max(nrange[1], minDate));
440
+ });
441
+
442
+ var ret = ndate < minDate ? minDate : maxDate;
443
+ // preserve Year/Month/Date
444
+ return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
445
+ };
446
+
447
+ var timeWithinRange = exports.timeWithinRange = function timeWithinRange(date, selectableRange, format) {
448
+ var limitedDate = limitTimeRange(date, selectableRange, format);
449
+ return limitedDate.getTime() === date.getTime();
450
+ };
451
+
452
+ var changeYearMonthAndClampDate = exports.changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
453
+ // clamp date to the number of days in `year`, `month`
454
+ // eg: (2010-1-31, 2010, 2) => 2010-2-28
455
+ var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
456
+ return modifyDate(date, year, month, monthDate);
457
+ };
458
+
459
+ var prevMonth = exports.prevMonth = function prevMonth(date) {
460
+ var year = date.getFullYear();
461
+ var month = date.getMonth();
462
+ return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
463
+ };
464
+
465
+ var nextMonth = exports.nextMonth = function nextMonth(date) {
466
+ var year = date.getFullYear();
467
+ var month = date.getMonth();
468
+ return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
469
+ };
470
+
471
+ var prevYear = exports.prevYear = function prevYear(date) {
472
+ var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
473
+
474
+ var year = date.getFullYear();
475
+ var month = date.getMonth();
476
+ return changeYearMonthAndClampDate(date, year - amount, month);
477
+ };
478
+
479
+ var nextYear = exports.nextYear = function nextYear(date) {
480
+ var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
481
+
482
+ var year = date.getFullYear();
483
+ var month = date.getMonth();
484
+ return changeYearMonthAndClampDate(date, year + amount, month);
485
+ };
486
+
487
+ var extractDateFormat = exports.extractDateFormat = function extractDateFormat(format) {
488
+ return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
489
+ };
490
+
491
+ var extractTimeFormat = exports.extractTimeFormat = function extractTimeFormat(format) {
492
+ return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
493
+ };
494
+
495
+ /***/ }),
496
+
497
+ /***/ 12:
498
+ /***/ (function(module, exports) {
499
+
500
+ module.exports = require("element-ui/lib/locale");
501
+
502
+ /***/ }),
503
+
504
+ /***/ 17:
505
+ /***/ (function(module, exports) {
506
+
507
+ module.exports = require("element-ui/lib/scrollbar");
508
+
509
+ /***/ }),
510
+
511
+ /***/ 192:
512
+ /***/ (function(module, exports, __webpack_require__) {
513
+
514
+ "use strict";
515
+
516
+
517
+ exports.__esModule = true;
518
+
519
+ var _timeSelect = __webpack_require__(193);
520
+
521
+ var _timeSelect2 = _interopRequireDefault(_timeSelect);
522
+
523
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
524
+
525
+ /* istanbul ignore next */
526
+ _timeSelect2.default.install = function (Vue) {
527
+ Vue.component(_timeSelect2.default.name, _timeSelect2.default);
528
+ };
529
+
530
+ exports.default = _timeSelect2.default;
531
+
532
+ /***/ }),
533
+
534
+ /***/ 193:
535
+ /***/ (function(module, exports, __webpack_require__) {
536
+
537
+ "use strict";
538
+
539
+
540
+ exports.__esModule = true;
541
+
542
+ var _picker = __webpack_require__(27);
543
+
544
+ var _picker2 = _interopRequireDefault(_picker);
545
+
546
+ var _timeSelect = __webpack_require__(194);
547
+
548
+ var _timeSelect2 = _interopRequireDefault(_timeSelect);
549
+
550
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
551
+
552
+ exports.default = {
553
+ mixins: [_picker2.default],
554
+
555
+ name: 'ElTimeSelect',
556
+
557
+ componentName: 'ElTimeSelect',
558
+
559
+ props: {
560
+ type: {
561
+ type: String,
562
+ default: 'time-select'
563
+ }
564
+ },
565
+
566
+ beforeCreate: function beforeCreate() {
567
+ this.panel = _timeSelect2.default;
568
+ }
569
+ };
570
+
571
+ /***/ }),
572
+
573
+ /***/ 194:
574
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
575
+
576
+ "use strict";
577
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
578
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_select_vue__ = __webpack_require__(195);
579
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_select_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_select_vue__);
580
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cf1dfe3_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_select_vue__ = __webpack_require__(196);
581
+ var normalizeComponent = __webpack_require__(0)
582
+ /* script */
583
+
584
+ /* template */
585
+
586
+ /* template functional */
587
+ var __vue_template_functional__ = false
588
+ /* styles */
589
+ var __vue_styles__ = null
590
+ /* scopeId */
591
+ var __vue_scopeId__ = null
592
+ /* moduleIdentifier (server only) */
593
+ var __vue_module_identifier__ = null
594
+ var Component = normalizeComponent(
595
+ __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_select_vue___default.a,
596
+ __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cf1dfe3_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_select_vue__["a" /* default */],
597
+ __vue_template_functional__,
598
+ __vue_styles__,
599
+ __vue_scopeId__,
600
+ __vue_module_identifier__
601
+ )
602
+
603
+ /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
604
+
605
+
606
+ /***/ }),
607
+
608
+ /***/ 195:
609
+ /***/ (function(module, exports, __webpack_require__) {
610
+
611
+ "use strict";
612
+
613
+
614
+ exports.__esModule = true;
615
+
616
+ var _scrollbar = __webpack_require__(17);
617
+
618
+ var _scrollbar2 = _interopRequireDefault(_scrollbar);
619
+
620
+ var _scrollIntoView = __webpack_require__(26);
621
+
622
+ var _scrollIntoView2 = _interopRequireDefault(_scrollIntoView);
623
+
624
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
625
+
626
+ //
627
+ //
628
+ //
629
+ //
630
+ //
631
+ //
632
+ //
633
+ //
634
+ //
635
+ //
636
+ //
637
+ //
638
+ //
639
+ //
640
+ //
641
+ //
642
+ //
643
+ //
644
+ //
645
+
646
+ var parseTime = function parseTime(time) {
647
+ var values = (time || '').split(':');
648
+ if (values.length >= 2) {
649
+ var hours = parseInt(values[0], 10);
650
+ var minutes = parseInt(values[1], 10);
651
+
652
+ return {
653
+ hours: hours,
654
+ minutes: minutes
655
+ };
656
+ }
657
+ /* istanbul ignore next */
658
+ return null;
659
+ };
660
+
661
+ var compareTime = function compareTime(time1, time2) {
662
+ var value1 = parseTime(time1);
663
+ var value2 = parseTime(time2);
664
+
665
+ var minutes1 = value1.minutes + value1.hours * 60;
666
+ var minutes2 = value2.minutes + value2.hours * 60;
667
+
668
+ if (minutes1 === minutes2) {
669
+ return 0;
670
+ }
671
+
672
+ return minutes1 > minutes2 ? 1 : -1;
673
+ };
674
+
675
+ var formatTime = function formatTime(time) {
676
+ return (time.hours < 10 ? '0' + time.hours : time.hours) + ':' + (time.minutes < 10 ? '0' + time.minutes : time.minutes);
677
+ };
678
+
679
+ var nextTime = function nextTime(time, step) {
680
+ var timeValue = parseTime(time);
681
+ var stepValue = parseTime(step);
682
+
683
+ var next = {
684
+ hours: timeValue.hours,
685
+ minutes: timeValue.minutes
686
+ };
687
+
688
+ next.minutes += stepValue.minutes;
689
+ next.hours += stepValue.hours;
690
+
691
+ next.hours += Math.floor(next.minutes / 60);
692
+ next.minutes = next.minutes % 60;
693
+
694
+ return formatTime(next);
695
+ };
696
+
697
+ exports.default = {
698
+ components: { ElScrollbar: _scrollbar2.default },
699
+
700
+ watch: {
701
+ value: function value(val) {
702
+ var _this = this;
703
+
704
+ if (!val) return;
705
+ this.$nextTick(function () {
706
+ return _this.scrollToOption();
707
+ });
708
+ }
709
+ },
710
+
711
+ methods: {
712
+ handleClick: function handleClick(item) {
713
+ if (!item.disabled) {
714
+ this.$emit('pick', item.value);
715
+ }
716
+ },
717
+ handleClear: function handleClear() {
718
+ this.$emit('pick', null);
719
+ },
720
+ scrollToOption: function scrollToOption() {
721
+ var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.selected';
722
+
723
+ var menu = this.$refs.popper.querySelector('.el-picker-panel__content');
724
+ (0, _scrollIntoView2.default)(menu, menu.querySelector(selector));
725
+ },
726
+ handleMenuEnter: function handleMenuEnter() {
727
+ var _this2 = this;
728
+
729
+ var selected = this.items.map(function (item) {
730
+ return item.value;
731
+ }).indexOf(this.value) !== -1;
732
+ var hasDefault = this.items.map(function (item) {
733
+ return item.value;
734
+ }).indexOf(this.defaultValue) !== -1;
735
+ var option = selected && '.selected' || hasDefault && '.default' || '.time-select-item:not(.disabled)';
736
+ this.$nextTick(function () {
737
+ return _this2.scrollToOption(option);
738
+ });
739
+ },
740
+ scrollDown: function scrollDown(step) {
741
+ var items = this.items;
742
+ var length = items.length;
743
+ var total = items.length;
744
+ var index = items.map(function (item) {
745
+ return item.value;
746
+ }).indexOf(this.value);
747
+ while (total--) {
748
+ index = (index + step + length) % length;
749
+ if (!items[index].disabled) {
750
+ this.$emit('pick', items[index].value, true);
751
+ return;
752
+ }
753
+ }
754
+ },
755
+ isValidValue: function isValidValue(date) {
756
+ return this.items.filter(function (item) {
757
+ return !item.disabled;
758
+ }).map(function (item) {
759
+ return item.value;
760
+ }).indexOf(date) !== -1;
761
+ },
762
+ handleKeydown: function handleKeydown(event) {
763
+ var keyCode = event.keyCode;
764
+ if (keyCode === 38 || keyCode === 40) {
765
+ var mapping = { 40: 1, 38: -1 };
766
+ var offset = mapping[keyCode.toString()];
767
+ this.scrollDown(offset);
768
+ event.stopPropagation();
769
+ return;
770
+ }
771
+ }
772
+ },
773
+
774
+ data: function data() {
775
+ return {
776
+ popperClass: '',
777
+ start: '09:00',
778
+ end: '18:00',
779
+ step: '00:30',
780
+ value: '',
781
+ defaultValue: '',
782
+ visible: false,
783
+ minTime: '',
784
+ maxTime: '',
785
+ width: 0
786
+ };
787
+ },
788
+
789
+
790
+ computed: {
791
+ items: function items() {
792
+ var start = this.start;
793
+ var end = this.end;
794
+ var step = this.step;
795
+
796
+ var result = [];
797
+
798
+ if (start && end && step) {
799
+ var current = start;
800
+ while (compareTime(current, end) <= 0) {
801
+ result.push({
802
+ value: current,
803
+ disabled: compareTime(current, this.minTime || '-1:-1') <= 0 || compareTime(current, this.maxTime || '100:100') >= 0
804
+ });
805
+ current = nextTime(current, step);
806
+ }
807
+ }
808
+
809
+ return result;
810
+ }
811
+ }
812
+ };
813
+
814
+ /***/ }),
815
+
816
+ /***/ 196:
817
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
818
+
819
+ "use strict";
820
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"el-zoom-in-top"},on:{"before-enter":_vm.handleMenuEnter,"after-leave":function($event){_vm.$emit('dodestroy')}}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],ref:"popper",staticClass:"el-picker-panel time-select el-popper",class:_vm.popperClass,style:({ width: _vm.width + 'px' })},[_c('el-scrollbar',{attrs:{"noresize":"","wrap-class":"el-picker-panel__content"}},_vm._l((_vm.items),function(item){return _c('div',{staticClass:"time-select-item",class:{ selected: _vm.value === item.value, disabled: item.disabled, default: item.value === _vm.defaultValue },attrs:{"disabled":item.disabled},on:{"click":function($event){_vm.handleClick(item)}}},[_vm._v(_vm._s(item.value))])}))],1)])}
821
+ var staticRenderFns = []
822
+ var esExports = { render: render, staticRenderFns: staticRenderFns }
823
+ /* harmony default export */ __webpack_exports__["a"] = (esExports);
824
+
825
+ /***/ }),
826
+
827
+ /***/ 26:
828
+ /***/ (function(module, exports) {
829
+
830
+ module.exports = require("element-ui/lib/utils/scroll-into-view");
831
+
832
+ /***/ }),
833
+
834
+ /***/ 27:
835
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
836
+
837
+ "use strict";
838
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
839
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__ = __webpack_require__(28);
840
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__);
841
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_66b1c70c_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__ = __webpack_require__(30);
842
+ var normalizeComponent = __webpack_require__(0)
843
+ /* script */
844
+
845
+ /* template */
846
+
847
+ /* template functional */
848
+ var __vue_template_functional__ = false
849
+ /* styles */
850
+ var __vue_styles__ = null
851
+ /* scopeId */
852
+ var __vue_scopeId__ = null
853
+ /* moduleIdentifier (server only) */
854
+ var __vue_module_identifier__ = null
855
+ var Component = normalizeComponent(
856
+ __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default.a,
857
+ __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_66b1c70c_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["a" /* default */],
858
+ __vue_template_functional__,
859
+ __vue_styles__,
860
+ __vue_scopeId__,
861
+ __vue_module_identifier__
862
+ )
863
+
864
+ /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
865
+
866
+
867
+ /***/ }),
868
+
869
+ /***/ 28:
870
+ /***/ (function(module, exports, __webpack_require__) {
871
+
872
+ "use strict";
873
+
874
+
875
+ exports.__esModule = true;
876
+
877
+ var _vue = __webpack_require__(4);
878
+
879
+ var _vue2 = _interopRequireDefault(_vue);
880
+
881
+ var _clickoutside = __webpack_require__(10);
882
+
883
+ var _clickoutside2 = _interopRequireDefault(_clickoutside);
884
+
885
+ var _util = __webpack_require__(11);
886
+
887
+ var _vuePopper = __webpack_require__(7);
888
+
889
+ var _vuePopper2 = _interopRequireDefault(_vuePopper);
890
+
891
+ var _emitter = __webpack_require__(1);
892
+
893
+ var _emitter2 = _interopRequireDefault(_emitter);
894
+
895
+ var _input = __webpack_require__(6);
896
+
897
+ var _input2 = _interopRequireDefault(_input);
898
+
899
+ var _merge = __webpack_require__(9);
900
+
901
+ var _merge2 = _interopRequireDefault(_merge);
902
+
903
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
904
+
905
+ var NewPopper = {
906
+ props: {
907
+ appendToBody: _vuePopper2.default.props.appendToBody,
908
+ offset: _vuePopper2.default.props.offset,
909
+ boundariesPadding: _vuePopper2.default.props.boundariesPadding,
910
+ arrowOffset: _vuePopper2.default.props.arrowOffset
911
+ },
912
+ methods: _vuePopper2.default.methods,
913
+ data: function data() {
914
+ return (0, _merge2.default)({ visibleArrow: true }, _vuePopper2.default.data);
915
+ },
916
+
917
+ beforeDestroy: _vuePopper2.default.beforeDestroy
918
+ }; //
919
+ //
920
+ //
921
+ //
922
+ //
923
+ //
924
+ //
925
+ //
926
+ //
927
+ //
928
+ //
929
+ //
930
+ //
931
+ //
932
+ //
933
+ //
934
+ //
935
+ //
936
+ //
937
+ //
938
+ //
939
+ //
940
+ //
941
+ //
942
+ //
943
+ //
944
+ //
945
+ //
946
+ //
947
+ //
948
+ //
949
+ //
950
+ //
951
+ //
952
+ //
953
+ //
954
+ //
955
+ //
956
+ //
957
+ //
958
+ //
959
+ //
960
+ //
961
+ //
962
+ //
963
+ //
964
+ //
965
+ //
966
+ //
967
+ //
968
+ //
969
+ //
970
+ //
971
+ //
972
+ //
973
+ //
974
+ //
975
+ //
976
+ //
977
+ //
978
+ //
979
+ //
980
+ //
981
+ //
982
+ //
983
+ //
984
+ //
985
+ //
986
+ //
987
+ //
988
+ //
989
+ //
990
+ //
991
+ //
992
+ //
993
+ //
994
+ //
995
+ //
996
+ //
997
+ //
998
+ //
999
+ //
1000
+ //
1001
+ //
1002
+ //
1003
+
1004
+ var DEFAULT_FORMATS = {
1005
+ date: 'yyyy-MM-dd',
1006
+ month: 'yyyy-MM',
1007
+ datetime: 'yyyy-MM-dd HH:mm:ss',
1008
+ time: 'HH:mm:ss',
1009
+ week: 'yyyywWW',
1010
+ timerange: 'HH:mm:ss',
1011
+ daterange: 'yyyy-MM-dd',
1012
+ datetimerange: 'yyyy-MM-dd HH:mm:ss',
1013
+ year: 'yyyy'
1014
+ };
1015
+ var HAVE_TRIGGER_TYPES = ['date', 'datetime', 'time', 'time-select', 'week', 'month', 'year', 'daterange', 'timerange', 'datetimerange', 'dates'];
1016
+ var DATE_FORMATTER = function DATE_FORMATTER(value, format) {
1017
+ if (format === 'timestamp') return value.getTime();
1018
+ return (0, _util.formatDate)(value, format);
1019
+ };
1020
+ var DATE_PARSER = function DATE_PARSER(text, format) {
1021
+ if (format === 'timestamp') return new Date(Number(text));
1022
+ return (0, _util.parseDate)(text, format);
1023
+ };
1024
+ var RANGE_FORMATTER = function RANGE_FORMATTER(value, format) {
1025
+ if (Array.isArray(value) && value.length === 2) {
1026
+ var start = value[0];
1027
+ var end = value[1];
1028
+
1029
+ if (start && end) {
1030
+ return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
1031
+ }
1032
+ }
1033
+ return '';
1034
+ };
1035
+ var RANGE_PARSER = function RANGE_PARSER(array, format, separator) {
1036
+ if (!Array.isArray(array)) {
1037
+ array = array.split(separator);
1038
+ }
1039
+ if (array.length === 2) {
1040
+ var range1 = array[0];
1041
+ var range2 = array[1];
1042
+
1043
+ return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
1044
+ }
1045
+ return [];
1046
+ };
1047
+ var TYPE_VALUE_RESOLVER_MAP = {
1048
+ default: {
1049
+ formatter: function formatter(value) {
1050
+ if (!value) return '';
1051
+ return '' + value;
1052
+ },
1053
+ parser: function parser(text) {
1054
+ if (text === undefined || text === '') return null;
1055
+ return text;
1056
+ }
1057
+ },
1058
+ week: {
1059
+ formatter: function formatter(value, format) {
1060
+ var week = (0, _util.getWeekNumber)(value);
1061
+ var month = value.getMonth();
1062
+ var trueDate = new Date(value);
1063
+ if (week === 1 && month === 11) {
1064
+ trueDate.setHours(0, 0, 0, 0);
1065
+ trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
1066
+ }
1067
+ var date = (0, _util.formatDate)(trueDate, format);
1068
+
1069
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? '0' + week : week) : date.replace(/W/, week);
1070
+ return date;
1071
+ },
1072
+ parser: function parser(text) {
1073
+ var array = (text || '').split('w');
1074
+ if (array.length === 2) {
1075
+ var year = Number(array[0]);
1076
+ var month = Number(array[1]);
1077
+
1078
+ if (!isNaN(year) && !isNaN(month) && month < 54) {
1079
+ return text;
1080
+ }
1081
+ }
1082
+ return null;
1083
+ }
1084
+ },
1085
+ date: {
1086
+ formatter: DATE_FORMATTER,
1087
+ parser: DATE_PARSER
1088
+ },
1089
+ datetime: {
1090
+ formatter: DATE_FORMATTER,
1091
+ parser: DATE_PARSER
1092
+ },
1093
+ daterange: {
1094
+ formatter: RANGE_FORMATTER,
1095
+ parser: RANGE_PARSER
1096
+ },
1097
+ datetimerange: {
1098
+ formatter: RANGE_FORMATTER,
1099
+ parser: RANGE_PARSER
1100
+ },
1101
+ timerange: {
1102
+ formatter: RANGE_FORMATTER,
1103
+ parser: RANGE_PARSER
1104
+ },
1105
+ time: {
1106
+ formatter: DATE_FORMATTER,
1107
+ parser: DATE_PARSER
1108
+ },
1109
+ month: {
1110
+ formatter: DATE_FORMATTER,
1111
+ parser: DATE_PARSER
1112
+ },
1113
+ year: {
1114
+ formatter: DATE_FORMATTER,
1115
+ parser: DATE_PARSER
1116
+ },
1117
+ number: {
1118
+ formatter: function formatter(value) {
1119
+ if (!value) return '';
1120
+ return '' + value;
1121
+ },
1122
+ parser: function parser(text) {
1123
+ var result = Number(text);
1124
+
1125
+ if (!isNaN(text)) {
1126
+ return result;
1127
+ } else {
1128
+ return null;
1129
+ }
1130
+ }
1131
+ },
1132
+ dates: {
1133
+ formatter: function formatter(value, format) {
1134
+ return value.map(function (date) {
1135
+ return DATE_FORMATTER(date, format);
1136
+ });
1137
+ },
1138
+ parser: function parser(value, format) {
1139
+ return (typeof value === 'string' ? value.split(', ') : value).map(function (date) {
1140
+ return date instanceof Date ? date : DATE_PARSER(date, format);
1141
+ });
1142
+ }
1143
+ }
1144
+ };
1145
+ var PLACEMENT_MAP = {
1146
+ left: 'bottom-start',
1147
+ center: 'bottom',
1148
+ right: 'bottom-end'
1149
+ };
1150
+
1151
+ var parseAsFormatAndType = function parseAsFormatAndType(value, customFormat, type) {
1152
+ var rangeSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '-';
1153
+
1154
+ if (!value) return null;
1155
+ var parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).parser;
1156
+ var format = customFormat || DEFAULT_FORMATS[type];
1157
+ return parser(value, format, rangeSeparator);
1158
+ };
1159
+
1160
+ var formatAsFormatAndType = function formatAsFormatAndType(value, customFormat, type) {
1161
+ if (!value) return null;
1162
+ var formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).formatter;
1163
+ var format = customFormat || DEFAULT_FORMATS[type];
1164
+ return formatter(value, format);
1165
+ };
1166
+
1167
+ /*
1168
+ * Considers:
1169
+ * 1. Date object
1170
+ * 2. date string
1171
+ * 3. array of 1 or 2
1172
+ */
1173
+ var valueEquals = function valueEquals(a, b) {
1174
+ // considers Date object and string
1175
+ var dateEquals = function dateEquals(a, b) {
1176
+ var aIsDate = a instanceof Date;
1177
+ var bIsDate = b instanceof Date;
1178
+ if (aIsDate && bIsDate) {
1179
+ return a.getTime() === b.getTime();
1180
+ }
1181
+ if (!aIsDate && !bIsDate) {
1182
+ return a === b;
1183
+ }
1184
+ return false;
1185
+ };
1186
+
1187
+ var aIsArray = a instanceof Array;
1188
+ var bIsArray = b instanceof Array;
1189
+ if (aIsArray && bIsArray) {
1190
+ if (a.length !== b.length) {
1191
+ return false;
1192
+ }
1193
+ return a.every(function (item, index) {
1194
+ return dateEquals(item, b[index]);
1195
+ });
1196
+ }
1197
+ if (!aIsArray && !bIsArray) {
1198
+ return dateEquals(a, b);
1199
+ }
1200
+ return false;
1201
+ };
1202
+
1203
+ var isString = function isString(val) {
1204
+ return typeof val === 'string' || val instanceof String;
1205
+ };
1206
+
1207
+ var validator = function validator(val) {
1208
+ // either: String, Array of String, null / undefined
1209
+ return val === null || val === undefined || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
1210
+ };
1211
+
1212
+ exports.default = {
1213
+ mixins: [_emitter2.default, NewPopper],
1214
+
1215
+ inject: {
1216
+ elForm: {
1217
+ default: ''
1218
+ },
1219
+ elFormItem: {
1220
+ default: ''
1221
+ }
1222
+ },
1223
+
1224
+ props: {
1225
+ size: String,
1226
+ format: String,
1227
+ valueFormat: String,
1228
+ readonly: Boolean,
1229
+ placeholder: String,
1230
+ startPlaceholder: String,
1231
+ endPlaceholder: String,
1232
+ prefixIcon: String,
1233
+ clearIcon: {
1234
+ type: String,
1235
+ default: 'el-icon-circle-close'
1236
+ },
1237
+ name: {
1238
+ default: '',
1239
+ validator: validator
1240
+ },
1241
+ disabled: Boolean,
1242
+ clearable: {
1243
+ type: Boolean,
1244
+ default: true
1245
+ },
1246
+ id: {
1247
+ default: '',
1248
+ validator: validator
1249
+ },
1250
+ popperClass: String,
1251
+ editable: {
1252
+ type: Boolean,
1253
+ default: true
1254
+ },
1255
+ align: {
1256
+ type: String,
1257
+ default: 'left'
1258
+ },
1259
+ value: {},
1260
+ defaultValue: {},
1261
+ defaultTime: {},
1262
+ rangeSeparator: {
1263
+ default: '-'
1264
+ },
1265
+ pickerOptions: {},
1266
+ unlinkPanels: Boolean
1267
+ },
1268
+
1269
+ components: { ElInput: _input2.default },
1270
+
1271
+ directives: { Clickoutside: _clickoutside2.default },
1272
+
1273
+ data: function data() {
1274
+ return {
1275
+ pickerVisible: false,
1276
+ showClose: false,
1277
+ userInput: null,
1278
+ valueOnOpen: null, // value when picker opens, used to determine whether to emit change
1279
+ unwatchPickerOptions: null
1280
+ };
1281
+ },
1282
+
1283
+
1284
+ watch: {
1285
+ pickerVisible: function pickerVisible(val) {
1286
+ if (this.readonly || this.pickerDisabled) return;
1287
+ if (val) {
1288
+ this.showPicker();
1289
+ this.valueOnOpen = Array.isArray(this.value) ? [].concat(this.value) : this.value;
1290
+ } else {
1291
+ this.hidePicker();
1292
+ this.emitChange(this.value);
1293
+ this.userInput = null;
1294
+ this.dispatch('ElFormItem', 'el.form.blur');
1295
+ this.$emit('blur', this);
1296
+ this.blur();
1297
+ }
1298
+ },
1299
+
1300
+ parsedValue: {
1301
+ immediate: true,
1302
+ handler: function handler(val) {
1303
+ if (this.picker) {
1304
+ this.picker.value = val;
1305
+ }
1306
+ }
1307
+ },
1308
+ defaultValue: function defaultValue(val) {
1309
+ // NOTE: should eventually move to jsx style picker + panel ?
1310
+ if (this.picker) {
1311
+ this.picker.defaultValue = val;
1312
+ }
1313
+ },
1314
+ value: function value(val, oldVal) {
1315
+ if (!valueEquals(val, oldVal) && !this.pickerVisible) {
1316
+ this.dispatch('ElFormItem', 'el.form.change', val);
1317
+ }
1318
+ }
1319
+ },
1320
+
1321
+ computed: {
1322
+ ranged: function ranged() {
1323
+ return this.type.indexOf('range') > -1;
1324
+ },
1325
+ reference: function reference() {
1326
+ var reference = this.$refs.reference;
1327
+ return reference.$el || reference;
1328
+ },
1329
+ refInput: function refInput() {
1330
+ if (this.reference) {
1331
+ return [].slice.call(this.reference.querySelectorAll('input'));
1332
+ }
1333
+ return [];
1334
+ },
1335
+ valueIsEmpty: function valueIsEmpty() {
1336
+ var val = this.value;
1337
+ if (Array.isArray(val)) {
1338
+ for (var i = 0, len = val.length; i < len; i++) {
1339
+ if (val[i]) {
1340
+ return false;
1341
+ }
1342
+ }
1343
+ } else {
1344
+ if (val) {
1345
+ return false;
1346
+ }
1347
+ }
1348
+ return true;
1349
+ },
1350
+ triggerClass: function triggerClass() {
1351
+ return this.prefixIcon || (this.type.indexOf('time') !== -1 ? 'el-icon-time' : 'el-icon-date');
1352
+ },
1353
+ selectionMode: function selectionMode() {
1354
+ if (this.type === 'week') {
1355
+ return 'week';
1356
+ } else if (this.type === 'month') {
1357
+ return 'month';
1358
+ } else if (this.type === 'year') {
1359
+ return 'year';
1360
+ } else if (this.type === 'dates') {
1361
+ return 'dates';
1362
+ }
1363
+
1364
+ return 'day';
1365
+ },
1366
+ haveTrigger: function haveTrigger() {
1367
+ if (typeof this.showTrigger !== 'undefined') {
1368
+ return this.showTrigger;
1369
+ }
1370
+ return HAVE_TRIGGER_TYPES.indexOf(this.type) !== -1;
1371
+ },
1372
+ displayValue: function displayValue() {
1373
+ var formattedValue = formatAsFormatAndType(this.parsedValue, this.format, this.type, this.rangeSeparator);
1374
+ if (Array.isArray(this.userInput)) {
1375
+ return [this.userInput[0] || formattedValue && formattedValue[0] || '', this.userInput[1] || formattedValue && formattedValue[1] || ''];
1376
+ } else if (this.userInput !== null) {
1377
+ return this.userInput;
1378
+ } else if (formattedValue) {
1379
+ return this.type === 'dates' ? formattedValue.join(', ') : formattedValue;
1380
+ } else {
1381
+ return '';
1382
+ }
1383
+ },
1384
+ parsedValue: function parsedValue() {
1385
+ if (!this.value) return this.value; // component value is not set
1386
+ if (this.type === 'time-select') return this.value; // time-select does not require parsing, this might change in next major version
1387
+
1388
+ var valueIsDateObject = (0, _util.isDateObject)(this.value) || Array.isArray(this.value) && this.value.every(_util.isDateObject);
1389
+ if (valueIsDateObject) {
1390
+ return this.value;
1391
+ }
1392
+
1393
+ if (this.valueFormat) {
1394
+ return parseAsFormatAndType(this.value, this.valueFormat, this.type, this.rangeSeparator) || this.value;
1395
+ }
1396
+
1397
+ // NOTE: deal with common but incorrect usage, should remove in next major version
1398
+ // user might provide string / timestamp without value-format, coerce them into date (or array of date)
1399
+ return Array.isArray(this.value) ? this.value.map(function (val) {
1400
+ return new Date(val);
1401
+ }) : new Date(this.value);
1402
+ },
1403
+ _elFormItemSize: function _elFormItemSize() {
1404
+ return (this.elFormItem || {}).elFormItemSize;
1405
+ },
1406
+ pickerSize: function pickerSize() {
1407
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
1408
+ },
1409
+ pickerDisabled: function pickerDisabled() {
1410
+ return this.disabled || (this.elForm || {}).disabled;
1411
+ },
1412
+ firstInputId: function firstInputId() {
1413
+ var obj = {};
1414
+ var id = void 0;
1415
+ if (this.ranged) {
1416
+ id = this.id && this.id[0];
1417
+ } else {
1418
+ id = this.id;
1419
+ }
1420
+ if (id) obj.id = id;
1421
+ return obj;
1422
+ },
1423
+ secondInputId: function secondInputId() {
1424
+ var obj = {};
1425
+ var id = void 0;
1426
+ if (this.ranged) {
1427
+ id = this.id && this.id[1];
1428
+ }
1429
+ if (id) obj.id = id;
1430
+ return obj;
1431
+ }
1432
+ },
1433
+
1434
+ created: function created() {
1435
+ // vue-popper
1436
+ this.popperOptions = {
1437
+ boundariesPadding: 0,
1438
+ gpuAcceleration: false
1439
+ };
1440
+ this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;
1441
+
1442
+ this.$on('fieldReset', this.handleFieldReset);
1443
+ },
1444
+
1445
+
1446
+ methods: {
1447
+ focus: function focus() {
1448
+ if (!this.ranged) {
1449
+ this.$refs.reference.focus();
1450
+ } else {
1451
+ this.handleFocus();
1452
+ }
1453
+ },
1454
+ blur: function blur() {
1455
+ this.refInput.forEach(function (input) {
1456
+ return input.blur();
1457
+ });
1458
+ },
1459
+
1460
+
1461
+ // {parse, formatTo} Value deals maps component value with internal Date
1462
+ parseValue: function parseValue(value) {
1463
+ var isParsed = (0, _util.isDateObject)(value) || Array.isArray(value) && value.every(_util.isDateObject);
1464
+ if (this.valueFormat && !isParsed) {
1465
+ return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
1466
+ } else {
1467
+ return value;
1468
+ }
1469
+ },
1470
+ formatToValue: function formatToValue(date) {
1471
+ var isFormattable = (0, _util.isDateObject)(date) || Array.isArray(date) && date.every(_util.isDateObject);
1472
+ if (this.valueFormat && isFormattable) {
1473
+ return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
1474
+ } else {
1475
+ return date;
1476
+ }
1477
+ },
1478
+
1479
+
1480
+ // {parse, formatTo} String deals with user input
1481
+ parseString: function parseString(value) {
1482
+ var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
1483
+ return parseAsFormatAndType(value, this.format, type);
1484
+ },
1485
+ formatToString: function formatToString(value) {
1486
+ var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
1487
+ return formatAsFormatAndType(value, this.format, type);
1488
+ },
1489
+ handleMouseEnter: function handleMouseEnter() {
1490
+ if (this.readonly || this.pickerDisabled) return;
1491
+ if (!this.valueIsEmpty && this.clearable) {
1492
+ this.showClose = true;
1493
+ }
1494
+ },
1495
+ handleChange: function handleChange() {
1496
+ if (this.userInput) {
1497
+ var value = this.parseString(this.displayValue);
1498
+ if (value) {
1499
+ this.picker.value = value;
1500
+ if (this.isValidValue(value)) {
1501
+ this.emitInput(value);
1502
+ this.userInput = null;
1503
+ }
1504
+ }
1505
+ }
1506
+ if (this.userInput === '') {
1507
+ this.emitInput(null);
1508
+ this.emitChange(null);
1509
+ this.userInput = null;
1510
+ }
1511
+ },
1512
+ handleStartInput: function handleStartInput(event) {
1513
+ if (this.userInput) {
1514
+ this.userInput = [event.target.value, this.userInput[1]];
1515
+ } else {
1516
+ this.userInput = [event.target.value, null];
1517
+ }
1518
+ },
1519
+ handleEndInput: function handleEndInput(event) {
1520
+ if (this.userInput) {
1521
+ this.userInput = [this.userInput[0], event.target.value];
1522
+ } else {
1523
+ this.userInput = [null, event.target.value];
1524
+ }
1525
+ },
1526
+ handleStartChange: function handleStartChange(event) {
1527
+ var value = this.parseString(this.userInput && this.userInput[0]);
1528
+ if (value) {
1529
+ this.userInput = [this.formatToString(value), this.displayValue[1]];
1530
+ var newValue = [value, this.picker.value && this.picker.value[1]];
1531
+ this.picker.value = newValue;
1532
+ if (this.isValidValue(newValue)) {
1533
+ this.emitInput(newValue);
1534
+ this.userInput = null;
1535
+ }
1536
+ }
1537
+ },
1538
+ handleEndChange: function handleEndChange(event) {
1539
+ var value = this.parseString(this.userInput && this.userInput[1]);
1540
+ if (value) {
1541
+ this.userInput = [this.displayValue[0], this.formatToString(value)];
1542
+ var newValue = [this.picker.value && this.picker.value[0], value];
1543
+ this.picker.value = newValue;
1544
+ if (this.isValidValue(newValue)) {
1545
+ this.emitInput(newValue);
1546
+ this.userInput = null;
1547
+ }
1548
+ }
1549
+ },
1550
+ handleClickIcon: function handleClickIcon(event) {
1551
+ if (this.readonly || this.pickerDisabled) return;
1552
+ if (this.showClose) {
1553
+ this.valueOnOpen = this.value;
1554
+ event.stopPropagation();
1555
+ this.emitInput(null);
1556
+ this.emitChange(null);
1557
+ this.showClose = false;
1558
+ if (this.picker && typeof this.picker.handleClear === 'function') {
1559
+ this.picker.handleClear();
1560
+ }
1561
+ } else {
1562
+ this.pickerVisible = !this.pickerVisible;
1563
+ }
1564
+ },
1565
+ handleClose: function handleClose() {
1566
+ if (!this.pickerVisible) return;
1567
+ this.pickerVisible = false;
1568
+
1569
+ if (this.type === 'dates') {
1570
+ // restore to former value
1571
+ var oldValue = parseAsFormatAndType(this.valueOnOpen, this.valueFormat, this.type, this.rangeSeparator) || this.valueOnOpen;
1572
+ this.emitInput(oldValue);
1573
+ }
1574
+ },
1575
+ handleFieldReset: function handleFieldReset(initialValue) {
1576
+ this.userInput = initialValue === '' ? null : initialValue;
1577
+ },
1578
+ handleFocus: function handleFocus() {
1579
+ var type = this.type;
1580
+
1581
+ if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
1582
+ this.pickerVisible = true;
1583
+ }
1584
+ this.$emit('focus', this);
1585
+ },
1586
+ handleKeydown: function handleKeydown(event) {
1587
+ var _this = this;
1588
+
1589
+ var keyCode = event.keyCode;
1590
+
1591
+ // ESC
1592
+ if (keyCode === 27) {
1593
+ this.pickerVisible = false;
1594
+ event.stopPropagation();
1595
+ return;
1596
+ }
1597
+
1598
+ // Tab
1599
+ if (keyCode === 9) {
1600
+ if (!this.ranged) {
1601
+ this.handleChange();
1602
+ this.pickerVisible = this.picker.visible = false;
1603
+ this.blur();
1604
+ event.stopPropagation();
1605
+ } else {
1606
+ // user may change focus between two input
1607
+ setTimeout(function () {
1608
+ if (_this.refInput.indexOf(document.activeElement) === -1) {
1609
+ _this.pickerVisible = false;
1610
+ _this.blur();
1611
+ event.stopPropagation();
1612
+ }
1613
+ }, 0);
1614
+ }
1615
+ return;
1616
+ }
1617
+
1618
+ // Enter
1619
+ if (keyCode === 13) {
1620
+ if (this.userInput === '' || this.isValidValue(this.parseString(this.displayValue))) {
1621
+ this.handleChange();
1622
+ this.pickerVisible = this.picker.visible = false;
1623
+ this.blur();
1624
+ }
1625
+ event.stopPropagation();
1626
+ return;
1627
+ }
1628
+
1629
+ // if user is typing, do not let picker handle key input
1630
+ if (this.userInput) {
1631
+ event.stopPropagation();
1632
+ return;
1633
+ }
1634
+
1635
+ // delegate other keys to panel
1636
+ if (this.picker && this.picker.handleKeydown) {
1637
+ this.picker.handleKeydown(event);
1638
+ }
1639
+ },
1640
+ handleRangeClick: function handleRangeClick() {
1641
+ var type = this.type;
1642
+
1643
+ if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
1644
+ this.pickerVisible = true;
1645
+ }
1646
+ this.$emit('focus', this);
1647
+ },
1648
+ hidePicker: function hidePicker() {
1649
+ if (this.picker) {
1650
+ this.picker.resetView && this.picker.resetView();
1651
+ this.pickerVisible = this.picker.visible = false;
1652
+ this.destroyPopper();
1653
+ }
1654
+ },
1655
+ showPicker: function showPicker() {
1656
+ var _this2 = this;
1657
+
1658
+ if (this.$isServer) return;
1659
+ if (!this.picker) {
1660
+ this.mountPicker();
1661
+ }
1662
+ this.pickerVisible = this.picker.visible = true;
1663
+
1664
+ this.updatePopper();
1665
+
1666
+ this.picker.value = this.parsedValue;
1667
+ this.picker.resetView && this.picker.resetView();
1668
+
1669
+ this.$nextTick(function () {
1670
+ _this2.picker.adjustSpinners && _this2.picker.adjustSpinners();
1671
+ });
1672
+ },
1673
+ mountPicker: function mountPicker() {
1674
+ var _this3 = this;
1675
+
1676
+ this.picker = new _vue2.default(this.panel).$mount();
1677
+ this.picker.defaultValue = this.defaultValue;
1678
+ this.picker.defaultTime = this.defaultTime;
1679
+ this.picker.popperClass = this.popperClass;
1680
+ this.popperElm = this.picker.$el;
1681
+ this.picker.width = this.reference.getBoundingClientRect().width;
1682
+ this.picker.showTime = this.type === 'datetime' || this.type === 'datetimerange';
1683
+ this.picker.selectionMode = this.selectionMode;
1684
+ this.picker.unlinkPanels = this.unlinkPanels;
1685
+ this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
1686
+ this.$watch('format', function (format) {
1687
+ _this3.picker.format = format;
1688
+ });
1689
+
1690
+ var updateOptions = function updateOptions() {
1691
+ var options = _this3.pickerOptions;
1692
+
1693
+ if (options && options.selectableRange) {
1694
+ (function () {
1695
+ var ranges = options.selectableRange;
1696
+ var parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
1697
+ var format = DEFAULT_FORMATS.timerange;
1698
+
1699
+ ranges = Array.isArray(ranges) ? ranges : [ranges];
1700
+ _this3.picker.selectableRange = ranges.map(function (range) {
1701
+ return parser(range, format, _this3.rangeSeparator);
1702
+ });
1703
+ })();
1704
+ }
1705
+
1706
+ for (var option in options) {
1707
+ if (options.hasOwnProperty(option) &&
1708
+ // 忽略 time-picker 的该配置项
1709
+ option !== 'selectableRange') {
1710
+ _this3.picker[option] = options[option];
1711
+ }
1712
+ }
1713
+
1714
+ // main format must prevail over undocumented pickerOptions.format
1715
+ if (_this3.format) {
1716
+ _this3.picker.format = _this3.format;
1717
+ }
1718
+ };
1719
+ updateOptions();
1720
+ this.unwatchPickerOptions = this.$watch('pickerOptions', function () {
1721
+ return updateOptions();
1722
+ }, { deep: true });
1723
+
1724
+ this.$el.appendChild(this.picker.$el);
1725
+ this.picker.resetView && this.picker.resetView();
1726
+
1727
+ this.picker.$on('dodestroy', this.doDestroy);
1728
+ this.picker.$on('pick', function () {
1729
+ var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1730
+ var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1731
+
1732
+ _this3.userInput = null;
1733
+ _this3.pickerVisible = _this3.picker.visible = visible;
1734
+ _this3.emitInput(date);
1735
+ _this3.picker.resetView && _this3.picker.resetView();
1736
+ });
1737
+
1738
+ this.picker.$on('select-range', function (start, end, pos) {
1739
+ if (_this3.refInput.length === 0) return;
1740
+ if (!pos || pos === 'min') {
1741
+ _this3.refInput[0].setSelectionRange(start, end);
1742
+ _this3.refInput[0].focus();
1743
+ } else if (pos === 'max') {
1744
+ _this3.refInput[1].setSelectionRange(start, end);
1745
+ _this3.refInput[1].focus();
1746
+ }
1747
+ });
1748
+ },
1749
+ unmountPicker: function unmountPicker() {
1750
+ if (this.picker) {
1751
+ this.picker.$destroy();
1752
+ this.picker.$off();
1753
+ if (typeof this.unwatchPickerOptions === 'function') {
1754
+ this.unwatchPickerOptions();
1755
+ }
1756
+ this.picker.$el.parentNode.removeChild(this.picker.$el);
1757
+ }
1758
+ },
1759
+ emitChange: function emitChange(val) {
1760
+ // determine user real change only
1761
+ if (!valueEquals(val, this.valueOnOpen)) {
1762
+ this.$emit('change', val);
1763
+ this.dispatch('ElFormItem', 'el.form.change', val);
1764
+ this.valueOnOpen = val;
1765
+ }
1766
+ },
1767
+ emitInput: function emitInput(val) {
1768
+ var formatted = this.formatToValue(val);
1769
+ if (!valueEquals(this.value, formatted)) {
1770
+ this.$emit('input', formatted);
1771
+ }
1772
+ },
1773
+ isValidValue: function isValidValue(value) {
1774
+ if (!this.picker) {
1775
+ this.mountPicker();
1776
+ }
1777
+ if (this.picker.isValidValue) {
1778
+ return value && this.picker.isValidValue(value);
1779
+ } else {
1780
+ return true;
1781
+ }
1782
+ }
1783
+ }
1784
+ };
1785
+
1786
+ /***/ }),
1787
+
1788
+ /***/ 29:
1789
+ /***/ (function(module, exports) {
1790
+
1791
+ module.exports = require("element-ui/lib/utils/date");
1792
+
1793
+ /***/ }),
1794
+
1795
+ /***/ 30:
1796
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1797
+
1798
+ "use strict";
1799
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.ranged)?_c('el-input',_vm._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClose),expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor",class:'el-date-editor--' + _vm.type,attrs:{"readonly":!_vm.editable || _vm.readonly || _vm.type === 'dates',"disabled":_vm.pickerDisabled,"size":_vm.pickerSize,"name":_vm.name,"placeholder":_vm.placeholder,"value":_vm.displayValue,"validateEvent":false},on:{"focus":_vm.handleFocus,"input":function (value) { return _vm.userInput = value; },"change":_vm.handleChange},nativeOn:{"keydown":function($event){_vm.handleKeydown($event)},"mouseenter":function($event){_vm.handleMouseEnter($event)},"mouseleave":function($event){_vm.showClose = false}}},'el-input',_vm.firstInputId,false),[_c('i',{staticClass:"el-input__icon",class:_vm.triggerClass,attrs:{"slot":"prefix"},on:{"click":_vm.handleFocus},slot:"prefix"}),(_vm.haveTrigger)?_c('i',{staticClass:"el-input__icon",class:[_vm.showClose ? '' + _vm.clearIcon : ''],attrs:{"slot":"suffix"},on:{"click":_vm.handleClickIcon},slot:"suffix"}):_vm._e()]):_c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClose),expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor el-range-editor el-input__inner",class:[
1800
+ 'el-date-editor--' + _vm.type,
1801
+ _vm.pickerSize ? ("el-range-editor--" + _vm.pickerSize) : '',
1802
+ _vm.pickerDisabled ? 'is-disabled' : '',
1803
+ _vm.pickerVisible ? 'is-active' : ''
1804
+ ],on:{"click":_vm.handleRangeClick,"mouseenter":_vm.handleMouseEnter,"mouseleave":function($event){_vm.showClose = false},"keydown":_vm.handleKeydown}},[_c('i',{class:['el-input__icon', 'el-range__icon', _vm.triggerClass]}),_c('input',_vm._b({staticClass:"el-range-input",attrs:{"autocomplete":"off","placeholder":_vm.startPlaceholder,"disabled":_vm.pickerDisabled,"readonly":!_vm.editable || _vm.readonly,"name":_vm.name && _vm.name[0]},domProps:{"value":_vm.displayValue && _vm.displayValue[0]},on:{"input":_vm.handleStartInput,"change":_vm.handleStartChange,"focus":_vm.handleFocus}},'input',_vm.firstInputId,false)),_vm._t("range-separator",[_c('span',{staticClass:"el-range-separator"},[_vm._v(_vm._s(_vm.rangeSeparator))])]),_c('input',_vm._b({staticClass:"el-range-input",attrs:{"autocomplete":"off","placeholder":_vm.endPlaceholder,"disabled":_vm.pickerDisabled,"readonly":!_vm.editable || _vm.readonly,"name":_vm.name && _vm.name[1]},domProps:{"value":_vm.displayValue && _vm.displayValue[1]},on:{"input":_vm.handleEndInput,"change":_vm.handleEndChange,"focus":_vm.handleFocus}},'input',_vm.secondInputId,false)),(_vm.haveTrigger)?_c('i',{staticClass:"el-input__icon el-range__close-icon",class:[_vm.showClose ? '' + _vm.clearIcon : ''],on:{"click":_vm.handleClickIcon}}):_vm._e()],2)}
1805
+ var staticRenderFns = []
1806
+ var esExports = { render: render, staticRenderFns: staticRenderFns }
1807
+ /* harmony default export */ __webpack_exports__["a"] = (esExports);
1808
+
1809
+ /***/ }),
1810
+
1811
+ /***/ 4:
1812
+ /***/ (function(module, exports) {
1813
+
1814
+ module.exports = require("vue");
1815
+
1816
+ /***/ }),
1817
+
1818
+ /***/ 6:
1819
+ /***/ (function(module, exports) {
1820
+
1821
+ module.exports = require("element-ui/lib/input");
1822
+
1823
+ /***/ }),
1824
+
1825
+ /***/ 7:
1826
+ /***/ (function(module, exports) {
1827
+
1828
+ module.exports = require("element-ui/lib/utils/vue-popper");
1829
+
1830
+ /***/ }),
1831
+
1832
+ /***/ 9:
1833
+ /***/ (function(module, exports) {
1834
+
1835
+ module.exports = require("element-ui/lib/utils/merge");
1836
+
1837
+ /***/ })
1838
+
1839
+ /******/ });