mazey-element-ui 2.0.1 → 2.15.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +71 -68
- package/lib/alert.js +271 -262
- package/lib/aside.js +134 -200
- package/lib/autocomplete.js +500 -443
- package/lib/avatar.js +284 -0
- package/lib/backtop.js +336 -0
- package/lib/badge.js +188 -221
- package/lib/breadcrumb-item.js +176 -226
- package/lib/breadcrumb.js +150 -213
- package/lib/button-group.js +121 -190
- package/lib/button.js +213 -268
- package/lib/calendar.js +801 -0
- package/lib/card.js +156 -203
- package/lib/carousel-item.js +242 -264
- package/lib/carousel.js +386 -284
- package/lib/cascader-panel.js +1323 -0
- package/lib/cascader.js +1000 -1116
- package/lib/checkbox-button.js +388 -327
- package/lib/checkbox-group.js +168 -233
- package/lib/checkbox.js +422 -350
- package/lib/col.js +58 -112
- package/lib/collapse-item.js +335 -327
- package/lib/collapse.js +177 -246
- package/lib/color-picker.js +1128 -1231
- package/lib/container.js +144 -211
- package/lib/date-picker.js +4316 -2745
- package/lib/descriptions-item.js +88 -0
- package/lib/descriptions.js +342 -0
- package/lib/dialog.js +359 -337
- package/lib/directives/mousewheel.js +6 -12
- package/lib/directives/repeat-click.js +10 -10
- package/lib/divider.js +251 -0
- package/lib/drawer.js +523 -0
- package/lib/dropdown-item.js +175 -228
- package/lib/dropdown-menu.js +203 -253
- package/lib/dropdown.js +286 -384
- package/lib/element-ui.common.js +34136 -25458
- package/lib/empty.js +657 -0
- package/lib/footer.js +134 -200
- package/lib/form-item.js +401 -304
- package/lib/form.js +278 -297
- package/lib/header.js +134 -200
- package/lib/icon.js +123 -193
- package/lib/image.js +1005 -0
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +219 -0
- package/lib/input-number.js +442 -386
- package/lib/input.js +682 -512
- package/lib/link.js +267 -0
- package/lib/loading.js +278 -377
- package/lib/locale/format.js +14 -25
- package/lib/locale/index.js +19 -33
- package/lib/locale/lang/af-ZA.js +29 -8
- package/lib/locale/lang/ar.js +29 -14
- package/lib/locale/lang/az.js +127 -0
- package/lib/locale/lang/bg.js +35 -11
- package/lib/locale/lang/bn.js +126 -0
- package/lib/locale/lang/ca.js +24 -9
- package/lib/locale/lang/cs-CZ.js +19 -3
- package/lib/locale/lang/da.js +19 -3
- package/lib/locale/lang/de.js +19 -3
- package/lib/locale/lang/ee.js +24 -8
- package/lib/locale/lang/el.js +20 -4
- package/lib/locale/lang/en.js +25 -7
- package/lib/locale/lang/eo.js +128 -0
- package/lib/locale/lang/es.js +22 -7
- package/lib/locale/lang/eu.js +131 -0
- package/lib/locale/lang/fa.js +24 -8
- package/lib/locale/lang/fi.js +40 -24
- package/lib/locale/lang/fr.js +21 -4
- package/lib/locale/lang/he.js +29 -8
- package/lib/locale/lang/hr.js +131 -0
- package/lib/locale/lang/hu.js +20 -4
- package/lib/locale/lang/hy-AM.js +128 -0
- package/lib/locale/lang/id.js +23 -8
- package/lib/locale/lang/is.js +127 -0
- package/lib/locale/lang/it.js +21 -6
- package/lib/locale/lang/ja.js +19 -3
- package/lib/locale/lang/kg.js +128 -0
- package/lib/locale/lang/km.js +21 -6
- package/lib/locale/lang/ko.js +19 -3
- package/lib/locale/lang/ku.js +19 -3
- package/lib/locale/lang/kz.js +19 -3
- package/lib/locale/lang/lt.js +19 -3
- package/lib/locale/lang/lv.js +26 -10
- package/lib/locale/lang/mn.js +19 -3
- package/lib/locale/lang/ms.js +126 -0
- package/lib/locale/lang/nb-NO.js +28 -13
- package/lib/locale/lang/nl.js +19 -3
- package/lib/locale/lang/pl.js +19 -3
- package/lib/locale/lang/pt-br.js +18 -3
- package/lib/locale/lang/pt.js +35 -11
- package/lib/locale/lang/ro.js +19 -3
- package/lib/locale/lang/ru-RU.js +20 -5
- package/lib/locale/lang/si.js +130 -0
- package/lib/locale/lang/sk.js +23 -8
- package/lib/locale/lang/sl.js +26 -10
- package/lib/locale/lang/sr-Latn.js +127 -0
- package/lib/locale/lang/sr.js +131 -0
- package/lib/locale/lang/sv-SE.js +34 -15
- package/lib/locale/lang/sw.js +130 -0
- package/lib/locale/lang/ta.js +31 -9
- package/lib/locale/lang/th.js +30 -12
- package/lib/locale/lang/tk.js +27 -7
- package/lib/locale/lang/tr-TR.js +20 -4
- package/lib/locale/lang/ua.js +20 -5
- package/lib/locale/lang/ug-CN.js +22 -7
- package/lib/locale/lang/uz-UZ.js +127 -0
- package/lib/locale/lang/vi.js +23 -8
- package/lib/locale/lang/zh-CN.js +18 -3
- package/lib/locale/lang/zh-TW.js +25 -6
- package/lib/main.js +123 -192
- package/lib/menu-item-group.js +164 -225
- package/lib/menu-item.js +300 -333
- package/lib/menu.js +401 -576
- package/lib/message-box.js +730 -614
- package/lib/message.js +289 -327
- package/lib/mixins/emitter.js +2 -4
- package/lib/mixins/focus.js +3 -4
- package/lib/mixins/locale.js +5 -7
- package/lib/mixins/migrating.js +19 -21
- package/lib/notification.js +366 -394
- package/lib/option-group.js +198 -250
- package/lib/option.js +247 -291
- package/lib/page-header.js +248 -0
- package/lib/pagination.js +485 -635
- package/lib/popconfirm.js +381 -0
- package/lib/popover.js +361 -396
- package/lib/progress.js +387 -261
- package/lib/radio-button.js +319 -309
- package/lib/radio-group.js +224 -282
- package/lib/radio.js +347 -328
- package/lib/rate.js +286 -305
- package/lib/result.js +513 -0
- package/lib/row.js +59 -110
- package/lib/scrollbar.js +234 -344
- package/lib/select.js +1041 -806
- package/lib/skeleton-item.js +278 -0
- package/lib/skeleton.js +308 -0
- package/lib/slider.js +608 -467
- package/lib/spinner.js +160 -207
- package/lib/statistic.js +462 -0
- package/lib/step.js +270 -262
- package/lib/steps.js +198 -261
- package/lib/submenu.js +318 -420
- package/lib/switch.js +311 -281
- package/lib/tab-pane.js +185 -245
- package/lib/table-column.js +667 -414
- package/lib/table.js +3388 -2770
- package/lib/tabs.js +577 -648
- package/lib/tag.js +160 -227
- package/lib/theme-chalk/alert.css +1 -1
- package/lib/theme-chalk/aside.css +1 -1
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/avatar.css +1 -0
- package/lib/theme-chalk/backtop.css +1 -0
- package/lib/theme-chalk/badge.css +1 -1
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/breadcrumb.css +1 -1
- package/lib/theme-chalk/button.css +1 -1
- package/lib/theme-chalk/calendar.css +1 -0
- package/lib/theme-chalk/card.css +1 -1
- package/lib/theme-chalk/carousel-item.css +1 -1
- package/lib/theme-chalk/carousel.css +1 -1
- package/lib/theme-chalk/cascader-panel.css +1 -0
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/checkbox.css +1 -1
- package/lib/theme-chalk/col.css +1 -1
- package/lib/theme-chalk/collapse.css +1 -1
- package/lib/theme-chalk/color-picker.css +1 -1
- package/lib/theme-chalk/container.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/descriptions-item.css +1 -0
- package/lib/theme-chalk/descriptions.css +1 -0
- package/lib/theme-chalk/dialog.css +1 -1
- package/lib/theme-chalk/display.css +1 -1
- package/lib/theme-chalk/divider.css +1 -0
- package/lib/theme-chalk/drawer.css +1 -0
- package/lib/theme-chalk/dropdown.css +1 -1
- package/lib/theme-chalk/empty.css +1 -0
- package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
- package/lib/theme-chalk/fonts/element-icons.woff +0 -0
- package/lib/theme-chalk/footer.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/header.css +1 -1
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/image.css +1 -0
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/input-number.css +1 -1
- package/lib/theme-chalk/input.css +1 -1
- package/lib/theme-chalk/link.css +1 -0
- package/lib/theme-chalk/loading.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/message-box.css +1 -1
- package/lib/theme-chalk/message.css +1 -1
- package/lib/theme-chalk/notification.css +1 -1
- package/lib/theme-chalk/option-group.css +1 -1
- package/lib/theme-chalk/option.css +1 -1
- package/lib/theme-chalk/page-header.css +1 -0
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/popconfirm.css +1 -0
- package/lib/theme-chalk/popover.css +1 -1
- package/lib/theme-chalk/popper.css +1 -1
- package/lib/theme-chalk/progress.css +1 -1
- package/lib/theme-chalk/radio-button.css +1 -1
- package/lib/theme-chalk/radio.css +1 -1
- package/lib/theme-chalk/rate.css +1 -1
- package/lib/theme-chalk/reset.css +1 -1
- package/lib/theme-chalk/result.css +1 -0
- package/lib/theme-chalk/row.css +1 -1
- package/lib/theme-chalk/scrollbar.css +1 -1
- package/lib/theme-chalk/select-dropdown.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/skeleton-item.css +1 -0
- package/lib/theme-chalk/skeleton.css +1 -0
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/spinner.css +1 -1
- package/lib/theme-chalk/statistic.css +1 -0
- package/lib/theme-chalk/step.css +1 -1
- package/lib/theme-chalk/steps.css +1 -1
- package/lib/theme-chalk/switch.css +1 -1
- package/lib/theme-chalk/table-column.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/theme-chalk/tag.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/time-select.css +1 -1
- package/lib/theme-chalk/timeline-item.css +1 -0
- package/lib/theme-chalk/timeline.css +1 -0
- package/lib/theme-chalk/tooltip.css +1 -1
- package/lib/theme-chalk/transfer.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/time-picker.js +1548 -1348
- package/lib/time-select.js +633 -853
- package/lib/timeline-item.js +301 -0
- package/lib/timeline.js +207 -0
- package/lib/tooltip.js +166 -240
- package/lib/transfer.js +731 -639
- package/lib/transitions/collapse-transition.js +13 -31
- package/lib/tree.js +1769 -1883
- package/lib/umd/locale/af-ZA.js +35 -14
- package/lib/umd/locale/ar.js +35 -20
- package/lib/umd/locale/az.js +143 -0
- package/lib/umd/locale/bg.js +41 -17
- package/lib/umd/locale/bn.js +142 -0
- package/lib/umd/locale/ca.js +30 -15
- package/lib/umd/locale/cs-CZ.js +25 -9
- package/lib/umd/locale/da.js +25 -9
- package/lib/umd/locale/de.js +25 -9
- package/lib/umd/locale/ee.js +30 -14
- package/lib/umd/locale/el.js +26 -10
- package/lib/umd/locale/en.js +31 -13
- package/lib/umd/locale/eo.js +144 -0
- package/lib/umd/locale/es.js +28 -13
- package/lib/umd/locale/eu.js +147 -0
- package/lib/umd/locale/fa.js +30 -14
- package/lib/umd/locale/fi.js +46 -30
- package/lib/umd/locale/fr.js +27 -10
- package/lib/umd/locale/he.js +35 -14
- package/lib/umd/locale/hr.js +147 -0
- package/lib/umd/locale/hu.js +26 -10
- package/lib/umd/locale/hy-AM.js +144 -0
- package/lib/umd/locale/id.js +29 -14
- package/lib/umd/locale/is.js +143 -0
- package/lib/umd/locale/it.js +27 -12
- package/lib/umd/locale/ja.js +25 -9
- package/lib/umd/locale/kg.js +144 -0
- package/lib/umd/locale/km.js +27 -12
- package/lib/umd/locale/ko.js +25 -9
- package/lib/umd/locale/ku.js +25 -9
- package/lib/umd/locale/kz.js +25 -9
- package/lib/umd/locale/lt.js +25 -9
- package/lib/umd/locale/lv.js +32 -16
- package/lib/umd/locale/mn.js +25 -9
- package/lib/umd/locale/ms.js +142 -0
- package/lib/umd/locale/nb-NO.js +34 -19
- package/lib/umd/locale/nl.js +25 -9
- package/lib/umd/locale/pl.js +25 -9
- package/lib/umd/locale/pt-br.js +24 -9
- package/lib/umd/locale/pt.js +41 -17
- package/lib/umd/locale/ro.js +25 -9
- package/lib/umd/locale/ru-RU.js +26 -11
- package/lib/umd/locale/si.js +146 -0
- package/lib/umd/locale/sk.js +29 -14
- package/lib/umd/locale/sl.js +32 -16
- package/lib/umd/locale/sr-Latn.js +143 -0
- package/lib/umd/locale/sr.js +147 -0
- package/lib/umd/locale/sv-SE.js +40 -21
- package/lib/umd/locale/sw.js +146 -0
- package/lib/umd/locale/ta.js +37 -15
- package/lib/umd/locale/th.js +36 -18
- package/lib/umd/locale/tk.js +33 -13
- package/lib/umd/locale/tr-TR.js +26 -10
- package/lib/umd/locale/ua.js +26 -11
- package/lib/umd/locale/ug-CN.js +28 -13
- package/lib/umd/locale/uz-UZ.js +143 -0
- package/lib/umd/locale/vi.js +29 -14
- package/lib/umd/locale/zh-CN.js +24 -9
- package/lib/umd/locale/zh-TW.js +31 -12
- package/lib/upload.js +1093 -1338
- package/lib/utils/after-leave.js +19 -16
- package/lib/utils/aria-dialog.js +11 -29
- package/lib/utils/aria-utils.js +7 -15
- package/lib/utils/clickoutside.js +16 -24
- package/lib/utils/date-util.js +267 -0
- package/lib/utils/date.js +56 -52
- package/lib/utils/dom.js +57 -27
- package/lib/utils/lodash.js +9421 -0
- package/lib/utils/menu/aria-menubar.js +6 -11
- package/lib/utils/menu/aria-menuitem.js +11 -22
- package/lib/utils/menu/aria-submenu.js +7 -16
- package/lib/utils/merge.js +9 -16
- package/lib/utils/popper.js +1141 -1170
- package/lib/utils/popup/index.js +24 -76
- package/lib/utils/popup/popup-manager.js +17 -49
- package/lib/utils/resize-event.js +11 -24
- package/lib/utils/scroll-into-view.js +4 -12
- package/lib/utils/scrollbar-width.js +8 -19
- package/lib/utils/types.js +38 -0
- package/lib/utils/util.js +165 -18
- package/lib/utils/vdom.js +5 -16
- package/lib/utils/vue-popper.js +10 -31
- package/package.json +131 -139
- package/packages/alert/src/main.vue +15 -8
- package/packages/autocomplete/src/autocomplete-suggestions.vue +4 -4
- package/packages/autocomplete/src/autocomplete.vue +45 -14
- package/packages/avatar/index.js +8 -0
- package/packages/avatar/src/main.vue +107 -0
- package/packages/backtop/index.js +8 -0
- package/packages/backtop/src/main.vue +110 -0
- package/packages/badge/src/main.vue +15 -3
- package/packages/button/src/button.vue +2 -1
- package/packages/calendar/index.js +8 -0
- package/packages/calendar/src/date-table.vue +200 -0
- package/packages/calendar/src/main.vue +280 -0
- package/packages/carousel/src/item.vue +36 -12
- package/packages/carousel/src/main.vue +83 -22
- package/packages/cascader/index.js +1 -1
- package/packages/cascader/src/cascader.vue +663 -0
- package/packages/cascader-panel/index.js +8 -0
- package/packages/cascader-panel/src/cascader-menu.vue +138 -0
- package/packages/cascader-panel/src/cascader-node.vue +246 -0
- package/packages/cascader-panel/src/cascader-panel.vue +391 -0
- package/packages/cascader-panel/src/node.js +166 -0
- package/packages/cascader-panel/src/store.js +58 -0
- package/packages/checkbox/src/checkbox-button.vue +11 -3
- package/packages/checkbox/src/checkbox-group.vue +1 -1
- package/packages/checkbox/src/checkbox.vue +15 -8
- package/packages/collapse/src/collapse-item.vue +12 -11
- package/packages/color-picker/src/color.js +1 -0
- package/packages/color-picker/src/components/picker-dropdown.vue +10 -6
- package/packages/color-picker/src/components/sv-panel.vue +1 -3
- package/packages/color-picker/src/main.vue +13 -4
- package/packages/date-picker/src/basic/date-table.vue +104 -168
- package/packages/date-picker/src/basic/month-table.vue +223 -58
- package/packages/date-picker/src/basic/time-spinner.vue +31 -15
- package/packages/date-picker/src/basic/year-table.vue +16 -5
- package/packages/date-picker/src/panel/date-range.vue +105 -48
- package/packages/date-picker/src/panel/date.vue +82 -39
- package/packages/date-picker/src/panel/month-range.vue +289 -0
- package/packages/date-picker/src/panel/time-range.vue +2 -2
- package/packages/date-picker/src/panel/time-select.vue +3 -2
- package/packages/date-picker/src/panel/time.vue +2 -2
- package/packages/date-picker/src/picker/date-picker.js +3 -0
- package/packages/date-picker/src/picker.vue +87 -43
- package/packages/descriptions/index.js +8 -0
- package/packages/descriptions/src/descriptions-item.js +30 -0
- package/packages/descriptions/src/descriptions-row.js +116 -0
- package/packages/descriptions/src/index.js +180 -0
- package/packages/descriptions-item/index.js +8 -0
- package/packages/dialog/src/component.vue +35 -12
- package/packages/divider/index.js +8 -0
- package/packages/divider/src/main.vue +37 -0
- package/packages/drawer/index.js +8 -0
- package/packages/drawer/src/main.vue +205 -0
- package/packages/dropdown/src/dropdown-item.vue +4 -2
- package/packages/dropdown/src/dropdown-menu.vue +6 -3
- package/packages/dropdown/src/dropdown.vue +55 -35
- package/packages/empty/index.js +7 -0
- package/packages/empty/src/img-empty.vue +132 -0
- package/packages/empty/src/index.vue +50 -0
- package/packages/form/src/form-item.vue +76 -44
- package/packages/form/src/form.vue +59 -11
- package/packages/form/src/label-wrap.vue +78 -0
- package/packages/image/index.js +8 -0
- package/packages/image/src/image-viewer.vue +330 -0
- package/packages/image/src/main.vue +249 -0
- package/packages/infinite-scroll/index.js +8 -0
- package/packages/infinite-scroll/src/main.js +150 -0
- package/packages/input/src/input.vue +186 -75
- package/packages/input-number/src/input-number.vue +52 -25
- package/packages/link/index.js +8 -0
- package/packages/link/src/main.vue +53 -0
- package/packages/loading/src/directive.js +9 -4
- package/packages/loading/src/index.js +5 -5
- package/packages/menu/src/menu-item.vue +4 -4
- package/packages/menu/src/menu.vue +24 -10
- package/packages/menu/src/submenu.vue +26 -12
- package/packages/message/src/main.js +35 -16
- package/packages/message/src/main.vue +12 -15
- package/packages/message-box/src/main.js +6 -4
- package/packages/message-box/src/main.vue +32 -24
- package/packages/notification/src/main.js +9 -8
- package/packages/page-header/index.js +8 -0
- package/packages/page-header/src/main.vue +30 -0
- package/packages/pagination/src/pagination.js +36 -77
- package/packages/popconfirm/index.js +8 -0
- package/packages/popconfirm/src/main.vue +104 -0
- package/packages/popover/src/directive.js +5 -1
- package/packages/popover/src/main.vue +49 -31
- package/packages/progress/src/progress.vue +118 -21
- package/packages/radio/index.js +1 -1
- package/packages/radio/src/radio-button.vue +7 -3
- package/packages/radio/src/radio-group.vue +9 -3
- package/packages/radio/src/radio.vue +6 -3
- package/packages/rate/src/main.vue +36 -37
- package/packages/result/index.js +8 -0
- package/packages/result/src/icon-error.vue +13 -0
- package/packages/result/src/icon-info.vue +13 -0
- package/packages/result/src/icon-success.vue +13 -0
- package/packages/result/src/icon-warning.vue +13 -0
- package/packages/result/src/index.vue +65 -0
- package/packages/row/src/row.js +2 -5
- package/packages/scrollbar/src/bar.js +5 -1
- package/packages/scrollbar/src/main.js +3 -3
- package/packages/select/src/option-group.vue +1 -1
- package/packages/select/src/option.vue +22 -9
- package/packages/select/src/select-dropdown.vue +1 -1
- package/packages/select/src/select.vue +126 -105
- package/packages/skeleton/index.js +8 -0
- package/packages/skeleton/src/img-placeholder.vue +16 -0
- package/packages/skeleton/src/index.vue +76 -0
- package/packages/skeleton/src/item.vue +22 -0
- package/packages/skeleton-item/index.js +8 -0
- package/packages/slider/src/button.vue +6 -9
- package/packages/slider/src/main.vue +60 -32
- package/packages/slider/src/marker.js +18 -0
- package/packages/spinner/src/spinner.vue +1 -1
- package/packages/statistic/index.js +8 -0
- package/packages/statistic/src/main.vue +204 -0
- package/packages/steps/src/step.vue +5 -1
- package/packages/steps/src/steps.vue +1 -1
- package/packages/switch/src/component.vue +18 -7
- package/packages/table/src/config.js +124 -0
- package/packages/table/src/filter-panel.vue +9 -18
- package/packages/table/src/layout-observer.js +2 -2
- package/packages/table/src/store/current.js +76 -0
- package/packages/table/src/store/expand.js +65 -0
- package/packages/table/src/store/helper.js +41 -0
- package/packages/table/src/store/index.js +147 -0
- package/packages/table/src/store/tree.js +209 -0
- package/packages/table/src/store/watcher.js +381 -0
- package/packages/table/src/table-body.js +221 -166
- package/packages/table/src/table-column.js +203 -308
- package/packages/table/src/table-footer.js +75 -65
- package/packages/table/src/table-header.js +68 -77
- package/packages/table/src/table-layout.js +43 -25
- package/packages/table/src/table-row.js +101 -0
- package/packages/table/src/table.vue +155 -99
- package/packages/table/src/util.js +164 -1
- package/packages/tabs/src/tab-bar.vue +7 -7
- package/packages/tabs/src/tab-nav.vue +35 -14
- package/packages/tabs/src/tab-pane.vue +10 -18
- package/packages/tabs/src/tabs.vue +45 -22
- package/packages/tag/src/tag.vue +35 -18
- package/packages/theme-chalk/gulpfile.js +33 -0
- package/packages/theme-chalk/package.json +36 -0
- package/packages/theme-chalk/src/alert.scss +57 -15
- package/packages/theme-chalk/src/autocomplete.scss +3 -4
- package/packages/theme-chalk/src/avatar.scss +51 -0
- package/packages/theme-chalk/src/backtop.scss +22 -0
- package/packages/theme-chalk/src/badge.scss +17 -1
- package/packages/theme-chalk/src/button.scss +40 -20
- package/packages/theme-chalk/src/calendar.scss +79 -0
- package/packages/theme-chalk/src/carousel.scss +33 -6
- package/packages/theme-chalk/src/cascader-panel.scss +120 -0
- package/packages/theme-chalk/src/cascader.scss +118 -112
- package/packages/theme-chalk/src/checkbox.scss +18 -17
- package/packages/theme-chalk/src/collapse.scss +16 -9
- package/packages/theme-chalk/src/common/popup.scss +3 -2
- package/packages/theme-chalk/src/common/var.scss +500 -184
- package/packages/theme-chalk/src/date-picker/date-picker.scss +1 -1
- package/packages/theme-chalk/src/date-picker/date-range-picker.scss +4 -7
- package/packages/theme-chalk/src/date-picker/date-table.scss +11 -11
- package/packages/theme-chalk/src/date-picker/month-table.scss +48 -6
- package/packages/theme-chalk/src/date-picker/picker-panel.scss +3 -3
- package/packages/theme-chalk/src/date-picker/picker.scss +7 -0
- package/packages/theme-chalk/src/date-picker/time-picker.scss +1 -0
- package/packages/theme-chalk/src/date-picker/year-table.scss +9 -2
- package/packages/theme-chalk/src/descriptions-item.scss +42 -0
- package/packages/theme-chalk/src/descriptions.scss +111 -0
- package/packages/theme-chalk/src/dialog.scss +5 -4
- package/packages/theme-chalk/src/divider.scss +47 -0
- package/packages/theme-chalk/src/drawer.scss +219 -0
- package/packages/theme-chalk/src/dropdown.scss +14 -1
- package/packages/theme-chalk/src/empty.scss +45 -0
- package/packages/theme-chalk/src/fonts/element-icons.ttf +0 -0
- package/packages/theme-chalk/src/fonts/element-icons.woff +0 -0
- package/packages/theme-chalk/src/form.scss +18 -23
- package/packages/theme-chalk/src/icon.scss +1052 -71
- package/packages/theme-chalk/src/image.scss +179 -0
- package/packages/theme-chalk/src/index.scss +20 -0
- package/packages/theme-chalk/src/input.scss +56 -5
- package/packages/theme-chalk/src/link.scss +81 -0
- package/packages/theme-chalk/src/main.scss +2 -0
- package/packages/theme-chalk/src/menu.scss +11 -8
- package/packages/theme-chalk/src/message-box.scss +14 -11
- package/packages/theme-chalk/src/message.scss +10 -10
- package/packages/theme-chalk/src/notification.scss +8 -7
- package/packages/theme-chalk/src/option.scss +1 -5
- package/packages/theme-chalk/src/page-header.scss +41 -0
- package/packages/theme-chalk/src/pagination.scss +9 -10
- package/packages/theme-chalk/src/popconfirm.scss +16 -0
- package/packages/theme-chalk/src/popover.scss +3 -2
- package/packages/theme-chalk/src/popper.scss +4 -4
- package/packages/theme-chalk/src/progress.scss +13 -1
- package/packages/theme-chalk/src/radio-button.scss +8 -8
- package/packages/theme-chalk/src/radio.scss +7 -6
- package/packages/theme-chalk/src/result.scss +61 -0
- package/packages/theme-chalk/src/row.scss +4 -0
- package/packages/theme-chalk/src/scrollbar.scss +1 -0
- package/packages/theme-chalk/src/select-dropdown.scss +5 -2
- package/packages/theme-chalk/src/select.scss +14 -6
- package/packages/theme-chalk/src/skeleton-item.scss +84 -0
- package/packages/theme-chalk/src/skeleton.scss +40 -0
- package/packages/theme-chalk/src/slider.scss +22 -0
- package/packages/theme-chalk/src/statistic.scss +38 -0
- package/packages/theme-chalk/src/switch.scss +0 -3
- package/packages/theme-chalk/src/table.scss +67 -60
- package/packages/theme-chalk/src/tabs.scss +58 -32
- package/packages/theme-chalk/src/tag.scss +85 -68
- package/packages/theme-chalk/src/timeline-item.scss +86 -0
- package/packages/theme-chalk/src/timeline.scss +14 -0
- package/packages/theme-chalk/src/tooltip.scss +1 -0
- package/packages/theme-chalk/src/transfer.scss +2 -2
- package/packages/theme-chalk/src/tree.scss +8 -5
- package/packages/theme-chalk/src/upload.scss +1 -0
- package/packages/timeline/index.js +8 -0
- package/packages/timeline/src/item.vue +73 -0
- package/packages/timeline/src/main.vue +33 -0
- package/packages/timeline-item/index.js +8 -0
- package/packages/tooltip/src/main.js +52 -26
- package/packages/transfer/src/main.vue +15 -7
- package/packages/transfer/src/transfer-panel.vue +4 -4
- package/packages/tree/src/model/node.js +27 -21
- package/packages/tree/src/model/tree-store.js +22 -16
- package/packages/tree/src/tree-node.vue +16 -10
- package/packages/tree/src/tree.vue +41 -27
- package/packages/upload/src/index.vue +42 -13
- package/packages/upload/src/upload-list.vue +46 -41
- package/src/directives/repeat-click.js +6 -4
- package/src/index.js +66 -8
- package/src/locale/format.js +1 -1
- package/src/locale/index.js +1 -1
- package/src/locale/lang/af-ZA.js +15 -1
- package/src/locale/lang/ar.js +26 -12
- package/src/locale/lang/az.js +126 -0
- package/src/locale/lang/bg.js +15 -1
- package/src/locale/lang/bn.js +126 -0
- package/src/locale/lang/ca.js +21 -7
- package/src/locale/lang/cs-CZ.js +15 -1
- package/src/locale/lang/da.js +15 -1
- package/src/locale/lang/de.js +15 -1
- package/src/locale/lang/ee.js +20 -6
- package/src/locale/lang/el.js +16 -2
- package/src/locale/lang/en.js +16 -2
- package/src/locale/lang/eo.js +123 -0
- package/src/locale/lang/es.js +19 -5
- package/src/locale/lang/eu.js +123 -0
- package/src/locale/lang/fa.js +20 -6
- package/src/locale/lang/fi.js +36 -22
- package/src/locale/lang/fr.js +15 -1
- package/src/locale/lang/he.js +15 -1
- package/src/locale/lang/hr.js +123 -0
- package/src/locale/lang/hu.js +16 -2
- package/src/locale/lang/hy-AM.js +123 -0
- package/src/locale/lang/id.js +20 -6
- package/src/locale/lang/is.js +124 -0
- package/src/locale/lang/it.js +18 -4
- package/src/locale/lang/ja.js +15 -1
- package/src/locale/lang/kg.js +123 -0
- package/src/locale/lang/km.js +18 -4
- package/src/locale/lang/ko.js +15 -1
- package/src/locale/lang/ku.js +15 -1
- package/src/locale/lang/kz.js +15 -1
- package/src/locale/lang/lt.js +15 -1
- package/src/locale/lang/lv.js +22 -8
- package/src/locale/lang/mn.js +15 -1
- package/src/locale/lang/ms.js +122 -0
- package/src/locale/lang/nb-NO.js +25 -11
- package/src/locale/lang/nl.js +15 -1
- package/src/locale/lang/pl.js +15 -1
- package/src/locale/lang/pt-br.js +15 -1
- package/src/locale/lang/pt.js +15 -1
- package/src/locale/lang/ro.js +15 -1
- package/src/locale/lang/ru-RU.js +17 -3
- package/src/locale/lang/si.js +123 -0
- package/src/locale/lang/sk.js +20 -6
- package/src/locale/lang/sl.js +21 -7
- package/src/locale/lang/sr-Latn.js +123 -0
- package/src/locale/lang/sr.js +123 -0
- package/src/locale/lang/sv-SE.js +23 -9
- package/src/locale/lang/sw.js +123 -0
- package/src/locale/lang/ta.js +15 -1
- package/src/locale/lang/th.js +22 -8
- package/src/locale/lang/tk.js +15 -1
- package/src/locale/lang/tr-TR.js +16 -2
- package/src/locale/lang/ua.js +17 -3
- package/src/locale/lang/ug-CN.js +19 -5
- package/src/locale/lang/uz-UZ.js +123 -0
- package/src/locale/lang/vi.js +20 -6
- package/src/locale/lang/zh-CN.js +15 -1
- package/src/locale/lang/zh-TW.js +15 -1
- package/src/mixins/locale.js +1 -1
- package/src/mixins/migrating.js +6 -3
- package/src/transitions/collapse-transition.js +1 -1
- package/src/utils/aria-utils.js +2 -1
- package/src/utils/clickoutside.js +1 -1
- package/{packages/date-picker/src/util/index.js → src/utils/date-util.js} +69 -27
- package/src/utils/date.js +54 -30
- package/src/utils/dom.js +55 -2
- package/src/utils/lodash.js +18075 -0
- package/src/utils/merge.js +3 -13
- package/src/utils/popup/index.js +3 -11
- package/src/utils/popup/popup-manager.js +3 -3
- package/src/utils/resize-event.js +2 -1
- package/src/utils/types.js +38 -0
- package/src/utils/util.js +161 -0
- package/src/utils/vdom.js +1 -5
- package/src/utils/vue-popper.js +2 -1
- package/types/alert.d.ts +4 -0
- package/types/autocomplete.d.ts +6 -3
- package/types/avatar.d.ts +20 -0
- package/types/backtop.d.ts +16 -0
- package/types/calendar.d.ts +15 -0
- package/types/carousel.d.ts +4 -0
- package/types/cascader-panel.d.ts +72 -0
- package/types/cascader.d.ts +29 -21
- package/types/collapse-item.d.ts +3 -0
- package/types/descriptions-item.d.ts +37 -0
- package/types/descriptions.d.ts +52 -0
- package/types/dialog.d.ts +3 -0
- package/types/divider.d.ts +12 -0
- package/types/drawer.d.ts +63 -0
- package/types/dropdown-item.d.ts +3 -0
- package/types/dropdown.d.ts +12 -0
- package/types/element-ui.d.ts +91 -3
- package/types/empty.d.ts +31 -0
- package/types/form.d.ts +6 -6
- package/types/icon.d.ts +7 -0
- package/types/image.d.ts +43 -0
- package/types/infinite-scroll.d.ts +6 -0
- package/types/input-number.d.ts +4 -1
- package/types/input.d.ts +16 -1
- package/types/link.d.ts +25 -0
- package/types/loading.d.ts +3 -1
- package/types/message-box.d.ts +14 -4
- package/types/message.d.ts +17 -2
- package/types/page-header.d.ts +10 -0
- package/types/pagination.d.ts +3 -0
- package/types/popconfirm.d.ts +29 -0
- package/types/popover.d.ts +7 -1
- package/types/progress.d.ts +7 -1
- package/types/rate.d.ts +16 -4
- package/types/result.d.ts +33 -0
- package/types/select.d.ts +9 -0
- package/types/skeleton-item.d.ts +7 -0
- package/types/skeleton.d.ts +33 -0
- package/types/slider.d.ts +6 -0
- package/types/spinner.d.ts +16 -0
- package/types/statistic.d.ts +37 -0
- package/types/submenu.d.ts +1 -1
- package/types/switch.d.ts +3 -0
- package/types/table-column.d.ts +1 -1
- package/types/table.d.ts +58 -3
- package/types/tabs.d.ts +4 -1
- package/types/tag.d.ts +5 -1
- package/types/timeline-item.d.ts +20 -0
- package/types/timeline.d.ts +6 -0
- package/types/tooltip.d.ts +3 -0
- package/types/tree.d.ts +120 -97
- package/types/upload.d.ts +7 -4
- package/web-types.json +4195 -0
- package/CHANGELOG.en-US.md +0 -576
- package/CHANGELOG.es.md +0 -581
- package/CHANGELOG.zh-CN.md +0 -576
- package/lib/utils/sync.js +0 -59
- package/packages/carousel/_index.js +0 -10
- package/packages/carousel/cooking.conf.js +0 -6
- package/packages/carousel/package.json +0 -17
- package/packages/cascader/cooking.conf.js +0 -18
- package/packages/cascader/package.json +0 -15
- package/packages/cascader/src/main.vue +0 -438
- package/packages/cascader/src/menu.vue +0 -369
- package/packages/color-picker/cooking.conf.js +0 -6
- package/packages/color-picker/package.json +0 -15
- package/packages/date-picker/README.md +0 -64
- package/packages/date-picker/_index.js +0 -12
- package/packages/date-picker/cooking.conf.js +0 -6
- package/packages/date-picker/package.json +0 -15
- package/packages/loading/README.md +0 -66
- package/packages/loading/cooking.conf.js +0 -6
- package/packages/loading/package.json +0 -15
- package/packages/pagination/README.md +0 -59
- package/packages/pagination/cooking.conf.js +0 -6
- package/packages/pagination/package.json +0 -15
- package/packages/table/README.md +0 -106
- package/packages/table/_index.js +0 -10
- package/packages/table/cooking.conf.js +0 -6
- package/packages/table/package.json +0 -17
- package/packages/table/src/table-store.js +0 -619
- package/packages/theme-chalk/lib/alert.css +0 -1
- package/packages/theme-chalk/lib/aside.css +0 -1
- package/packages/theme-chalk/lib/autocomplete.css +0 -1
- package/packages/theme-chalk/lib/badge.css +0 -1
- package/packages/theme-chalk/lib/base.css +0 -1
- package/packages/theme-chalk/lib/breadcrumb.css +0 -1
- package/packages/theme-chalk/lib/button.css +0 -1
- package/packages/theme-chalk/lib/card.css +0 -1
- package/packages/theme-chalk/lib/carousel-item.css +0 -1
- package/packages/theme-chalk/lib/carousel.css +0 -1
- package/packages/theme-chalk/lib/cascader.css +0 -1
- package/packages/theme-chalk/lib/checkbox.css +0 -1
- package/packages/theme-chalk/lib/col.css +0 -1
- package/packages/theme-chalk/lib/collapse-item.css +0 -0
- package/packages/theme-chalk/lib/collapse.css +0 -1
- package/packages/theme-chalk/lib/color-picker.css +0 -1
- package/packages/theme-chalk/lib/container.css +0 -1
- package/packages/theme-chalk/lib/date-picker.css +0 -1
- package/packages/theme-chalk/lib/dialog.css +0 -1
- package/packages/theme-chalk/lib/display.css +0 -1
- package/packages/theme-chalk/lib/dropdown-item.css +0 -0
- package/packages/theme-chalk/lib/dropdown-menu.css +0 -0
- package/packages/theme-chalk/lib/dropdown.css +0 -1
- package/packages/theme-chalk/lib/fonts/element-icons.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/element-icons.woff +0 -0
- package/packages/theme-chalk/lib/footer.css +0 -1
- package/packages/theme-chalk/lib/form-item.css +0 -0
- package/packages/theme-chalk/lib/form.css +0 -1
- package/packages/theme-chalk/lib/header.css +0 -1
- package/packages/theme-chalk/lib/icon.css +0 -1
- package/packages/theme-chalk/lib/index.css +0 -1
- package/packages/theme-chalk/lib/input-number.css +0 -1
- package/packages/theme-chalk/lib/input.css +0 -1
- package/packages/theme-chalk/lib/loading.css +0 -1
- package/packages/theme-chalk/lib/main.css +0 -1
- package/packages/theme-chalk/lib/menu-item-group.css +0 -0
- package/packages/theme-chalk/lib/menu-item.css +0 -0
- package/packages/theme-chalk/lib/menu.css +0 -1
- package/packages/theme-chalk/lib/message-box.css +0 -1
- package/packages/theme-chalk/lib/message.css +0 -1
- package/packages/theme-chalk/lib/notification.css +0 -1
- package/packages/theme-chalk/lib/option-group.css +0 -1
- package/packages/theme-chalk/lib/option.css +0 -1
- package/packages/theme-chalk/lib/pagination.css +0 -1
- package/packages/theme-chalk/lib/popover.css +0 -1
- package/packages/theme-chalk/lib/popper.css +0 -1
- package/packages/theme-chalk/lib/progress.css +0 -1
- package/packages/theme-chalk/lib/radio-button.css +0 -1
- package/packages/theme-chalk/lib/radio-group.css +0 -1
- package/packages/theme-chalk/lib/radio.css +0 -1
- package/packages/theme-chalk/lib/rate.css +0 -1
- package/packages/theme-chalk/lib/reset.css +0 -1
- package/packages/theme-chalk/lib/row.css +0 -1
- package/packages/theme-chalk/lib/scrollbar.css +0 -1
- package/packages/theme-chalk/lib/select-dropdown.css +0 -1
- package/packages/theme-chalk/lib/select.css +0 -1
- package/packages/theme-chalk/lib/slider.css +0 -1
- package/packages/theme-chalk/lib/spinner.css +0 -1
- package/packages/theme-chalk/lib/step.css +0 -1
- package/packages/theme-chalk/lib/steps.css +0 -1
- package/packages/theme-chalk/lib/submenu.css +0 -0
- package/packages/theme-chalk/lib/switch.css +0 -1
- package/packages/theme-chalk/lib/tab-pane.css +0 -0
- package/packages/theme-chalk/lib/table-column.css +0 -1
- package/packages/theme-chalk/lib/table.css +0 -1
- package/packages/theme-chalk/lib/tabs.css +0 -1
- package/packages/theme-chalk/lib/tag.css +0 -1
- package/packages/theme-chalk/lib/time-picker.css +0 -1
- package/packages/theme-chalk/lib/time-select.css +0 -1
- package/packages/theme-chalk/lib/tooltip.css +0 -1
- package/packages/theme-chalk/lib/transfer.css +0 -1
- package/packages/theme-chalk/lib/tree.css +0 -1
- package/packages/theme-chalk/lib/upload.css +0 -1
- package/packages/upload/README.md +0 -67
- package/packages/upload/cooking.conf.js +0 -6
- package/packages/upload/package.json +0 -16
- package/packages/upload/src/iframe-upload.vue +0 -167
- package/src/utils/sync.js +0 -54
- /package/{packages/theme-chalk/lib/breadcrumb-item.css → lib/theme-chalk/infinite-scroll.css} +0 -0
- /package/{packages/theme-chalk/lib/button-group.css → lib/theme-chalk/infiniteScroll.css} +0 -0
- /package/packages/theme-chalk/{lib/checkbox-button.css → src/infinite-scroll.scss} +0 -0
- /package/packages/theme-chalk/{lib/checkbox-group.css → src/infiniteScroll.scss} +0 -0
package/lib/message-box.js
CHANGED
|
@@ -1,586 +1,378 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ const __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
10
|
+
/******/ __webpack_require__.n = (module) => {
|
|
11
|
+
/******/ const getter = module && module.__esModule ?
|
|
12
|
+
/******/ () => (module['default']) :
|
|
13
|
+
/******/ () => (module);
|
|
14
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
15
|
+
/******/ return getter;
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/define property getters */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ // define getter/value functions for harmony exports
|
|
22
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
23
|
+
/******/ if(Array.isArray(definition)) {
|
|
24
|
+
/******/ var i = 0;
|
|
25
|
+
/******/ while(i < definition.length) {
|
|
26
|
+
/******/ var key = definition[i++];
|
|
27
|
+
/******/ var binding = definition[i++];
|
|
28
|
+
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
29
|
+
/******/ if(binding === 0) {
|
|
30
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
31
|
+
/******/ } else {
|
|
32
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ } else if(binding === 0) { i++; }
|
|
35
|
+
/******/ }
|
|
36
|
+
/******/ } else {
|
|
37
|
+
/******/ for(var key in definition) {
|
|
38
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
39
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
40
|
+
/******/ }
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ }
|
|
18
43
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, {
|
|
41
|
-
/******/ configurable: false,
|
|
42
|
-
/******/ enumerable: true,
|
|
43
|
-
/******/ get: getter
|
|
44
|
-
/******/ });
|
|
45
|
-
/******/ }
|
|
46
|
-
/******/ };
|
|
47
|
-
/******/
|
|
48
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
49
|
-
/******/ __webpack_require__.n = function(module) {
|
|
50
|
-
/******/ var getter = module && module.__esModule ?
|
|
51
|
-
/******/ function getDefault() { return module['default']; } :
|
|
52
|
-
/******/ function getModuleExports() { return module; };
|
|
53
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
54
|
-
/******/ return getter;
|
|
55
|
-
/******/ };
|
|
56
|
-
/******/
|
|
57
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
58
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
59
|
-
/******/
|
|
60
|
-
/******/ // __webpack_public_path__
|
|
61
|
-
/******/ __webpack_require__.p = "/dist/";
|
|
62
|
-
/******/
|
|
63
|
-
/******/ // Load entry module and return exports
|
|
64
|
-
/******/ return __webpack_require__(__webpack_require__.s = 260);
|
|
65
|
-
/******/ })
|
|
44
|
+
/******/ })();
|
|
45
|
+
/******/
|
|
46
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
47
|
+
/******/ (() => {
|
|
48
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
49
|
+
/******/ })();
|
|
50
|
+
/******/
|
|
66
51
|
/************************************************************************/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
52
|
+
let __webpack_exports__ = {};
|
|
53
|
+
|
|
54
|
+
// EXPORTS
|
|
55
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
56
|
+
"default": () => (/* binding */ message_box)
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
;// external "vue"
|
|
60
|
+
const external_vue_namespaceObject = require("vue");
|
|
61
|
+
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_namespaceObject);
|
|
62
|
+
;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/message-box/src/main.vue?vue&type=template&id=4a86a5be
|
|
63
|
+
var render = function () {
|
|
64
|
+
var _vm = this
|
|
65
|
+
var _h = _vm.$createElement
|
|
66
|
+
var _c = _vm._self._c || _h
|
|
67
|
+
return _c("transition", { attrs: { name: "msgbox-fade" } }, [
|
|
68
|
+
_c(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
directives: [
|
|
72
|
+
{
|
|
73
|
+
name: "show",
|
|
74
|
+
rawName: "v-show",
|
|
75
|
+
value: _vm.visible,
|
|
76
|
+
expression: "visible",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
staticClass: "el-message-box__wrapper",
|
|
80
|
+
attrs: {
|
|
81
|
+
tabindex: "-1",
|
|
82
|
+
role: "dialog",
|
|
83
|
+
"aria-modal": "true",
|
|
84
|
+
"aria-label": _vm.title || "dialog",
|
|
85
|
+
},
|
|
86
|
+
on: {
|
|
87
|
+
click: function ($event) {
|
|
88
|
+
if ($event.target !== $event.currentTarget) {
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
return _vm.handleWrapperClick($event)
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
[
|
|
96
|
+
_c(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
staticClass: "el-message-box",
|
|
100
|
+
class: [_vm.customClass, _vm.center && "el-message-box--center"],
|
|
101
|
+
},
|
|
102
|
+
[
|
|
103
|
+
_vm.title !== null
|
|
104
|
+
? _c("div", { staticClass: "el-message-box__header" }, [
|
|
105
|
+
_c("div", { staticClass: "el-message-box__title" }, [
|
|
106
|
+
_vm.icon && _vm.center
|
|
107
|
+
? _c("div", {
|
|
108
|
+
class: ["el-message-box__status", _vm.icon],
|
|
109
|
+
})
|
|
110
|
+
: _vm._e(),
|
|
111
|
+
_c("span", [_vm._v(_vm._s(_vm.title))]),
|
|
112
|
+
]),
|
|
113
|
+
_vm.showClose
|
|
114
|
+
? _c(
|
|
115
|
+
"button",
|
|
116
|
+
{
|
|
117
|
+
staticClass: "el-message-box__headerbtn",
|
|
118
|
+
attrs: { type: "button", "aria-label": "Close" },
|
|
119
|
+
on: {
|
|
120
|
+
click: function ($event) {
|
|
121
|
+
_vm.handleAction(
|
|
122
|
+
_vm.distinguishCancelAndClose
|
|
123
|
+
? "close"
|
|
124
|
+
: "cancel"
|
|
125
|
+
)
|
|
126
|
+
},
|
|
127
|
+
keydown: function ($event) {
|
|
128
|
+
if (
|
|
129
|
+
!("button" in $event) &&
|
|
130
|
+
_vm._k(
|
|
131
|
+
$event.keyCode,
|
|
132
|
+
"enter",
|
|
133
|
+
13,
|
|
134
|
+
$event.key,
|
|
135
|
+
"Enter"
|
|
136
|
+
)
|
|
137
|
+
) {
|
|
138
|
+
return null
|
|
139
|
+
}
|
|
140
|
+
_vm.handleAction(
|
|
141
|
+
_vm.distinguishCancelAndClose
|
|
142
|
+
? "close"
|
|
143
|
+
: "cancel"
|
|
144
|
+
)
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
[
|
|
149
|
+
_c("i", {
|
|
150
|
+
staticClass: "el-message-box__close el-icon-close",
|
|
151
|
+
}),
|
|
152
|
+
]
|
|
153
|
+
)
|
|
154
|
+
: _vm._e(),
|
|
155
|
+
])
|
|
156
|
+
: _vm._e(),
|
|
157
|
+
_c("div", { staticClass: "el-message-box__content" }, [
|
|
158
|
+
_c("div", { staticClass: "el-message-box__container" }, [
|
|
159
|
+
_vm.icon && !_vm.center && _vm.message !== ""
|
|
160
|
+
? _c("div", { class: ["el-message-box__status", _vm.icon] })
|
|
161
|
+
: _vm._e(),
|
|
162
|
+
_vm.message !== ""
|
|
163
|
+
? _c(
|
|
164
|
+
"div",
|
|
165
|
+
{ staticClass: "el-message-box__message" },
|
|
166
|
+
[
|
|
167
|
+
_vm._t("default", [
|
|
168
|
+
!_vm.dangerouslyUseHTMLString
|
|
169
|
+
? _c("p", [_vm._v(_vm._s(_vm.message))])
|
|
170
|
+
: _c("p", {
|
|
171
|
+
domProps: { innerHTML: _vm._s(_vm.message) },
|
|
172
|
+
}),
|
|
173
|
+
]),
|
|
174
|
+
],
|
|
175
|
+
2
|
|
176
|
+
)
|
|
177
|
+
: _vm._e(),
|
|
178
|
+
]),
|
|
179
|
+
_c(
|
|
180
|
+
"div",
|
|
181
|
+
{
|
|
182
|
+
directives: [
|
|
183
|
+
{
|
|
184
|
+
name: "show",
|
|
185
|
+
rawName: "v-show",
|
|
186
|
+
value: _vm.showInput,
|
|
187
|
+
expression: "showInput",
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
staticClass: "el-message-box__input",
|
|
191
|
+
},
|
|
192
|
+
[
|
|
193
|
+
_c("el-input", {
|
|
194
|
+
ref: "input",
|
|
195
|
+
attrs: {
|
|
196
|
+
type: _vm.inputType,
|
|
197
|
+
placeholder: _vm.inputPlaceholder,
|
|
198
|
+
},
|
|
199
|
+
nativeOn: {
|
|
200
|
+
keydown: function ($event) {
|
|
201
|
+
if (
|
|
202
|
+
!("button" in $event) &&
|
|
203
|
+
_vm._k(
|
|
204
|
+
$event.keyCode,
|
|
205
|
+
"enter",
|
|
206
|
+
13,
|
|
207
|
+
$event.key,
|
|
208
|
+
"Enter"
|
|
209
|
+
)
|
|
210
|
+
) {
|
|
211
|
+
return null
|
|
212
|
+
}
|
|
213
|
+
return _vm.handleInputEnter($event)
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
model: {
|
|
217
|
+
value: _vm.inputValue,
|
|
218
|
+
callback: function ($$v) {
|
|
219
|
+
_vm.inputValue = $$v
|
|
220
|
+
},
|
|
221
|
+
expression: "inputValue",
|
|
222
|
+
},
|
|
223
|
+
}),
|
|
224
|
+
_c(
|
|
225
|
+
"div",
|
|
226
|
+
{
|
|
227
|
+
staticClass: "el-message-box__errormsg",
|
|
228
|
+
style: {
|
|
229
|
+
visibility: !!_vm.editorErrorMessage
|
|
230
|
+
? "visible"
|
|
231
|
+
: "hidden",
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
[_vm._v(_vm._s(_vm.editorErrorMessage))]
|
|
235
|
+
),
|
|
236
|
+
],
|
|
237
|
+
1
|
|
238
|
+
),
|
|
239
|
+
]),
|
|
240
|
+
_c(
|
|
241
|
+
"div",
|
|
242
|
+
{ staticClass: "el-message-box__btns" },
|
|
243
|
+
[
|
|
244
|
+
_vm.showCancelButton
|
|
245
|
+
? _c(
|
|
246
|
+
"el-button",
|
|
247
|
+
{
|
|
248
|
+
class: [_vm.cancelButtonClasses],
|
|
249
|
+
attrs: {
|
|
250
|
+
loading: _vm.cancelButtonLoading,
|
|
251
|
+
round: _vm.roundButton,
|
|
252
|
+
size: "small",
|
|
253
|
+
},
|
|
254
|
+
on: {
|
|
255
|
+
keydown: function ($event) {
|
|
256
|
+
if (
|
|
257
|
+
!("button" in $event) &&
|
|
258
|
+
_vm._k(
|
|
259
|
+
$event.keyCode,
|
|
260
|
+
"enter",
|
|
261
|
+
13,
|
|
262
|
+
$event.key,
|
|
263
|
+
"Enter"
|
|
264
|
+
)
|
|
265
|
+
) {
|
|
266
|
+
return null
|
|
267
|
+
}
|
|
268
|
+
_vm.handleAction("cancel")
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
nativeOn: {
|
|
272
|
+
click: function ($event) {
|
|
273
|
+
_vm.handleAction("cancel")
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
[
|
|
278
|
+
_vm._v(
|
|
279
|
+
"\n " +
|
|
280
|
+
_vm._s(
|
|
281
|
+
_vm.cancelButtonText ||
|
|
282
|
+
_vm.t("el.messagebox.cancel")
|
|
283
|
+
) +
|
|
284
|
+
"\n "
|
|
285
|
+
),
|
|
286
|
+
]
|
|
287
|
+
)
|
|
288
|
+
: _vm._e(),
|
|
289
|
+
_c(
|
|
290
|
+
"el-button",
|
|
291
|
+
{
|
|
292
|
+
directives: [
|
|
293
|
+
{
|
|
294
|
+
name: "show",
|
|
295
|
+
rawName: "v-show",
|
|
296
|
+
value: _vm.showConfirmButton,
|
|
297
|
+
expression: "showConfirmButton",
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
ref: "confirm",
|
|
301
|
+
class: [_vm.confirmButtonClasses],
|
|
302
|
+
attrs: {
|
|
303
|
+
loading: _vm.confirmButtonLoading,
|
|
304
|
+
round: _vm.roundButton,
|
|
305
|
+
size: "small",
|
|
306
|
+
},
|
|
307
|
+
on: {
|
|
308
|
+
keydown: function ($event) {
|
|
309
|
+
if (
|
|
310
|
+
!("button" in $event) &&
|
|
311
|
+
_vm._k(
|
|
312
|
+
$event.keyCode,
|
|
313
|
+
"enter",
|
|
314
|
+
13,
|
|
315
|
+
$event.key,
|
|
316
|
+
"Enter"
|
|
317
|
+
)
|
|
318
|
+
) {
|
|
319
|
+
return null
|
|
320
|
+
}
|
|
321
|
+
_vm.handleAction("confirm")
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
nativeOn: {
|
|
325
|
+
click: function ($event) {
|
|
326
|
+
_vm.handleAction("confirm")
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
[
|
|
331
|
+
_vm._v(
|
|
332
|
+
"\n " +
|
|
333
|
+
_vm._s(
|
|
334
|
+
_vm.confirmButtonText ||
|
|
335
|
+
_vm.t("el.messagebox.confirm")
|
|
336
|
+
) +
|
|
337
|
+
"\n "
|
|
338
|
+
),
|
|
339
|
+
]
|
|
340
|
+
),
|
|
341
|
+
],
|
|
342
|
+
1
|
|
343
|
+
),
|
|
344
|
+
]
|
|
345
|
+
),
|
|
346
|
+
]
|
|
347
|
+
),
|
|
348
|
+
])
|
|
174
349
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
/***/ }),
|
|
178
|
-
|
|
179
|
-
/***/ 12:
|
|
180
|
-
/***/ (function(module, exports) {
|
|
181
|
-
|
|
182
|
-
module.exports = require("element-ui/lib/locale");
|
|
183
|
-
|
|
184
|
-
/***/ }),
|
|
185
|
-
|
|
186
|
-
/***/ 13:
|
|
187
|
-
/***/ (function(module, exports) {
|
|
188
|
-
|
|
189
|
-
module.exports = require("element-ui/lib/utils/popup");
|
|
190
|
-
|
|
191
|
-
/***/ }),
|
|
192
|
-
|
|
193
|
-
/***/ 15:
|
|
194
|
-
/***/ (function(module, exports) {
|
|
195
|
-
|
|
196
|
-
module.exports = require("element-ui/lib/button");
|
|
197
|
-
|
|
198
|
-
/***/ }),
|
|
199
|
-
|
|
200
|
-
/***/ 2:
|
|
201
|
-
/***/ (function(module, exports) {
|
|
202
|
-
|
|
203
|
-
module.exports = require("element-ui/lib/utils/dom");
|
|
204
|
-
|
|
205
|
-
/***/ }),
|
|
206
|
-
|
|
207
|
-
/***/ 21:
|
|
208
|
-
/***/ (function(module, exports) {
|
|
209
|
-
|
|
210
|
-
module.exports = require("element-ui/lib/utils/vdom");
|
|
211
|
-
|
|
212
|
-
/***/ }),
|
|
213
|
-
|
|
214
|
-
/***/ 260:
|
|
215
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
216
|
-
|
|
217
|
-
"use strict";
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
exports.__esModule = true;
|
|
221
|
-
|
|
222
|
-
var _main = __webpack_require__(261);
|
|
223
|
-
|
|
224
|
-
var _main2 = _interopRequireDefault(_main);
|
|
225
|
-
|
|
226
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
227
|
-
|
|
228
|
-
exports.default = _main2.default;
|
|
229
|
-
|
|
230
|
-
/***/ }),
|
|
231
|
-
|
|
232
|
-
/***/ 261:
|
|
233
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
234
|
-
|
|
235
|
-
"use strict";
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
exports.__esModule = true;
|
|
239
|
-
exports.MessageBox = undefined;
|
|
240
|
-
|
|
241
|
-
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; };
|
|
242
|
-
|
|
243
|
-
var _vue = __webpack_require__(4);
|
|
244
|
-
|
|
245
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
246
|
-
|
|
247
|
-
var _main = __webpack_require__(262);
|
|
248
|
-
|
|
249
|
-
var _main2 = _interopRequireDefault(_main);
|
|
250
|
-
|
|
251
|
-
var _merge = __webpack_require__(9);
|
|
252
|
-
|
|
253
|
-
var _merge2 = _interopRequireDefault(_merge);
|
|
254
|
-
|
|
255
|
-
var _vdom = __webpack_require__(21);
|
|
256
|
-
|
|
257
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
258
|
-
|
|
259
|
-
var defaults = {
|
|
260
|
-
title: null,
|
|
261
|
-
message: '',
|
|
262
|
-
type: '',
|
|
263
|
-
showInput: false,
|
|
264
|
-
showClose: true,
|
|
265
|
-
modalFade: true,
|
|
266
|
-
lockScroll: true,
|
|
267
|
-
closeOnClickModal: true,
|
|
268
|
-
closeOnPressEscape: true,
|
|
269
|
-
closeOnHashChange: true,
|
|
270
|
-
inputValue: null,
|
|
271
|
-
inputPlaceholder: '',
|
|
272
|
-
inputType: 'text',
|
|
273
|
-
inputPattern: null,
|
|
274
|
-
inputValidator: null,
|
|
275
|
-
inputErrorMessage: '',
|
|
276
|
-
showConfirmButton: true,
|
|
277
|
-
showCancelButton: false,
|
|
278
|
-
confirmButtonPosition: 'right',
|
|
279
|
-
confirmButtonHighlight: false,
|
|
280
|
-
cancelButtonHighlight: false,
|
|
281
|
-
confirmButtonText: '',
|
|
282
|
-
cancelButtonText: '',
|
|
283
|
-
confirmButtonClass: '',
|
|
284
|
-
cancelButtonClass: '',
|
|
285
|
-
customClass: '',
|
|
286
|
-
beforeClose: null,
|
|
287
|
-
dangerouslyUseHTMLString: false,
|
|
288
|
-
center: false,
|
|
289
|
-
roundButton: false
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
var MessageBoxConstructor = _vue2.default.extend(_main2.default);
|
|
293
|
-
|
|
294
|
-
var currentMsg = void 0,
|
|
295
|
-
instance = void 0;
|
|
296
|
-
var msgQueue = [];
|
|
297
|
-
|
|
298
|
-
var defaultCallback = function defaultCallback(action) {
|
|
299
|
-
if (currentMsg) {
|
|
300
|
-
var callback = currentMsg.callback;
|
|
301
|
-
if (typeof callback === 'function') {
|
|
302
|
-
if (instance.showInput) {
|
|
303
|
-
callback(instance.inputValue, action);
|
|
304
|
-
} else {
|
|
305
|
-
callback(action);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (currentMsg.resolve) {
|
|
309
|
-
if (action === 'confirm') {
|
|
310
|
-
if (instance.showInput) {
|
|
311
|
-
currentMsg.resolve({ value: instance.inputValue, action: action });
|
|
312
|
-
} else {
|
|
313
|
-
currentMsg.resolve(action);
|
|
314
|
-
}
|
|
315
|
-
} else if (action === 'cancel' && currentMsg.reject) {
|
|
316
|
-
currentMsg.reject(action);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
var initInstance = function initInstance() {
|
|
323
|
-
instance = new MessageBoxConstructor({
|
|
324
|
-
el: document.createElement('div')
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
instance.callback = defaultCallback;
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
var showNextMsg = function showNextMsg() {
|
|
331
|
-
if (!instance) {
|
|
332
|
-
initInstance();
|
|
333
|
-
}
|
|
334
|
-
instance.action = '';
|
|
335
|
-
|
|
336
|
-
if (!instance.visible || instance.closeTimer) {
|
|
337
|
-
if (msgQueue.length > 0) {
|
|
338
|
-
currentMsg = msgQueue.shift();
|
|
339
|
-
|
|
340
|
-
var options = currentMsg.options;
|
|
341
|
-
for (var prop in options) {
|
|
342
|
-
if (options.hasOwnProperty(prop)) {
|
|
343
|
-
instance[prop] = options[prop];
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
if (options.callback === undefined) {
|
|
347
|
-
instance.callback = defaultCallback;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
var oldCb = instance.callback;
|
|
351
|
-
instance.callback = function (action, instance) {
|
|
352
|
-
oldCb(action, instance);
|
|
353
|
-
showNextMsg();
|
|
354
|
-
};
|
|
355
|
-
if ((0, _vdom.isVNode)(instance.message)) {
|
|
356
|
-
instance.$slots.default = [instance.message];
|
|
357
|
-
instance.message = null;
|
|
358
|
-
} else {
|
|
359
|
-
delete instance.$slots.default;
|
|
360
|
-
}
|
|
361
|
-
['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) {
|
|
362
|
-
if (instance[prop] === undefined) {
|
|
363
|
-
instance[prop] = true;
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
document.body.appendChild(instance.$el);
|
|
367
|
-
|
|
368
|
-
_vue2.default.nextTick(function () {
|
|
369
|
-
instance.visible = true;
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
var MessageBox = function MessageBox(options, callback) {
|
|
376
|
-
if (_vue2.default.prototype.$isServer) return;
|
|
377
|
-
if (typeof options === 'string' || (0, _vdom.isVNode)(options)) {
|
|
378
|
-
options = {
|
|
379
|
-
message: options
|
|
380
|
-
};
|
|
381
|
-
if (typeof arguments[1] === 'string') {
|
|
382
|
-
options.title = arguments[1];
|
|
383
|
-
}
|
|
384
|
-
} else if (options.callback && !callback) {
|
|
385
|
-
callback = options.callback;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
if (typeof Promise !== 'undefined') {
|
|
389
|
-
return new Promise(function (resolve, reject) {
|
|
390
|
-
// eslint-disable-line
|
|
391
|
-
msgQueue.push({
|
|
392
|
-
options: (0, _merge2.default)({}, defaults, MessageBox.defaults, options),
|
|
393
|
-
callback: callback,
|
|
394
|
-
resolve: resolve,
|
|
395
|
-
reject: reject
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
showNextMsg();
|
|
399
|
-
});
|
|
400
|
-
} else {
|
|
401
|
-
msgQueue.push({
|
|
402
|
-
options: (0, _merge2.default)({}, defaults, MessageBox.defaults, options),
|
|
403
|
-
callback: callback
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
showNextMsg();
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
MessageBox.setDefaults = function (defaults) {
|
|
411
|
-
MessageBox.defaults = defaults;
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
MessageBox.alert = function (message, title, options) {
|
|
415
|
-
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
416
|
-
options = title;
|
|
417
|
-
title = '';
|
|
418
|
-
} else if (title === undefined) {
|
|
419
|
-
title = '';
|
|
420
|
-
}
|
|
421
|
-
return MessageBox((0, _merge2.default)({
|
|
422
|
-
title: title,
|
|
423
|
-
message: message,
|
|
424
|
-
$type: 'alert',
|
|
425
|
-
closeOnPressEscape: false,
|
|
426
|
-
closeOnClickModal: false
|
|
427
|
-
}, options));
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
MessageBox.confirm = function (message, title, options) {
|
|
431
|
-
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
432
|
-
options = title;
|
|
433
|
-
title = '';
|
|
434
|
-
} else if (title === undefined) {
|
|
435
|
-
title = '';
|
|
436
|
-
}
|
|
437
|
-
return MessageBox((0, _merge2.default)({
|
|
438
|
-
title: title,
|
|
439
|
-
message: message,
|
|
440
|
-
$type: 'confirm',
|
|
441
|
-
showCancelButton: true
|
|
442
|
-
}, options));
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
MessageBox.prompt = function (message, title, options) {
|
|
446
|
-
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
447
|
-
options = title;
|
|
448
|
-
title = '';
|
|
449
|
-
} else if (title === undefined) {
|
|
450
|
-
title = '';
|
|
451
|
-
}
|
|
452
|
-
return MessageBox((0, _merge2.default)({
|
|
453
|
-
title: title,
|
|
454
|
-
message: message,
|
|
455
|
-
showCancelButton: true,
|
|
456
|
-
showInput: true,
|
|
457
|
-
$type: 'prompt'
|
|
458
|
-
}, options));
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
MessageBox.close = function () {
|
|
462
|
-
instance.doClose();
|
|
463
|
-
instance.visible = false;
|
|
464
|
-
msgQueue = [];
|
|
465
|
-
currentMsg = null;
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
exports.default = MessageBox;
|
|
469
|
-
exports.MessageBox = MessageBox;
|
|
470
|
-
|
|
471
|
-
/***/ }),
|
|
472
|
-
|
|
473
|
-
/***/ 262:
|
|
474
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
475
|
-
|
|
476
|
-
"use strict";
|
|
477
|
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
478
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue__ = __webpack_require__(85);
|
|
479
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue__);
|
|
480
|
-
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
481
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_163222c1_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_main_vue__ = __webpack_require__(264);
|
|
482
|
-
var normalizeComponent = __webpack_require__(0)
|
|
483
|
-
/* script */
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
/* template */
|
|
487
|
-
|
|
488
|
-
/* template functional */
|
|
489
|
-
var __vue_template_functional__ = false
|
|
490
|
-
/* styles */
|
|
491
|
-
var __vue_styles__ = null
|
|
492
|
-
/* scopeId */
|
|
493
|
-
var __vue_scopeId__ = null
|
|
494
|
-
/* moduleIdentifier (server only) */
|
|
495
|
-
var __vue_module_identifier__ = null
|
|
496
|
-
var Component = normalizeComponent(
|
|
497
|
-
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_main_vue___default.a,
|
|
498
|
-
__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_163222c1_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_main_vue__["a" /* default */],
|
|
499
|
-
__vue_template_functional__,
|
|
500
|
-
__vue_styles__,
|
|
501
|
-
__vue_scopeId__,
|
|
502
|
-
__vue_module_identifier__
|
|
503
|
-
)
|
|
504
|
-
|
|
505
|
-
/* harmony default export */ __webpack_exports__["default"] = (Component.exports);
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
/***/ }),
|
|
509
|
-
|
|
510
|
-
/***/ 263:
|
|
511
|
-
/***/ (function(module, exports) {
|
|
512
|
-
|
|
513
|
-
module.exports = require("element-ui/lib/utils/aria-dialog");
|
|
514
|
-
|
|
515
|
-
/***/ }),
|
|
516
|
-
|
|
517
|
-
/***/ 264:
|
|
518
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
519
|
-
|
|
520
|
-
"use strict";
|
|
521
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"msgbox-fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"el-message-box__wrapper",attrs:{"tabindex":"-1","role":"dialog","aria-modal":"true","aria-label":_vm.title || 'dialog'},on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.handleWrapperClick($event)}}},[_c('div',{staticClass:"el-message-box",class:[_vm.customClass, _vm.center && 'el-message-box--center']},[(_vm.title !== null)?_c('div',{staticClass:"el-message-box__header"},[_c('div',{staticClass:"el-message-box__title"},[(_vm.typeClass && _vm.center)?_c('div',{class:['el-message-box__status', _vm.typeClass]}):_vm._e(),_c('span',[_vm._v(_vm._s(_vm.title))])]),(_vm.showClose)?_c('button',{staticClass:"el-message-box__headerbtn",attrs:{"type":"button","aria-label":"Close"},on:{"click":function($event){_vm.handleAction('cancel')},"keydown":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }_vm.handleAction('cancel')}}},[_c('i',{staticClass:"el-message-box__close el-icon-close"})]):_vm._e()]):_vm._e(),_c('div',{staticClass:"el-message-box__content"},[(_vm.typeClass && !_vm.center && _vm.message !== '')?_c('div',{class:['el-message-box__status', _vm.typeClass]}):_vm._e(),(_vm.message !== '')?_c('div',{staticClass:"el-message-box__message"},[_vm._t("default",[(!_vm.dangerouslyUseHTMLString)?_c('p',[_vm._v(_vm._s(_vm.message))]):_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}})])],2):_vm._e(),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showInput),expression:"showInput"}],staticClass:"el-message-box__input"},[_c('el-input',{ref:"input",attrs:{"type":_vm.inputType,"placeholder":_vm.inputPlaceholder},nativeOn:{"keydown":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleInputEnter($event)}},model:{value:(_vm.inputValue),callback:function ($$v) {_vm.inputValue=$$v},expression:"inputValue"}}),_c('div',{staticClass:"el-message-box__errormsg",style:({ visibility: !!_vm.editorErrorMessage ? 'visible' : 'hidden' })},[_vm._v(_vm._s(_vm.editorErrorMessage))])],1)]),_c('div',{staticClass:"el-message-box__btns"},[(_vm.showCancelButton)?_c('el-button',{class:[ _vm.cancelButtonClasses ],attrs:{"loading":_vm.cancelButtonLoading,"round":_vm.roundButton,"size":"small"},on:{"keydown":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }_vm.handleAction('cancel')}},nativeOn:{"click":function($event){_vm.handleAction('cancel')}}},[_vm._v("\n "+_vm._s(_vm.cancelButtonText || _vm.t('el.messagebox.cancel'))+"\n ")]):_vm._e(),_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.showConfirmButton),expression:"showConfirmButton"}],ref:"confirm",class:[ _vm.confirmButtonClasses ],attrs:{"loading":_vm.confirmButtonLoading,"round":_vm.roundButton,"size":"small"},on:{"keydown":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }_vm.handleAction('confirm')}},nativeOn:{"click":function($event){_vm.handleAction('confirm')}}},[_vm._v("\n "+_vm._s(_vm.confirmButtonText || _vm.t('el.messagebox.confirm'))+"\n ")])],1)])])])}
|
|
522
350
|
var staticRenderFns = []
|
|
523
|
-
|
|
524
|
-
/* harmony default export */ __webpack_exports__["a"] = (esExports);
|
|
525
|
-
|
|
526
|
-
/***/ }),
|
|
527
|
-
|
|
528
|
-
/***/ 4:
|
|
529
|
-
/***/ (function(module, exports) {
|
|
530
|
-
|
|
531
|
-
module.exports = require("vue");
|
|
532
|
-
|
|
533
|
-
/***/ }),
|
|
534
|
-
|
|
535
|
-
/***/ 5:
|
|
536
|
-
/***/ (function(module, exports) {
|
|
537
|
-
|
|
538
|
-
module.exports = require("element-ui/lib/mixins/locale");
|
|
539
|
-
|
|
540
|
-
/***/ }),
|
|
541
|
-
|
|
542
|
-
/***/ 6:
|
|
543
|
-
/***/ (function(module, exports) {
|
|
544
|
-
|
|
545
|
-
module.exports = require("element-ui/lib/input");
|
|
546
|
-
|
|
547
|
-
/***/ }),
|
|
351
|
+
render._withStripped = true
|
|
548
352
|
|
|
549
|
-
/***/ 85:
|
|
550
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
551
353
|
|
|
552
|
-
|
|
354
|
+
;// ./packages/message-box/src/main.vue?vue&type=template&id=4a86a5be
|
|
553
355
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
var
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
var _locale3 = __webpack_require__(12);
|
|
576
|
-
|
|
577
|
-
var _ariaDialog = __webpack_require__(263);
|
|
578
|
-
|
|
579
|
-
var _ariaDialog2 = _interopRequireDefault(_ariaDialog);
|
|
580
|
-
|
|
581
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
582
|
-
|
|
583
|
-
var messageBox = void 0; //
|
|
356
|
+
;// external "mazey-element-ui/lib/utils/popup"
|
|
357
|
+
const popup_namespaceObject = require("mazey-element-ui/lib/utils/popup");
|
|
358
|
+
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_namespaceObject);
|
|
359
|
+
;// external "mazey-element-ui/lib/mixins/locale"
|
|
360
|
+
const locale_namespaceObject = require("mazey-element-ui/lib/mixins/locale");
|
|
361
|
+
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_namespaceObject);
|
|
362
|
+
;// external "mazey-element-ui/lib/input"
|
|
363
|
+
const input_namespaceObject = require("mazey-element-ui/lib/input");
|
|
364
|
+
var input_default = /*#__PURE__*/__webpack_require__.n(input_namespaceObject);
|
|
365
|
+
;// external "mazey-element-ui/lib/button"
|
|
366
|
+
const button_namespaceObject = require("mazey-element-ui/lib/button");
|
|
367
|
+
var button_default = /*#__PURE__*/__webpack_require__.n(button_namespaceObject);
|
|
368
|
+
;// external "mazey-element-ui/lib/utils/dom"
|
|
369
|
+
const dom_namespaceObject = require("mazey-element-ui/lib/utils/dom");
|
|
370
|
+
;// external "mazey-element-ui/lib/locale"
|
|
371
|
+
const lib_locale_namespaceObject = require("mazey-element-ui/lib/locale");
|
|
372
|
+
;// external "mazey-element-ui/lib/utils/aria-dialog"
|
|
373
|
+
const aria_dialog_namespaceObject = require("mazey-element-ui/lib/utils/aria-dialog");
|
|
374
|
+
var aria_dialog_default = /*#__PURE__*/__webpack_require__.n(aria_dialog_namespaceObject);
|
|
375
|
+
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js
|
|
584
376
|
//
|
|
585
377
|
//
|
|
586
378
|
//
|
|
@@ -658,17 +450,26 @@ var messageBox = void 0; //
|
|
|
658
450
|
//
|
|
659
451
|
//
|
|
660
452
|
//
|
|
453
|
+
//
|
|
454
|
+
//
|
|
455
|
+
//
|
|
456
|
+
|
|
457
|
+
|
|
661
458
|
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
var messageBox;
|
|
662
465
|
var typeMap = {
|
|
663
466
|
success: 'success',
|
|
664
467
|
info: 'info',
|
|
665
468
|
warning: 'warning',
|
|
666
469
|
error: 'error'
|
|
667
470
|
};
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
mixins: [_popup2.default, _locale2.default],
|
|
671
|
-
|
|
471
|
+
/* harmony default export */ const mainvue_type_script_lang_js = ({
|
|
472
|
+
mixins: [(popup_default()), (locale_default())],
|
|
672
473
|
props: {
|
|
673
474
|
modal: {
|
|
674
475
|
default: true
|
|
@@ -698,28 +499,26 @@ exports.default = {
|
|
|
698
499
|
type: Boolean
|
|
699
500
|
}
|
|
700
501
|
},
|
|
701
|
-
|
|
702
502
|
components: {
|
|
703
|
-
ElInput:
|
|
704
|
-
ElButton:
|
|
503
|
+
ElInput: (input_default()),
|
|
504
|
+
ElButton: (button_default())
|
|
705
505
|
},
|
|
706
|
-
|
|
707
506
|
computed: {
|
|
708
|
-
|
|
709
|
-
|
|
507
|
+
icon: function icon() {
|
|
508
|
+
var type = this.type,
|
|
509
|
+
iconClass = this.iconClass;
|
|
510
|
+
return iconClass || (type && typeMap[type] ? "el-icon-" + typeMap[type] : '');
|
|
710
511
|
},
|
|
711
512
|
confirmButtonClasses: function confirmButtonClasses() {
|
|
712
|
-
return
|
|
513
|
+
return "el-button--primary " + this.confirmButtonClass;
|
|
713
514
|
},
|
|
714
515
|
cancelButtonClasses: function cancelButtonClasses() {
|
|
715
|
-
return
|
|
516
|
+
return "" + this.cancelButtonClass;
|
|
716
517
|
}
|
|
717
518
|
},
|
|
718
|
-
|
|
719
519
|
methods: {
|
|
720
520
|
getSafeClose: function getSafeClose() {
|
|
721
521
|
var _this = this;
|
|
722
|
-
|
|
723
522
|
var currentId = this.uid;
|
|
724
523
|
return function () {
|
|
725
524
|
_this.$nextTick(function () {
|
|
@@ -729,11 +528,9 @@ exports.default = {
|
|
|
729
528
|
},
|
|
730
529
|
doClose: function doClose() {
|
|
731
530
|
var _this2 = this;
|
|
732
|
-
|
|
733
531
|
if (!this.visible) return;
|
|
734
532
|
this.visible = false;
|
|
735
533
|
this._closing = true;
|
|
736
|
-
|
|
737
534
|
this.onClose && this.onClose();
|
|
738
535
|
messageBox.closeDialog(); // 解绑
|
|
739
536
|
if (this.lockScroll) {
|
|
@@ -747,7 +544,7 @@ exports.default = {
|
|
|
747
544
|
},
|
|
748
545
|
handleWrapperClick: function handleWrapperClick() {
|
|
749
546
|
if (this.closeOnClickModal) {
|
|
750
|
-
this.handleAction('cancel');
|
|
547
|
+
this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel');
|
|
751
548
|
}
|
|
752
549
|
},
|
|
753
550
|
handleInputEnter: function handleInputEnter() {
|
|
@@ -771,27 +568,27 @@ exports.default = {
|
|
|
771
568
|
if (this.$type === 'prompt') {
|
|
772
569
|
var inputPattern = this.inputPattern;
|
|
773
570
|
if (inputPattern && !inputPattern.test(this.inputValue || '')) {
|
|
774
|
-
this.editorErrorMessage = this.inputErrorMessage || (0,
|
|
775
|
-
(0,
|
|
571
|
+
this.editorErrorMessage = this.inputErrorMessage || (0,lib_locale_namespaceObject.t)('el.messagebox.error');
|
|
572
|
+
(0,dom_namespaceObject.addClass)(this.getInputElement(), 'invalid');
|
|
776
573
|
return false;
|
|
777
574
|
}
|
|
778
575
|
var inputValidator = this.inputValidator;
|
|
779
576
|
if (typeof inputValidator === 'function') {
|
|
780
577
|
var validateResult = inputValidator(this.inputValue);
|
|
781
578
|
if (validateResult === false) {
|
|
782
|
-
this.editorErrorMessage = this.inputErrorMessage || (0,
|
|
783
|
-
(0,
|
|
579
|
+
this.editorErrorMessage = this.inputErrorMessage || (0,lib_locale_namespaceObject.t)('el.messagebox.error');
|
|
580
|
+
(0,dom_namespaceObject.addClass)(this.getInputElement(), 'invalid');
|
|
784
581
|
return false;
|
|
785
582
|
}
|
|
786
583
|
if (typeof validateResult === 'string') {
|
|
787
584
|
this.editorErrorMessage = validateResult;
|
|
788
|
-
(0,
|
|
585
|
+
(0,dom_namespaceObject.addClass)(this.getInputElement(), 'invalid');
|
|
789
586
|
return false;
|
|
790
587
|
}
|
|
791
588
|
}
|
|
792
589
|
}
|
|
793
590
|
this.editorErrorMessage = '';
|
|
794
|
-
(0,
|
|
591
|
+
(0,dom_namespaceObject.removeClass)(this.getInputElement(), 'invalid');
|
|
795
592
|
return true;
|
|
796
593
|
},
|
|
797
594
|
getFirstFocus: function getFirstFocus() {
|
|
@@ -802,15 +599,16 @@ exports.default = {
|
|
|
802
599
|
getInputElement: function getInputElement() {
|
|
803
600
|
var inputRefs = this.$refs.input.$refs;
|
|
804
601
|
return inputRefs.input || inputRefs.textarea;
|
|
602
|
+
},
|
|
603
|
+
handleClose: function handleClose() {
|
|
604
|
+
this.handleAction('close');
|
|
805
605
|
}
|
|
806
606
|
},
|
|
807
|
-
|
|
808
607
|
watch: {
|
|
809
608
|
inputValue: {
|
|
810
609
|
immediate: true,
|
|
811
610
|
handler: function handler(val) {
|
|
812
611
|
var _this3 = this;
|
|
813
|
-
|
|
814
612
|
this.$nextTick(function (_) {
|
|
815
613
|
if (_this3.$type === 'prompt' && val !== null) {
|
|
816
614
|
_this3.validate();
|
|
@@ -818,10 +616,8 @@ exports.default = {
|
|
|
818
616
|
});
|
|
819
617
|
}
|
|
820
618
|
},
|
|
821
|
-
|
|
822
619
|
visible: function visible(val) {
|
|
823
620
|
var _this4 = this;
|
|
824
|
-
|
|
825
621
|
if (val) {
|
|
826
622
|
this.uid++;
|
|
827
623
|
if (this.$type === 'alert' || this.$type === 'confirm') {
|
|
@@ -830,7 +626,7 @@ exports.default = {
|
|
|
830
626
|
});
|
|
831
627
|
}
|
|
832
628
|
this.focusAfterClosed = document.activeElement;
|
|
833
|
-
messageBox = new
|
|
629
|
+
messageBox = new (aria_dialog_default())(this.$el, this.focusAfterClosed, this.getFirstFocus());
|
|
834
630
|
}
|
|
835
631
|
|
|
836
632
|
// prompt
|
|
@@ -843,14 +639,12 @@ exports.default = {
|
|
|
843
639
|
}, 500);
|
|
844
640
|
} else {
|
|
845
641
|
this.editorErrorMessage = '';
|
|
846
|
-
(0,
|
|
642
|
+
(0,dom_namespaceObject.removeClass)(this.getInputElement(), 'invalid');
|
|
847
643
|
}
|
|
848
644
|
}
|
|
849
645
|
},
|
|
850
|
-
|
|
851
646
|
mounted: function mounted() {
|
|
852
647
|
var _this5 = this;
|
|
853
|
-
|
|
854
648
|
this.$nextTick(function () {
|
|
855
649
|
if (_this5.closeOnHashChange) {
|
|
856
650
|
window.addEventListener('hashchange', _this5.close);
|
|
@@ -871,6 +665,7 @@ exports.default = {
|
|
|
871
665
|
title: undefined,
|
|
872
666
|
message: '',
|
|
873
667
|
type: '',
|
|
668
|
+
iconClass: '',
|
|
874
669
|
customClass: '',
|
|
875
670
|
showInput: false,
|
|
876
671
|
inputValue: null,
|
|
@@ -893,18 +688,339 @@ exports.default = {
|
|
|
893
688
|
callback: null,
|
|
894
689
|
dangerouslyUseHTMLString: false,
|
|
895
690
|
focusAfterClosed: null,
|
|
896
|
-
isOnComposition: false
|
|
691
|
+
isOnComposition: false,
|
|
692
|
+
distinguishCancelAndClose: false
|
|
897
693
|
};
|
|
898
694
|
}
|
|
695
|
+
});
|
|
696
|
+
;// ./packages/message-box/src/main.vue?vue&type=script&lang=js
|
|
697
|
+
/* harmony default export */ const src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
698
|
+
;// ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
699
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
700
|
+
|
|
701
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
702
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
703
|
+
// be included in the final webpack user bundle.
|
|
704
|
+
|
|
705
|
+
function normalizeComponent(
|
|
706
|
+
scriptExports,
|
|
707
|
+
render,
|
|
708
|
+
staticRenderFns,
|
|
709
|
+
functionalTemplate,
|
|
710
|
+
injectStyles,
|
|
711
|
+
scopeId,
|
|
712
|
+
moduleIdentifier /* server only */,
|
|
713
|
+
shadowMode /* vue-cli only */
|
|
714
|
+
) {
|
|
715
|
+
// Vue.extend constructor export interop
|
|
716
|
+
var options =
|
|
717
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
718
|
+
|
|
719
|
+
// render functions
|
|
720
|
+
if (render) {
|
|
721
|
+
options.render = render
|
|
722
|
+
options.staticRenderFns = staticRenderFns
|
|
723
|
+
options._compiled = true
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// functional template
|
|
727
|
+
if (functionalTemplate) {
|
|
728
|
+
options.functional = true
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
// scopedId
|
|
732
|
+
if (scopeId) {
|
|
733
|
+
options._scopeId = 'data-v-' + scopeId
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
var hook
|
|
737
|
+
if (moduleIdentifier) {
|
|
738
|
+
// server build
|
|
739
|
+
hook = function (context) {
|
|
740
|
+
// 2.3 injection
|
|
741
|
+
context =
|
|
742
|
+
context || // cached call
|
|
743
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
744
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
745
|
+
// 2.2 with runInNewContext: true
|
|
746
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
747
|
+
context = __VUE_SSR_CONTEXT__
|
|
748
|
+
}
|
|
749
|
+
// inject component styles
|
|
750
|
+
if (injectStyles) {
|
|
751
|
+
injectStyles.call(this, context)
|
|
752
|
+
}
|
|
753
|
+
// register component module identifier for async chunk inferrence
|
|
754
|
+
if (context && context._registeredComponents) {
|
|
755
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
// used by ssr in case component is cached and beforeCreate
|
|
759
|
+
// never gets called
|
|
760
|
+
options._ssrRegister = hook
|
|
761
|
+
} else if (injectStyles) {
|
|
762
|
+
hook = shadowMode
|
|
763
|
+
? function () {
|
|
764
|
+
injectStyles.call(
|
|
765
|
+
this,
|
|
766
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
767
|
+
)
|
|
768
|
+
}
|
|
769
|
+
: injectStyles
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
if (hook) {
|
|
773
|
+
if (options.functional) {
|
|
774
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
775
|
+
// go through the normalizer
|
|
776
|
+
options._injectStyles = hook
|
|
777
|
+
// register for functional component in vue file
|
|
778
|
+
var originalRender = options.render
|
|
779
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
780
|
+
hook.call(context)
|
|
781
|
+
return originalRender(h, context)
|
|
782
|
+
}
|
|
783
|
+
} else {
|
|
784
|
+
// inject component registration as beforeCreate hook
|
|
785
|
+
var existing = options.beforeCreate
|
|
786
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
return {
|
|
791
|
+
exports: scriptExports,
|
|
792
|
+
options: options
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
;// ./packages/message-box/src/main.vue
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
/* normalize component */
|
|
803
|
+
;
|
|
804
|
+
var component = normalizeComponent(
|
|
805
|
+
src_mainvue_type_script_lang_js,
|
|
806
|
+
render,
|
|
807
|
+
staticRenderFns,
|
|
808
|
+
false,
|
|
809
|
+
null,
|
|
810
|
+
null,
|
|
811
|
+
null
|
|
812
|
+
|
|
813
|
+
)
|
|
814
|
+
|
|
815
|
+
/* harmony default export */ const main = (component.exports);
|
|
816
|
+
;// external "mazey-element-ui/lib/utils/merge"
|
|
817
|
+
const merge_namespaceObject = require("mazey-element-ui/lib/utils/merge");
|
|
818
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_namespaceObject);
|
|
819
|
+
;// external "mazey-element-ui/lib/utils/vdom"
|
|
820
|
+
const vdom_namespaceObject = require("mazey-element-ui/lib/utils/vdom");
|
|
821
|
+
;// ./packages/message-box/src/main.js
|
|
822
|
+
var defaults = {
|
|
823
|
+
title: null,
|
|
824
|
+
message: '',
|
|
825
|
+
type: '',
|
|
826
|
+
iconClass: '',
|
|
827
|
+
showInput: false,
|
|
828
|
+
showClose: true,
|
|
829
|
+
modalFade: true,
|
|
830
|
+
lockScroll: true,
|
|
831
|
+
closeOnClickModal: true,
|
|
832
|
+
closeOnPressEscape: true,
|
|
833
|
+
closeOnHashChange: true,
|
|
834
|
+
inputValue: null,
|
|
835
|
+
inputPlaceholder: '',
|
|
836
|
+
inputType: 'text',
|
|
837
|
+
inputPattern: null,
|
|
838
|
+
inputValidator: null,
|
|
839
|
+
inputErrorMessage: '',
|
|
840
|
+
showConfirmButton: true,
|
|
841
|
+
showCancelButton: false,
|
|
842
|
+
confirmButtonPosition: 'right',
|
|
843
|
+
confirmButtonHighlight: false,
|
|
844
|
+
cancelButtonHighlight: false,
|
|
845
|
+
confirmButtonText: '',
|
|
846
|
+
cancelButtonText: '',
|
|
847
|
+
confirmButtonClass: '',
|
|
848
|
+
cancelButtonClass: '',
|
|
849
|
+
customClass: '',
|
|
850
|
+
beforeClose: null,
|
|
851
|
+
dangerouslyUseHTMLString: false,
|
|
852
|
+
center: false,
|
|
853
|
+
roundButton: false,
|
|
854
|
+
distinguishCancelAndClose: false
|
|
899
855
|
};
|
|
900
856
|
|
|
901
|
-
/***/ }),
|
|
902
857
|
|
|
903
|
-
/***/ 9:
|
|
904
|
-
/***/ (function(module, exports) {
|
|
905
858
|
|
|
906
|
-
module.exports = require("element-ui/lib/utils/merge");
|
|
907
859
|
|
|
908
|
-
|
|
860
|
+
var MessageBoxConstructor = external_vue_default().extend(main);
|
|
861
|
+
var currentMsg, instance;
|
|
862
|
+
var msgQueue = [];
|
|
863
|
+
var defaultCallback = function defaultCallback(action) {
|
|
864
|
+
if (currentMsg) {
|
|
865
|
+
var callback = currentMsg.callback;
|
|
866
|
+
if (typeof callback === 'function') {
|
|
867
|
+
if (instance.showInput) {
|
|
868
|
+
callback(instance.inputValue, action);
|
|
869
|
+
} else {
|
|
870
|
+
callback(action);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
if (currentMsg.resolve) {
|
|
874
|
+
if (action === 'confirm') {
|
|
875
|
+
if (instance.showInput) {
|
|
876
|
+
currentMsg.resolve({
|
|
877
|
+
value: instance.inputValue,
|
|
878
|
+
action: action
|
|
879
|
+
});
|
|
880
|
+
} else {
|
|
881
|
+
currentMsg.resolve(action);
|
|
882
|
+
}
|
|
883
|
+
} else if (currentMsg.reject && (action === 'cancel' || action === 'close')) {
|
|
884
|
+
currentMsg.reject(action);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
var initInstance = function initInstance() {
|
|
890
|
+
instance = new MessageBoxConstructor({
|
|
891
|
+
el: document.createElement('div')
|
|
892
|
+
});
|
|
893
|
+
instance.callback = defaultCallback;
|
|
894
|
+
};
|
|
895
|
+
var _showNextMsg = function showNextMsg() {
|
|
896
|
+
if (!instance) {
|
|
897
|
+
initInstance();
|
|
898
|
+
}
|
|
899
|
+
instance.action = '';
|
|
900
|
+
if (!instance.visible || instance.closeTimer) {
|
|
901
|
+
if (msgQueue.length > 0) {
|
|
902
|
+
currentMsg = msgQueue.shift();
|
|
903
|
+
var options = currentMsg.options;
|
|
904
|
+
for (var prop in options) {
|
|
905
|
+
if (options.hasOwnProperty(prop)) {
|
|
906
|
+
instance[prop] = options[prop];
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (options.callback === undefined) {
|
|
910
|
+
instance.callback = defaultCallback;
|
|
911
|
+
}
|
|
912
|
+
var oldCb = instance.callback;
|
|
913
|
+
instance.callback = function (action, instance) {
|
|
914
|
+
oldCb(action, instance);
|
|
915
|
+
_showNextMsg();
|
|
916
|
+
};
|
|
917
|
+
if ((0,vdom_namespaceObject.isVNode)(instance.message)) {
|
|
918
|
+
instance.$slots.default = [instance.message];
|
|
919
|
+
instance.message = null;
|
|
920
|
+
} else {
|
|
921
|
+
delete instance.$slots.default;
|
|
922
|
+
}
|
|
923
|
+
['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) {
|
|
924
|
+
if (instance[prop] === undefined) {
|
|
925
|
+
instance[prop] = true;
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
document.body.appendChild(instance.$el);
|
|
929
|
+
external_vue_default().nextTick(function () {
|
|
930
|
+
instance.visible = true;
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
var _MessageBox = function MessageBox(options, callback) {
|
|
936
|
+
if ((external_vue_default()).prototype.$isServer) return;
|
|
937
|
+
if (typeof options === 'string' || (0,vdom_namespaceObject.isVNode)(options)) {
|
|
938
|
+
options = {
|
|
939
|
+
message: options
|
|
940
|
+
};
|
|
941
|
+
if (typeof arguments[1] === 'string') {
|
|
942
|
+
options.title = arguments[1];
|
|
943
|
+
}
|
|
944
|
+
} else if (options.callback && !callback) {
|
|
945
|
+
callback = options.callback;
|
|
946
|
+
}
|
|
947
|
+
if (typeof Promise !== 'undefined') {
|
|
948
|
+
return new Promise(function (resolve, reject) {
|
|
949
|
+
// eslint-disable-line
|
|
950
|
+
msgQueue.push({
|
|
951
|
+
options: merge_default()({}, defaults, _MessageBox.defaults, options),
|
|
952
|
+
callback: callback,
|
|
953
|
+
resolve: resolve,
|
|
954
|
+
reject: reject
|
|
955
|
+
});
|
|
956
|
+
_showNextMsg();
|
|
957
|
+
});
|
|
958
|
+
} else {
|
|
959
|
+
msgQueue.push({
|
|
960
|
+
options: merge_default()({}, defaults, _MessageBox.defaults, options),
|
|
961
|
+
callback: callback
|
|
962
|
+
});
|
|
963
|
+
_showNextMsg();
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
_MessageBox.setDefaults = function (defaults) {
|
|
967
|
+
_MessageBox.defaults = defaults;
|
|
968
|
+
};
|
|
969
|
+
_MessageBox.alert = function (message, title, options) {
|
|
970
|
+
if (typeof title === 'object') {
|
|
971
|
+
options = title;
|
|
972
|
+
title = '';
|
|
973
|
+
} else if (title === undefined) {
|
|
974
|
+
title = '';
|
|
975
|
+
}
|
|
976
|
+
return _MessageBox(merge_default()({
|
|
977
|
+
title: title,
|
|
978
|
+
message: message,
|
|
979
|
+
$type: 'alert',
|
|
980
|
+
closeOnPressEscape: false,
|
|
981
|
+
closeOnClickModal: false
|
|
982
|
+
}, options));
|
|
983
|
+
};
|
|
984
|
+
_MessageBox.confirm = function (message, title, options) {
|
|
985
|
+
if (typeof title === 'object') {
|
|
986
|
+
options = title;
|
|
987
|
+
title = '';
|
|
988
|
+
} else if (title === undefined) {
|
|
989
|
+
title = '';
|
|
990
|
+
}
|
|
991
|
+
return _MessageBox(merge_default()({
|
|
992
|
+
title: title,
|
|
993
|
+
message: message,
|
|
994
|
+
$type: 'confirm',
|
|
995
|
+
showCancelButton: true
|
|
996
|
+
}, options));
|
|
997
|
+
};
|
|
998
|
+
_MessageBox.prompt = function (message, title, options) {
|
|
999
|
+
if (typeof title === 'object') {
|
|
1000
|
+
options = title;
|
|
1001
|
+
title = '';
|
|
1002
|
+
} else if (title === undefined) {
|
|
1003
|
+
title = '';
|
|
1004
|
+
}
|
|
1005
|
+
return _MessageBox(merge_default()({
|
|
1006
|
+
title: title,
|
|
1007
|
+
message: message,
|
|
1008
|
+
showCancelButton: true,
|
|
1009
|
+
showInput: true,
|
|
1010
|
+
$type: 'prompt'
|
|
1011
|
+
}, options));
|
|
1012
|
+
};
|
|
1013
|
+
_MessageBox.close = function () {
|
|
1014
|
+
instance.doClose();
|
|
1015
|
+
instance.visible = false;
|
|
1016
|
+
msgQueue = [];
|
|
1017
|
+
currentMsg = null;
|
|
1018
|
+
};
|
|
1019
|
+
/* harmony default export */ const src_main = (_MessageBox);
|
|
1020
|
+
|
|
1021
|
+
;// ./packages/message-box/index.js
|
|
909
1022
|
|
|
910
|
-
|
|
1023
|
+
/* harmony default export */ const message_box = (src_main);
|
|
1024
|
+
module.exports = __webpack_exports__["default"];
|
|
1025
|
+
/******/ })()
|
|
1026
|
+
;
|