cy-element-ui 1.1.25 → 1.1.27

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 (665) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +265 -42
  3. package/lib/Alert.js +420 -0
  4. package/lib/Aside.js +277 -0
  5. package/lib/Autocomplete.js +2051 -0
  6. package/lib/Avatar.js +363 -0
  7. package/lib/Backtop.js +404 -0
  8. package/lib/Badge.js +334 -0
  9. package/lib/Breadcrumb.js +293 -0
  10. package/lib/BreadcrumbItem.js +322 -0
  11. package/lib/Button.js +357 -0
  12. package/lib/ButtonGroup.js +262 -0
  13. package/lib/Calendar.js +1146 -0
  14. package/lib/Card.js +297 -0
  15. package/lib/Carousel.js +707 -0
  16. package/lib/CarouselItem.js +434 -0
  17. package/lib/Cascader.js +4641 -0
  18. package/lib/CascaderPanel.js +2602 -0
  19. package/lib/Checkbox.js +627 -0
  20. package/lib/CheckboxButton.js +583 -0
  21. package/lib/CheckboxGroup.js +313 -0
  22. package/lib/Col.js +177 -0
  23. package/lib/Collapse.js +329 -0
  24. package/lib/CollapseItem.js +497 -0
  25. package/lib/ColorPicker.js +2885 -0
  26. package/lib/Container.js +288 -0
  27. package/lib/CySelectDisplayInput.js +383 -0
  28. package/lib/CySubTitle.js +304 -0
  29. package/lib/CyTabDialog.js +1228 -0
  30. package/lib/CyTreeSelect.js +4524 -0
  31. package/lib/DatePicker.js +7574 -0
  32. package/lib/Descriptions.js +457 -0
  33. package/lib/DescriptionsItem.js +140 -0
  34. package/lib/Dialog.js +598 -0
  35. package/lib/Divider.js +313 -0
  36. package/lib/Drawer.js +592 -0
  37. package/lib/Dropdown.js +856 -0
  38. package/lib/DropdownItem.js +316 -0
  39. package/lib/DropdownMenu.js +351 -0
  40. package/lib/Empty.js +730 -0
  41. package/lib/Footer.js +277 -0
  42. package/lib/Form.js +466 -0
  43. package/lib/FormItem.js +826 -0
  44. package/lib/Header.js +277 -0
  45. package/lib/Icon.js +265 -0
  46. package/lib/Image.js +1138 -0
  47. package/lib/InfiniteScroll.js +301 -0
  48. package/lib/Input.js +999 -0
  49. package/lib/InputNumber.js +1552 -0
  50. package/lib/Link.js +332 -0
  51. package/lib/Loading.js +631 -0
  52. package/lib/Main.js +264 -0
  53. package/lib/Menu.js +865 -0
  54. package/lib/MenuItem.js +818 -0
  55. package/lib/MenuItemGroup.js +308 -0
  56. package/lib/Message.js +548 -0
  57. package/lib/MessageBox.js +2134 -0
  58. package/lib/Notification.js +615 -0
  59. package/lib/Option.js +474 -0
  60. package/lib/OptionGroup.js +344 -0
  61. package/lib/PageHeader.js +319 -0
  62. package/lib/Pagination.js +4123 -0
  63. package/lib/Popconfirm.js +1025 -0
  64. package/lib/Popover.js +617 -0
  65. package/lib/Progress.js +595 -0
  66. package/lib/Radio.js +497 -0
  67. package/lib/RadioButton.js +463 -0
  68. package/lib/RadioGroup.js +391 -0
  69. package/lib/Rate.js +670 -0
  70. package/lib/Result.js +578 -0
  71. package/lib/Row.js +149 -0
  72. package/lib/Scrollbar.js +423 -0
  73. package/lib/Select.js +3368 -0
  74. package/lib/Skeleton.js +372 -0
  75. package/lib/SkeletonItem.js +342 -0
  76. package/lib/Slider.js +2854 -0
  77. package/lib/Spinner.js +301 -0
  78. package/lib/Statistic.js +533 -0
  79. package/lib/Step.js +522 -0
  80. package/lib/Steps.js +342 -0
  81. package/lib/Submenu.js +700 -0
  82. package/lib/Switch.js +554 -0
  83. package/lib/TabPane.js +332 -0
  84. package/lib/Table.js +6125 -0
  85. package/lib/TableColumn.js +1481 -0
  86. package/lib/Tabs.js +920 -0
  87. package/lib/Tag.js +304 -0
  88. package/lib/TimePicker.js +4059 -0
  89. package/lib/TimeSelect.js +2871 -0
  90. package/lib/Timeline.js +275 -0
  91. package/lib/TimelineItem.js +371 -0
  92. package/lib/Tooltip.js +425 -0
  93. package/lib/Transfer.js +2557 -0
  94. package/lib/Tree.js +2680 -0
  95. package/lib/Upload.js +1782 -0
  96. package/lib/directives/mousewheel.js +26 -0
  97. package/lib/directives/repeat-click.js +33 -0
  98. package/lib/element-ui.common.js +294 -248
  99. package/lib/index.js +2 -2
  100. package/lib/locale/format.js +55 -0
  101. package/lib/locale/index.js +63 -0
  102. package/lib/locale/lang/zh-CN.js +126 -0
  103. package/lib/mixins/emitter.js +36 -0
  104. package/lib/mixins/focus.js +15 -0
  105. package/lib/mixins/locale.js +17 -0
  106. package/lib/mixins/migrating.js +69 -0
  107. package/lib/theme-chalk/alert.css +1 -1
  108. package/lib/theme-chalk/button.css +1 -1
  109. package/lib/theme-chalk/calendar.css +1 -1
  110. package/lib/theme-chalk/cascader-panel.css +1 -1
  111. package/lib/theme-chalk/cascader.css +1 -1
  112. package/lib/theme-chalk/checkbox.css +1 -1
  113. package/lib/theme-chalk/color-picker.css +1 -1
  114. package/lib/theme-chalk/date-picker.css +1 -1
  115. package/lib/theme-chalk/dropdown.css +1 -1
  116. package/lib/theme-chalk/icon.css +1 -1
  117. package/lib/theme-chalk/index.css +1 -1
  118. package/lib/theme-chalk/link.css +1 -1
  119. package/lib/theme-chalk/menu.css +1 -1
  120. package/lib/theme-chalk/message-box.css +1 -1
  121. package/lib/theme-chalk/message.css +1 -1
  122. package/lib/theme-chalk/pagination.css +1 -1
  123. package/lib/theme-chalk/reset.css +1 -1
  124. package/lib/theme-chalk/select-dropdown.css +1 -1
  125. package/lib/theme-chalk/select.css +1 -1
  126. package/lib/theme-chalk/table-column.css +1 -1
  127. package/lib/theme-chalk/table.css +1 -1
  128. package/lib/theme-chalk/tag.css +1 -1
  129. package/lib/theme-chalk/time-picker.css +1 -1
  130. package/lib/theme-chalk/transfer.css +1 -1
  131. package/lib/theme-chalk/tree.css +1 -1
  132. package/lib/transitions/collapse-transition.js +91 -0
  133. package/lib/umd/locale/zh-CN.js +142 -0
  134. package/lib/utils/after-leave.js +35 -0
  135. package/lib/utils/aria-dialog.js +104 -0
  136. package/lib/utils/aria-utils.js +126 -0
  137. package/lib/utils/clickoutside.js +79 -0
  138. package/lib/utils/date-util.js +310 -0
  139. package/lib/utils/date.js +369 -0
  140. package/lib/utils/dom.js +234 -0
  141. package/lib/utils/lodash.js +9421 -0
  142. package/lib/utils/menu/aria-menubar.js +24 -0
  143. package/lib/utils/menu/aria-menuitem.js +62 -0
  144. package/lib/utils/menu/aria-submenu.js +69 -0
  145. package/lib/utils/merge.js +21 -0
  146. package/lib/utils/popper.js +1261 -0
  147. package/lib/utils/popup/index.js +233 -0
  148. package/lib/utils/popup/popup-manager.js +205 -0
  149. package/lib/utils/resize-event.js +59 -0
  150. package/lib/utils/scroll-into-view.js +38 -0
  151. package/lib/utils/scrollbar-width.js +39 -0
  152. package/lib/utils/shared.js +12 -0
  153. package/lib/utils/types.js +52 -0
  154. package/lib/utils/util.js +272 -0
  155. package/lib/utils/vdom.js +13 -0
  156. package/lib/utils/vue-popper.js +202 -0
  157. package/package.json +123 -135
  158. package/packages/alert/index.js +8 -8
  159. package/packages/alert/src/main.vue +94 -94
  160. package/packages/aside/index.js +8 -8
  161. package/packages/aside/src/main.vue +20 -20
  162. package/packages/autocomplete/index.js +8 -8
  163. package/packages/autocomplete/src/autocomplete-suggestions.vue +76 -76
  164. package/packages/autocomplete/src/autocomplete.vue +285 -285
  165. package/packages/avatar/index.js +8 -8
  166. package/packages/avatar/src/main.vue +107 -107
  167. package/packages/backtop/index.js +8 -8
  168. package/packages/backtop/src/main.vue +110 -110
  169. package/packages/badge/index.js +8 -8
  170. package/packages/badge/src/main.vue +53 -53
  171. package/packages/breadcrumb/index.js +8 -8
  172. package/packages/breadcrumb/src/breadcrumb-item.vue +41 -41
  173. package/packages/breadcrumb/src/breadcrumb.vue +34 -34
  174. package/packages/breadcrumb-item/index.js +8 -8
  175. package/packages/button/index.js +8 -8
  176. package/packages/button/src/button-group.vue +10 -10
  177. package/packages/button/src/button.vue +78 -78
  178. package/packages/button-group/index.js +8 -8
  179. package/packages/calendar/index.js +8 -8
  180. package/packages/calendar/src/date-table.vue +200 -200
  181. package/packages/calendar/src/main.vue +280 -280
  182. package/packages/card/index.js +8 -8
  183. package/packages/card/src/main.vue +23 -23
  184. package/packages/carousel/index.js +8 -8
  185. package/packages/carousel/src/item.vue +138 -138
  186. package/packages/carousel/src/main.vue +315 -315
  187. package/packages/carousel-item/index.js +8 -8
  188. package/packages/cascader/index.js +8 -8
  189. package/packages/cascader/src/cascader.vue +663 -663
  190. package/packages/cascader-panel/index.js +8 -8
  191. package/packages/cascader-panel/src/cascader-menu.vue +138 -138
  192. package/packages/cascader-panel/src/cascader-node.vue +246 -246
  193. package/packages/cascader-panel/src/cascader-panel.vue +391 -391
  194. package/packages/cascader-panel/src/node.js +165 -165
  195. package/packages/cascader-panel/src/store.js +57 -57
  196. package/packages/checkbox/index.js +8 -8
  197. package/packages/checkbox/src/checkbox-button.vue +199 -199
  198. package/packages/checkbox/src/checkbox-group.vue +48 -48
  199. package/packages/checkbox/src/checkbox.vue +222 -222
  200. package/packages/checkbox-button/index.js +8 -8
  201. package/packages/checkbox-group/index.js +8 -8
  202. package/packages/col/index.js +9 -9
  203. package/packages/col/src/col.js +71 -71
  204. package/packages/collapse/index.js +9 -9
  205. package/packages/collapse/src/collapse-item.vue +114 -114
  206. package/packages/collapse/src/collapse.vue +73 -73
  207. package/packages/collapse-item/index.js +8 -8
  208. package/packages/color-picker/index.js +8 -8
  209. package/packages/color-picker/src/color.js +317 -317
  210. package/packages/color-picker/src/components/alpha-slider.vue +132 -132
  211. package/packages/color-picker/src/components/hue-slider.vue +123 -123
  212. package/packages/color-picker/src/components/picker-dropdown.vue +121 -121
  213. package/packages/color-picker/src/components/predefine.vue +61 -61
  214. package/packages/color-picker/src/components/sv-panel.vue +100 -100
  215. package/packages/color-picker/src/draggable.js +36 -36
  216. package/packages/color-picker/src/main.vue +188 -188
  217. package/packages/container/index.js +8 -8
  218. package/packages/container/src/main.vue +33 -33
  219. package/packages/cy/selectDisplayInput/index.js +8 -8
  220. package/packages/cy/selectDisplayInput/src/main.vue +23 -11
  221. package/packages/cy/subTitle/index.js +7 -7
  222. package/packages/cy/subTitle/src/main.vue +9 -0
  223. package/packages/cy/tabDialog/index.js +23 -23
  224. package/packages/cy/tabDialog/src/dialog/drag.js +63 -63
  225. package/packages/cy/tabDialog/src/dialog/dragHeight.js +34 -34
  226. package/packages/cy/tabDialog/src/dialog/dragWidth.js +30 -30
  227. package/packages/cy/tabDialog/src/main.vue +61 -23
  228. package/packages/cy/treeSelect/index.js +7 -7
  229. package/packages/cy/treeSelect/src/main.vue +93 -5
  230. package/packages/date-picker/index.js +8 -8
  231. package/packages/date-picker/src/basic/date-table.vue +441 -441
  232. package/packages/date-picker/src/basic/month-table.vue +268 -268
  233. package/packages/date-picker/src/basic/time-spinner.vue +304 -304
  234. package/packages/date-picker/src/basic/year-table.vue +111 -111
  235. package/packages/date-picker/src/panel/date-range.vue +680 -680
  236. package/packages/date-picker/src/panel/date.vue +609 -609
  237. package/packages/date-picker/src/panel/month-range.vue +289 -289
  238. package/packages/date-picker/src/panel/time-range.vue +248 -248
  239. package/packages/date-picker/src/panel/time-select.vue +178 -178
  240. package/packages/date-picker/src/panel/time.vue +186 -186
  241. package/packages/date-picker/src/picker/date-picker.js +43 -43
  242. package/packages/date-picker/src/picker/time-picker.js +39 -39
  243. package/packages/date-picker/src/picker/time-select.js +21 -21
  244. package/packages/date-picker/src/picker.vue +956 -956
  245. package/packages/descriptions/index.js +8 -8
  246. package/packages/descriptions/src/descriptions-item.js +30 -30
  247. package/packages/descriptions/src/descriptions-row.js +116 -116
  248. package/packages/descriptions/src/index.js +180 -180
  249. package/packages/descriptions-item/index.js +8 -8
  250. package/packages/dialog/index.js +8 -8
  251. package/packages/dialog/src/component.vue +212 -212
  252. package/packages/divider/index.js +8 -8
  253. package/packages/divider/src/main.vue +37 -37
  254. package/packages/drawer/index.js +8 -8
  255. package/packages/drawer/src/main.vue +205 -205
  256. package/packages/dropdown/index.js +8 -8
  257. package/packages/dropdown/src/dropdown-item.vue +37 -37
  258. package/packages/dropdown/src/dropdown-menu.vue +63 -63
  259. package/packages/dropdown/src/dropdown.vue +293 -293
  260. package/packages/dropdown-item/index.js +8 -8
  261. package/packages/dropdown-menu/index.js +8 -8
  262. package/packages/empty/index.js +7 -7
  263. package/packages/empty/src/img-empty.vue +132 -132
  264. package/packages/empty/src/index.vue +50 -50
  265. package/packages/footer/index.js +8 -8
  266. package/packages/footer/src/main.vue +20 -20
  267. package/packages/form/index.js +8 -8
  268. package/packages/form/src/form-item.vue +324 -324
  269. package/packages/form/src/form.vue +182 -182
  270. package/packages/form/src/label-wrap.vue +78 -78
  271. package/packages/form-item/index.js +8 -8
  272. package/packages/header/index.js +8 -8
  273. package/packages/header/src/main.vue +20 -20
  274. package/packages/icon/index.js +8 -8
  275. package/packages/icon/src/icon.vue +13 -13
  276. package/packages/image/index.js +8 -8
  277. package/packages/image/src/image-viewer.vue +330 -330
  278. package/packages/image/src/main.vue +249 -249
  279. package/packages/infinite-scroll/index.js +8 -8
  280. package/packages/infinite-scroll/src/main.js +149 -149
  281. package/packages/input/index.js +8 -8
  282. package/packages/input/src/calcTextareaHeight.js +104 -104
  283. package/packages/input/src/input.vue +440 -440
  284. package/packages/input-number/index.js +8 -8
  285. package/packages/input-number/src/input-number.vue +286 -286
  286. package/packages/link/index.js +8 -8
  287. package/packages/link/src/main.vue +53 -53
  288. package/packages/loading/index.js +11 -11
  289. package/packages/loading/src/directive.js +133 -133
  290. package/packages/loading/src/index.js +106 -106
  291. package/packages/loading/src/loading.vue +41 -41
  292. package/packages/main/index.js +8 -8
  293. package/packages/main/src/main.vue +12 -12
  294. package/packages/menu/index.js +8 -8
  295. package/packages/menu/src/menu-item-group.vue +45 -45
  296. package/packages/menu/src/menu-item.vue +112 -112
  297. package/packages/menu/src/menu-mixin.js +44 -44
  298. package/packages/menu/src/menu.vue +325 -325
  299. package/packages/menu/src/submenu.vue +348 -348
  300. package/packages/menu-item/index.js +8 -8
  301. package/packages/menu-item-group/index.js +8 -8
  302. package/packages/message/index.js +2 -2
  303. package/packages/message/src/main.js +91 -91
  304. package/packages/message/src/main.vue +117 -117
  305. package/packages/message-box/index.js +2 -2
  306. package/packages/message-box/src/main.js +216 -216
  307. package/packages/message-box/src/main.vue +332 -332
  308. package/packages/notification/index.js +2 -2
  309. package/packages/notification/src/main.js +94 -94
  310. package/packages/notification/src/main.vue +152 -152
  311. package/packages/option/index.js +8 -8
  312. package/packages/option-group/index.js +8 -8
  313. package/packages/page-header/index.js +8 -8
  314. package/packages/page-header/src/main.vue +30 -30
  315. package/packages/pagination/index.js +8 -8
  316. package/packages/pagination/src/pager.vue +163 -163
  317. package/packages/pagination/src/pagination.js +386 -386
  318. package/packages/popconfirm/index.js +8 -8
  319. package/packages/popconfirm/src/main.vue +104 -104
  320. package/packages/popover/index.js +14 -14
  321. package/packages/popover/src/directive.js +20 -20
  322. package/packages/popover/src/main.vue +237 -237
  323. package/packages/progress/index.js +8 -8
  324. package/packages/progress/src/progress.vue +235 -235
  325. package/packages/radio/index.js +8 -8
  326. package/packages/radio/src/radio-button.vue +115 -115
  327. package/packages/radio/src/radio-group.vue +113 -113
  328. package/packages/radio/src/radio.vue +134 -134
  329. package/packages/radio-button/index.js +8 -8
  330. package/packages/radio-group/index.js +8 -8
  331. package/packages/rate/index.js +8 -8
  332. package/packages/rate/src/main.vue +348 -348
  333. package/packages/result/index.js +8 -8
  334. package/packages/result/src/icon-error.vue +13 -13
  335. package/packages/result/src/icon-info.vue +13 -13
  336. package/packages/result/src/icon-success.vue +13 -13
  337. package/packages/result/src/icon-warning.vue +13 -13
  338. package/packages/result/src/index.vue +65 -65
  339. package/packages/row/index.js +9 -9
  340. package/packages/row/src/row.js +44 -44
  341. package/packages/scrollbar/index.js +8 -8
  342. package/packages/scrollbar/src/bar.js +92 -92
  343. package/packages/scrollbar/src/main.js +130 -130
  344. package/packages/scrollbar/src/util.js +34 -34
  345. package/packages/select/index.js +8 -8
  346. package/packages/select/src/navigation-mixin.js +54 -54
  347. package/packages/select/src/option-group.vue +60 -60
  348. package/packages/select/src/option.vue +168 -168
  349. package/packages/select/src/select-dropdown.vue +74 -74
  350. package/packages/select/src/select.vue +900 -900
  351. package/packages/skeleton/index.js +8 -8
  352. package/packages/skeleton/src/img-placeholder.vue +16 -16
  353. package/packages/skeleton/src/index.vue +76 -76
  354. package/packages/skeleton/src/item.vue +22 -22
  355. package/packages/skeleton-item/index.js +8 -8
  356. package/packages/slider/index.js +8 -8
  357. package/packages/slider/src/button.vue +238 -238
  358. package/packages/slider/src/main.vue +427 -427
  359. package/packages/slider/src/marker.js +18 -18
  360. package/packages/spinner/index.js +8 -8
  361. package/packages/spinner/src/spinner.vue +27 -27
  362. package/packages/statistic/index.js +8 -8
  363. package/packages/statistic/src/main.vue +203 -203
  364. package/packages/step/index.js +8 -8
  365. package/packages/steps/README.md +69 -69
  366. package/packages/steps/index.js +8 -8
  367. package/packages/steps/src/step.vue +184 -184
  368. package/packages/steps/src/steps.vue +68 -68
  369. package/packages/submenu/index.js +8 -8
  370. package/packages/switch/index.js +9 -9
  371. package/packages/switch/src/component.vue +174 -174
  372. package/packages/tab-pane/index.js +8 -8
  373. package/packages/table/index.js +8 -8
  374. package/packages/table/src/config.js +124 -124
  375. package/packages/table/src/dropdown.js +28 -28
  376. package/packages/table/src/filter-panel.vue +194 -194
  377. package/packages/table/src/layout-observer.js +68 -68
  378. package/packages/table/src/store/current.js +76 -76
  379. package/packages/table/src/store/expand.js +65 -65
  380. package/packages/table/src/store/helper.js +41 -41
  381. package/packages/table/src/store/index.js +147 -147
  382. package/packages/table/src/store/tree.js +209 -209
  383. package/packages/table/src/store/watcher.js +381 -381
  384. package/packages/table/src/table-body.js +469 -469
  385. package/packages/table/src/table-column.js +319 -319
  386. package/packages/table/src/table-footer.js +153 -153
  387. package/packages/table/src/table-header.js +511 -511
  388. package/packages/table/src/table-layout.js +249 -249
  389. package/packages/table/src/table-row.js +101 -101
  390. package/packages/table/src/table.vue +712 -712
  391. package/packages/table/src/util.js +273 -273
  392. package/packages/table-column/index.js +8 -8
  393. package/packages/tabs/index.js +8 -8
  394. package/packages/tabs/src/tab-bar.vue +57 -57
  395. package/packages/tabs/src/tab-nav.vue +294 -294
  396. package/packages/tabs/src/tab-pane.vue +56 -56
  397. package/packages/tabs/src/tabs.vue +191 -191
  398. package/packages/tag/index.js +8 -8
  399. package/packages/tag/src/tag.vue +58 -58
  400. package/packages/theme-chalk/README.md +33 -33
  401. package/packages/theme-chalk/gulpfile.js +24 -24
  402. package/packages/theme-chalk/package.json +35 -35
  403. package/packages/theme-chalk/src/alert.scss +147 -147
  404. package/packages/theme-chalk/src/aside.scss +7 -7
  405. package/packages/theme-chalk/src/autocomplete.scss +80 -80
  406. package/packages/theme-chalk/src/avatar.scss +51 -51
  407. package/packages/theme-chalk/src/backtop.scss +22 -22
  408. package/packages/theme-chalk/src/badge.scss +57 -57
  409. package/packages/theme-chalk/src/base.scss +2 -2
  410. package/packages/theme-chalk/src/breadcrumb.scss +55 -55
  411. package/packages/theme-chalk/src/button.scss +262 -262
  412. package/packages/theme-chalk/src/calendar.scss +79 -79
  413. package/packages/theme-chalk/src/card.scss +32 -32
  414. package/packages/theme-chalk/src/carousel-item.scss +49 -49
  415. package/packages/theme-chalk/src/carousel.scss +161 -161
  416. package/packages/theme-chalk/src/cascader-panel.scss +120 -120
  417. package/packages/theme-chalk/src/cascader.scss +182 -182
  418. package/packages/theme-chalk/src/checkbox.scss +359 -359
  419. package/packages/theme-chalk/src/col.scss +155 -155
  420. package/packages/theme-chalk/src/collapse.scss +63 -63
  421. package/packages/theme-chalk/src/color-picker.scss +384 -384
  422. package/packages/theme-chalk/src/common/popup.scss +42 -42
  423. package/packages/theme-chalk/src/common/transition.scss +98 -98
  424. package/packages/theme-chalk/src/common/var.scss +1028 -1028
  425. package/packages/theme-chalk/src/container.scss +14 -14
  426. package/packages/theme-chalk/src/cy/base.scss +3 -3
  427. package/packages/theme-chalk/src/cy/index.scss +5 -6
  428. package/packages/theme-chalk/src/cy/selectDisplayInput.scss +75 -75
  429. package/packages/theme-chalk/src/cy/subTitle.scss +26 -26
  430. package/packages/theme-chalk/src/cy/tabDialog.scss +43 -43
  431. package/packages/theme-chalk/src/cy/treeSelect.scss +131 -131
  432. package/packages/theme-chalk/src/date-picker/date-picker.scss +97 -97
  433. package/packages/theme-chalk/src/date-picker/date-range-picker.scss +101 -101
  434. package/packages/theme-chalk/src/date-picker/date-table.scss +151 -151
  435. package/packages/theme-chalk/src/date-picker/month-table.scss +82 -82
  436. package/packages/theme-chalk/src/date-picker/picker-panel.scss +117 -117
  437. package/packages/theme-chalk/src/date-picker/picker.scss +197 -197
  438. package/packages/theme-chalk/src/date-picker/time-picker.scss +85 -85
  439. package/packages/theme-chalk/src/date-picker/time-range-picker.scss +31 -31
  440. package/packages/theme-chalk/src/date-picker/time-spinner.scss +110 -110
  441. package/packages/theme-chalk/src/date-picker/year-table.scss +51 -51
  442. package/packages/theme-chalk/src/date-picker.scss +11 -11
  443. package/packages/theme-chalk/src/descriptions-item.scss +42 -42
  444. package/packages/theme-chalk/src/descriptions.scss +111 -111
  445. package/packages/theme-chalk/src/dialog.scss +123 -123
  446. package/packages/theme-chalk/src/display.scss +12 -12
  447. package/packages/theme-chalk/src/divider.scss +46 -46
  448. package/packages/theme-chalk/src/drawer.scss +219 -219
  449. package/packages/theme-chalk/src/dropdown.scss +182 -182
  450. package/packages/theme-chalk/src/empty.scss +45 -45
  451. package/packages/theme-chalk/src/footer.scss +8 -8
  452. package/packages/theme-chalk/src/form.scss +167 -167
  453. package/packages/theme-chalk/src/header.scss +8 -8
  454. package/packages/theme-chalk/src/icon.scss +1167 -1167
  455. package/packages/theme-chalk/src/image.scss +179 -179
  456. package/packages/theme-chalk/src/input-number.scss +261 -261
  457. package/packages/theme-chalk/src/input.scss +360 -360
  458. package/packages/theme-chalk/src/link.scss +81 -81
  459. package/packages/theme-chalk/src/loading.scss +96 -96
  460. package/packages/theme-chalk/src/main.scss +12 -12
  461. package/packages/theme-chalk/src/menu.scss +289 -289
  462. package/packages/theme-chalk/src/message-box.scss +226 -226
  463. package/packages/theme-chalk/src/message.scss +120 -120
  464. package/packages/theme-chalk/src/mixins/_button.scss +81 -81
  465. package/packages/theme-chalk/src/mixins/config.scss +4 -4
  466. package/packages/theme-chalk/src/mixins/function.scss +44 -44
  467. package/packages/theme-chalk/src/mixins/mixins.scss +191 -191
  468. package/packages/theme-chalk/src/mixins/utils.scss +38 -38
  469. package/packages/theme-chalk/src/notification.scss +99 -99
  470. package/packages/theme-chalk/src/option-group.scss +42 -42
  471. package/packages/theme-chalk/src/option.scss +36 -36
  472. package/packages/theme-chalk/src/page-header.scss +41 -41
  473. package/packages/theme-chalk/src/pagination.scss +295 -295
  474. package/packages/theme-chalk/src/popconfirm.scss +16 -16
  475. package/packages/theme-chalk/src/popover.scss +40 -40
  476. package/packages/theme-chalk/src/popper.scss +100 -100
  477. package/packages/theme-chalk/src/progress.scss +141 -141
  478. package/packages/theme-chalk/src/radio-button.scss +113 -113
  479. package/packages/theme-chalk/src/radio-group.scss +9 -9
  480. package/packages/theme-chalk/src/radio.scss +199 -199
  481. package/packages/theme-chalk/src/rate.scss +49 -49
  482. package/packages/theme-chalk/src/reset.scss +79 -79
  483. package/packages/theme-chalk/src/result.scss +61 -61
  484. package/packages/theme-chalk/src/row.scss +43 -43
  485. package/packages/theme-chalk/src/scrollbar.scss +72 -72
  486. package/packages/theme-chalk/src/select-dropdown.scss +62 -62
  487. package/packages/theme-chalk/src/select.scss +152 -152
  488. package/packages/theme-chalk/src/skeleton-item.scss +84 -84
  489. package/packages/theme-chalk/src/skeleton.scss +40 -40
  490. package/packages/theme-chalk/src/slider.scss +250 -250
  491. package/packages/theme-chalk/src/spinner.scss +44 -44
  492. package/packages/theme-chalk/src/statistic.scss +38 -38
  493. package/packages/theme-chalk/src/step.scss +317 -317
  494. package/packages/theme-chalk/src/steps.scss +20 -20
  495. package/packages/theme-chalk/src/switch.scss +116 -116
  496. package/packages/theme-chalk/src/table-column.scss +96 -96
  497. package/packages/theme-chalk/src/table.scss +564 -564
  498. package/packages/theme-chalk/src/tabs.scss +602 -602
  499. package/packages/theme-chalk/src/tag.scss +163 -163
  500. package/packages/theme-chalk/src/time-picker.scss +8 -8
  501. package/packages/theme-chalk/src/time-select.scss +37 -37
  502. package/packages/theme-chalk/src/timeline-item.scss +86 -86
  503. package/packages/theme-chalk/src/timeline.scss +14 -14
  504. package/packages/theme-chalk/src/tooltip.scss +141 -141
  505. package/packages/theme-chalk/src/transfer.scss +227 -227
  506. package/packages/theme-chalk/src/tree.scss +123 -123
  507. package/packages/theme-chalk/src/upload.scss +603 -603
  508. package/packages/time-picker/index.js +8 -8
  509. package/packages/time-select/index.js +8 -8
  510. package/packages/timeline/index.js +8 -8
  511. package/packages/timeline/src/item.vue +73 -73
  512. package/packages/timeline/src/main.vue +33 -33
  513. package/packages/timeline-item/index.js +8 -8
  514. package/packages/tooltip/index.js +8 -8
  515. package/packages/tooltip/src/main.js +242 -242
  516. package/packages/transfer/index.js +8 -8
  517. package/packages/transfer/src/main.vue +231 -231
  518. package/packages/transfer/src/transfer-panel.vue +251 -251
  519. package/packages/tree/index.js +8 -8
  520. package/packages/tree/src/model/node.js +484 -484
  521. package/packages/tree/src/model/tree-store.js +340 -340
  522. package/packages/tree/src/model/util.js +27 -27
  523. package/packages/tree/src/tree-node.vue +279 -279
  524. package/packages/tree/src/tree.vue +496 -496
  525. package/packages/upload/index.js +8 -8
  526. package/packages/upload/src/ajax.js +85 -85
  527. package/packages/upload/src/index.vue +338 -338
  528. package/packages/upload/src/upload-dragger.vue +70 -70
  529. package/packages/upload/src/upload-list.vue +105 -105
  530. package/packages/upload/src/upload.vue +211 -211
  531. package/src/directives/mousewheel.js +18 -18
  532. package/src/directives/repeat-click.js +26 -26
  533. package/src/index.js +4 -7
  534. package/src/locale/format.js +45 -45
  535. package/src/locale/index.js +48 -48
  536. package/src/locale/lang/zh-CN.js +123 -123
  537. package/src/mixins/emitter.js +33 -33
  538. package/src/mixins/focus.js +9 -9
  539. package/src/mixins/locale.js +9 -9
  540. package/src/mixins/migrating.js +54 -54
  541. package/src/transitions/collapse-transition.js +77 -77
  542. package/src/utils/after-leave.js +27 -27
  543. package/src/utils/aria-dialog.js +90 -90
  544. package/src/utils/aria-utils.js +122 -122
  545. package/src/utils/clickoutside.js +76 -76
  546. package/src/utils/date-util.js +282 -282
  547. package/src/utils/date.js +368 -368
  548. package/src/utils/dom.js +227 -227
  549. package/src/utils/lodash.js +18075 -18075
  550. package/src/utils/menu/aria-menubar.js +14 -14
  551. package/src/utils/menu/aria-menuitem.js +49 -49
  552. package/src/utils/menu/aria-submenu.js +59 -59
  553. package/src/utils/merge.js +15 -15
  554. package/src/utils/popper.js +1276 -1276
  555. package/src/utils/popup/index.js +218 -218
  556. package/src/utils/popup/popup-manager.js +194 -194
  557. package/src/utils/resize-event.js +36 -36
  558. package/src/utils/scroll-into-view.js +27 -27
  559. package/src/utils/scrollbar-width.js +29 -29
  560. package/src/utils/shared.js +7 -7
  561. package/src/utils/types.js +40 -40
  562. package/src/utils/util.js +245 -245
  563. package/src/utils/vdom.js +5 -5
  564. package/src/utils/vue-popper.js +198 -198
  565. package/types/alert.d.ts +31 -31
  566. package/types/aside.d.ts +7 -7
  567. package/types/autocomplete.d.ts +78 -78
  568. package/types/avatar.d.ts +20 -20
  569. package/types/backtop.d.ts +16 -16
  570. package/types/badge.d.ts +16 -16
  571. package/types/breadcrumb-item.d.ts +10 -10
  572. package/types/breadcrumb.d.ts +10 -10
  573. package/types/button-group.d.ts +4 -4
  574. package/types/button.d.ts +37 -37
  575. package/types/calendar.d.ts +15 -15
  576. package/types/card.d.ts +26 -26
  577. package/types/carousel-item.d.ts +10 -10
  578. package/types/carousel.d.ts +57 -57
  579. package/types/cascader-panel.d.ts +72 -72
  580. package/types/cascader.d.ts +65 -65
  581. package/types/checkbox-button.d.ts +22 -22
  582. package/types/checkbox-group.d.ts +22 -22
  583. package/types/checkbox.d.ts +34 -34
  584. package/types/col.d.ts +46 -46
  585. package/types/collapse-item.d.ts +26 -26
  586. package/types/collapse.d.ts +10 -10
  587. package/types/color-picker.d.ts +21 -21
  588. package/types/component.d.ts +13 -13
  589. package/types/container.d.ts +7 -7
  590. package/types/cy/cy-element-ui.d.ts +0 -4
  591. package/types/date-picker.d.ts +124 -124
  592. package/types/descriptions-item.d.ts +37 -37
  593. package/types/descriptions.d.ts +52 -52
  594. package/types/dialog.d.ts +62 -62
  595. package/types/divider.d.ts +12 -12
  596. package/types/drawer.d.ts +63 -63
  597. package/types/dropdown-item.d.ts +16 -16
  598. package/types/dropdown-menu.d.ts +4 -4
  599. package/types/dropdown.d.ts +38 -38
  600. package/types/empty.d.ts +31 -31
  601. package/types/footer.d.ts +7 -7
  602. package/types/form-item.d.ts +37 -37
  603. package/types/form.d.ts +82 -82
  604. package/types/header.d.ts +7 -7
  605. package/types/icon.d.ts +7 -7
  606. package/types/image.d.ts +43 -43
  607. package/types/index.d.ts +5 -5
  608. package/types/infinite-scroll.d.ts +5 -5
  609. package/types/input-number.d.ts +47 -47
  610. package/types/input.d.ts +107 -107
  611. package/types/link.d.ts +25 -25
  612. package/types/loading.d.ts +62 -62
  613. package/types/main.d.ts +4 -4
  614. package/types/menu-item-group.d.ts +7 -7
  615. package/types/menu-item.d.ts +10 -10
  616. package/types/menu.d.ts +46 -46
  617. package/types/message-box.d.ts +176 -176
  618. package/types/message.d.ts +90 -90
  619. package/types/notification.d.ts +84 -84
  620. package/types/option-group.d.ts +10 -10
  621. package/types/option.d.ts +13 -13
  622. package/types/page-header.d.ts +10 -10
  623. package/types/pagination.d.ts +43 -43
  624. package/types/popconfirm.d.ts +29 -29
  625. package/types/popover.d.ts +71 -71
  626. package/types/progress.d.ts +37 -37
  627. package/types/radio-button.d.ts +16 -16
  628. package/types/radio-group.d.ts +18 -18
  629. package/types/radio.d.ts +19 -19
  630. package/types/rate.d.ts +64 -64
  631. package/types/result.d.ts +33 -33
  632. package/types/row.d.ts +25 -25
  633. package/types/select.d.ts +90 -90
  634. package/types/skeleton-item.d.ts +7 -7
  635. package/types/skeleton.d.ts +33 -33
  636. package/types/slider.d.ts +68 -68
  637. package/types/spinner.d.ts +16 -16
  638. package/types/statistic.d.ts +37 -37
  639. package/types/step.d.ts +34 -34
  640. package/types/steps.d.ts +28 -28
  641. package/types/submenu.d.ts +22 -22
  642. package/types/switch.d.ts +43 -43
  643. package/types/tab-pane.d.ts +19 -19
  644. package/types/table-column.d.ts +117 -117
  645. package/types/table.d.ts +177 -177
  646. package/types/tabs.d.ts +31 -31
  647. package/types/tag.d.ts +28 -28
  648. package/types/time-picker.d.ts +63 -63
  649. package/types/time-select.d.ts +56 -56
  650. package/types/timeline-item.d.ts +20 -20
  651. package/types/timeline.d.ts +6 -6
  652. package/types/tooltip.d.ts +52 -52
  653. package/types/transfer.d.ts +73 -73
  654. package/types/tree.d.ts +266 -266
  655. package/types/upload.d.ts +124 -124
  656. package/web-types.json +4910 -4195
  657. package/lib/theme-chalk/testComponent.css +0 -1
  658. package/packages/cy/testComponent/index.js +0 -8
  659. package/packages/cy/testComponent/src/main.vue +0 -44
  660. package/packages/examples/demo-styles/cy/testComponent.scss +0 -3
  661. package/packages/examples/docs/en-US/cy/cy-testComponent.md +0 -1
  662. package/packages/examples/docs/zh-CN/cy/cy-testComponent.md +0 -1
  663. package/packages/packages/theme-chalk/src/cy/testComponent.scss +0 -4
  664. package/packages/theme-chalk/src/cy/testComponent.scss +0 -76
  665. package/types/cy/test-component.d.ts +0 -7
@@ -0,0 +1,4524 @@
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, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 119);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 0:
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
+ /* globals __VUE_SSR_CONTEXT__ */
96
+
97
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
+ // This module is a runtime utility for cleaner component module output and will
99
+ // be included in the final webpack user bundle.
100
+
101
+ function normalizeComponent(
102
+ scriptExports,
103
+ render,
104
+ staticRenderFns,
105
+ functionalTemplate,
106
+ injectStyles,
107
+ scopeId,
108
+ moduleIdentifier /* server only */,
109
+ shadowMode /* vue-cli only */
110
+ ) {
111
+ // Vue.extend constructor export interop
112
+ var options =
113
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
114
+
115
+ // render functions
116
+ if (render) {
117
+ options.render = render
118
+ options.staticRenderFns = staticRenderFns
119
+ options._compiled = true
120
+ }
121
+
122
+ // functional template
123
+ if (functionalTemplate) {
124
+ options.functional = true
125
+ }
126
+
127
+ // scopedId
128
+ if (scopeId) {
129
+ options._scopeId = 'data-v-' + scopeId
130
+ }
131
+
132
+ var hook
133
+ if (moduleIdentifier) {
134
+ // server build
135
+ hook = function (context) {
136
+ // 2.3 injection
137
+ context =
138
+ context || // cached call
139
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
140
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
+ // 2.2 with runInNewContext: true
142
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
+ context = __VUE_SSR_CONTEXT__
144
+ }
145
+ // inject component styles
146
+ if (injectStyles) {
147
+ injectStyles.call(this, context)
148
+ }
149
+ // register component module identifier for async chunk inferrence
150
+ if (context && context._registeredComponents) {
151
+ context._registeredComponents.add(moduleIdentifier)
152
+ }
153
+ }
154
+ // used by ssr in case component is cached and beforeCreate
155
+ // never gets called
156
+ options._ssrRegister = hook
157
+ } else if (injectStyles) {
158
+ hook = shadowMode
159
+ ? function () {
160
+ injectStyles.call(
161
+ this,
162
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
163
+ )
164
+ }
165
+ : injectStyles
166
+ }
167
+
168
+ if (hook) {
169
+ if (options.functional) {
170
+ // for template-only hot-reload because in that case the render fn doesn't
171
+ // go through the normalizer
172
+ options._injectStyles = hook
173
+ // register for functional component in vue file
174
+ var originalRender = options.render
175
+ options.render = function renderWithStyleInjection(h, context) {
176
+ hook.call(context)
177
+ return originalRender(h, context)
178
+ }
179
+ } else {
180
+ // inject component registration as beforeCreate hook
181
+ var existing = options.beforeCreate
182
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
+ }
184
+ }
185
+
186
+ return {
187
+ exports: scriptExports,
188
+ options: options
189
+ }
190
+ }
191
+
192
+
193
+ /***/ }),
194
+
195
+ /***/ 1:
196
+ /***/ (function(module, exports) {
197
+
198
+ module.exports = require("element-ui/lib/utils/dom");
199
+
200
+ /***/ }),
201
+
202
+ /***/ 11:
203
+ /***/ (function(module, exports) {
204
+
205
+ module.exports = require("element-ui/lib/utils/shared");
206
+
207
+ /***/ }),
208
+
209
+ /***/ 119:
210
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
211
+
212
+ "use strict";
213
+ // ESM COMPAT FLAG
214
+ __webpack_require__.r(__webpack_exports__);
215
+
216
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cy/treeSelect/src/main.vue?vue&type=template&id=139d556a
217
+ var render = function () {
218
+ var _vm = this
219
+ var _h = _vm.$createElement
220
+ var _c = _vm._self._c || _h
221
+ return _c(
222
+ "div",
223
+ { staticClass: "cy-tree-select" },
224
+ [
225
+ _c(
226
+ "el-popover",
227
+ {
228
+ attrs: {
229
+ placement: "bottom-start",
230
+ width: "300",
231
+ trigger: "click",
232
+ "popper-class": _vm.popperClass,
233
+ },
234
+ on: {
235
+ show: function ($event) {
236
+ _vm.popoverOpen = true
237
+ },
238
+ hide: function ($event) {
239
+ _vm.popoverOpen = false
240
+ },
241
+ },
242
+ model: {
243
+ value: _vm.popoverOpen,
244
+ callback: function ($$v) {
245
+ _vm.popoverOpen = $$v
246
+ },
247
+ expression: "popoverOpen",
248
+ },
249
+ },
250
+ [
251
+ _c("div", { staticClass: "cy-tree-select-select-con" }, [
252
+ _vm.filterable
253
+ ? _c(
254
+ "div",
255
+ { staticClass: "cy-tree-select-select-con-s" },
256
+ [
257
+ _c("el-input", {
258
+ attrs: {
259
+ placeholder: "搜索",
260
+ "prefix-icon": "el-icon-search",
261
+ clearable: "",
262
+ size: "small",
263
+ },
264
+ model: {
265
+ value: _vm.filterText,
266
+ callback: function ($$v) {
267
+ _vm.filterText = $$v
268
+ },
269
+ expression: "filterText",
270
+ },
271
+ }),
272
+ ],
273
+ 1
274
+ )
275
+ : _vm._e(),
276
+ _vm.showCheckStrictly && _vm.multiple
277
+ ? _c(
278
+ "div",
279
+ { staticClass: "cy-tree-select-select-con-t" },
280
+ [
281
+ _c(
282
+ "el-checkbox",
283
+ {
284
+ model: {
285
+ value: _vm.isCheckStrictly,
286
+ callback: function ($$v) {
287
+ _vm.isCheckStrictly = $$v
288
+ },
289
+ expression: "isCheckStrictly",
290
+ },
291
+ },
292
+ [_vm._v("父子节点联动")]
293
+ ),
294
+ ],
295
+ 1
296
+ )
297
+ : _vm._e(),
298
+ _c(
299
+ "div",
300
+ { staticClass: "cy-tree-select-select-con-c" },
301
+ [
302
+ _c("el-tree", {
303
+ ref: "tree",
304
+ attrs: {
305
+ data: _vm.treeOptions,
306
+ "show-checkbox": _vm.multiple,
307
+ "node-key": _vm.defaultOptions.id,
308
+ "check-strictly": !_vm.isCheckStrictly,
309
+ props: _vm.defaultOptions,
310
+ "expand-on-click-node": false,
311
+ "default-expand-all": _vm.defaultExpandAll,
312
+ "filter-node-method": _vm.filterNode,
313
+ },
314
+ on: { check: _vm.treeCheck, "node-click": _vm.treeClick },
315
+ }),
316
+ ],
317
+ 1
318
+ ),
319
+ ]),
320
+ _c(
321
+ "div",
322
+ {
323
+ staticClass: "cy-tree-select-select",
324
+ class: _vm.size,
325
+ style: _vm.vStyle,
326
+ attrs: { slot: "reference" },
327
+ slot: "reference",
328
+ },
329
+ [
330
+ _c("div", { staticClass: "cy-tree-select-select-v" }, [
331
+ _vm.checkedArr.length < 1
332
+ ? _c(
333
+ "span",
334
+ { staticClass: "cy-tree-select-select-v-placeholder" },
335
+ [_vm._v(_vm._s(_vm.placeholder))]
336
+ )
337
+ : _c("span", [
338
+ _vm._v(
339
+ _vm._s(
340
+ _vm.checkedArr
341
+ .map(function (item) {
342
+ return item[_vm.defaultOptions.label]
343
+ })
344
+ .join()
345
+ )
346
+ ),
347
+ ]),
348
+ ]),
349
+ _c(
350
+ "div",
351
+ {
352
+ staticClass: "cy-tree-select-select-v-icon",
353
+ on: {
354
+ mouseenter: function ($event) {
355
+ _vm.isClearIcon = true
356
+ },
357
+ mouseleave: function ($event) {
358
+ _vm.isClearIcon = false
359
+ },
360
+ },
361
+ },
362
+ [
363
+ _vm.isClearIcon && _vm.clearable
364
+ ? _c("i", {
365
+ staticClass: "el-icon-circle-close",
366
+ on: {
367
+ click: function ($event) {
368
+ $event.stopPropagation()
369
+ return _vm.handleClear($event)
370
+ },
371
+ },
372
+ })
373
+ : _c("i", {
374
+ staticClass:
375
+ "el-icon-arrow-down cy-tree-select-select-v-arrow",
376
+ class: {
377
+ "cy-tree-select-select-v-arrow-show": _vm.popoverOpen,
378
+ },
379
+ }),
380
+ ]
381
+ ),
382
+ ]
383
+ ),
384
+ ]
385
+ ),
386
+ ],
387
+ 1
388
+ )
389
+ }
390
+ var staticRenderFns = []
391
+ render._withStripped = true
392
+
393
+
394
+ // CONCATENATED MODULE: ./packages/cy/treeSelect/src/main.vue?vue&type=template&id=139d556a
395
+
396
+ // EXTERNAL MODULE: ./packages/checkbox/index.js + 5 modules
397
+ var packages_checkbox = __webpack_require__(16);
398
+
399
+ // EXTERNAL MODULE: ./packages/popover/index.js + 6 modules
400
+ var popover = __webpack_require__(36);
401
+
402
+ // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
403
+ var input = __webpack_require__(13);
404
+
405
+ // EXTERNAL MODULE: ./packages/tree/index.js + 13 modules
406
+ var tree = __webpack_require__(46);
407
+
408
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cy/treeSelect/src/main.vue?vue&type=script&lang=js
409
+ //
410
+ //
411
+ //
412
+ //
413
+ //
414
+ //
415
+ //
416
+ //
417
+ //
418
+ //
419
+ //
420
+ //
421
+ //
422
+ //
423
+ //
424
+ //
425
+ //
426
+ //
427
+ //
428
+ //
429
+ //
430
+ //
431
+ //
432
+ //
433
+ //
434
+ //
435
+ //
436
+ //
437
+ //
438
+ //
439
+ //
440
+ //
441
+ //
442
+ //
443
+ //
444
+ //
445
+ //
446
+ //
447
+ //
448
+ //
449
+ //
450
+ //
451
+ //
452
+ //
453
+ //
454
+ //
455
+ //
456
+ //
457
+ //
458
+ //
459
+ //
460
+ //
461
+ //
462
+ //
463
+ //
464
+ //
465
+ //
466
+ //
467
+
468
+ // 引入 Element UI 底层组件,避免走全量注册
469
+
470
+
471
+
472
+
473
+
474
+ /* harmony default export */ var mainvue_type_script_lang_js = ({
475
+ name: 'CyTreeSelect',
476
+ components: {
477
+ ElCheckbox: packages_checkbox["default"],
478
+ ElPopover: popover["default"],
479
+ ElInput: input["default"],
480
+ ElTree: tree["default"]
481
+ },
482
+ // 自定义 v-model:使用 value 作为 prop,change 作为回调事件
483
+ model: {
484
+ prop: 'value',
485
+ event: 'change'
486
+ },
487
+ props: {
488
+ // 绑定值:单选时为节点 id(String/Number),多选时为 id 数组
489
+ value: {
490
+ type: [String, Number, Array],
491
+ default: ''
492
+ },
493
+
494
+ // 树形数据源(children 嵌套结构)
495
+ options: {
496
+ type: Array,
497
+ default: []
498
+ },
499
+
500
+ // 未选中时的占位提示文本
501
+ placeholder: {
502
+ type: String,
503
+ default: ''
504
+ },
505
+
506
+ // 组件尺寸(medium / small / mini)
507
+ size: {
508
+ type: String
509
+ },
510
+
511
+ // 是否显示搜索过滤输入框
512
+ filterable: {
513
+ type: Boolean,
514
+ default: false
515
+ },
516
+
517
+ // 是否显示「父子节点联动」开关
518
+ showCheckStrictly: {
519
+ type: Boolean,
520
+ default: true
521
+ },
522
+
523
+ // 父子节点是否互相关联(默认联动)
524
+ checkStrictly: {
525
+ type: Boolean,
526
+ default: true
527
+ },
528
+
529
+ // 是否显示清空按钮
530
+ clearable: {
531
+ type: Boolean,
532
+ default: false
533
+ },
534
+
535
+ // 是否多选模式(多选时树节点带 checkbox)
536
+ multiple: {
537
+ type: Boolean,
538
+ default: false
539
+ },
540
+
541
+ // 树节点字段映射配置:指定 id / label / children 对应的字段名
542
+ defaultOptions: {
543
+ type: Object,
544
+ default: function _default() {
545
+ return {
546
+ children: 'children',
547
+ label: 'label',
548
+ id: 'id'
549
+ };
550
+ }
551
+ },
552
+
553
+ // 触发区域(reference)的自定义样式
554
+ vStyle: {
555
+ type: [Array, String, Object],
556
+ default: ''
557
+ },
558
+
559
+ // 弹出层自定义类名
560
+ popperClass: {
561
+ type: String,
562
+ default: ''
563
+ },
564
+
565
+ // 是否默认展开所有节点
566
+ defaultExpandAll: {
567
+ type: Boolean,
568
+ default: false
569
+ }
570
+ },
571
+ data: function data() {
572
+ return {
573
+ // 当前是否父子联动(受 checkStrictly 控制)
574
+ isCheckStrictly: true,
575
+ // 弹出层是否展开
576
+ popoverOpen: false,
577
+ // 鼠标是否悬浮在图标区(控制清空/箭头图标切换)
578
+ isClearIcon: false,
579
+
580
+ // 原始树数据(来自 options)
581
+ treeOptions: [],
582
+ // 扁平化后的树数据(便于按 id 反查节点)
583
+ treeArr: [],
584
+ // 搜索关键字
585
+ filterText: '',
586
+ // 搜索命中的节点 id 集合
587
+ matchedNodeIds: []
588
+ };
589
+ },
590
+
591
+ computed: {
592
+ /**
593
+ * 根据 value 反查当前选中节点对象数组,用于回显文本
594
+ * @returns {Array} 选中节点对象数组
595
+ */
596
+ checkedArr: function checkedArr() {
597
+ var _this = this;
598
+
599
+ if (this.multiple) {
600
+ var arr = [];
601
+ this.value && this.value.forEach(function (id) {
602
+ var cItem = _this.treeArr.filter(function (tItem) {
603
+ return tItem[_this.defaultOptions.id] === id;
604
+ })[0];
605
+ if (cItem) arr.push(cItem);
606
+ });
607
+ return arr;
608
+ } else {
609
+ var cItem = this.treeArr.filter(function (tItem) {
610
+ return tItem[_this.defaultOptions.id] === Number(_this.value);
611
+ })[0];
612
+ return cItem ? [cItem] : [];
613
+ }
614
+ }
615
+ },
616
+ watch: {
617
+ // 监听 checkStrictly:同步到内部状态 isCheckStrictly
618
+ checkStrictly: {
619
+ immediate: true,
620
+ handler: function handler() {
621
+ this.isCheckStrictly = this.checkStrictly;
622
+ }
623
+ },
624
+
625
+ // 监听 value:变化时重新设置树节点的勾选状态
626
+ value: {
627
+ immediate: true,
628
+ deep: true,
629
+ handler: function handler() {
630
+ var _this2 = this;
631
+
632
+ this.$nextTick(function () {
633
+ _this2.init();
634
+ });
635
+ }
636
+ },
637
+
638
+ // 监听 options:数据变化时重新扁平化
639
+ options: {
640
+ deep: true,
641
+ immediate: true,
642
+ handler: function handler() {
643
+ this.treeOptions = this.options;
644
+ this.treeArr = this.turnFormatTreeData([], this.treeOptions, 0);
645
+ }
646
+ },
647
+
648
+ // 监听搜索关键字:过滤树节点并自动展开命中节点
649
+ filterText: function filterText(val) {
650
+ var _this3 = this;
651
+
652
+ if (val) {
653
+ this.matchedNodeIds = this.findMatchedNodes(val, this.treeOptions);
654
+ this.$refs.tree.filter(val);
655
+ this.$nextTick(function () {
656
+ _this3.expandMatchedNodes();
657
+ });
658
+ } else {
659
+ this.matchedNodeIds = [];
660
+ this.$refs.tree.filter(val);
661
+ }
662
+ }
663
+ },
664
+ created: function created() {},
665
+
666
+ methods: {
667
+ /**
668
+ * 树节点过滤方法:根据命中 id 集合决定节点是否显示
669
+ * @param {*} value - 搜索关键字
670
+ * @param {Object} data - 当前树节点数据
671
+ * @returns {boolean}
672
+ */
673
+ filterNode: function filterNode(value, data) {
674
+ if (!value) return true;
675
+ return this.matchedNodeIds.includes(data[this.defaultOptions.id]);
676
+ },
677
+
678
+
679
+ /**
680
+ * 递归查找名称包含关键字的节点 id(父节点命中则连带子节点)
681
+ * @param {*} value - 搜索关键字
682
+ * @param {Array} nodes - 待查找的树节点数组
683
+ * @param {boolean} [parentMatched=false] - 父节点是否已命中
684
+ * @returns {Array<number>} 命中节点 id 集合
685
+ */
686
+ findMatchedNodes: function findMatchedNodes(value, nodes) {
687
+ var _this4 = this;
688
+
689
+ var parentMatched = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
690
+
691
+ var matchedIds = [];
692
+
693
+ nodes.forEach(function (node) {
694
+ var currentNodeMatched = node[_this4.defaultOptions.label].indexOf(value) !== -1;
695
+ var shouldShow = currentNodeMatched || parentMatched;
696
+
697
+ if (shouldShow) {
698
+ matchedIds.push(node[_this4.defaultOptions.id]);
699
+ }
700
+
701
+ if (node[_this4.defaultOptions.children] && node[_this4.defaultOptions.children].length > 0) {
702
+ var childIds = _this4.findMatchedNodes(value, node[_this4.defaultOptions.children], shouldShow);
703
+ matchedIds = matchedIds.concat(childIds);
704
+ }
705
+ });
706
+
707
+ return matchedIds;
708
+ },
709
+
710
+
711
+ /**
712
+ * 将搜索命中的节点自动展开
713
+ * @returns {void}
714
+ */
715
+ expandMatchedNodes: function expandMatchedNodes() {
716
+ var _this5 = this;
717
+
718
+ this.matchedNodeIds.forEach(function (nodeId) {
719
+ var treeNode = _this5.$refs.tree.store.nodesMap[nodeId];
720
+ if (treeNode) {
721
+ treeNode.expand();
722
+ }
723
+ });
724
+ },
725
+
726
+
727
+ /**
728
+ * 根据 value 初始化树节点勾选状态(单选/多选分别处理)
729
+ * @returns {void}
730
+ */
731
+ init: function init() {
732
+ var _this6 = this;
733
+
734
+ var arr = [];
735
+ if (this.multiple) {
736
+ arr = this.value ? this.value : [];
737
+ } else {
738
+ arr = this.value ? [this.value] : [];
739
+ }
740
+ this.$nextTick(function () {
741
+ _this6.$refs.tree.setCheckedKeys(arr);
742
+ });
743
+ },
744
+
745
+
746
+ /**
747
+ * 多选时勾选变化回调:向外 emit 选中 id 数组及节点数组
748
+ * @param {*} value - el-tree 回调的勾选节点数据
749
+ * @param checkedKeys
750
+ * @param {Object} checkedNodes - 选中节点对象数组
751
+ * @fires {Event} change
752
+ * @returns {void}
753
+ */
754
+ treeCheck: function treeCheck(value, _ref) {
755
+ var _this7 = this;
756
+
757
+ var checkedKeys = _ref.checkedKeys,
758
+ checkedNodes = _ref.checkedNodes;
759
+
760
+ var arr = [];
761
+ arr = checkedNodes;
762
+ var idArr = arr.map(function (item) {
763
+ return item[_this7.defaultOptions.id];
764
+ });
765
+ this.$emit('change', this.multiple ? idArr : idArr[0], this.multiple ? arr : arr[0]);
766
+ },
767
+
768
+
769
+ /**
770
+ * 单选时点击节点回调:直接选中并关闭弹出层
771
+ * @param {Object} value - 当前点击的树节点对象
772
+ * @param {Object} node - 节点对象
773
+ * @param {Object} event - 点击事件对象
774
+ * @fires {Event} change
775
+ * @returns {void}
776
+ */
777
+ treeClick: function treeClick(value, node, event) {
778
+ if (this.multiple) return;
779
+
780
+ this.$emit('change', value[this.defaultOptions.id], value);
781
+ this.popoverOpen = false;
782
+ },
783
+
784
+
785
+ /**
786
+ * 清空选择:emit 空值并清空树勾选
787
+ * @fires {Event} change
788
+ * @returns {void}
789
+ */
790
+ handleClear: function handleClear() {
791
+ this.$emit('change', this.multiple ? [] : '', this.multiple ? [] : null);
792
+ this.$refs.tree.setCheckedKeys([]);
793
+ },
794
+
795
+
796
+ /**
797
+ * 将嵌套树数据拍平为一维数组,并补充父节点 id(pId)便于反查
798
+ * @param {Array} arr - 输出的一维数组(原地收集)
799
+ * @param {Array} data - 当前层级的树节点数组
800
+ * @param {number} pId - 父节点 id
801
+ * @returns {Array} 拍平后的一维节点数组
802
+ */
803
+ turnFormatTreeData: function turnFormatTreeData(arr, data, pId) {
804
+ var _this8 = this;
805
+
806
+ data.forEach(function (item) {
807
+ var cItem = JSON.parse(JSON.stringify(item));
808
+ delete cItem[_this8.defaultOptions.children];
809
+ cItem.pId = pId;
810
+ arr.push(cItem);
811
+
812
+ if (item[_this8.defaultOptions.children] && item[_this8.defaultOptions.children].length > 0) {
813
+ _this8.turnFormatTreeData(arr, item[_this8.defaultOptions.children], item[_this8.defaultOptions.id]);
814
+ }
815
+ });
816
+ return arr;
817
+ }
818
+ }
819
+ });
820
+ // CONCATENATED MODULE: ./packages/cy/treeSelect/src/main.vue?vue&type=script&lang=js
821
+ /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
822
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
823
+ var componentNormalizer = __webpack_require__(0);
824
+
825
+ // CONCATENATED MODULE: ./packages/cy/treeSelect/src/main.vue
826
+
827
+
828
+
829
+
830
+
831
+ /* normalize component */
832
+
833
+ var component = Object(componentNormalizer["a" /* default */])(
834
+ src_mainvue_type_script_lang_js,
835
+ render,
836
+ staticRenderFns,
837
+ false,
838
+ null,
839
+ null,
840
+ null
841
+
842
+ )
843
+
844
+ /* harmony default export */ var main = (component.exports);
845
+ // CONCATENATED MODULE: ./packages/cy/treeSelect/index.js
846
+
847
+
848
+ main.install = function (Vue) {
849
+ Vue.component(main.name, main);
850
+ };
851
+
852
+ /* harmony default export */ var treeSelect = __webpack_exports__["default"] = (main);
853
+
854
+ /***/ }),
855
+
856
+ /***/ 13:
857
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
858
+
859
+ "use strict";
860
+ // ESM COMPAT FLAG
861
+ __webpack_require__.r(__webpack_exports__);
862
+
863
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=048a9cde
864
+ var render = function () {
865
+ var _vm = this
866
+ var _h = _vm.$createElement
867
+ var _c = _vm._self._c || _h
868
+ return _c(
869
+ "div",
870
+ {
871
+ class: [
872
+ _vm.type === "textarea" ? "el-textarea" : "el-input",
873
+ _vm.inputSize ? "el-input--" + _vm.inputSize : "",
874
+ {
875
+ "is-disabled": _vm.inputDisabled,
876
+ "is-exceed": _vm.inputExceed,
877
+ "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
878
+ "el-input-group--append": _vm.$slots.append,
879
+ "el-input-group--prepend": _vm.$slots.prepend,
880
+ "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
881
+ "el-input--suffix":
882
+ _vm.$slots.suffix ||
883
+ _vm.suffixIcon ||
884
+ _vm.clearable ||
885
+ _vm.showPassword,
886
+ },
887
+ ],
888
+ on: {
889
+ mouseenter: function ($event) {
890
+ _vm.hovering = true
891
+ },
892
+ mouseleave: function ($event) {
893
+ _vm.hovering = false
894
+ },
895
+ },
896
+ },
897
+ [
898
+ _vm.type !== "textarea"
899
+ ? [
900
+ _vm.$slots.prepend
901
+ ? _c(
902
+ "div",
903
+ { staticClass: "el-input-group__prepend" },
904
+ [_vm._t("prepend")],
905
+ 2
906
+ )
907
+ : _vm._e(),
908
+ _vm.type !== "textarea"
909
+ ? _c(
910
+ "input",
911
+ _vm._b(
912
+ {
913
+ ref: "input",
914
+ staticClass: "el-input__inner",
915
+ attrs: {
916
+ tabindex: _vm.tabindex,
917
+ type: _vm.showPassword
918
+ ? _vm.passwordVisible
919
+ ? "text"
920
+ : "password"
921
+ : _vm.type,
922
+ disabled: _vm.inputDisabled,
923
+ readonly: _vm.readonly,
924
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
925
+ "aria-label": _vm.label,
926
+ },
927
+ on: {
928
+ compositionstart: _vm.handleCompositionStart,
929
+ compositionupdate: _vm.handleCompositionUpdate,
930
+ compositionend: _vm.handleCompositionEnd,
931
+ input: _vm.handleInput,
932
+ focus: _vm.handleFocus,
933
+ blur: _vm.handleBlur,
934
+ change: _vm.handleChange,
935
+ },
936
+ },
937
+ "input",
938
+ _vm.$attrs,
939
+ false
940
+ )
941
+ )
942
+ : _vm._e(),
943
+ _vm.$slots.prefix || _vm.prefixIcon
944
+ ? _c(
945
+ "span",
946
+ { staticClass: "el-input__prefix" },
947
+ [
948
+ _vm._t("prefix"),
949
+ _vm.prefixIcon
950
+ ? _c("i", {
951
+ staticClass: "el-input__icon",
952
+ class: _vm.prefixIcon,
953
+ })
954
+ : _vm._e(),
955
+ ],
956
+ 2
957
+ )
958
+ : _vm._e(),
959
+ _vm.getSuffixVisible()
960
+ ? _c("span", { staticClass: "el-input__suffix" }, [
961
+ _c(
962
+ "span",
963
+ { staticClass: "el-input__suffix-inner" },
964
+ [
965
+ !_vm.showClear ||
966
+ !_vm.showPwdVisible ||
967
+ !_vm.isWordLimitVisible
968
+ ? [
969
+ _vm._t("suffix"),
970
+ _vm.suffixIcon
971
+ ? _c("i", {
972
+ staticClass: "el-input__icon",
973
+ class: _vm.suffixIcon,
974
+ })
975
+ : _vm._e(),
976
+ ]
977
+ : _vm._e(),
978
+ _vm.showClear
979
+ ? _c("i", {
980
+ staticClass:
981
+ "el-input__icon el-icon-circle-close el-input__clear",
982
+ on: {
983
+ mousedown: function ($event) {
984
+ $event.preventDefault()
985
+ },
986
+ click: _vm.clear,
987
+ },
988
+ })
989
+ : _vm._e(),
990
+ _vm.showPwdVisible
991
+ ? _c("i", {
992
+ staticClass:
993
+ "el-input__icon el-icon-view el-input__clear",
994
+ on: { click: _vm.handlePasswordVisible },
995
+ })
996
+ : _vm._e(),
997
+ _vm.isWordLimitVisible
998
+ ? _c("span", { staticClass: "el-input__count" }, [
999
+ _c(
1000
+ "span",
1001
+ { staticClass: "el-input__count-inner" },
1002
+ [
1003
+ _vm._v(
1004
+ "\n\t\t\t\t\t\t\t" +
1005
+ _vm._s(_vm.textLength) +
1006
+ "/" +
1007
+ _vm._s(_vm.upperLimit) +
1008
+ "\n\t\t\t\t\t\t"
1009
+ ),
1010
+ ]
1011
+ ),
1012
+ ])
1013
+ : _vm._e(),
1014
+ ],
1015
+ 2
1016
+ ),
1017
+ _vm.validateState
1018
+ ? _c("i", {
1019
+ staticClass: "el-input__icon",
1020
+ class: ["el-input__validateIcon", _vm.validateIcon],
1021
+ })
1022
+ : _vm._e(),
1023
+ ])
1024
+ : _vm._e(),
1025
+ _vm.$slots.append
1026
+ ? _c(
1027
+ "div",
1028
+ { staticClass: "el-input-group__append" },
1029
+ [_vm._t("append")],
1030
+ 2
1031
+ )
1032
+ : _vm._e(),
1033
+ ]
1034
+ : _c(
1035
+ "textarea",
1036
+ _vm._b(
1037
+ {
1038
+ ref: "textarea",
1039
+ staticClass: "el-textarea__inner",
1040
+ style: _vm.textareaStyle,
1041
+ attrs: {
1042
+ tabindex: _vm.tabindex,
1043
+ disabled: _vm.inputDisabled,
1044
+ readonly: _vm.readonly,
1045
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
1046
+ "aria-label": _vm.label,
1047
+ },
1048
+ on: {
1049
+ compositionstart: _vm.handleCompositionStart,
1050
+ compositionupdate: _vm.handleCompositionUpdate,
1051
+ compositionend: _vm.handleCompositionEnd,
1052
+ input: _vm.handleInput,
1053
+ focus: _vm.handleFocus,
1054
+ blur: _vm.handleBlur,
1055
+ change: _vm.handleChange,
1056
+ },
1057
+ },
1058
+ "textarea",
1059
+ _vm.$attrs,
1060
+ false
1061
+ )
1062
+ ),
1063
+ _vm.isWordLimitVisible && _vm.type === "textarea"
1064
+ ? _c("span", { staticClass: "el-input__count" }, [
1065
+ _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
1066
+ ])
1067
+ : _vm._e(),
1068
+ ],
1069
+ 2
1070
+ )
1071
+ }
1072
+ var staticRenderFns = []
1073
+ render._withStripped = true
1074
+
1075
+
1076
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=048a9cde
1077
+
1078
+ // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
1079
+ var emitter_ = __webpack_require__(4);
1080
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1081
+
1082
+ // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
1083
+ var migrating_ = __webpack_require__(7);
1084
+ var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
1085
+
1086
+ // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
1087
+ var hiddenTextarea = void 0;
1088
+
1089
+ var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
1090
+
1091
+ var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
1092
+
1093
+ function calculateNodeStyling(targetElement) {
1094
+ var style = window.getComputedStyle(targetElement);
1095
+
1096
+ var boxSizing = style.getPropertyValue('box-sizing');
1097
+
1098
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
1099
+
1100
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
1101
+
1102
+ var contextStyle = CONTEXT_STYLE.map(function (name) {
1103
+ return name + ':' + style.getPropertyValue(name);
1104
+ }).join(';');
1105
+
1106
+ return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
1107
+ }
1108
+
1109
+ function calcTextareaHeight(targetElement) {
1110
+ var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1111
+ var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
1112
+
1113
+ if (!hiddenTextarea) {
1114
+ hiddenTextarea = document.createElement('textarea');
1115
+ document.body.appendChild(hiddenTextarea);
1116
+ }
1117
+
1118
+ var _calculateNodeStyling = calculateNodeStyling(targetElement),
1119
+ paddingSize = _calculateNodeStyling.paddingSize,
1120
+ borderSize = _calculateNodeStyling.borderSize,
1121
+ boxSizing = _calculateNodeStyling.boxSizing,
1122
+ contextStyle = _calculateNodeStyling.contextStyle;
1123
+
1124
+ hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
1125
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
1126
+
1127
+ var height = hiddenTextarea.scrollHeight;
1128
+ var result = {};
1129
+
1130
+ if (boxSizing === 'border-box') {
1131
+ height = height + borderSize;
1132
+ } else if (boxSizing === 'content-box') {
1133
+ height = height - paddingSize;
1134
+ }
1135
+
1136
+ hiddenTextarea.value = '';
1137
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
1138
+
1139
+ if (minRows !== null) {
1140
+ var minHeight = singleRowHeight * minRows;
1141
+ if (boxSizing === 'border-box') {
1142
+ minHeight = minHeight + paddingSize + borderSize;
1143
+ }
1144
+ height = Math.max(minHeight, height);
1145
+ result.minHeight = minHeight + 'px';
1146
+ }
1147
+ if (maxRows !== null) {
1148
+ var maxHeight = singleRowHeight * maxRows;
1149
+ if (boxSizing === 'border-box') {
1150
+ maxHeight = maxHeight + paddingSize + borderSize;
1151
+ }
1152
+ height = Math.min(maxHeight, height);
1153
+ }
1154
+ result.height = height + 'px';
1155
+ hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
1156
+ hiddenTextarea = null;
1157
+ return result;
1158
+ };
1159
+ // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
1160
+ var merge_ = __webpack_require__(6);
1161
+ var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
1162
+
1163
+ // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
1164
+ var shared_ = __webpack_require__(11);
1165
+
1166
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
1167
+ //
1168
+ //
1169
+ //
1170
+ //
1171
+ //
1172
+ //
1173
+ //
1174
+ //
1175
+ //
1176
+ //
1177
+ //
1178
+ //
1179
+ //
1180
+ //
1181
+ //
1182
+ //
1183
+ //
1184
+ //
1185
+ //
1186
+ //
1187
+ //
1188
+ //
1189
+ //
1190
+ //
1191
+ //
1192
+ //
1193
+ //
1194
+ //
1195
+ //
1196
+ //
1197
+ //
1198
+ //
1199
+ //
1200
+ //
1201
+ //
1202
+ //
1203
+ //
1204
+ //
1205
+ //
1206
+ //
1207
+ //
1208
+ //
1209
+ //
1210
+ //
1211
+ //
1212
+ //
1213
+ //
1214
+ //
1215
+ //
1216
+ //
1217
+ //
1218
+ //
1219
+ //
1220
+ //
1221
+ //
1222
+ //
1223
+ //
1224
+ //
1225
+ //
1226
+ //
1227
+ //
1228
+ //
1229
+ //
1230
+ //
1231
+ //
1232
+ //
1233
+ //
1234
+ //
1235
+ //
1236
+ //
1237
+ //
1238
+ //
1239
+ //
1240
+ //
1241
+ //
1242
+ //
1243
+ //
1244
+ //
1245
+ //
1246
+ //
1247
+ //
1248
+ //
1249
+ //
1250
+ //
1251
+ //
1252
+ //
1253
+ //
1254
+ //
1255
+ //
1256
+ //
1257
+ //
1258
+ //
1259
+ //
1260
+ //
1261
+ //
1262
+ //
1263
+ //
1264
+ //
1265
+ //
1266
+ //
1267
+ //
1268
+ //
1269
+ //
1270
+ //
1271
+ //
1272
+ //
1273
+ //
1274
+ //
1275
+ //
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+ /* harmony default export */ var inputvue_type_script_lang_js = ({
1284
+ name: 'ElInput',
1285
+
1286
+ componentName: 'ElInput',
1287
+
1288
+ mixins: [emitter_default.a, migrating_default.a],
1289
+
1290
+ inheritAttrs: false,
1291
+
1292
+ inject: {
1293
+ elForm: {
1294
+ default: ''
1295
+ },
1296
+ elFormItem: {
1297
+ default: ''
1298
+ }
1299
+ },
1300
+
1301
+ data: function data() {
1302
+ return {
1303
+ textareaCalcStyle: {},
1304
+ hovering: false,
1305
+ focused: false,
1306
+ isComposing: false,
1307
+ passwordVisible: false
1308
+ };
1309
+ },
1310
+
1311
+
1312
+ props: {
1313
+ value: [String, Number],
1314
+ size: String,
1315
+ resize: String,
1316
+ form: String,
1317
+ disabled: Boolean,
1318
+ readonly: Boolean,
1319
+ type: {
1320
+ type: String,
1321
+ default: 'text'
1322
+ },
1323
+ autosize: {
1324
+ type: [Boolean, Object],
1325
+ default: false
1326
+ },
1327
+ autocomplete: {
1328
+ type: String,
1329
+ default: 'off'
1330
+ },
1331
+ /** @Deprecated in next major version */
1332
+ autoComplete: {
1333
+ type: String,
1334
+ validator: function validator(val) {
1335
+ false && false;
1336
+ return true;
1337
+ }
1338
+ },
1339
+ validateEvent: {
1340
+ type: Boolean,
1341
+ default: true
1342
+ },
1343
+ suffixIcon: String,
1344
+ prefixIcon: String,
1345
+ label: String,
1346
+ clearable: {
1347
+ type: Boolean,
1348
+ default: false
1349
+ },
1350
+ showPassword: {
1351
+ type: Boolean,
1352
+ default: false
1353
+ },
1354
+ showWordLimit: {
1355
+ type: Boolean,
1356
+ default: false
1357
+ },
1358
+ tabindex: String
1359
+ },
1360
+
1361
+ computed: {
1362
+ _elFormItemSize: function _elFormItemSize() {
1363
+ return (this.elFormItem || {}).elFormItemSize;
1364
+ },
1365
+ validateState: function validateState() {
1366
+ return this.elFormItem ? this.elFormItem.validateState : '';
1367
+ },
1368
+ needStatusIcon: function needStatusIcon() {
1369
+ return this.elForm ? this.elForm.statusIcon : false;
1370
+ },
1371
+ validateIcon: function validateIcon() {
1372
+ return {
1373
+ validating: 'el-icon-loading',
1374
+ success: 'el-icon-circle-check',
1375
+ error: 'el-icon-circle-close'
1376
+ }[this.validateState];
1377
+ },
1378
+ textareaStyle: function textareaStyle() {
1379
+ return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
1380
+ },
1381
+ inputSize: function inputSize() {
1382
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
1383
+ },
1384
+ inputDisabled: function inputDisabled() {
1385
+ return this.disabled || (this.elForm || {}).disabled;
1386
+ },
1387
+ nativeInputValue: function nativeInputValue() {
1388
+ return this.value === null || this.value === undefined ? '' : String(this.value);
1389
+ },
1390
+ showClear: function showClear() {
1391
+ return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
1392
+ },
1393
+ showPwdVisible: function showPwdVisible() {
1394
+ return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
1395
+ },
1396
+ isWordLimitVisible: function isWordLimitVisible() {
1397
+ return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
1398
+ },
1399
+ upperLimit: function upperLimit() {
1400
+ return this.$attrs.maxlength;
1401
+ },
1402
+ textLength: function textLength() {
1403
+ if (typeof this.value === 'number') {
1404
+ return String(this.value).length;
1405
+ }
1406
+
1407
+ return (this.value || '').length;
1408
+ },
1409
+ inputExceed: function inputExceed() {
1410
+ // show exceed style if length of initial value greater then maxlength
1411
+ return this.isWordLimitVisible && this.textLength > this.upperLimit;
1412
+ }
1413
+ },
1414
+
1415
+ watch: {
1416
+ value: function value(val) {
1417
+ this.$nextTick(this.resizeTextarea);
1418
+ if (this.validateEvent) {
1419
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
1420
+ }
1421
+ },
1422
+
1423
+ // native input value is set explicitly
1424
+ // do not use v-model / :value in template
1425
+ // see: https://github.com/ElemeFE/element/issues/14521
1426
+ nativeInputValue: function nativeInputValue() {
1427
+ this.setNativeInputValue();
1428
+ },
1429
+
1430
+ // when change between <input> and <textarea>,
1431
+ // update DOM dependent value and styles
1432
+ // https://github.com/ElemeFE/element/issues/14857
1433
+ type: function type() {
1434
+ var _this = this;
1435
+
1436
+ this.$nextTick(function () {
1437
+ _this.setNativeInputValue();
1438
+ _this.resizeTextarea();
1439
+ _this.updateIconOffset();
1440
+ });
1441
+ }
1442
+ },
1443
+
1444
+ methods: {
1445
+ focus: function focus() {
1446
+ this.getInput().focus();
1447
+ },
1448
+ blur: function blur() {
1449
+ this.getInput().blur();
1450
+ },
1451
+ getMigratingConfig: function getMigratingConfig() {
1452
+ return {
1453
+ props: {
1454
+ 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
1455
+ 'on-icon-click': 'on-icon-click is removed.'
1456
+ },
1457
+ events: {
1458
+ 'click': 'click is removed.'
1459
+ }
1460
+ };
1461
+ },
1462
+ handleBlur: function handleBlur(event) {
1463
+ this.focused = false;
1464
+ this.$emit('blur', event);
1465
+ if (this.validateEvent) {
1466
+ this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
1467
+ }
1468
+ },
1469
+ select: function select() {
1470
+ this.getInput().select();
1471
+ },
1472
+ resizeTextarea: function resizeTextarea() {
1473
+ if (this.$isServer) return;
1474
+ var autosize = this.autosize,
1475
+ type = this.type;
1476
+
1477
+ if (type !== 'textarea') return;
1478
+ if (!autosize) {
1479
+ this.textareaCalcStyle = {
1480
+ minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
1481
+ };
1482
+ return;
1483
+ }
1484
+ var minRows = autosize.minRows;
1485
+ var maxRows = autosize.maxRows;
1486
+
1487
+ this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
1488
+ },
1489
+ setNativeInputValue: function setNativeInputValue() {
1490
+ var input = this.getInput();
1491
+ if (!input) return;
1492
+ if (input.value === this.nativeInputValue) return;
1493
+ input.value = this.nativeInputValue;
1494
+ },
1495
+ handleFocus: function handleFocus(event) {
1496
+ this.focused = true;
1497
+ this.$emit('focus', event);
1498
+ },
1499
+ handleCompositionStart: function handleCompositionStart(event) {
1500
+ this.$emit('compositionstart', event);
1501
+ this.isComposing = true;
1502
+ },
1503
+ handleCompositionUpdate: function handleCompositionUpdate(event) {
1504
+ this.$emit('compositionupdate', event);
1505
+ var text = event.target.value;
1506
+ var lastCharacter = text[text.length - 1] || '';
1507
+ this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
1508
+ },
1509
+ handleCompositionEnd: function handleCompositionEnd(event) {
1510
+ this.$emit('compositionend', event);
1511
+ if (this.isComposing) {
1512
+ this.isComposing = false;
1513
+ this.handleInput(event);
1514
+ }
1515
+ },
1516
+ handleInput: function handleInput(event) {
1517
+ // should not emit input during composition
1518
+ // see: https://github.com/ElemeFE/element/issues/10516
1519
+ if (this.isComposing) return;
1520
+
1521
+ // hack for https://github.com/ElemeFE/element/issues/8548
1522
+ // should remove the following line when we don't support IE
1523
+ if (event.target.value === this.nativeInputValue) return;
1524
+
1525
+ this.$emit('input', event.target.value);
1526
+
1527
+ // ensure native input value is controlled
1528
+ // see: https://github.com/ElemeFE/element/issues/12850
1529
+ this.$nextTick(this.setNativeInputValue);
1530
+ },
1531
+ handleChange: function handleChange(event) {
1532
+ this.$emit('change', event.target.value);
1533
+ },
1534
+ calcIconOffset: function calcIconOffset(place) {
1535
+ var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
1536
+ if (!elList.length) return;
1537
+ var el = null;
1538
+ for (var i = 0; i < elList.length; i++) {
1539
+ if (elList[i].parentNode === this.$el) {
1540
+ el = elList[i];
1541
+ break;
1542
+ }
1543
+ }
1544
+ if (!el) return;
1545
+ var pendantMap = {
1546
+ suffix: 'append',
1547
+ prefix: 'prepend'
1548
+ };
1549
+
1550
+ var pendant = pendantMap[place];
1551
+ if (this.$slots[pendant]) {
1552
+ el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
1553
+ } else {
1554
+ el.removeAttribute('style');
1555
+ }
1556
+ },
1557
+ updateIconOffset: function updateIconOffset() {
1558
+ this.calcIconOffset('prefix');
1559
+ this.calcIconOffset('suffix');
1560
+ },
1561
+ clear: function clear() {
1562
+ this.$emit('input', '');
1563
+ this.$emit('change', '');
1564
+ this.$emit('clear');
1565
+ },
1566
+ handlePasswordVisible: function handlePasswordVisible() {
1567
+ var _this2 = this;
1568
+
1569
+ this.passwordVisible = !this.passwordVisible;
1570
+ this.$nextTick(function () {
1571
+ _this2.focus();
1572
+ });
1573
+ },
1574
+ getInput: function getInput() {
1575
+ return this.$refs.input || this.$refs.textarea;
1576
+ },
1577
+ getSuffixVisible: function getSuffixVisible() {
1578
+ return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
1579
+ }
1580
+ },
1581
+
1582
+ created: function created() {
1583
+ this.$on('inputSelect', this.select);
1584
+ },
1585
+ mounted: function mounted() {
1586
+ this.setNativeInputValue();
1587
+ this.resizeTextarea();
1588
+ this.updateIconOffset();
1589
+ },
1590
+ updated: function updated() {
1591
+ this.$nextTick(this.updateIconOffset);
1592
+ }
1593
+ });
1594
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
1595
+ /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
1596
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1597
+ var componentNormalizer = __webpack_require__(0);
1598
+
1599
+ // CONCATENATED MODULE: ./packages/input/src/input.vue
1600
+
1601
+
1602
+
1603
+
1604
+
1605
+ /* normalize component */
1606
+
1607
+ var component = Object(componentNormalizer["a" /* default */])(
1608
+ src_inputvue_type_script_lang_js,
1609
+ render,
1610
+ staticRenderFns,
1611
+ false,
1612
+ null,
1613
+ null,
1614
+ null
1615
+
1616
+ )
1617
+
1618
+ /* harmony default export */ var input = (component.exports);
1619
+ // CONCATENATED MODULE: ./packages/input/index.js
1620
+
1621
+
1622
+ /* istanbul ignore next */
1623
+ input.install = function (Vue) {
1624
+ Vue.component(input.name, input);
1625
+ };
1626
+
1627
+ /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
1628
+
1629
+ /***/ }),
1630
+
1631
+ /***/ 16:
1632
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1633
+
1634
+ "use strict";
1635
+ // ESM COMPAT FLAG
1636
+ __webpack_require__.r(__webpack_exports__);
1637
+
1638
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=5f30258f
1639
+ var render = function () {
1640
+ var _vm = this
1641
+ var _h = _vm.$createElement
1642
+ var _c = _vm._self._c || _h
1643
+ return _c(
1644
+ "label",
1645
+ {
1646
+ staticClass: "el-checkbox",
1647
+ class: [
1648
+ _vm.border && _vm.checkboxSize
1649
+ ? "el-checkbox--" + _vm.checkboxSize
1650
+ : "",
1651
+ { "is-disabled": _vm.isDisabled },
1652
+ { "is-bordered": _vm.border },
1653
+ { "is-checked": _vm.isChecked },
1654
+ ],
1655
+ attrs: { id: _vm.id },
1656
+ },
1657
+ [
1658
+ _c(
1659
+ "span",
1660
+ {
1661
+ staticClass: "el-checkbox__input",
1662
+ class: {
1663
+ "is-disabled": _vm.isDisabled,
1664
+ "is-checked": _vm.isChecked,
1665
+ "is-indeterminate": _vm.indeterminate,
1666
+ "is-focus": _vm.focus,
1667
+ },
1668
+ attrs: {
1669
+ tabindex: _vm.indeterminate ? 0 : false,
1670
+ role: _vm.indeterminate ? "checkbox" : false,
1671
+ "aria-checked": _vm.indeterminate ? "mixed" : false,
1672
+ },
1673
+ },
1674
+ [
1675
+ _c("span", { staticClass: "el-checkbox__inner" }),
1676
+ _vm.trueLabel || _vm.falseLabel
1677
+ ? _c("input", {
1678
+ directives: [
1679
+ {
1680
+ name: "model",
1681
+ rawName: "v-model",
1682
+ value: _vm.model,
1683
+ expression: "model",
1684
+ },
1685
+ ],
1686
+ staticClass: "el-checkbox__original",
1687
+ attrs: {
1688
+ type: "checkbox",
1689
+ "aria-hidden": _vm.indeterminate ? "true" : "false",
1690
+ name: _vm.name,
1691
+ disabled: _vm.isDisabled,
1692
+ "true-value": _vm.trueLabel,
1693
+ "false-value": _vm.falseLabel,
1694
+ },
1695
+ domProps: {
1696
+ checked: Array.isArray(_vm.model)
1697
+ ? _vm._i(_vm.model, null) > -1
1698
+ : _vm._q(_vm.model, _vm.trueLabel),
1699
+ },
1700
+ on: {
1701
+ change: [
1702
+ function ($event) {
1703
+ var $$a = _vm.model,
1704
+ $$el = $event.target,
1705
+ $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
1706
+ if (Array.isArray($$a)) {
1707
+ var $$v = null,
1708
+ $$i = _vm._i($$a, $$v)
1709
+ if ($$el.checked) {
1710
+ $$i < 0 && (_vm.model = $$a.concat([$$v]))
1711
+ } else {
1712
+ $$i > -1 &&
1713
+ (_vm.model = $$a
1714
+ .slice(0, $$i)
1715
+ .concat($$a.slice($$i + 1)))
1716
+ }
1717
+ } else {
1718
+ _vm.model = $$c
1719
+ }
1720
+ },
1721
+ _vm.handleChange,
1722
+ ],
1723
+ focus: function ($event) {
1724
+ _vm.focus = true
1725
+ },
1726
+ blur: function ($event) {
1727
+ _vm.focus = false
1728
+ },
1729
+ },
1730
+ })
1731
+ : _c("input", {
1732
+ directives: [
1733
+ {
1734
+ name: "model",
1735
+ rawName: "v-model",
1736
+ value: _vm.model,
1737
+ expression: "model",
1738
+ },
1739
+ ],
1740
+ staticClass: "el-checkbox__original",
1741
+ attrs: {
1742
+ type: "checkbox",
1743
+ "aria-hidden": _vm.indeterminate ? "true" : "false",
1744
+ disabled: _vm.isDisabled,
1745
+ name: _vm.name,
1746
+ },
1747
+ domProps: {
1748
+ value: _vm.label,
1749
+ checked: Array.isArray(_vm.model)
1750
+ ? _vm._i(_vm.model, _vm.label) > -1
1751
+ : _vm.model,
1752
+ },
1753
+ on: {
1754
+ change: [
1755
+ function ($event) {
1756
+ var $$a = _vm.model,
1757
+ $$el = $event.target,
1758
+ $$c = $$el.checked ? true : false
1759
+ if (Array.isArray($$a)) {
1760
+ var $$v = _vm.label,
1761
+ $$i = _vm._i($$a, $$v)
1762
+ if ($$el.checked) {
1763
+ $$i < 0 && (_vm.model = $$a.concat([$$v]))
1764
+ } else {
1765
+ $$i > -1 &&
1766
+ (_vm.model = $$a
1767
+ .slice(0, $$i)
1768
+ .concat($$a.slice($$i + 1)))
1769
+ }
1770
+ } else {
1771
+ _vm.model = $$c
1772
+ }
1773
+ },
1774
+ _vm.handleChange,
1775
+ ],
1776
+ focus: function ($event) {
1777
+ _vm.focus = true
1778
+ },
1779
+ blur: function ($event) {
1780
+ _vm.focus = false
1781
+ },
1782
+ },
1783
+ }),
1784
+ ]
1785
+ ),
1786
+ _vm.$slots.default || _vm.label
1787
+ ? _c(
1788
+ "span",
1789
+ { staticClass: "el-checkbox__label" },
1790
+ [
1791
+ _vm._t("default"),
1792
+ !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e(),
1793
+ ],
1794
+ 2
1795
+ )
1796
+ : _vm._e(),
1797
+ ]
1798
+ )
1799
+ }
1800
+ var staticRenderFns = []
1801
+ render._withStripped = true
1802
+
1803
+
1804
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=5f30258f
1805
+
1806
+ // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
1807
+ var emitter_ = __webpack_require__(4);
1808
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1809
+
1810
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js
1811
+ //
1812
+ //
1813
+ //
1814
+ //
1815
+ //
1816
+ //
1817
+ //
1818
+ //
1819
+ //
1820
+ //
1821
+ //
1822
+ //
1823
+ //
1824
+ //
1825
+ //
1826
+ //
1827
+ //
1828
+ //
1829
+ //
1830
+ //
1831
+ //
1832
+ //
1833
+ //
1834
+ //
1835
+ //
1836
+ //
1837
+ //
1838
+ //
1839
+ //
1840
+ //
1841
+ //
1842
+ //
1843
+ //
1844
+ //
1845
+ //
1846
+ //
1847
+ //
1848
+ //
1849
+ //
1850
+ //
1851
+ //
1852
+ //
1853
+ //
1854
+ //
1855
+ //
1856
+ //
1857
+ //
1858
+ //
1859
+ //
1860
+ //
1861
+ //
1862
+ //
1863
+ //
1864
+ //
1865
+ //
1866
+
1867
+
1868
+
1869
+ /* harmony default export */ var checkboxvue_type_script_lang_js = ({
1870
+ name: 'ElCheckbox',
1871
+
1872
+ mixins: [emitter_default.a],
1873
+
1874
+ inject: {
1875
+ elForm: {
1876
+ default: ''
1877
+ },
1878
+ elFormItem: {
1879
+ default: ''
1880
+ }
1881
+ },
1882
+
1883
+ componentName: 'ElCheckbox',
1884
+
1885
+ data: function data() {
1886
+ return {
1887
+ selfModel: false,
1888
+ focus: false,
1889
+ isLimitExceeded: false
1890
+ };
1891
+ },
1892
+
1893
+
1894
+ computed: {
1895
+ model: {
1896
+ get: function get() {
1897
+ return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
1898
+ },
1899
+ set: function set(val) {
1900
+ if (this.isGroup) {
1901
+ this.isLimitExceeded = false;
1902
+ this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
1903
+
1904
+ this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
1905
+
1906
+ this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
1907
+ } else {
1908
+ this.$emit('input', val);
1909
+ this.selfModel = val;
1910
+ }
1911
+ }
1912
+ },
1913
+
1914
+ isChecked: function isChecked() {
1915
+ if ({}.toString.call(this.model) === '[object Boolean]') {
1916
+ return this.model;
1917
+ } else if (Array.isArray(this.model)) {
1918
+ return this.model.indexOf(this.label) > -1;
1919
+ } else if (this.model !== null && this.model !== undefined) {
1920
+ return this.model === this.trueLabel;
1921
+ }
1922
+ },
1923
+ isGroup: function isGroup() {
1924
+ var parent = this.$parent;
1925
+ while (parent) {
1926
+ if (parent.$options.componentName !== 'ElCheckboxGroup') {
1927
+ parent = parent.$parent;
1928
+ } else {
1929
+ this._checkboxGroup = parent;
1930
+ return true;
1931
+ }
1932
+ }
1933
+ return false;
1934
+ },
1935
+ store: function store() {
1936
+ return this._checkboxGroup ? this._checkboxGroup.value : this.value;
1937
+ },
1938
+
1939
+
1940
+ /* used to make the isDisabled judgment under max/min props */
1941
+ isLimitDisabled: function isLimitDisabled() {
1942
+ var _checkboxGroup = this._checkboxGroup,
1943
+ max = _checkboxGroup.max,
1944
+ min = _checkboxGroup.min;
1945
+
1946
+ return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
1947
+ },
1948
+ isDisabled: function isDisabled() {
1949
+ return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
1950
+ },
1951
+ _elFormItemSize: function _elFormItemSize() {
1952
+ return (this.elFormItem || {}).elFormItemSize;
1953
+ },
1954
+ checkboxSize: function checkboxSize() {
1955
+ var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
1956
+ return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
1957
+ }
1958
+ },
1959
+
1960
+ props: {
1961
+ value: {},
1962
+ label: {},
1963
+ indeterminate: Boolean,
1964
+ disabled: Boolean,
1965
+ checked: Boolean,
1966
+ name: String,
1967
+ trueLabel: [String, Number],
1968
+ falseLabel: [String, Number],
1969
+ id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
1970
+ controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
1971
+ border: Boolean,
1972
+ size: String
1973
+ },
1974
+
1975
+ methods: {
1976
+ addToStore: function addToStore() {
1977
+ if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
1978
+ this.model.push(this.label);
1979
+ } else {
1980
+ this.model = this.trueLabel || true;
1981
+ }
1982
+ },
1983
+ handleChange: function handleChange(ev) {
1984
+ var _this = this;
1985
+
1986
+ if (this.isLimitExceeded) return;
1987
+ var value = void 0;
1988
+ if (ev.target.checked) {
1989
+ value = this.trueLabel === undefined ? true : this.trueLabel;
1990
+ } else {
1991
+ value = this.falseLabel === undefined ? false : this.falseLabel;
1992
+ }
1993
+ this.$emit('change', value, ev);
1994
+ this.$nextTick(function () {
1995
+ if (_this.isGroup) {
1996
+ _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
1997
+ }
1998
+ });
1999
+ }
2000
+ },
2001
+
2002
+ created: function created() {
2003
+ this.checked && this.addToStore();
2004
+ },
2005
+ mounted: function mounted() {
2006
+ // 为indeterminate元素 添加aria-controls 属性
2007
+ if (this.indeterminate) {
2008
+ this.$el.setAttribute('aria-controls', this.controls);
2009
+ }
2010
+ },
2011
+
2012
+
2013
+ watch: {
2014
+ value: function value(_value) {
2015
+ this.dispatch('ElFormItem', 'el.form.change', _value);
2016
+ }
2017
+ }
2018
+ });
2019
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js
2020
+ /* harmony default export */ var src_checkboxvue_type_script_lang_js = (checkboxvue_type_script_lang_js);
2021
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2022
+ var componentNormalizer = __webpack_require__(0);
2023
+
2024
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+ /* normalize component */
2031
+
2032
+ var component = Object(componentNormalizer["a" /* default */])(
2033
+ src_checkboxvue_type_script_lang_js,
2034
+ render,
2035
+ staticRenderFns,
2036
+ false,
2037
+ null,
2038
+ null,
2039
+ null
2040
+
2041
+ )
2042
+
2043
+ /* harmony default export */ var src_checkbox = (component.exports);
2044
+ // CONCATENATED MODULE: ./packages/checkbox/index.js
2045
+
2046
+
2047
+ /* istanbul ignore next */
2048
+ src_checkbox.install = function (Vue) {
2049
+ Vue.component(src_checkbox.name, src_checkbox);
2050
+ };
2051
+
2052
+ /* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
2053
+
2054
+ /***/ }),
2055
+
2056
+ /***/ 22:
2057
+ /***/ (function(module, exports) {
2058
+
2059
+ module.exports = require("element-ui/lib/locale");
2060
+
2061
+ /***/ }),
2062
+
2063
+ /***/ 27:
2064
+ /***/ (function(module, exports) {
2065
+
2066
+ module.exports = require("element-ui/lib/transitions/collapse-transition");
2067
+
2068
+ /***/ }),
2069
+
2070
+ /***/ 3:
2071
+ /***/ (function(module, exports) {
2072
+
2073
+ module.exports = require("element-ui/lib/utils/util");
2074
+
2075
+ /***/ }),
2076
+
2077
+ /***/ 36:
2078
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2079
+
2080
+ "use strict";
2081
+ // ESM COMPAT FLAG
2082
+ __webpack_require__.r(__webpack_exports__);
2083
+
2084
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=0e66f51f
2085
+ var render = function () {
2086
+ var _vm = this
2087
+ var _h = _vm.$createElement
2088
+ var _c = _vm._self._c || _h
2089
+ return _c(
2090
+ "span",
2091
+ [
2092
+ _c(
2093
+ "transition",
2094
+ {
2095
+ attrs: { name: _vm.transition },
2096
+ on: {
2097
+ "after-enter": _vm.handleAfterEnter,
2098
+ "after-leave": _vm.handleAfterLeave,
2099
+ },
2100
+ },
2101
+ [
2102
+ _c(
2103
+ "div",
2104
+ {
2105
+ directives: [
2106
+ {
2107
+ name: "show",
2108
+ rawName: "v-show",
2109
+ value: !_vm.disabled && _vm.showPopper,
2110
+ expression: "!disabled && showPopper",
2111
+ },
2112
+ ],
2113
+ ref: "popper",
2114
+ staticClass: "el-popover el-popper",
2115
+ class: [_vm.popperClass, _vm.content && "el-popover--plain"],
2116
+ style: { width: _vm.width + "px" },
2117
+ attrs: {
2118
+ role: "tooltip",
2119
+ id: _vm.tooltipId,
2120
+ "aria-hidden":
2121
+ _vm.disabled || !_vm.showPopper ? "true" : "false",
2122
+ },
2123
+ },
2124
+ [
2125
+ _vm.title
2126
+ ? _c("div", {
2127
+ staticClass: "el-popover__title",
2128
+ domProps: { textContent: _vm._s(_vm.title) },
2129
+ })
2130
+ : _vm._e(),
2131
+ _vm._t("default", [_vm._v(_vm._s(_vm.content))]),
2132
+ ],
2133
+ 2
2134
+ ),
2135
+ ]
2136
+ ),
2137
+ _c(
2138
+ "span",
2139
+ { ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
2140
+ [_vm._t("reference")],
2141
+ 2
2142
+ ),
2143
+ ],
2144
+ 1
2145
+ )
2146
+ }
2147
+ var staticRenderFns = []
2148
+ render._withStripped = true
2149
+
2150
+
2151
+ // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=0e66f51f
2152
+
2153
+ // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
2154
+ var vue_popper_ = __webpack_require__(5);
2155
+ var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
2156
+
2157
+ // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
2158
+ var dom_ = __webpack_require__(1);
2159
+
2160
+ // EXTERNAL MODULE: external "element-ui/lib/utils/util"
2161
+ var util_ = __webpack_require__(3);
2162
+
2163
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js
2164
+ //
2165
+ //
2166
+ //
2167
+ //
2168
+ //
2169
+ //
2170
+ //
2171
+ //
2172
+ //
2173
+ //
2174
+ //
2175
+ //
2176
+ //
2177
+ //
2178
+ //
2179
+ //
2180
+ //
2181
+ //
2182
+ //
2183
+ //
2184
+ //
2185
+ //
2186
+ //
2187
+ //
2188
+ //
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+ /* harmony default export */ var mainvue_type_script_lang_js = ({
2196
+ name: 'ElPopover',
2197
+
2198
+ mixins: [vue_popper_default.a],
2199
+
2200
+ props: {
2201
+ trigger: {
2202
+ type: String,
2203
+ default: 'click',
2204
+ validator: function validator(value) {
2205
+ return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
2206
+ }
2207
+ },
2208
+ openDelay: {
2209
+ type: Number,
2210
+ default: 0
2211
+ },
2212
+ closeDelay: {
2213
+ type: Number,
2214
+ default: 200
2215
+ },
2216
+ title: String,
2217
+ disabled: Boolean,
2218
+ content: String,
2219
+ reference: {},
2220
+ popperClass: String,
2221
+ width: {},
2222
+ visibleArrow: {
2223
+ default: true
2224
+ },
2225
+ arrowOffset: {
2226
+ type: Number,
2227
+ default: 0
2228
+ },
2229
+ transition: {
2230
+ type: String,
2231
+ default: 'fade-in-linear'
2232
+ },
2233
+ tabindex: {
2234
+ type: Number,
2235
+ default: 0
2236
+ }
2237
+ },
2238
+
2239
+ computed: {
2240
+ tooltipId: function tooltipId() {
2241
+ return 'el-popover-' + Object(util_["generateId"])();
2242
+ }
2243
+ },
2244
+ watch: {
2245
+ showPopper: function showPopper(val) {
2246
+ if (this.disabled) {
2247
+ return;
2248
+ }
2249
+ val ? this.$emit('show') : this.$emit('hide');
2250
+ }
2251
+ },
2252
+
2253
+ mounted: function mounted() {
2254
+ var _this = this;
2255
+
2256
+ var reference = this.referenceElm = this.reference || this.$refs.reference;
2257
+ var popper = this.popper || this.$refs.popper;
2258
+
2259
+ if (!reference && this.$refs.wrapper.children) {
2260
+ reference = this.referenceElm = this.$refs.wrapper.children[0];
2261
+ }
2262
+ // 可访问性
2263
+ if (reference) {
2264
+ Object(dom_["addClass"])(reference, 'el-popover__reference');
2265
+ reference.setAttribute('aria-describedby', this.tooltipId);
2266
+ reference.setAttribute('tabindex', this.tabindex); // tab序列
2267
+ popper.setAttribute('tabindex', 0);
2268
+
2269
+ if (this.trigger !== 'click') {
2270
+ Object(dom_["on"])(reference, 'focusin', function () {
2271
+ _this.handleFocus();
2272
+ var instance = reference.__vue__;
2273
+ if (instance && typeof instance.focus === 'function') {
2274
+ instance.focus();
2275
+ }
2276
+ });
2277
+ Object(dom_["on"])(popper, 'focusin', this.handleFocus);
2278
+ Object(dom_["on"])(reference, 'focusout', this.handleBlur);
2279
+ Object(dom_["on"])(popper, 'focusout', this.handleBlur);
2280
+ }
2281
+ Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
2282
+ Object(dom_["on"])(reference, 'click', this.handleClick);
2283
+ }
2284
+ if (this.trigger === 'click') {
2285
+ Object(dom_["on"])(reference, 'click', this.doToggle);
2286
+ Object(dom_["on"])(document, 'click', this.handleDocumentClick);
2287
+ } else if (this.trigger === 'hover') {
2288
+ Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
2289
+ Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
2290
+ Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
2291
+ Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
2292
+ } else if (this.trigger === 'focus') {
2293
+ if (this.tabindex < 0) {
2294
+ console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
2295
+ }
2296
+ if (reference.querySelector('input, textarea')) {
2297
+ Object(dom_["on"])(reference, 'focusin', this.doShow);
2298
+ Object(dom_["on"])(reference, 'focusout', this.doClose);
2299
+ } else {
2300
+ Object(dom_["on"])(reference, 'mousedown', this.doShow);
2301
+ Object(dom_["on"])(reference, 'mouseup', this.doClose);
2302
+ }
2303
+ }
2304
+ },
2305
+ beforeDestroy: function beforeDestroy() {
2306
+ this.cleanup();
2307
+ },
2308
+ deactivated: function deactivated() {
2309
+ this.cleanup();
2310
+ },
2311
+
2312
+
2313
+ methods: {
2314
+ doToggle: function doToggle() {
2315
+ this.showPopper = !this.showPopper;
2316
+ },
2317
+ doShow: function doShow() {
2318
+ this.showPopper = true;
2319
+ },
2320
+ doClose: function doClose() {
2321
+ this.showPopper = false;
2322
+ },
2323
+ handleFocus: function handleFocus() {
2324
+ Object(dom_["addClass"])(this.referenceElm, 'focusing');
2325
+ if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
2326
+ },
2327
+ handleClick: function handleClick() {
2328
+ Object(dom_["removeClass"])(this.referenceElm, 'focusing');
2329
+ },
2330
+ handleBlur: function handleBlur() {
2331
+ Object(dom_["removeClass"])(this.referenceElm, 'focusing');
2332
+ if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
2333
+ },
2334
+ handleMouseEnter: function handleMouseEnter() {
2335
+ var _this2 = this;
2336
+
2337
+ clearTimeout(this._timer);
2338
+ if (this.openDelay) {
2339
+ this._timer = setTimeout(function () {
2340
+ _this2.showPopper = true;
2341
+ }, this.openDelay);
2342
+ } else {
2343
+ this.showPopper = true;
2344
+ }
2345
+ },
2346
+ handleKeydown: function handleKeydown(ev) {
2347
+ if (ev.keyCode === 27 && this.trigger !== 'manual') {
2348
+ // esc
2349
+ this.doClose();
2350
+ }
2351
+ },
2352
+ handleMouseLeave: function handleMouseLeave() {
2353
+ var _this3 = this;
2354
+
2355
+ clearTimeout(this._timer);
2356
+ if (this.closeDelay) {
2357
+ this._timer = setTimeout(function () {
2358
+ _this3.showPopper = false;
2359
+ }, this.closeDelay);
2360
+ } else {
2361
+ this.showPopper = false;
2362
+ }
2363
+ },
2364
+ handleDocumentClick: function handleDocumentClick(e) {
2365
+ var reference = this.reference || this.$refs.reference;
2366
+ var popper = this.popper || this.$refs.popper;
2367
+
2368
+ if (!reference && this.$refs.wrapper.children) {
2369
+ reference = this.referenceElm = this.$refs.wrapper.children[0];
2370
+ }
2371
+ if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
2372
+ this.showPopper = false;
2373
+ },
2374
+ handleAfterEnter: function handleAfterEnter() {
2375
+ this.$emit('after-enter');
2376
+ },
2377
+ handleAfterLeave: function handleAfterLeave() {
2378
+ this.$emit('after-leave');
2379
+ this.doDestroy();
2380
+ },
2381
+ cleanup: function cleanup() {
2382
+ if (this.openDelay || this.closeDelay) {
2383
+ clearTimeout(this._timer);
2384
+ }
2385
+ }
2386
+ },
2387
+
2388
+ destroyed: function destroyed() {
2389
+ var reference = this.reference;
2390
+
2391
+ Object(dom_["off"])(reference, 'click', this.doToggle);
2392
+ Object(dom_["off"])(reference, 'mouseup', this.doClose);
2393
+ Object(dom_["off"])(reference, 'mousedown', this.doShow);
2394
+ Object(dom_["off"])(reference, 'focusin', this.doShow);
2395
+ Object(dom_["off"])(reference, 'focusout', this.doClose);
2396
+ Object(dom_["off"])(reference, 'mousedown', this.doShow);
2397
+ Object(dom_["off"])(reference, 'mouseup', this.doClose);
2398
+ Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
2399
+ Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
2400
+ Object(dom_["off"])(document, 'click', this.handleDocumentClick);
2401
+ }
2402
+ });
2403
+ // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js
2404
+ /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
2405
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2406
+ var componentNormalizer = __webpack_require__(0);
2407
+
2408
+ // CONCATENATED MODULE: ./packages/popover/src/main.vue
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+ /* normalize component */
2415
+
2416
+ var component = Object(componentNormalizer["a" /* default */])(
2417
+ src_mainvue_type_script_lang_js,
2418
+ render,
2419
+ staticRenderFns,
2420
+ false,
2421
+ null,
2422
+ null,
2423
+ null
2424
+
2425
+ )
2426
+
2427
+ /* harmony default export */ var main = (component.exports);
2428
+ // CONCATENATED MODULE: ./packages/popover/src/directive.js
2429
+ var getReference = function getReference(el, binding, vnode) {
2430
+ var _ref = binding.expression ? binding.value : binding.arg;
2431
+ var popper = vnode.context.$refs[_ref];
2432
+ if (popper) {
2433
+ if (Array.isArray(popper)) {
2434
+ popper[0].$refs.reference = el;
2435
+ } else {
2436
+ popper.$refs.reference = el;
2437
+ }
2438
+ }
2439
+ };
2440
+
2441
+ /* harmony default export */ var directive = ({
2442
+ bind: function bind(el, binding, vnode) {
2443
+ getReference(el, binding, vnode);
2444
+ },
2445
+ inserted: function inserted(el, binding, vnode) {
2446
+ getReference(el, binding, vnode);
2447
+ }
2448
+ });
2449
+ // EXTERNAL MODULE: external "vue"
2450
+ var external_vue_ = __webpack_require__(8);
2451
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
2452
+
2453
+ // CONCATENATED MODULE: ./packages/popover/index.js
2454
+
2455
+
2456
+
2457
+
2458
+ external_vue_default.a.directive('popover', directive);
2459
+
2460
+ /* istanbul ignore next */
2461
+ main.install = function (Vue) {
2462
+ Vue.directive('popover', directive);
2463
+ Vue.component(main.name, main);
2464
+ };
2465
+ main.directive = directive;
2466
+
2467
+ /* harmony default export */ var popover = __webpack_exports__["default"] = (main);
2468
+
2469
+ /***/ }),
2470
+
2471
+ /***/ 4:
2472
+ /***/ (function(module, exports) {
2473
+
2474
+ module.exports = require("element-ui/lib/mixins/emitter");
2475
+
2476
+ /***/ }),
2477
+
2478
+ /***/ 46:
2479
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2480
+
2481
+ "use strict";
2482
+ // ESM COMPAT FLAG
2483
+ __webpack_require__.r(__webpack_exports__);
2484
+
2485
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=37500abf
2486
+ var render = function () {
2487
+ var _vm = this
2488
+ var _h = _vm.$createElement
2489
+ var _c = _vm._self._c || _h
2490
+ return _c(
2491
+ "div",
2492
+ {
2493
+ staticClass: "el-tree",
2494
+ class: {
2495
+ "el-tree--highlight-current": _vm.highlightCurrent,
2496
+ "is-dragging": !!_vm.dragState.draggingNode,
2497
+ "is-drop-not-allow": !_vm.dragState.allowDrop,
2498
+ "is-drop-inner": _vm.dragState.dropType === "inner",
2499
+ },
2500
+ attrs: { role: "tree" },
2501
+ },
2502
+ [
2503
+ _vm._l(_vm.root.childNodes, function (child) {
2504
+ return _c("el-tree-node", {
2505
+ key: _vm.getNodeKey(child),
2506
+ attrs: {
2507
+ node: child,
2508
+ props: _vm.props,
2509
+ "render-after-expand": _vm.renderAfterExpand,
2510
+ "show-checkbox": _vm.showCheckbox,
2511
+ "render-content": _vm.renderContent,
2512
+ },
2513
+ on: { "node-expand": _vm.handleNodeExpand },
2514
+ })
2515
+ }),
2516
+ _vm.isEmpty
2517
+ ? _c("div", { staticClass: "el-tree__empty-block" }, [
2518
+ _c("span", { staticClass: "el-tree__empty-text" }, [
2519
+ _vm._v(_vm._s(_vm.emptyText)),
2520
+ ]),
2521
+ ])
2522
+ : _vm._e(),
2523
+ _c("div", {
2524
+ directives: [
2525
+ {
2526
+ name: "show",
2527
+ rawName: "v-show",
2528
+ value: _vm.dragState.showDropIndicator,
2529
+ expression: "dragState.showDropIndicator",
2530
+ },
2531
+ ],
2532
+ ref: "dropIndicator",
2533
+ staticClass: "el-tree__drop-indicator",
2534
+ }),
2535
+ ],
2536
+ 2
2537
+ )
2538
+ }
2539
+ var staticRenderFns = []
2540
+ render._withStripped = true
2541
+
2542
+
2543
+ // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=37500abf
2544
+
2545
+ // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
2546
+ var merge_ = __webpack_require__(6);
2547
+ var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
2548
+
2549
+ // CONCATENATED MODULE: ./packages/tree/src/model/util.js
2550
+ var NODE_KEY = '$treeNodeId';
2551
+
2552
+ var markNodeData = function markNodeData(node, data) {
2553
+ if (!data || data[NODE_KEY]) return;
2554
+ Object.defineProperty(data, NODE_KEY, {
2555
+ value: node.id,
2556
+ enumerable: false,
2557
+ configurable: false,
2558
+ writable: false
2559
+ });
2560
+ };
2561
+
2562
+ var util_getNodeKey = function getNodeKey(key, data) {
2563
+ if (!key) return data[NODE_KEY];
2564
+ return data[key];
2565
+ };
2566
+
2567
+ var findNearestComponent = function findNearestComponent(element, componentName) {
2568
+ var target = element;
2569
+ while (target && target.tagName !== 'BODY') {
2570
+ if (target.__vue__ && target.__vue__.$options.name === componentName) {
2571
+ return target.__vue__;
2572
+ }
2573
+ target = target.parentNode;
2574
+ }
2575
+ return null;
2576
+ };
2577
+ // EXTERNAL MODULE: external "element-ui/lib/utils/util"
2578
+ var util_ = __webpack_require__(3);
2579
+
2580
+ // CONCATENATED MODULE: ./packages/tree/src/model/node.js
2581
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2582
+
2583
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2584
+
2585
+
2586
+
2587
+
2588
+
2589
+ var getChildState = function getChildState(node) {
2590
+ var all = true;
2591
+ var none = true;
2592
+ var allWithoutDisable = true;
2593
+ for (var i = 0, j = node.length; i < j; i++) {
2594
+ var n = node[i];
2595
+ if (n.checked !== true || n.indeterminate) {
2596
+ all = false;
2597
+ if (!n.disabled) {
2598
+ allWithoutDisable = false;
2599
+ }
2600
+ }
2601
+ if (n.checked !== false || n.indeterminate) {
2602
+ none = false;
2603
+ }
2604
+ }
2605
+
2606
+ return { all: all, none: none, allWithoutDisable: allWithoutDisable, half: !all && !none };
2607
+ };
2608
+
2609
+ var reInitChecked = function reInitChecked(node) {
2610
+ if (node.childNodes.length === 0 || node.loading) return;
2611
+
2612
+ var _getChildState = getChildState(node.childNodes),
2613
+ all = _getChildState.all,
2614
+ none = _getChildState.none,
2615
+ half = _getChildState.half;
2616
+
2617
+ if (all) {
2618
+ node.checked = true;
2619
+ node.indeterminate = false;
2620
+ } else if (half) {
2621
+ node.checked = false;
2622
+ node.indeterminate = true;
2623
+ } else if (none) {
2624
+ node.checked = false;
2625
+ node.indeterminate = false;
2626
+ }
2627
+
2628
+ var parent = node.parent;
2629
+ if (!parent || parent.level === 0) return;
2630
+
2631
+ if (!node.store.checkStrictly) {
2632
+ reInitChecked(parent);
2633
+ }
2634
+ };
2635
+
2636
+ var getPropertyFromData = function getPropertyFromData(node, prop) {
2637
+ var props = node.store.props;
2638
+ var data = node.data || {};
2639
+ var config = props[prop];
2640
+
2641
+ if (typeof config === 'function') {
2642
+ return config(data, node);
2643
+ } else if (typeof config === 'string') {
2644
+ return data[config];
2645
+ } else if (typeof config === 'undefined') {
2646
+ var dataProp = data[prop];
2647
+ return dataProp === undefined ? '' : dataProp;
2648
+ }
2649
+ };
2650
+
2651
+ var nodeIdSeed = 0;
2652
+
2653
+ var node_Node = function () {
2654
+ function Node(options) {
2655
+ _classCallCheck(this, Node);
2656
+
2657
+ this.id = nodeIdSeed++;
2658
+ this.text = null;
2659
+ this.checked = false;
2660
+ this.indeterminate = false;
2661
+ this.data = null;
2662
+ this.expanded = false;
2663
+ this.parent = null;
2664
+ this.visible = true;
2665
+ this.isCurrent = false;
2666
+
2667
+ for (var name in options) {
2668
+ if (options.hasOwnProperty(name)) {
2669
+ this[name] = options[name];
2670
+ }
2671
+ }
2672
+
2673
+ // internal
2674
+ this.level = 0;
2675
+ this.loaded = false;
2676
+ this.childNodes = [];
2677
+ this.loading = false;
2678
+
2679
+ if (this.parent) {
2680
+ this.level = this.parent.level + 1;
2681
+ }
2682
+
2683
+ var store = this.store;
2684
+ if (!store) {
2685
+ throw new Error('[Node]store is required!');
2686
+ }
2687
+ store.registerNode(this);
2688
+
2689
+ var props = store.props;
2690
+ if (props && typeof props.isLeaf !== 'undefined') {
2691
+ var isLeaf = getPropertyFromData(this, 'isLeaf');
2692
+ if (typeof isLeaf === 'boolean') {
2693
+ this.isLeafByUser = isLeaf;
2694
+ }
2695
+ }
2696
+
2697
+ if (store.lazy !== true && this.data) {
2698
+ this.setData(this.data);
2699
+
2700
+ if (store.defaultExpandAll) {
2701
+ this.expanded = true;
2702
+ }
2703
+ } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
2704
+ this.expand();
2705
+ }
2706
+ if (!Array.isArray(this.data)) {
2707
+ markNodeData(this, this.data);
2708
+ }
2709
+ if (!this.data) return;
2710
+ var defaultExpandedKeys = store.defaultExpandedKeys;
2711
+ var key = store.key;
2712
+ if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
2713
+ this.expand(null, store.autoExpandParent);
2714
+ }
2715
+
2716
+ if (key && store.currentNodeKey !== undefined && this.key === store.currentNodeKey) {
2717
+ store.currentNode = this;
2718
+ store.currentNode.isCurrent = true;
2719
+ }
2720
+
2721
+ if (store.lazy) {
2722
+ store._initDefaultCheckedNode(this);
2723
+ }
2724
+
2725
+ this.updateLeafState();
2726
+ }
2727
+
2728
+ Node.prototype.setData = function setData(data) {
2729
+ if (!Array.isArray(data)) {
2730
+ markNodeData(this, data);
2731
+ }
2732
+
2733
+ this.data = data;
2734
+ this.childNodes = [];
2735
+
2736
+ var children = void 0;
2737
+ if (this.level === 0 && this.data instanceof Array) {
2738
+ children = this.data;
2739
+ } else {
2740
+ children = getPropertyFromData(this, 'children') || [];
2741
+ }
2742
+
2743
+ for (var i = 0, j = children.length; i < j; i++) {
2744
+ this.insertChild({ data: children[i] });
2745
+ }
2746
+ };
2747
+
2748
+ Node.prototype.contains = function contains(target) {
2749
+ var deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2750
+
2751
+ var walk = function walk(parent) {
2752
+ var children = parent.childNodes || [];
2753
+ var result = false;
2754
+ for (var i = 0, j = children.length; i < j; i++) {
2755
+ var child = children[i];
2756
+ if (child === target || deep && walk(child)) {
2757
+ result = true;
2758
+ break;
2759
+ }
2760
+ }
2761
+ return result;
2762
+ };
2763
+
2764
+ return walk(this);
2765
+ };
2766
+
2767
+ Node.prototype.remove = function remove() {
2768
+ var parent = this.parent;
2769
+ if (parent) {
2770
+ parent.removeChild(this);
2771
+ }
2772
+ };
2773
+
2774
+ Node.prototype.insertChild = function insertChild(child, index, batch) {
2775
+ if (!child) throw new Error('insertChild error: child is required.');
2776
+
2777
+ if (!(child instanceof Node)) {
2778
+ if (!batch) {
2779
+ var children = this.getChildren(true) || [];
2780
+ if (children.indexOf(child.data) === -1) {
2781
+ if (typeof index === 'undefined' || index < 0) {
2782
+ children.push(child.data);
2783
+ } else {
2784
+ children.splice(index, 0, child.data);
2785
+ }
2786
+ }
2787
+ }
2788
+ merge_default()(child, {
2789
+ parent: this,
2790
+ store: this.store
2791
+ });
2792
+ child = new Node(child);
2793
+ }
2794
+
2795
+ child.level = this.level + 1;
2796
+
2797
+ if (typeof index === 'undefined' || index < 0) {
2798
+ this.childNodes.push(child);
2799
+ } else {
2800
+ this.childNodes.splice(index, 0, child);
2801
+ }
2802
+
2803
+ this.updateLeafState();
2804
+ };
2805
+
2806
+ Node.prototype.insertBefore = function insertBefore(child, ref) {
2807
+ var index = void 0;
2808
+ if (ref) {
2809
+ index = this.childNodes.indexOf(ref);
2810
+ }
2811
+ this.insertChild(child, index);
2812
+ };
2813
+
2814
+ Node.prototype.insertAfter = function insertAfter(child, ref) {
2815
+ var index = void 0;
2816
+ if (ref) {
2817
+ index = this.childNodes.indexOf(ref);
2818
+ if (index !== -1) index += 1;
2819
+ }
2820
+ this.insertChild(child, index);
2821
+ };
2822
+
2823
+ Node.prototype.removeChild = function removeChild(child) {
2824
+ var children = this.getChildren() || [];
2825
+ var dataIndex = children.indexOf(child.data);
2826
+ if (dataIndex > -1) {
2827
+ children.splice(dataIndex, 1);
2828
+ }
2829
+
2830
+ var index = this.childNodes.indexOf(child);
2831
+
2832
+ if (index > -1) {
2833
+ this.store && this.store.deregisterNode(child);
2834
+ child.parent = null;
2835
+ this.childNodes.splice(index, 1);
2836
+ }
2837
+
2838
+ this.updateLeafState();
2839
+ };
2840
+
2841
+ Node.prototype.removeChildByData = function removeChildByData(data) {
2842
+ var targetNode = null;
2843
+
2844
+ for (var i = 0; i < this.childNodes.length; i++) {
2845
+ if (this.childNodes[i].data === data) {
2846
+ targetNode = this.childNodes[i];
2847
+ break;
2848
+ }
2849
+ }
2850
+
2851
+ if (targetNode) {
2852
+ this.removeChild(targetNode);
2853
+ }
2854
+ };
2855
+
2856
+ Node.prototype.expand = function expand(callback, expandParent) {
2857
+ var _this = this;
2858
+
2859
+ var done = function done() {
2860
+ if (expandParent) {
2861
+ var parent = _this.parent;
2862
+ while (parent.level > 0) {
2863
+ parent.expanded = true;
2864
+ parent = parent.parent;
2865
+ }
2866
+ }
2867
+ _this.expanded = true;
2868
+ if (callback) callback();
2869
+ };
2870
+
2871
+ if (this.shouldLoadData()) {
2872
+ this.loadData(function (data) {
2873
+ if (data instanceof Array) {
2874
+ if (_this.checked) {
2875
+ _this.setChecked(true, true);
2876
+ } else if (!_this.store.checkStrictly) {
2877
+ reInitChecked(_this);
2878
+ }
2879
+ done();
2880
+ }
2881
+ });
2882
+ } else {
2883
+ done();
2884
+ }
2885
+ };
2886
+
2887
+ Node.prototype.doCreateChildren = function doCreateChildren(array) {
2888
+ var _this2 = this;
2889
+
2890
+ var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2891
+
2892
+ array.forEach(function (item) {
2893
+ _this2.insertChild(merge_default()({ data: item }, defaultProps), undefined, true);
2894
+ });
2895
+ };
2896
+
2897
+ Node.prototype.collapse = function collapse() {
2898
+ this.expanded = false;
2899
+ };
2900
+
2901
+ Node.prototype.shouldLoadData = function shouldLoadData() {
2902
+ return this.store.lazy === true && this.store.load && !this.loaded;
2903
+ };
2904
+
2905
+ Node.prototype.updateLeafState = function updateLeafState() {
2906
+ if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
2907
+ this.isLeaf = this.isLeafByUser;
2908
+ return;
2909
+ }
2910
+ var childNodes = this.childNodes;
2911
+ if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
2912
+ this.isLeaf = !childNodes || childNodes.length === 0;
2913
+ return;
2914
+ }
2915
+ this.isLeaf = false;
2916
+ };
2917
+
2918
+ Node.prototype.setChecked = function setChecked(value, deep, recursion, passValue) {
2919
+ var _this3 = this;
2920
+
2921
+ this.indeterminate = value === 'half';
2922
+ this.checked = value === true;
2923
+
2924
+ if (this.store.checkStrictly) return;
2925
+
2926
+ if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
2927
+ var _getChildState2 = getChildState(this.childNodes),
2928
+ all = _getChildState2.all,
2929
+ allWithoutDisable = _getChildState2.allWithoutDisable;
2930
+
2931
+ if (!this.isLeaf && !all && allWithoutDisable) {
2932
+ this.checked = false;
2933
+ value = false;
2934
+ }
2935
+
2936
+ var handleDescendants = function handleDescendants() {
2937
+ if (deep) {
2938
+ var childNodes = _this3.childNodes;
2939
+ for (var i = 0, j = childNodes.length; i < j; i++) {
2940
+ var child = childNodes[i];
2941
+ passValue = passValue || value !== false;
2942
+ var isCheck = child.disabled ? child.checked : passValue;
2943
+ child.setChecked(isCheck, deep, true, passValue);
2944
+ }
2945
+
2946
+ var _getChildState3 = getChildState(childNodes),
2947
+ half = _getChildState3.half,
2948
+ _all = _getChildState3.all;
2949
+
2950
+ if (!_all) {
2951
+ _this3.checked = _all;
2952
+ _this3.indeterminate = half;
2953
+ }
2954
+ }
2955
+ };
2956
+
2957
+ if (this.shouldLoadData()) {
2958
+ // Only work on lazy load data.
2959
+ this.loadData(function () {
2960
+ handleDescendants();
2961
+ reInitChecked(_this3);
2962
+ }, {
2963
+ checked: value !== false
2964
+ });
2965
+ return;
2966
+ } else {
2967
+ handleDescendants();
2968
+ }
2969
+ }
2970
+
2971
+ var parent = this.parent;
2972
+ if (!parent || parent.level === 0) return;
2973
+
2974
+ if (!recursion) {
2975
+ reInitChecked(parent);
2976
+ }
2977
+ };
2978
+
2979
+ Node.prototype.getChildren = function getChildren() {
2980
+ var forceInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2981
+ // this is data
2982
+ if (this.level === 0) return this.data;
2983
+ var data = this.data;
2984
+ if (!data) return null;
2985
+
2986
+ var props = this.store.props;
2987
+ var children = 'children';
2988
+ if (props) {
2989
+ children = props.children || 'children';
2990
+ }
2991
+
2992
+ if (data[children] === undefined) {
2993
+ data[children] = null;
2994
+ }
2995
+
2996
+ if (forceInit && !data[children]) {
2997
+ data[children] = [];
2998
+ }
2999
+
3000
+ return data[children];
3001
+ };
3002
+
3003
+ Node.prototype.updateChildren = function updateChildren() {
3004
+ var _this4 = this;
3005
+
3006
+ var newData = this.getChildren() || [];
3007
+ var oldData = this.childNodes.map(function (node) {
3008
+ return node.data;
3009
+ });
3010
+
3011
+ var newDataMap = {};
3012
+ var newNodes = [];
3013
+
3014
+ newData.forEach(function (item, index) {
3015
+ var key = item[NODE_KEY];
3016
+ var isNodeExists = !!key && Object(util_["arrayFindIndex"])(oldData, function (data) {
3017
+ return data[NODE_KEY] === key;
3018
+ }) >= 0;
3019
+ if (isNodeExists) {
3020
+ newDataMap[key] = { index: index, data: item };
3021
+ } else {
3022
+ newNodes.push({ index: index, data: item });
3023
+ }
3024
+ });
3025
+
3026
+ if (!this.store.lazy) {
3027
+ oldData.forEach(function (item) {
3028
+ if (!newDataMap[item[NODE_KEY]]) _this4.removeChildByData(item);
3029
+ });
3030
+ }
3031
+
3032
+ newNodes.forEach(function (_ref) {
3033
+ var index = _ref.index,
3034
+ data = _ref.data;
3035
+
3036
+ _this4.insertChild({ data: data }, index);
3037
+ });
3038
+
3039
+ this.updateLeafState();
3040
+ };
3041
+
3042
+ Node.prototype.loadData = function loadData(callback) {
3043
+ var _this5 = this;
3044
+
3045
+ var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3046
+
3047
+ if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
3048
+ this.loading = true;
3049
+
3050
+ var resolve = function resolve(children) {
3051
+ _this5.childNodes = [];
3052
+
3053
+ _this5.doCreateChildren(children, defaultProps);
3054
+ _this5.loaded = true;
3055
+ _this5.loading = false;
3056
+ _this5.updateLeafState();
3057
+ if (callback) {
3058
+ callback.call(_this5, children);
3059
+ }
3060
+ };
3061
+
3062
+ this.store.load(this, resolve);
3063
+ } else {
3064
+ if (callback) {
3065
+ callback.call(this);
3066
+ }
3067
+ }
3068
+ };
3069
+
3070
+ _createClass(Node, [{
3071
+ key: 'label',
3072
+ get: function get() {
3073
+ return getPropertyFromData(this, 'label');
3074
+ }
3075
+ }, {
3076
+ key: 'key',
3077
+ get: function get() {
3078
+ var nodeKey = this.store.key;
3079
+ if (this.data) return this.data[nodeKey];
3080
+ return null;
3081
+ }
3082
+ }, {
3083
+ key: 'disabled',
3084
+ get: function get() {
3085
+ return getPropertyFromData(this, 'disabled');
3086
+ }
3087
+ }, {
3088
+ key: 'nextSibling',
3089
+ get: function get() {
3090
+ var parent = this.parent;
3091
+ if (parent) {
3092
+ var index = parent.childNodes.indexOf(this);
3093
+ if (index > -1) {
3094
+ return parent.childNodes[index + 1];
3095
+ }
3096
+ }
3097
+ return null;
3098
+ }
3099
+ }, {
3100
+ key: 'previousSibling',
3101
+ get: function get() {
3102
+ var parent = this.parent;
3103
+ if (parent) {
3104
+ var index = parent.childNodes.indexOf(this);
3105
+ if (index > -1) {
3106
+ return index > 0 ? parent.childNodes[index - 1] : null;
3107
+ }
3108
+ }
3109
+ return null;
3110
+ }
3111
+ }]);
3112
+
3113
+ return Node;
3114
+ }();
3115
+
3116
+ /* harmony default export */ var model_node = (node_Node);
3117
+ // CONCATENATED MODULE: ./packages/tree/src/model/tree-store.js
3118
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3119
+
3120
+ function tree_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3121
+
3122
+
3123
+
3124
+
3125
+ var tree_store_TreeStore = function () {
3126
+ function TreeStore(options) {
3127
+ var _this = this;
3128
+
3129
+ tree_store_classCallCheck(this, TreeStore);
3130
+
3131
+ this.currentNode = null;
3132
+ this.currentNodeKey = null;
3133
+
3134
+ for (var option in options) {
3135
+ if (options.hasOwnProperty(option)) {
3136
+ this[option] = options[option];
3137
+ }
3138
+ }
3139
+
3140
+ this.nodesMap = {};
3141
+
3142
+ this.root = new model_node({
3143
+ data: this.data,
3144
+ store: this
3145
+ });
3146
+
3147
+ if (this.lazy && this.load) {
3148
+ var loadFn = this.load;
3149
+ loadFn(this.root, function (data) {
3150
+ _this.root.doCreateChildren(data);
3151
+ _this._initDefaultCheckedNodes();
3152
+ });
3153
+ } else {
3154
+ this._initDefaultCheckedNodes();
3155
+ }
3156
+ }
3157
+
3158
+ TreeStore.prototype.filter = function filter(value) {
3159
+ var filterNodeMethod = this.filterNodeMethod;
3160
+ var lazy = this.lazy;
3161
+ var traverse = function traverse(node) {
3162
+ var childNodes = node.root ? node.root.childNodes : node.childNodes;
3163
+
3164
+ childNodes.forEach(function (child) {
3165
+ child.visible = filterNodeMethod.call(child, value, child.data, child);
3166
+
3167
+ traverse(child);
3168
+ });
3169
+
3170
+ if (!node.visible && childNodes.length) {
3171
+ var allHidden = true;
3172
+ allHidden = !childNodes.some(function (child) {
3173
+ return child.visible;
3174
+ });
3175
+
3176
+ if (node.root) {
3177
+ node.root.visible = allHidden === false;
3178
+ } else {
3179
+ node.visible = allHidden === false;
3180
+ }
3181
+ }
3182
+ if (!value) return;
3183
+
3184
+ if (node.visible && !node.isLeaf && !lazy) node.expand();
3185
+ };
3186
+
3187
+ traverse(this);
3188
+ };
3189
+
3190
+ TreeStore.prototype.setData = function setData(newVal) {
3191
+ var instanceChanged = newVal !== this.root.data;
3192
+ if (instanceChanged) {
3193
+ this.root.setData(newVal);
3194
+ this._initDefaultCheckedNodes();
3195
+ } else {
3196
+ this.root.updateChildren();
3197
+ }
3198
+ };
3199
+
3200
+ TreeStore.prototype.getNode = function getNode(data) {
3201
+ if (data instanceof model_node) return data;
3202
+ var key = (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object' ? data : util_getNodeKey(this.key, data);
3203
+ return this.nodesMap[key] || null;
3204
+ };
3205
+
3206
+ TreeStore.prototype.insertBefore = function insertBefore(data, refData) {
3207
+ var refNode = this.getNode(refData);
3208
+ refNode.parent.insertBefore({ data: data }, refNode);
3209
+ };
3210
+
3211
+ TreeStore.prototype.insertAfter = function insertAfter(data, refData) {
3212
+ var refNode = this.getNode(refData);
3213
+ refNode.parent.insertAfter({ data: data }, refNode);
3214
+ };
3215
+
3216
+ TreeStore.prototype.remove = function remove(data) {
3217
+ var node = this.getNode(data);
3218
+
3219
+ if (node && node.parent) {
3220
+ if (node === this.currentNode) {
3221
+ this.currentNode = null;
3222
+ }
3223
+ node.parent.removeChild(node);
3224
+ }
3225
+ };
3226
+
3227
+ TreeStore.prototype.append = function append(data, parentData) {
3228
+ var parentNode = parentData ? this.getNode(parentData) : this.root;
3229
+
3230
+ if (parentNode) {
3231
+ parentNode.insertChild({ data: data });
3232
+ }
3233
+ };
3234
+
3235
+ TreeStore.prototype._initDefaultCheckedNodes = function _initDefaultCheckedNodes() {
3236
+ var _this2 = this;
3237
+
3238
+ var defaultCheckedKeys = this.defaultCheckedKeys || [];
3239
+ var nodesMap = this.nodesMap;
3240
+
3241
+ defaultCheckedKeys.forEach(function (checkedKey) {
3242
+ var node = nodesMap[checkedKey];
3243
+
3244
+ if (node) {
3245
+ node.setChecked(true, !_this2.checkStrictly);
3246
+ }
3247
+ });
3248
+ };
3249
+
3250
+ TreeStore.prototype._initDefaultCheckedNode = function _initDefaultCheckedNode(node) {
3251
+ var defaultCheckedKeys = this.defaultCheckedKeys || [];
3252
+
3253
+ if (defaultCheckedKeys.indexOf(node.key) !== -1) {
3254
+ node.setChecked(true, !this.checkStrictly);
3255
+ }
3256
+ };
3257
+
3258
+ TreeStore.prototype.setDefaultCheckedKey = function setDefaultCheckedKey(newVal) {
3259
+ if (newVal !== this.defaultCheckedKeys) {
3260
+ this.defaultCheckedKeys = newVal;
3261
+ this._initDefaultCheckedNodes();
3262
+ }
3263
+ };
3264
+
3265
+ TreeStore.prototype.registerNode = function registerNode(node) {
3266
+ var key = this.key;
3267
+ if (!key || !node || !node.data) return;
3268
+
3269
+ var nodeKey = node.key;
3270
+ if (nodeKey !== undefined) this.nodesMap[node.key] = node;
3271
+ };
3272
+
3273
+ TreeStore.prototype.deregisterNode = function deregisterNode(node) {
3274
+ var _this3 = this;
3275
+
3276
+ var key = this.key;
3277
+ if (!key || !node || !node.data) return;
3278
+
3279
+ node.childNodes.forEach(function (child) {
3280
+ _this3.deregisterNode(child);
3281
+ });
3282
+
3283
+ delete this.nodesMap[node.key];
3284
+ };
3285
+
3286
+ TreeStore.prototype.getCheckedNodes = function getCheckedNodes() {
3287
+ var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
3288
+ var includeHalfChecked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3289
+
3290
+ var checkedNodes = [];
3291
+ var traverse = function traverse(node) {
3292
+ var childNodes = node.root ? node.root.childNodes : node.childNodes;
3293
+
3294
+ childNodes.forEach(function (child) {
3295
+ if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
3296
+ checkedNodes.push(child.data);
3297
+ }
3298
+
3299
+ traverse(child);
3300
+ });
3301
+ };
3302
+
3303
+ traverse(this);
3304
+
3305
+ return checkedNodes;
3306
+ };
3307
+
3308
+ TreeStore.prototype.getCheckedKeys = function getCheckedKeys() {
3309
+ var _this4 = this;
3310
+
3311
+ var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
3312
+
3313
+ return this.getCheckedNodes(leafOnly).map(function (data) {
3314
+ return (data || {})[_this4.key];
3315
+ });
3316
+ };
3317
+
3318
+ TreeStore.prototype.getHalfCheckedNodes = function getHalfCheckedNodes() {
3319
+ var nodes = [];
3320
+ var traverse = function traverse(node) {
3321
+ var childNodes = node.root ? node.root.childNodes : node.childNodes;
3322
+
3323
+ childNodes.forEach(function (child) {
3324
+ if (child.indeterminate) {
3325
+ nodes.push(child.data);
3326
+ }
3327
+
3328
+ traverse(child);
3329
+ });
3330
+ };
3331
+
3332
+ traverse(this);
3333
+
3334
+ return nodes;
3335
+ };
3336
+
3337
+ TreeStore.prototype.getHalfCheckedKeys = function getHalfCheckedKeys() {
3338
+ var _this5 = this;
3339
+
3340
+ return this.getHalfCheckedNodes().map(function (data) {
3341
+ return (data || {})[_this5.key];
3342
+ });
3343
+ };
3344
+
3345
+ TreeStore.prototype._getAllNodes = function _getAllNodes() {
3346
+ var allNodes = [];
3347
+ var nodesMap = this.nodesMap;
3348
+ for (var nodeKey in nodesMap) {
3349
+ if (nodesMap.hasOwnProperty(nodeKey)) {
3350
+ allNodes.push(nodesMap[nodeKey]);
3351
+ }
3352
+ }
3353
+
3354
+ return allNodes;
3355
+ };
3356
+
3357
+ TreeStore.prototype.updateChildren = function updateChildren(key, data) {
3358
+ var node = this.nodesMap[key];
3359
+ if (!node) return;
3360
+ var childNodes = node.childNodes;
3361
+ for (var i = childNodes.length - 1; i >= 0; i--) {
3362
+ var child = childNodes[i];
3363
+ this.remove(child.data);
3364
+ }
3365
+ for (var _i = 0, j = data.length; _i < j; _i++) {
3366
+ var _child = data[_i];
3367
+ this.append(_child, node.data);
3368
+ }
3369
+ };
3370
+
3371
+ TreeStore.prototype._setCheckedKeys = function _setCheckedKeys(key) {
3372
+ var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3373
+ var checkedKeys = arguments[2];
3374
+
3375
+ var allNodes = this._getAllNodes().sort(function (a, b) {
3376
+ return b.level - a.level;
3377
+ });
3378
+ var cache = Object.create(null);
3379
+ var keys = Object.keys(checkedKeys);
3380
+ allNodes.forEach(function (node) {
3381
+ return node.setChecked(false, false);
3382
+ });
3383
+ for (var i = 0, j = allNodes.length; i < j; i++) {
3384
+ var node = allNodes[i];
3385
+ var nodeKey = node.data[key].toString();
3386
+ var checked = keys.indexOf(nodeKey) > -1;
3387
+ if (!checked) {
3388
+ if (node.checked && !cache[nodeKey]) {
3389
+ node.setChecked(false, false);
3390
+ }
3391
+ continue;
3392
+ }
3393
+
3394
+ var parent = node.parent;
3395
+ while (parent && parent.level > 0) {
3396
+ cache[parent.data[key]] = true;
3397
+ parent = parent.parent;
3398
+ }
3399
+
3400
+ if (node.isLeaf || this.checkStrictly) {
3401
+ node.setChecked(true, false);
3402
+ continue;
3403
+ }
3404
+ node.setChecked(true, true);
3405
+
3406
+ if (leafOnly) {
3407
+ (function () {
3408
+ node.setChecked(false, false);
3409
+ var traverse = function traverse(node) {
3410
+ var childNodes = node.childNodes;
3411
+ childNodes.forEach(function (child) {
3412
+ if (!child.isLeaf) {
3413
+ child.setChecked(false, false);
3414
+ }
3415
+ traverse(child);
3416
+ });
3417
+ };
3418
+ traverse(node);
3419
+ })();
3420
+ }
3421
+ }
3422
+ };
3423
+
3424
+ TreeStore.prototype.setCheckedNodes = function setCheckedNodes(array) {
3425
+ var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3426
+
3427
+ var key = this.key;
3428
+ var checkedKeys = {};
3429
+ array.forEach(function (item) {
3430
+ checkedKeys[(item || {})[key]] = true;
3431
+ });
3432
+
3433
+ this._setCheckedKeys(key, leafOnly, checkedKeys);
3434
+ };
3435
+
3436
+ TreeStore.prototype.setCheckedKeys = function setCheckedKeys(keys) {
3437
+ var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3438
+
3439
+ this.defaultCheckedKeys = keys;
3440
+ var key = this.key;
3441
+ var checkedKeys = {};
3442
+ keys.forEach(function (key) {
3443
+ checkedKeys[key] = true;
3444
+ });
3445
+
3446
+ this._setCheckedKeys(key, leafOnly, checkedKeys);
3447
+ };
3448
+
3449
+ TreeStore.prototype.setDefaultExpandedKeys = function setDefaultExpandedKeys(keys) {
3450
+ var _this6 = this;
3451
+
3452
+ keys = keys || [];
3453
+ this.defaultExpandedKeys = keys;
3454
+
3455
+ keys.forEach(function (key) {
3456
+ var node = _this6.getNode(key);
3457
+ if (node) node.expand(null, _this6.autoExpandParent);
3458
+ });
3459
+ };
3460
+
3461
+ TreeStore.prototype.setChecked = function setChecked(data, checked, deep) {
3462
+ var node = this.getNode(data);
3463
+
3464
+ if (node) {
3465
+ node.setChecked(!!checked, deep);
3466
+ }
3467
+ };
3468
+
3469
+ TreeStore.prototype.getCurrentNode = function getCurrentNode() {
3470
+ return this.currentNode;
3471
+ };
3472
+
3473
+ TreeStore.prototype.setCurrentNode = function setCurrentNode(currentNode) {
3474
+ var prevCurrentNode = this.currentNode;
3475
+ if (prevCurrentNode) {
3476
+ prevCurrentNode.isCurrent = false;
3477
+ }
3478
+ this.currentNode = currentNode;
3479
+ this.currentNode.isCurrent = true;
3480
+ };
3481
+
3482
+ TreeStore.prototype.setUserCurrentNode = function setUserCurrentNode(node) {
3483
+ var key = node[this.key];
3484
+ var currNode = this.nodesMap[key];
3485
+ this.setCurrentNode(currNode);
3486
+ };
3487
+
3488
+ TreeStore.prototype.setCurrentNodeKey = function setCurrentNodeKey(key) {
3489
+ if (key === null || key === undefined) {
3490
+ this.currentNode && (this.currentNode.isCurrent = false);
3491
+ this.currentNode = null;
3492
+ return;
3493
+ }
3494
+ var node = this.getNode(key);
3495
+ if (node) {
3496
+ this.setCurrentNode(node);
3497
+ }
3498
+ };
3499
+
3500
+ return TreeStore;
3501
+ }();
3502
+
3503
+ /* harmony default export */ var tree_store = (tree_store_TreeStore);
3504
+ ;
3505
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=template&id=769053c6
3506
+ var tree_nodevue_type_template_id_769053c6_render = function () {
3507
+ var this$1 = this
3508
+ var _vm = this
3509
+ var _h = _vm.$createElement
3510
+ var _c = _vm._self._c || _h
3511
+ return _c(
3512
+ "div",
3513
+ {
3514
+ directives: [
3515
+ {
3516
+ name: "show",
3517
+ rawName: "v-show",
3518
+ value: _vm.node.visible,
3519
+ expression: "node.visible",
3520
+ },
3521
+ ],
3522
+ ref: "node",
3523
+ staticClass: "el-tree-node",
3524
+ class: {
3525
+ "is-expanded": _vm.expanded,
3526
+ "is-current": _vm.node.isCurrent,
3527
+ "is-hidden": !_vm.node.visible,
3528
+ "is-focusable": !_vm.node.disabled,
3529
+ "is-checked": !_vm.node.disabled && _vm.node.checked,
3530
+ },
3531
+ attrs: {
3532
+ role: "treeitem",
3533
+ tabindex: "-1",
3534
+ "aria-expanded": _vm.expanded,
3535
+ "aria-disabled": _vm.node.disabled,
3536
+ "aria-checked": _vm.node.checked,
3537
+ draggable: _vm.tree.draggable,
3538
+ },
3539
+ on: {
3540
+ click: function ($event) {
3541
+ $event.stopPropagation()
3542
+ return _vm.handleClick($event)
3543
+ },
3544
+ contextmenu: function ($event) {
3545
+ return this$1.handleContextMenu($event)
3546
+ },
3547
+ dragstart: function ($event) {
3548
+ $event.stopPropagation()
3549
+ return _vm.handleDragStart($event)
3550
+ },
3551
+ dragover: function ($event) {
3552
+ $event.stopPropagation()
3553
+ return _vm.handleDragOver($event)
3554
+ },
3555
+ dragend: function ($event) {
3556
+ $event.stopPropagation()
3557
+ return _vm.handleDragEnd($event)
3558
+ },
3559
+ drop: function ($event) {
3560
+ $event.stopPropagation()
3561
+ return _vm.handleDrop($event)
3562
+ },
3563
+ },
3564
+ },
3565
+ [
3566
+ _c(
3567
+ "div",
3568
+ {
3569
+ staticClass: "el-tree-node__content",
3570
+ style: {
3571
+ "padding-left": (_vm.node.level - 1) * _vm.tree.indent + "px",
3572
+ },
3573
+ },
3574
+ [
3575
+ _c("span", {
3576
+ class: [
3577
+ {
3578
+ "is-leaf": _vm.node.isLeaf,
3579
+ expanded: !_vm.node.isLeaf && _vm.expanded,
3580
+ },
3581
+ "el-tree-node__expand-icon",
3582
+ _vm.tree.iconClass ? _vm.tree.iconClass : "el-icon-caret-right",
3583
+ ],
3584
+ on: {
3585
+ click: function ($event) {
3586
+ $event.stopPropagation()
3587
+ return _vm.handleExpandIconClick($event)
3588
+ },
3589
+ },
3590
+ }),
3591
+ _vm.showCheckbox
3592
+ ? _c("el-checkbox", {
3593
+ attrs: {
3594
+ indeterminate: _vm.node.indeterminate,
3595
+ disabled: !!_vm.node.disabled,
3596
+ },
3597
+ on: { change: _vm.handleCheckChange },
3598
+ nativeOn: {
3599
+ click: function ($event) {
3600
+ $event.stopPropagation()
3601
+ },
3602
+ },
3603
+ model: {
3604
+ value: _vm.node.checked,
3605
+ callback: function ($$v) {
3606
+ _vm.$set(_vm.node, "checked", $$v)
3607
+ },
3608
+ expression: "node.checked",
3609
+ },
3610
+ })
3611
+ : _vm._e(),
3612
+ _vm.node.loading
3613
+ ? _c("span", {
3614
+ staticClass: "el-tree-node__loading-icon el-icon-loading",
3615
+ })
3616
+ : _vm._e(),
3617
+ _c("node-content", { attrs: { node: _vm.node } }),
3618
+ ],
3619
+ 1
3620
+ ),
3621
+ _c("el-collapse-transition", [
3622
+ !_vm.renderAfterExpand || _vm.childNodeRendered
3623
+ ? _c(
3624
+ "div",
3625
+ {
3626
+ directives: [
3627
+ {
3628
+ name: "show",
3629
+ rawName: "v-show",
3630
+ value: _vm.expanded,
3631
+ expression: "expanded",
3632
+ },
3633
+ ],
3634
+ staticClass: "el-tree-node__children",
3635
+ attrs: { role: "group", "aria-expanded": _vm.expanded },
3636
+ },
3637
+ _vm._l(_vm.node.childNodes, function (child) {
3638
+ return _c("el-tree-node", {
3639
+ key: _vm.getNodeKey(child),
3640
+ attrs: {
3641
+ "render-content": _vm.renderContent,
3642
+ "render-after-expand": _vm.renderAfterExpand,
3643
+ "show-checkbox": _vm.showCheckbox,
3644
+ node: child,
3645
+ },
3646
+ on: { "node-expand": _vm.handleChildNodeExpand },
3647
+ })
3648
+ }),
3649
+ 1
3650
+ )
3651
+ : _vm._e(),
3652
+ ]),
3653
+ ],
3654
+ 1
3655
+ )
3656
+ }
3657
+ var tree_nodevue_type_template_id_769053c6_staticRenderFns = []
3658
+ tree_nodevue_type_template_id_769053c6_render._withStripped = true
3659
+
3660
+
3661
+ // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=template&id=769053c6
3662
+
3663
+ // EXTERNAL MODULE: external "element-ui/lib/transitions/collapse-transition"
3664
+ var collapse_transition_ = __webpack_require__(27);
3665
+ var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
3666
+
3667
+ // EXTERNAL MODULE: ./packages/checkbox/index.js + 5 modules
3668
+ var packages_checkbox = __webpack_require__(16);
3669
+
3670
+ // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
3671
+ var emitter_ = __webpack_require__(4);
3672
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
3673
+
3674
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=script&lang=js
3675
+ //
3676
+ //
3677
+ //
3678
+ //
3679
+ //
3680
+ //
3681
+ //
3682
+ //
3683
+ //
3684
+ //
3685
+ //
3686
+ //
3687
+ //
3688
+ //
3689
+ //
3690
+ //
3691
+ //
3692
+ //
3693
+ //
3694
+ //
3695
+ //
3696
+ //
3697
+ //
3698
+ //
3699
+ //
3700
+ //
3701
+ //
3702
+ //
3703
+ //
3704
+ //
3705
+ //
3706
+ //
3707
+ //
3708
+ //
3709
+ //
3710
+ //
3711
+ //
3712
+ //
3713
+ //
3714
+ //
3715
+ //
3716
+ //
3717
+ //
3718
+ //
3719
+ //
3720
+ //
3721
+ //
3722
+ //
3723
+ //
3724
+ //
3725
+ //
3726
+ //
3727
+ //
3728
+ //
3729
+ //
3730
+ //
3731
+ //
3732
+ //
3733
+ //
3734
+ //
3735
+ //
3736
+ //
3737
+ //
3738
+ //
3739
+ //
3740
+ //
3741
+ //
3742
+ //
3743
+ //
3744
+ //
3745
+ //
3746
+ //
3747
+ //
3748
+
3749
+
3750
+
3751
+
3752
+
3753
+
3754
+ /* harmony default export */ var tree_nodevue_type_script_lang_js = ({
3755
+ name: 'ElTreeNode',
3756
+
3757
+ componentName: 'ElTreeNode',
3758
+
3759
+ mixins: [emitter_default.a],
3760
+
3761
+ props: {
3762
+ node: {
3763
+ default: function _default() {
3764
+ return {};
3765
+ }
3766
+ },
3767
+ props: {},
3768
+ renderContent: Function,
3769
+ renderAfterExpand: {
3770
+ type: Boolean,
3771
+ default: true
3772
+ },
3773
+ showCheckbox: {
3774
+ type: Boolean,
3775
+ default: false
3776
+ }
3777
+ },
3778
+
3779
+ components: {
3780
+ ElCollapseTransition: collapse_transition_default.a,
3781
+ ElCheckbox: packages_checkbox["default"],
3782
+ NodeContent: {
3783
+ props: {
3784
+ node: {
3785
+ required: true
3786
+ }
3787
+ },
3788
+ render: function render(h) {
3789
+ var parent = this.$parent;
3790
+ var tree = parent.tree;
3791
+ var node = this.node;
3792
+ var data = node.data,
3793
+ store = node.store;
3794
+
3795
+ return parent.renderContent ? parent.renderContent.call(parent._renderProxy, h, { _self: tree.$vnode.context, node: node, data: data, store: store }) : tree.$scopedSlots.default ? tree.$scopedSlots.default({ node: node, data: data }) : h(
3796
+ 'span',
3797
+ { 'class': 'el-tree-node__label' },
3798
+ [node.label]
3799
+ );
3800
+ }
3801
+ }
3802
+ },
3803
+
3804
+ data: function data() {
3805
+ return {
3806
+ tree: null,
3807
+ expanded: false,
3808
+ childNodeRendered: false,
3809
+ oldChecked: null,
3810
+ oldIndeterminate: null
3811
+ };
3812
+ },
3813
+
3814
+
3815
+ watch: {
3816
+ 'node.indeterminate': function nodeIndeterminate(val) {
3817
+ this.handleSelectChange(this.node.checked, val);
3818
+ },
3819
+ 'node.checked': function nodeChecked(val) {
3820
+ this.handleSelectChange(val, this.node.indeterminate);
3821
+ },
3822
+ 'node.expanded': function nodeExpanded(val) {
3823
+ var _this = this;
3824
+
3825
+ this.$nextTick(function () {
3826
+ return _this.expanded = val;
3827
+ });
3828
+ if (val) {
3829
+ this.childNodeRendered = true;
3830
+ }
3831
+ }
3832
+ },
3833
+
3834
+ methods: {
3835
+ getNodeKey: function getNodeKey(node) {
3836
+ return util_getNodeKey(this.tree.nodeKey, node.data);
3837
+ },
3838
+ handleSelectChange: function handleSelectChange(checked, indeterminate) {
3839
+ if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
3840
+ this.tree.$emit('check-change', this.node.data, checked, indeterminate);
3841
+ }
3842
+ this.oldChecked = checked;
3843
+ this.indeterminate = indeterminate;
3844
+ },
3845
+ handleClick: function handleClick() {
3846
+ var store = this.tree.store;
3847
+ store.setCurrentNode(this.node);
3848
+ this.tree.$emit('current-change', store.currentNode ? store.currentNode.data : null, store.currentNode);
3849
+ this.tree.currentNode = this;
3850
+ if (this.tree.expandOnClickNode) {
3851
+ this.handleExpandIconClick();
3852
+ }
3853
+ if (this.tree.checkOnClickNode && !this.node.disabled) {
3854
+ this.handleCheckChange(null, {
3855
+ target: { checked: !this.node.checked }
3856
+ });
3857
+ }
3858
+ this.tree.$emit('node-click', this.node.data, this.node, this);
3859
+ },
3860
+ handleContextMenu: function handleContextMenu(event) {
3861
+ if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
3862
+ event.stopPropagation();
3863
+ event.preventDefault();
3864
+ }
3865
+ this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this);
3866
+ },
3867
+ handleExpandIconClick: function handleExpandIconClick() {
3868
+ if (this.node.isLeaf) return;
3869
+ if (this.expanded) {
3870
+ this.tree.$emit('node-collapse', this.node.data, this.node, this);
3871
+ this.node.collapse();
3872
+ } else {
3873
+ this.node.expand();
3874
+ this.$emit('node-expand', this.node.data, this.node, this);
3875
+ }
3876
+ },
3877
+ handleCheckChange: function handleCheckChange(value, ev) {
3878
+ var _this2 = this;
3879
+
3880
+ this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
3881
+ this.$nextTick(function () {
3882
+ var store = _this2.tree.store;
3883
+ _this2.tree.$emit('check', _this2.node.data, {
3884
+ checkedNodes: store.getCheckedNodes(),
3885
+ checkedKeys: store.getCheckedKeys(),
3886
+ halfCheckedNodes: store.getHalfCheckedNodes(),
3887
+ halfCheckedKeys: store.getHalfCheckedKeys()
3888
+ });
3889
+ });
3890
+ },
3891
+ handleChildNodeExpand: function handleChildNodeExpand(nodeData, node, instance) {
3892
+ this.broadcast('ElTreeNode', 'tree-node-expand', node);
3893
+ this.tree.$emit('node-expand', nodeData, node, instance);
3894
+ },
3895
+ handleDragStart: function handleDragStart(event) {
3896
+ if (!this.tree.draggable) return;
3897
+ this.tree.$emit('tree-node-drag-start', event, this);
3898
+ },
3899
+ handleDragOver: function handleDragOver(event) {
3900
+ if (!this.tree.draggable) return;
3901
+ this.tree.$emit('tree-node-drag-over', event, this);
3902
+ event.preventDefault();
3903
+ },
3904
+ handleDrop: function handleDrop(event) {
3905
+ event.preventDefault();
3906
+ },
3907
+ handleDragEnd: function handleDragEnd(event) {
3908
+ if (!this.tree.draggable) return;
3909
+ this.tree.$emit('tree-node-drag-end', event, this);
3910
+ }
3911
+ },
3912
+
3913
+ created: function created() {
3914
+ var _this3 = this;
3915
+
3916
+ var parent = this.$parent;
3917
+
3918
+ if (parent.isTree) {
3919
+ this.tree = parent;
3920
+ } else {
3921
+ this.tree = parent.tree;
3922
+ }
3923
+
3924
+ var tree = this.tree;
3925
+ if (!tree) {
3926
+ console.warn('Can not find node\'s tree.');
3927
+ }
3928
+
3929
+ var props = tree.props || {};
3930
+ var childrenKey = props['children'] || 'children';
3931
+
3932
+ this.$watch('node.data.' + childrenKey, function () {
3933
+ _this3.node.updateChildren();
3934
+ });
3935
+
3936
+ if (this.node.expanded) {
3937
+ this.expanded = true;
3938
+ this.childNodeRendered = true;
3939
+ }
3940
+
3941
+ if (this.tree.accordion) {
3942
+ this.$on('tree-node-expand', function (node) {
3943
+ if (_this3.node !== node) {
3944
+ _this3.node.collapse();
3945
+ }
3946
+ });
3947
+ }
3948
+ }
3949
+ });
3950
+ // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=script&lang=js
3951
+ /* harmony default export */ var src_tree_nodevue_type_script_lang_js = (tree_nodevue_type_script_lang_js);
3952
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3953
+ var componentNormalizer = __webpack_require__(0);
3954
+
3955
+ // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue
3956
+
3957
+
3958
+
3959
+
3960
+
3961
+ /* normalize component */
3962
+
3963
+ var component = Object(componentNormalizer["a" /* default */])(
3964
+ src_tree_nodevue_type_script_lang_js,
3965
+ tree_nodevue_type_template_id_769053c6_render,
3966
+ tree_nodevue_type_template_id_769053c6_staticRenderFns,
3967
+ false,
3968
+ null,
3969
+ null,
3970
+ null
3971
+
3972
+ )
3973
+
3974
+ /* harmony default export */ var tree_node = (component.exports);
3975
+ // EXTERNAL MODULE: external "element-ui/lib/locale"
3976
+ var locale_ = __webpack_require__(22);
3977
+
3978
+ // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
3979
+ var dom_ = __webpack_require__(1);
3980
+
3981
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=script&lang=js
3982
+ //
3983
+ //
3984
+ //
3985
+ //
3986
+ //
3987
+ //
3988
+ //
3989
+ //
3990
+ //
3991
+ //
3992
+ //
3993
+ //
3994
+ //
3995
+ //
3996
+ //
3997
+ //
3998
+ //
3999
+ //
4000
+ //
4001
+ //
4002
+ //
4003
+ //
4004
+ //
4005
+ //
4006
+ //
4007
+ //
4008
+ //
4009
+ //
4010
+ //
4011
+ //
4012
+ //
4013
+ //
4014
+
4015
+
4016
+
4017
+
4018
+
4019
+
4020
+
4021
+
4022
+ /* harmony default export */ var treevue_type_script_lang_js = ({
4023
+ name: 'ElTree',
4024
+
4025
+ mixins: [emitter_default.a],
4026
+
4027
+ components: {
4028
+ ElTreeNode: tree_node
4029
+ },
4030
+
4031
+ data: function data() {
4032
+ return {
4033
+ store: null,
4034
+ root: null,
4035
+ currentNode: null,
4036
+ treeItems: null,
4037
+ checkboxItems: [],
4038
+ dragState: {
4039
+ showDropIndicator: false,
4040
+ draggingNode: null,
4041
+ dropNode: null,
4042
+ allowDrop: true
4043
+ }
4044
+ };
4045
+ },
4046
+
4047
+
4048
+ props: {
4049
+ data: {
4050
+ type: Array
4051
+ },
4052
+ emptyText: {
4053
+ type: String,
4054
+ default: function _default() {
4055
+ return Object(locale_["t"])('el.tree.emptyText');
4056
+ }
4057
+ },
4058
+ renderAfterExpand: {
4059
+ type: Boolean,
4060
+ default: true
4061
+ },
4062
+ nodeKey: String,
4063
+ checkStrictly: Boolean,
4064
+ defaultExpandAll: Boolean,
4065
+ expandOnClickNode: {
4066
+ type: Boolean,
4067
+ default: true
4068
+ },
4069
+ checkOnClickNode: Boolean,
4070
+ checkDescendants: {
4071
+ type: Boolean,
4072
+ default: false
4073
+ },
4074
+ autoExpandParent: {
4075
+ type: Boolean,
4076
+ default: true
4077
+ },
4078
+ defaultCheckedKeys: Array,
4079
+ defaultExpandedKeys: Array,
4080
+ currentNodeKey: [String, Number],
4081
+ renderContent: Function,
4082
+ showCheckbox: {
4083
+ type: Boolean,
4084
+ default: false
4085
+ },
4086
+ draggable: {
4087
+ type: Boolean,
4088
+ default: false
4089
+ },
4090
+ allowDrag: Function,
4091
+ allowDrop: Function,
4092
+ props: {
4093
+ default: function _default() {
4094
+ return {
4095
+ children: 'children',
4096
+ label: 'label',
4097
+ disabled: 'disabled'
4098
+ };
4099
+ }
4100
+ },
4101
+ lazy: {
4102
+ type: Boolean,
4103
+ default: false
4104
+ },
4105
+ highlightCurrent: Boolean,
4106
+ load: Function,
4107
+ filterNodeMethod: Function,
4108
+ accordion: Boolean,
4109
+ indent: {
4110
+ type: Number,
4111
+ default: 18
4112
+ },
4113
+ iconClass: String
4114
+ },
4115
+
4116
+ computed: {
4117
+ children: {
4118
+ set: function set(value) {
4119
+ this.data = value;
4120
+ },
4121
+ get: function get() {
4122
+ return this.data;
4123
+ }
4124
+ },
4125
+
4126
+ treeItemArray: function treeItemArray() {
4127
+ return Array.prototype.slice.call(this.treeItems);
4128
+ },
4129
+ isEmpty: function isEmpty() {
4130
+ var childNodes = this.root.childNodes;
4131
+
4132
+ return !childNodes || childNodes.length === 0 || childNodes.every(function (_ref) {
4133
+ var visible = _ref.visible;
4134
+ return !visible;
4135
+ });
4136
+ }
4137
+ },
4138
+
4139
+ watch: {
4140
+ defaultCheckedKeys: function defaultCheckedKeys(newVal) {
4141
+ this.store.setDefaultCheckedKey(newVal);
4142
+ },
4143
+ defaultExpandedKeys: function defaultExpandedKeys(newVal) {
4144
+ this.store.defaultExpandedKeys = newVal;
4145
+ this.store.setDefaultExpandedKeys(newVal);
4146
+ },
4147
+ data: function data(newVal) {
4148
+ this.store.setData(newVal);
4149
+ },
4150
+ checkboxItems: function checkboxItems(val) {
4151
+ Array.prototype.forEach.call(val, function (checkbox) {
4152
+ checkbox.setAttribute('tabindex', -1);
4153
+ });
4154
+ },
4155
+ checkStrictly: function checkStrictly(newVal) {
4156
+ this.store.checkStrictly = newVal;
4157
+ }
4158
+ },
4159
+
4160
+ methods: {
4161
+ filter: function filter(value) {
4162
+ if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
4163
+ this.store.filter(value);
4164
+ },
4165
+ getNodeKey: function getNodeKey(node) {
4166
+ return util_getNodeKey(this.nodeKey, node.data);
4167
+ },
4168
+ getNodePath: function getNodePath(data) {
4169
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath');
4170
+ var node = this.store.getNode(data);
4171
+ if (!node) return [];
4172
+ var path = [node.data];
4173
+ var parent = node.parent;
4174
+ while (parent && parent !== this.root) {
4175
+ path.push(parent.data);
4176
+ parent = parent.parent;
4177
+ }
4178
+ return path.reverse();
4179
+ },
4180
+ getCheckedNodes: function getCheckedNodes(leafOnly, includeHalfChecked) {
4181
+ return this.store.getCheckedNodes(leafOnly, includeHalfChecked);
4182
+ },
4183
+ getCheckedKeys: function getCheckedKeys(leafOnly) {
4184
+ return this.store.getCheckedKeys(leafOnly);
4185
+ },
4186
+ getCurrentNode: function getCurrentNode() {
4187
+ var currentNode = this.store.getCurrentNode();
4188
+ return currentNode ? currentNode.data : null;
4189
+ },
4190
+ getCurrentKey: function getCurrentKey() {
4191
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey');
4192
+ var currentNode = this.getCurrentNode();
4193
+ return currentNode ? currentNode[this.nodeKey] : null;
4194
+ },
4195
+ setCheckedNodes: function setCheckedNodes(nodes, leafOnly) {
4196
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
4197
+ this.store.setCheckedNodes(nodes, leafOnly);
4198
+ },
4199
+ setCheckedKeys: function setCheckedKeys(keys, leafOnly) {
4200
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys');
4201
+ this.store.setCheckedKeys(keys, leafOnly);
4202
+ },
4203
+ setChecked: function setChecked(data, checked, deep) {
4204
+ this.store.setChecked(data, checked, deep);
4205
+ },
4206
+ getHalfCheckedNodes: function getHalfCheckedNodes() {
4207
+ return this.store.getHalfCheckedNodes();
4208
+ },
4209
+ getHalfCheckedKeys: function getHalfCheckedKeys() {
4210
+ return this.store.getHalfCheckedKeys();
4211
+ },
4212
+ setCurrentNode: function setCurrentNode(node) {
4213
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode');
4214
+ this.store.setUserCurrentNode(node);
4215
+ },
4216
+ setCurrentKey: function setCurrentKey(key) {
4217
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey');
4218
+ this.store.setCurrentNodeKey(key);
4219
+ },
4220
+ getNode: function getNode(data) {
4221
+ return this.store.getNode(data);
4222
+ },
4223
+ remove: function remove(data) {
4224
+ this.store.remove(data);
4225
+ },
4226
+ append: function append(data, parentNode) {
4227
+ this.store.append(data, parentNode);
4228
+ },
4229
+ insertBefore: function insertBefore(data, refNode) {
4230
+ this.store.insertBefore(data, refNode);
4231
+ },
4232
+ insertAfter: function insertAfter(data, refNode) {
4233
+ this.store.insertAfter(data, refNode);
4234
+ },
4235
+ handleNodeExpand: function handleNodeExpand(nodeData, node, instance) {
4236
+ this.broadcast('ElTreeNode', 'tree-node-expand', node);
4237
+ this.$emit('node-expand', nodeData, node, instance);
4238
+ },
4239
+ updateKeyChildren: function updateKeyChildren(key, data) {
4240
+ if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild');
4241
+ this.store.updateChildren(key, data);
4242
+ },
4243
+ initTabIndex: function initTabIndex() {
4244
+ this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
4245
+ this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
4246
+ var checkedItem = this.$el.querySelectorAll('.is-checked[role=treeitem]');
4247
+ if (checkedItem.length) {
4248
+ checkedItem[0].setAttribute('tabindex', 0);
4249
+ return;
4250
+ }
4251
+ this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0);
4252
+ },
4253
+ handleKeydown: function handleKeydown(ev) {
4254
+ var currentItem = ev.target;
4255
+ if (currentItem.className.indexOf('el-tree-node') === -1) return;
4256
+ var keyCode = ev.keyCode;
4257
+ this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
4258
+ var currentIndex = this.treeItemArray.indexOf(currentItem);
4259
+ var nextIndex = void 0;
4260
+ if ([38, 40].indexOf(keyCode) > -1) {
4261
+ // up、down
4262
+ ev.preventDefault();
4263
+ if (keyCode === 38) {
4264
+ // up
4265
+ nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;
4266
+ } else {
4267
+ nextIndex = currentIndex < this.treeItemArray.length - 1 ? currentIndex + 1 : 0;
4268
+ }
4269
+ this.treeItemArray[nextIndex].focus(); // 选中
4270
+ }
4271
+ if ([37, 39].indexOf(keyCode) > -1) {
4272
+ // left、right 展开
4273
+ ev.preventDefault();
4274
+ currentItem.click(); // 选中
4275
+ }
4276
+ var hasInput = currentItem.querySelector('[type="checkbox"]');
4277
+ if ([13, 32].indexOf(keyCode) > -1 && hasInput) {
4278
+ // space enter选中checkbox
4279
+ ev.preventDefault();
4280
+ hasInput.click();
4281
+ }
4282
+ }
4283
+ },
4284
+
4285
+ created: function created() {
4286
+ var _this = this;
4287
+
4288
+ this.isTree = true;
4289
+
4290
+ this.store = new tree_store({
4291
+ key: this.nodeKey,
4292
+ data: this.data,
4293
+ lazy: this.lazy,
4294
+ props: this.props,
4295
+ load: this.load,
4296
+ currentNodeKey: this.currentNodeKey,
4297
+ checkStrictly: this.checkStrictly,
4298
+ checkDescendants: this.checkDescendants,
4299
+ defaultCheckedKeys: this.defaultCheckedKeys,
4300
+ defaultExpandedKeys: this.defaultExpandedKeys,
4301
+ autoExpandParent: this.autoExpandParent,
4302
+ defaultExpandAll: this.defaultExpandAll,
4303
+ filterNodeMethod: this.filterNodeMethod
4304
+ });
4305
+
4306
+ this.root = this.store.root;
4307
+
4308
+ var dragState = this.dragState;
4309
+ this.$on('tree-node-drag-start', function (event, treeNode) {
4310
+ if (typeof _this.allowDrag === 'function' && !_this.allowDrag(treeNode.node)) {
4311
+ event.preventDefault();
4312
+ return false;
4313
+ }
4314
+ event.dataTransfer.effectAllowed = 'move';
4315
+
4316
+ // wrap in try catch to address IE's error when first param is 'text/plain'
4317
+ try {
4318
+ // setData is required for draggable to work in FireFox
4319
+ // the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox
4320
+ event.dataTransfer.setData('text/plain', '');
4321
+ } catch (e) {}
4322
+ dragState.draggingNode = treeNode;
4323
+ _this.$emit('node-drag-start', treeNode.node, event);
4324
+ });
4325
+
4326
+ this.$on('tree-node-drag-over', function (event, treeNode) {
4327
+ var dropNode = findNearestComponent(event.target, 'ElTreeNode');
4328
+ var oldDropNode = dragState.dropNode;
4329
+ if (oldDropNode && oldDropNode !== dropNode) {
4330
+ Object(dom_["removeClass"])(oldDropNode.$el, 'is-drop-inner');
4331
+ }
4332
+ var draggingNode = dragState.draggingNode;
4333
+ if (!draggingNode || !dropNode) return;
4334
+
4335
+ var dropPrev = true;
4336
+ var dropInner = true;
4337
+ var dropNext = true;
4338
+ var userAllowDropInner = true;
4339
+ if (typeof _this.allowDrop === 'function') {
4340
+ dropPrev = _this.allowDrop(draggingNode.node, dropNode.node, 'prev');
4341
+ userAllowDropInner = dropInner = _this.allowDrop(draggingNode.node, dropNode.node, 'inner');
4342
+ dropNext = _this.allowDrop(draggingNode.node, dropNode.node, 'next');
4343
+ }
4344
+ event.dataTransfer.dropEffect = dropInner ? 'move' : 'none';
4345
+ if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {
4346
+ if (oldDropNode) {
4347
+ _this.$emit('node-drag-leave', draggingNode.node, oldDropNode.node, event);
4348
+ }
4349
+ _this.$emit('node-drag-enter', draggingNode.node, dropNode.node, event);
4350
+ }
4351
+
4352
+ if (dropPrev || dropInner || dropNext) {
4353
+ dragState.dropNode = dropNode;
4354
+ }
4355
+
4356
+ if (dropNode.node.nextSibling === draggingNode.node) {
4357
+ dropNext = false;
4358
+ }
4359
+ if (dropNode.node.previousSibling === draggingNode.node) {
4360
+ dropPrev = false;
4361
+ }
4362
+ if (dropNode.node.contains(draggingNode.node, false)) {
4363
+ dropInner = false;
4364
+ }
4365
+ if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
4366
+ dropPrev = false;
4367
+ dropInner = false;
4368
+ dropNext = false;
4369
+ }
4370
+
4371
+ var targetPosition = dropNode.$el.getBoundingClientRect();
4372
+ var treePosition = _this.$el.getBoundingClientRect();
4373
+
4374
+ var dropType = void 0;
4375
+ var prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;
4376
+ var nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;
4377
+
4378
+ var indicatorTop = -9999;
4379
+ var distance = event.clientY - targetPosition.top;
4380
+ if (distance < targetPosition.height * prevPercent) {
4381
+ dropType = 'before';
4382
+ } else if (distance > targetPosition.height * nextPercent) {
4383
+ dropType = 'after';
4384
+ } else if (dropInner) {
4385
+ dropType = 'inner';
4386
+ } else {
4387
+ dropType = 'none';
4388
+ }
4389
+
4390
+ var iconPosition = dropNode.$el.querySelector('.el-tree-node__expand-icon').getBoundingClientRect();
4391
+ var dropIndicator = _this.$refs.dropIndicator;
4392
+ if (dropType === 'before') {
4393
+ indicatorTop = iconPosition.top - treePosition.top;
4394
+ } else if (dropType === 'after') {
4395
+ indicatorTop = iconPosition.bottom - treePosition.top;
4396
+ }
4397
+ dropIndicator.style.top = indicatorTop + 'px';
4398
+ dropIndicator.style.left = iconPosition.right - treePosition.left + 'px';
4399
+
4400
+ if (dropType === 'inner') {
4401
+ Object(dom_["addClass"])(dropNode.$el, 'is-drop-inner');
4402
+ } else {
4403
+ Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
4404
+ }
4405
+
4406
+ dragState.showDropIndicator = dropType === 'before' || dropType === 'after';
4407
+ dragState.allowDrop = dragState.showDropIndicator || userAllowDropInner;
4408
+ dragState.dropType = dropType;
4409
+ _this.$emit('node-drag-over', draggingNode.node, dropNode.node, event);
4410
+ });
4411
+
4412
+ this.$on('tree-node-drag-end', function (event) {
4413
+ var draggingNode = dragState.draggingNode,
4414
+ dropType = dragState.dropType,
4415
+ dropNode = dragState.dropNode;
4416
+
4417
+ event.preventDefault();
4418
+ event.dataTransfer.dropEffect = 'move';
4419
+
4420
+ if (draggingNode && dropNode) {
4421
+ var draggingNodeCopy = { data: draggingNode.node.data };
4422
+ if (dropType !== 'none') {
4423
+ draggingNode.node.remove();
4424
+ }
4425
+ if (dropType === 'before') {
4426
+ dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);
4427
+ } else if (dropType === 'after') {
4428
+ dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);
4429
+ } else if (dropType === 'inner') {
4430
+ dropNode.node.insertChild(draggingNodeCopy);
4431
+ }
4432
+ if (dropType !== 'none') {
4433
+ _this.store.registerNode(draggingNodeCopy);
4434
+ }
4435
+
4436
+ Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
4437
+
4438
+ _this.$emit('node-drag-end', draggingNode.node, dropNode.node, dropType, event);
4439
+ if (dropType !== 'none') {
4440
+ _this.$emit('node-drop', draggingNode.node, dropNode.node, dropType, event);
4441
+ }
4442
+ }
4443
+ if (draggingNode && !dropNode) {
4444
+ _this.$emit('node-drag-end', draggingNode.node, null, dropType, event);
4445
+ }
4446
+
4447
+ dragState.showDropIndicator = false;
4448
+ dragState.draggingNode = null;
4449
+ dragState.dropNode = null;
4450
+ dragState.allowDrop = true;
4451
+ });
4452
+ },
4453
+ mounted: function mounted() {
4454
+ this.initTabIndex();
4455
+ this.$el.addEventListener('keydown', this.handleKeydown);
4456
+ },
4457
+ updated: function updated() {
4458
+ this.treeItems = this.$el.querySelectorAll('[role=treeitem]');
4459
+ this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
4460
+ }
4461
+ });
4462
+ // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=script&lang=js
4463
+ /* harmony default export */ var src_treevue_type_script_lang_js = (treevue_type_script_lang_js);
4464
+ // CONCATENATED MODULE: ./packages/tree/src/tree.vue
4465
+
4466
+
4467
+
4468
+
4469
+
4470
+ /* normalize component */
4471
+
4472
+ var tree_component = Object(componentNormalizer["a" /* default */])(
4473
+ src_treevue_type_script_lang_js,
4474
+ render,
4475
+ staticRenderFns,
4476
+ false,
4477
+ null,
4478
+ null,
4479
+ null
4480
+
4481
+ )
4482
+
4483
+ /* harmony default export */ var tree = (tree_component.exports);
4484
+ // CONCATENATED MODULE: ./packages/tree/index.js
4485
+
4486
+
4487
+ /* istanbul ignore next */
4488
+ tree.install = function (Vue) {
4489
+ Vue.component(tree.name, tree);
4490
+ };
4491
+
4492
+ /* harmony default export */ var packages_tree = __webpack_exports__["default"] = (tree);
4493
+
4494
+ /***/ }),
4495
+
4496
+ /***/ 5:
4497
+ /***/ (function(module, exports) {
4498
+
4499
+ module.exports = require("element-ui/lib/utils/vue-popper");
4500
+
4501
+ /***/ }),
4502
+
4503
+ /***/ 6:
4504
+ /***/ (function(module, exports) {
4505
+
4506
+ module.exports = require("element-ui/lib/utils/merge");
4507
+
4508
+ /***/ }),
4509
+
4510
+ /***/ 7:
4511
+ /***/ (function(module, exports) {
4512
+
4513
+ module.exports = require("element-ui/lib/mixins/migrating");
4514
+
4515
+ /***/ }),
4516
+
4517
+ /***/ 8:
4518
+ /***/ (function(module, exports) {
4519
+
4520
+ module.exports = require("vue");
4521
+
4522
+ /***/ })
4523
+
4524
+ /******/ });