mazey-element-ui 2.0.1 → 2.15.16

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 (796) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +71 -68
  3. package/lib/alert.js +271 -262
  4. package/lib/aside.js +134 -200
  5. package/lib/autocomplete.js +500 -443
  6. package/lib/avatar.js +284 -0
  7. package/lib/backtop.js +336 -0
  8. package/lib/badge.js +188 -221
  9. package/lib/breadcrumb-item.js +176 -226
  10. package/lib/breadcrumb.js +150 -213
  11. package/lib/button-group.js +121 -190
  12. package/lib/button.js +213 -268
  13. package/lib/calendar.js +801 -0
  14. package/lib/card.js +156 -203
  15. package/lib/carousel-item.js +242 -264
  16. package/lib/carousel.js +386 -284
  17. package/lib/cascader-panel.js +1323 -0
  18. package/lib/cascader.js +1000 -1116
  19. package/lib/checkbox-button.js +388 -327
  20. package/lib/checkbox-group.js +168 -233
  21. package/lib/checkbox.js +422 -350
  22. package/lib/col.js +58 -112
  23. package/lib/collapse-item.js +335 -327
  24. package/lib/collapse.js +177 -246
  25. package/lib/color-picker.js +1128 -1231
  26. package/lib/container.js +144 -211
  27. package/lib/date-picker.js +4316 -2745
  28. package/lib/descriptions-item.js +88 -0
  29. package/lib/descriptions.js +342 -0
  30. package/lib/dialog.js +359 -337
  31. package/lib/directives/mousewheel.js +6 -12
  32. package/lib/directives/repeat-click.js +10 -10
  33. package/lib/divider.js +251 -0
  34. package/lib/drawer.js +523 -0
  35. package/lib/dropdown-item.js +175 -228
  36. package/lib/dropdown-menu.js +203 -253
  37. package/lib/dropdown.js +286 -384
  38. package/lib/element-ui.common.js +34136 -25458
  39. package/lib/empty.js +657 -0
  40. package/lib/footer.js +134 -200
  41. package/lib/form-item.js +401 -304
  42. package/lib/form.js +278 -297
  43. package/lib/header.js +134 -200
  44. package/lib/icon.js +123 -193
  45. package/lib/image.js +1005 -0
  46. package/lib/index.js +1 -1
  47. package/lib/infinite-scroll.js +219 -0
  48. package/lib/input-number.js +442 -386
  49. package/lib/input.js +682 -512
  50. package/lib/link.js +267 -0
  51. package/lib/loading.js +278 -377
  52. package/lib/locale/format.js +14 -25
  53. package/lib/locale/index.js +19 -33
  54. package/lib/locale/lang/af-ZA.js +29 -8
  55. package/lib/locale/lang/ar.js +29 -14
  56. package/lib/locale/lang/az.js +127 -0
  57. package/lib/locale/lang/bg.js +35 -11
  58. package/lib/locale/lang/bn.js +126 -0
  59. package/lib/locale/lang/ca.js +24 -9
  60. package/lib/locale/lang/cs-CZ.js +19 -3
  61. package/lib/locale/lang/da.js +19 -3
  62. package/lib/locale/lang/de.js +19 -3
  63. package/lib/locale/lang/ee.js +24 -8
  64. package/lib/locale/lang/el.js +20 -4
  65. package/lib/locale/lang/en.js +25 -7
  66. package/lib/locale/lang/eo.js +128 -0
  67. package/lib/locale/lang/es.js +22 -7
  68. package/lib/locale/lang/eu.js +131 -0
  69. package/lib/locale/lang/fa.js +24 -8
  70. package/lib/locale/lang/fi.js +40 -24
  71. package/lib/locale/lang/fr.js +21 -4
  72. package/lib/locale/lang/he.js +29 -8
  73. package/lib/locale/lang/hr.js +131 -0
  74. package/lib/locale/lang/hu.js +20 -4
  75. package/lib/locale/lang/hy-AM.js +128 -0
  76. package/lib/locale/lang/id.js +23 -8
  77. package/lib/locale/lang/is.js +127 -0
  78. package/lib/locale/lang/it.js +21 -6
  79. package/lib/locale/lang/ja.js +19 -3
  80. package/lib/locale/lang/kg.js +128 -0
  81. package/lib/locale/lang/km.js +21 -6
  82. package/lib/locale/lang/ko.js +19 -3
  83. package/lib/locale/lang/ku.js +19 -3
  84. package/lib/locale/lang/kz.js +19 -3
  85. package/lib/locale/lang/lt.js +19 -3
  86. package/lib/locale/lang/lv.js +26 -10
  87. package/lib/locale/lang/mn.js +19 -3
  88. package/lib/locale/lang/ms.js +126 -0
  89. package/lib/locale/lang/nb-NO.js +28 -13
  90. package/lib/locale/lang/nl.js +19 -3
  91. package/lib/locale/lang/pl.js +19 -3
  92. package/lib/locale/lang/pt-br.js +18 -3
  93. package/lib/locale/lang/pt.js +35 -11
  94. package/lib/locale/lang/ro.js +19 -3
  95. package/lib/locale/lang/ru-RU.js +20 -5
  96. package/lib/locale/lang/si.js +130 -0
  97. package/lib/locale/lang/sk.js +23 -8
  98. package/lib/locale/lang/sl.js +26 -10
  99. package/lib/locale/lang/sr-Latn.js +127 -0
  100. package/lib/locale/lang/sr.js +131 -0
  101. package/lib/locale/lang/sv-SE.js +34 -15
  102. package/lib/locale/lang/sw.js +130 -0
  103. package/lib/locale/lang/ta.js +31 -9
  104. package/lib/locale/lang/th.js +30 -12
  105. package/lib/locale/lang/tk.js +27 -7
  106. package/lib/locale/lang/tr-TR.js +20 -4
  107. package/lib/locale/lang/ua.js +20 -5
  108. package/lib/locale/lang/ug-CN.js +22 -7
  109. package/lib/locale/lang/uz-UZ.js +127 -0
  110. package/lib/locale/lang/vi.js +23 -8
  111. package/lib/locale/lang/zh-CN.js +18 -3
  112. package/lib/locale/lang/zh-TW.js +25 -6
  113. package/lib/main.js +123 -192
  114. package/lib/menu-item-group.js +164 -225
  115. package/lib/menu-item.js +300 -333
  116. package/lib/menu.js +401 -576
  117. package/lib/message-box.js +730 -614
  118. package/lib/message.js +289 -327
  119. package/lib/mixins/emitter.js +2 -4
  120. package/lib/mixins/focus.js +3 -4
  121. package/lib/mixins/locale.js +5 -7
  122. package/lib/mixins/migrating.js +19 -21
  123. package/lib/notification.js +366 -394
  124. package/lib/option-group.js +198 -250
  125. package/lib/option.js +247 -291
  126. package/lib/page-header.js +248 -0
  127. package/lib/pagination.js +485 -635
  128. package/lib/popconfirm.js +381 -0
  129. package/lib/popover.js +361 -396
  130. package/lib/progress.js +387 -261
  131. package/lib/radio-button.js +319 -309
  132. package/lib/radio-group.js +224 -282
  133. package/lib/radio.js +347 -328
  134. package/lib/rate.js +286 -305
  135. package/lib/result.js +513 -0
  136. package/lib/row.js +59 -110
  137. package/lib/scrollbar.js +234 -344
  138. package/lib/select.js +1041 -806
  139. package/lib/skeleton-item.js +278 -0
  140. package/lib/skeleton.js +308 -0
  141. package/lib/slider.js +608 -467
  142. package/lib/spinner.js +160 -207
  143. package/lib/statistic.js +462 -0
  144. package/lib/step.js +270 -262
  145. package/lib/steps.js +198 -261
  146. package/lib/submenu.js +318 -420
  147. package/lib/switch.js +311 -281
  148. package/lib/tab-pane.js +185 -245
  149. package/lib/table-column.js +667 -414
  150. package/lib/table.js +3388 -2770
  151. package/lib/tabs.js +577 -648
  152. package/lib/tag.js +160 -227
  153. package/lib/theme-chalk/alert.css +1 -1
  154. package/lib/theme-chalk/aside.css +1 -1
  155. package/lib/theme-chalk/autocomplete.css +1 -1
  156. package/lib/theme-chalk/avatar.css +1 -0
  157. package/lib/theme-chalk/backtop.css +1 -0
  158. package/lib/theme-chalk/badge.css +1 -1
  159. package/lib/theme-chalk/base.css +1 -1
  160. package/lib/theme-chalk/breadcrumb.css +1 -1
  161. package/lib/theme-chalk/button.css +1 -1
  162. package/lib/theme-chalk/calendar.css +1 -0
  163. package/lib/theme-chalk/card.css +1 -1
  164. package/lib/theme-chalk/carousel-item.css +1 -1
  165. package/lib/theme-chalk/carousel.css +1 -1
  166. package/lib/theme-chalk/cascader-panel.css +1 -0
  167. package/lib/theme-chalk/cascader.css +1 -1
  168. package/lib/theme-chalk/checkbox.css +1 -1
  169. package/lib/theme-chalk/col.css +1 -1
  170. package/lib/theme-chalk/collapse.css +1 -1
  171. package/lib/theme-chalk/color-picker.css +1 -1
  172. package/lib/theme-chalk/container.css +1 -1
  173. package/lib/theme-chalk/date-picker.css +1 -1
  174. package/lib/theme-chalk/descriptions-item.css +1 -0
  175. package/lib/theme-chalk/descriptions.css +1 -0
  176. package/lib/theme-chalk/dialog.css +1 -1
  177. package/lib/theme-chalk/display.css +1 -1
  178. package/lib/theme-chalk/divider.css +1 -0
  179. package/lib/theme-chalk/drawer.css +1 -0
  180. package/lib/theme-chalk/dropdown.css +1 -1
  181. package/lib/theme-chalk/empty.css +1 -0
  182. package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
  183. package/lib/theme-chalk/fonts/element-icons.woff +0 -0
  184. package/lib/theme-chalk/footer.css +1 -1
  185. package/lib/theme-chalk/form.css +1 -1
  186. package/lib/theme-chalk/header.css +1 -1
  187. package/lib/theme-chalk/icon.css +1 -1
  188. package/lib/theme-chalk/image.css +1 -0
  189. package/lib/theme-chalk/index.css +1 -1
  190. package/lib/theme-chalk/input-number.css +1 -1
  191. package/lib/theme-chalk/input.css +1 -1
  192. package/lib/theme-chalk/link.css +1 -0
  193. package/lib/theme-chalk/loading.css +1 -1
  194. package/lib/theme-chalk/main.css +1 -1
  195. package/lib/theme-chalk/menu.css +1 -1
  196. package/lib/theme-chalk/message-box.css +1 -1
  197. package/lib/theme-chalk/message.css +1 -1
  198. package/lib/theme-chalk/notification.css +1 -1
  199. package/lib/theme-chalk/option-group.css +1 -1
  200. package/lib/theme-chalk/option.css +1 -1
  201. package/lib/theme-chalk/page-header.css +1 -0
  202. package/lib/theme-chalk/pagination.css +1 -1
  203. package/lib/theme-chalk/popconfirm.css +1 -0
  204. package/lib/theme-chalk/popover.css +1 -1
  205. package/lib/theme-chalk/popper.css +1 -1
  206. package/lib/theme-chalk/progress.css +1 -1
  207. package/lib/theme-chalk/radio-button.css +1 -1
  208. package/lib/theme-chalk/radio.css +1 -1
  209. package/lib/theme-chalk/rate.css +1 -1
  210. package/lib/theme-chalk/reset.css +1 -1
  211. package/lib/theme-chalk/result.css +1 -0
  212. package/lib/theme-chalk/row.css +1 -1
  213. package/lib/theme-chalk/scrollbar.css +1 -1
  214. package/lib/theme-chalk/select-dropdown.css +1 -1
  215. package/lib/theme-chalk/select.css +1 -1
  216. package/lib/theme-chalk/skeleton-item.css +1 -0
  217. package/lib/theme-chalk/skeleton.css +1 -0
  218. package/lib/theme-chalk/slider.css +1 -1
  219. package/lib/theme-chalk/spinner.css +1 -1
  220. package/lib/theme-chalk/statistic.css +1 -0
  221. package/lib/theme-chalk/step.css +1 -1
  222. package/lib/theme-chalk/steps.css +1 -1
  223. package/lib/theme-chalk/switch.css +1 -1
  224. package/lib/theme-chalk/table-column.css +1 -1
  225. package/lib/theme-chalk/table.css +1 -1
  226. package/lib/theme-chalk/tabs.css +1 -1
  227. package/lib/theme-chalk/tag.css +1 -1
  228. package/lib/theme-chalk/time-picker.css +1 -1
  229. package/lib/theme-chalk/time-select.css +1 -1
  230. package/lib/theme-chalk/timeline-item.css +1 -0
  231. package/lib/theme-chalk/timeline.css +1 -0
  232. package/lib/theme-chalk/tooltip.css +1 -1
  233. package/lib/theme-chalk/transfer.css +1 -1
  234. package/lib/theme-chalk/tree.css +1 -1
  235. package/lib/theme-chalk/upload.css +1 -1
  236. package/lib/time-picker.js +1548 -1348
  237. package/lib/time-select.js +633 -853
  238. package/lib/timeline-item.js +301 -0
  239. package/lib/timeline.js +207 -0
  240. package/lib/tooltip.js +166 -240
  241. package/lib/transfer.js +731 -639
  242. package/lib/transitions/collapse-transition.js +13 -31
  243. package/lib/tree.js +1769 -1883
  244. package/lib/umd/locale/af-ZA.js +35 -14
  245. package/lib/umd/locale/ar.js +35 -20
  246. package/lib/umd/locale/az.js +143 -0
  247. package/lib/umd/locale/bg.js +41 -17
  248. package/lib/umd/locale/bn.js +142 -0
  249. package/lib/umd/locale/ca.js +30 -15
  250. package/lib/umd/locale/cs-CZ.js +25 -9
  251. package/lib/umd/locale/da.js +25 -9
  252. package/lib/umd/locale/de.js +25 -9
  253. package/lib/umd/locale/ee.js +30 -14
  254. package/lib/umd/locale/el.js +26 -10
  255. package/lib/umd/locale/en.js +31 -13
  256. package/lib/umd/locale/eo.js +144 -0
  257. package/lib/umd/locale/es.js +28 -13
  258. package/lib/umd/locale/eu.js +147 -0
  259. package/lib/umd/locale/fa.js +30 -14
  260. package/lib/umd/locale/fi.js +46 -30
  261. package/lib/umd/locale/fr.js +27 -10
  262. package/lib/umd/locale/he.js +35 -14
  263. package/lib/umd/locale/hr.js +147 -0
  264. package/lib/umd/locale/hu.js +26 -10
  265. package/lib/umd/locale/hy-AM.js +144 -0
  266. package/lib/umd/locale/id.js +29 -14
  267. package/lib/umd/locale/is.js +143 -0
  268. package/lib/umd/locale/it.js +27 -12
  269. package/lib/umd/locale/ja.js +25 -9
  270. package/lib/umd/locale/kg.js +144 -0
  271. package/lib/umd/locale/km.js +27 -12
  272. package/lib/umd/locale/ko.js +25 -9
  273. package/lib/umd/locale/ku.js +25 -9
  274. package/lib/umd/locale/kz.js +25 -9
  275. package/lib/umd/locale/lt.js +25 -9
  276. package/lib/umd/locale/lv.js +32 -16
  277. package/lib/umd/locale/mn.js +25 -9
  278. package/lib/umd/locale/ms.js +142 -0
  279. package/lib/umd/locale/nb-NO.js +34 -19
  280. package/lib/umd/locale/nl.js +25 -9
  281. package/lib/umd/locale/pl.js +25 -9
  282. package/lib/umd/locale/pt-br.js +24 -9
  283. package/lib/umd/locale/pt.js +41 -17
  284. package/lib/umd/locale/ro.js +25 -9
  285. package/lib/umd/locale/ru-RU.js +26 -11
  286. package/lib/umd/locale/si.js +146 -0
  287. package/lib/umd/locale/sk.js +29 -14
  288. package/lib/umd/locale/sl.js +32 -16
  289. package/lib/umd/locale/sr-Latn.js +143 -0
  290. package/lib/umd/locale/sr.js +147 -0
  291. package/lib/umd/locale/sv-SE.js +40 -21
  292. package/lib/umd/locale/sw.js +146 -0
  293. package/lib/umd/locale/ta.js +37 -15
  294. package/lib/umd/locale/th.js +36 -18
  295. package/lib/umd/locale/tk.js +33 -13
  296. package/lib/umd/locale/tr-TR.js +26 -10
  297. package/lib/umd/locale/ua.js +26 -11
  298. package/lib/umd/locale/ug-CN.js +28 -13
  299. package/lib/umd/locale/uz-UZ.js +143 -0
  300. package/lib/umd/locale/vi.js +29 -14
  301. package/lib/umd/locale/zh-CN.js +24 -9
  302. package/lib/umd/locale/zh-TW.js +31 -12
  303. package/lib/upload.js +1093 -1338
  304. package/lib/utils/after-leave.js +19 -16
  305. package/lib/utils/aria-dialog.js +11 -29
  306. package/lib/utils/aria-utils.js +7 -15
  307. package/lib/utils/clickoutside.js +16 -24
  308. package/lib/utils/date-util.js +267 -0
  309. package/lib/utils/date.js +56 -52
  310. package/lib/utils/dom.js +57 -27
  311. package/lib/utils/lodash.js +9421 -0
  312. package/lib/utils/menu/aria-menubar.js +6 -11
  313. package/lib/utils/menu/aria-menuitem.js +11 -22
  314. package/lib/utils/menu/aria-submenu.js +7 -16
  315. package/lib/utils/merge.js +9 -16
  316. package/lib/utils/popper.js +1141 -1170
  317. package/lib/utils/popup/index.js +24 -76
  318. package/lib/utils/popup/popup-manager.js +17 -49
  319. package/lib/utils/resize-event.js +11 -24
  320. package/lib/utils/scroll-into-view.js +4 -12
  321. package/lib/utils/scrollbar-width.js +8 -19
  322. package/lib/utils/types.js +38 -0
  323. package/lib/utils/util.js +165 -18
  324. package/lib/utils/vdom.js +5 -16
  325. package/lib/utils/vue-popper.js +10 -31
  326. package/package.json +131 -139
  327. package/packages/alert/src/main.vue +15 -8
  328. package/packages/autocomplete/src/autocomplete-suggestions.vue +4 -4
  329. package/packages/autocomplete/src/autocomplete.vue +45 -14
  330. package/packages/avatar/index.js +8 -0
  331. package/packages/avatar/src/main.vue +107 -0
  332. package/packages/backtop/index.js +8 -0
  333. package/packages/backtop/src/main.vue +110 -0
  334. package/packages/badge/src/main.vue +15 -3
  335. package/packages/button/src/button.vue +2 -1
  336. package/packages/calendar/index.js +8 -0
  337. package/packages/calendar/src/date-table.vue +200 -0
  338. package/packages/calendar/src/main.vue +280 -0
  339. package/packages/carousel/src/item.vue +36 -12
  340. package/packages/carousel/src/main.vue +83 -22
  341. package/packages/cascader/index.js +1 -1
  342. package/packages/cascader/src/cascader.vue +663 -0
  343. package/packages/cascader-panel/index.js +8 -0
  344. package/packages/cascader-panel/src/cascader-menu.vue +138 -0
  345. package/packages/cascader-panel/src/cascader-node.vue +246 -0
  346. package/packages/cascader-panel/src/cascader-panel.vue +391 -0
  347. package/packages/cascader-panel/src/node.js +166 -0
  348. package/packages/cascader-panel/src/store.js +58 -0
  349. package/packages/checkbox/src/checkbox-button.vue +11 -3
  350. package/packages/checkbox/src/checkbox-group.vue +1 -1
  351. package/packages/checkbox/src/checkbox.vue +15 -8
  352. package/packages/collapse/src/collapse-item.vue +12 -11
  353. package/packages/color-picker/src/color.js +1 -0
  354. package/packages/color-picker/src/components/picker-dropdown.vue +10 -6
  355. package/packages/color-picker/src/components/sv-panel.vue +1 -3
  356. package/packages/color-picker/src/main.vue +13 -4
  357. package/packages/date-picker/src/basic/date-table.vue +104 -168
  358. package/packages/date-picker/src/basic/month-table.vue +223 -58
  359. package/packages/date-picker/src/basic/time-spinner.vue +31 -15
  360. package/packages/date-picker/src/basic/year-table.vue +16 -5
  361. package/packages/date-picker/src/panel/date-range.vue +105 -48
  362. package/packages/date-picker/src/panel/date.vue +82 -39
  363. package/packages/date-picker/src/panel/month-range.vue +289 -0
  364. package/packages/date-picker/src/panel/time-range.vue +2 -2
  365. package/packages/date-picker/src/panel/time-select.vue +3 -2
  366. package/packages/date-picker/src/panel/time.vue +2 -2
  367. package/packages/date-picker/src/picker/date-picker.js +3 -0
  368. package/packages/date-picker/src/picker.vue +87 -43
  369. package/packages/descriptions/index.js +8 -0
  370. package/packages/descriptions/src/descriptions-item.js +30 -0
  371. package/packages/descriptions/src/descriptions-row.js +116 -0
  372. package/packages/descriptions/src/index.js +180 -0
  373. package/packages/descriptions-item/index.js +8 -0
  374. package/packages/dialog/src/component.vue +35 -12
  375. package/packages/divider/index.js +8 -0
  376. package/packages/divider/src/main.vue +37 -0
  377. package/packages/drawer/index.js +8 -0
  378. package/packages/drawer/src/main.vue +205 -0
  379. package/packages/dropdown/src/dropdown-item.vue +4 -2
  380. package/packages/dropdown/src/dropdown-menu.vue +6 -3
  381. package/packages/dropdown/src/dropdown.vue +55 -35
  382. package/packages/empty/index.js +7 -0
  383. package/packages/empty/src/img-empty.vue +132 -0
  384. package/packages/empty/src/index.vue +50 -0
  385. package/packages/form/src/form-item.vue +76 -44
  386. package/packages/form/src/form.vue +59 -11
  387. package/packages/form/src/label-wrap.vue +78 -0
  388. package/packages/image/index.js +8 -0
  389. package/packages/image/src/image-viewer.vue +330 -0
  390. package/packages/image/src/main.vue +249 -0
  391. package/packages/infinite-scroll/index.js +8 -0
  392. package/packages/infinite-scroll/src/main.js +150 -0
  393. package/packages/input/src/input.vue +186 -75
  394. package/packages/input-number/src/input-number.vue +52 -25
  395. package/packages/link/index.js +8 -0
  396. package/packages/link/src/main.vue +53 -0
  397. package/packages/loading/src/directive.js +9 -4
  398. package/packages/loading/src/index.js +5 -5
  399. package/packages/menu/src/menu-item.vue +4 -4
  400. package/packages/menu/src/menu.vue +24 -10
  401. package/packages/menu/src/submenu.vue +26 -12
  402. package/packages/message/src/main.js +35 -16
  403. package/packages/message/src/main.vue +12 -15
  404. package/packages/message-box/src/main.js +6 -4
  405. package/packages/message-box/src/main.vue +32 -24
  406. package/packages/notification/src/main.js +9 -8
  407. package/packages/page-header/index.js +8 -0
  408. package/packages/page-header/src/main.vue +30 -0
  409. package/packages/pagination/src/pagination.js +36 -77
  410. package/packages/popconfirm/index.js +8 -0
  411. package/packages/popconfirm/src/main.vue +104 -0
  412. package/packages/popover/src/directive.js +5 -1
  413. package/packages/popover/src/main.vue +49 -31
  414. package/packages/progress/src/progress.vue +118 -21
  415. package/packages/radio/index.js +1 -1
  416. package/packages/radio/src/radio-button.vue +7 -3
  417. package/packages/radio/src/radio-group.vue +9 -3
  418. package/packages/radio/src/radio.vue +6 -3
  419. package/packages/rate/src/main.vue +36 -37
  420. package/packages/result/index.js +8 -0
  421. package/packages/result/src/icon-error.vue +13 -0
  422. package/packages/result/src/icon-info.vue +13 -0
  423. package/packages/result/src/icon-success.vue +13 -0
  424. package/packages/result/src/icon-warning.vue +13 -0
  425. package/packages/result/src/index.vue +65 -0
  426. package/packages/row/src/row.js +2 -5
  427. package/packages/scrollbar/src/bar.js +5 -1
  428. package/packages/scrollbar/src/main.js +3 -3
  429. package/packages/select/src/option-group.vue +1 -1
  430. package/packages/select/src/option.vue +22 -9
  431. package/packages/select/src/select-dropdown.vue +1 -1
  432. package/packages/select/src/select.vue +126 -105
  433. package/packages/skeleton/index.js +8 -0
  434. package/packages/skeleton/src/img-placeholder.vue +16 -0
  435. package/packages/skeleton/src/index.vue +76 -0
  436. package/packages/skeleton/src/item.vue +22 -0
  437. package/packages/skeleton-item/index.js +8 -0
  438. package/packages/slider/src/button.vue +6 -9
  439. package/packages/slider/src/main.vue +60 -32
  440. package/packages/slider/src/marker.js +18 -0
  441. package/packages/spinner/src/spinner.vue +1 -1
  442. package/packages/statistic/index.js +8 -0
  443. package/packages/statistic/src/main.vue +204 -0
  444. package/packages/steps/src/step.vue +5 -1
  445. package/packages/steps/src/steps.vue +1 -1
  446. package/packages/switch/src/component.vue +18 -7
  447. package/packages/table/src/config.js +124 -0
  448. package/packages/table/src/filter-panel.vue +9 -18
  449. package/packages/table/src/layout-observer.js +2 -2
  450. package/packages/table/src/store/current.js +76 -0
  451. package/packages/table/src/store/expand.js +65 -0
  452. package/packages/table/src/store/helper.js +41 -0
  453. package/packages/table/src/store/index.js +147 -0
  454. package/packages/table/src/store/tree.js +209 -0
  455. package/packages/table/src/store/watcher.js +381 -0
  456. package/packages/table/src/table-body.js +221 -166
  457. package/packages/table/src/table-column.js +203 -308
  458. package/packages/table/src/table-footer.js +75 -65
  459. package/packages/table/src/table-header.js +68 -77
  460. package/packages/table/src/table-layout.js +43 -25
  461. package/packages/table/src/table-row.js +101 -0
  462. package/packages/table/src/table.vue +155 -99
  463. package/packages/table/src/util.js +164 -1
  464. package/packages/tabs/src/tab-bar.vue +7 -7
  465. package/packages/tabs/src/tab-nav.vue +35 -14
  466. package/packages/tabs/src/tab-pane.vue +10 -18
  467. package/packages/tabs/src/tabs.vue +45 -22
  468. package/packages/tag/src/tag.vue +35 -18
  469. package/packages/theme-chalk/gulpfile.js +33 -0
  470. package/packages/theme-chalk/package.json +36 -0
  471. package/packages/theme-chalk/src/alert.scss +57 -15
  472. package/packages/theme-chalk/src/autocomplete.scss +3 -4
  473. package/packages/theme-chalk/src/avatar.scss +51 -0
  474. package/packages/theme-chalk/src/backtop.scss +22 -0
  475. package/packages/theme-chalk/src/badge.scss +17 -1
  476. package/packages/theme-chalk/src/button.scss +40 -20
  477. package/packages/theme-chalk/src/calendar.scss +79 -0
  478. package/packages/theme-chalk/src/carousel.scss +33 -6
  479. package/packages/theme-chalk/src/cascader-panel.scss +120 -0
  480. package/packages/theme-chalk/src/cascader.scss +118 -112
  481. package/packages/theme-chalk/src/checkbox.scss +18 -17
  482. package/packages/theme-chalk/src/collapse.scss +16 -9
  483. package/packages/theme-chalk/src/common/popup.scss +3 -2
  484. package/packages/theme-chalk/src/common/var.scss +500 -184
  485. package/packages/theme-chalk/src/date-picker/date-picker.scss +1 -1
  486. package/packages/theme-chalk/src/date-picker/date-range-picker.scss +4 -7
  487. package/packages/theme-chalk/src/date-picker/date-table.scss +11 -11
  488. package/packages/theme-chalk/src/date-picker/month-table.scss +48 -6
  489. package/packages/theme-chalk/src/date-picker/picker-panel.scss +3 -3
  490. package/packages/theme-chalk/src/date-picker/picker.scss +7 -0
  491. package/packages/theme-chalk/src/date-picker/time-picker.scss +1 -0
  492. package/packages/theme-chalk/src/date-picker/year-table.scss +9 -2
  493. package/packages/theme-chalk/src/descriptions-item.scss +42 -0
  494. package/packages/theme-chalk/src/descriptions.scss +111 -0
  495. package/packages/theme-chalk/src/dialog.scss +5 -4
  496. package/packages/theme-chalk/src/divider.scss +47 -0
  497. package/packages/theme-chalk/src/drawer.scss +219 -0
  498. package/packages/theme-chalk/src/dropdown.scss +14 -1
  499. package/packages/theme-chalk/src/empty.scss +45 -0
  500. package/packages/theme-chalk/src/fonts/element-icons.ttf +0 -0
  501. package/packages/theme-chalk/src/fonts/element-icons.woff +0 -0
  502. package/packages/theme-chalk/src/form.scss +18 -23
  503. package/packages/theme-chalk/src/icon.scss +1052 -71
  504. package/packages/theme-chalk/src/image.scss +179 -0
  505. package/packages/theme-chalk/src/index.scss +20 -0
  506. package/packages/theme-chalk/src/input.scss +56 -5
  507. package/packages/theme-chalk/src/link.scss +81 -0
  508. package/packages/theme-chalk/src/main.scss +2 -0
  509. package/packages/theme-chalk/src/menu.scss +11 -8
  510. package/packages/theme-chalk/src/message-box.scss +14 -11
  511. package/packages/theme-chalk/src/message.scss +10 -10
  512. package/packages/theme-chalk/src/notification.scss +8 -7
  513. package/packages/theme-chalk/src/option.scss +1 -5
  514. package/packages/theme-chalk/src/page-header.scss +41 -0
  515. package/packages/theme-chalk/src/pagination.scss +9 -10
  516. package/packages/theme-chalk/src/popconfirm.scss +16 -0
  517. package/packages/theme-chalk/src/popover.scss +3 -2
  518. package/packages/theme-chalk/src/popper.scss +4 -4
  519. package/packages/theme-chalk/src/progress.scss +13 -1
  520. package/packages/theme-chalk/src/radio-button.scss +8 -8
  521. package/packages/theme-chalk/src/radio.scss +7 -6
  522. package/packages/theme-chalk/src/result.scss +61 -0
  523. package/packages/theme-chalk/src/row.scss +4 -0
  524. package/packages/theme-chalk/src/scrollbar.scss +1 -0
  525. package/packages/theme-chalk/src/select-dropdown.scss +5 -2
  526. package/packages/theme-chalk/src/select.scss +14 -6
  527. package/packages/theme-chalk/src/skeleton-item.scss +84 -0
  528. package/packages/theme-chalk/src/skeleton.scss +40 -0
  529. package/packages/theme-chalk/src/slider.scss +22 -0
  530. package/packages/theme-chalk/src/statistic.scss +38 -0
  531. package/packages/theme-chalk/src/switch.scss +0 -3
  532. package/packages/theme-chalk/src/table.scss +67 -60
  533. package/packages/theme-chalk/src/tabs.scss +58 -32
  534. package/packages/theme-chalk/src/tag.scss +85 -68
  535. package/packages/theme-chalk/src/timeline-item.scss +86 -0
  536. package/packages/theme-chalk/src/timeline.scss +14 -0
  537. package/packages/theme-chalk/src/tooltip.scss +1 -0
  538. package/packages/theme-chalk/src/transfer.scss +2 -2
  539. package/packages/theme-chalk/src/tree.scss +8 -5
  540. package/packages/theme-chalk/src/upload.scss +1 -0
  541. package/packages/timeline/index.js +8 -0
  542. package/packages/timeline/src/item.vue +73 -0
  543. package/packages/timeline/src/main.vue +33 -0
  544. package/packages/timeline-item/index.js +8 -0
  545. package/packages/tooltip/src/main.js +52 -26
  546. package/packages/transfer/src/main.vue +15 -7
  547. package/packages/transfer/src/transfer-panel.vue +4 -4
  548. package/packages/tree/src/model/node.js +27 -21
  549. package/packages/tree/src/model/tree-store.js +22 -16
  550. package/packages/tree/src/tree-node.vue +16 -10
  551. package/packages/tree/src/tree.vue +41 -27
  552. package/packages/upload/src/index.vue +42 -13
  553. package/packages/upload/src/upload-list.vue +46 -41
  554. package/src/directives/repeat-click.js +6 -4
  555. package/src/index.js +66 -8
  556. package/src/locale/format.js +1 -1
  557. package/src/locale/index.js +1 -1
  558. package/src/locale/lang/af-ZA.js +15 -1
  559. package/src/locale/lang/ar.js +26 -12
  560. package/src/locale/lang/az.js +126 -0
  561. package/src/locale/lang/bg.js +15 -1
  562. package/src/locale/lang/bn.js +126 -0
  563. package/src/locale/lang/ca.js +21 -7
  564. package/src/locale/lang/cs-CZ.js +15 -1
  565. package/src/locale/lang/da.js +15 -1
  566. package/src/locale/lang/de.js +15 -1
  567. package/src/locale/lang/ee.js +20 -6
  568. package/src/locale/lang/el.js +16 -2
  569. package/src/locale/lang/en.js +16 -2
  570. package/src/locale/lang/eo.js +123 -0
  571. package/src/locale/lang/es.js +19 -5
  572. package/src/locale/lang/eu.js +123 -0
  573. package/src/locale/lang/fa.js +20 -6
  574. package/src/locale/lang/fi.js +36 -22
  575. package/src/locale/lang/fr.js +15 -1
  576. package/src/locale/lang/he.js +15 -1
  577. package/src/locale/lang/hr.js +123 -0
  578. package/src/locale/lang/hu.js +16 -2
  579. package/src/locale/lang/hy-AM.js +123 -0
  580. package/src/locale/lang/id.js +20 -6
  581. package/src/locale/lang/is.js +124 -0
  582. package/src/locale/lang/it.js +18 -4
  583. package/src/locale/lang/ja.js +15 -1
  584. package/src/locale/lang/kg.js +123 -0
  585. package/src/locale/lang/km.js +18 -4
  586. package/src/locale/lang/ko.js +15 -1
  587. package/src/locale/lang/ku.js +15 -1
  588. package/src/locale/lang/kz.js +15 -1
  589. package/src/locale/lang/lt.js +15 -1
  590. package/src/locale/lang/lv.js +22 -8
  591. package/src/locale/lang/mn.js +15 -1
  592. package/src/locale/lang/ms.js +122 -0
  593. package/src/locale/lang/nb-NO.js +25 -11
  594. package/src/locale/lang/nl.js +15 -1
  595. package/src/locale/lang/pl.js +15 -1
  596. package/src/locale/lang/pt-br.js +15 -1
  597. package/src/locale/lang/pt.js +15 -1
  598. package/src/locale/lang/ro.js +15 -1
  599. package/src/locale/lang/ru-RU.js +17 -3
  600. package/src/locale/lang/si.js +123 -0
  601. package/src/locale/lang/sk.js +20 -6
  602. package/src/locale/lang/sl.js +21 -7
  603. package/src/locale/lang/sr-Latn.js +123 -0
  604. package/src/locale/lang/sr.js +123 -0
  605. package/src/locale/lang/sv-SE.js +23 -9
  606. package/src/locale/lang/sw.js +123 -0
  607. package/src/locale/lang/ta.js +15 -1
  608. package/src/locale/lang/th.js +22 -8
  609. package/src/locale/lang/tk.js +15 -1
  610. package/src/locale/lang/tr-TR.js +16 -2
  611. package/src/locale/lang/ua.js +17 -3
  612. package/src/locale/lang/ug-CN.js +19 -5
  613. package/src/locale/lang/uz-UZ.js +123 -0
  614. package/src/locale/lang/vi.js +20 -6
  615. package/src/locale/lang/zh-CN.js +15 -1
  616. package/src/locale/lang/zh-TW.js +15 -1
  617. package/src/mixins/locale.js +1 -1
  618. package/src/mixins/migrating.js +6 -3
  619. package/src/transitions/collapse-transition.js +1 -1
  620. package/src/utils/aria-utils.js +2 -1
  621. package/src/utils/clickoutside.js +1 -1
  622. package/{packages/date-picker/src/util/index.js → src/utils/date-util.js} +69 -27
  623. package/src/utils/date.js +54 -30
  624. package/src/utils/dom.js +55 -2
  625. package/src/utils/lodash.js +18075 -0
  626. package/src/utils/merge.js +3 -13
  627. package/src/utils/popup/index.js +3 -11
  628. package/src/utils/popup/popup-manager.js +3 -3
  629. package/src/utils/resize-event.js +2 -1
  630. package/src/utils/types.js +38 -0
  631. package/src/utils/util.js +161 -0
  632. package/src/utils/vdom.js +1 -5
  633. package/src/utils/vue-popper.js +2 -1
  634. package/types/alert.d.ts +4 -0
  635. package/types/autocomplete.d.ts +6 -3
  636. package/types/avatar.d.ts +20 -0
  637. package/types/backtop.d.ts +16 -0
  638. package/types/calendar.d.ts +15 -0
  639. package/types/carousel.d.ts +4 -0
  640. package/types/cascader-panel.d.ts +72 -0
  641. package/types/cascader.d.ts +29 -21
  642. package/types/collapse-item.d.ts +3 -0
  643. package/types/descriptions-item.d.ts +37 -0
  644. package/types/descriptions.d.ts +52 -0
  645. package/types/dialog.d.ts +3 -0
  646. package/types/divider.d.ts +12 -0
  647. package/types/drawer.d.ts +63 -0
  648. package/types/dropdown-item.d.ts +3 -0
  649. package/types/dropdown.d.ts +12 -0
  650. package/types/element-ui.d.ts +91 -3
  651. package/types/empty.d.ts +31 -0
  652. package/types/form.d.ts +6 -6
  653. package/types/icon.d.ts +7 -0
  654. package/types/image.d.ts +43 -0
  655. package/types/infinite-scroll.d.ts +6 -0
  656. package/types/input-number.d.ts +4 -1
  657. package/types/input.d.ts +16 -1
  658. package/types/link.d.ts +25 -0
  659. package/types/loading.d.ts +3 -1
  660. package/types/message-box.d.ts +14 -4
  661. package/types/message.d.ts +17 -2
  662. package/types/page-header.d.ts +10 -0
  663. package/types/pagination.d.ts +3 -0
  664. package/types/popconfirm.d.ts +29 -0
  665. package/types/popover.d.ts +7 -1
  666. package/types/progress.d.ts +7 -1
  667. package/types/rate.d.ts +16 -4
  668. package/types/result.d.ts +33 -0
  669. package/types/select.d.ts +9 -0
  670. package/types/skeleton-item.d.ts +7 -0
  671. package/types/skeleton.d.ts +33 -0
  672. package/types/slider.d.ts +6 -0
  673. package/types/spinner.d.ts +16 -0
  674. package/types/statistic.d.ts +37 -0
  675. package/types/submenu.d.ts +1 -1
  676. package/types/switch.d.ts +3 -0
  677. package/types/table-column.d.ts +1 -1
  678. package/types/table.d.ts +58 -3
  679. package/types/tabs.d.ts +4 -1
  680. package/types/tag.d.ts +5 -1
  681. package/types/timeline-item.d.ts +20 -0
  682. package/types/timeline.d.ts +6 -0
  683. package/types/tooltip.d.ts +3 -0
  684. package/types/tree.d.ts +120 -97
  685. package/types/upload.d.ts +7 -4
  686. package/web-types.json +4195 -0
  687. package/CHANGELOG.en-US.md +0 -576
  688. package/CHANGELOG.es.md +0 -581
  689. package/CHANGELOG.zh-CN.md +0 -576
  690. package/lib/utils/sync.js +0 -59
  691. package/packages/carousel/_index.js +0 -10
  692. package/packages/carousel/cooking.conf.js +0 -6
  693. package/packages/carousel/package.json +0 -17
  694. package/packages/cascader/cooking.conf.js +0 -18
  695. package/packages/cascader/package.json +0 -15
  696. package/packages/cascader/src/main.vue +0 -438
  697. package/packages/cascader/src/menu.vue +0 -369
  698. package/packages/color-picker/cooking.conf.js +0 -6
  699. package/packages/color-picker/package.json +0 -15
  700. package/packages/date-picker/README.md +0 -64
  701. package/packages/date-picker/_index.js +0 -12
  702. package/packages/date-picker/cooking.conf.js +0 -6
  703. package/packages/date-picker/package.json +0 -15
  704. package/packages/loading/README.md +0 -66
  705. package/packages/loading/cooking.conf.js +0 -6
  706. package/packages/loading/package.json +0 -15
  707. package/packages/pagination/README.md +0 -59
  708. package/packages/pagination/cooking.conf.js +0 -6
  709. package/packages/pagination/package.json +0 -15
  710. package/packages/table/README.md +0 -106
  711. package/packages/table/_index.js +0 -10
  712. package/packages/table/cooking.conf.js +0 -6
  713. package/packages/table/package.json +0 -17
  714. package/packages/table/src/table-store.js +0 -619
  715. package/packages/theme-chalk/lib/alert.css +0 -1
  716. package/packages/theme-chalk/lib/aside.css +0 -1
  717. package/packages/theme-chalk/lib/autocomplete.css +0 -1
  718. package/packages/theme-chalk/lib/badge.css +0 -1
  719. package/packages/theme-chalk/lib/base.css +0 -1
  720. package/packages/theme-chalk/lib/breadcrumb.css +0 -1
  721. package/packages/theme-chalk/lib/button.css +0 -1
  722. package/packages/theme-chalk/lib/card.css +0 -1
  723. package/packages/theme-chalk/lib/carousel-item.css +0 -1
  724. package/packages/theme-chalk/lib/carousel.css +0 -1
  725. package/packages/theme-chalk/lib/cascader.css +0 -1
  726. package/packages/theme-chalk/lib/checkbox.css +0 -1
  727. package/packages/theme-chalk/lib/col.css +0 -1
  728. package/packages/theme-chalk/lib/collapse-item.css +0 -0
  729. package/packages/theme-chalk/lib/collapse.css +0 -1
  730. package/packages/theme-chalk/lib/color-picker.css +0 -1
  731. package/packages/theme-chalk/lib/container.css +0 -1
  732. package/packages/theme-chalk/lib/date-picker.css +0 -1
  733. package/packages/theme-chalk/lib/dialog.css +0 -1
  734. package/packages/theme-chalk/lib/display.css +0 -1
  735. package/packages/theme-chalk/lib/dropdown-item.css +0 -0
  736. package/packages/theme-chalk/lib/dropdown-menu.css +0 -0
  737. package/packages/theme-chalk/lib/dropdown.css +0 -1
  738. package/packages/theme-chalk/lib/fonts/element-icons.ttf +0 -0
  739. package/packages/theme-chalk/lib/fonts/element-icons.woff +0 -0
  740. package/packages/theme-chalk/lib/footer.css +0 -1
  741. package/packages/theme-chalk/lib/form-item.css +0 -0
  742. package/packages/theme-chalk/lib/form.css +0 -1
  743. package/packages/theme-chalk/lib/header.css +0 -1
  744. package/packages/theme-chalk/lib/icon.css +0 -1
  745. package/packages/theme-chalk/lib/index.css +0 -1
  746. package/packages/theme-chalk/lib/input-number.css +0 -1
  747. package/packages/theme-chalk/lib/input.css +0 -1
  748. package/packages/theme-chalk/lib/loading.css +0 -1
  749. package/packages/theme-chalk/lib/main.css +0 -1
  750. package/packages/theme-chalk/lib/menu-item-group.css +0 -0
  751. package/packages/theme-chalk/lib/menu-item.css +0 -0
  752. package/packages/theme-chalk/lib/menu.css +0 -1
  753. package/packages/theme-chalk/lib/message-box.css +0 -1
  754. package/packages/theme-chalk/lib/message.css +0 -1
  755. package/packages/theme-chalk/lib/notification.css +0 -1
  756. package/packages/theme-chalk/lib/option-group.css +0 -1
  757. package/packages/theme-chalk/lib/option.css +0 -1
  758. package/packages/theme-chalk/lib/pagination.css +0 -1
  759. package/packages/theme-chalk/lib/popover.css +0 -1
  760. package/packages/theme-chalk/lib/popper.css +0 -1
  761. package/packages/theme-chalk/lib/progress.css +0 -1
  762. package/packages/theme-chalk/lib/radio-button.css +0 -1
  763. package/packages/theme-chalk/lib/radio-group.css +0 -1
  764. package/packages/theme-chalk/lib/radio.css +0 -1
  765. package/packages/theme-chalk/lib/rate.css +0 -1
  766. package/packages/theme-chalk/lib/reset.css +0 -1
  767. package/packages/theme-chalk/lib/row.css +0 -1
  768. package/packages/theme-chalk/lib/scrollbar.css +0 -1
  769. package/packages/theme-chalk/lib/select-dropdown.css +0 -1
  770. package/packages/theme-chalk/lib/select.css +0 -1
  771. package/packages/theme-chalk/lib/slider.css +0 -1
  772. package/packages/theme-chalk/lib/spinner.css +0 -1
  773. package/packages/theme-chalk/lib/step.css +0 -1
  774. package/packages/theme-chalk/lib/steps.css +0 -1
  775. package/packages/theme-chalk/lib/submenu.css +0 -0
  776. package/packages/theme-chalk/lib/switch.css +0 -1
  777. package/packages/theme-chalk/lib/tab-pane.css +0 -0
  778. package/packages/theme-chalk/lib/table-column.css +0 -1
  779. package/packages/theme-chalk/lib/table.css +0 -1
  780. package/packages/theme-chalk/lib/tabs.css +0 -1
  781. package/packages/theme-chalk/lib/tag.css +0 -1
  782. package/packages/theme-chalk/lib/time-picker.css +0 -1
  783. package/packages/theme-chalk/lib/time-select.css +0 -1
  784. package/packages/theme-chalk/lib/tooltip.css +0 -1
  785. package/packages/theme-chalk/lib/transfer.css +0 -1
  786. package/packages/theme-chalk/lib/tree.css +0 -1
  787. package/packages/theme-chalk/lib/upload.css +0 -1
  788. package/packages/upload/README.md +0 -67
  789. package/packages/upload/cooking.conf.js +0 -6
  790. package/packages/upload/package.json +0 -16
  791. package/packages/upload/src/iframe-upload.vue +0 -167
  792. package/src/utils/sync.js +0 -54
  793. /package/{packages/theme-chalk/lib/breadcrumb-item.css → lib/theme-chalk/infinite-scroll.css} +0 -0
  794. /package/{packages/theme-chalk/lib/button-group.css → lib/theme-chalk/infiniteScroll.css} +0 -0
  795. /package/packages/theme-chalk/{lib/checkbox-button.css → src/infinite-scroll.scss} +0 -0
  796. /package/packages/theme-chalk/{lib/checkbox-group.css → src/infiniteScroll.scss} +0 -0
package/lib/tabs.js CHANGED
@@ -1,107 +1,127 @@
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 = 278);
65
- /******/ })
66
- /************************************************************************/
67
- /******/ ({
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ 2183
6
+ (module, __webpack_exports__, __webpack_require__) {
7
+
8
+
9
+ // EXPORTS
10
+ __webpack_require__.d(__webpack_exports__, {
11
+ "default": () => (/* binding */ packages_tabs)
12
+ });
13
+
14
+ ;// ./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js
15
+ var helper_namespaceObject = /*#__PURE__*/__webpack_require__.cjs(function(module, exports) {
16
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=[].concat(d,e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=[].concat(g,h)}else c[b][f]=a[b][f];}else if("hook"===b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
17
+
18
+ });
19
+
20
+ var helper_default = /*#__PURE__*/__webpack_require__.n(helper_namespaceObject);
21
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=template&id=0ec67dad
22
+ var render = function () {
23
+ var _vm = this
24
+ var _h = _vm.$createElement
25
+ var _c = _vm._self._c || _h
26
+ return _c("div", {
27
+ staticClass: "el-tabs__active-bar",
28
+ class: "is-" + _vm.rootTabs.tabPosition,
29
+ style: _vm.barStyle,
30
+ })
31
+ }
32
+ var staticRenderFns = []
33
+ render._withStripped = true
34
+
35
+
36
+ ;// ./packages/tabs/src/tab-bar.vue?vue&type=template&id=0ec67dad
37
+
38
+ ;// external "mazey-element-ui/lib/utils/util"
39
+ const util_namespaceObject = require("mazey-element-ui/lib/utils/util");
40
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js
41
+ //
42
+ //
43
+ //
68
44
 
69
- /***/ 0:
70
- /***/ (function(module, exports) {
71
45
 
46
+ /* harmony default export */ const tab_barvue_type_script_lang_js = ({
47
+ name: 'TabBar',
48
+ props: {
49
+ tabs: Array
50
+ },
51
+ inject: ['rootTabs'],
52
+ computed: {
53
+ barStyle: {
54
+ get: function get() {
55
+ var _this = this;
56
+ var style = {};
57
+ var offset = 0;
58
+ var tabSize = 0;
59
+ var sizeName = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
60
+ var sizeDir = sizeName === 'width' ? 'x' : 'y';
61
+ var firstUpperCase = function firstUpperCase(str) {
62
+ return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
63
+ return L.toUpperCase();
64
+ });
65
+ };
66
+ this.tabs.every(function (tab, index) {
67
+ var $el = (0,util_namespaceObject.arrayFind)(_this.$parent.$refs.tabs || [], function (t) {
68
+ return t.id.replace('tab-', '') === tab.paneName;
69
+ });
70
+ if (!$el) {
71
+ return false;
72
+ }
73
+ if (!tab.active) {
74
+ offset += $el["client" + firstUpperCase(sizeName)];
75
+ return true;
76
+ } else {
77
+ tabSize = $el["client" + firstUpperCase(sizeName)];
78
+ var tabStyles = window.getComputedStyle($el);
79
+ if (sizeName === 'width' && _this.tabs.length > 1) {
80
+ tabSize -= parseFloat(tabStyles.paddingLeft) + parseFloat(tabStyles.paddingRight);
81
+ }
82
+ if (sizeName === 'width') {
83
+ offset += parseFloat(tabStyles.paddingLeft);
84
+ }
85
+ return false;
86
+ }
87
+ });
88
+ var transform = "translate" + firstUpperCase(sizeDir) + "(" + offset + "px)";
89
+ style[sizeName] = tabSize + 'px';
90
+ style.transform = transform;
91
+ style.msTransform = transform;
92
+ style.webkitTransform = transform;
93
+ return style;
94
+ }
95
+ }
96
+ }
97
+ });
98
+ ;// ./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js
99
+ /* harmony default export */ const src_tab_barvue_type_script_lang_js = (tab_barvue_type_script_lang_js);
100
+ ;// ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
72
101
  /* globals __VUE_SSR_CONTEXT__ */
73
102
 
74
- // IMPORTANT: Do NOT use ES2015 features in this file.
103
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
75
104
  // This module is a runtime utility for cleaner component module output and will
76
105
  // be included in the final webpack user bundle.
77
106
 
78
- module.exports = function normalizeComponent (
79
- rawScriptExports,
80
- compiledTemplate,
107
+ function normalizeComponent(
108
+ scriptExports,
109
+ render,
110
+ staticRenderFns,
81
111
  functionalTemplate,
82
112
  injectStyles,
83
113
  scopeId,
84
- moduleIdentifier /* server only */
114
+ moduleIdentifier /* server only */,
115
+ shadowMode /* vue-cli only */
85
116
  ) {
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
117
  // Vue.extend constructor export interop
97
- var options = typeof scriptExports === 'function'
98
- ? scriptExports.options
99
- : scriptExports
118
+ var options =
119
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
100
120
 
101
121
  // render functions
102
- if (compiledTemplate) {
103
- options.render = compiledTemplate.render
104
- options.staticRenderFns = compiledTemplate.staticRenderFns
122
+ if (render) {
123
+ options.render = render
124
+ options.staticRenderFns = staticRenderFns
105
125
  options._compiled = true
106
126
  }
107
127
 
@@ -112,11 +132,12 @@ module.exports = function normalizeComponent (
112
132
 
113
133
  // scopedId
114
134
  if (scopeId) {
115
- options._scopeId = scopeId
135
+ options._scopeId = 'data-v-' + scopeId
116
136
  }
117
137
 
118
138
  var hook
119
- if (moduleIdentifier) { // server build
139
+ if (moduleIdentifier) {
140
+ // server build
120
141
  hook = function (context) {
121
142
  // 2.3 injection
122
143
  context =
@@ -140,396 +161,64 @@ module.exports = function normalizeComponent (
140
161
  // never gets called
141
162
  options._ssrRegister = hook
142
163
  } else if (injectStyles) {
143
- hook = injectStyles
164
+ hook = shadowMode
165
+ ? function () {
166
+ injectStyles.call(
167
+ this,
168
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
169
+ )
170
+ }
171
+ : injectStyles
144
172
  }
145
173
 
146
174
  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 {
175
+ if (options.functional) {
158
176
  // for template-only hot-reload because in that case the render fn doesn't
159
177
  // go through the normalizer
160
178
  options._injectStyles = hook
161
- // register for functioal component in vue file
162
- options.render = function renderWithStyleInjection (h, context) {
179
+ // register for functional component in vue file
180
+ var originalRender = options.render
181
+ options.render = function renderWithStyleInjection(h, context) {
163
182
  hook.call(context)
164
- return existing(h, context)
183
+ return originalRender(h, context)
165
184
  }
185
+ } else {
186
+ // inject component registration as beforeCreate hook
187
+ var existing = options.beforeCreate
188
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
166
189
  }
167
190
  }
168
191
 
169
192
  return {
170
- esModule: esModule,
171
193
  exports: scriptExports,
172
194
  options: options
173
195
  }
174
196
  }
175
197
 
198
+ ;// ./packages/tabs/src/tab-bar.vue
176
199
 
177
- /***/ }),
178
-
179
- /***/ 18:
180
- /***/ (function(module, exports) {
181
-
182
- module.exports = require("element-ui/lib/utils/resize-event");
183
-
184
- /***/ }),
185
-
186
- /***/ 278:
187
- /***/ (function(module, exports, __webpack_require__) {
188
-
189
- "use strict";
190
-
191
-
192
- exports.__esModule = true;
193
-
194
- var _tabs = __webpack_require__(279);
195
-
196
- var _tabs2 = _interopRequireDefault(_tabs);
197
-
198
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
199
200
 
200
- /* istanbul ignore next */
201
- _tabs2.default.install = function (Vue) {
202
- Vue.component(_tabs2.default.name, _tabs2.default);
203
- };
204
201
 
205
- exports.default = _tabs2.default;
206
-
207
- /***/ }),
208
-
209
- /***/ 279:
210
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
211
-
212
- "use strict";
213
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
214
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue__ = __webpack_require__(90);
215
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue__);
216
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
217
- var normalizeComponent = __webpack_require__(0)
218
- /* script */
219
-
220
-
221
- /* template */
222
- var __vue_template__ = null
223
- /* template functional */
224
- var __vue_template_functional__ = false
225
- /* styles */
226
- var __vue_styles__ = null
227
- /* scopeId */
228
- var __vue_scopeId__ = null
229
- /* moduleIdentifier (server only) */
230
- var __vue_module_identifier__ = null
231
- var Component = normalizeComponent(
232
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tabs_vue___default.a,
233
- __vue_template__,
234
- __vue_template_functional__,
235
- __vue_styles__,
236
- __vue_scopeId__,
237
- __vue_module_identifier__
238
- )
239
202
 
240
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
241
-
242
-
243
- /***/ }),
244
-
245
- /***/ 280:
246
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
247
-
248
- "use strict";
249
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
250
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue__ = __webpack_require__(91);
251
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue__);
252
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
253
- var normalizeComponent = __webpack_require__(0)
254
- /* script */
255
-
256
-
257
- /* template */
258
- var __vue_template__ = null
259
- /* template functional */
260
- var __vue_template_functional__ = false
261
- /* styles */
262
- var __vue_styles__ = null
263
- /* scopeId */
264
- var __vue_scopeId__ = null
265
- /* moduleIdentifier (server only) */
266
- var __vue_module_identifier__ = null
267
- var Component = normalizeComponent(
268
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_nav_vue___default.a,
269
- __vue_template__,
270
- __vue_template_functional__,
271
- __vue_styles__,
272
- __vue_scopeId__,
273
- __vue_module_identifier__
274
- )
275
203
 
276
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
277
-
278
-
279
- /***/ }),
280
-
281
- /***/ 281:
282
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
283
-
284
- "use strict";
285
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
286
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue__ = __webpack_require__(92);
287
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue__);
288
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
289
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_90a60718_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_tab_bar_vue__ = __webpack_require__(282);
290
- var normalizeComponent = __webpack_require__(0)
291
- /* script */
292
-
293
-
294
- /* template */
295
-
296
- /* template functional */
297
- var __vue_template_functional__ = false
298
- /* styles */
299
- var __vue_styles__ = null
300
- /* scopeId */
301
- var __vue_scopeId__ = null
302
- /* moduleIdentifier (server only) */
303
- var __vue_module_identifier__ = null
304
- var Component = normalizeComponent(
305
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_tab_bar_vue___default.a,
306
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_90a60718_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_tab_bar_vue__["a" /* default */],
307
- __vue_template_functional__,
308
- __vue_styles__,
309
- __vue_scopeId__,
310
- __vue_module_identifier__
204
+ /* normalize component */
205
+ ;
206
+ var component = normalizeComponent(
207
+ src_tab_barvue_type_script_lang_js,
208
+ render,
209
+ staticRenderFns,
210
+ false,
211
+ null,
212
+ null,
213
+ null
214
+
311
215
  )
312
216
 
313
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
314
-
315
-
316
- /***/ }),
317
-
318
- /***/ 282:
319
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
320
-
321
- "use strict";
322
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"el-tabs__active-bar",class:("is-" + (_vm.rootTabs.tabPosition)),style:(_vm.barStyle)})}
323
- var staticRenderFns = []
324
- var esExports = { render: render, staticRenderFns: staticRenderFns }
325
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
326
-
327
- /***/ }),
328
-
329
- /***/ 90:
330
- /***/ (function(module, exports, __webpack_require__) {
331
-
332
- "use strict";
333
-
334
-
335
- exports.__esModule = true;
336
-
337
- var _tabNav = __webpack_require__(280);
338
-
339
- var _tabNav2 = _interopRequireDefault(_tabNav);
340
-
341
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
342
-
343
- exports.default = {
344
- name: 'ElTabs',
345
-
346
- components: {
347
- TabNav: _tabNav2.default
348
- },
349
-
350
- props: {
351
- type: String,
352
- activeName: String,
353
- closable: Boolean,
354
- addable: Boolean,
355
- value: {},
356
- editable: Boolean,
357
- tabPosition: {
358
- type: String,
359
- default: 'top'
360
- },
361
- beforeLeave: Function
362
- },
363
-
364
- provide: function provide() {
365
- return {
366
- rootTabs: this
367
- };
368
- },
369
- data: function data() {
370
- return {
371
- currentName: this.value || this.activeName,
372
- panes: []
373
- };
374
- },
375
-
376
-
377
- watch: {
378
- activeName: function activeName(value) {
379
- this.setCurrentName(value);
380
- },
381
- value: function value(_value) {
382
- this.setCurrentName(_value);
383
- },
384
- currentName: function currentName(value) {
385
- var _this = this;
386
-
387
- if (this.$refs.nav) {
388
- this.$nextTick(function (_) {
389
- _this.$refs.nav.scrollToActiveTab();
390
- });
391
- }
392
- }
393
- },
394
-
395
- methods: {
396
- handleTabClick: function handleTabClick(tab, tabName, event) {
397
- if (tab.disabled) return;
398
- this.setCurrentName(tabName);
399
- this.$emit('tab-click', tab, event);
400
- },
401
- handleTabRemove: function handleTabRemove(pane, ev) {
402
- if (pane.disabled) return;
403
- ev.stopPropagation();
404
- this.$emit('edit', pane.name, 'remove');
405
- this.$emit('tab-remove', pane.name);
406
- },
407
- handleTabAdd: function handleTabAdd() {
408
- this.$emit('edit', null, 'add');
409
- this.$emit('tab-add');
410
- },
411
- setCurrentName: function setCurrentName(value) {
412
- var _this2 = this;
413
-
414
- var changeCurrentName = function changeCurrentName() {
415
- _this2.currentName = value;
416
- _this2.$emit('input', value);
417
- };
418
- if (this.currentName !== value && this.beforeLeave) {
419
- var before = this.beforeLeave();
420
- if (before && before.then) {
421
- before.then(function () {
422
- changeCurrentName();
423
- });
424
- } else if (before !== false) {
425
- changeCurrentName();
426
- }
427
- } else {
428
- changeCurrentName();
429
- }
430
- },
431
- addPanes: function addPanes(item) {
432
- var index = this.$slots.default.filter(function (item) {
433
- return item.elm.nodeType === 1 && /\bel-tab-pane\b/.test(item.elm.className);
434
- }).indexOf(item.$vnode);
435
- this.panes.splice(index, 0, item);
436
- },
437
- removePanes: function removePanes(item) {
438
- var panes = this.panes;
439
- var index = panes.indexOf(item);
440
- if (index > -1) {
441
- panes.splice(index, 1);
442
- }
443
- }
444
- },
445
- render: function render(h) {
446
- var _ref;
447
-
448
- var type = this.type,
449
- handleTabClick = this.handleTabClick,
450
- handleTabRemove = this.handleTabRemove,
451
- handleTabAdd = this.handleTabAdd,
452
- currentName = this.currentName,
453
- panes = this.panes,
454
- editable = this.editable,
455
- addable = this.addable,
456
- tabPosition = this.tabPosition;
457
-
458
-
459
- var newButton = editable || addable ? h(
460
- 'span',
461
- {
462
- 'class': 'el-tabs__new-tab',
463
- on: {
464
- 'click': handleTabAdd,
465
- 'keydown': function keydown(ev) {
466
- if (ev.keyCode === 13) {
467
- handleTabAdd();
468
- }
469
- }
470
- },
471
- attrs: {
472
- tabindex: '0'
473
- }
474
- },
475
- [h('i', { 'class': 'el-icon-plus' })]
476
- ) : null;
477
-
478
- var navData = {
479
- props: {
480
- currentName: currentName,
481
- onTabClick: handleTabClick,
482
- onTabRemove: handleTabRemove,
483
- editable: editable,
484
- type: type,
485
- panes: panes
486
- },
487
- ref: 'nav'
488
- };
489
- var header = h(
490
- 'div',
491
- { 'class': ['el-tabs__header', 'is-' + tabPosition] },
492
- [newButton, h('tab-nav', navData)]
493
- );
494
- var panels = h(
495
- 'div',
496
- { 'class': 'el-tabs__content' },
497
- [this.$slots.default]
498
- );
499
-
500
- return h(
501
- 'div',
502
- { 'class': (_ref = {
503
- 'el-tabs': true,
504
- 'el-tabs--card': type === 'card'
505
- }, _ref['el-tabs--' + tabPosition] = true, _ref['el-tabs--border-card'] = type === 'border-card', _ref) },
506
- [tabPosition !== 'bottom' ? [header, panels] : [panels, header]]
507
- );
508
- },
509
- created: function created() {
510
- if (!this.currentName) {
511
- this.setCurrentName('0');
512
- }
513
- }
514
- };
515
-
516
- /***/ }),
517
-
518
- /***/ 91:
519
- /***/ (function(module, exports, __webpack_require__) {
520
-
521
- "use strict";
522
-
523
-
524
- exports.__esModule = true;
525
-
526
- var _tabBar = __webpack_require__(281);
527
-
528
- var _tabBar2 = _interopRequireDefault(_tabBar);
529
-
530
- var _resizeEvent = __webpack_require__(18);
217
+ /* harmony default export */ const tab_bar = (component.exports);
218
+ ;// external "mazey-element-ui/lib/utils/resize-event"
219
+ const resize_event_namespaceObject = require("mazey-element-ui/lib/utils/resize-event");
220
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js
531
221
 
532
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
533
222
 
534
223
  function noop() {}
535
224
  var firstUpperCase = function firstUpperCase(str) {
@@ -537,16 +226,12 @@ var firstUpperCase = function firstUpperCase(str) {
537
226
  return L.toUpperCase();
538
227
  });
539
228
  };
540
-
541
- exports.default = {
229
+ /* harmony default export */ const tab_navvue_type_script_lang_js = ({
542
230
  name: 'TabNav',
543
-
544
231
  components: {
545
- TabBar: _tabBar2.default
232
+ TabBar: tab_bar
546
233
  },
547
-
548
234
  inject: ['rootTabs'],
549
-
550
235
  props: {
551
236
  panes: Array,
552
237
  currentName: String,
@@ -559,9 +244,9 @@ exports.default = {
559
244
  type: Function,
560
245
  default: noop
561
246
  },
562
- type: String
247
+ type: String,
248
+ stretch: Boolean
563
249
  },
564
-
565
250
  data: function data() {
566
251
  return {
567
252
  scrollable: false,
@@ -570,40 +255,31 @@ exports.default = {
570
255
  focusable: true
571
256
  };
572
257
  },
573
-
574
-
575
258
  computed: {
576
259
  navStyle: function navStyle() {
577
260
  var dir = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'X' : 'Y';
578
261
  return {
579
- transform: 'translate' + dir + '(-' + this.navOffset + 'px)'
262
+ transform: "translate" + dir + "(-" + this.navOffset + "px)"
580
263
  };
581
264
  },
582
265
  sizeName: function sizeName() {
583
266
  return ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
584
267
  }
585
268
  },
586
-
587
269
  methods: {
588
270
  scrollPrev: function scrollPrev() {
589
- var containerSize = this.$refs.navScroll['offset' + firstUpperCase(this.sizeName)];
271
+ var containerSize = this.$refs.navScroll["offset" + firstUpperCase(this.sizeName)];
590
272
  var currentOffset = this.navOffset;
591
-
592
273
  if (!currentOffset) return;
593
-
594
274
  var newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;
595
-
596
275
  this.navOffset = newOffset;
597
276
  },
598
277
  scrollNext: function scrollNext() {
599
- var navSize = this.$refs.nav['offset' + firstUpperCase(this.sizeName)];
600
- var containerSize = this.$refs.navScroll['offset' + firstUpperCase(this.sizeName)];
278
+ var navSize = this.$refs.nav["offset" + firstUpperCase(this.sizeName)];
279
+ var containerSize = this.$refs.navScroll["offset" + firstUpperCase(this.sizeName)];
601
280
  var currentOffset = this.navOffset;
602
-
603
281
  if (navSize - currentOffset <= containerSize) return;
604
-
605
282
  var newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
606
-
607
283
  this.navOffset = newOffset;
608
284
  },
609
285
  scrollToActiveTab: function scrollToActiveTab() {
@@ -612,30 +288,36 @@ exports.default = {
612
288
  var activeTab = this.$el.querySelector('.is-active');
613
289
  if (!activeTab) return;
614
290
  var navScroll = this.$refs.navScroll;
291
+ var isHorizontal = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1;
615
292
  var activeTabBounding = activeTab.getBoundingClientRect();
616
293
  var navScrollBounding = navScroll.getBoundingClientRect();
617
- var navBounding = nav.getBoundingClientRect();
294
+ var maxOffset = isHorizontal ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
618
295
  var currentOffset = this.navOffset;
619
296
  var newOffset = currentOffset;
620
-
621
- if (activeTabBounding.left < navScrollBounding.left) {
622
- newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
623
- }
624
- if (activeTabBounding.right > navScrollBounding.right) {
625
- newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
626
- }
627
- if (navBounding.right < navScrollBounding.right) {
628
- newOffset = nav.offsetWidth - navScrollBounding.width;
297
+ if (isHorizontal) {
298
+ if (activeTabBounding.left < navScrollBounding.left) {
299
+ newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
300
+ }
301
+ if (activeTabBounding.right > navScrollBounding.right) {
302
+ newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
303
+ }
304
+ } else {
305
+ if (activeTabBounding.top < navScrollBounding.top) {
306
+ newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
307
+ }
308
+ if (activeTabBounding.bottom > navScrollBounding.bottom) {
309
+ newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
310
+ }
629
311
  }
630
- this.navOffset = Math.max(newOffset, 0);
312
+ newOffset = Math.max(newOffset, 0);
313
+ this.navOffset = Math.min(newOffset, maxOffset);
631
314
  },
632
315
  update: function update() {
633
316
  if (!this.$refs.nav) return;
634
317
  var sizeName = this.sizeName;
635
- var navSize = this.$refs.nav['offset' + firstUpperCase(sizeName)];
636
- var containerSize = this.$refs.navScroll['offset' + firstUpperCase(sizeName)];
318
+ var navSize = this.$refs.nav["offset" + firstUpperCase(sizeName)];
319
+ var containerSize = this.$refs.navScroll["offset" + firstUpperCase(sizeName)];
637
320
  var currentOffset = this.navOffset;
638
-
639
321
  if (containerSize < navSize) {
640
322
  var _currentOffset = this.navOffset;
641
323
  this.scrollable = this.scrollable || {};
@@ -653,9 +335,8 @@ exports.default = {
653
335
  },
654
336
  changeTab: function changeTab(e) {
655
337
  var keyCode = e.keyCode;
656
- var nextIndex = void 0;
657
- var currentIndex = void 0,
658
- tabList = void 0;
338
+ var nextIndex;
339
+ var currentIndex, tabList;
659
340
  if ([37, 38, 39, 40].indexOf(keyCode) !== -1) {
660
341
  // 左右上下键更换tab
661
342
  tabList = e.currentTarget.querySelectorAll('[role=tab]');
@@ -694,7 +375,6 @@ exports.default = {
694
375
  },
695
376
  visibilityChangeHandler: function visibilityChangeHandler() {
696
377
  var _this = this;
697
-
698
378
  var visibility = document.visibilityState;
699
379
  if (visibility === 'hidden') {
700
380
  this.focusable = false;
@@ -709,205 +389,454 @@ exports.default = {
709
389
  },
710
390
  windowFocusHandler: function windowFocusHandler() {
711
391
  var _this2 = this;
712
-
713
392
  setTimeout(function () {
714
393
  _this2.focusable = true;
715
394
  }, 50);
716
395
  }
717
396
  },
718
-
719
397
  updated: function updated() {
720
398
  this.update();
721
399
  },
722
400
  render: function render(h) {
723
401
  var _this3 = this;
724
-
725
402
  var type = this.type,
726
- panes = this.panes,
727
- editable = this.editable,
728
- onTabClick = this.onTabClick,
729
- onTabRemove = this.onTabRemove,
730
- navStyle = this.navStyle,
731
- scrollable = this.scrollable,
732
- scrollNext = this.scrollNext,
733
- scrollPrev = this.scrollPrev,
734
- changeTab = this.changeTab,
735
- setFocus = this.setFocus,
736
- removeFocus = this.removeFocus;
737
-
738
- var scrollBtn = scrollable ? [h(
739
- 'span',
740
- { 'class': ['el-tabs__nav-prev', scrollable.prev ? '' : 'is-disabled'], on: {
741
- 'click': scrollPrev
742
- }
743
- },
744
- [h('i', { 'class': 'el-icon-arrow-left' })]
745
- ), h(
746
- 'span',
747
- { 'class': ['el-tabs__nav-next', scrollable.next ? '' : 'is-disabled'], on: {
748
- 'click': scrollNext
749
- }
750
- },
751
- [h('i', { 'class': 'el-icon-arrow-right' })]
752
- )] : null;
753
-
403
+ panes = this.panes,
404
+ editable = this.editable,
405
+ stretch = this.stretch,
406
+ onTabClick = this.onTabClick,
407
+ onTabRemove = this.onTabRemove,
408
+ navStyle = this.navStyle,
409
+ scrollable = this.scrollable,
410
+ scrollNext = this.scrollNext,
411
+ scrollPrev = this.scrollPrev,
412
+ changeTab = this.changeTab,
413
+ setFocus = this.setFocus,
414
+ removeFocus = this.removeFocus;
415
+ var scrollBtn = scrollable ? [h("span", {
416
+ "class": ['el-tabs__nav-prev', scrollable.prev ? '' : 'is-disabled'],
417
+ "on": {
418
+ "click": scrollPrev
419
+ }
420
+ }, [h("i", {
421
+ "class": "el-icon-arrow-left"
422
+ })]), h("span", {
423
+ "class": ['el-tabs__nav-next', scrollable.next ? '' : 'is-disabled'],
424
+ "on": {
425
+ "click": scrollNext
426
+ }
427
+ }, [h("i", {
428
+ "class": "el-icon-arrow-right"
429
+ })])] : null;
754
430
  var tabs = this._l(panes, function (pane, index) {
755
431
  var _ref;
756
-
757
432
  var tabName = pane.name || pane.index || index;
758
433
  var closable = pane.isClosable || editable;
759
-
760
- pane.index = '' + index;
761
-
762
- var btnClose = closable ? h('span', { 'class': 'el-icon-close', on: {
763
- 'click': function click(ev) {
434
+ pane.index = "" + index;
435
+ var btnClose = closable ? h("span", {
436
+ "class": "el-icon-close",
437
+ "on": {
438
+ "click": function click(ev) {
764
439
  onTabRemove(pane, ev);
765
440
  }
766
441
  }
767
442
  }) : null;
768
-
769
443
  var tabLabelContent = pane.$slots.label || pane.label;
770
444
  var tabindex = pane.active ? 0 : -1;
771
- return h(
772
- 'div',
773
- {
774
- 'class': (_ref = {
775
- 'el-tabs__item': true
776
- }, _ref['is-' + _this3.rootTabs.tabPosition] = true, _ref['is-active'] = pane.active, _ref['is-disabled'] = pane.disabled, _ref['is-closable'] = closable, _ref['is-focus'] = _this3.isFocus, _ref),
777
- attrs: { id: 'tab-' + tabName,
778
- 'aria-controls': 'pane-' + tabName,
779
- role: 'tab',
780
- 'aria-selected': pane.active,
781
-
782
- tabindex: tabindex
445
+ return h("div", {
446
+ "class": (_ref = {
447
+ 'el-tabs__item': true
448
+ }, _ref["is-" + _this3.rootTabs.tabPosition] = true, _ref['is-active'] = pane.active, _ref['is-disabled'] = pane.disabled, _ref['is-closable'] = closable, _ref['is-focus'] = _this3.isFocus, _ref),
449
+ "attrs": {
450
+ "id": "tab-" + tabName,
451
+ "aria-controls": "pane-" + tabName,
452
+ "role": "tab",
453
+ "aria-selected": pane.active,
454
+ "tabindex": tabindex
455
+ },
456
+ "key": "tab-" + tabName,
457
+ "ref": "tabs",
458
+ "refInFor": true,
459
+ "on": {
460
+ "focus": function focus() {
461
+ setFocus();
462
+ },
463
+ "blur": function blur() {
464
+ removeFocus();
465
+ },
466
+ "click": function click(ev) {
467
+ removeFocus();
468
+ onTabClick(pane, tabName, ev);
783
469
  },
784
- ref: 'tabs', refInFor: true,
785
- on: {
786
- 'focus': function focus() {
787
- setFocus();
788
- },
789
- 'blur': function blur() {
790
- removeFocus();
791
- },
792
- 'click': function click(ev) {
793
- removeFocus();onTabClick(pane, tabName, ev);
794
- },
795
- 'keydown': function keydown(ev) {
796
- if (closable && (ev.keyCode === 46 || ev.keyCode === 8)) {
797
- onTabRemove(pane, ev);
798
- }
470
+ "keydown": function keydown(ev) {
471
+ if (closable && (ev.keyCode === 46 || ev.keyCode === 8)) {
472
+ onTabRemove(pane, ev);
799
473
  }
800
474
  }
801
- },
802
- [tabLabelContent, btnClose]
803
- );
475
+ }
476
+ }, [tabLabelContent, btnClose]);
804
477
  });
805
- return h(
806
- 'div',
807
- { 'class': ['el-tabs__nav-wrap', scrollable ? 'is-scrollable' : '', 'is-' + this.rootTabs.tabPosition] },
808
- [scrollBtn, h(
809
- 'div',
810
- { 'class': ['el-tabs__nav-scroll'], ref: 'navScroll' },
811
- [h(
812
- 'div',
813
- { 'class': 'el-tabs__nav', ref: 'nav', style: navStyle, attrs: { role: 'tablist' },
814
- on: {
815
- 'keydown': changeTab
816
- }
817
- },
818
- [!type ? h('tab-bar', {
819
- attrs: { tabs: panes }
820
- }) : null, tabs]
821
- )]
822
- )]
823
- );
478
+ return h("div", {
479
+ "class": ['el-tabs__nav-wrap', scrollable ? 'is-scrollable' : '', "is-" + this.rootTabs.tabPosition]
480
+ }, [scrollBtn, h("div", {
481
+ "class": ['el-tabs__nav-scroll'],
482
+ "ref": "navScroll"
483
+ }, [h("div", {
484
+ "class": ['el-tabs__nav', "is-" + this.rootTabs.tabPosition, stretch && ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'is-stretch' : ''],
485
+ "ref": "nav",
486
+ "style": navStyle,
487
+ "attrs": {
488
+ "role": "tablist"
489
+ },
490
+ "on": {
491
+ "keydown": changeTab
492
+ }
493
+ }, [!type ? h("tab-bar", {
494
+ "attrs": {
495
+ "tabs": panes
496
+ }
497
+ }) : null, tabs])])]);
824
498
  },
825
499
  mounted: function mounted() {
826
- (0, _resizeEvent.addResizeListener)(this.$el, this.update);
500
+ var _this4 = this;
501
+ (0,resize_event_namespaceObject.addResizeListener)(this.$el, this.update);
827
502
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
828
503
  window.addEventListener('blur', this.windowBlurHandler);
829
504
  window.addEventListener('focus', this.windowFocusHandler);
505
+ setTimeout(function () {
506
+ _this4.scrollToActiveTab();
507
+ }, 0);
830
508
  },
831
509
  beforeDestroy: function beforeDestroy() {
832
- if (this.$el && this.update) (0, _resizeEvent.removeResizeListener)(this.$el, this.update);
510
+ if (this.$el && this.update) (0,resize_event_namespaceObject.removeResizeListener)(this.$el, this.update);
833
511
  document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
834
512
  window.removeEventListener('blur', this.windowBlurHandler);
835
513
  window.removeEventListener('focus', this.windowFocusHandler);
836
514
  }
837
- };
838
-
839
- /***/ }),
840
-
841
- /***/ 92:
842
- /***/ (function(module, exports, __webpack_require__) {
515
+ });
516
+ ;// ./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js
517
+ /* harmony default export */ const src_tab_navvue_type_script_lang_js = (tab_navvue_type_script_lang_js);
518
+ ;// ./packages/tabs/src/tab-nav.vue
519
+ var tab_nav_render, tab_nav_staticRenderFns
520
+ ;
521
+
522
+
523
+
524
+ /* normalize component */
525
+ ;
526
+ var tab_nav_component = normalizeComponent(
527
+ src_tab_navvue_type_script_lang_js,
528
+ tab_nav_render,
529
+ tab_nav_staticRenderFns,
530
+ false,
531
+ null,
532
+ null,
533
+ null
534
+
535
+ )
843
536
 
844
- "use strict";
537
+ /* harmony default export */ const tab_nav = (tab_nav_component.exports);
538
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/tabs/src/tabs.vue?vue&type=script&lang=js
845
539
 
846
540
 
847
- exports.__esModule = true;
848
- //
849
- //
850
- //
851
-
852
- exports.default = {
853
- name: 'TabBar',
854
-
541
+ /* harmony default export */ const tabsvue_type_script_lang_js = ({
542
+ name: 'ElTabs',
543
+ components: {
544
+ TabNav: tab_nav
545
+ },
855
546
  props: {
856
- tabs: Array
547
+ type: String,
548
+ activeName: String,
549
+ closable: Boolean,
550
+ addable: Boolean,
551
+ value: {},
552
+ editable: Boolean,
553
+ tabPosition: {
554
+ type: String,
555
+ default: 'top'
556
+ },
557
+ beforeLeave: Function,
558
+ stretch: Boolean
857
559
  },
858
-
859
- inject: ['rootTabs'],
860
-
861
- computed: {
862
- barStyle: {
863
- cache: false,
864
- get: function get() {
865
- var _this = this;
866
-
867
- if (!this.$parent.$refs.tabs) return {};
868
- var style = {};
869
- var offset = 0;
870
- var tabSize = 0;
871
- var sizeName = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
872
- var sizeDir = sizeName === 'width' ? 'x' : 'y';
873
- var firstUpperCase = function firstUpperCase(str) {
874
- return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
875
- return L.toUpperCase();
560
+ provide: function provide() {
561
+ return {
562
+ rootTabs: this
563
+ };
564
+ },
565
+ data: function data() {
566
+ return {
567
+ currentName: this.value || this.activeName,
568
+ panes: []
569
+ };
570
+ },
571
+ watch: {
572
+ activeName: function activeName(value) {
573
+ this.setCurrentName(value);
574
+ },
575
+ value: function value(_value) {
576
+ this.setCurrentName(_value);
577
+ },
578
+ currentName: function currentName(value) {
579
+ var _this = this;
580
+ if (this.$refs.nav) {
581
+ this.$nextTick(function () {
582
+ _this.$refs.nav.$nextTick(function (_) {
583
+ _this.$refs.nav.scrollToActiveTab();
876
584
  });
877
- };
878
- this.tabs.every(function (tab, index) {
879
- var $el = _this.$parent.$refs.tabs[index];
880
- if (!$el) {
881
- return false;
882
- }
883
-
884
- if (!tab.active) {
885
- offset += $el['client' + firstUpperCase(sizeName)];
886
- return true;
887
- } else {
888
- tabSize = $el['client' + firstUpperCase(sizeName)];
889
- if (sizeName === 'width' && _this.tabs.length > 1) {
890
- tabSize -= index === 0 || index === _this.tabs.length - 1 ? 20 : 40;
891
- }
892
- return false;
893
- }
894
585
  });
895
-
896
- if (sizeName === 'width' && offset !== 0) {
897
- offset += 20;
586
+ }
587
+ }
588
+ },
589
+ methods: {
590
+ calcPaneInstances: function calcPaneInstances(isForceUpdate) {
591
+ var _this2 = this;
592
+ if (isForceUpdate === void 0) {
593
+ isForceUpdate = false;
594
+ }
595
+ if (this.$slots.default) {
596
+ var paneSlots = this.$slots.default.filter(function (vnode) {
597
+ return vnode.tag && vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'ElTabPane';
598
+ });
599
+ // update indeed
600
+ var panes = paneSlots.map(function (_ref) {
601
+ var componentInstance = _ref.componentInstance;
602
+ return componentInstance;
603
+ });
604
+ var panesChanged = !(panes.length === this.panes.length && panes.every(function (pane, index) {
605
+ return pane === _this2.panes[index];
606
+ }));
607
+ if (isForceUpdate || panesChanged) {
608
+ this.panes = panes;
898
609
  }
899
- var transform = 'translate' + firstUpperCase(sizeDir) + '(' + offset + 'px)';
900
- style[sizeName] = tabSize + 'px';
901
- style.transform = transform;
902
- style.msTransform = transform;
903
- style.webkitTransform = transform;
904
-
905
- return style;
610
+ } else if (this.panes.length !== 0) {
611
+ this.panes = [];
612
+ }
613
+ },
614
+ handleTabClick: function handleTabClick(tab, tabName, event) {
615
+ if (tab.disabled) return;
616
+ this.setCurrentName(tabName);
617
+ this.$emit('tab-click', tab, event);
618
+ },
619
+ handleTabRemove: function handleTabRemove(pane, ev) {
620
+ if (pane.disabled) return;
621
+ ev.stopPropagation();
622
+ this.$emit('edit', pane.name, 'remove');
623
+ this.$emit('tab-remove', pane.name);
624
+ },
625
+ handleTabAdd: function handleTabAdd() {
626
+ this.$emit('edit', null, 'add');
627
+ this.$emit('tab-add');
628
+ },
629
+ setCurrentName: function setCurrentName(value) {
630
+ var _this3 = this;
631
+ var changeCurrentName = function changeCurrentName() {
632
+ _this3.currentName = value;
633
+ _this3.$emit('input', value);
634
+ };
635
+ if (this.currentName !== value && this.beforeLeave) {
636
+ var before = this.beforeLeave(value, this.currentName);
637
+ if (before && before.then) {
638
+ before.then(function () {
639
+ changeCurrentName();
640
+ _this3.$refs.nav && _this3.$refs.nav.removeFocus();
641
+ }, function () {
642
+ // https://github.com/ElemeFE/element/pull/14816
643
+ // ignore promise rejection in `before-leave` hook
644
+ });
645
+ } else if (before !== false) {
646
+ changeCurrentName();
647
+ }
648
+ } else {
649
+ changeCurrentName();
906
650
  }
907
651
  }
652
+ },
653
+ render: function render(h) {
654
+ var _ref2;
655
+ var type = this.type,
656
+ handleTabClick = this.handleTabClick,
657
+ handleTabRemove = this.handleTabRemove,
658
+ handleTabAdd = this.handleTabAdd,
659
+ currentName = this.currentName,
660
+ panes = this.panes,
661
+ editable = this.editable,
662
+ addable = this.addable,
663
+ tabPosition = this.tabPosition,
664
+ stretch = this.stretch;
665
+ var newButton = editable || addable ? h("span", {
666
+ "class": "el-tabs__new-tab",
667
+ "on": {
668
+ "click": handleTabAdd,
669
+ "keydown": function keydown(ev) {
670
+ if (ev.keyCode === 13) {
671
+ handleTabAdd();
672
+ }
673
+ }
674
+ },
675
+ "attrs": {
676
+ "tabindex": "0"
677
+ }
678
+ }, [h("i", {
679
+ "class": "el-icon-plus"
680
+ })]) : null;
681
+ var navData = {
682
+ props: {
683
+ currentName: currentName,
684
+ onTabClick: handleTabClick,
685
+ onTabRemove: handleTabRemove,
686
+ editable: editable,
687
+ type: type,
688
+ panes: panes,
689
+ stretch: stretch
690
+ },
691
+ ref: 'nav'
692
+ };
693
+ var header = h("div", {
694
+ "class": ['el-tabs__header', "is-" + tabPosition]
695
+ }, [newButton, h("tab-nav", helper_default()([{}, navData]))]);
696
+ var panels = h("div", {
697
+ "class": "el-tabs__content"
698
+ }, [this.$slots.default]);
699
+ return h("div", {
700
+ "class": (_ref2 = {
701
+ 'el-tabs': true,
702
+ 'el-tabs--card': type === 'card'
703
+ }, _ref2["el-tabs--" + tabPosition] = true, _ref2['el-tabs--border-card'] = type === 'border-card', _ref2)
704
+ }, [tabPosition !== 'bottom' ? [header, panels] : [panels, header]]);
705
+ },
706
+ created: function created() {
707
+ if (!this.currentName) {
708
+ this.setCurrentName('0');
709
+ }
710
+ this.$on('tab-nav-update', this.calcPaneInstances.bind(null, true));
711
+ },
712
+ mounted: function mounted() {
713
+ this.calcPaneInstances();
714
+ },
715
+ updated: function updated() {
716
+ this.calcPaneInstances();
908
717
  }
718
+ });
719
+ ;// ./packages/tabs/src/tabs.vue?vue&type=script&lang=js
720
+ /* harmony default export */ const src_tabsvue_type_script_lang_js = (tabsvue_type_script_lang_js);
721
+ ;// ./packages/tabs/src/tabs.vue
722
+ var tabs_render, tabs_staticRenderFns
723
+ ;
724
+
725
+
726
+
727
+ /* normalize component */
728
+ ;
729
+ var tabs_component = normalizeComponent(
730
+ src_tabsvue_type_script_lang_js,
731
+ tabs_render,
732
+ tabs_staticRenderFns,
733
+ false,
734
+ null,
735
+ null,
736
+ null
737
+
738
+ )
739
+
740
+ /* harmony default export */ const tabs = (tabs_component.exports);
741
+ ;// ./packages/tabs/index.js
742
+
743
+
744
+ /* istanbul ignore next */
745
+ tabs.install = function (Vue) {
746
+ Vue.component(tabs.name, tabs);
909
747
  };
748
+ /* harmony default export */ const packages_tabs = (tabs);
910
749
 
911
- /***/ })
750
+ /***/ }
912
751
 
913
- /******/ });
752
+ /******/ });
753
+ /************************************************************************/
754
+ /******/ // The module cache
755
+ /******/ const __webpack_module_cache__ = {};
756
+ /******/
757
+ /******/ // The require function
758
+ /******/ function __webpack_require__(moduleId) {
759
+ /******/ // Check if module is in cache
760
+ /******/ const cachedModule = __webpack_module_cache__[moduleId];
761
+ /******/ if (cachedModule !== undefined) {
762
+ /******/ return cachedModule.exports;
763
+ /******/ }
764
+ /******/ // Create a new module (and put it into the cache)
765
+ /******/ const module = __webpack_module_cache__[moduleId] = {
766
+ /******/ // no module.id needed
767
+ /******/ // no module.loaded needed
768
+ /******/ exports: {}
769
+ /******/ };
770
+ /******/
771
+ /******/ // Execute the module function
772
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
773
+ /******/
774
+ /******/ // Return the exports of the module
775
+ /******/ return module.exports;
776
+ /******/ }
777
+ /******/
778
+ /************************************************************************/
779
+ /******/ /* webpack/runtime/compat get default export */
780
+ /******/ (() => {
781
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
782
+ /******/ __webpack_require__.n = (module) => {
783
+ /******/ const getter = module && module.__esModule ?
784
+ /******/ () => (module['default']) :
785
+ /******/ () => (module);
786
+ /******/ __webpack_require__.d(getter, { a: getter });
787
+ /******/ return getter;
788
+ /******/ };
789
+ /******/ })();
790
+ /******/
791
+ /******/ /* webpack/runtime/define property getters */
792
+ /******/ (() => {
793
+ /******/ // define getter/value functions for harmony exports
794
+ /******/ __webpack_require__.d = (exports, definition) => {
795
+ /******/ if(Array.isArray(definition)) {
796
+ /******/ var i = 0;
797
+ /******/ while(i < definition.length) {
798
+ /******/ var key = definition[i++];
799
+ /******/ var binding = definition[i++];
800
+ /******/ if(!__webpack_require__.o(exports, key)) {
801
+ /******/ if(binding === 0) {
802
+ /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
803
+ /******/ } else {
804
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
805
+ /******/ }
806
+ /******/ } else if(binding === 0) { i++; }
807
+ /******/ }
808
+ /******/ } else {
809
+ /******/ for(var key in definition) {
810
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
811
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
812
+ /******/ }
813
+ /******/ }
814
+ /******/ }
815
+ /******/ };
816
+ /******/ })();
817
+ /******/
818
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
819
+ /******/ (() => {
820
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
821
+ /******/ })();
822
+ /******/
823
+ /******/ /* webpack/runtime/wrap commonjs module */
824
+ /******/ (() => {
825
+ /******/ // execute a CommonJS module body with real module/exports objects, returning the final exports
826
+ /******/ __webpack_require__.cjs = (body) => {
827
+ /******/ const mod = { exports: {} };
828
+ /******/ body.call(mod.exports, mod, mod.exports);
829
+ /******/ return mod.exports;
830
+ /******/ };
831
+ /******/ })();
832
+ /******/
833
+ /************************************************************************/
834
+ /******/
835
+ /******/ // startup
836
+ /******/ // Load entry module and return exports
837
+ /******/ // This entry module used 'module' so it can't be inlined
838
+ /******/ let __webpack_exports__ = __webpack_require__(2183);
839
+ /******/ module.exports = __webpack_exports__["default"];
840
+ /******/
841
+ /******/ })()
842
+ ;