easy-component-ui 2.1.0 → 3.0.0
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 +294 -11
- 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,72 +0,0 @@
|
|
|
1
|
-
.ea-calendar_wrap {
|
|
2
|
-
padding: 12px 20px 35px;
|
|
3
|
-
}
|
|
4
|
-
.ea-calendar_wrap .ea-calendar-header_wrap {
|
|
5
|
-
border-bottom: 1px solid #ebeef5;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
padding-bottom: 0.5rem;
|
|
10
|
-
}
|
|
11
|
-
.ea-calendar_wrap .ea-calendar-header_wrap .ea-calendar-header_changer .ea-calendar-header_sg-changer {
|
|
12
|
-
border: 1px solid #ebeef5;
|
|
13
|
-
border-left: 0px none transparent;
|
|
14
|
-
}
|
|
15
|
-
.ea-calendar_wrap .ea-calendar-header_wrap .ea-calendar-header_changer .ea-calendar-header_sg-changer:first-child {
|
|
16
|
-
border-left: 1px solid #ebeef5;
|
|
17
|
-
}
|
|
18
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table {
|
|
19
|
-
width: 100%;
|
|
20
|
-
table-layout: fixed;
|
|
21
|
-
border-collapse: collapse;
|
|
22
|
-
}
|
|
23
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table th {
|
|
24
|
-
font-weight: 400;
|
|
25
|
-
color: #606266;
|
|
26
|
-
padding: 12px 0;
|
|
27
|
-
}
|
|
28
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td {
|
|
29
|
-
border-right: 1px solid #ebeef5;
|
|
30
|
-
border-bottom: 1px solid #ebeef5;
|
|
31
|
-
}
|
|
32
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-selected {
|
|
33
|
-
color: #1989fa;
|
|
34
|
-
background-color: #f2f8fe;
|
|
35
|
-
}
|
|
36
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-today {
|
|
37
|
-
color: #1989fa;
|
|
38
|
-
}
|
|
39
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-disabled {
|
|
40
|
-
pointer-events: none;
|
|
41
|
-
color: #c0c4cc;
|
|
42
|
-
}
|
|
43
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td span {
|
|
44
|
-
display: block;
|
|
45
|
-
box-sizing: border-box;
|
|
46
|
-
height: 85px;
|
|
47
|
-
padding: 8px;
|
|
48
|
-
}
|
|
49
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td span .calendar-description {
|
|
50
|
-
margin-top: auto;
|
|
51
|
-
}
|
|
52
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table tr:first-child td {
|
|
53
|
-
border-top: 1px solid #ebeef5;
|
|
54
|
-
}
|
|
55
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table tr td:first-child {
|
|
56
|
-
border-left: 1px solid #ebeef5;
|
|
57
|
-
border-top: 1px solid #ebeef5;
|
|
58
|
-
}
|
|
59
|
-
.ea-calendar_wrap.mini {
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
text-align: center;
|
|
62
|
-
}
|
|
63
|
-
.ea-calendar_wrap.mini .ea-calendar-header_wrap {
|
|
64
|
-
justify-content: space-around;
|
|
65
|
-
}
|
|
66
|
-
.ea-calendar_wrap.mini .ea-calendar-header_wrap .ea-calendar-header_changer {
|
|
67
|
-
display: none;
|
|
68
|
-
}
|
|
69
|
-
.ea-calendar_wrap.mini .ea-calendar_calendar-wrap .ea-calendar_table td span {
|
|
70
|
-
height: 20px;
|
|
71
|
-
padding: 4px;
|
|
72
|
-
}
|
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import Base from '../Base.js';
|
|
3
|
-
import { createElement, createSlotElement } from '../../utils/createElement.js';
|
|
4
|
-
|
|
5
|
-
import "../ea-button-group/index.js";
|
|
6
|
-
import "../ea-button/index.js";
|
|
7
|
-
|
|
8
|
-
import { createChangerElement } from './src/utils/createChangerElement.js';
|
|
9
|
-
import { createThead } from './src/utils/createThead.js';
|
|
10
|
-
import { getToday, getUserToday } from './src/utils/getDate.js';
|
|
11
|
-
import { getUserWeekStart } from './src/utils/getUserWeekStart.js';
|
|
12
|
-
|
|
13
|
-
import { stylesheet } from './src/style/stylesheet.js';
|
|
14
|
-
|
|
15
|
-
export class EaCalendar extends Base {
|
|
16
|
-
#container;
|
|
17
|
-
|
|
18
|
-
#headerDateWrap;
|
|
19
|
-
#headerDateContent;
|
|
20
|
-
#headerChangerWrap;
|
|
21
|
-
|
|
22
|
-
#lastMonthBtn;
|
|
23
|
-
#todayBtn;
|
|
24
|
-
#nextMonthBtn;
|
|
25
|
-
|
|
26
|
-
#tableHead;
|
|
27
|
-
#tableContent;
|
|
28
|
-
constructor() {
|
|
29
|
-
super();
|
|
30
|
-
|
|
31
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
32
|
-
|
|
33
|
-
shadowRoot.innerHTML = `
|
|
34
|
-
<div class='ea-calendar_wrap' part='container'>
|
|
35
|
-
<div class='ea-calendar-header_wrap' part='header-wrap'>
|
|
36
|
-
<span class='ea-calendar-header_content' part='header-content'></span>
|
|
37
|
-
<ea-button-group class='ea-calendar-header_changer' part='header-changer'>
|
|
38
|
-
<ea-button class='ea-calendar-header_sg-changer ea-calendar-header_changer-lastMonth' part='header-changer-lastMonth' size="small">上个月</ea-button>
|
|
39
|
-
<ea-button class='ea-calendar-header_sg-changer ea-calendar-header_changer-today' part='header-changer-today' size="small">今天</ea-button>
|
|
40
|
-
<ea-button class='ea-calendar-header_sg-changer ea-calendar-header_changer-nextMonth' part='header-changer-nextMonth' size="small">下个月</ea-button>
|
|
41
|
-
</ea-button-group>
|
|
42
|
-
</div>
|
|
43
|
-
<div class='ea-calendar_calendar-wrap' part='calendar-wrap'>
|
|
44
|
-
<table class='ea-calendar_table' part='table'>
|
|
45
|
-
<thead class='ea-calendar_table-head' part='table-head'></thead>
|
|
46
|
-
<tbody class='ea-calendar_table-body' part='table-body'></tbody>
|
|
47
|
-
</table>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
this.#container = this.shadowRoot.querySelector('.ea-calendar_wrap');
|
|
53
|
-
|
|
54
|
-
this.#headerDateContent = shadowRoot.querySelector('.ea-calendar-header_content');
|
|
55
|
-
this.#headerDateWrap = shadowRoot.querySelector('.ea-calendar-header_wrap');
|
|
56
|
-
|
|
57
|
-
this.#headerChangerWrap = shadowRoot.querySelector('.ea-calendar-header_changer');
|
|
58
|
-
this.#lastMonthBtn = shadowRoot.querySelector('.ea-calendar-header_changer-lastMonth');
|
|
59
|
-
this.#todayBtn = shadowRoot.querySelector('.ea-calendar-header_changer-today');
|
|
60
|
-
this.#nextMonthBtn = shadowRoot.querySelector('.ea-calendar-header_changer-nextMonth');
|
|
61
|
-
|
|
62
|
-
this.#tableHead = shadowRoot.querySelector('.ea-calendar_table-head');
|
|
63
|
-
this.#tableContent = shadowRoot.querySelector('.ea-calendar_table-body');
|
|
64
|
-
|
|
65
|
-
this.build(shadowRoot, stylesheet);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// ------- week-start 用户传入的每周起始日 -------
|
|
69
|
-
// #region
|
|
70
|
-
get weekStart() {
|
|
71
|
-
return this.getAttribute('week-start') || "一";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
set weekStart(weekStart) {
|
|
75
|
-
this.setAttribute('week-start', weekStart);
|
|
76
|
-
|
|
77
|
-
this.#tableHead.innerHTML = createThead(getUserWeekStart(this.week, weekStart)).innerHTML;
|
|
78
|
-
}
|
|
79
|
-
// #endregion
|
|
80
|
-
// ------- end -------
|
|
81
|
-
|
|
82
|
-
// ------- date 用户传入日期 -------
|
|
83
|
-
// #region
|
|
84
|
-
get date() {
|
|
85
|
-
const myDate = new Date();
|
|
86
|
-
|
|
87
|
-
return this.getAttribute('date') || getToday();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
set date(date) {
|
|
91
|
-
this.setAttribute('date', date);
|
|
92
|
-
|
|
93
|
-
this.#headerDateContent.innerHTML = date = isNaN(new Date(date)) ? getToday() : getUserToday(date);
|
|
94
|
-
|
|
95
|
-
this.#handleDateChange(this.#tableContent, date, this.weekStart);
|
|
96
|
-
}
|
|
97
|
-
// #endregion
|
|
98
|
-
// ------- end -------
|
|
99
|
-
|
|
100
|
-
// ------- size 用户传入尺寸 -------
|
|
101
|
-
// #region
|
|
102
|
-
get size() {
|
|
103
|
-
const attr = this.getAttribute('size');
|
|
104
|
-
return ["mini"].includes(attr) ? attr : "medium";
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
set size(size) {
|
|
108
|
-
this.setAttribute('size', size);
|
|
109
|
-
|
|
110
|
-
this.#container.classList.add(size);
|
|
111
|
-
|
|
112
|
-
if (size === "mini") {
|
|
113
|
-
const prevIcon = createElement("span", "prev-btn");
|
|
114
|
-
prevIcon.innerText = "<";
|
|
115
|
-
const nextIcon = createElement("span", "next-btn");
|
|
116
|
-
nextIcon.innerText = ">";
|
|
117
|
-
|
|
118
|
-
this.#lastMonthBtn = prevIcon;
|
|
119
|
-
this.#nextMonthBtn = nextIcon;
|
|
120
|
-
|
|
121
|
-
this.#headerDateWrap.insertBefore(prevIcon, this.#headerDateWrap.firstChild);
|
|
122
|
-
this.#headerDateWrap.appendChild(nextIcon);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// #endregion
|
|
126
|
-
// ------- end -------
|
|
127
|
-
|
|
128
|
-
get week() {
|
|
129
|
-
return ["日", "一", "二", "三", "四", "五", "六"];
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* 处理日历项的选择事件。
|
|
134
|
-
* 当日历项被点击时,此函数被调用。它的目的是切换所点击项的选中状态,并取消其他项的选中状态。
|
|
135
|
-
* @param {HTMLElement} node - 日历项元素节点。这个节点代表日历中的一个日期单元格。
|
|
136
|
-
*/
|
|
137
|
-
#handleCalendarItemSelect(node) {
|
|
138
|
-
// 为日历项添加点击事件监听器
|
|
139
|
-
node.addEventListener('click', (e) => {
|
|
140
|
-
// 遍历日历表中的所有单元格,并移除它们的 'is-selected' 类,以取消选中状态
|
|
141
|
-
this.#tableContent.querySelectorAll('td').forEach(el => {
|
|
142
|
-
el.classList.remove('is-selected');
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
// 如果当前点击的节点已经选中,则取消选中状态,否则选中当前节点
|
|
146
|
-
if (node.classList.contains('is-selected')) {
|
|
147
|
-
node.classList.remove('is-selected');
|
|
148
|
-
} else {
|
|
149
|
-
node.classList.add('is-selected');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const myDate = new Date(this.date);
|
|
153
|
-
this.dispatchEvent(new CustomEvent('select', {
|
|
154
|
-
detail: {
|
|
155
|
-
year: myDate.getFullYear(),
|
|
156
|
-
month: myDate.getMonth() + 1,
|
|
157
|
-
date: Number(node.innerText),
|
|
158
|
-
day: this.week[Number(node.innerText) % 7],
|
|
159
|
-
}
|
|
160
|
-
}));
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
#handleMonthChange(flag) {
|
|
165
|
-
const date = new Date(this.date);
|
|
166
|
-
date.setMonth(date.getMonth() + (flag === "next" ? 1 : -1));
|
|
167
|
-
|
|
168
|
-
this.date = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* 根据给定的日期更新页面上的日历视图。
|
|
173
|
-
* @param {HTMLElement} content - 用于展示日历的HTML元素。
|
|
174
|
-
* @param {string|number|Date} date - 需要展示的月份的日期对象。
|
|
175
|
-
*/
|
|
176
|
-
#handleDateChange(content, date, weekStart = "一") {
|
|
177
|
-
date = isNaN(new Date(date)) ? new Date() : new Date(date);
|
|
178
|
-
|
|
179
|
-
// 清空内容区域,为展示新月份做准备
|
|
180
|
-
content.innerHTML = "";
|
|
181
|
-
|
|
182
|
-
// 创建当前月份的日期对象
|
|
183
|
-
const userDate = new Date(date);
|
|
184
|
-
// 获取月份,月份从0开始,因此需要加1
|
|
185
|
-
const month = userDate.getMonth() + 1;
|
|
186
|
-
|
|
187
|
-
// 初始化当前日期为月份的第一天
|
|
188
|
-
const currentDate = new Date(date);
|
|
189
|
-
currentDate.setDate(1);
|
|
190
|
-
|
|
191
|
-
// 计算上个月的最后一天
|
|
192
|
-
const lastDate = new Date(date);
|
|
193
|
-
lastDate.setMonth(month);
|
|
194
|
-
lastDate.setDate(0);
|
|
195
|
-
|
|
196
|
-
// 计算下个月的第一天
|
|
197
|
-
const nextDate = new Date(date);
|
|
198
|
-
nextDate.setMonth(month);
|
|
199
|
-
nextDate.setDate(1);
|
|
200
|
-
|
|
201
|
-
// 定义星期的中文简写数组
|
|
202
|
-
const weekArr = getUserWeekStart(this.week, weekStart);
|
|
203
|
-
|
|
204
|
-
// 构建日历的行,每行7天
|
|
205
|
-
for (let i = 0; i < 6; i++) {
|
|
206
|
-
const tr = createElement('tr');
|
|
207
|
-
tr.part = 'table-body-row';
|
|
208
|
-
|
|
209
|
-
// 构建每一天的单元格
|
|
210
|
-
for (let j = 0; j < 7; j++) {
|
|
211
|
-
const { length } = tr.children;
|
|
212
|
-
const td = createElement('td');
|
|
213
|
-
td.part = 'table-body-cell';
|
|
214
|
-
const span = createElement('span');
|
|
215
|
-
span.part = 'table-body-cell-content';
|
|
216
|
-
|
|
217
|
-
// 获取当前日期是星期几
|
|
218
|
-
const day = currentDate.getDay();
|
|
219
|
-
const myDate = new Date();
|
|
220
|
-
|
|
221
|
-
// 判断当前单元格应展示哪一天的日期
|
|
222
|
-
if (weekArr[length] === this.week[day] && month === currentDate.getMonth() + 1) {
|
|
223
|
-
// 如果是当前月的日期,则展示当前月的日期
|
|
224
|
-
span.innerText = currentDate.getDate();
|
|
225
|
-
currentDate.setDate(currentDate.getDate() + 1);
|
|
226
|
-
this.#handleCalendarItemSelect(td);
|
|
227
|
-
} else if (month == currentDate.getMonth()) {
|
|
228
|
-
// 如果是下个月的日期,则展示下个月的日期
|
|
229
|
-
span.innerText = currentDate.getDate();
|
|
230
|
-
currentDate.setDate(currentDate.getDate() + 1);
|
|
231
|
-
td.classList.add("is-disabled");
|
|
232
|
-
td.part = "table-body-cell-disabled";
|
|
233
|
-
} else {
|
|
234
|
-
// 如果是上个月的日期,则展示上个月的日期
|
|
235
|
-
const lastMonthDateStep = j - day + 2;
|
|
236
|
-
const step = weekArr.findIndex((item, index) => {
|
|
237
|
-
if (item === "一") return index;
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
lastDate.setMonth(month - 1);
|
|
241
|
-
lastDate.setDate(lastMonthDateStep > 0 ? (day + length) - step : lastMonthDateStep);
|
|
242
|
-
span.innerText = lastDate.getDate();
|
|
243
|
-
td.part = "table-body-cell-disabled";
|
|
244
|
-
td.classList.add("is-disabled");
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const userToday = new Date(this.date);
|
|
248
|
-
if (currentDate.getFullYear() === myDate.getFullYear() && currentDate.getMonth() === myDate.getMonth() && currentDate.getDate() === myDate.getDate() + 1) {
|
|
249
|
-
td.part = "table-body-cell-today";
|
|
250
|
-
td.classList.add("is-today");
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (currentDate.getFullYear() === userDate.getFullYear() && currentDate.getMonth() === userDate.getMonth() && currentDate.getDate() === userDate.getDate() + 1) {
|
|
254
|
-
td.part = "table-body-cell-selected";
|
|
255
|
-
td.classList.add("is-selected");
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
// 将日期单元格添加到行中
|
|
260
|
-
td.appendChild(span);
|
|
261
|
-
tr.appendChild(td);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// 将行添加到日历表格中
|
|
265
|
-
content.appendChild(tr);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
connectedCallback() {
|
|
271
|
-
const that = this;
|
|
272
|
-
|
|
273
|
-
this.weekStart = this.weekStart;
|
|
274
|
-
|
|
275
|
-
this.date = this.date;
|
|
276
|
-
|
|
277
|
-
this.size = this.size;
|
|
278
|
-
|
|
279
|
-
// 上个月按钮
|
|
280
|
-
this.#lastMonthBtn.addEventListener('click', () => {
|
|
281
|
-
this.#handleMonthChange("last");
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
// 今天按钮
|
|
285
|
-
this.#todayBtn.addEventListener('click', () => {
|
|
286
|
-
this.date = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`;
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
// 下个月按钮
|
|
290
|
-
this.#nextMonthBtn.addEventListener('click', () => {
|
|
291
|
-
this.#handleMonthChange("next");
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
if (!customElements.get('ea-calendar')) {
|
|
297
|
-
customElements.define('ea-calendar', EaCalendar);
|
|
298
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.ea-calendar_wrap {
|
|
2
|
-
padding: 12px 20px 35px;
|
|
3
|
-
|
|
4
|
-
.ea-calendar-header_wrap {
|
|
5
|
-
border-bottom: 1px solid #ebeef5;
|
|
6
|
-
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
|
|
11
|
-
padding-bottom: 0.5rem;
|
|
12
|
-
|
|
13
|
-
.ea-calendar-header_changer {
|
|
14
|
-
.ea-calendar-header_sg-changer {
|
|
15
|
-
border: 1px solid #ebeef5;
|
|
16
|
-
border-left: 0px none transparent;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ea-calendar-header_sg-changer:first-child {
|
|
20
|
-
border-left: 1px solid #ebeef5;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ea-calendar_calendar-wrap {
|
|
26
|
-
.ea-calendar_table {
|
|
27
|
-
width: 100%;
|
|
28
|
-
table-layout: fixed;
|
|
29
|
-
border-collapse: collapse;
|
|
30
|
-
|
|
31
|
-
th {
|
|
32
|
-
font-weight: 400;
|
|
33
|
-
color: #606266;
|
|
34
|
-
padding: 12px 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
td {
|
|
38
|
-
border-right: 1px solid #ebeef5;
|
|
39
|
-
border-bottom: 1px solid #ebeef5;
|
|
40
|
-
|
|
41
|
-
&.is-selected {
|
|
42
|
-
color: #1989fa;
|
|
43
|
-
background-color: #f2f8fe;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&.is-today {
|
|
47
|
-
color: #1989fa;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.is-disabled {
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
color: #c0c4cc;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
span {
|
|
56
|
-
display: block;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
height: 85px;
|
|
59
|
-
padding: 8px;
|
|
60
|
-
|
|
61
|
-
.calendar-description {
|
|
62
|
-
margin-top: auto;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
tr {
|
|
68
|
-
&:first-child {
|
|
69
|
-
td {
|
|
70
|
-
border-top: 1px solid #ebeef5;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
td {
|
|
75
|
-
&:first-child {
|
|
76
|
-
border-left: 1px solid #ebeef5;
|
|
77
|
-
border-top: 1px solid #ebeef5;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.mini {
|
|
85
|
-
font-size: 10px;
|
|
86
|
-
text-align: center;
|
|
87
|
-
|
|
88
|
-
.ea-calendar-header_wrap {
|
|
89
|
-
justify-content: space-around;
|
|
90
|
-
.ea-calendar-header_changer {
|
|
91
|
-
display: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ea-calendar_calendar-wrap {
|
|
96
|
-
.ea-calendar_table {
|
|
97
|
-
td {
|
|
98
|
-
span {
|
|
99
|
-
height: 20px;
|
|
100
|
-
padding: 4px;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export const stylesheet = `
|
|
2
|
-
.ea-calendar_wrap {
|
|
3
|
-
padding: 12px 20px 35px;
|
|
4
|
-
}
|
|
5
|
-
.ea-calendar_wrap .ea-calendar-header_wrap {
|
|
6
|
-
border-bottom: 1px solid #ebeef5;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
padding-bottom: 0.5rem;
|
|
11
|
-
}
|
|
12
|
-
.ea-calendar_wrap .ea-calendar-header_wrap .ea-calendar-header_changer .ea-calendar-header_sg-changer {
|
|
13
|
-
border: 1px solid #ebeef5;
|
|
14
|
-
border-left: 0px none transparent;
|
|
15
|
-
}
|
|
16
|
-
.ea-calendar_wrap .ea-calendar-header_wrap .ea-calendar-header_changer .ea-calendar-header_sg-changer:first-child {
|
|
17
|
-
border-left: 1px solid #ebeef5;
|
|
18
|
-
}
|
|
19
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table {
|
|
20
|
-
width: 100%;
|
|
21
|
-
table-layout: fixed;
|
|
22
|
-
border-collapse: collapse;
|
|
23
|
-
}
|
|
24
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table th {
|
|
25
|
-
font-weight: 400;
|
|
26
|
-
color: #606266;
|
|
27
|
-
padding: 12px 0;
|
|
28
|
-
}
|
|
29
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td {
|
|
30
|
-
border-right: 1px solid #ebeef5;
|
|
31
|
-
border-bottom: 1px solid #ebeef5;
|
|
32
|
-
}
|
|
33
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-selected {
|
|
34
|
-
color: #1989fa;
|
|
35
|
-
background-color: #f2f8fe;
|
|
36
|
-
}
|
|
37
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-today {
|
|
38
|
-
color: #1989fa;
|
|
39
|
-
}
|
|
40
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td.is-disabled {
|
|
41
|
-
pointer-events: none;
|
|
42
|
-
color: #c0c4cc;
|
|
43
|
-
}
|
|
44
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td span {
|
|
45
|
-
display: block;
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
height: 85px;
|
|
48
|
-
padding: 8px;
|
|
49
|
-
}
|
|
50
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table td span .calendar-description {
|
|
51
|
-
margin-top: auto;
|
|
52
|
-
}
|
|
53
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table tr:first-child td {
|
|
54
|
-
border-top: 1px solid #ebeef5;
|
|
55
|
-
}
|
|
56
|
-
.ea-calendar_wrap .ea-calendar_calendar-wrap .ea-calendar_table tr td:first-child {
|
|
57
|
-
border-left: 1px solid #ebeef5;
|
|
58
|
-
border-top: 1px solid #ebeef5;
|
|
59
|
-
}
|
|
60
|
-
.ea-calendar_wrap.mini {
|
|
61
|
-
font-size: 10px;
|
|
62
|
-
text-align: center;
|
|
63
|
-
}
|
|
64
|
-
.ea-calendar_wrap.mini .ea-calendar-header_wrap {
|
|
65
|
-
justify-content: space-around;
|
|
66
|
-
}
|
|
67
|
-
.ea-calendar_wrap.mini .ea-calendar-header_wrap .ea-calendar-header_changer {
|
|
68
|
-
display: none;
|
|
69
|
-
}
|
|
70
|
-
.ea-calendar_wrap.mini .ea-calendar_calendar-wrap .ea-calendar_table td span {
|
|
71
|
-
height: 20px;
|
|
72
|
-
padding: 4px;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createElement } from "../../../../utils/createElement.js";
|
|
2
|
-
|
|
3
|
-
export const createChangerElement = (text, className) => {
|
|
4
|
-
const el = createElement('ea-button', `ea-calendar-header_sg-changer ea-calendar-header_changer-${className}`);
|
|
5
|
-
|
|
6
|
-
el.innerText = text;
|
|
7
|
-
el.size = "small";
|
|
8
|
-
|
|
9
|
-
return el;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createElement } from "../../../../utils/createElement.js";
|
|
2
|
-
export const createThead = (weekArr = ["一", "二", "三", "四", "五", "六", "日"]) => {
|
|
3
|
-
const tr = createElement('tr');
|
|
4
|
-
tr.part = "table-head-row";
|
|
5
|
-
|
|
6
|
-
const ths = weekArr.map(item => {
|
|
7
|
-
const th = createElement('th');
|
|
8
|
-
th.part = "table-head-item";
|
|
9
|
-
|
|
10
|
-
th.innerText = item;
|
|
11
|
-
|
|
12
|
-
return th;
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
tr.append(...ths);
|
|
16
|
-
|
|
17
|
-
return tr;
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export function getToday() {
|
|
2
|
-
const myDate = new Date();
|
|
3
|
-
|
|
4
|
-
return `${myDate.getFullYear()}-${myDate.getMonth() + 1}`
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function getUserToday(date) {
|
|
8
|
-
const myDate = new Date(date);
|
|
9
|
-
|
|
10
|
-
return `${myDate.getFullYear()}-${myDate.getMonth() + 1}`
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export function getUserWeekStart(weekArr, start) {
|
|
2
|
-
if (!weekArr.includes(start)) return weekArr;
|
|
3
|
-
|
|
4
|
-
const index = weekArr.findIndex((item, index) => {
|
|
5
|
-
if (item === start) return index;
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
if (index === 0 || index === -1) return weekArr;
|
|
9
|
-
|
|
10
|
-
return weekArr.slice(index).concat(weekArr.slice(0, index));
|
|
11
|
-
}
|
|
@@ -1,25 +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-card_wrap {
|
|
10
|
-
border-radius: 4px;
|
|
11
|
-
border: 1px solid #ebeef5;
|
|
12
|
-
background-color: #fff;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
color: #303133;
|
|
15
|
-
transition: box-shadow 0.3s;
|
|
16
|
-
}
|
|
17
|
-
.ea-card_wrap.is-always-shadow, .ea-card_wrap.is-hover-shadow:hover {
|
|
18
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
19
|
-
}
|
|
20
|
-
.ea-card_wrap.is-never-shadow {
|
|
21
|
-
box-shadow: none;
|
|
22
|
-
}
|
|
23
|
-
.ea-card_wrap .ea-card_content {
|
|
24
|
-
padding: 20px;
|
|
25
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import Base from '../Base.js';
|
|
3
|
-
|
|
4
|
-
import { stylesheet } from './src/style/stylesheet.js';
|
|
5
|
-
|
|
6
|
-
class EaCard extends Base {
|
|
7
|
-
#wrap;
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
|
|
12
|
-
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
13
|
-
|
|
14
|
-
shadowRoot.innerHTML = `
|
|
15
|
-
<div class="ea-card_wrap" part="container">
|
|
16
|
-
<div class="ea-card_header" part="header-wrap">
|
|
17
|
-
<slot name="header"></slot>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="ea-card_content" part="content-wrap">
|
|
20
|
-
<slot></slot>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
this.#wrap = shadowRoot.querySelector('.ea-card_wrap');
|
|
26
|
-
|
|
27
|
-
this.build(shadowRoot, stylesheet);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// ------- shadow 阴影属性 -------
|
|
31
|
-
// #region
|
|
32
|
-
get shadow() {
|
|
33
|
-
return this.getAttribute('shadow') || "always";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
set shadow(val) {
|
|
37
|
-
this.setAttribute('shadow', val);
|
|
38
|
-
|
|
39
|
-
this.#wrap.classList.add(`is-${val}-shadow`);
|
|
40
|
-
}
|
|
41
|
-
// #endregion
|
|
42
|
-
// ------- end -------
|
|
43
|
-
|
|
44
|
-
connectedCallback() {
|
|
45
|
-
this.shadow = this.shadow;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (!customElements.get('ea-card')) {
|
|
50
|
-
customElements.define('ea-card', EaCard);
|
|
51
|
-
}
|