easy-component-ui 2.1.1 → 3.0.1
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 +21 -21
- package/README.md +162 -90
- package/dist/assets/icon.css +1 -0
- package/dist/components/Base.js +872 -0
- package/dist/components/ea-alert.js +196 -0
- package/dist/components/ea-avatar.js +159 -0
- package/dist/components/ea-backtop.js +136 -0
- package/dist/components/ea-badge.js +144 -0
- package/dist/components/ea-breadcrumb.js +148 -0
- package/dist/components/ea-button.js +261 -0
- package/dist/components/ea-calendar.js +10 -0
- package/dist/components/ea-calendar2.js +673 -0
- package/dist/components/ea-card.js +85 -0
- package/dist/components/ea-carousel.js +374 -0
- package/dist/components/ea-checkbox.js +446 -0
- package/dist/components/ea-collapse.js +293 -0
- package/dist/components/ea-color-picker.js +888 -0
- package/dist/components/ea-container.js +177 -0
- package/dist/components/ea-countdown.js +121 -0
- package/dist/components/ea-date-picker.js +649 -0
- package/dist/components/ea-descriptions.js +411 -0
- package/dist/components/ea-dialog.js +249 -0
- package/dist/components/ea-drawer.js +194 -0
- package/dist/components/ea-dropdown.js +228 -0
- package/dist/components/ea-empty.js +85 -0
- package/dist/components/ea-icon.js +68 -0
- package/dist/components/ea-image-preview.js +488 -0
- package/dist/components/ea-image.js +302 -0
- package/dist/components/ea-infinite-scroll.js +109 -0
- package/dist/components/ea-input-number.js +367 -0
- package/dist/components/ea-input.js +588 -0
- package/dist/components/ea-layout.js +125 -0
- package/dist/components/ea-link.js +95 -0
- package/dist/components/ea-loading.js +151 -0
- package/dist/components/ea-menu.js +417 -0
- package/dist/components/ea-message-box.js +624 -0
- package/dist/components/ea-message.js +251 -0
- package/dist/components/ea-notification.js +331 -0
- package/dist/components/ea-overlay.js +161 -0
- package/dist/components/ea-page-header.js +108 -0
- package/dist/components/ea-pagination.js +480 -0
- package/dist/components/ea-popconfirm.js +220 -0
- package/dist/components/ea-popover.js +123 -0
- package/dist/components/ea-popper.js +203 -0
- package/dist/components/ea-progress.js +269 -0
- package/dist/components/ea-radio.js +364 -0
- package/dist/components/ea-rate.js +241 -0
- package/dist/components/ea-result.js +100 -0
- package/dist/components/ea-scrollbar.js +235 -0
- package/dist/components/ea-segmented.js +215 -0
- package/dist/components/ea-select.js +598 -0
- package/dist/components/ea-skeleton.js +246 -0
- package/dist/components/ea-slider.js +421 -0
- package/dist/components/ea-space.js +109 -0
- package/dist/components/ea-splitter.js +217 -0
- package/dist/components/ea-statistic.js +6 -0
- package/dist/components/ea-statistic2.js +83 -0
- package/dist/components/ea-steps.js +312 -0
- package/dist/components/ea-switch.js +271 -0
- package/dist/components/ea-table.js +1007 -0
- package/dist/components/ea-tabs.js +501 -0
- package/dist/components/ea-tag.js +234 -0
- package/dist/components/ea-text.js +103 -0
- package/dist/components/ea-time-picker.js +514 -0
- package/dist/components/ea-timeline.js +186 -0
- package/dist/components/ea-tooltip.js +121 -0
- package/dist/components/ea-tour.js +544 -0
- package/dist/components/ea-transfer.js +949 -0
- package/dist/components/ea-tree.js +1088 -0
- package/dist/components/index.js +61 -0
- package/dist/core/FormBase.js +238 -0
- package/dist/css/ea-alert.style.js +4 -0
- package/dist/css/ea-aside.style.js +4 -0
- package/dist/css/ea-avatar.style.js +4 -0
- package/dist/css/ea-backtop.style.js +4 -0
- package/dist/css/ea-badge.style.js +4 -0
- package/dist/css/ea-breadcrumb-item.style.js +4 -0
- package/dist/css/ea-breadcrumb.style.js +4 -0
- package/dist/css/ea-button-group.style.js +4 -0
- package/dist/css/ea-button.style.js +4 -0
- package/dist/css/ea-calendar.style.js +4 -0
- package/dist/css/ea-card.style.js +4 -0
- package/dist/css/ea-carousel-item.style.js +4 -0
- package/dist/css/ea-carousel.style.js +4 -0
- package/dist/css/ea-check-tag.style.js +4 -0
- package/dist/css/ea-checkbox-group.style.js +4 -0
- package/dist/css/ea-checkbox.style.js +4 -0
- package/dist/css/ea-col.style.js +4 -0
- package/dist/css/ea-collapse-item.style.js +4 -0
- package/dist/css/ea-collapse.style.js +4 -0
- package/dist/css/ea-color-picker-panel.style.js +4 -0
- package/dist/css/ea-color-picker.style.js +4 -0
- package/dist/css/ea-container.style.js +4 -0
- package/dist/css/ea-date-picker.style.js +4 -0
- package/dist/css/ea-descriptions-item.style.js +4 -0
- package/dist/css/ea-descriptions.style.js +4 -0
- package/dist/css/ea-dialog.style.js +4 -0
- package/dist/css/ea-drawer.style.js +4 -0
- package/dist/css/ea-dropdown-item.style.js +4 -0
- package/dist/css/ea-dropdown-menu.style.js +4 -0
- package/dist/css/ea-dropdown.style.js +4 -0
- package/dist/css/ea-empty.style.js +4 -0
- package/dist/css/ea-footer.style.js +4 -0
- package/dist/css/ea-header.style.js +4 -0
- package/dist/css/ea-icon.style.js +4 -0
- package/dist/css/ea-image-preview.style.js +4 -0
- package/dist/css/ea-image.style.js +4 -0
- package/dist/css/ea-infinite-scroll.style.js +4 -0
- package/dist/css/ea-input-number.style.js +4 -0
- package/dist/css/ea-input.style.js +4 -0
- package/dist/css/ea-link.style.js +4 -0
- package/dist/css/ea-main.style.js +4 -0
- package/dist/css/ea-menu-item-group.style.js +4 -0
- package/dist/css/ea-menu-item.style.js +4 -0
- package/dist/css/ea-menu.style.js +4 -0
- package/dist/css/ea-message-box.style.js +4 -0
- package/dist/css/ea-message.style.js +4 -0
- package/dist/css/ea-notification.style.js +4 -0
- package/dist/css/ea-option-gropu.style.js +4 -0
- package/dist/css/ea-option.style.js +4 -0
- package/dist/css/ea-overlay.style.js +4 -0
- package/dist/css/ea-page-header.style.js +4 -0
- package/dist/css/ea-pagination.style.js +4 -0
- package/dist/css/ea-popconfirm.style.js +4 -0
- package/dist/css/ea-popover.style.js +4 -0
- package/dist/css/ea-popper.style.js +4 -0
- package/dist/css/ea-progress.style.js +4 -0
- package/dist/css/ea-radio-group.style.js +4 -0
- package/dist/css/ea-radio.style.js +4 -0
- package/dist/css/ea-rate.style.js +4 -0
- package/dist/css/ea-result.style.js +4 -0
- package/dist/css/ea-row.style.js +4 -0
- package/dist/css/ea-scrollbar.style.js +4 -0
- package/dist/css/ea-segmented.style.js +4 -0
- package/dist/css/ea-select.style.js +4 -0
- package/dist/css/ea-skeleton-item.style.js +4 -0
- package/dist/css/ea-skeleton.style.js +4 -0
- package/dist/css/ea-slider.style.js +4 -0
- package/dist/css/ea-space.style.js +4 -0
- package/dist/css/ea-splitter-bar.style.js +4 -0
- package/dist/css/ea-splitter-panel.style.js +4 -0
- package/dist/css/ea-splitter.style.js +4 -0
- package/dist/css/ea-statistic.style.js +4 -0
- package/dist/css/ea-step.style.js +4 -0
- package/dist/css/ea-steps.style.js +4 -0
- package/dist/css/ea-sub-menu.style.js +4 -0
- package/dist/css/ea-switch.style.js +4 -0
- package/dist/css/ea-tab-panel.style.js +4 -0
- package/dist/css/ea-tab.style.js +4 -0
- package/dist/css/ea-table.style.js +4 -0
- package/dist/css/ea-tabs.style.js +4 -0
- package/dist/css/ea-tag.style.js +4 -0
- package/dist/css/ea-text.style.js +4 -0
- package/dist/css/ea-time-picker.style.js +4 -0
- package/dist/css/ea-timeline-item.style.js +4 -0
- package/dist/css/ea-timeline.style.js +4 -0
- package/dist/css/ea-tooltip.style.js +4 -0
- package/dist/css/ea-tour-step.style.js +4 -0
- package/dist/css/ea-tour.style.js +4 -0
- package/dist/css/ea-transfer.style.js +5 -0
- package/dist/css/ea-tree.style.js +6 -0
- package/dist/css/ea-ui-component.style.js +4 -0
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +439 -0
- package/dist/utils/I18nManager.js +218 -0
- package/dist/utils/Utils.js +65 -0
- package/dist/utils/Variables.js +19 -0
- package/dist/utils/timeout.js +9 -0
- package/package.json +301 -12
- package/build/components/Base.js +0 -1
- package/build/components/ea-alert/index.js +0 -1
- package/build/components/ea-alert/src/style/stylesheet.js +0 -1
- package/build/components/ea-aside/index.js +0 -1
- package/build/components/ea-avatar/index.js +0 -1
- package/build/components/ea-avatar/src/assets/defaultAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/errorAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -1
- package/build/components/ea-avatar/src/style/stylesheet.js +0 -1
- package/build/components/ea-backtop/index.js +0 -1
- package/build/components/ea-backtop/src/style/stylesheet.js +0 -1
- package/build/components/ea-badge/index.js +0 -1
- package/build/components/ea-badge/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb/index.js +0 -1
- package/build/components/ea-breadcrumb/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb-item/index.js +0 -1
- package/build/components/ea-breadcrumb-item/src/style/style.js +0 -1
- package/build/components/ea-button/index.js +0 -1
- package/build/components/ea-button/src/components/ButtonComm.js +0 -1
- package/build/components/ea-button/src/components/HrefComm.js +0 -1
- package/build/components/ea-button/src/style/stylesheet.js +0 -1
- package/build/components/ea-button-group/index.js +0 -1
- package/build/components/ea-button-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/index.js +0 -1
- package/build/components/ea-calendar/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/src/utils/createChangerElement.js +0 -1
- package/build/components/ea-calendar/src/utils/createThead.js +0 -1
- package/build/components/ea-calendar/src/utils/getDate.js +0 -1
- package/build/components/ea-calendar/src/utils/getUserWeekStart.js +0 -1
- package/build/components/ea-card/index.js +0 -1
- package/build/components/ea-card/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/index.js +0 -1
- package/build/components/ea-carousel/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -1
- package/build/components/ea-carousel-item/index.js +0 -1
- package/build/components/ea-carousel-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox/index.js +0 -1
- package/build/components/ea-checkbox/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox-group/index.js +0 -1
- package/build/components/ea-checkbox-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-collapse/index.js +0 -1
- package/build/components/ea-collapse-item/index.js +0 -1
- package/build/components/ea-collapse-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-container/index.js +0 -1
- package/build/components/ea-date-picker/index.js +0 -1
- package/build/components/ea-date-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions/index.js +0 -1
- package/build/components/ea-descriptions/src/components/contentTemplate.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -1
- package/build/components/ea-descriptions/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions-item/index.js +0 -1
- package/build/components/ea-descriptions-item/src/stylesheet.js +0 -1
- package/build/components/ea-drawer/index.js +0 -1
- package/build/components/ea-drawer/src/style/stylesheet.js +0 -1
- package/build/components/ea-empty/index.js +0 -1
- package/build/components/ea-empty/src/assets/emptyStatusSVG.js +0 -1
- package/build/components/ea-empty/src/style/stylesheet.js +0 -1
- package/build/components/ea-footer/index.js +0 -1
- package/build/components/ea-form/index.js +0 -1
- package/build/components/ea-form-item/index.js +0 -1
- package/build/components/ea-form-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-header/index.js +0 -1
- package/build/components/ea-icon/config.json +0 -1030
- package/build/components/ea-icon/css/fontello.css +0 -312
- package/build/components/ea-icon/font/fontello.eot +0 -0
- package/build/components/ea-icon/font/fontello.svg +0 -350
- package/build/components/ea-icon/font/fontello.ttf +0 -0
- package/build/components/ea-icon/font/fontello.woff +0 -0
- package/build/components/ea-icon/font/fontello.woff2 +0 -0
- package/build/components/ea-icon/index.css +0 -1
- package/build/components/ea-icon/index.js +0 -1
- package/build/components/ea-image/index.js +0 -1
- package/build/components/ea-image/src/assets/errorImage.js +0 -1
- package/build/components/ea-image/src/style/stylesheet.js +0 -1
- package/build/components/ea-image/src/utils/createPreviewTools.js +0 -1
- package/build/components/ea-infinite-scroll/index.js +0 -1
- package/build/components/ea-infinite-scroll-item/index.js +0 -1
- package/build/components/ea-input/index.js +0 -1
- package/build/components/ea-input/src/components/createFixIcon.js +0 -1
- package/build/components/ea-input/src/components/createSuggestionBoard.js +0 -1
- package/build/components/ea-input/src/components/createWordLimitElement.js +0 -1
- package/build/components/ea-input/src/style/stylesheet.js +0 -1
- package/build/components/ea-input/src/utils/dispatchEvent.js +0 -1
- package/build/components/ea-input/src/utils/handleSearchResult.js +0 -1
- package/build/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -1
- package/build/components/ea-input-number/index.js +0 -1
- package/build/components/ea-input-number/src/style/stylesheet.js +0 -1
- package/build/components/ea-input-number/src/utils/handleCustomEvent.js +0 -1
- package/build/components/ea-link/index.js +0 -1
- package/build/components/ea-link/src/style/stylesheet.js +0 -1
- package/build/components/ea-loading/index.js +0 -1
- package/build/components/ea-loading/src/style/stylesheet.js +0 -1
- package/build/components/ea-main/index.js +0 -1
- package/build/components/ea-menu/index.js +0 -1
- package/build/components/ea-menu/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -1
- package/build/components/ea-menu-item/index.js +0 -1
- package/build/components/ea-menu-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu-item-group/index.js +0 -1
- package/build/components/ea-menu-item-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/index.js +0 -1
- package/build/components/ea-message/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/src/utils/MessageClass.js +0 -1
- package/build/components/ea-message-box/index.js +0 -1
- package/build/components/ea-message-box/src/style/stylesheet.js +0 -1
- package/build/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -1
- package/build/components/ea-option/index.js +0 -1
- package/build/components/ea-option/src/style/stylesheet.js +0 -1
- package/build/components/ea-option-gropu/index.js +0 -1
- package/build/components/ea-page-header/index.js +0 -1
- package/build/components/ea-page-header/src/style/stylesheet.js +0 -1
- package/build/components/ea-pagination/index.js +0 -1
- package/build/components/ea-pagination/src/components/getMoreItem.js +0 -1
- package/build/components/ea-pagination/src/components/getPageItem.js +0 -1
- package/build/components/ea-pagination/src/components/getShowTotalItem.js +0 -1
- package/build/components/ea-pagination/src/style/stylesheet.js +0 -1
- package/build/components/ea-pane/index.js +0 -1
- package/build/components/ea-pane/src/stylesheet.js +0 -1
- package/build/components/ea-progress/index.js +0 -1
- package/build/components/ea-progress/src/components/SVGComm.js +0 -1
- package/build/components/ea-progress/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio/index.js +0 -1
- package/build/components/ea-radio/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio-group/index.js +0 -1
- package/build/components/ea-rate/index.js +0 -1
- package/build/components/ea-rate/src/components/rateComm.js +0 -1
- package/build/components/ea-rate/src/style/stylesheet.js +0 -1
- package/build/components/ea-result/index.js +0 -1
- package/build/components/ea-result/src/style/stylesheet.js +0 -1
- package/build/components/ea-select/index.js +0 -1
- package/build/components/ea-select/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/index.js +0 -1
- package/build/components/ea-skeleton/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -1
- package/build/components/ea-skeleton-item/index.js +0 -1
- package/build/components/ea-skeleton-item/src/assets/imageSVG.js +0 -1
- package/build/components/ea-skeleton-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-step/index.js +0 -1
- package/build/components/ea-step/src/style/stylesheet.js +0 -1
- package/build/components/ea-steps/index.js +0 -1
- package/build/components/ea-steps/src/style/stylesheet.js +0 -1
- package/build/components/ea-submenu/index.js +0 -1
- package/build/components/ea-submenu/src/style/stylesheet.js +0 -1
- package/build/components/ea-switch/index.js +0 -1
- package/build/components/ea-switch/src/style/stylesheet.js +0 -1
- package/build/components/ea-tab/index.js +0 -1
- package/build/components/ea-tab/src/style/stylesheet.js +0 -1
- package/build/components/ea-table/index.js +0 -1
- package/build/components/ea-table/src/style/stylesheet.js +0 -1
- package/build/components/ea-table-column/index.js +0 -1
- package/build/components/ea-tabs/index.js +0 -1
- package/build/components/ea-tabs/src/style/stylesheet.js +0 -1
- package/build/components/ea-tag/index.js +0 -1
- package/build/components/ea-tag/src/style/stylesheet.js +0 -1
- package/build/components/ea-textarea/index.js +0 -1
- package/build/components/ea-textarea/src/style/stylesheet.js +0 -1
- package/build/components/ea-time-picker/index.js +0 -1
- package/build/components/ea-time-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-timeline/index.js +0 -1
- package/build/components/ea-timeline/style/stylesheet.js +0 -1
- package/build/components/ea-timeline-item/index.js +0 -1
- package/build/components/ea-timeline-item/src/style/stylesheet.js +0 -1
- package/build/components/globalConfig.js +0 -1
- package/build/components/index.js +0 -1
- package/build/utils/Validator.js +0 -1
- package/build/utils/createElement.js +0 -1
- package/build/utils/handleDefaultAttrIsTrue.js +0 -1
- package/build/utils/handleTemplate.js +0 -1
- package/build/utils/setStyle.js +0 -1
- package/build/utils/timeout.js +0 -1
- package/components/Base.js +0 -75
- package/components/ea-alert/index.css +0 -91
- package/components/ea-alert/index.js +0 -210
- package/components/ea-alert/index.scss +0 -108
- package/components/ea-alert/src/style/stylesheet.js +0 -85
- package/components/ea-aside/index.css +0 -9
- package/components/ea-aside/index.js +0 -54
- package/components/ea-aside/index.scss +0 -12
- package/components/ea-avatar/index.css +0 -66
- package/components/ea-avatar/index.js +0 -156
- package/components/ea-avatar/index.scss +0 -59
- package/components/ea-avatar/src/assets/defaultAvatar.js +0 -12
- package/components/ea-avatar/src/assets/errorAvatar.js +0 -9
- package/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -18
- package/components/ea-avatar/src/style/stylesheet.js +0 -61
- package/components/ea-backtop/index.css +0 -27
- package/components/ea-backtop/index.js +0 -167
- package/components/ea-backtop/index.scss +0 -29
- package/components/ea-backtop/src/style/stylesheet.js +0 -21
- package/components/ea-badge/index.css +0 -49
- package/components/ea-badge/index.js +0 -103
- package/components/ea-badge/index.scss +0 -56
- package/components/ea-badge/src/style/stylesheet.js +0 -43
- package/components/ea-breadcrumb/index.css +0 -6
- package/components/ea-breadcrumb/index.js +0 -90
- package/components/ea-breadcrumb/index.scss +0 -7
- package/components/ea-breadcrumb/src/style/stylesheet.js +0 -8
- package/components/ea-breadcrumb-item/index.css +0 -10
- package/components/ea-breadcrumb-item/index.js +0 -23
- package/components/ea-breadcrumb-item/index.scss +0 -12
- package/components/ea-breadcrumb-item/src/style/style.js +0 -12
- package/components/ea-button/index.css +0 -206
- package/components/ea-button/index.js +0 -198
- package/components/ea-button/index.scss +0 -143
- package/components/ea-button/src/components/ButtonComm.js +0 -5
- package/components/ea-button/src/components/HrefComm.js +0 -5
- package/components/ea-button/src/style/stylesheet.js +0 -208
- package/components/ea-button-group/index.css +0 -16
- package/components/ea-button-group/index.js +0 -44
- package/components/ea-button-group/index.scss +0 -20
- package/components/ea-button-group/src/style/stylesheet.js +0 -18
- package/components/ea-calendar/index.css +0 -72
- package/components/ea-calendar/index.js +0 -298
- package/components/ea-calendar/index.scss +0 -106
- package/components/ea-calendar/src/style/stylesheet.js +0 -74
- package/components/ea-calendar/src/utils/createChangerElement.js +0 -10
- package/components/ea-calendar/src/utils/createThead.js +0 -18
- package/components/ea-calendar/src/utils/getDate.js +0 -11
- package/components/ea-calendar/src/utils/getUserWeekStart.js +0 -11
- package/components/ea-card/index.css +0 -25
- package/components/ea-card/index.js +0 -51
- package/components/ea-card/index.scss +0 -24
- package/components/ea-card/src/style/stylesheet.js +0 -19
- package/components/ea-carousel/index.css +0 -103
- package/components/ea-carousel/index.js +0 -222
- package/components/ea-carousel/index.scss +0 -140
- package/components/ea-carousel/src/style/stylesheet.js +0 -105
- package/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -9
- package/components/ea-carousel-item/index.css +0 -20
- package/components/ea-carousel-item/index.js +0 -23
- package/components/ea-carousel-item/index.scss +0 -26
- package/components/ea-carousel-item/src/style/stylesheet.js +0 -22
- package/components/ea-checkbox/index.css +0 -108
- package/components/ea-checkbox/index.js +0 -160
- package/components/ea-checkbox/index.scss +0 -141
- package/components/ea-checkbox/src/style/stylesheet.js +0 -110
- package/components/ea-checkbox-group/index.css +0 -6
- package/components/ea-checkbox-group/index.js +0 -120
- package/components/ea-checkbox-group/index.scss +0 -7
- package/components/ea-checkbox-group/src/style/stylesheet.js +0 -8
- package/components/ea-collapse/index.css +0 -0
- package/components/ea-collapse/index.js +0 -109
- package/components/ea-collapse/index.scss +0 -4
- package/components/ea-collapse-item/index.css +0 -31
- package/components/ea-collapse-item/index.js +0 -111
- package/components/ea-collapse-item/index.scss +0 -46
- package/components/ea-collapse-item/src/style/stylesheet.js +0 -33
- package/components/ea-container/index.css +0 -14
- package/components/ea-container/index.js +0 -85
- package/components/ea-container/index.scss +0 -18
- package/components/ea-date-picker/index.css +0 -17
- package/components/ea-date-picker/index.js +0 -191
- package/components/ea-date-picker/index.scss +0 -29
- package/components/ea-date-picker/src/style/stylesheet.js +0 -19
- package/components/ea-descriptions/index.css +0 -33
- package/components/ea-descriptions/index.js +0 -171
- package/components/ea-descriptions/index.scss +0 -45
- package/components/ea-descriptions/src/components/contentTemplate.js +0 -11
- package/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -6
- package/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -8
- package/components/ea-descriptions/src/style/stylesheet.js +0 -35
- package/components/ea-descriptions-item/index.css +0 -21
- package/components/ea-descriptions-item/index.js +0 -71
- package/components/ea-descriptions-item/index.scss +0 -29
- package/components/ea-descriptions-item/src/stylesheet.js +0 -23
- package/components/ea-drawer/index.css +0 -138
- package/components/ea-drawer/index.js +0 -251
- package/components/ea-drawer/index.scss +0 -208
- package/components/ea-drawer/src/style/stylesheet.js +0 -141
- package/components/ea-empty/index.css +0 -30
- package/components/ea-empty/index.js +0 -93
- package/components/ea-empty/index.scss +0 -30
- package/components/ea-empty/src/assets/emptyStatusSVG.js +0 -6
- package/components/ea-empty/src/style/stylesheet.js +0 -24
- package/components/ea-footer/index.css +0 -7
- package/components/ea-footer/index.js +0 -57
- package/components/ea-footer/index.scss +0 -10
- package/components/ea-form/index.css +0 -0
- package/components/ea-form/index.js +0 -121
- package/components/ea-form/index.scss +0 -0
- package/components/ea-form-item/index.css +0 -62
- package/components/ea-form-item/index.js +0 -152
- package/components/ea-form-item/index.scss +0 -83
- package/components/ea-form-item/src/style/stylesheet.js +0 -64
- package/components/ea-header/index.css +0 -7
- package/components/ea-header/index.js +0 -55
- package/components/ea-header/index.scss +0 -10
- package/components/ea-icon/config.json +0 -1030
- package/components/ea-icon/css/fontello.css +0 -312
- package/components/ea-icon/font/fontello.eot +0 -0
- package/components/ea-icon/font/fontello.svg +0 -350
- package/components/ea-icon/font/fontello.ttf +0 -0
- package/components/ea-icon/font/fontello.woff +0 -0
- package/components/ea-icon/font/fontello.woff2 +0 -0
- package/components/ea-icon/index.css +0 -1
- package/components/ea-icon/index.js +0 -84
- package/components/ea-image/index.css +0 -84
- package/components/ea-image/index.js +0 -182
- package/components/ea-image/index.scss +0 -111
- package/components/ea-image/src/assets/errorImage.js +0 -9
- package/components/ea-image/src/assets/errorImage.svg +0 -7
- package/components/ea-image/src/style/stylesheet.js +0 -86
- package/components/ea-image/src/utils/createPreviewTools.js +0 -140
- package/components/ea-infinite-scroll/index.css +0 -0
- package/components/ea-infinite-scroll/index.js +0 -119
- package/components/ea-infinite-scroll/index.scss +0 -0
- package/components/ea-infinite-scroll-item/index.css +0 -0
- package/components/ea-infinite-scroll-item/index.js +0 -18
- package/components/ea-infinite-scroll-item/index.scss +0 -0
- package/components/ea-input/index.css +0 -139
- package/components/ea-input/index.js +0 -398
- package/components/ea-input/index.scss +0 -178
- package/components/ea-input/src/components/createFixIcon.js +0 -108
- package/components/ea-input/src/components/createSuggestionBoard.js +0 -43
- package/components/ea-input/src/components/createWordLimitElement.js +0 -18
- package/components/ea-input/src/style/stylesheet.js +0 -141
- package/components/ea-input/src/utils/dispatchEvent.js +0 -9
- package/components/ea-input/src/utils/handleSearchResult.js +0 -9
- package/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -31
- package/components/ea-input-number/index.css +0 -120
- package/components/ea-input-number/index.js +0 -308
- package/components/ea-input-number/index.scss +0 -132
- package/components/ea-input-number/src/style/stylesheet.js +0 -122
- package/components/ea-input-number/src/utils/handleCustomEvent.js +0 -5
- package/components/ea-link/index.css +0 -48
- package/components/ea-link/index.js +0 -122
- package/components/ea-link/index.scss +0 -36
- package/components/ea-link/src/style/stylesheet.js +0 -50
- package/components/ea-loading/index.css +0 -38
- package/components/ea-loading/index.js +0 -166
- package/components/ea-loading/index.scss +0 -55
- package/components/ea-loading/src/style/stylesheet.js +0 -40
- package/components/ea-main/index.css +0 -8
- package/components/ea-main/index.js +0 -32
- package/components/ea-main/index.scss +0 -11
- package/components/ea-menu/index.css +0 -19
- package/components/ea-menu/index.js +0 -131
- package/components/ea-menu/index.scss +0 -22
- package/components/ea-menu/src/style/stylesheet.js +0 -21
- package/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -32
- package/components/ea-menu-item/index.css +0 -48
- package/components/ea-menu-item/index.js +0 -130
- package/components/ea-menu-item/index.scss +0 -62
- package/components/ea-menu-item/src/style/stylesheet.js +0 -50
- package/components/ea-menu-item-group/index.css +0 -42
- package/components/ea-menu-item-group/index.js +0 -130
- package/components/ea-menu-item-group/index.scss +0 -60
- package/components/ea-menu-item-group/src/style/stylesheet.js +0 -44
- package/components/ea-message/index.css +0 -47
- package/components/ea-message/index.js +0 -171
- package/components/ea-message/index.scss +0 -70
- package/components/ea-message/src/style/stylesheet.js +0 -48
- package/components/ea-message/src/utils/MessageClass.js +0 -67
- package/components/ea-message-box/index.css +0 -85
- package/components/ea-message-box/index.js +0 -211
- package/components/ea-message-box/index.scss +0 -113
- package/components/ea-message-box/src/style/stylesheet.js +0 -87
- package/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -60
- package/components/ea-option/index.css +0 -24
- package/components/ea-option/index.js +0 -74
- package/components/ea-option/index.scss +0 -31
- package/components/ea-option/src/style/stylesheet.js +0 -26
- package/components/ea-option-gropu/index.css +0 -6
- package/components/ea-option-gropu/index.js +0 -57
- package/components/ea-option-gropu/index.scss +0 -8
- package/components/ea-page-header/index.css +0 -33
- package/components/ea-page-header/index.js +0 -91
- package/components/ea-page-header/index.scss +0 -44
- package/components/ea-page-header/src/style/stylesheet.js +0 -35
- package/components/ea-pagination/index.css +0 -69
- package/components/ea-pagination/index.js +0 -305
- package/components/ea-pagination/index.scss +0 -89
- package/components/ea-pagination/src/components/getMoreItem.js +0 -20
- package/components/ea-pagination/src/components/getPageItem.js +0 -11
- package/components/ea-pagination/src/components/getShowTotalItem.js +0 -7
- package/components/ea-pagination/src/style/stylesheet.js +0 -71
- package/components/ea-pane/index.css +0 -6
- package/components/ea-pane/index.js +0 -52
- package/components/ea-pane/index.scss +0 -7
- package/components/ea-pane/src/stylesheet.js +0 -8
- package/components/ea-progress/index.css +0 -61
- package/components/ea-progress/index.js +0 -249
- package/components/ea-progress/index.scss +0 -74
- package/components/ea-progress/src/components/SVGComm.js +0 -18
- package/components/ea-progress/src/style/stylesheet.js +0 -55
- package/components/ea-radio/index.css +0 -82
- package/components/ea-radio/index.js +0 -137
- package/components/ea-radio/index.scss +0 -119
- package/components/ea-radio/src/style/stylesheet.js +0 -84
- package/components/ea-radio-group/index.css +0 -3
- package/components/ea-radio-group/index.js +0 -96
- package/components/ea-radio-group/index.scss +0 -3
- package/components/ea-rate/index.css +0 -44
- package/components/ea-rate/index.js +0 -243
- package/components/ea-rate/index.scss +0 -55
- package/components/ea-rate/src/components/rateComm.js +0 -20
- package/components/ea-rate/src/style/stylesheet.js +0 -45
- package/components/ea-result/index.css +0 -37
- package/components/ea-result/index.js +0 -109
- package/components/ea-result/index.scss +0 -46
- package/components/ea-result/src/style/stylesheet.js +0 -39
- package/components/ea-select/index.css +0 -47
- package/components/ea-select/index.js +0 -312
- package/components/ea-select/index.scss +0 -70
- package/components/ea-select/src/style/stylesheet.js +0 -49
- package/components/ea-skeleton/index.css +0 -12
- package/components/ea-skeleton/index.js +0 -148
- package/components/ea-skeleton/index.scss +0 -16
- package/components/ea-skeleton/src/style/stylesheet.js +0 -14
- package/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -7
- package/components/ea-skeleton-item/index.css +0 -69
- package/components/ea-skeleton-item/index.js +0 -82
- package/components/ea-skeleton-item/index.scss +0 -107
- package/components/ea-skeleton-item/src/assets/imageSVG.js +0 -8
- package/components/ea-skeleton-item/src/style/stylesheet.js +0 -71
- package/components/ea-step/index.css +0 -84
- package/components/ea-step/index.js +0 -230
- package/components/ea-step/index.scss +0 -110
- package/components/ea-step/src/style/stylesheet.js +0 -86
- package/components/ea-steps/index.css +0 -19
- package/components/ea-steps/index.js +0 -104
- package/components/ea-steps/index.scss +0 -23
- package/components/ea-steps/src/style/stylesheet.js +0 -21
- package/components/ea-submenu/index.css +0 -65
- package/components/ea-submenu/index.js +0 -141
- package/components/ea-submenu/index.scss +0 -88
- package/components/ea-submenu/src/style/stylesheet.js +0 -67
- package/components/ea-switch/index.css +0 -90
- package/components/ea-switch/index.js +0 -189
- package/components/ea-switch/index.scss +0 -117
- package/components/ea-switch/src/style/stylesheet.js +0 -92
- package/components/ea-tab/index.css +0 -68
- package/components/ea-tab/index.js +0 -138
- package/components/ea-tab/index.scss +0 -96
- package/components/ea-tab/src/style/stylesheet.js +0 -70
- package/components/ea-table/index.css +0 -98
- package/components/ea-table/index.js +0 -555
- package/components/ea-table/index.scss +0 -90
- package/components/ea-table/src/style/stylesheet.js +0 -100
- package/components/ea-table-column/index.css +0 -0
- package/components/ea-table-column/index.js +0 -164
- package/components/ea-table-column/index.scss +0 -0
- package/components/ea-tabs/index.css +0 -45
- package/components/ea-tabs/index.js +0 -245
- package/components/ea-tabs/index.scss +0 -64
- package/components/ea-tabs/src/style/stylesheet.js +0 -47
- package/components/ea-tag/index.css +0 -90
- package/components/ea-tag/index.js +0 -107
- package/components/ea-tag/index.scss +0 -71
- package/components/ea-tag/src/style/stylesheet.js +0 -92
- package/components/ea-textarea/index.css +0 -37
- package/components/ea-textarea/index.js +0 -277
- package/components/ea-textarea/index.scss +0 -48
- package/components/ea-textarea/src/style/stylesheet.js +0 -39
- package/components/ea-time-picker/index.css +0 -82
- package/components/ea-time-picker/index.js +0 -379
- package/components/ea-time-picker/index.scss +0 -110
- package/components/ea-time-picker/src/style/stylesheet.js +0 -84
- package/components/ea-timeline/index.css +0 -0
- package/components/ea-timeline/index.js +0 -74
- package/components/ea-timeline/index.scss +0 -1
- package/components/ea-timeline/style/stylesheet.js +0 -3
- package/components/ea-timeline-item/index.css +0 -79
- package/components/ea-timeline-item/index.js +0 -146
- package/components/ea-timeline-item/index.scss +0 -92
- package/components/ea-timeline-item/src/style/stylesheet.js +0 -81
- package/components/ea-ui-base-style.css +0 -0
- package/components/ea-ui-base-style.scss +0 -153
- package/components/globalConfig.js +0 -10
- package/components/index.js +0 -67
- package/public/logo.png +0 -0
- package/utils/Validator.js +0 -16
- package/utils/createElement.js +0 -30
- package/utils/handleDefaultAttrIsTrue.js +0 -11
- package/utils/handleTemplate.js +0 -19
- package/utils/setStyle.js +0 -8
- package/utils/timeout.js +0 -16
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@import "../ea-ui-base-style.scss";
|
|
2
|
-
|
|
3
|
-
.ea-textarea_wrap {
|
|
4
|
-
position: relative;
|
|
5
|
-
width: 100%;
|
|
6
|
-
|
|
7
|
-
.ea-textarea_inner {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
box-shadow: none;
|
|
10
|
-
resize: vertical;
|
|
11
|
-
min-height: 1.75rem;
|
|
12
|
-
|
|
13
|
-
border: 1px solid $color-border;
|
|
14
|
-
outline: 0;
|
|
15
|
-
transition: border 0.2s;
|
|
16
|
-
border-radius: 3px;
|
|
17
|
-
|
|
18
|
-
padding: 0.5rem;
|
|
19
|
-
|
|
20
|
-
line-height: 0.8;
|
|
21
|
-
font-size: 0.8rem;
|
|
22
|
-
scrollbar-width: none;
|
|
23
|
-
|
|
24
|
-
&:focus {
|
|
25
|
-
border-color: $color-primary-border;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&::placeholder {
|
|
29
|
-
color: $color-disabled-text;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:disabled {
|
|
33
|
-
background-color: $color-disabled-btn-bgc;
|
|
34
|
-
color: $color-disabled-text;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&:invalid {
|
|
38
|
-
border-color: $color-danger-border;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ea-input_word-limit {
|
|
43
|
-
position: absolute;
|
|
44
|
-
font-size: 0.75rem;
|
|
45
|
-
bottom: 0.5rem;
|
|
46
|
-
right: 0.5rem;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export const stylesheet = `
|
|
2
|
-
.ea-textarea_wrap {
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
.ea-textarea_wrap .ea-textarea_inner {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
box-shadow: none;
|
|
9
|
-
resize: vertical;
|
|
10
|
-
min-height: 1.75rem;
|
|
11
|
-
border: 1px solid #dcdfe6;
|
|
12
|
-
outline: 0;
|
|
13
|
-
transition: border 0.2s;
|
|
14
|
-
border-radius: 3px;
|
|
15
|
-
padding: 0.5rem;
|
|
16
|
-
line-height: 0.8;
|
|
17
|
-
font-size: 0.8rem;
|
|
18
|
-
scrollbar-width: none;
|
|
19
|
-
}
|
|
20
|
-
.ea-textarea_wrap .ea-textarea_inner:focus {
|
|
21
|
-
border-color: #409eff;
|
|
22
|
-
}
|
|
23
|
-
.ea-textarea_wrap .ea-textarea_inner::placeholder {
|
|
24
|
-
color: #c0c4cc;
|
|
25
|
-
}
|
|
26
|
-
.ea-textarea_wrap .ea-textarea_inner:disabled {
|
|
27
|
-
background-color: #eeeeee;
|
|
28
|
-
color: #c0c4cc;
|
|
29
|
-
}
|
|
30
|
-
.ea-textarea_wrap .ea-textarea_inner:invalid {
|
|
31
|
-
border-color: #f56c6c;
|
|
32
|
-
}
|
|
33
|
-
.ea-textarea_wrap .ea-input_word-limit {
|
|
34
|
-
position: absolute;
|
|
35
|
-
font-size: 0.75rem;
|
|
36
|
-
bottom: 0.5rem;
|
|
37
|
-
right: 0.5rem;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
.ea-time-picker_wrap {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap {
|
|
5
|
-
position: absolute;
|
|
6
|
-
bottom: -12px;
|
|
7
|
-
left: 0;
|
|
8
|
-
transform-origin: center top;
|
|
9
|
-
transform: translateY(100%) scaleY(0);
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
background-color: #fff;
|
|
12
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
13
|
-
z-index: 2;
|
|
14
|
-
}
|
|
15
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap::before {
|
|
16
|
-
content: "";
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 0;
|
|
19
|
-
left: 0.5rem;
|
|
20
|
-
border: 0.5rem solid transparent;
|
|
21
|
-
border-bottom-color: #fff;
|
|
22
|
-
transform: translateY(-100%);
|
|
23
|
-
}
|
|
24
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap {
|
|
25
|
-
display: flex;
|
|
26
|
-
position: relative;
|
|
27
|
-
margin: 1rem 0;
|
|
28
|
-
}
|
|
29
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap::before, .ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap::after {
|
|
30
|
-
content: "";
|
|
31
|
-
position: absolute;
|
|
32
|
-
left: 0;
|
|
33
|
-
transform: translateY(-50%);
|
|
34
|
-
width: 100%;
|
|
35
|
-
}
|
|
36
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap::before {
|
|
37
|
-
top: calc(50% - 16px);
|
|
38
|
-
border-bottom: 1px solid #e4e7ed;
|
|
39
|
-
}
|
|
40
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap::after {
|
|
41
|
-
top: calc(50% + 16px);
|
|
42
|
-
border-bottom: 1px solid #e4e7ed;
|
|
43
|
-
}
|
|
44
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap .ea-time-picker_dropdown-inner {
|
|
45
|
-
flex: 1;
|
|
46
|
-
max-height: 190px;
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
padding: 5rem 0;
|
|
49
|
-
text-align: center;
|
|
50
|
-
overflow: auto;
|
|
51
|
-
scrollbar-width: none;
|
|
52
|
-
margin-block-start: 0;
|
|
53
|
-
margin-block-end: 0;
|
|
54
|
-
margin-inline-start: 0px;
|
|
55
|
-
margin-inline-end: 0px;
|
|
56
|
-
padding-inline-start: 0px;
|
|
57
|
-
list-style-type: none;
|
|
58
|
-
}
|
|
59
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap .ea-time-picker_dropdown-inner .ea-time-picker_dropdown-item {
|
|
60
|
-
height: 32px;
|
|
61
|
-
line-height: 32px;
|
|
62
|
-
font-size: 12px;
|
|
63
|
-
color: #606266;
|
|
64
|
-
transition: color 0.3s;
|
|
65
|
-
}
|
|
66
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap .ea-time-picker_dropdown-inner .ea-time-picker_dropdown-item.is-active {
|
|
67
|
-
color: #409eff;
|
|
68
|
-
}
|
|
69
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-inner-wrap .ea-time-picker_dropdown-inner .ea-time-picker_dropdown-item.is-disabled {
|
|
70
|
-
color: #c0c4cc;
|
|
71
|
-
}
|
|
72
|
-
.ea-time-picker_wrap .ea-time-picker_dropdown-wrap .ea-time-picker_dropdown-button-group {
|
|
73
|
-
text-align: right;
|
|
74
|
-
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
|
|
75
|
-
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
76
|
-
}
|
|
77
|
-
.ea-time-picker_wrap.is-open .ea-time-picker_dropdown-wrap {
|
|
78
|
-
transform: translateY(100%) scaleY(1);
|
|
79
|
-
}
|
|
80
|
-
.ea-time-picker_wrap.with-transition .ea-time-picker_dropdown-wrap {
|
|
81
|
-
transition: transform 0.3s ease-in-out;
|
|
82
|
-
}
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import Base from '../Base.js';
|
|
3
|
-
import '../ea-icon/index.js'
|
|
4
|
-
|
|
5
|
-
import { createElement } from '../../utils/createElement.js';
|
|
6
|
-
import { timeout } from '../../utils/timeout.js';
|
|
7
|
-
import { stylesheet } from './src/style/stylesheet.js';
|
|
8
|
-
|
|
9
|
-
import "../ea-input/index.js"
|
|
10
|
-
import '../ea-button/index.js'
|
|
11
|
-
|
|
12
|
-
export class EaTimePicker extends Base {
|
|
13
|
-
#container;
|
|
14
|
-
#timePickerInput;
|
|
15
|
-
|
|
16
|
-
#dropdownWrap;
|
|
17
|
-
#timePickerHourWrap;
|
|
18
|
-
#timePickerMinuteWrap;
|
|
19
|
-
#timePickerSecondWrap;
|
|
20
|
-
|
|
21
|
-
#timePickerIsInit = false;
|
|
22
|
-
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
|
|
26
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
27
|
-
|
|
28
|
-
shadowRoot.innerHTML = `
|
|
29
|
-
<div class='ea-time-picker_wrap' part='container'>
|
|
30
|
-
<ea-input part='input' autocomplete="off" readonly prefix-icon="icon-clock"></ea-input>
|
|
31
|
-
<div class="ea-time-picker_dropdown-wrap" part='dropdown-wrap'>
|
|
32
|
-
<div class="ea-time-picker_dropdown-inner-wrap" part='dropdown-inner-wrap'>
|
|
33
|
-
<ul class="ea-time-picker_dropdown-inner ea-time-picker_dropdown-inner-hour" part='dropdown-time'>
|
|
34
|
-
</ul>
|
|
35
|
-
<ul class="ea-time-picker_dropdown-inner ea-time-picker_dropdown-inner-minute" part='dropdown-time'>
|
|
36
|
-
</ul>
|
|
37
|
-
<ul class="ea-time-picker_dropdown-inner ea-time-picker_dropdown-inner-second" part='dropdown-time'>
|
|
38
|
-
</ul>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
this.#container = shadowRoot.querySelector('.ea-time-picker_wrap');
|
|
45
|
-
this.#timePickerInput = shadowRoot.querySelector('ea-input');
|
|
46
|
-
|
|
47
|
-
this.#dropdownWrap = shadowRoot.querySelector('.ea-time-picker_dropdown-wrap');
|
|
48
|
-
this.#timePickerHourWrap = shadowRoot.querySelector('.ea-time-picker_dropdown-inner-hour');
|
|
49
|
-
this.#timePickerMinuteWrap = shadowRoot.querySelector('.ea-time-picker_dropdown-inner-minute');
|
|
50
|
-
this.#timePickerSecondWrap = shadowRoot.querySelector('.ea-time-picker_dropdown-inner-second');
|
|
51
|
-
|
|
52
|
-
this.build(shadowRoot, stylesheet);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// ------- width 宽度 -------
|
|
56
|
-
// #region
|
|
57
|
-
get width() {
|
|
58
|
-
return this.getAttribute('width') || "200px";
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
set width(value) {
|
|
62
|
-
this.setAttribute('width', value);
|
|
63
|
-
|
|
64
|
-
this.#container.style.width = value;
|
|
65
|
-
}
|
|
66
|
-
// #endregion
|
|
67
|
-
// ------- end -------
|
|
68
|
-
|
|
69
|
-
// ------- time 时间 -------
|
|
70
|
-
// #region
|
|
71
|
-
get time() {
|
|
72
|
-
return this.getAttribute('time') || '00:00:00';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
set time(value) {
|
|
76
|
-
this.setAttribute('time', value);
|
|
77
|
-
|
|
78
|
-
const [hour, minute, second] = value.split(':');
|
|
79
|
-
|
|
80
|
-
this.hour = hour;
|
|
81
|
-
this.minute = minute;
|
|
82
|
-
this.second = second;
|
|
83
|
-
}
|
|
84
|
-
// #endregion
|
|
85
|
-
// ------- end -------
|
|
86
|
-
|
|
87
|
-
// ------- name 属性 -------
|
|
88
|
-
// #region
|
|
89
|
-
get name() {
|
|
90
|
-
return this.getAttribute('name') || 'timePicker';
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
set name(value) {
|
|
94
|
-
this.setAttribute('name', value);
|
|
95
|
-
}
|
|
96
|
-
// #endregion
|
|
97
|
-
// ------- end -------
|
|
98
|
-
|
|
99
|
-
// ------- hour 小时 -------
|
|
100
|
-
// #region
|
|
101
|
-
get hour() {
|
|
102
|
-
const attr = this.getAttrNumber('hour');
|
|
103
|
-
return this.#handleLessThanTen(attr);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
set hour(value) {
|
|
107
|
-
this.setAttribute('hour', value);
|
|
108
|
-
|
|
109
|
-
this.#handleTimeItemPicker(this.#timePickerHourWrap, value);
|
|
110
|
-
}
|
|
111
|
-
// #endregion
|
|
112
|
-
// ------- end -------
|
|
113
|
-
|
|
114
|
-
// ------- minute 分钟 -------
|
|
115
|
-
// #region
|
|
116
|
-
get minute() {
|
|
117
|
-
const attr = this.getAttrNumber('minute');
|
|
118
|
-
return this.#handleLessThanTen(attr);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
set minute(value) {
|
|
122
|
-
this.setAttribute('minute', value);
|
|
123
|
-
|
|
124
|
-
this.#handleTimeItemPicker(this.#timePickerMinuteWrap, value);
|
|
125
|
-
}
|
|
126
|
-
// #endregion
|
|
127
|
-
// ------- end -------
|
|
128
|
-
|
|
129
|
-
// ------- second 秒 -------
|
|
130
|
-
// #region
|
|
131
|
-
get second() {
|
|
132
|
-
const attr = this.getAttrNumber('second');
|
|
133
|
-
return this.#handleLessThanTen(attr);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
set second(value) {
|
|
137
|
-
this.setAttribute('second', value);
|
|
138
|
-
|
|
139
|
-
this.#handleTimeItemPicker(this.#timePickerSecondWrap, value);
|
|
140
|
-
}
|
|
141
|
-
// #endregion
|
|
142
|
-
// ------- end -------
|
|
143
|
-
|
|
144
|
-
// ------- value 时间 -------
|
|
145
|
-
// #region
|
|
146
|
-
get value() {
|
|
147
|
-
return this.time;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
set value(value) {
|
|
151
|
-
this.time = value;
|
|
152
|
-
}
|
|
153
|
-
// #endregion
|
|
154
|
-
// ------- end -------
|
|
155
|
-
|
|
156
|
-
// ------- disabled 禁用 -------
|
|
157
|
-
// #region
|
|
158
|
-
get disabled() {
|
|
159
|
-
return this.getAttrBoolean('disabled') || false;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
set disabled(value) {
|
|
163
|
-
this.setAttribute('disabled', value);
|
|
164
|
-
|
|
165
|
-
this.#timePickerInput.disabled = value;
|
|
166
|
-
}
|
|
167
|
-
// #endregion
|
|
168
|
-
// ------- end -------
|
|
169
|
-
|
|
170
|
-
// ------- align 对齐方式 -------
|
|
171
|
-
// #region
|
|
172
|
-
get align() {
|
|
173
|
-
return this.getAttribute('align') || 'left';
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
set align(value) {
|
|
177
|
-
this.setAttribute('align', value);
|
|
178
|
-
|
|
179
|
-
this.#timePickerInput.shadowRoot.querySelector('input').style.textAlign = value;
|
|
180
|
-
}
|
|
181
|
-
// #endregion
|
|
182
|
-
// ------- end -------
|
|
183
|
-
|
|
184
|
-
// ------- limit-range-start 限制起始时间 -------
|
|
185
|
-
// #region
|
|
186
|
-
get limitRangeStart() {
|
|
187
|
-
const attr = this.getAttribute('limit-range-start');
|
|
188
|
-
if (!attr) return "00:00:00";
|
|
189
|
-
else {
|
|
190
|
-
const [hour, minute, second] = this.getAttribute('limit-range-start')?.split(':');
|
|
191
|
-
return `${this.#handleLessThanTen(hour)}:${this.#handleLessThanTen(minute)}:${this.#handleLessThanTen(second)}`;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
set limitRangeStart(value) {
|
|
196
|
-
this.setAttribute('limit-range-start', value);
|
|
197
|
-
}
|
|
198
|
-
// #endregion
|
|
199
|
-
// ------- end -------
|
|
200
|
-
|
|
201
|
-
// ------- limit-range-end 限制结束时间 -------
|
|
202
|
-
// #region
|
|
203
|
-
get limitRangeEnd() {
|
|
204
|
-
const attr = this.getAttribute('limit-range-end');
|
|
205
|
-
if (!attr) return "23:59:59"
|
|
206
|
-
else {
|
|
207
|
-
const [hour, minute, second] = this.getAttribute('limit-range-end')?.split(':');
|
|
208
|
-
return `${this.#handleLessThanTen(hour)}:${this.#handleLessThanTen(minute)}:${this.#handleLessThanTen(second)}`;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
set limitRangeEnd(value) {
|
|
213
|
-
this.setAttribute('limit-range-end', value);
|
|
214
|
-
}
|
|
215
|
-
// #endregion
|
|
216
|
-
// ------- end -------
|
|
217
|
-
|
|
218
|
-
#handleLessThanTen(num, defaultNum = '00') {
|
|
219
|
-
num = Number(num);
|
|
220
|
-
return num < 10 ? `0${num}` : (num || defaultNum);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
#handleTimeItemPicker(wrap, value) {
|
|
224
|
-
wrap.querySelectorAll('li').forEach(li => {
|
|
225
|
-
if (Number(li.innerText) === Number(this.#handleLessThanTen(value))) li.click();
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
#initElementsStyle() {
|
|
230
|
-
this.#dropdownWrap.style.width = this.#timePickerInput.getBoundingClientRect().width + "px";
|
|
231
|
-
|
|
232
|
-
timeout(() => {
|
|
233
|
-
this.#container.classList.add('with-transition');
|
|
234
|
-
}, 50);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
#handleTimeItemClickEvent(li, index, timeItemWrap, type) {
|
|
238
|
-
li.addEventListener('click', () => {
|
|
239
|
-
const lis = timeItemWrap.querySelectorAll('li');
|
|
240
|
-
lis.forEach(li => {
|
|
241
|
-
li.classList.remove('is-active');
|
|
242
|
-
});
|
|
243
|
-
li.classList.add('is-active');
|
|
244
|
-
|
|
245
|
-
const value = this.#handleLessThanTen(index);
|
|
246
|
-
switch (type) {
|
|
247
|
-
case 'hour':
|
|
248
|
-
this.hour = value;
|
|
249
|
-
break;
|
|
250
|
-
case 'minute':
|
|
251
|
-
this.minute = value;
|
|
252
|
-
break;
|
|
253
|
-
case 'second':
|
|
254
|
-
this.second = value;
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (this.#timePickerIsInit) this.dispatchEvent(new CustomEvent('change', { detail: { time: this.time } }));
|
|
259
|
-
|
|
260
|
-
this.#timePickerInput.value = `${this.hour}:${this.minute}:${this.second}`;
|
|
261
|
-
this.time = `${this.hour}:${this.minute}:${this.second}`;
|
|
262
|
-
|
|
263
|
-
const top = li.getBoundingClientRect().height * index;
|
|
264
|
-
timeItemWrap.scrollTo({
|
|
265
|
-
top,
|
|
266
|
-
behavior: 'smooth',
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
#handleTimeWrapScroll(wrap) {
|
|
272
|
-
wrap.addEventListener('wheel', () => {
|
|
273
|
-
timeout(() => {
|
|
274
|
-
const lis = wrap.querySelectorAll('li');
|
|
275
|
-
const height = lis[0].getBoundingClientRect().height;
|
|
276
|
-
const { scrollTop } = wrap
|
|
277
|
-
const index = Math.floor(scrollTop / height);
|
|
278
|
-
|
|
279
|
-
if (lis[index]) lis[index].click();
|
|
280
|
-
}, 100);
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
#initTimerPickerTimeItem() {
|
|
285
|
-
const [startHour, startMinute, startSecond] = this.limitRangeStart.split(':');
|
|
286
|
-
const [endHour, endMinute, endSecond] = this.limitRangeEnd.split(':');
|
|
287
|
-
|
|
288
|
-
const todayDate = new Date();
|
|
289
|
-
const startDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate(), startHour, startMinute, startSecond);
|
|
290
|
-
const endDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate(), endHour, endMinute, endSecond);
|
|
291
|
-
if (startDate > endDate) throw new Error('limit-range-start must be less than limit-range-end');
|
|
292
|
-
|
|
293
|
-
const initTimeItem = (startTime, endTime, wrap, type) => {
|
|
294
|
-
startTime = Number(startTime);
|
|
295
|
-
endTime = Number(endTime);
|
|
296
|
-
let start = 0;
|
|
297
|
-
let end = 0;
|
|
298
|
-
|
|
299
|
-
switch (type) {
|
|
300
|
-
case 'hour':
|
|
301
|
-
start = 0;
|
|
302
|
-
end = 23;
|
|
303
|
-
break;
|
|
304
|
-
default:
|
|
305
|
-
start = 0;
|
|
306
|
-
end = 59;
|
|
307
|
-
if (!String(startTime).localeCompare(endTime) && (startHour !== endHour)) endTime = endTime === 0 ? 59 : endTime;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
for (let i = start; i <= end; i++) {
|
|
311
|
-
const li = createElement('li', 'ea-time-picker_dropdown-item');
|
|
312
|
-
li.innerText = this.#handleLessThanTen(i);
|
|
313
|
-
wrap.appendChild(li);
|
|
314
|
-
|
|
315
|
-
if (i >= startTime && i <= endTime) this.#handleTimeItemClickEvent(li, i, wrap, type);
|
|
316
|
-
else li.classList.add('is-disabled');
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
initTimeItem(startHour, endHour, this.#timePickerHourWrap, 'hour');
|
|
321
|
-
initTimeItem(startMinute, endMinute, this.#timePickerMinuteWrap, 'minute');
|
|
322
|
-
initTimeItem(startSecond, endSecond, this.#timePickerSecondWrap, 'second');
|
|
323
|
-
|
|
324
|
-
this.#handleTimeWrapScroll(this.#timePickerHourWrap);
|
|
325
|
-
this.#handleTimeWrapScroll(this.#timePickerMinuteWrap);
|
|
326
|
-
this.#handleTimeWrapScroll(this.#timePickerSecondWrap);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
#initToggleDropdownWrapShow() {
|
|
330
|
-
let timePickerIsInit = false;
|
|
331
|
-
|
|
332
|
-
const dropdownWrapInitCallback = () => {
|
|
333
|
-
this.time = this.time;
|
|
334
|
-
timePickerIsInit = true;
|
|
335
|
-
this.#timePickerIsInit = true;
|
|
336
|
-
this.#dropdownWrap.removeEventListener('transitionend', dropdownWrapInitCallback);
|
|
337
|
-
}
|
|
338
|
-
this.#timePickerInput.addEventListener('focus', () => {
|
|
339
|
-
this.#container.classList.add('is-open');
|
|
340
|
-
|
|
341
|
-
if (!timePickerIsInit) this.#dropdownWrap.addEventListener('transitionend', dropdownWrapInitCallback);
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
window.addEventListener('click', (e) => {
|
|
345
|
-
if (!this.contains(e.target)) {
|
|
346
|
-
this.#container.classList.remove('is-open');
|
|
347
|
-
} else {
|
|
348
|
-
this.#timePickerInput.shadowRoot.querySelector('.ea-input_inner').focus();
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
connectedCallback() {
|
|
354
|
-
this.setAttribute('data-ea-component', true);
|
|
355
|
-
|
|
356
|
-
this.name = this.name;
|
|
357
|
-
|
|
358
|
-
this.width = this.width;
|
|
359
|
-
|
|
360
|
-
this.disabled = this.disabled;
|
|
361
|
-
|
|
362
|
-
this.align = this.align;
|
|
363
|
-
|
|
364
|
-
this.limitRangeStart = this.limitRangeStart;
|
|
365
|
-
this.limitRangeEnd = this.limitRangeEnd;
|
|
366
|
-
|
|
367
|
-
this.#initElementsStyle();
|
|
368
|
-
this.#initTimerPickerTimeItem();
|
|
369
|
-
|
|
370
|
-
this.time = this.time;
|
|
371
|
-
this.#timePickerInput.value = `${this.hour}:${this.minute}:${this.second}`;
|
|
372
|
-
|
|
373
|
-
this.#initToggleDropdownWrapShow();
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
if (!customElements.get('ea-time-picker')) {
|
|
378
|
-
customElements.define('ea-time-picker', EaTimePicker);
|
|
379
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
.ea-time-picker_wrap {
|
|
2
|
-
position: relative;
|
|
3
|
-
|
|
4
|
-
.ea-time-picker_dropdown-wrap {
|
|
5
|
-
position: absolute;
|
|
6
|
-
bottom: -12px;
|
|
7
|
-
left: 0;
|
|
8
|
-
transform-origin: center top;
|
|
9
|
-
transform: translateY(100%) scaleY(0);
|
|
10
|
-
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
15
|
-
|
|
16
|
-
z-index: 2;
|
|
17
|
-
|
|
18
|
-
&::before {
|
|
19
|
-
content: "";
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 0;
|
|
22
|
-
left: 0.5rem;
|
|
23
|
-
border: 0.5rem solid transparent;
|
|
24
|
-
border-bottom-color: #fff;
|
|
25
|
-
|
|
26
|
-
transform: translateY(-100%);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.ea-time-picker_dropdown-inner-wrap {
|
|
30
|
-
display: flex;
|
|
31
|
-
position: relative;
|
|
32
|
-
margin: 1rem 0;
|
|
33
|
-
|
|
34
|
-
&::before,
|
|
35
|
-
&::after {
|
|
36
|
-
content: "";
|
|
37
|
-
position: absolute;
|
|
38
|
-
left: 0;
|
|
39
|
-
|
|
40
|
-
transform: translateY(-50%);
|
|
41
|
-
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&::before {
|
|
46
|
-
top: calc(50% - 16px);
|
|
47
|
-
border-bottom: 1px solid #e4e7ed;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&::after {
|
|
51
|
-
top: calc(50% + 16px);
|
|
52
|
-
border-bottom: 1px solid #e4e7ed;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.ea-time-picker_dropdown-inner {
|
|
56
|
-
flex: 1;
|
|
57
|
-
max-height: 190px;
|
|
58
|
-
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
padding: 5rem 0;
|
|
61
|
-
|
|
62
|
-
text-align: center;
|
|
63
|
-
|
|
64
|
-
overflow: auto;
|
|
65
|
-
scrollbar-width: none;
|
|
66
|
-
|
|
67
|
-
margin-block-start: 0;
|
|
68
|
-
margin-block-end: 0;
|
|
69
|
-
margin-inline-start: 0px;
|
|
70
|
-
margin-inline-end: 0px;
|
|
71
|
-
padding-inline-start: 0px;
|
|
72
|
-
list-style-type: none;
|
|
73
|
-
|
|
74
|
-
.ea-time-picker_dropdown-item {
|
|
75
|
-
height: 32px;
|
|
76
|
-
line-height: 32px;
|
|
77
|
-
font-size: 12px;
|
|
78
|
-
color: #606266;
|
|
79
|
-
transition: color 0.3s;
|
|
80
|
-
|
|
81
|
-
&.is-active {
|
|
82
|
-
color: #409eff;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.is-disabled {
|
|
86
|
-
color: #c0c4cc;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ea-time-picker_dropdown-button-group {
|
|
93
|
-
text-align: right;
|
|
94
|
-
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
|
|
95
|
-
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&.is-open {
|
|
100
|
-
.ea-time-picker_dropdown-wrap {
|
|
101
|
-
transform: translateY(100%) scaleY(1);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.with-transition {
|
|
106
|
-
.ea-time-picker_dropdown-wrap {
|
|
107
|
-
transition: transform 0.3s ease-in-out;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|