element-sim 1.0.2 → 1.0.4
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/CHANGELOG.es.md +3 -1
- package/CHANGELOG.zh-CN.md +2 -2065
- package/package.json +1 -1
- package/packages/theme-chalk/src/breadcrumb.scss +16 -12
- package/packages/theme-chalk/src/common/var.scss +2 -2
- package/packages/theme-chalk/src/form.scss +6 -3
- package/packages/theme-chalk/src/index.scss +87 -87
- package/packages/theme-chalk/src/input.scss +1 -1
- package/src/index.js +1 -1
- package/types/index.d.ts +2 -2
- package/lib/alert.js +0 -420
- package/lib/aside.js +0 -277
- package/lib/autocomplete.js +0 -952
- package/lib/avatar.js +0 -363
- package/lib/backtop.js +0 -404
- package/lib/badge.js +0 -334
- package/lib/breadcrumb-item.js +0 -322
- package/lib/breadcrumb.js +0 -293
- package/lib/button-group.js +0 -262
- package/lib/button.js +0 -357
- package/lib/calendar.js +0 -933
- package/lib/card.js +0 -297
- package/lib/carousel-item.js +0 -434
- package/lib/carousel.js +0 -707
- package/lib/cascader-panel.js +0 -1558
- package/lib/cascader.js +0 -1439
- package/lib/checkbox-button.js +0 -583
- package/lib/checkbox-group.js +0 -313
- package/lib/checkbox.js +0 -627
- package/lib/col.js +0 -177
- package/lib/collapse-item.js +0 -497
- package/lib/collapse.js +0 -329
- package/lib/color-picker.js +0 -1943
- package/lib/container.js +0 -288
- package/lib/date-picker.js +0 -6335
- package/lib/descriptions-item.js +0 -140
- package/lib/descriptions.js +0 -457
- package/lib/dialog.js +0 -598
- package/lib/directives/mousewheel.js +0 -26
- package/lib/directives/repeat-click.js +0 -33
- package/lib/divider.js +0 -313
- package/lib/drawer.js +0 -592
- package/lib/dropdown-item.js +0 -316
- package/lib/dropdown-menu.js +0 -351
- package/lib/dropdown.js +0 -643
- package/lib/element-SIM.common.js +0 -43578
- package/lib/empty.js +0 -730
- package/lib/footer.js +0 -277
- package/lib/form-item.js +0 -826
- package/lib/form.js +0 -466
- package/lib/header.js +0 -277
- package/lib/icon.js +0 -265
- package/lib/image.js +0 -1138
- package/lib/index.js +0 -1
- package/lib/infinite-scroll.js +0 -301
- package/lib/input-number.js +0 -752
- package/lib/input.js +0 -998
- package/lib/link.js +0 -332
- package/lib/loading.js +0 -631
- package/lib/locale/format.js +0 -56
- package/lib/locale/index.js +0 -63
- package/lib/locale/lang/af-ZA.js +0 -126
- package/lib/locale/lang/ar.js +0 -125
- package/lib/locale/lang/az.js +0 -126
- package/lib/locale/lang/bg.js +0 -126
- package/lib/locale/lang/bn.js +0 -126
- package/lib/locale/lang/ca.js +0 -125
- package/lib/locale/lang/cs-CZ.js +0 -128
- package/lib/locale/lang/da.js +0 -125
- package/lib/locale/lang/de.js +0 -127
- package/lib/locale/lang/ee.js +0 -126
- package/lib/locale/lang/el.js +0 -126
- package/lib/locale/lang/en.js +0 -126
- package/lib/locale/lang/eo.js +0 -126
- package/lib/locale/lang/es.js +0 -125
- package/lib/locale/lang/eu.js +0 -126
- package/lib/locale/lang/fa.js +0 -126
- package/lib/locale/lang/fi.js +0 -126
- package/lib/locale/lang/fr.js +0 -125
- package/lib/locale/lang/he.js +0 -126
- package/lib/locale/lang/hr.js +0 -126
- package/lib/locale/lang/hu.js +0 -125
- package/lib/locale/lang/hy-AM.js +0 -126
- package/lib/locale/lang/id.js +0 -126
- package/lib/locale/lang/is.js +0 -126
- package/lib/locale/lang/it.js +0 -125
- package/lib/locale/lang/ja.js +0 -126
- package/lib/locale/lang/kg.js +0 -126
- package/lib/locale/lang/km.js +0 -126
- package/lib/locale/lang/ko.js +0 -126
- package/lib/locale/lang/ku.js +0 -126
- package/lib/locale/lang/kz.js +0 -126
- package/lib/locale/lang/lo-LA.js +0 -126
- package/lib/locale/lang/lt.js +0 -126
- package/lib/locale/lang/lv.js +0 -126
- package/lib/locale/lang/mn.js +0 -126
- package/lib/locale/lang/ms.js +0 -125
- package/lib/locale/lang/nb-NO.js +0 -125
- package/lib/locale/lang/nl.js +0 -126
- package/lib/locale/lang/pl.js +0 -126
- package/lib/locale/lang/pt-br.js +0 -126
- package/lib/locale/lang/pt.js +0 -126
- package/lib/locale/lang/ro.js +0 -126
- package/lib/locale/lang/ru-RU.js +0 -126
- package/lib/locale/lang/si.js +0 -126
- package/lib/locale/lang/sk.js +0 -128
- package/lib/locale/lang/sl.js +0 -126
- package/lib/locale/lang/sr-Latn.js +0 -126
- package/lib/locale/lang/sr.js +0 -126
- package/lib/locale/lang/sv-SE.js +0 -126
- package/lib/locale/lang/sw.js +0 -126
- package/lib/locale/lang/ta.js +0 -125
- package/lib/locale/lang/th.js +0 -126
- package/lib/locale/lang/tk.js +0 -126
- package/lib/locale/lang/tr-TR.js +0 -126
- package/lib/locale/lang/ua.js +0 -126
- package/lib/locale/lang/ug-CN.js +0 -126
- package/lib/locale/lang/uz-UZ.js +0 -126
- package/lib/locale/lang/vi.js +0 -126
- package/lib/locale/lang/zh-CN.js +0 -126
- package/lib/locale/lang/zh-TW.js +0 -126
- package/lib/main.js +0 -264
- package/lib/menu-item-group.js +0 -308
- package/lib/menu-item.js +0 -491
- package/lib/menu.js +0 -865
- package/lib/message-box.js +0 -1192
- package/lib/message.js +0 -548
- package/lib/mixins/emitter.js +0 -36
- package/lib/mixins/focus.js +0 -15
- package/lib/mixins/locale.js +0 -17
- package/lib/mixins/migrating.js +0 -69
- package/lib/notification.js +0 -615
- package/lib/option-group.js +0 -344
- package/lib/option.js +0 -474
- package/lib/page-header.js +0 -319
- package/lib/pagination.js +0 -950
- package/lib/popconfirm.js +0 -457
- package/lib/popover.js +0 -617
- package/lib/progress.js +0 -595
- package/lib/radio-button.js +0 -463
- package/lib/radio-group.js +0 -391
- package/lib/radio.js +0 -497
- package/lib/rate.js +0 -670
- package/lib/result.js +0 -578
- package/lib/row.js +0 -149
- package/lib/scrollbar.js +0 -423
- package/lib/select.js +0 -2167
- package/lib/skeleton-item.js +0 -342
- package/lib/skeleton.js +0 -372
- package/lib/slider.js +0 -1199
- package/lib/spinner.js +0 -301
- package/lib/statistic.js +0 -533
- package/lib/step.js +0 -522
- package/lib/steps.js +0 -342
- package/lib/submenu.js +0 -701
- package/lib/switch.js +0 -554
- package/lib/tab-pane.js +0 -332
- package/lib/table-column.js +0 -952
- package/lib/table.js +0 -5010
- package/lib/tabs.js +0 -920
- package/lib/tag.js +0 -304
- package/lib/theme-chalk/alert.css +0 -1
- package/lib/theme-chalk/aside.css +0 -1
- package/lib/theme-chalk/autocomplete.css +0 -1
- package/lib/theme-chalk/avatar.css +0 -1
- package/lib/theme-chalk/backtop.css +0 -1
- package/lib/theme-chalk/badge.css +0 -1
- package/lib/theme-chalk/base.css +0 -1
- package/lib/theme-chalk/breadcrumb-item.css +0 -0
- package/lib/theme-chalk/breadcrumb.css +0 -1
- package/lib/theme-chalk/button-group.css +0 -0
- package/lib/theme-chalk/button.css +0 -1
- package/lib/theme-chalk/calendar.css +0 -1
- package/lib/theme-chalk/card.css +0 -1
- package/lib/theme-chalk/carousel-item.css +0 -1
- package/lib/theme-chalk/carousel.css +0 -1
- package/lib/theme-chalk/cascader-panel.css +0 -1
- package/lib/theme-chalk/cascader.css +0 -1
- package/lib/theme-chalk/checkbox-button.css +0 -0
- package/lib/theme-chalk/checkbox-group.css +0 -0
- package/lib/theme-chalk/checkbox.css +0 -1
- package/lib/theme-chalk/col.css +0 -1
- package/lib/theme-chalk/collapse-item.css +0 -0
- package/lib/theme-chalk/collapse.css +0 -1
- package/lib/theme-chalk/color-picker.css +0 -1
- package/lib/theme-chalk/container.css +0 -1
- package/lib/theme-chalk/date-picker.css +0 -1
- package/lib/theme-chalk/descriptions-item.css +0 -1
- package/lib/theme-chalk/descriptions.css +0 -1
- package/lib/theme-chalk/dialog.css +0 -1
- package/lib/theme-chalk/display.css +0 -1
- package/lib/theme-chalk/divider.css +0 -1
- package/lib/theme-chalk/drawer.css +0 -1
- package/lib/theme-chalk/dropdown-item.css +0 -0
- package/lib/theme-chalk/dropdown-menu.css +0 -0
- package/lib/theme-chalk/dropdown.css +0 -1
- package/lib/theme-chalk/empty.css +0 -1
- 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 +0 -1
- package/lib/theme-chalk/form-item.css +0 -0
- package/lib/theme-chalk/form.css +0 -1
- package/lib/theme-chalk/header.css +0 -1
- package/lib/theme-chalk/icon.css +0 -1
- package/lib/theme-chalk/image.css +0 -1
- package/lib/theme-chalk/index.css +0 -1
- package/lib/theme-chalk/infinite-scroll.css +0 -0
- package/lib/theme-chalk/infiniteScroll.css +0 -0
- package/lib/theme-chalk/input-number.css +0 -1
- package/lib/theme-chalk/input.css +0 -1
- package/lib/theme-chalk/link.css +0 -1
- package/lib/theme-chalk/loading.css +0 -1
- package/lib/theme-chalk/main.css +0 -1
- package/lib/theme-chalk/menu-item-group.css +0 -0
- package/lib/theme-chalk/menu-item.css +0 -0
- package/lib/theme-chalk/menu.css +0 -1
- package/lib/theme-chalk/message-box.css +0 -1
- package/lib/theme-chalk/message.css +0 -1
- package/lib/theme-chalk/notification.css +0 -1
- package/lib/theme-chalk/option-group.css +0 -1
- package/lib/theme-chalk/option.css +0 -1
- package/lib/theme-chalk/page-header.css +0 -1
- package/lib/theme-chalk/pagination.css +0 -1
- package/lib/theme-chalk/popconfirm.css +0 -1
- package/lib/theme-chalk/popover.css +0 -1
- package/lib/theme-chalk/popper.css +0 -1
- package/lib/theme-chalk/progress.css +0 -1
- package/lib/theme-chalk/radio-button.css +0 -1
- package/lib/theme-chalk/radio-group.css +0 -1
- package/lib/theme-chalk/radio.css +0 -1
- package/lib/theme-chalk/rate.css +0 -1
- package/lib/theme-chalk/reset.css +0 -1
- package/lib/theme-chalk/result.css +0 -1
- package/lib/theme-chalk/row.css +0 -1
- package/lib/theme-chalk/scrollbar.css +0 -1
- package/lib/theme-chalk/select-dropdown.css +0 -1
- package/lib/theme-chalk/select.css +0 -1
- package/lib/theme-chalk/skeleton-item.css +0 -1
- package/lib/theme-chalk/skeleton.css +0 -1
- package/lib/theme-chalk/slider.css +0 -1
- package/lib/theme-chalk/spinner.css +0 -1
- package/lib/theme-chalk/statistic.css +0 -1
- package/lib/theme-chalk/step.css +0 -1
- package/lib/theme-chalk/steps.css +0 -1
- package/lib/theme-chalk/submenu.css +0 -0
- package/lib/theme-chalk/switch.css +0 -1
- package/lib/theme-chalk/tab-pane.css +0 -0
- package/lib/theme-chalk/table-column.css +0 -1
- package/lib/theme-chalk/table.css +0 -1
- package/lib/theme-chalk/tabs.css +0 -1
- package/lib/theme-chalk/tag.css +0 -1
- package/lib/theme-chalk/time-picker.css +0 -1
- package/lib/theme-chalk/time-select.css +0 -1
- package/lib/theme-chalk/timeline-item.css +0 -1
- package/lib/theme-chalk/timeline.css +0 -1
- package/lib/theme-chalk/tooltip.css +0 -1
- package/lib/theme-chalk/transfer.css +0 -1
- package/lib/theme-chalk/tree.css +0 -1
- package/lib/theme-chalk/upload.css +0 -1
- package/lib/time-picker.js +0 -2967
- package/lib/time-select.js +0 -1765
- package/lib/timeline-item.js +0 -371
- package/lib/timeline.js +0 -275
- package/lib/tooltip.js +0 -425
- package/lib/transfer.js +0 -1102
- package/lib/transitions/collapse-transition.js +0 -91
- package/lib/tree.js +0 -2263
- package/lib/umd/locale/af-ZA.js +0 -142
- package/lib/umd/locale/ar.js +0 -141
- package/lib/umd/locale/az.js +0 -141
- package/lib/umd/locale/bg.js +0 -142
- package/lib/umd/locale/bn.js +0 -141
- package/lib/umd/locale/ca.js +0 -141
- package/lib/umd/locale/cs-CZ.js +0 -144
- package/lib/umd/locale/da.js +0 -141
- package/lib/umd/locale/de.js +0 -143
- package/lib/umd/locale/ee.js +0 -142
- package/lib/umd/locale/el.js +0 -142
- package/lib/umd/locale/en.js +0 -142
- package/lib/umd/locale/eo.js +0 -142
- package/lib/umd/locale/es.js +0 -141
- package/lib/umd/locale/eu.js +0 -142
- package/lib/umd/locale/fa.js +0 -142
- package/lib/umd/locale/fi.js +0 -142
- package/lib/umd/locale/fr.js +0 -141
- package/lib/umd/locale/he.js +0 -142
- package/lib/umd/locale/hr.js +0 -142
- package/lib/umd/locale/hu.js +0 -141
- package/lib/umd/locale/hy-AM.js +0 -142
- package/lib/umd/locale/id.js +0 -142
- package/lib/umd/locale/is.js +0 -142
- package/lib/umd/locale/it.js +0 -141
- package/lib/umd/locale/ja.js +0 -142
- package/lib/umd/locale/kg.js +0 -142
- package/lib/umd/locale/km.js +0 -142
- package/lib/umd/locale/ko.js +0 -142
- package/lib/umd/locale/ku.js +0 -142
- package/lib/umd/locale/kz.js +0 -142
- package/lib/umd/locale/lo-LA.js +0 -141
- package/lib/umd/locale/lt.js +0 -142
- package/lib/umd/locale/lv.js +0 -142
- package/lib/umd/locale/mn.js +0 -142
- package/lib/umd/locale/ms.js +0 -141
- package/lib/umd/locale/nb-NO.js +0 -141
- package/lib/umd/locale/nl.js +0 -142
- package/lib/umd/locale/pl.js +0 -142
- package/lib/umd/locale/pt-br.js +0 -142
- package/lib/umd/locale/pt.js +0 -142
- package/lib/umd/locale/ro.js +0 -142
- package/lib/umd/locale/ru-RU.js +0 -142
- package/lib/umd/locale/si.js +0 -142
- package/lib/umd/locale/sk.js +0 -144
- package/lib/umd/locale/sl.js +0 -142
- package/lib/umd/locale/sr-Latn.js +0 -142
- package/lib/umd/locale/sr.js +0 -142
- package/lib/umd/locale/sv-SE.js +0 -142
- package/lib/umd/locale/sw.js +0 -142
- package/lib/umd/locale/ta.js +0 -141
- package/lib/umd/locale/th.js +0 -142
- package/lib/umd/locale/tk.js +0 -142
- package/lib/umd/locale/tr-TR.js +0 -142
- package/lib/umd/locale/ua.js +0 -142
- package/lib/umd/locale/ug-CN.js +0 -142
- package/lib/umd/locale/uz-UZ.js +0 -142
- package/lib/umd/locale/vi.js +0 -142
- package/lib/umd/locale/zh-CN.js +0 -142
- package/lib/umd/locale/zh-TW.js +0 -142
- package/lib/upload.js +0 -1390
- package/lib/utils/after-leave.js +0 -35
- package/lib/utils/aria-dialog.js +0 -104
- package/lib/utils/aria-utils.js +0 -126
- package/lib/utils/clickoutside.js +0 -79
- package/lib/utils/date-util.js +0 -310
- package/lib/utils/date.js +0 -369
- package/lib/utils/dom.js +0 -234
- package/lib/utils/lodash.js +0 -9421
- package/lib/utils/menu/aria-menubar.js +0 -24
- package/lib/utils/menu/aria-menuitem.js +0 -62
- package/lib/utils/menu/aria-submenu.js +0 -69
- package/lib/utils/merge.js +0 -21
- package/lib/utils/popper.js +0 -1261
- package/lib/utils/popup/index.js +0 -233
- package/lib/utils/popup/popup-manager.js +0 -205
- package/lib/utils/resize-event.js +0 -59
- package/lib/utils/scroll-into-view.js +0 -38
- package/lib/utils/scrollbar-width.js +0 -39
- package/lib/utils/shared.js +0 -12
- package/lib/utils/types.js +0 -52
- package/lib/utils/util.js +0 -272
- package/lib/utils/vdom.js +0 -13
- package/lib/utils/vue-popper.js +0 -202
- 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/avatar.css +0 -1
- package/packages/theme-chalk/lib/backtop.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-item.css +0 -0
- package/packages/theme-chalk/lib/breadcrumb.css +0 -1
- package/packages/theme-chalk/lib/button-group.css +0 -0
- package/packages/theme-chalk/lib/button.css +0 -1
- package/packages/theme-chalk/lib/calendar.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-panel.css +0 -1
- package/packages/theme-chalk/lib/cascader.css +0 -1
- package/packages/theme-chalk/lib/checkbox-button.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +0 -0
- 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/descriptions-item.css +0 -1
- package/packages/theme-chalk/lib/descriptions.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/divider.css +0 -1
- package/packages/theme-chalk/lib/drawer.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/empty.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/image.css +0 -1
- package/packages/theme-chalk/lib/index.css +0 -1
- package/packages/theme-chalk/lib/infinite-scroll.css +0 -0
- package/packages/theme-chalk/lib/infiniteScroll.css +0 -0
- package/packages/theme-chalk/lib/input-number.css +0 -1
- package/packages/theme-chalk/lib/input.css +0 -1
- package/packages/theme-chalk/lib/link.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/page-header.css +0 -1
- package/packages/theme-chalk/lib/pagination.css +0 -1
- package/packages/theme-chalk/lib/popconfirm.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/result.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/skeleton-item.css +0 -1
- package/packages/theme-chalk/lib/skeleton.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/statistic.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/timeline-item.css +0 -1
- package/packages/theme-chalk/lib/timeline.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/types/{element-ui.d.ts → element-sim.d.ts} +0 -0
package/lib/utils/popup/index.js
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.PopupManager = undefined;
|
|
5
|
-
|
|
6
|
-
var _vue = require('vue');
|
|
7
|
-
|
|
8
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
9
|
-
|
|
10
|
-
var _merge = require('element-SIM/lib/utils/merge');
|
|
11
|
-
|
|
12
|
-
var _merge2 = _interopRequireDefault(_merge);
|
|
13
|
-
|
|
14
|
-
var _popupManager = require('element-SIM/lib/utils/popup/popup-manager');
|
|
15
|
-
|
|
16
|
-
var _popupManager2 = _interopRequireDefault(_popupManager);
|
|
17
|
-
|
|
18
|
-
var _scrollbarWidth = require('../scrollbar-width');
|
|
19
|
-
|
|
20
|
-
var _scrollbarWidth2 = _interopRequireDefault(_scrollbarWidth);
|
|
21
|
-
|
|
22
|
-
var _dom = require('../dom');
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
var idSeed = 1;
|
|
27
|
-
|
|
28
|
-
var scrollBarWidth = void 0;
|
|
29
|
-
|
|
30
|
-
exports.default = {
|
|
31
|
-
props: {
|
|
32
|
-
visible: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: false
|
|
35
|
-
},
|
|
36
|
-
openDelay: {},
|
|
37
|
-
closeDelay: {},
|
|
38
|
-
zIndex: {},
|
|
39
|
-
modal: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
modalFade: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: true
|
|
46
|
-
},
|
|
47
|
-
modalClass: {},
|
|
48
|
-
modalAppendToBody: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false
|
|
51
|
-
},
|
|
52
|
-
lockScroll: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: true
|
|
55
|
-
},
|
|
56
|
-
closeOnPressEscape: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
closeOnClickModal: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: false
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
beforeMount: function beforeMount() {
|
|
67
|
-
this._popupId = 'popup-' + idSeed++;
|
|
68
|
-
_popupManager2.default.register(this._popupId, this);
|
|
69
|
-
},
|
|
70
|
-
beforeDestroy: function beforeDestroy() {
|
|
71
|
-
_popupManager2.default.deregister(this._popupId);
|
|
72
|
-
_popupManager2.default.closeModal(this._popupId);
|
|
73
|
-
|
|
74
|
-
this.restoreBodyStyle();
|
|
75
|
-
},
|
|
76
|
-
data: function data() {
|
|
77
|
-
return {
|
|
78
|
-
opened: false,
|
|
79
|
-
bodyPaddingRight: null,
|
|
80
|
-
computedBodyPaddingRight: 0,
|
|
81
|
-
withoutHiddenClass: true,
|
|
82
|
-
rendered: false
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
watch: {
|
|
88
|
-
visible: function visible(val) {
|
|
89
|
-
var _this = this;
|
|
90
|
-
|
|
91
|
-
if (val) {
|
|
92
|
-
if (this._opening) return;
|
|
93
|
-
if (!this.rendered) {
|
|
94
|
-
this.rendered = true;
|
|
95
|
-
_vue2.default.nextTick(function () {
|
|
96
|
-
_this.open();
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
this.open();
|
|
100
|
-
}
|
|
101
|
-
} else {
|
|
102
|
-
this.close();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
methods: {
|
|
108
|
-
open: function open(options) {
|
|
109
|
-
var _this2 = this;
|
|
110
|
-
|
|
111
|
-
if (!this.rendered) {
|
|
112
|
-
this.rendered = true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
var props = (0, _merge2.default)({}, this.$props || this, options);
|
|
116
|
-
|
|
117
|
-
if (this._closeTimer) {
|
|
118
|
-
clearTimeout(this._closeTimer);
|
|
119
|
-
this._closeTimer = null;
|
|
120
|
-
}
|
|
121
|
-
clearTimeout(this._openTimer);
|
|
122
|
-
|
|
123
|
-
var openDelay = Number(props.openDelay);
|
|
124
|
-
if (openDelay > 0) {
|
|
125
|
-
this._openTimer = setTimeout(function () {
|
|
126
|
-
_this2._openTimer = null;
|
|
127
|
-
_this2.doOpen(props);
|
|
128
|
-
}, openDelay);
|
|
129
|
-
} else {
|
|
130
|
-
this.doOpen(props);
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
doOpen: function doOpen(props) {
|
|
134
|
-
if (this.$isServer) return;
|
|
135
|
-
if (this.willOpen && !this.willOpen()) return;
|
|
136
|
-
if (this.opened) return;
|
|
137
|
-
|
|
138
|
-
this._opening = true;
|
|
139
|
-
|
|
140
|
-
var dom = this.$el;
|
|
141
|
-
|
|
142
|
-
var modal = props.modal;
|
|
143
|
-
|
|
144
|
-
var zIndex = props.zIndex;
|
|
145
|
-
if (zIndex) {
|
|
146
|
-
_popupManager2.default.zIndex = zIndex;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (modal) {
|
|
150
|
-
if (this._closing) {
|
|
151
|
-
_popupManager2.default.closeModal(this._popupId);
|
|
152
|
-
this._closing = false;
|
|
153
|
-
}
|
|
154
|
-
_popupManager2.default.openModal(this._popupId, _popupManager2.default.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
|
155
|
-
if (props.lockScroll) {
|
|
156
|
-
this.withoutHiddenClass = !(0, _dom.hasClass)(document.body, 'el-popup-parent--hidden');
|
|
157
|
-
if (this.withoutHiddenClass) {
|
|
158
|
-
this.bodyPaddingRight = document.body.style.paddingRight;
|
|
159
|
-
this.computedBodyPaddingRight = parseInt((0, _dom.getStyle)(document.body, 'paddingRight'), 10);
|
|
160
|
-
}
|
|
161
|
-
scrollBarWidth = (0, _scrollbarWidth2.default)();
|
|
162
|
-
var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
163
|
-
var bodyOverflowY = (0, _dom.getStyle)(document.body, 'overflowY');
|
|
164
|
-
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
|
165
|
-
document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
|
166
|
-
}
|
|
167
|
-
(0, _dom.addClass)(document.body, 'el-popup-parent--hidden');
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (getComputedStyle(dom).position === 'static') {
|
|
172
|
-
dom.style.position = 'absolute';
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
dom.style.zIndex = _popupManager2.default.nextZIndex();
|
|
176
|
-
this.opened = true;
|
|
177
|
-
|
|
178
|
-
this.onOpen && this.onOpen();
|
|
179
|
-
|
|
180
|
-
this.doAfterOpen();
|
|
181
|
-
},
|
|
182
|
-
doAfterOpen: function doAfterOpen() {
|
|
183
|
-
this._opening = false;
|
|
184
|
-
},
|
|
185
|
-
close: function close() {
|
|
186
|
-
var _this3 = this;
|
|
187
|
-
|
|
188
|
-
if (this.willClose && !this.willClose()) return;
|
|
189
|
-
|
|
190
|
-
if (this._openTimer !== null) {
|
|
191
|
-
clearTimeout(this._openTimer);
|
|
192
|
-
this._openTimer = null;
|
|
193
|
-
}
|
|
194
|
-
clearTimeout(this._closeTimer);
|
|
195
|
-
|
|
196
|
-
var closeDelay = Number(this.closeDelay);
|
|
197
|
-
|
|
198
|
-
if (closeDelay > 0) {
|
|
199
|
-
this._closeTimer = setTimeout(function () {
|
|
200
|
-
_this3._closeTimer = null;
|
|
201
|
-
_this3.doClose();
|
|
202
|
-
}, closeDelay);
|
|
203
|
-
} else {
|
|
204
|
-
this.doClose();
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
doClose: function doClose() {
|
|
208
|
-
this._closing = true;
|
|
209
|
-
|
|
210
|
-
this.onClose && this.onClose();
|
|
211
|
-
|
|
212
|
-
if (this.lockScroll) {
|
|
213
|
-
setTimeout(this.restoreBodyStyle, 200);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
this.opened = false;
|
|
217
|
-
|
|
218
|
-
this.doAfterClose();
|
|
219
|
-
},
|
|
220
|
-
doAfterClose: function doAfterClose() {
|
|
221
|
-
_popupManager2.default.closeModal(this._popupId);
|
|
222
|
-
this._closing = false;
|
|
223
|
-
},
|
|
224
|
-
restoreBodyStyle: function restoreBodyStyle() {
|
|
225
|
-
if (this.modal && this.withoutHiddenClass) {
|
|
226
|
-
document.body.style.paddingRight = this.bodyPaddingRight;
|
|
227
|
-
(0, _dom.removeClass)(document.body, 'el-popup-parent--hidden');
|
|
228
|
-
}
|
|
229
|
-
this.withoutHiddenClass = true;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
exports.PopupManager = _popupManager2.default;
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
|
|
5
|
-
var _vue = require('vue');
|
|
6
|
-
|
|
7
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
8
|
-
|
|
9
|
-
var _dom = require('element-SIM/lib/utils/dom');
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
var hasModal = false;
|
|
14
|
-
var hasInitZIndex = false;
|
|
15
|
-
var zIndex = void 0;
|
|
16
|
-
|
|
17
|
-
var getModal = function getModal() {
|
|
18
|
-
if (_vue2.default.prototype.$isServer) return;
|
|
19
|
-
var modalDom = PopupManager.modalDom;
|
|
20
|
-
if (modalDom) {
|
|
21
|
-
hasModal = true;
|
|
22
|
-
} else {
|
|
23
|
-
hasModal = false;
|
|
24
|
-
modalDom = document.createElement('div');
|
|
25
|
-
PopupManager.modalDom = modalDom;
|
|
26
|
-
|
|
27
|
-
modalDom.addEventListener('touchmove', function (event) {
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
event.stopPropagation();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
modalDom.addEventListener('click', function () {
|
|
33
|
-
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return modalDom;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var instances = {};
|
|
41
|
-
|
|
42
|
-
var PopupManager = {
|
|
43
|
-
modalFade: true,
|
|
44
|
-
|
|
45
|
-
getInstance: function getInstance(id) {
|
|
46
|
-
return instances[id];
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
register: function register(id, instance) {
|
|
50
|
-
if (id && instance) {
|
|
51
|
-
instances[id] = instance;
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
deregister: function deregister(id) {
|
|
56
|
-
if (id) {
|
|
57
|
-
instances[id] = null;
|
|
58
|
-
delete instances[id];
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
nextZIndex: function nextZIndex() {
|
|
63
|
-
return PopupManager.zIndex++;
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
modalStack: [],
|
|
67
|
-
|
|
68
|
-
doOnModalClick: function doOnModalClick() {
|
|
69
|
-
var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
70
|
-
if (!topItem) return;
|
|
71
|
-
|
|
72
|
-
var instance = PopupManager.getInstance(topItem.id);
|
|
73
|
-
if (instance && instance.closeOnClickModal) {
|
|
74
|
-
instance.close();
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
|
79
|
-
if (_vue2.default.prototype.$isServer) return;
|
|
80
|
-
if (!id || zIndex === undefined) return;
|
|
81
|
-
this.modalFade = modalFade;
|
|
82
|
-
|
|
83
|
-
var modalStack = this.modalStack;
|
|
84
|
-
|
|
85
|
-
for (var i = 0, j = modalStack.length; i < j; i++) {
|
|
86
|
-
var item = modalStack[i];
|
|
87
|
-
if (item.id === id) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
var modalDom = getModal();
|
|
93
|
-
|
|
94
|
-
(0, _dom.addClass)(modalDom, 'v-modal');
|
|
95
|
-
if (this.modalFade && !hasModal) {
|
|
96
|
-
(0, _dom.addClass)(modalDom, 'v-modal-enter');
|
|
97
|
-
}
|
|
98
|
-
if (modalClass) {
|
|
99
|
-
var classArr = modalClass.trim().split(/\s+/);
|
|
100
|
-
classArr.forEach(function (item) {
|
|
101
|
-
return (0, _dom.addClass)(modalDom, item);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
setTimeout(function () {
|
|
105
|
-
(0, _dom.removeClass)(modalDom, 'v-modal-enter');
|
|
106
|
-
}, 200);
|
|
107
|
-
|
|
108
|
-
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
109
|
-
dom.parentNode.appendChild(modalDom);
|
|
110
|
-
} else {
|
|
111
|
-
document.body.appendChild(modalDom);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (zIndex) {
|
|
115
|
-
modalDom.style.zIndex = zIndex;
|
|
116
|
-
}
|
|
117
|
-
modalDom.tabIndex = 0;
|
|
118
|
-
modalDom.style.display = '';
|
|
119
|
-
|
|
120
|
-
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
closeModal: function closeModal(id) {
|
|
124
|
-
var modalStack = this.modalStack;
|
|
125
|
-
var modalDom = getModal();
|
|
126
|
-
|
|
127
|
-
if (modalStack.length > 0) {
|
|
128
|
-
var topItem = modalStack[modalStack.length - 1];
|
|
129
|
-
if (topItem.id === id) {
|
|
130
|
-
if (topItem.modalClass) {
|
|
131
|
-
var classArr = topItem.modalClass.trim().split(/\s+/);
|
|
132
|
-
classArr.forEach(function (item) {
|
|
133
|
-
return (0, _dom.removeClass)(modalDom, item);
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
modalStack.pop();
|
|
138
|
-
if (modalStack.length > 0) {
|
|
139
|
-
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
|
140
|
-
}
|
|
141
|
-
} else {
|
|
142
|
-
for (var i = modalStack.length - 1; i >= 0; i--) {
|
|
143
|
-
if (modalStack[i].id === id) {
|
|
144
|
-
modalStack.splice(i, 1);
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (modalStack.length === 0) {
|
|
152
|
-
if (this.modalFade) {
|
|
153
|
-
(0, _dom.addClass)(modalDom, 'v-modal-leave');
|
|
154
|
-
}
|
|
155
|
-
setTimeout(function () {
|
|
156
|
-
if (modalStack.length === 0) {
|
|
157
|
-
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
158
|
-
modalDom.style.display = 'none';
|
|
159
|
-
PopupManager.modalDom = undefined;
|
|
160
|
-
}
|
|
161
|
-
(0, _dom.removeClass)(modalDom, 'v-modal-leave');
|
|
162
|
-
}, 200);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
Object.defineProperty(PopupManager, 'zIndex', {
|
|
168
|
-
configurable: true,
|
|
169
|
-
get: function get() {
|
|
170
|
-
if (!hasInitZIndex) {
|
|
171
|
-
zIndex = zIndex || (_vue2.default.prototype.$ELEMENT || {}).zIndex || 2000;
|
|
172
|
-
hasInitZIndex = true;
|
|
173
|
-
}
|
|
174
|
-
return zIndex;
|
|
175
|
-
},
|
|
176
|
-
set: function set(value) {
|
|
177
|
-
zIndex = value;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
var getTopPopup = function getTopPopup() {
|
|
182
|
-
if (_vue2.default.prototype.$isServer) return;
|
|
183
|
-
if (PopupManager.modalStack.length > 0) {
|
|
184
|
-
var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
185
|
-
if (!topPopup) return;
|
|
186
|
-
var instance = PopupManager.getInstance(topPopup.id);
|
|
187
|
-
|
|
188
|
-
return instance;
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
if (!_vue2.default.prototype.$isServer) {
|
|
193
|
-
// handle `esc` key when the popup is shown
|
|
194
|
-
window.addEventListener('keydown', function (event) {
|
|
195
|
-
if (event.keyCode === 27) {
|
|
196
|
-
var topPopup = getTopPopup();
|
|
197
|
-
|
|
198
|
-
if (topPopup && topPopup.closeOnPressEscape) {
|
|
199
|
-
topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
exports.default = PopupManager;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.removeResizeListener = exports.addResizeListener = undefined;
|
|
5
|
-
|
|
6
|
-
var _resizeObserverPolyfill = require('resize-observer-polyfill');
|
|
7
|
-
|
|
8
|
-
var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
|
|
9
|
-
|
|
10
|
-
var _throttleDebounce = require('throttle-debounce');
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var isServer = typeof window === 'undefined';
|
|
15
|
-
|
|
16
|
-
/* istanbul ignore next */
|
|
17
|
-
var resizeHandler = function resizeHandler(entries) {
|
|
18
|
-
for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
|
19
|
-
var _ref;
|
|
20
|
-
|
|
21
|
-
if (_isArray) {
|
|
22
|
-
if (_i >= _iterator.length) break;
|
|
23
|
-
_ref = _iterator[_i++];
|
|
24
|
-
} else {
|
|
25
|
-
_i = _iterator.next();
|
|
26
|
-
if (_i.done) break;
|
|
27
|
-
_ref = _i.value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var entry = _ref;
|
|
31
|
-
|
|
32
|
-
var listeners = entry.target.__resizeListeners__ || [];
|
|
33
|
-
if (listeners.length) {
|
|
34
|
-
listeners.forEach(function (fn) {
|
|
35
|
-
fn();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/* istanbul ignore next */
|
|
42
|
-
var addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {
|
|
43
|
-
if (isServer) return;
|
|
44
|
-
if (!element.__resizeListeners__) {
|
|
45
|
-
element.__resizeListeners__ = [];
|
|
46
|
-
element.__ro__ = new _resizeObserverPolyfill2.default((0, _throttleDebounce.debounce)(16, resizeHandler));
|
|
47
|
-
element.__ro__.observe(element);
|
|
48
|
-
}
|
|
49
|
-
element.__resizeListeners__.push(fn);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/* istanbul ignore next */
|
|
53
|
-
var removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {
|
|
54
|
-
if (!element || !element.__resizeListeners__) return;
|
|
55
|
-
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
56
|
-
if (!element.__resizeListeners__.length) {
|
|
57
|
-
element.__ro__.disconnect();
|
|
58
|
-
}
|
|
59
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = scrollIntoView;
|
|
5
|
-
|
|
6
|
-
var _vue = require('vue');
|
|
7
|
-
|
|
8
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
function scrollIntoView(container, selected) {
|
|
13
|
-
if (_vue2.default.prototype.$isServer) return;
|
|
14
|
-
|
|
15
|
-
if (!selected) {
|
|
16
|
-
container.scrollTop = 0;
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var offsetParents = [];
|
|
21
|
-
var pointer = selected.offsetParent;
|
|
22
|
-
while (pointer && container !== pointer && container.contains(pointer)) {
|
|
23
|
-
offsetParents.push(pointer);
|
|
24
|
-
pointer = pointer.offsetParent;
|
|
25
|
-
}
|
|
26
|
-
var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {
|
|
27
|
-
return prev + curr.offsetTop;
|
|
28
|
-
}, 0);
|
|
29
|
-
var bottom = top + selected.offsetHeight;
|
|
30
|
-
var viewRectTop = container.scrollTop;
|
|
31
|
-
var viewRectBottom = viewRectTop + container.clientHeight;
|
|
32
|
-
|
|
33
|
-
if (top < viewRectTop) {
|
|
34
|
-
container.scrollTop = top;
|
|
35
|
-
} else if (bottom > viewRectBottom) {
|
|
36
|
-
container.scrollTop = bottom - container.clientHeight;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
|
|
5
|
-
exports.default = function () {
|
|
6
|
-
if (_vue2.default.prototype.$isServer) return 0;
|
|
7
|
-
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
8
|
-
|
|
9
|
-
var outer = document.createElement('div');
|
|
10
|
-
outer.className = 'el-scrollbar__wrap';
|
|
11
|
-
outer.style.visibility = 'hidden';
|
|
12
|
-
outer.style.width = '100px';
|
|
13
|
-
outer.style.position = 'absolute';
|
|
14
|
-
outer.style.top = '-9999px';
|
|
15
|
-
document.body.appendChild(outer);
|
|
16
|
-
|
|
17
|
-
var widthNoScroll = outer.offsetWidth;
|
|
18
|
-
outer.style.overflow = 'scroll';
|
|
19
|
-
|
|
20
|
-
var inner = document.createElement('div');
|
|
21
|
-
inner.style.width = '100%';
|
|
22
|
-
outer.appendChild(inner);
|
|
23
|
-
|
|
24
|
-
var widthWithScroll = inner.offsetWidth;
|
|
25
|
-
outer.parentNode.removeChild(outer);
|
|
26
|
-
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
27
|
-
|
|
28
|
-
return scrollBarWidth;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var _vue = require('vue');
|
|
32
|
-
|
|
33
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
34
|
-
|
|
35
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
-
|
|
37
|
-
var scrollBarWidth = void 0;
|
|
38
|
-
|
|
39
|
-
;
|
package/lib/utils/shared.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.isDef = isDef;
|
|
5
|
-
exports.isKorean = isKorean;
|
|
6
|
-
function isDef(val) {
|
|
7
|
-
return val !== undefined && val !== null;
|
|
8
|
-
}
|
|
9
|
-
function isKorean(text) {
|
|
10
|
-
var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
|
|
11
|
-
return reg.test(text);
|
|
12
|
-
}
|
package/lib/utils/types.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.isDefined = exports.isUndefined = exports.isFunction = undefined;
|
|
5
|
-
|
|
6
|
-
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; };
|
|
7
|
-
|
|
8
|
-
exports.isString = isString;
|
|
9
|
-
exports.isObject = isObject;
|
|
10
|
-
exports.isHtmlElement = isHtmlElement;
|
|
11
|
-
|
|
12
|
-
var _vue = require('vue');
|
|
13
|
-
|
|
14
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function isString(obj) {
|
|
19
|
-
return Object.prototype.toString.call(obj) === '[object String]';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function isObject(obj) {
|
|
23
|
-
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function isHtmlElement(node) {
|
|
27
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* - Inspired:
|
|
32
|
-
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
|
|
33
|
-
*/
|
|
34
|
-
var isFunction = function isFunction(functionToCheck) {
|
|
35
|
-
var getType = {};
|
|
36
|
-
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
if (typeof /./ !== 'function' && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (_vue2.default.prototype.$isServer || typeof document.childNodes !== 'function')) {
|
|
40
|
-
exports.isFunction = isFunction = function isFunction(obj) {
|
|
41
|
-
return typeof obj === 'function' || false;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
exports.isFunction = isFunction;
|
|
46
|
-
var isUndefined = exports.isUndefined = function isUndefined(val) {
|
|
47
|
-
return val === void 0;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var isDefined = exports.isDefined = function isDefined(val) {
|
|
51
|
-
return val !== undefined && val !== null;
|
|
52
|
-
};
|