nd-autosize-elementui 2.15.14 → 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/lib/index.js +1 -1
- package/lib/utils/vue-popper.js +1 -0
- package/package.json +2 -147
- package/LICENSE +0 -21
- package/README.md +0 -148
- package/packages/alert/index.js +0 -8
- package/packages/alert/src/main.vue +0 -94
- package/packages/aside/index.js +0 -8
- package/packages/aside/src/main.vue +0 -20
- package/packages/autocomplete/index.js +0 -8
- package/packages/autocomplete/src/autocomplete-suggestions.vue +0 -76
- package/packages/autocomplete/src/autocomplete.vue +0 -285
- package/packages/avatar/index.js +0 -8
- package/packages/avatar/src/main.vue +0 -107
- package/packages/backtop/index.js +0 -8
- package/packages/backtop/src/main.vue +0 -110
- package/packages/badge/index.js +0 -8
- package/packages/badge/src/main.vue +0 -53
- package/packages/breadcrumb/index.js +0 -8
- package/packages/breadcrumb/src/breadcrumb-item.vue +0 -41
- package/packages/breadcrumb/src/breadcrumb.vue +0 -34
- package/packages/breadcrumb-item/index.js +0 -8
- package/packages/button/index.js +0 -8
- package/packages/button/src/button-group.vue +0 -10
- package/packages/button/src/button.vue +0 -78
- package/packages/button-group/index.js +0 -8
- package/packages/calendar/index.js +0 -8
- package/packages/calendar/src/date-table.vue +0 -200
- package/packages/calendar/src/main.vue +0 -280
- package/packages/card/index.js +0 -8
- package/packages/card/src/main.vue +0 -23
- package/packages/carousel/index.js +0 -8
- package/packages/carousel/src/item.vue +0 -138
- package/packages/carousel/src/main.vue +0 -315
- package/packages/carousel-item/index.js +0 -8
- package/packages/cascader/index.js +0 -8
- package/packages/cascader/src/cascader.vue +0 -663
- package/packages/cascader-panel/index.js +0 -8
- package/packages/cascader-panel/src/cascader-menu.vue +0 -138
- package/packages/cascader-panel/src/cascader-node.vue +0 -246
- package/packages/cascader-panel/src/cascader-panel.vue +0 -391
- package/packages/cascader-panel/src/node.js +0 -166
- package/packages/cascader-panel/src/store.js +0 -58
- package/packages/checkbox/index.js +0 -8
- package/packages/checkbox/src/checkbox-button.vue +0 -199
- package/packages/checkbox/src/checkbox-group.vue +0 -48
- package/packages/checkbox/src/checkbox.vue +0 -222
- package/packages/checkbox-button/index.js +0 -8
- package/packages/checkbox-group/index.js +0 -8
- package/packages/col/index.js +0 -9
- package/packages/col/src/col.js +0 -71
- package/packages/collapse/index.js +0 -9
- package/packages/collapse/src/collapse-item.vue +0 -114
- package/packages/collapse/src/collapse.vue +0 -73
- package/packages/collapse-item/index.js +0 -8
- package/packages/color-picker/index.js +0 -8
- package/packages/color-picker/src/color.js +0 -317
- package/packages/color-picker/src/components/alpha-slider.vue +0 -132
- package/packages/color-picker/src/components/hue-slider.vue +0 -123
- package/packages/color-picker/src/components/picker-dropdown.vue +0 -121
- package/packages/color-picker/src/components/predefine.vue +0 -61
- package/packages/color-picker/src/components/sv-panel.vue +0 -100
- package/packages/color-picker/src/draggable.js +0 -36
- package/packages/color-picker/src/main.vue +0 -188
- package/packages/container/index.js +0 -8
- package/packages/container/src/main.vue +0 -33
- package/packages/date-picker/index.js +0 -8
- package/packages/date-picker/src/basic/date-table.vue +0 -441
- package/packages/date-picker/src/basic/month-table.vue +0 -269
- package/packages/date-picker/src/basic/time-spinner.vue +0 -304
- package/packages/date-picker/src/basic/year-table.vue +0 -111
- package/packages/date-picker/src/panel/date-range.vue +0 -680
- package/packages/date-picker/src/panel/date.vue +0 -609
- package/packages/date-picker/src/panel/month-range.vue +0 -289
- package/packages/date-picker/src/panel/time-range.vue +0 -248
- package/packages/date-picker/src/panel/time-select.vue +0 -178
- package/packages/date-picker/src/panel/time.vue +0 -186
- package/packages/date-picker/src/picker/date-picker.js +0 -43
- package/packages/date-picker/src/picker/time-picker.js +0 -39
- package/packages/date-picker/src/picker/time-select.js +0 -21
- package/packages/date-picker/src/picker.vue +0 -956
- package/packages/descriptions/index.js +0 -8
- package/packages/descriptions/src/descriptions-item.js +0 -30
- package/packages/descriptions/src/descriptions-row.js +0 -116
- package/packages/descriptions/src/index.js +0 -180
- package/packages/descriptions-item/index.js +0 -8
- package/packages/dialog/index.js +0 -8
- package/packages/dialog/src/component.vue +0 -212
- package/packages/divider/index.js +0 -8
- package/packages/divider/src/main.vue +0 -37
- package/packages/drawer/index.js +0 -8
- package/packages/drawer/src/main.vue +0 -205
- package/packages/dropdown/index.js +0 -8
- package/packages/dropdown/src/dropdown-item.vue +0 -37
- package/packages/dropdown/src/dropdown-menu.vue +0 -63
- package/packages/dropdown/src/dropdown.vue +0 -293
- package/packages/dropdown-item/index.js +0 -8
- package/packages/dropdown-menu/index.js +0 -8
- package/packages/empty/index.js +0 -7
- package/packages/empty/src/img-empty.vue +0 -132
- package/packages/empty/src/index.vue +0 -50
- package/packages/footer/index.js +0 -8
- package/packages/footer/src/main.vue +0 -20
- package/packages/form/index.js +0 -8
- package/packages/form/src/form-item.vue +0 -324
- package/packages/form/src/form.vue +0 -182
- package/packages/form/src/label-wrap.vue +0 -78
- package/packages/form-item/index.js +0 -8
- package/packages/header/index.js +0 -8
- package/packages/header/src/main.vue +0 -20
- package/packages/icon/index.js +0 -8
- package/packages/icon/src/icon.vue +0 -13
- package/packages/image/index.js +0 -8
- package/packages/image/src/image-viewer.vue +0 -330
- package/packages/image/src/main.vue +0 -249
- package/packages/infinite-scroll/index.js +0 -8
- package/packages/infinite-scroll/src/main.js +0 -150
- package/packages/input/index.js +0 -8
- package/packages/input/src/calcTextareaHeight.js +0 -104
- package/packages/input/src/input.vue +0 -440
- package/packages/input-number/index.js +0 -8
- package/packages/input-number/src/input-number.vue +0 -283
- package/packages/link/index.js +0 -8
- package/packages/link/src/main.vue +0 -53
- package/packages/loading/index.js +0 -11
- package/packages/loading/src/directive.js +0 -133
- package/packages/loading/src/index.js +0 -106
- package/packages/loading/src/loading.vue +0 -41
- package/packages/main/index.js +0 -8
- package/packages/main/src/main.vue +0 -12
- package/packages/menu/index.js +0 -8
- package/packages/menu/src/menu-item-group.vue +0 -45
- package/packages/menu/src/menu-item.vue +0 -112
- package/packages/menu/src/menu-mixin.js +0 -44
- package/packages/menu/src/menu.vue +0 -325
- package/packages/menu/src/submenu.vue +0 -349
- package/packages/menu-item/index.js +0 -8
- package/packages/menu-item-group/index.js +0 -8
- package/packages/message/index.js +0 -2
- package/packages/message/src/main.js +0 -91
- package/packages/message/src/main.vue +0 -117
- package/packages/message-box/index.js +0 -2
- package/packages/message-box/src/main.js +0 -216
- package/packages/message-box/src/main.vue +0 -332
- package/packages/notification/index.js +0 -2
- package/packages/notification/src/main.js +0 -94
- package/packages/notification/src/main.vue +0 -152
- package/packages/option/index.js +0 -8
- package/packages/option-group/index.js +0 -8
- package/packages/page-header/index.js +0 -8
- package/packages/page-header/src/main.vue +0 -30
- package/packages/pagination/index.js +0 -8
- package/packages/pagination/src/pager.vue +0 -163
- package/packages/pagination/src/pagination.js +0 -386
- package/packages/popconfirm/index.js +0 -8
- package/packages/popconfirm/src/main.vue +0 -104
- package/packages/popover/index.js +0 -14
- package/packages/popover/src/directive.js +0 -20
- package/packages/popover/src/main.vue +0 -237
- package/packages/progress/index.js +0 -8
- package/packages/progress/src/progress.vue +0 -235
- package/packages/radio/index.js +0 -8
- package/packages/radio/src/radio-button.vue +0 -115
- package/packages/radio/src/radio-group.vue +0 -113
- package/packages/radio/src/radio.vue +0 -134
- package/packages/radio-button/index.js +0 -8
- package/packages/radio-group/index.js +0 -8
- package/packages/rate/index.js +0 -8
- package/packages/rate/src/main.vue +0 -348
- package/packages/result/index.js +0 -8
- package/packages/result/src/icon-error.vue +0 -13
- package/packages/result/src/icon-info.vue +0 -13
- package/packages/result/src/icon-success.vue +0 -13
- package/packages/result/src/icon-warning.vue +0 -13
- package/packages/result/src/index.vue +0 -65
- package/packages/row/index.js +0 -9
- package/packages/row/src/row.js +0 -44
- package/packages/scrollbar/index.js +0 -8
- package/packages/scrollbar/src/bar.js +0 -92
- package/packages/scrollbar/src/main.js +0 -130
- package/packages/scrollbar/src/util.js +0 -34
- package/packages/select/index.js +0 -8
- package/packages/select/src/navigation-mixin.js +0 -54
- package/packages/select/src/option-group.vue +0 -60
- package/packages/select/src/option.vue +0 -168
- package/packages/select/src/select-dropdown.vue +0 -74
- package/packages/select/src/select.vue +0 -900
- package/packages/skeleton/index.js +0 -8
- package/packages/skeleton/src/img-placeholder.vue +0 -16
- package/packages/skeleton/src/index.vue +0 -76
- package/packages/skeleton/src/item.vue +0 -22
- package/packages/skeleton-item/index.js +0 -8
- package/packages/slider/index.js +0 -8
- package/packages/slider/src/button.vue +0 -238
- package/packages/slider/src/main.vue +0 -427
- package/packages/slider/src/marker.js +0 -18
- package/packages/spinner/index.js +0 -8
- package/packages/spinner/src/spinner.vue +0 -27
- package/packages/statistic/index.js +0 -8
- package/packages/statistic/src/main.vue +0 -204
- package/packages/step/index.js +0 -8
- package/packages/steps/README.md +0 -69
- package/packages/steps/index.js +0 -8
- package/packages/steps/src/step.vue +0 -184
- package/packages/steps/src/steps.vue +0 -68
- package/packages/submenu/index.js +0 -8
- package/packages/switch/index.js +0 -9
- package/packages/switch/src/component.vue +0 -174
- package/packages/tab-pane/index.js +0 -8
- package/packages/table/index.js +0 -8
- package/packages/table/src/config.js +0 -124
- package/packages/table/src/dropdown.js +0 -28
- package/packages/table/src/filter-panel.vue +0 -194
- package/packages/table/src/layout-observer.js +0 -68
- package/packages/table/src/store/current.js +0 -76
- package/packages/table/src/store/expand.js +0 -65
- package/packages/table/src/store/helper.js +0 -41
- package/packages/table/src/store/index.js +0 -147
- package/packages/table/src/store/tree.js +0 -209
- package/packages/table/src/store/watcher.js +0 -381
- package/packages/table/src/table-body.js +0 -469
- package/packages/table/src/table-column.js +0 -319
- package/packages/table/src/table-footer.js +0 -153
- package/packages/table/src/table-header.js +0 -511
- package/packages/table/src/table-layout.js +0 -249
- package/packages/table/src/table-row.js +0 -101
- package/packages/table/src/table.vue +0 -712
- package/packages/table/src/util.js +0 -273
- package/packages/table-column/index.js +0 -8
- package/packages/tabs/index.js +0 -8
- package/packages/tabs/src/tab-bar.vue +0 -57
- package/packages/tabs/src/tab-nav.vue +0 -294
- package/packages/tabs/src/tab-pane.vue +0 -56
- package/packages/tabs/src/tabs.vue +0 -191
- package/packages/tag/index.js +0 -8
- package/packages/tag/src/tag.vue +0 -58
- package/packages/theme-chalk/README.md +0 -33
- package/packages/theme-chalk/gulpfile.js +0 -25
- package/packages/theme-chalk/package.json +0 -35
- package/packages/theme-chalk/src/alert.scss +0 -147
- package/packages/theme-chalk/src/aside.scss +0 -7
- package/packages/theme-chalk/src/autocomplete.scss +0 -80
- package/packages/theme-chalk/src/avatar.scss +0 -51
- package/packages/theme-chalk/src/backtop.scss +0 -22
- package/packages/theme-chalk/src/badge.scss +0 -57
- package/packages/theme-chalk/src/base.scss +0 -2
- package/packages/theme-chalk/src/breadcrumb-item.scss +0 -0
- package/packages/theme-chalk/src/breadcrumb.scss +0 -55
- package/packages/theme-chalk/src/button-group.scss +0 -0
- package/packages/theme-chalk/src/button.scss +0 -262
- package/packages/theme-chalk/src/calendar.scss +0 -79
- package/packages/theme-chalk/src/card.scss +0 -32
- package/packages/theme-chalk/src/carousel-item.scss +0 -50
- package/packages/theme-chalk/src/carousel.scss +0 -161
- package/packages/theme-chalk/src/cascader-panel.scss +0 -120
- package/packages/theme-chalk/src/cascader.scss +0 -182
- package/packages/theme-chalk/src/checkbox-button.scss +0 -0
- package/packages/theme-chalk/src/checkbox-group.scss +0 -0
- package/packages/theme-chalk/src/checkbox.scss +0 -359
- package/packages/theme-chalk/src/col.scss +0 -156
- package/packages/theme-chalk/src/collapse-item.scss +0 -0
- package/packages/theme-chalk/src/collapse.scss +0 -63
- package/packages/theme-chalk/src/color-picker.scss +0 -384
- package/packages/theme-chalk/src/common/popup.scss +0 -42
- package/packages/theme-chalk/src/common/transition.scss +0 -99
- package/packages/theme-chalk/src/common/var.scss +0 -1028
- package/packages/theme-chalk/src/container.scss +0 -14
- package/packages/theme-chalk/src/date-picker/date-picker.scss +0 -97
- package/packages/theme-chalk/src/date-picker/date-range-picker.scss +0 -101
- package/packages/theme-chalk/src/date-picker/date-table.scss +0 -151
- package/packages/theme-chalk/src/date-picker/month-table.scss +0 -82
- package/packages/theme-chalk/src/date-picker/picker-panel.scss +0 -117
- package/packages/theme-chalk/src/date-picker/picker.scss +0 -197
- package/packages/theme-chalk/src/date-picker/time-picker.scss +0 -85
- package/packages/theme-chalk/src/date-picker/time-range-picker.scss +0 -31
- package/packages/theme-chalk/src/date-picker/time-spinner.scss +0 -110
- package/packages/theme-chalk/src/date-picker/year-table.scss +0 -51
- package/packages/theme-chalk/src/date-picker.scss +0 -12
- package/packages/theme-chalk/src/descriptions-item.scss +0 -42
- package/packages/theme-chalk/src/descriptions.scss +0 -111
- package/packages/theme-chalk/src/dialog.scss +0 -123
- package/packages/theme-chalk/src/display.scss +0 -12
- package/packages/theme-chalk/src/divider.scss +0 -47
- package/packages/theme-chalk/src/drawer.scss +0 -219
- package/packages/theme-chalk/src/dropdown-item.scss +0 -0
- package/packages/theme-chalk/src/dropdown-menu.scss +0 -0
- package/packages/theme-chalk/src/dropdown.scss +0 -182
- package/packages/theme-chalk/src/empty.scss +0 -45
- 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/footer.scss +0 -8
- package/packages/theme-chalk/src/form-item.scss +0 -0
- package/packages/theme-chalk/src/form.scss +0 -167
- package/packages/theme-chalk/src/header.scss +0 -8
- package/packages/theme-chalk/src/icon.scss +0 -1167
- package/packages/theme-chalk/src/image.scss +0 -179
- package/packages/theme-chalk/src/index.scss +0 -87
- package/packages/theme-chalk/src/infinite-scroll.scss +0 -0
- package/packages/theme-chalk/src/infiniteScroll.scss +0 -0
- package/packages/theme-chalk/src/input-number.scss +0 -180
- package/packages/theme-chalk/src/input.scss +0 -360
- package/packages/theme-chalk/src/link.scss +0 -81
- package/packages/theme-chalk/src/loading.scss +0 -96
- package/packages/theme-chalk/src/main.scss +0 -12
- package/packages/theme-chalk/src/menu-item-group.scss +0 -0
- package/packages/theme-chalk/src/menu-item.scss +0 -0
- package/packages/theme-chalk/src/menu.scss +0 -289
- package/packages/theme-chalk/src/message-box.scss +0 -226
- package/packages/theme-chalk/src/message.scss +0 -120
- package/packages/theme-chalk/src/mixins/_button.scss +0 -81
- package/packages/theme-chalk/src/mixins/config.scss +0 -4
- package/packages/theme-chalk/src/mixins/function.scss +0 -44
- package/packages/theme-chalk/src/mixins/mixins.scss +0 -190
- package/packages/theme-chalk/src/mixins/utils.scss +0 -39
- package/packages/theme-chalk/src/notification.scss +0 -99
- package/packages/theme-chalk/src/option-group.scss +0 -42
- package/packages/theme-chalk/src/option.scss +0 -36
- package/packages/theme-chalk/src/page-header.scss +0 -41
- package/packages/theme-chalk/src/pagination.scss +0 -295
- package/packages/theme-chalk/src/popconfirm.scss +0 -16
- package/packages/theme-chalk/src/popover.scss +0 -40
- package/packages/theme-chalk/src/popper.scss +0 -101
- package/packages/theme-chalk/src/progress.scss +0 -141
- package/packages/theme-chalk/src/radio-button.scss +0 -113
- package/packages/theme-chalk/src/radio-group.scss +0 -9
- package/packages/theme-chalk/src/radio.scss +0 -199
- package/packages/theme-chalk/src/rate.scss +0 -49
- package/packages/theme-chalk/src/reset.scss +0 -79
- package/packages/theme-chalk/src/result.scss +0 -61
- package/packages/theme-chalk/src/row.scss +0 -43
- package/packages/theme-chalk/src/scrollbar.scss +0 -72
- package/packages/theme-chalk/src/select-dropdown.scss +0 -62
- package/packages/theme-chalk/src/select.scss +0 -152
- package/packages/theme-chalk/src/skeleton-item.scss +0 -84
- package/packages/theme-chalk/src/skeleton.scss +0 -40
- package/packages/theme-chalk/src/slider.scss +0 -250
- package/packages/theme-chalk/src/spinner.scss +0 -44
- package/packages/theme-chalk/src/statistic.scss +0 -38
- package/packages/theme-chalk/src/step.scss +0 -317
- package/packages/theme-chalk/src/steps.scss +0 -20
- package/packages/theme-chalk/src/submenu.scss +0 -0
- package/packages/theme-chalk/src/switch.scss +0 -116
- package/packages/theme-chalk/src/tab-pane.scss +0 -0
- package/packages/theme-chalk/src/table-column.scss +0 -97
- package/packages/theme-chalk/src/table.scss +0 -564
- package/packages/theme-chalk/src/tabs.scss +0 -602
- package/packages/theme-chalk/src/tag.scss +0 -163
- package/packages/theme-chalk/src/time-picker.scss +0 -8
- package/packages/theme-chalk/src/time-select.scss +0 -37
- package/packages/theme-chalk/src/timeline-item.scss +0 -86
- package/packages/theme-chalk/src/timeline.scss +0 -14
- package/packages/theme-chalk/src/tooltip.scss +0 -141
- package/packages/theme-chalk/src/transfer.scss +0 -227
- package/packages/theme-chalk/src/tree.scss +0 -123
- package/packages/theme-chalk/src/upload.scss +0 -603
- package/packages/time-picker/index.js +0 -8
- package/packages/time-select/index.js +0 -8
- package/packages/timeline/index.js +0 -8
- package/packages/timeline/src/item.vue +0 -73
- package/packages/timeline/src/main.vue +0 -33
- package/packages/timeline-item/index.js +0 -8
- package/packages/tooltip/index.js +0 -8
- package/packages/tooltip/src/main.js +0 -257
- package/packages/transfer/index.js +0 -8
- package/packages/transfer/src/main.vue +0 -231
- package/packages/transfer/src/transfer-panel.vue +0 -251
- package/packages/tree/index.js +0 -8
- package/packages/tree/src/model/node.js +0 -484
- package/packages/tree/src/model/tree-store.js +0 -340
- package/packages/tree/src/model/util.js +0 -27
- package/packages/tree/src/tree-node.vue +0 -279
- package/packages/tree/src/tree.vue +0 -496
- package/packages/upload/index.js +0 -8
- package/packages/upload/src/ajax.js +0 -85
- package/packages/upload/src/index.vue +0 -338
- package/packages/upload/src/upload-dragger.vue +0 -70
- package/packages/upload/src/upload-list.vue +0 -105
- package/packages/upload/src/upload.vue +0 -211
- package/src/directives/mousewheel.js +0 -18
- package/src/directives/repeat-click.js +0 -26
- package/src/index.js +0 -309
- package/src/locale/format.js +0 -46
- package/src/locale/index.js +0 -48
- package/src/locale/lang/af-ZA.js +0 -123
- package/src/locale/lang/ar.js +0 -122
- package/src/locale/lang/az.js +0 -126
- package/src/locale/lang/bg.js +0 -123
- package/src/locale/lang/bn.js +0 -126
- package/src/locale/lang/ca.js +0 -122
- package/src/locale/lang/cs-CZ.js +0 -125
- package/src/locale/lang/da.js +0 -122
- package/src/locale/lang/de.js +0 -124
- package/src/locale/lang/ee.js +0 -123
- package/src/locale/lang/el.js +0 -123
- package/src/locale/lang/en.js +0 -123
- package/src/locale/lang/eo.js +0 -123
- package/src/locale/lang/es.js +0 -122
- package/src/locale/lang/eu.js +0 -123
- package/src/locale/lang/fa.js +0 -123
- package/src/locale/lang/fi.js +0 -123
- package/src/locale/lang/fr.js +0 -122
- package/src/locale/lang/he.js +0 -123
- package/src/locale/lang/hr.js +0 -123
- package/src/locale/lang/hu.js +0 -122
- package/src/locale/lang/hy-AM.js +0 -123
- package/src/locale/lang/id.js +0 -123
- package/src/locale/lang/is.js +0 -124
- package/src/locale/lang/it.js +0 -122
- package/src/locale/lang/ja.js +0 -123
- package/src/locale/lang/kg.js +0 -123
- package/src/locale/lang/km.js +0 -123
- package/src/locale/lang/ko.js +0 -123
- package/src/locale/lang/ku.js +0 -123
- package/src/locale/lang/kz.js +0 -123
- package/src/locale/lang/lo-LA.js +0 -126
- package/src/locale/lang/lt.js +0 -123
- package/src/locale/lang/lv.js +0 -123
- package/src/locale/lang/mn.js +0 -123
- package/src/locale/lang/ms.js +0 -122
- package/src/locale/lang/nb-NO.js +0 -122
- package/src/locale/lang/nl.js +0 -123
- package/src/locale/lang/pl.js +0 -123
- package/src/locale/lang/pt-br.js +0 -123
- package/src/locale/lang/pt.js +0 -123
- package/src/locale/lang/ro.js +0 -123
- package/src/locale/lang/ru-RU.js +0 -123
- package/src/locale/lang/si.js +0 -123
- package/src/locale/lang/sk.js +0 -125
- package/src/locale/lang/sl.js +0 -123
- package/src/locale/lang/sr-Latn.js +0 -123
- package/src/locale/lang/sr.js +0 -123
- package/src/locale/lang/sv-SE.js +0 -123
- package/src/locale/lang/sw.js +0 -123
- package/src/locale/lang/ta.js +0 -122
- package/src/locale/lang/th.js +0 -123
- package/src/locale/lang/tk.js +0 -123
- package/src/locale/lang/tr-TR.js +0 -123
- package/src/locale/lang/ua.js +0 -123
- package/src/locale/lang/ug-CN.js +0 -123
- package/src/locale/lang/uz-UZ.js +0 -123
- package/src/locale/lang/vi.js +0 -123
- package/src/locale/lang/zh-CN.js +0 -123
- package/src/locale/lang/zh-TW.js +0 -123
- package/src/mixins/emitter.js +0 -33
- package/src/mixins/focus.js +0 -9
- package/src/mixins/locale.js +0 -9
- package/src/mixins/migrating.js +0 -54
- package/src/transitions/collapse-transition.js +0 -77
- package/src/utils/after-leave.js +0 -27
- package/src/utils/aria-dialog.js +0 -90
- package/src/utils/aria-utils.js +0 -122
- package/src/utils/clickoutside.js +0 -76
- package/src/utils/date-util.js +0 -282
- package/src/utils/date.js +0 -368
- package/src/utils/dom.js +0 -227
- package/src/utils/lodash.js +0 -18075
- package/src/utils/menu/aria-menubar.js +0 -14
- package/src/utils/menu/aria-menuitem.js +0 -49
- package/src/utils/menu/aria-submenu.js +0 -59
- package/src/utils/merge.js +0 -15
- package/src/utils/popper.js +0 -1276
- package/src/utils/popup/index.js +0 -218
- package/src/utils/popup/popup-manager.js +0 -194
- package/src/utils/resize-event.js +0 -36
- package/src/utils/scroll-into-view.js +0 -27
- package/src/utils/scrollbar-width.js +0 -29
- package/src/utils/shared.js +0 -7
- package/src/utils/types.js +0 -40
- package/src/utils/util.js +0 -245
- package/src/utils/vdom.js +0 -5
- package/src/utils/vue-popper.js +0 -217
- package/types/alert.d.ts +0 -31
- package/types/aside.d.ts +0 -7
- package/types/autocomplete.d.ts +0 -78
- package/types/avatar.d.ts +0 -20
- package/types/backtop.d.ts +0 -16
- package/types/badge.d.ts +0 -16
- package/types/breadcrumb-item.d.ts +0 -10
- package/types/breadcrumb.d.ts +0 -10
- package/types/button-group.d.ts +0 -4
- package/types/button.d.ts +0 -37
- package/types/calendar.d.ts +0 -15
- package/types/card.d.ts +0 -26
- package/types/carousel-item.d.ts +0 -10
- package/types/carousel.d.ts +0 -57
- package/types/cascader-panel.d.ts +0 -72
- package/types/cascader.d.ts +0 -65
- package/types/checkbox-button.d.ts +0 -22
- package/types/checkbox-group.d.ts +0 -22
- package/types/checkbox.d.ts +0 -34
- package/types/col.d.ts +0 -46
- package/types/collapse-item.d.ts +0 -26
- package/types/collapse.d.ts +0 -10
- package/types/color-picker.d.ts +0 -21
- package/types/component.d.ts +0 -13
- package/types/container.d.ts +0 -7
- package/types/date-picker.d.ts +0 -124
- package/types/descriptions-item.d.ts +0 -37
- package/types/descriptions.d.ts +0 -52
- package/types/dialog.d.ts +0 -62
- package/types/divider.d.ts +0 -12
- package/types/drawer.d.ts +0 -63
- package/types/dropdown-item.d.ts +0 -16
- package/types/dropdown-menu.d.ts +0 -4
- package/types/dropdown.d.ts +0 -38
- package/types/element-ui.d.ts +0 -382
- package/types/empty.d.ts +0 -31
- package/types/footer.d.ts +0 -7
- package/types/form-item.d.ts +0 -37
- package/types/form.d.ts +0 -82
- package/types/header.d.ts +0 -7
- package/types/icon.d.ts +0 -7
- package/types/image.d.ts +0 -43
- package/types/index.d.ts +0 -4
- package/types/infinite-scroll.d.ts +0 -6
- package/types/input-number.d.ts +0 -47
- package/types/input.d.ts +0 -107
- package/types/link.d.ts +0 -25
- package/types/loading.d.ts +0 -62
- package/types/main.d.ts +0 -4
- package/types/menu-item-group.d.ts +0 -7
- package/types/menu-item.d.ts +0 -10
- package/types/menu.d.ts +0 -46
- package/types/message-box.d.ts +0 -176
- package/types/message.d.ts +0 -90
- package/types/notification.d.ts +0 -84
- package/types/option-group.d.ts +0 -10
- package/types/option.d.ts +0 -13
- package/types/page-header.d.ts +0 -10
- package/types/pagination.d.ts +0 -43
- package/types/popconfirm.d.ts +0 -29
- package/types/popover.d.ts +0 -71
- package/types/progress.d.ts +0 -37
- package/types/radio-button.d.ts +0 -16
- package/types/radio-group.d.ts +0 -18
- package/types/radio.d.ts +0 -19
- package/types/rate.d.ts +0 -64
- package/types/result.d.ts +0 -33
- package/types/row.d.ts +0 -25
- package/types/select.d.ts +0 -90
- package/types/skeleton-item.d.ts +0 -7
- package/types/skeleton.d.ts +0 -33
- package/types/slider.d.ts +0 -68
- package/types/spinner.d.ts +0 -16
- package/types/statistic.d.ts +0 -37
- package/types/step.d.ts +0 -34
- package/types/steps.d.ts +0 -28
- package/types/submenu.d.ts +0 -22
- package/types/switch.d.ts +0 -43
- package/types/tab-pane.d.ts +0 -19
- package/types/table-column.d.ts +0 -117
- package/types/table.d.ts +0 -177
- package/types/tabs.d.ts +0 -31
- package/types/tag.d.ts +0 -28
- package/types/time-picker.d.ts +0 -63
- package/types/time-select.d.ts +0 -56
- package/types/timeline-item.d.ts +0 -20
- package/types/timeline.d.ts +0 -6
- package/types/tooltip.d.ts +0 -52
- package/types/transfer.d.ts +0 -73
- package/types/tree.d.ts +0 -266
- package/types/upload.d.ts +0 -124
- package/web-types.json +0 -4195
package/packages/steps/README.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# element-steps
|
|
2
|
-
> A element-steps component for Vue.js.
|
|
3
|
-
|
|
4
|
-
## Demo
|
|
5
|
-
http://element-component.github.io/element-steps
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
```shell
|
|
9
|
-
npm i element-steps -D
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
```javascript
|
|
14
|
-
import Vue from 'vue'
|
|
15
|
-
import ElStep from 'element-steps'
|
|
16
|
-
import 'element-theme-chalk/dist/step.css'
|
|
17
|
-
|
|
18
|
-
Vue.use(ElStep)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
or
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import Vue from 'vue'
|
|
25
|
-
import { ElSteps, ElStep } from 'element-steps'
|
|
26
|
-
|
|
27
|
-
Vue.component('el-steps', ElSteps)
|
|
28
|
-
Vue.component('el-step', ElStep)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Steps Attributes
|
|
32
|
-
|
|
33
|
-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
34
|
-
|---------- |-------- |---------- |------------- |-------- |
|
|
35
|
-
| space | 每个 step 的间距,不填写将自适应间距 | Number | — | — |
|
|
36
|
-
| direction | 显示方向 | string | vertical/horizontal | horizontal |
|
|
37
|
-
| active | 设置当前激活步骤 | number | — | 0 |
|
|
38
|
-
| process-status | 设置当前步骤的状态 | string | wait/process/finish/error/success | process |
|
|
39
|
-
| finish-status | 设置结束步骤的状态 | string | wait/process/finish/error/success | finish |
|
|
40
|
-
| align-center | 标题描述居中对齐 | boolean | - | false |
|
|
41
|
-
|
|
42
|
-
### Step Attributes
|
|
43
|
-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
44
|
-
|---------- |-------- |---------- |------------- |-------- |
|
|
45
|
-
| title | 标题 | string | — | — |
|
|
46
|
-
| description | 描述性文字 | string | — | — |
|
|
47
|
-
| icon | 图标 | Element Icon 提供的图标,如果要使用自定义图标可以通过 slot 方式写入 | string | — |
|
|
48
|
-
|
|
49
|
-
### Step Slot
|
|
50
|
-
| name | 说明 |
|
|
51
|
-
|----|----|
|
|
52
|
-
| icon | 图标 |
|
|
53
|
-
| title | 标题 |
|
|
54
|
-
| description | 描述性文字 |
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Development
|
|
58
|
-
```shell
|
|
59
|
-
make dev
|
|
60
|
-
|
|
61
|
-
## test
|
|
62
|
-
make test
|
|
63
|
-
|
|
64
|
-
## build
|
|
65
|
-
make build
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
# License
|
|
69
|
-
[MIT](https://opensource.org/licenses/MIT)
|
package/packages/steps/index.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="el-step"
|
|
4
|
-
:style="style"
|
|
5
|
-
:class="[
|
|
6
|
-
!isSimple && `is-${$parent.direction}`,
|
|
7
|
-
isSimple && 'is-simple',
|
|
8
|
-
isLast && !space && !isCenter && 'is-flex',
|
|
9
|
-
isCenter && !isVertical && !isSimple && 'is-center'
|
|
10
|
-
]">
|
|
11
|
-
<!-- icon & line -->
|
|
12
|
-
<div
|
|
13
|
-
class="el-step__head"
|
|
14
|
-
:class="`is-${currentStatus}`">
|
|
15
|
-
<div
|
|
16
|
-
class="el-step__line"
|
|
17
|
-
:style="isLast ? '' : { marginRight: $parent.stepOffset + 'px' }"
|
|
18
|
-
>
|
|
19
|
-
<i class="el-step__line-inner" :style="lineStyle"></i>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="el-step__icon" :class="`is-${icon ? 'icon' : 'text'}`">
|
|
23
|
-
<slot
|
|
24
|
-
v-if="currentStatus !== 'success' && currentStatus !== 'error'"
|
|
25
|
-
name="icon">
|
|
26
|
-
<i v-if="icon" class="el-step__icon-inner" :class="[icon]"></i>
|
|
27
|
-
<div class="el-step__icon-inner" v-if="!icon && !isSimple">{{ index + 1 }}</div>
|
|
28
|
-
</slot>
|
|
29
|
-
<i
|
|
30
|
-
v-else
|
|
31
|
-
:class="['el-icon-' + (currentStatus === 'success' ? 'check' : 'close')]"
|
|
32
|
-
class="el-step__icon-inner is-status"
|
|
33
|
-
>
|
|
34
|
-
</i>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<!-- title & description -->
|
|
38
|
-
<div class="el-step__main">
|
|
39
|
-
<div
|
|
40
|
-
class="el-step__title"
|
|
41
|
-
ref="title"
|
|
42
|
-
:class="['is-' + currentStatus]">
|
|
43
|
-
<slot name="title">{{ title }}</slot>
|
|
44
|
-
</div>
|
|
45
|
-
<div v-if="isSimple" class="el-step__arrow"></div>
|
|
46
|
-
<div
|
|
47
|
-
v-else
|
|
48
|
-
class="el-step__description"
|
|
49
|
-
:class="['is-' + currentStatus]">
|
|
50
|
-
<slot name="description">{{ description }}</slot>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<script>
|
|
57
|
-
export default {
|
|
58
|
-
name: 'ElStep',
|
|
59
|
-
|
|
60
|
-
props: {
|
|
61
|
-
title: String,
|
|
62
|
-
icon: String,
|
|
63
|
-
description: String,
|
|
64
|
-
status: String
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
data() {
|
|
68
|
-
return {
|
|
69
|
-
index: -1,
|
|
70
|
-
lineStyle: {},
|
|
71
|
-
internalStatus: ''
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
beforeCreate() {
|
|
76
|
-
this.$parent.steps.push(this);
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
beforeDestroy() {
|
|
80
|
-
const steps = this.$parent.steps;
|
|
81
|
-
const index = steps.indexOf(this);
|
|
82
|
-
if (index >= 0) {
|
|
83
|
-
steps.splice(index, 1);
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
computed: {
|
|
88
|
-
currentStatus() {
|
|
89
|
-
return this.status || this.internalStatus;
|
|
90
|
-
},
|
|
91
|
-
prevStatus() {
|
|
92
|
-
const prevStep = this.$parent.steps[this.index - 1];
|
|
93
|
-
return prevStep ? prevStep.currentStatus : 'wait';
|
|
94
|
-
},
|
|
95
|
-
isCenter() {
|
|
96
|
-
return this.$parent.alignCenter;
|
|
97
|
-
},
|
|
98
|
-
isVertical() {
|
|
99
|
-
return this.$parent.direction === 'vertical';
|
|
100
|
-
},
|
|
101
|
-
isSimple() {
|
|
102
|
-
return this.$parent.simple;
|
|
103
|
-
},
|
|
104
|
-
isLast() {
|
|
105
|
-
const parent = this.$parent;
|
|
106
|
-
return parent.steps[parent.steps.length - 1] === this;
|
|
107
|
-
},
|
|
108
|
-
stepsCount() {
|
|
109
|
-
return this.$parent.steps.length;
|
|
110
|
-
},
|
|
111
|
-
space() {
|
|
112
|
-
const { isSimple, $parent: { space } } = this;
|
|
113
|
-
return isSimple ? '' : space ;
|
|
114
|
-
},
|
|
115
|
-
style: function() {
|
|
116
|
-
const style = {};
|
|
117
|
-
const parent = this.$parent;
|
|
118
|
-
const len = parent.steps.length;
|
|
119
|
-
|
|
120
|
-
const space = (typeof this.space === 'number'
|
|
121
|
-
? this.space + 'px'
|
|
122
|
-
: this.space
|
|
123
|
-
? this.space
|
|
124
|
-
: 100 / (len - (this.isCenter ? 0 : 1)) + '%');
|
|
125
|
-
style.flexBasis = space;
|
|
126
|
-
if (this.isVertical) return style;
|
|
127
|
-
if (this.isLast) {
|
|
128
|
-
style.maxWidth = 100 / this.stepsCount + '%';
|
|
129
|
-
} else {
|
|
130
|
-
style.marginRight = -this.$parent.stepOffset + 'px';
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return style;
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
methods: {
|
|
138
|
-
updateStatus(val) {
|
|
139
|
-
const prevChild = this.$parent.$children[this.index - 1];
|
|
140
|
-
|
|
141
|
-
if (val > this.index) {
|
|
142
|
-
this.internalStatus = this.$parent.finishStatus;
|
|
143
|
-
} else if (val === this.index && this.prevStatus !== 'error') {
|
|
144
|
-
this.internalStatus = this.$parent.processStatus;
|
|
145
|
-
} else {
|
|
146
|
-
this.internalStatus = 'wait';
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (prevChild) prevChild.calcProgress(this.internalStatus);
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
calcProgress(status) {
|
|
153
|
-
let step = 100;
|
|
154
|
-
const style = {};
|
|
155
|
-
|
|
156
|
-
style.transitionDelay = 150 * this.index + 'ms';
|
|
157
|
-
if (status === this.$parent.processStatus) {
|
|
158
|
-
step = this.currentStatus !== 'error' ? 0 : 0;
|
|
159
|
-
} else if (status === 'wait') {
|
|
160
|
-
step = 0;
|
|
161
|
-
style.transitionDelay = (-150 * this.index) + 'ms';
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
style.borderWidth = step && !this.isSimple ? '1px' : 0;
|
|
165
|
-
this.$parent.direction === 'vertical'
|
|
166
|
-
? style.height = step + '%'
|
|
167
|
-
: style.width = step + '%';
|
|
168
|
-
|
|
169
|
-
this.lineStyle = style;
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
mounted() {
|
|
174
|
-
const unwatch = this.$watch('index', val => {
|
|
175
|
-
this.$watch('$parent.active', this.updateStatus, { immediate: true });
|
|
176
|
-
this.$watch('$parent.processStatus', () => {
|
|
177
|
-
const activeIndex = this.$parent.active;
|
|
178
|
-
this.updateStatus(activeIndex);
|
|
179
|
-
}, { immediate: true });
|
|
180
|
-
unwatch();
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
</script>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="el-steps"
|
|
4
|
-
:class="[
|
|
5
|
-
!simple && 'el-steps--' + direction,
|
|
6
|
-
simple && 'el-steps--simple'
|
|
7
|
-
]">
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import Migrating from 'element-ui/src/mixins/migrating';
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
name: 'ElSteps',
|
|
17
|
-
|
|
18
|
-
mixins: [Migrating],
|
|
19
|
-
|
|
20
|
-
props: {
|
|
21
|
-
space: [Number, String],
|
|
22
|
-
active: Number,
|
|
23
|
-
direction: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'horizontal'
|
|
26
|
-
},
|
|
27
|
-
alignCenter: Boolean,
|
|
28
|
-
simple: Boolean,
|
|
29
|
-
finishStatus: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: 'finish'
|
|
32
|
-
},
|
|
33
|
-
processStatus: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: 'process'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
steps: [],
|
|
42
|
-
stepOffset: 0
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
methods: {
|
|
47
|
-
getMigratingConfig() {
|
|
48
|
-
return {
|
|
49
|
-
props: {
|
|
50
|
-
'center': 'center is removed.'
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
watch: {
|
|
57
|
-
active(newVal, oldVal) {
|
|
58
|
-
this.$emit('change', newVal, oldVal);
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
steps(steps) {
|
|
62
|
-
steps.forEach((child, index) => {
|
|
63
|
-
child.index = index;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
</script>
|
package/packages/switch/index.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="el-switch"
|
|
4
|
-
:class="{ 'is-disabled': switchDisabled, 'is-checked': checked }"
|
|
5
|
-
role="switch"
|
|
6
|
-
:aria-checked="checked"
|
|
7
|
-
:aria-disabled="switchDisabled"
|
|
8
|
-
@click.prevent="switchValue"
|
|
9
|
-
>
|
|
10
|
-
<input
|
|
11
|
-
class="el-switch__input"
|
|
12
|
-
type="checkbox"
|
|
13
|
-
@change="handleChange"
|
|
14
|
-
ref="input"
|
|
15
|
-
:id="id"
|
|
16
|
-
:name="name"
|
|
17
|
-
:true-value="activeValue"
|
|
18
|
-
:false-value="inactiveValue"
|
|
19
|
-
:disabled="switchDisabled"
|
|
20
|
-
@keydown.enter="switchValue"
|
|
21
|
-
>
|
|
22
|
-
<span
|
|
23
|
-
:class="['el-switch__label', 'el-switch__label--left', !checked ? 'is-active' : '']"
|
|
24
|
-
v-if="inactiveIconClass || inactiveText">
|
|
25
|
-
<i :class="[inactiveIconClass]" v-if="inactiveIconClass"></i>
|
|
26
|
-
<span v-if="!inactiveIconClass && inactiveText" :aria-hidden="checked">{{ inactiveText }}</span>
|
|
27
|
-
</span>
|
|
28
|
-
<span class="el-switch__core" ref="core" :style="{ 'width': coreWidth + 'px' }">
|
|
29
|
-
</span>
|
|
30
|
-
<span
|
|
31
|
-
:class="['el-switch__label', 'el-switch__label--right', checked ? 'is-active' : '']"
|
|
32
|
-
v-if="activeIconClass || activeText">
|
|
33
|
-
<i :class="[activeIconClass]" v-if="activeIconClass"></i>
|
|
34
|
-
<span v-if="!activeIconClass && activeText" :aria-hidden="!checked">{{ activeText }}</span>
|
|
35
|
-
</span>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
<script>
|
|
39
|
-
import emitter from 'element-ui/src/mixins/emitter';
|
|
40
|
-
import Focus from 'element-ui/src/mixins/focus';
|
|
41
|
-
import Migrating from 'element-ui/src/mixins/migrating';
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
name: 'ElSwitch',
|
|
45
|
-
mixins: [Focus('input'), Migrating, emitter],
|
|
46
|
-
inject: {
|
|
47
|
-
elForm: {
|
|
48
|
-
default: ''
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
value: {
|
|
53
|
-
type: [Boolean, String, Number],
|
|
54
|
-
default: false
|
|
55
|
-
},
|
|
56
|
-
disabled: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
width: {
|
|
61
|
-
type: Number,
|
|
62
|
-
default: 40
|
|
63
|
-
},
|
|
64
|
-
activeIconClass: {
|
|
65
|
-
type: String,
|
|
66
|
-
default: ''
|
|
67
|
-
},
|
|
68
|
-
inactiveIconClass: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: ''
|
|
71
|
-
},
|
|
72
|
-
activeText: String,
|
|
73
|
-
inactiveText: String,
|
|
74
|
-
activeColor: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: ''
|
|
77
|
-
},
|
|
78
|
-
inactiveColor: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: ''
|
|
81
|
-
},
|
|
82
|
-
activeValue: {
|
|
83
|
-
type: [Boolean, String, Number],
|
|
84
|
-
default: true
|
|
85
|
-
},
|
|
86
|
-
inactiveValue: {
|
|
87
|
-
type: [Boolean, String, Number],
|
|
88
|
-
default: false
|
|
89
|
-
},
|
|
90
|
-
name: {
|
|
91
|
-
type: String,
|
|
92
|
-
default: ''
|
|
93
|
-
},
|
|
94
|
-
validateEvent: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: true
|
|
97
|
-
},
|
|
98
|
-
id: String
|
|
99
|
-
},
|
|
100
|
-
data() {
|
|
101
|
-
return {
|
|
102
|
-
coreWidth: this.width
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
created() {
|
|
106
|
-
if (!~[this.activeValue, this.inactiveValue].indexOf(this.value)) {
|
|
107
|
-
this.$emit('input', this.inactiveValue);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
computed: {
|
|
111
|
-
checked() {
|
|
112
|
-
return this.value === this.activeValue;
|
|
113
|
-
},
|
|
114
|
-
switchDisabled() {
|
|
115
|
-
return this.disabled || (this.elForm || {}).disabled;
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
watch: {
|
|
119
|
-
checked() {
|
|
120
|
-
this.$refs.input.checked = this.checked;
|
|
121
|
-
if (this.activeColor || this.inactiveColor) {
|
|
122
|
-
this.setBackgroundColor();
|
|
123
|
-
}
|
|
124
|
-
if (this.validateEvent) {
|
|
125
|
-
this.dispatch('ElFormItem', 'el.form.change', [this.value]);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
methods: {
|
|
130
|
-
handleChange(event) {
|
|
131
|
-
const val = this.checked ? this.inactiveValue : this.activeValue;
|
|
132
|
-
this.$emit('input', val);
|
|
133
|
-
this.$emit('change', val);
|
|
134
|
-
this.$nextTick(() => {
|
|
135
|
-
// set input's checked property
|
|
136
|
-
// in case parent refuses to change component's value
|
|
137
|
-
if (this.$refs.input) {
|
|
138
|
-
this.$refs.input.checked = this.checked;
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
setBackgroundColor() {
|
|
143
|
-
let newColor = this.checked ? this.activeColor : this.inactiveColor;
|
|
144
|
-
this.$refs.core.style.borderColor = newColor;
|
|
145
|
-
this.$refs.core.style.backgroundColor = newColor;
|
|
146
|
-
},
|
|
147
|
-
switchValue() {
|
|
148
|
-
!this.switchDisabled && this.handleChange();
|
|
149
|
-
},
|
|
150
|
-
getMigratingConfig() {
|
|
151
|
-
return {
|
|
152
|
-
props: {
|
|
153
|
-
'on-color': 'on-color is renamed to active-color.',
|
|
154
|
-
'off-color': 'off-color is renamed to inactive-color.',
|
|
155
|
-
'on-text': 'on-text is renamed to active-text.',
|
|
156
|
-
'off-text': 'off-text is renamed to inactive-text.',
|
|
157
|
-
'on-value': 'on-value is renamed to active-value.',
|
|
158
|
-
'off-value': 'off-value is renamed to inactive-value.',
|
|
159
|
-
'on-icon-class': 'on-icon-class is renamed to active-icon-class.',
|
|
160
|
-
'off-icon-class': 'off-icon-class is renamed to inactive-icon-class.'
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
mounted() {
|
|
166
|
-
/* istanbul ignore if */
|
|
167
|
-
this.coreWidth = this.width || 40;
|
|
168
|
-
if (this.activeColor || this.inactiveColor) {
|
|
169
|
-
this.setBackgroundColor();
|
|
170
|
-
}
|
|
171
|
-
this.$refs.input.checked = this.checked;
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
</script>
|
package/packages/table/index.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { getPropByPath } from 'element-ui/src/utils/util';
|
|
2
|
-
|
|
3
|
-
export const cellStarts = {
|
|
4
|
-
default: {
|
|
5
|
-
order: ''
|
|
6
|
-
},
|
|
7
|
-
selection: {
|
|
8
|
-
width: 48,
|
|
9
|
-
minWidth: 48,
|
|
10
|
-
realWidth: 48,
|
|
11
|
-
order: '',
|
|
12
|
-
className: 'el-table-column--selection'
|
|
13
|
-
},
|
|
14
|
-
expand: {
|
|
15
|
-
width: 48,
|
|
16
|
-
minWidth: 48,
|
|
17
|
-
realWidth: 48,
|
|
18
|
-
order: ''
|
|
19
|
-
},
|
|
20
|
-
index: {
|
|
21
|
-
width: 48,
|
|
22
|
-
minWidth: 48,
|
|
23
|
-
realWidth: 48,
|
|
24
|
-
order: ''
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// 这些选项不应该被覆盖
|
|
29
|
-
export const cellForced = {
|
|
30
|
-
selection: {
|
|
31
|
-
renderHeader: function(h, { store }) {
|
|
32
|
-
return <el-checkbox
|
|
33
|
-
disabled={ store.states.data && store.states.data.length === 0 }
|
|
34
|
-
indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
|
|
35
|
-
on-input={ this.toggleAllSelection }
|
|
36
|
-
value={ this.isAllSelected } />;
|
|
37
|
-
},
|
|
38
|
-
renderCell: function(h, { row, column, isSelected, store, $index }) {
|
|
39
|
-
return <el-checkbox
|
|
40
|
-
nativeOn-click={ (event) => event.stopPropagation() }
|
|
41
|
-
value={ isSelected }
|
|
42
|
-
disabled={ column.selectable ? !column.selectable.call(null, row, $index) : false }
|
|
43
|
-
on-input={ () => { store.commit('rowSelectedChanged', row); } }
|
|
44
|
-
/>;
|
|
45
|
-
},
|
|
46
|
-
sortable: false,
|
|
47
|
-
resizable: false
|
|
48
|
-
},
|
|
49
|
-
index: {
|
|
50
|
-
renderHeader: function(h, { column }) {
|
|
51
|
-
return column.label || '#';
|
|
52
|
-
},
|
|
53
|
-
renderCell: function(h, { $index, column }) {
|
|
54
|
-
let i = $index + 1;
|
|
55
|
-
const index = column.index;
|
|
56
|
-
|
|
57
|
-
if (typeof index === 'number') {
|
|
58
|
-
i = $index + index;
|
|
59
|
-
} else if (typeof index === 'function') {
|
|
60
|
-
i = index($index);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return <div>{ i }</div>;
|
|
64
|
-
},
|
|
65
|
-
sortable: false
|
|
66
|
-
},
|
|
67
|
-
expand: {
|
|
68
|
-
renderHeader: function(h, { column }) {
|
|
69
|
-
return column.label || '';
|
|
70
|
-
},
|
|
71
|
-
renderCell: function(h, { row, store, isExpanded }) {
|
|
72
|
-
const classes = ['el-table__expand-icon'];
|
|
73
|
-
if (isExpanded) {
|
|
74
|
-
classes.push('el-table__expand-icon--expanded');
|
|
75
|
-
}
|
|
76
|
-
const callback = function(e) {
|
|
77
|
-
e.stopPropagation();
|
|
78
|
-
store.toggleRowExpansion(row);
|
|
79
|
-
};
|
|
80
|
-
return (<div class={ classes }
|
|
81
|
-
on-click={callback}>
|
|
82
|
-
<i class='el-icon el-icon-arrow-right'></i>
|
|
83
|
-
</div>);
|
|
84
|
-
},
|
|
85
|
-
sortable: false,
|
|
86
|
-
resizable: false,
|
|
87
|
-
className: 'el-table__expand-column'
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export function defaultRenderCell(h, { row, column, $index }) {
|
|
92
|
-
const property = column.property;
|
|
93
|
-
const value = property && getPropByPath(row, property).v;
|
|
94
|
-
if (column && column.formatter) {
|
|
95
|
-
return column.formatter(row, column, value, $index);
|
|
96
|
-
}
|
|
97
|
-
return value;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function treeCellPrefix(h, { row, treeNode, store }) {
|
|
101
|
-
if (!treeNode) return null;
|
|
102
|
-
const ele = [];
|
|
103
|
-
const callback = function(e) {
|
|
104
|
-
e.stopPropagation();
|
|
105
|
-
store.loadOrToggle(row);
|
|
106
|
-
};
|
|
107
|
-
if (treeNode.indent) {
|
|
108
|
-
ele.push(<span class="el-table__indent" style={{'padding-left': treeNode.indent + 'px'}}></span>);
|
|
109
|
-
}
|
|
110
|
-
if (typeof treeNode.expanded === 'boolean' && !treeNode.noLazyChildren) {
|
|
111
|
-
const expandClasses = ['el-table__expand-icon', treeNode.expanded ? 'el-table__expand-icon--expanded' : ''];
|
|
112
|
-
let iconClasses = ['el-icon-arrow-right'];
|
|
113
|
-
if (treeNode.loading) {
|
|
114
|
-
iconClasses = ['el-icon-loading'];
|
|
115
|
-
}
|
|
116
|
-
ele.push(<div class={ expandClasses }
|
|
117
|
-
on-click={ callback }>
|
|
118
|
-
<i class={ iconClasses }></i>
|
|
119
|
-
</div>);
|
|
120
|
-
} else {
|
|
121
|
-
ele.push(<span class="el-table__placeholder"></span>);
|
|
122
|
-
}
|
|
123
|
-
return ele;
|
|
124
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
var dropdowns = [];
|
|
3
|
-
|
|
4
|
-
!Vue.prototype.$isServer && document.addEventListener('click', function(event) {
|
|
5
|
-
dropdowns.forEach(function(dropdown) {
|
|
6
|
-
var target = event.target;
|
|
7
|
-
if (!dropdown || !dropdown.$el) return;
|
|
8
|
-
if (target === dropdown.$el || dropdown.$el.contains(target)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
dropdown.handleOutsideClick && dropdown.handleOutsideClick(event);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
open(instance) {
|
|
17
|
-
if (instance) {
|
|
18
|
-
dropdowns.push(instance);
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
close(instance) {
|
|
23
|
-
var index = dropdowns.indexOf(instance);
|
|
24
|
-
if (index !== -1) {
|
|
25
|
-
dropdowns.splice(instance, 1);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|