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,54 +0,0 @@
|
|
|
1
|
-
import Base from '../Base.js';
|
|
2
|
-
import '../ea-icon/index.js'
|
|
3
|
-
|
|
4
|
-
const stylesheet = `
|
|
5
|
-
.ea-aside_wrap {
|
|
6
|
-
height: 100%;
|
|
7
|
-
overflow: auto;
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
}
|
|
11
|
-
.ea-aside_wrap ::slotted(ea-main) {
|
|
12
|
-
overflow: auto;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
export class EaAside extends Base {
|
|
17
|
-
#wrap;
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
|
|
21
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
22
|
-
shadowRoot.innerHTML = `
|
|
23
|
-
<aside class="ea-aside_wrap" part="container">
|
|
24
|
-
<slot></slot>
|
|
25
|
-
</aside>
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
this.#wrap = shadowRoot.querySelector('.ea-aside_wrap');
|
|
29
|
-
|
|
30
|
-
this.build(shadowRoot, stylesheet);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ------- width 侧边栏宽度 -------
|
|
34
|
-
// #region
|
|
35
|
-
get width() {
|
|
36
|
-
return this.getAttrNumber('width') || 200;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
set width(value) {
|
|
40
|
-
this.setAttribute('width', value);
|
|
41
|
-
|
|
42
|
-
this.#wrap.style.width = `${value}px`;
|
|
43
|
-
}
|
|
44
|
-
// #endregion
|
|
45
|
-
// ------- end -------
|
|
46
|
-
|
|
47
|
-
connectedCallback() {
|
|
48
|
-
this.width = this.width;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!customElements.get('ea-aside')) {
|
|
53
|
-
customElements.define('ea-aside', EaAside);
|
|
54
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
@import "../ea-icon/css/fontello.css";
|
|
2
|
-
@import "../ea-icon/css/animation.css";
|
|
3
|
-
@font-face {
|
|
4
|
-
font-size: 1rem;
|
|
5
|
-
font-size: 16px;
|
|
6
|
-
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
7
|
-
src: url("../ea-icon/font/fontello.eot") format("embedded-opentype"), url("../ea-icon/font/fontello.ttf") format("truetype"), url("../ea-icon/font/fontello.woff") format("woff"), url("../ea-icon/font/fontello.woff2") format("woff2"), url("../ea-icon/font/fontello.svg") format("svg");
|
|
8
|
-
}
|
|
9
|
-
.ea-avatar_wrap .ea-avatar {
|
|
10
|
-
position: relative;
|
|
11
|
-
display: inline-block;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
color: #ffffff;
|
|
14
|
-
}
|
|
15
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--fill img {
|
|
16
|
-
object-fit: fill;
|
|
17
|
-
}
|
|
18
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--contain img {
|
|
19
|
-
object-fit: contain;
|
|
20
|
-
}
|
|
21
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--cover img {
|
|
22
|
-
object-fit: cover;
|
|
23
|
-
}
|
|
24
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--none img {
|
|
25
|
-
object-fit: none;
|
|
26
|
-
}
|
|
27
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--scale-down img {
|
|
28
|
-
object-fit: scale-down;
|
|
29
|
-
}
|
|
30
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--normal {
|
|
31
|
-
width: 50px;
|
|
32
|
-
height: 50px;
|
|
33
|
-
line-height: 50px;
|
|
34
|
-
}
|
|
35
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--large {
|
|
36
|
-
width: 40px;
|
|
37
|
-
height: 40px;
|
|
38
|
-
line-height: 40px;
|
|
39
|
-
}
|
|
40
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--medium {
|
|
41
|
-
width: 36px;
|
|
42
|
-
height: 36px;
|
|
43
|
-
line-height: 36px;
|
|
44
|
-
}
|
|
45
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--small {
|
|
46
|
-
width: 28px;
|
|
47
|
-
height: 28px;
|
|
48
|
-
line-height: 28px;
|
|
49
|
-
}
|
|
50
|
-
.ea-avatar_wrap .ea-avatar .ea-avatar--text {
|
|
51
|
-
position: absolute;
|
|
52
|
-
top: 50%;
|
|
53
|
-
left: 50%;
|
|
54
|
-
transform: translate(-50%, -50%);
|
|
55
|
-
}
|
|
56
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--circle {
|
|
57
|
-
border-radius: 50%;
|
|
58
|
-
}
|
|
59
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--square {
|
|
60
|
-
border-radius: 5px;
|
|
61
|
-
}
|
|
62
|
-
.ea-avatar_wrap .ea-avatar .ea-avatar--img {
|
|
63
|
-
width: 100%;
|
|
64
|
-
height: 100%;
|
|
65
|
-
object-fit: cover;
|
|
66
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import Base from '../Base.js';
|
|
2
|
-
|
|
3
|
-
import "../ea-icon/index.js"
|
|
4
|
-
|
|
5
|
-
import { errorAvatar } from './src/assets/errorAvatar.js';
|
|
6
|
-
import { iconAvatar, textAvatar } from './src/assets/iconAndTextAvatar.js';
|
|
7
|
-
|
|
8
|
-
import { stylesheet } from "./src/style/stylesheet.js"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export class EaAvatar extends Base {
|
|
12
|
-
#avatar;
|
|
13
|
-
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
|
|
17
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
18
|
-
|
|
19
|
-
shadowRoot.innerHTML = `
|
|
20
|
-
<div class="ea-avatar_wrap" part='container'>
|
|
21
|
-
<span class="ea-avatar" part="avatar">
|
|
22
|
-
<slot></slot>
|
|
23
|
-
</span>
|
|
24
|
-
</div>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
this.#avatar = shadowRoot.querySelector('.ea-avatar');
|
|
28
|
-
|
|
29
|
-
this.build(shadowRoot, stylesheet);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// ------- size 图片大小 -------
|
|
33
|
-
// #region
|
|
34
|
-
get size() {
|
|
35
|
-
const sizeNumber = this.getAttrNumber('size');
|
|
36
|
-
const sizeString = this.getAttribute('size');
|
|
37
|
-
|
|
38
|
-
if (sizeNumber === 0 || !sizeNumber) {
|
|
39
|
-
return ['large', 'medium', 'small'].includes(sizeString) ? sizeString : 'normal';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return this.getAttrNumber('size');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
set size(value) {
|
|
46
|
-
this.setAttribute('size', value);
|
|
47
|
-
|
|
48
|
-
if (typeof value === "number") {
|
|
49
|
-
this.#avatar.style.width = `${value}px`;
|
|
50
|
-
this.#avatar.style.height = `${value}px`;
|
|
51
|
-
this.#avatar.style.lineHeight = `${value}px`;
|
|
52
|
-
} else if (typeof value === "string") {
|
|
53
|
-
this.#avatar.classList.add(`ea-avatar--${value}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// #endregion
|
|
57
|
-
// ------- end -------
|
|
58
|
-
|
|
59
|
-
// ------- shape 图片形状 -------
|
|
60
|
-
// #region
|
|
61
|
-
get shape() {
|
|
62
|
-
const shape = this.getAttribute('shape');
|
|
63
|
-
|
|
64
|
-
return ['circle', 'square'].includes(shape) ? shape : 'circle';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
set shape(value) {
|
|
68
|
-
this.setAttribute('shape', value);
|
|
69
|
-
this.#avatar.classList.add(`ea-avatar--${this.shape}`);
|
|
70
|
-
}
|
|
71
|
-
// #endregion
|
|
72
|
-
// ------- end -------
|
|
73
|
-
|
|
74
|
-
// ------- src 图片链接 -------
|
|
75
|
-
// #region
|
|
76
|
-
get src() {
|
|
77
|
-
return this.getAttribute('src');
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
set src(value) {
|
|
81
|
-
if (!value) return;
|
|
82
|
-
|
|
83
|
-
this.setAttribute('src', value);
|
|
84
|
-
|
|
85
|
-
const image = new Image();
|
|
86
|
-
image.src = value;
|
|
87
|
-
|
|
88
|
-
image.onload = () => {
|
|
89
|
-
this.#avatar.innerHTML = `<img class="ea-avatar--img" src="${value}" alt="头像">`;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
image.onerror = (e) => {
|
|
93
|
-
this.#avatar.innerHTML = errorAvatar;
|
|
94
|
-
|
|
95
|
-
this.dispatchEvent(new CustomEvent('error', {
|
|
96
|
-
detail: {
|
|
97
|
-
error: e,
|
|
98
|
-
},
|
|
99
|
-
}));
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
// #endregion
|
|
103
|
-
// ------- end -------
|
|
104
|
-
|
|
105
|
-
// ------- icon 图标 -------
|
|
106
|
-
// #region
|
|
107
|
-
get icon() {
|
|
108
|
-
return this.getAttribute('icon') || '';
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
set icon(value) {
|
|
112
|
-
this.setAttribute('icon', value);
|
|
113
|
-
|
|
114
|
-
this.#avatar.innerHTML = iconAvatar(value);
|
|
115
|
-
}
|
|
116
|
-
// #endregion
|
|
117
|
-
// ------- end -------
|
|
118
|
-
|
|
119
|
-
// ------- fit 图片容器适应 -------
|
|
120
|
-
// #region
|
|
121
|
-
get fit() {
|
|
122
|
-
return this.getAttribute('fit') || 'cover';
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
set fit(value) {
|
|
126
|
-
this.setAttribute('fit', value);
|
|
127
|
-
|
|
128
|
-
this.#avatar.classList.add(`ea-avatar-fill--${value}`);
|
|
129
|
-
}
|
|
130
|
-
// #endregion
|
|
131
|
-
// ------- end -------
|
|
132
|
-
|
|
133
|
-
connectedCallback() {
|
|
134
|
-
this.size = this.size;
|
|
135
|
-
|
|
136
|
-
this.shape = this.shape;
|
|
137
|
-
|
|
138
|
-
this.src = this.src;
|
|
139
|
-
|
|
140
|
-
if (this.src) {
|
|
141
|
-
this.fit = this.fit;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (!this.src && this.icon) {
|
|
145
|
-
this.icon = this.icon;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (this.innerHTML !== "" && !this.icon && !this.src) {
|
|
149
|
-
this.#avatar.innerHTML = textAvatar(this.innerHTML);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (!customElements.get('ea-avatar')) {
|
|
155
|
-
customElements.define('ea-avatar', EaAvatar);
|
|
156
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
@import "../ea-ui-base-style.scss";
|
|
2
|
-
@import "../ea-icon/index.scss";
|
|
3
|
-
|
|
4
|
-
@mixin ea-avatar-size($size-name, $size) {
|
|
5
|
-
&.ea-avatar--#{$size-name} {
|
|
6
|
-
width: $size;
|
|
7
|
-
height: $size;
|
|
8
|
-
line-height: $size;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
$fit-type: fill contain cover none scale-down;
|
|
13
|
-
@mixin ea-object-fit($type) {
|
|
14
|
-
&.ea-avatar-fill--#{$type} {
|
|
15
|
-
img {
|
|
16
|
-
object-fit: $type;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.ea-avatar_wrap {
|
|
22
|
-
.ea-avatar {
|
|
23
|
-
position: relative;
|
|
24
|
-
display: inline-block;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
color: #ffffff;
|
|
27
|
-
|
|
28
|
-
@each $type in $fit-type {
|
|
29
|
-
@include ea-object-fit($type);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@include ea-avatar-size("normal", 50px);
|
|
33
|
-
@include ea-avatar-size("large", 40px);
|
|
34
|
-
@include ea-avatar-size("medium", 36px);
|
|
35
|
-
@include ea-avatar-size("small", 28px);
|
|
36
|
-
|
|
37
|
-
.ea-avatar--text {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 50%;
|
|
40
|
-
left: 50%;
|
|
41
|
-
transform: translate(-50%, -50%);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.ea-avatar--circle {
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.ea-avatar--square {
|
|
49
|
-
border-radius: 5px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.ea-avatar--img {
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: 100%;
|
|
55
|
-
|
|
56
|
-
object-fit: cover;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const defaultAvatar = `
|
|
2
|
-
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<defs>
|
|
4
|
-
<clipPath id="a">
|
|
5
|
-
<path d="M0 40h90v45H0z" />
|
|
6
|
-
</clipPath>
|
|
7
|
-
</defs>
|
|
8
|
-
<path fill="#c0c4cc" d="M0 0h100v100H0z" />
|
|
9
|
-
<circle cx="50" cy="35" r="20" fill="#fff" />
|
|
10
|
-
<circle cx="50" cy="97" r="40" fill="#fff" clip-path="url(#a)" />
|
|
11
|
-
</svg>
|
|
12
|
-
`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const errorAvatar = `
|
|
2
|
-
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill="#c0c4cc" d="M0 0h100v100H0z" />
|
|
4
|
-
<path fill="#fff" d="M15 20h70v60H15z" />
|
|
5
|
-
<circle r="8" cx="32" cy="35" fill="#c0c4cc" />
|
|
6
|
-
<path d="M60 42.5L39 75h42z" fill="#c0c4cc" />
|
|
7
|
-
<path d="M35 52.5L20 75h-4 32z" fill="#c0c4cc" />
|
|
8
|
-
</svg>
|
|
9
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const background = `
|
|
2
|
-
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill="#c0c4cc" d="M0 0h100v100H0z" />
|
|
4
|
-
</svg>
|
|
5
|
-
`;
|
|
6
|
-
export const iconAvatar = (icon) => {
|
|
7
|
-
return `
|
|
8
|
-
${background}
|
|
9
|
-
<ea-icon class="fa ea-avatar--text" icon="${icon}"></ea-icon>
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const textAvatar = (text) => {
|
|
14
|
-
return `
|
|
15
|
-
${background}
|
|
16
|
-
<span class="ea-avatar--text">${text}</span>
|
|
17
|
-
`;
|
|
18
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const stylesheet = `
|
|
3
|
-
.ea-avatar_wrap .ea-avatar {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: inline-block;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
color: #ffffff;
|
|
8
|
-
}
|
|
9
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--fill img {
|
|
10
|
-
object-fit: fill;
|
|
11
|
-
}
|
|
12
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--contain img {
|
|
13
|
-
object-fit: contain;
|
|
14
|
-
}
|
|
15
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--cover img {
|
|
16
|
-
object-fit: cover;
|
|
17
|
-
}
|
|
18
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--none img {
|
|
19
|
-
object-fit: none;
|
|
20
|
-
}
|
|
21
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar-fill--scale-down img {
|
|
22
|
-
object-fit: scale-down;
|
|
23
|
-
}
|
|
24
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--normal {
|
|
25
|
-
width: 50px;
|
|
26
|
-
height: 50px;
|
|
27
|
-
line-height: 50px;
|
|
28
|
-
}
|
|
29
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--large {
|
|
30
|
-
width: 40px;
|
|
31
|
-
height: 40px;
|
|
32
|
-
line-height: 40px;
|
|
33
|
-
}
|
|
34
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--medium {
|
|
35
|
-
width: 36px;
|
|
36
|
-
height: 36px;
|
|
37
|
-
line-height: 36px;
|
|
38
|
-
}
|
|
39
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--small {
|
|
40
|
-
width: 28px;
|
|
41
|
-
height: 28px;
|
|
42
|
-
line-height: 28px;
|
|
43
|
-
}
|
|
44
|
-
.ea-avatar_wrap .ea-avatar .ea-avatar--text {
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 50%;
|
|
47
|
-
left: 50%;
|
|
48
|
-
transform: translate(-50%, -50%);
|
|
49
|
-
}
|
|
50
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--circle {
|
|
51
|
-
border-radius: 50%;
|
|
52
|
-
}
|
|
53
|
-
.ea-avatar_wrap .ea-avatar.ea-avatar--square {
|
|
54
|
-
border-radius: 5px;
|
|
55
|
-
}
|
|
56
|
-
.ea-avatar_wrap .ea-avatar .ea-avatar--img {
|
|
57
|
-
width: 100%;
|
|
58
|
-
height: 100%;
|
|
59
|
-
object-fit: cover;
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@import "../ea-icon/css/fontello.css";
|
|
2
|
-
@import "../ea-icon/css/animation.css";
|
|
3
|
-
@font-face {
|
|
4
|
-
font-size: 1rem;
|
|
5
|
-
font-size: 16px;
|
|
6
|
-
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
7
|
-
src: url("../ea-icon/font/fontello.eot") format("embedded-opentype"), url("../ea-icon/font/fontello.ttf") format("truetype"), url("../ea-icon/font/fontello.woff") format("woff"), url("../ea-icon/font/fontello.woff2") format("woff2"), url("../ea-icon/font/fontello.svg") format("svg");
|
|
8
|
-
}
|
|
9
|
-
.ea-backtop_wrap {
|
|
10
|
-
position: fixed;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
width: 40px;
|
|
15
|
-
height: 40px;
|
|
16
|
-
right: 40px;
|
|
17
|
-
bottom: 40px;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
background-color: #fff;
|
|
20
|
-
border-radius: 50%;
|
|
21
|
-
color: #409eff;
|
|
22
|
-
font-size: 14px;
|
|
23
|
-
box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
|
|
24
|
-
opacity: 1;
|
|
25
|
-
z-index: 5;
|
|
26
|
-
transition: opacity 0.3s ease-in-out;
|
|
27
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { timeout } from '../../utils/timeout.js';
|
|
2
|
-
import Base from '../Base.js';
|
|
3
|
-
import "../ea-icon/index.js"
|
|
4
|
-
|
|
5
|
-
import { stylesheet } from './src/style/stylesheet.js';
|
|
6
|
-
|
|
7
|
-
export class EaBacktop extends Base {
|
|
8
|
-
#wrap;
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
|
|
13
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
14
|
-
shadowRoot.innerHTML = `
|
|
15
|
-
<div class="ea-backtop_wrap" part='container' style='display: none'>
|
|
16
|
-
<slot></slot>
|
|
17
|
-
</div>
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
this.#wrap = shadowRoot.querySelector('.ea-backtop_wrap');
|
|
21
|
-
|
|
22
|
-
this.build(shadowRoot, stylesheet);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ------- target 触发滚动的对象 -------
|
|
26
|
-
// #region
|
|
27
|
-
get target() {
|
|
28
|
-
return this.getAttribute('target') || '';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
set target(value) {
|
|
32
|
-
this.setAttribute('target', value);
|
|
33
|
-
}
|
|
34
|
-
// #endregion
|
|
35
|
-
// ------- end -------
|
|
36
|
-
|
|
37
|
-
// ------- right 滚动按钮距离右边的距离 -------
|
|
38
|
-
// #region
|
|
39
|
-
get right() {
|
|
40
|
-
return this.getAttribute('right') || '40px';
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
set right(value) {
|
|
44
|
-
this.setAttribute('right', value);
|
|
45
|
-
|
|
46
|
-
this.#wrap.style.right = value;
|
|
47
|
-
}
|
|
48
|
-
// #endregion
|
|
49
|
-
// ------- end -------
|
|
50
|
-
|
|
51
|
-
// ------- bottom 滚动按钮距离下边的距离 -------
|
|
52
|
-
// #region
|
|
53
|
-
get bottom() {
|
|
54
|
-
return this.getAttribute('bottom') || '40px';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
set bottom(value) {
|
|
58
|
-
this.setAttribute('bottom', value);
|
|
59
|
-
|
|
60
|
-
this.#wrap.style.bottom = value;
|
|
61
|
-
}
|
|
62
|
-
// #endregion
|
|
63
|
-
// ------- end -------
|
|
64
|
-
|
|
65
|
-
// ------- icon 图标类名 -------
|
|
66
|
-
// #region
|
|
67
|
-
get icon() {
|
|
68
|
-
return this.getAttribute('icon') || "icon-angle-up";
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
set icon(value) {
|
|
72
|
-
this.setAttribute('icon', value);
|
|
73
|
-
|
|
74
|
-
this.#wrap.innerHTML = `
|
|
75
|
-
<ea-icon icon="${value}" part='icon'></ea-icon>
|
|
76
|
-
`;
|
|
77
|
-
}
|
|
78
|
-
// #endregion
|
|
79
|
-
// ------- end -------
|
|
80
|
-
|
|
81
|
-
// ------- visibility-height 滚动按钮显示和隐藏的触发条件 -------
|
|
82
|
-
// #region
|
|
83
|
-
get visibilityHeight() {
|
|
84
|
-
return this.getAttribute('visibility-height') || 200;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
set visibilityHeight(value) {
|
|
88
|
-
this.setAttribute('visibility-height', value);
|
|
89
|
-
}
|
|
90
|
-
// #endregion
|
|
91
|
-
// ------- end -------
|
|
92
|
-
|
|
93
|
-
#handleScrollEvent(targetName) {
|
|
94
|
-
let dom = null;
|
|
95
|
-
let scrollDom = null;
|
|
96
|
-
|
|
97
|
-
if (targetName === "null" || targetName === '' || targetName === null || targetName === undefined || targetName === 'undefined') {
|
|
98
|
-
dom = document;
|
|
99
|
-
scrollDom = document.documentElement;
|
|
100
|
-
} else {
|
|
101
|
-
dom = document.querySelector(targetName);
|
|
102
|
-
scrollDom = document.querySelector(targetName);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return { dom, scrollDom };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
#handleBackTopBtnShow(scrollDom) {
|
|
109
|
-
if (scrollDom.scrollTop > this.visibilityHeight) {
|
|
110
|
-
this.#wrap.style.display = 'flex';
|
|
111
|
-
this.#wrap.ontransitionend = null;
|
|
112
|
-
|
|
113
|
-
timeout(() => {
|
|
114
|
-
this.#wrap.style.opacity = 1;
|
|
115
|
-
}, 10);
|
|
116
|
-
} else {
|
|
117
|
-
this.#wrap.style.opacity = 0;
|
|
118
|
-
|
|
119
|
-
this.#wrap.ontransitionend = () => {
|
|
120
|
-
this.#wrap.style.display = 'none';
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
#initScrollBtn() {
|
|
126
|
-
const { dom, scrollDom } = this.#handleScrollEvent(this.target);
|
|
127
|
-
|
|
128
|
-
this.#handleBackTopBtnShow(scrollDom);
|
|
129
|
-
|
|
130
|
-
dom.addEventListener('scroll', () => {
|
|
131
|
-
this.#handleBackTopBtnShow(scrollDom);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
this.#wrap.addEventListener('click', function () {
|
|
135
|
-
let step = 10;
|
|
136
|
-
|
|
137
|
-
let timer = setInterval(() => {
|
|
138
|
-
step += 5;
|
|
139
|
-
scrollDom.scrollTop -= step;
|
|
140
|
-
|
|
141
|
-
if (scrollDom.scrollTop <= 0) {
|
|
142
|
-
scrollDom.scrollTop = 0;
|
|
143
|
-
clearInterval(timer);
|
|
144
|
-
timer = null;
|
|
145
|
-
|
|
146
|
-
this.dispatchEvent(new CustomEvent('reachedTop', {}));
|
|
147
|
-
}
|
|
148
|
-
}, 12);
|
|
149
|
-
|
|
150
|
-
this.dispatchEvent(new CustomEvent('backtop', {}));
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
connectedCallback() {
|
|
155
|
-
this.target = this.target;
|
|
156
|
-
this.right = this.right;
|
|
157
|
-
this.bottom = this.bottom;
|
|
158
|
-
this.visibilityHeight = this.visibilityHeight;
|
|
159
|
-
this.icon = this.icon;
|
|
160
|
-
|
|
161
|
-
this.#initScrollBtn();
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (!customElements.get('ea-backtop')) {
|
|
166
|
-
customElements.define('ea-backtop', EaBacktop);
|
|
167
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
@import "../ea-ui-base-style.scss";
|
|
2
|
-
@import "../ea-icon/index.scss";
|
|
3
|
-
|
|
4
|
-
.ea-backtop_wrap {
|
|
5
|
-
position: fixed;
|
|
6
|
-
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
|
|
11
|
-
width: 40px;
|
|
12
|
-
height: 40px;
|
|
13
|
-
|
|
14
|
-
right: 40px;
|
|
15
|
-
bottom: 40px;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
|
|
18
|
-
background-color: #fff;
|
|
19
|
-
border-radius: 50%;
|
|
20
|
-
color: #409eff;
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
|
|
23
|
-
|
|
24
|
-
opacity: 1;
|
|
25
|
-
|
|
26
|
-
z-index: 5;
|
|
27
|
-
|
|
28
|
-
transition: opacity 0.3s ease-in-out;
|
|
29
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const stylesheet = `
|
|
2
|
-
.ea-backtop_wrap {
|
|
3
|
-
position: fixed;
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
width: 40px;
|
|
8
|
-
height: 40px;
|
|
9
|
-
right: 40px;
|
|
10
|
-
bottom: 40px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
background-color: #fff;
|
|
13
|
-
border-radius: 50%;
|
|
14
|
-
color: #409eff;
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
|
|
17
|
-
opacity: 1;
|
|
18
|
-
z-index: 5;
|
|
19
|
-
transition: opacity 0.3s ease-in-out;
|
|
20
|
-
}
|
|
21
|
-
`;
|