@rhino-design/vue 0.2.2 → 0.2.3
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/README.md +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/arco.less +14834 -0
- package/dist/components/XAffix.vue.js +7 -0
- package/dist/components/XAffix.vue2.js +181 -0
- package/dist/components/XAlert.vue.js +106 -0
- package/dist/components/XAlert.vue2.js +4 -0
- package/dist/components/XAnchor.vue.js +9 -0
- package/dist/components/XAnchor.vue2.js +204 -0
- package/dist/components/XAnchorLink.vue.js +7 -0
- package/dist/components/XAnchorLink.vue2.js +44 -0
- package/dist/components/XApp.vue.js +12 -0
- package/dist/components/XAutoComplete.vue.js +399 -0
- package/dist/components/XAutoComplete.vue2.js +4 -0
- package/dist/components/XAvatar.vue.js +166 -0
- package/dist/components/XAvatar.vue2.js +4 -0
- package/dist/components/XAvatarGroup.vue.js +27 -0
- package/dist/components/XAvatarGroup.vue2.js +4 -0
- package/dist/components/XBackTop.vue.js +118 -0
- package/dist/components/XBackTop.vue2.js +4 -0
- package/dist/components/XBadge.vue.js +64 -0
- package/dist/components/XBadge.vue2.js +4 -0
- package/dist/components/XBaseMenu.vue.js +37 -0
- package/dist/components/XBaseMenu.vue2.js +334 -0
- package/dist/components/XBreadcrumb.vue.d.ts +12 -7
- package/dist/components/XBreadcrumb.vue.js +97 -0
- package/dist/components/XBreadcrumb.vue2.js +4 -0
- package/dist/components/XBreadcrumbItem.vue.d.ts +7 -4
- package/dist/components/XBreadcrumbItem.vue.js +136 -0
- package/dist/components/XBreadcrumbItem.vue2.js +4 -0
- package/dist/components/XButton.vue.js +7 -0
- package/dist/components/XButton.vue2.js +142 -0
- package/dist/components/XButtonG.vue.js +7 -0
- package/dist/components/XButtonG.vue2.js +67 -0
- package/dist/components/XButtonGroup.vue.js +39 -0
- package/dist/components/XButtonGroup.vue3.js +5 -0
- package/dist/components/XCalendar.vue.js +309 -0
- package/dist/components/XCalendar.vue2.js +4 -0
- package/dist/components/XCard.vue.js +80 -0
- package/dist/components/XCard.vue2.js +4 -0
- package/dist/components/XCarousel.vue.js +7 -0
- package/dist/components/XCarousel.vue2.js +150 -0
- package/dist/components/XCarouselItem.vue.js +7 -0
- package/dist/components/XCarouselItem.vue2.js +112 -0
- package/dist/components/XCascader.vue.js +1015 -0
- package/dist/components/XCascader.vue2.js +4 -0
- package/dist/components/XCascaderPanel.vue.js +466 -0
- package/dist/components/XCascaderPanel.vue2.js +4 -0
- package/dist/components/XChatInput.vue.js +7 -0
- package/dist/components/XChatInput.vue2.js +454 -0
- package/dist/components/XCheckbox.vue.js +154 -0
- package/dist/components/XCheckbox.vue2.js +4 -0
- package/dist/components/XCheckboxGroup.vue.js +87 -0
- package/dist/components/XCheckboxGroup.vue2.js +4 -0
- package/dist/components/XCollapse.vue.js +54 -0
- package/dist/components/XCollapse.vue2.js +4 -0
- package/dist/components/XCollapseItem.vue.js +152 -0
- package/dist/components/XCollapseItem.vue2.js +4 -0
- package/dist/components/XColorGroup.vue.js +7 -0
- package/dist/components/XColorGroup.vue2.js +306 -0
- package/dist/components/XColorPicker.vue.js +62 -0
- package/dist/components/XColorPicker.vue2.js +4 -0
- package/dist/components/XComment.vue.js +129 -0
- package/dist/components/XComment.vue2.js +4 -0
- package/dist/components/XCompact.vue.js +17 -0
- package/dist/components/XCompact.vue2.js +4 -0
- package/dist/components/XConfigProvider.vue.js +78 -0
- package/dist/components/XConfigProvider.vue2.js +4 -0
- package/dist/components/XCountdown.vue.js +7 -0
- package/dist/components/XCountdown.vue2.js +104 -0
- package/dist/components/XCropper.vue.js +7 -0
- package/dist/components/XCropper.vue2.js +525 -0
- package/dist/components/XDatePicker.vue.js +1798 -0
- package/dist/components/XDatePicker.vue2.js +4 -0
- package/dist/components/XDescriptions.vue.js +260 -0
- package/dist/components/XDescriptions.vue2.js +4 -0
- package/dist/components/XDescriptionsItem.vue.js +21 -0
- package/dist/components/XDescriptionsItem.vue2.js +4 -0
- package/dist/components/XDgroup.vue.js +21 -0
- package/dist/components/XDgroup.vue2.js +4 -0
- package/dist/components/XDivider.vue.js +54 -0
- package/dist/components/XDivider.vue2.js +4 -0
- package/dist/components/XDoption.vue.js +59 -0
- package/dist/components/XDoption.vue2.js +4 -0
- package/dist/components/XDrawer.vue.js +7 -0
- package/dist/components/XDrawer.vue2.js +320 -0
- package/dist/components/XDrawerService.d.ts +2 -0
- package/dist/components/XDrawerService.js +97 -0
- package/dist/components/XDropdown.vue.d.ts +8 -7
- package/dist/components/XDropdown.vue.js +127 -0
- package/dist/components/XDropdown.vue2.js +4 -0
- package/dist/components/XDropdownButton.vue.js +84 -0
- package/dist/components/XDropdownButton.vue2.js +4 -0
- package/dist/components/XDropdownItem.vue.js +47 -0
- package/dist/components/XDropdownItem.vue2.js +4 -0
- package/dist/components/XDropdownPanel.vue.js +58 -0
- package/dist/components/XDropdownPanel.vue2.js +4 -0
- package/dist/components/XDsubmenu.vue.js +82 -0
- package/dist/components/XDsubmenu.vue2.js +4 -0
- package/dist/components/XEmpty.vue.js +54 -0
- package/dist/components/XEmpty.vue2.js +4 -0
- package/dist/components/XFlex.vue.js +7 -0
- package/dist/components/XFlex.vue2.js +122 -0
- package/dist/components/XFloatButton.vue.js +28 -0
- package/dist/components/XFloatButton.vue2.js +4 -0
- package/dist/components/XFloatButtonGroup.vue.js +17 -0
- package/dist/components/XFloatButtonGroup.vue2.js +4 -0
- package/dist/components/XForm.vue.js +156 -0
- package/dist/components/XForm.vue2.js +4 -0
- package/dist/components/XFormItem.vue.js +425 -0
- package/dist/components/XFormItem.vue2.js +4 -0
- package/dist/components/XGrid.vue.js +7 -0
- package/dist/components/XGrid.vue2.js +88 -0
- package/dist/components/XGridItem.vue.js +8 -0
- package/dist/components/XGridItem.vue2.js +112 -0
- package/dist/components/XGridLayout.vue.js +7 -0
- package/dist/components/XGridLayout.vue2.js +66 -0
- package/dist/components/XGridLayoutItem.vue.js +7 -0
- package/dist/components/XGridLayoutItem.vue2.js +56 -0
- package/dist/components/XIcon.js +5 -0
- package/dist/components/XIconLite.js +8 -0
- package/dist/components/XImage.vue.js +7 -0
- package/dist/components/XImage.vue2.js +241 -0
- package/dist/components/XImageGroup.vue.js +7 -0
- package/dist/components/XImageGroup.vue2.js +22 -0
- package/dist/components/XInput.vue.js +7 -0
- package/dist/components/XInput.vue2.js +537 -0
- package/dist/components/XInputComposite.vue.js +7 -0
- package/dist/components/XInputComposite.vue2.js +176 -0
- package/dist/components/XInputGroup.vue.js +19 -0
- package/dist/components/XInputGroup.vue3.js +5 -0
- package/dist/components/XInputNumber.vue.js +7 -0
- package/dist/components/XInputNumber.vue2.js +344 -0
- package/dist/components/XInputPassword.vue.js +7 -0
- package/dist/components/XInputPassword.vue2.js +125 -0
- package/dist/components/XInputSearch.vue.js +7 -0
- package/dist/components/XInputSearch.vue2.js +154 -0
- package/dist/components/XInputTag.vue.js +367 -0
- package/dist/components/XInputTag.vue2.js +4 -0
- package/dist/components/XLayout.vue.js +22 -0
- package/dist/components/XLayout.vue2.js +4 -0
- package/dist/components/XLayoutContent.vue.js +13 -0
- package/dist/components/XLayoutContent.vue2.js +4 -0
- package/dist/components/XLayoutFooter.vue.js +22 -0
- package/dist/components/XLayoutFooter.vue2.js +4 -0
- package/dist/components/XLayoutHeader.vue.js +128 -0
- package/dist/components/XLayoutHeader.vue2.js +4 -0
- package/dist/components/XLayoutSider.vue.js +108 -0
- package/dist/components/XLayoutSider.vue2.js +4 -0
- package/dist/components/XLink.vue.js +21 -0
- package/dist/components/XLink.vue2.js +4 -0
- package/dist/components/XList.vue.js +295 -0
- package/dist/components/XList.vue2.js +4 -0
- package/dist/components/XListItem.vue.js +53 -0
- package/dist/components/XListItem.vue2.js +4 -0
- package/dist/components/XListItemMeta.vue.js +43 -0
- package/dist/components/XListItemMeta.vue2.js +4 -0
- package/dist/components/XMention.vue.js +456 -0
- package/dist/components/XMention.vue2.js +4 -0
- package/dist/components/XMentions.vue.js +16 -0
- package/dist/components/XMentions.vue2.js +4 -0
- package/dist/components/XMenu.vue.js +57 -0
- package/dist/components/XMenu.vue2.js +123 -0
- package/dist/components/XMenuIndent.vue.js +19 -0
- package/dist/components/XMenuIndent.vue2.js +21 -0
- package/dist/components/XMenuItem.vue.js +71 -0
- package/dist/components/XMenuItem.vue2.js +92 -0
- package/dist/components/XMenuItemGroup.vue.js +27 -0
- package/dist/components/XMenuItemGroup.vue2.js +26 -0
- package/dist/components/XMenuOverflowWrap.vue.js +116 -0
- package/dist/components/XMenuOverflowWrap.vue2.js +4 -0
- package/dist/components/XMessage.vue.js +7 -0
- package/dist/components/XMessage.vue2.js +89 -0
- package/dist/components/XMessageList.js +61 -0
- package/dist/components/XMessageService.js +118 -0
- package/dist/components/XModal.vue.js +7 -0
- package/dist/components/XModal.vue2.js +364 -0
- package/dist/components/XModalService.js +157 -0
- package/dist/components/XNotification.vue.js +7 -0
- package/dist/components/XNotification.vue2.js +107 -0
- package/dist/components/XNotificationList.js +70 -0
- package/dist/components/XNotificationService.js +119 -0
- package/dist/components/XOptgroup.vue.js +14 -0
- package/dist/components/XOptgroup.vue2.js +4 -0
- package/dist/components/XOption.vue.js +21 -0
- package/dist/components/XOption.vue2.js +4 -0
- package/dist/components/XOverflowList.vue.js +149 -0
- package/dist/components/XOverflowList.vue2.js +4 -0
- package/dist/components/XPageHeader.vue.js +84 -0
- package/dist/components/XPageHeader.vue2.js +4 -0
- package/dist/components/XPagination.vue.js +121 -0
- package/dist/components/XPagination.vue2.js +4 -0
- package/dist/components/XPopconfirm.vue.js +90 -0
- package/dist/components/XPopconfirm.vue2.js +4 -0
- package/dist/components/XPopover.vue.js +53 -0
- package/dist/components/XPopover.vue2.js +4 -0
- package/dist/components/XProgress.vue.js +263 -0
- package/dist/components/XProgress.vue2.js +4 -0
- package/dist/components/XQRCode.vue.js +141 -0
- package/dist/components/XQRCode.vue2.js +4 -0
- package/dist/components/XRadio.vue.js +138 -0
- package/dist/components/XRadio.vue2.js +4 -0
- package/dist/components/XRadioButton.vue.js +41 -0
- package/dist/components/XRadioButton.vue2.js +4 -0
- package/dist/components/XRadioGroup.vue.js +168 -0
- package/dist/components/XRadioGroup.vue2.js +4 -0
- package/dist/components/XRate.vue.js +145 -0
- package/dist/components/XRate.vue2.js +4 -0
- package/dist/components/XResizeBox.vue.js +184 -0
- package/dist/components/XResizeBox.vue2.js +4 -0
- package/dist/components/XResult.vue.js +78 -0
- package/dist/components/XResult.vue2.js +4 -0
- package/dist/components/XRichTextEditor.vue.js +7 -0
- package/dist/components/XRichTextEditor.vue2.js +742 -0
- package/dist/components/XScrollbar.vue.d.ts +192 -0
- package/dist/components/XScrollbar.vue.js +190 -0
- package/dist/components/XScrollbar.vue2.js +4 -0
- package/dist/components/XScrollbarThumb.vue.d.ts +2 -6
- package/dist/components/XScrollbarThumb.vue.js +97 -0
- package/dist/components/XScrollbarThumb.vue2.js +4 -0
- package/dist/components/XSegmented.vue.js +7 -0
- package/dist/components/XSegmented.vue2.js +71 -0
- package/dist/components/XSelect.vue.js +858 -0
- package/dist/components/XSelect.vue2.js +4 -0
- package/dist/components/XSkeleton.vue.js +37 -0
- package/dist/components/XSkeleton.vue2.js +59 -0
- package/dist/components/XSkeletonLine.vue.js +36 -0
- package/dist/components/XSkeletonLine.vue2.js +4 -0
- package/dist/components/XSkeletonShape.vue.js +21 -0
- package/dist/components/XSkeletonShape.vue2.js +4 -0
- package/dist/components/XSlider.vue.js +402 -0
- package/dist/components/XSlider.vue2.js +4 -0
- package/dist/components/XSpace.vue.js +125 -0
- package/dist/components/XSpace.vue2.js +4 -0
- package/dist/components/XSpin.vue.js +54 -0
- package/dist/components/XSpin.vue2.js +4 -0
- package/dist/components/XSplit.vue.js +7 -0
- package/dist/components/XSplit.vue2.js +126 -0
- package/dist/components/XStatistic.vue.js +7 -0
- package/dist/components/XStatistic.vue2.js +176 -0
- package/dist/components/XStep.vue.js +91 -0
- package/dist/components/XStep.vue2.js +4 -0
- package/dist/components/XSteps.vue.js +73 -0
- package/dist/components/XSteps.vue2.js +4 -0
- package/dist/components/XSubMenu.vue.js +109 -0
- package/dist/components/XSubMenu.vue2.js +69 -0
- package/dist/components/XSubMenuInline.vue.js +74 -0
- package/dist/components/XSubMenuInline.vue2.js +56 -0
- package/dist/components/XSubMenuPop.vue.js +91 -0
- package/dist/components/XSubMenuPop.vue2.js +113 -0
- package/dist/components/XSwitch.vue.js +133 -0
- package/dist/components/XSwitch.vue2.js +4 -0
- package/dist/components/XTabPane.vue.js +59 -0
- package/dist/components/XTabPane.vue2.js +4 -0
- package/dist/components/XTable.vue.js +7 -0
- package/dist/components/XTable.vue2.js +1059 -0
- package/dist/components/XTableFilter.vue.js +7 -0
- package/dist/components/XTableFilter.vue2.js +141 -0
- package/dist/components/XTabs.vue.js +402 -0
- package/dist/components/XTabs.vue2.js +4 -0
- package/dist/components/XTag.vue.js +126 -0
- package/dist/components/XTag.vue2.js +4 -0
- package/dist/components/XTextarea.vue.js +261 -0
- package/dist/components/XTextarea.vue2.js +4 -0
- package/dist/components/XTimePicker.vue.js +827 -0
- package/dist/components/XTimePicker.vue2.js +4 -0
- package/dist/components/XTimeline.vue.js +84 -0
- package/dist/components/XTimeline.vue2.js +4 -0
- package/dist/components/XTimelineItem.vue.js +202 -0
- package/dist/components/XTimelineItem.vue2.js +4 -0
- package/dist/components/XTooltip.vue.js +78 -0
- package/dist/components/XTooltip.vue2.js +4 -0
- package/dist/components/XTour.vue.js +120 -0
- package/dist/components/XTour.vue2.js +4 -0
- package/dist/components/XTr.vue.js +12 -0
- package/dist/components/XTransfer.vue.js +128 -0
- package/dist/components/XTransfer.vue2.js +4 -0
- package/dist/components/XTree.vue.js +7 -0
- package/dist/components/XTree.vue2.js +601 -0
- package/dist/components/XTreeNode.vue.js +7 -0
- package/dist/components/XTreeNode.vue2.js +314 -0
- package/dist/components/XTreeSelect.vue.js +7 -0
- package/dist/components/XTreeSelect.vue2.js +715 -0
- package/dist/components/XTrigger.vue.js +492 -0
- package/dist/components/XTrigger.vue2.js +4 -0
- package/dist/components/XTypography.vue.js +51 -0
- package/dist/components/XTypography.vue2.js +126 -0
- package/dist/components/XTypographyParagraph.vue.js +83 -0
- package/dist/components/XTypographyParagraph.vue2.js +4 -0
- package/dist/components/XTypographyText.vue.js +76 -0
- package/dist/components/XTypographyText.vue2.js +4 -0
- package/dist/components/XTypographyTitle.vue.js +77 -0
- package/dist/components/XTypographyTitle.vue2.js +4 -0
- package/dist/components/XUpload.vue.js +7 -0
- package/dist/components/XUpload.vue2.js +1060 -0
- package/dist/components/XVerificationCode.vue.js +149 -0
- package/dist/components/XVerificationCode.vue2.js +4 -0
- package/dist/components/XWatermark.vue.js +204 -0
- package/dist/components/XWatermark.vue2.js +4 -0
- package/dist/components/index.d.ts +10 -6
- package/dist/components/index.js +308 -0
- package/dist/components/result-assets/result-403.svg.js +4 -0
- package/dist/components/result-assets/result-404.svg.js +4 -0
- package/dist/components/result-assets/result-500.svg.js +4 -0
- package/dist/components/statistic-utils.js +81 -0
- package/dist/components/timelineContext.js +4 -0
- package/dist/components/x-breadcrumb-context.js +4 -0
- package/dist/components/x-checkbox-context.js +4 -0
- package/dist/components/x-dropdown-context.js +4 -0
- package/dist/components/x-icon-shared.js +151 -0
- package/dist/components/x-radio-context.js +4 -0
- package/dist/components/x-scrollbar-types.d.ts +5 -0
- package/dist/composables/collapse.js +9 -0
- package/dist/composables/config-provider.js +48 -0
- package/dist/composables/config.js +39 -0
- package/dist/composables/form.js +397 -0
- package/dist/composables/i18n.js +257 -0
- package/dist/composables/menu-context.js +6 -0
- package/dist/composables/menu-hooks/use-level.js +25 -0
- package/dist/composables/menu-hooks/use-menu-context.js +8 -0
- package/dist/composables/menu-hooks/use-menu-data-collector.js +63 -0
- package/dist/composables/menu-hooks/use-menu-open-state.js +120 -0
- package/dist/composables/menu-hooks/use-menu.js +19 -0
- package/dist/composables/popup.js +177 -0
- package/dist/composables/scrollbar-visibility.js +96 -0
- package/dist/composables/steps.js +9 -0
- package/dist/composables/tabs.js +10 -0
- package/dist/composables/theme-context.js +24 -0
- package/dist/composables/theme.js +53 -0
- package/dist/composables/useMergeState.js +27 -0
- package/dist/composables/useResponsive.js +36 -0
- package/dist/iconfont/generated/icons/guanbi.js +7 -0
- package/dist/iconfont/generated/icons/shijian.js +7 -0
- package/dist/iconfont/internal-icons.js +71 -0
- package/dist/index.cjs +1 -2
- package/dist/index.css +14834 -0
- package/dist/index.js +382 -31255
- package/dist/index.less +14834 -0
- package/dist/install.js +39 -0
- package/dist/locales/ar-EG.js +5 -0
- package/dist/locales/da-DK.js +5 -0
- package/dist/locales/de-DE.js +5 -0
- package/dist/locales/en-US.js +312 -0
- package/dist/locales/es-ES.js +5 -0
- package/dist/locales/fr-FR.js +5 -0
- package/dist/locales/id-ID.js +5 -0
- package/dist/locales/it-IT.js +5 -0
- package/dist/locales/ja-JP.js +5 -0
- package/dist/locales/km-KH.js +5 -0
- package/dist/locales/ko-KR.js +5 -0
- package/dist/locales/ms-MY.js +5 -0
- package/dist/locales/nl-NL.js +5 -0
- package/dist/locales/pt-PT.js +5 -0
- package/dist/locales/ru-RU.js +5 -0
- package/dist/locales/th-TH.js +5 -0
- package/dist/locales/vi-VN.js +5 -0
- package/dist/locales/zh-CN.js +312 -0
- package/dist/locales/zh-TW.js +5 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +23 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/style.css +14834 -1
- package/dist/style.less +14834 -0
- package/package.json +12 -4
- package/dist/components/XRangePicker.vue.d.ts +0 -45
- package/dist/components/__tests__/XAffix.test.d.ts +0 -1
- package/dist/components/__tests__/XAutoComplete.test.d.ts +0 -1
- package/dist/components/__tests__/XBackTop.test.d.ts +0 -1
- package/dist/components/__tests__/XBreadcrumb.test.d.ts +0 -1
- package/dist/components/__tests__/XButton.test.d.ts +0 -1
- package/dist/components/__tests__/XCard.test.d.ts +0 -1
- package/dist/components/__tests__/XCarousel.test.d.ts +0 -1
- package/dist/components/__tests__/XCascader.test.d.ts +0 -1
- package/dist/components/__tests__/XCheckbox.test.d.ts +0 -1
- package/dist/components/__tests__/XCollapse.test.d.ts +0 -1
- package/dist/components/__tests__/XComplexTriggerTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XCropper.test.d.ts +0 -1
- package/dist/components/__tests__/XDropdown.test.d.ts +0 -1
- package/dist/components/__tests__/XImage.test.d.ts +0 -1
- package/dist/components/__tests__/XMention.test.d.ts +0 -1
- package/dist/components/__tests__/XMenuAccordion.test.d.ts +0 -1
- package/dist/components/__tests__/XOverflowList.test.d.ts +0 -1
- package/dist/components/__tests__/XOverlayServiceTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XPageHeader.test.d.ts +0 -1
- package/dist/components/__tests__/XRadioGroup.test.d.ts +0 -1
- package/dist/components/__tests__/XResizeBox.test.d.ts +0 -1
- package/dist/components/__tests__/XSkeleton.test.d.ts +0 -1
- package/dist/components/__tests__/XStatistic.test.d.ts +0 -1
- package/dist/components/__tests__/XSteps.test.d.ts +0 -1
- package/dist/components/__tests__/XSwitch.test.d.ts +0 -1
- package/dist/components/__tests__/XTable.test.d.ts +0 -1
- package/dist/components/__tests__/XTabs.test.d.ts +0 -1
- package/dist/components/__tests__/XTag.test.d.ts +0 -1
- package/dist/components/__tests__/XThemeAttrAllComponentsSmoke.test.d.ts +0 -1
- package/dist/components/__tests__/XThemeAttrsForwarding.test.d.ts +0 -1
- package/dist/components/__tests__/XTimePicker.test.d.ts +0 -1
- package/dist/components/__tests__/XTour.test.d.ts +0 -1
- package/dist/components/__tests__/XTree.test.d.ts +0 -1
- package/dist/components/__tests__/XTreeSelect.test.d.ts +0 -1
- package/dist/components/__tests__/XTrigger.test.d.ts +0 -1
- package/dist/components/__tests__/XTriggerWrappersTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XWatermark.test.d.ts +0 -1
- package/dist/favicon.ico +0 -1
- package/dist/favicon.svg +0 -5
- package/dist/images/carousel-0.png +0 -0
- package/dist/images/carousel-2.png +0 -0
- package/dist/images/carousel-3.png +0 -0
- package/dist/images/image-1.png +0 -0
- package/dist/img/avatar-1.jpg +0 -0
- package/dist/img/avatar.jpg +0 -0
- package/dist/img/avatar0.jpg +0 -0
- package/dist/img/avatar1.jpg +0 -0
- package/dist/img/image-1.png +0 -0
- package/dist/img/image-2.png +0 -0
- package/dist/img/image-3.png +0 -0
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as c, h as i, TransitionGroup as r } from "vue";
|
|
2
|
+
import f from "./XNotification.vue.js";
|
|
3
|
+
function u(t) {
|
|
4
|
+
return t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5
|
+
}
|
|
6
|
+
function n(t) {
|
|
7
|
+
if (t != null)
|
|
8
|
+
return typeof t == "function" ? t : () => t;
|
|
9
|
+
}
|
|
10
|
+
const y = c({
|
|
11
|
+
name: "XNotificationList",
|
|
12
|
+
props: {
|
|
13
|
+
notifications: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
},
|
|
17
|
+
position: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "topRight"
|
|
20
|
+
},
|
|
21
|
+
zIndex: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 2003
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["close", "afterClose"],
|
|
27
|
+
setup(t, { emit: e }) {
|
|
28
|
+
const s = t.position.includes("Right"), l = `x-notification-list--${u(t.position)}`;
|
|
29
|
+
return () => i(
|
|
30
|
+
r,
|
|
31
|
+
{
|
|
32
|
+
class: ["x-notification-list", l],
|
|
33
|
+
style: { zIndex: `${t.zIndex}` },
|
|
34
|
+
name: s ? "slide-right-notification" : "slide-left-notification",
|
|
35
|
+
onAfterLeave: () => e("afterClose"),
|
|
36
|
+
tag: "ul"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
default: () => t.notifications.map((o) => {
|
|
40
|
+
const a = {
|
|
41
|
+
default: n(o.title),
|
|
42
|
+
content: n(o.content),
|
|
43
|
+
icon: n(o.icon),
|
|
44
|
+
footer: n(o.footer),
|
|
45
|
+
closeIcon: n(o.closeIcon),
|
|
46
|
+
closeIconElement: n(o.closeIconElement)
|
|
47
|
+
};
|
|
48
|
+
return i(
|
|
49
|
+
f,
|
|
50
|
+
{
|
|
51
|
+
key: o.id,
|
|
52
|
+
type: o.type,
|
|
53
|
+
style: o.style,
|
|
54
|
+
class: o.class,
|
|
55
|
+
duration: o.duration,
|
|
56
|
+
closable: o.closable,
|
|
57
|
+
showIcon: o.showIcon,
|
|
58
|
+
resetOnUpdate: o.resetOnUpdate,
|
|
59
|
+
onClose: () => e("close", o.id)
|
|
60
|
+
},
|
|
61
|
+
a
|
|
62
|
+
);
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
y as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var m = (i, t, n) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
|
|
3
|
+
var s = (i, t, n) => m(i, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as v, createVNode as p, render as h } from "vue";
|
|
5
|
+
import C from "./XNotificationList.js";
|
|
6
|
+
import { syncThemeContextToElement as u } from "../composables/theme-context.js";
|
|
7
|
+
function l() {
|
|
8
|
+
return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
9
|
+
}
|
|
10
|
+
class x {
|
|
11
|
+
constructor(t, n) {
|
|
12
|
+
s(this, "notificationIds");
|
|
13
|
+
s(this, "notifications");
|
|
14
|
+
s(this, "position");
|
|
15
|
+
s(this, "container");
|
|
16
|
+
s(this, "notificationCount", 0);
|
|
17
|
+
s(this, "setTheme", (t, n) => {
|
|
18
|
+
this.container && u(this.container, t, n);
|
|
19
|
+
});
|
|
20
|
+
s(this, "add", (t) => {
|
|
21
|
+
this.setTheme(t.theme, l()), this.notificationCount += 1;
|
|
22
|
+
const n = t.id ?? `__x_notification_${this.notificationCount}`;
|
|
23
|
+
if (this.notificationIds.has(n))
|
|
24
|
+
return this.update(n, t);
|
|
25
|
+
const o = { id: n, ...t };
|
|
26
|
+
return this.notifications.value.push(o), this.notificationIds.add(n), {
|
|
27
|
+
close: () => this.remove(n)
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
s(this, "update", (t, n) => {
|
|
31
|
+
for (let o = 0; o < this.notifications.value.length; o += 1)
|
|
32
|
+
if (this.notifications.value[o].id === t) {
|
|
33
|
+
const e = n.duration !== void 0;
|
|
34
|
+
Object.assign(this.notifications.value[o], {
|
|
35
|
+
...n,
|
|
36
|
+
id: t,
|
|
37
|
+
resetOnUpdate: e
|
|
38
|
+
});
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
close: () => this.remove(t)
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
s(this, "remove", (t) => {
|
|
46
|
+
var n;
|
|
47
|
+
for (let o = 0; o < this.notifications.value.length; o += 1) {
|
|
48
|
+
const e = this.notifications.value[o];
|
|
49
|
+
if (e.id === t) {
|
|
50
|
+
(n = e.onClose) == null || n.call(e, t), this.notifications.value.splice(o, 1), this.notificationIds.delete(t);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
s(this, "clear", () => {
|
|
56
|
+
this.notifications.value.splice(0);
|
|
57
|
+
});
|
|
58
|
+
s(this, "destroy", () => {
|
|
59
|
+
this.notifications.value.length === 0 && this.container && (h(null, this.container), this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = null, c[this.position] = void 0);
|
|
60
|
+
});
|
|
61
|
+
const { position: o = "topRight" } = t;
|
|
62
|
+
this.container = document.createElement("div"), this.notificationIds = /* @__PURE__ */ new Set(), this.notifications = v([]), this.position = o;
|
|
63
|
+
const e = p(C, {
|
|
64
|
+
notifications: this.notifications.value,
|
|
65
|
+
position: o,
|
|
66
|
+
onClose: this.remove,
|
|
67
|
+
onAfterClose: this.destroy
|
|
68
|
+
});
|
|
69
|
+
(n ?? r._context) && (e.appContext = n ?? r._context), h(e, this.container), u(this.container, t.theme, l()), document.body.appendChild(this.container);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const c = {};
|
|
73
|
+
function _(i) {
|
|
74
|
+
return typeof i == "string" ? { content: i } : i;
|
|
75
|
+
}
|
|
76
|
+
function f(i, t, n) {
|
|
77
|
+
const o = _(t), e = { type: i, ...o }, { position: a = "topRight" } = e;
|
|
78
|
+
return c[a] || (c[a] = new x(e, n ?? r._context)), c[a].setTheme(e.theme, l()), c[a].add(e);
|
|
79
|
+
}
|
|
80
|
+
const r = {
|
|
81
|
+
info(i, t) {
|
|
82
|
+
return f("info", i, t);
|
|
83
|
+
},
|
|
84
|
+
success(i, t) {
|
|
85
|
+
return f("success", i, t);
|
|
86
|
+
},
|
|
87
|
+
warning(i, t) {
|
|
88
|
+
return f("warning", i, t);
|
|
89
|
+
},
|
|
90
|
+
error(i, t) {
|
|
91
|
+
return f("error", i, t);
|
|
92
|
+
},
|
|
93
|
+
remove(i) {
|
|
94
|
+
i && Object.values(c).forEach((t) => t == null ? void 0 : t.remove(i));
|
|
95
|
+
},
|
|
96
|
+
clear(i) {
|
|
97
|
+
var t;
|
|
98
|
+
if (i) {
|
|
99
|
+
(t = c[i]) == null || t.clear();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
Object.values(c).forEach((n) => n == null ? void 0 : n.clear());
|
|
103
|
+
},
|
|
104
|
+
install(i) {
|
|
105
|
+
const t = {
|
|
106
|
+
info: (n, o = i._context) => r.info(n, o),
|
|
107
|
+
success: (n, o = i._context) => r.success(n, o),
|
|
108
|
+
warning: (n, o = i._context) => r.warning(n, o),
|
|
109
|
+
error: (n, o = i._context) => r.error(n, o),
|
|
110
|
+
remove: r.remove,
|
|
111
|
+
clear: r.clear
|
|
112
|
+
};
|
|
113
|
+
i.config.globalProperties.$notification = t;
|
|
114
|
+
},
|
|
115
|
+
_context: null
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
r as Notification
|
|
119
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as t, renderSlot as r } from "vue";
|
|
2
|
+
const s = /* @__PURE__ */ t({
|
|
3
|
+
__name: "XOptgroup",
|
|
4
|
+
props: {
|
|
5
|
+
theme: {},
|
|
6
|
+
label: {}
|
|
7
|
+
},
|
|
8
|
+
setup(o) {
|
|
9
|
+
return (e, p) => r(e.$slots, "default");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
s as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as a, renderSlot as o, createTextVNode as n, toDisplayString as r } from "vue";
|
|
2
|
+
const p = /* @__PURE__ */ a({
|
|
3
|
+
__name: "XOption",
|
|
4
|
+
props: {
|
|
5
|
+
theme: {},
|
|
6
|
+
value: { type: [String, Number, Boolean, Object] },
|
|
7
|
+
label: {},
|
|
8
|
+
disabled: { type: Boolean },
|
|
9
|
+
tagProps: {},
|
|
10
|
+
extra: {},
|
|
11
|
+
index: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (t, l) => o(t.$slots, "default", {}, () => [
|
|
15
|
+
n(r(e.label ?? e.value), 1)
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
p as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { defineComponent as z, ref as b, computed as C, watch as N, onMounted as F, onBeforeUnmount as M, mergeProps as L, h as R, isVNode as P, Comment as S, Fragment as j } from "vue";
|
|
2
|
+
import k from "./XTag.vue.js";
|
|
3
|
+
const G = 1, H = 6;
|
|
4
|
+
function T(n) {
|
|
5
|
+
const s = [];
|
|
6
|
+
for (let l = 0; l < n.length; l += 1)
|
|
7
|
+
s[l] = n[n.length - 1 - l];
|
|
8
|
+
return s;
|
|
9
|
+
}
|
|
10
|
+
function B(n) {
|
|
11
|
+
const s = [], l = (a) => {
|
|
12
|
+
var m, g, W, u;
|
|
13
|
+
for (const e of a ?? [])
|
|
14
|
+
if (e) {
|
|
15
|
+
if (Array.isArray(e)) {
|
|
16
|
+
l(e);
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
if (P(e) && e.type !== S) {
|
|
20
|
+
if (e.type === j) {
|
|
21
|
+
Array.isArray(e.children) ? l(e.children) : e.children && typeof e.children == "object" && "default" in e.children && typeof e.children.default == "function" && l((g = (m = e.children).default) == null ? void 0 : g.call(m));
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (e.shapeFlag & G || e.shapeFlag & H) {
|
|
25
|
+
s.push(e);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
Array.isArray(e.children) ? l(e.children) : e.children && typeof e.children == "object" && "default" in e.children && typeof e.children.default == "function" && l((u = (W = e.children).default) == null ? void 0 : u.call(W));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return l(n), s;
|
|
33
|
+
}
|
|
34
|
+
const X = z({
|
|
35
|
+
name: "XOverflowList",
|
|
36
|
+
props: {
|
|
37
|
+
min: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 0
|
|
40
|
+
},
|
|
41
|
+
margin: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 8
|
|
44
|
+
},
|
|
45
|
+
from: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "end"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: {
|
|
51
|
+
change: (n) => typeof n == "number"
|
|
52
|
+
},
|
|
53
|
+
setup(n, { attrs: s, emit: l, slots: a }) {
|
|
54
|
+
const m = "x-overflow-list", g = b(), W = b(), u = b(), e = { value: [] }, A = [], c = b(0), t = b(0), $ = C(() => t.value > 0), E = b(0), d = C(() => n.from === "start");
|
|
55
|
+
let w = null, _ = !1;
|
|
56
|
+
N(c, (i, f) => {
|
|
57
|
+
t.value > 0 && (t.value += i - f, t.value < 0 && (t.value = 0));
|
|
58
|
+
}), N(t, (i) => {
|
|
59
|
+
l("change", i);
|
|
60
|
+
});
|
|
61
|
+
const p = () => {
|
|
62
|
+
var v;
|
|
63
|
+
if (!g.value || !u.value)
|
|
64
|
+
return;
|
|
65
|
+
if (c.value === 0) {
|
|
66
|
+
t.value !== 0 && (t.value = 0);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const i = u.value.offsetWidth;
|
|
70
|
+
if (i > 1 && (t.value === 0 || i < E.value))
|
|
71
|
+
return;
|
|
72
|
+
for (let o = 0; o < e.value.length; o += 1) {
|
|
73
|
+
const h = e.value[o].el;
|
|
74
|
+
h && h.offsetWidth && (A[o] = h.offsetWidth + n.margin);
|
|
75
|
+
}
|
|
76
|
+
let f = g.value.clientWidth - (((v = W.value) == null ? void 0 : v.offsetWidth) ?? 0) - (d.value ? n.margin : 0);
|
|
77
|
+
const y = d.value ? T(A) : A;
|
|
78
|
+
let r = 0;
|
|
79
|
+
for (let o = 0; o < y.length; o += 1) {
|
|
80
|
+
const h = y[o] ?? 0;
|
|
81
|
+
if (h < f - 1)
|
|
82
|
+
f -= h, r += 1;
|
|
83
|
+
else {
|
|
84
|
+
E.value = h;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
r < n.min && n.min < c.value && (r = n.min);
|
|
89
|
+
const x = c.value - r;
|
|
90
|
+
t.value !== x && (t.value = x);
|
|
91
|
+
};
|
|
92
|
+
N($, () => p(), { flush: "post" }), N(() => [n.from, n.margin, n.min], () => p(), { flush: "post" }), F(() => {
|
|
93
|
+
typeof ResizeObserver < "u" && u.value ? (w = new ResizeObserver(() => {
|
|
94
|
+
p();
|
|
95
|
+
}), w.observe(u.value)) : typeof window < "u" && (_ = !0, window.addEventListener("resize", p)), u.value && u.value.offsetWidth < 1 && p();
|
|
96
|
+
}), M(() => {
|
|
97
|
+
w == null || w.disconnect(), w = null, _ && typeof window < "u" && window.removeEventListener("resize", p);
|
|
98
|
+
});
|
|
99
|
+
const O = () => {
|
|
100
|
+
var f;
|
|
101
|
+
const i = (f = a.overflow) == null ? void 0 : f.call(a, { number: t.value });
|
|
102
|
+
return R(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
ref: W,
|
|
106
|
+
class: `${m}-overflow`,
|
|
107
|
+
style: d.value ? { marginRight: `${n.margin}px` } : void 0
|
|
108
|
+
},
|
|
109
|
+
i && i.length > 0 ? i : [
|
|
110
|
+
R(
|
|
111
|
+
k,
|
|
112
|
+
null,
|
|
113
|
+
{
|
|
114
|
+
default: () => `+${t.value}`
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
]
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
return () => {
|
|
121
|
+
var x;
|
|
122
|
+
e.value = B((x = a.default) == null ? void 0 : x.call(a)), c.value !== e.value.length && (c.value = e.value.length, A.length = c.value);
|
|
123
|
+
let i = e.value;
|
|
124
|
+
t.value > 0 && (i = d.value ? e.value.slice(t.value) : e.value.slice(0, -t.value));
|
|
125
|
+
const f = t.value === 0 || d.value ? i.length - 1 : i.length, y = [...i];
|
|
126
|
+
for (let v = 0; v < f; v += 1)
|
|
127
|
+
y[v].props = L(y[v].props ?? {}, {
|
|
128
|
+
style: { marginRight: `${n.margin}px` }
|
|
129
|
+
});
|
|
130
|
+
const r = [];
|
|
131
|
+
return d.value && t.value > 0 && r.push(O()), r.push(...y), !d.value && t.value > 0 && r.push(O()), r.push(
|
|
132
|
+
R("div", {
|
|
133
|
+
ref: u,
|
|
134
|
+
class: `${m}-spacer`
|
|
135
|
+
})
|
|
136
|
+
), R(
|
|
137
|
+
"div",
|
|
138
|
+
L(s, {
|
|
139
|
+
ref: g,
|
|
140
|
+
class: m
|
|
141
|
+
}),
|
|
142
|
+
r
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
export {
|
|
148
|
+
X as default
|
|
149
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent as k, useSlots as g, computed as c, openBlock as t, createElementBlock as a, mergeProps as f, createElementVNode as l, renderSlot as s, createCommentVNode as o, normalizeClass as x, createVNode as B, unref as $, createTextVNode as i, toDisplayString as u } from "vue";
|
|
2
|
+
import v from "./XIcon.js";
|
|
3
|
+
const y = { class: "x-page-header__wrapper" }, w = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "x-page-header__breadcrumb"
|
|
6
|
+
}, C = { class: "x-page-header__header" }, N = { class: "x-page-header__title" }, S = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "x-page-header__divider"
|
|
9
|
+
}, V = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "x-page-header__subtitle"
|
|
12
|
+
}, z = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "x-page-header__extra"
|
|
15
|
+
}, E = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "x-page-header__content"
|
|
18
|
+
}, H = /* @__PURE__ */ k({
|
|
19
|
+
__name: "XPageHeader",
|
|
20
|
+
props: {
|
|
21
|
+
title: {},
|
|
22
|
+
subtitle: {},
|
|
23
|
+
showBack: { type: Boolean, default: !0 }
|
|
24
|
+
},
|
|
25
|
+
emits: ["back"],
|
|
26
|
+
setup(r, { emit: h }) {
|
|
27
|
+
const p = r, _ = h, n = g(), d = c(() => !!(n.subtitle || p.subtitle)), b = c(() => [
|
|
28
|
+
"x-page-header",
|
|
29
|
+
{
|
|
30
|
+
"x-page-header--with-breadcrumb": !!n.breadcrumb,
|
|
31
|
+
"x-page-header--with-content": !!n.default
|
|
32
|
+
}
|
|
33
|
+
]);
|
|
34
|
+
function m(e) {
|
|
35
|
+
_("back", e);
|
|
36
|
+
}
|
|
37
|
+
return (e, P) => (t(), a("div", f({ class: b.value }, e.$attrs), [
|
|
38
|
+
l("div", y, [
|
|
39
|
+
e.$slots.breadcrumb ? (t(), a("div", w, [
|
|
40
|
+
s(e.$slots, "breadcrumb")
|
|
41
|
+
])) : o("", !0),
|
|
42
|
+
l("div", C, [
|
|
43
|
+
l("span", {
|
|
44
|
+
class: x(["x-page-header__main", { "x-page-header__main--with-back": r.showBack }])
|
|
45
|
+
}, [
|
|
46
|
+
r.showBack ? (t(), a("button", {
|
|
47
|
+
key: 0,
|
|
48
|
+
type: "button",
|
|
49
|
+
class: "x-page-header__back-btn x-page-header__back",
|
|
50
|
+
onClick: m
|
|
51
|
+
}, [
|
|
52
|
+
s(e.$slots, "back-icon", {}, () => [
|
|
53
|
+
B($(v), {
|
|
54
|
+
name: "fanhui",
|
|
55
|
+
size: 14
|
|
56
|
+
})
|
|
57
|
+
])
|
|
58
|
+
])) : o("", !0),
|
|
59
|
+
l("span", N, [
|
|
60
|
+
s(e.$slots, "title", {}, () => [
|
|
61
|
+
i(u(r.title), 1)
|
|
62
|
+
])
|
|
63
|
+
]),
|
|
64
|
+
d.value ? (t(), a("span", S)) : o("", !0),
|
|
65
|
+
d.value ? (t(), a("span", V, [
|
|
66
|
+
s(e.$slots, "subtitle", {}, () => [
|
|
67
|
+
i(u(r.subtitle), 1)
|
|
68
|
+
])
|
|
69
|
+
])) : o("", !0)
|
|
70
|
+
], 2),
|
|
71
|
+
e.$slots.extra ? (t(), a("span", z, [
|
|
72
|
+
s(e.$slots, "extra")
|
|
73
|
+
])) : o("", !0)
|
|
74
|
+
])
|
|
75
|
+
]),
|
|
76
|
+
e.$slots.default ? (t(), a("div", E, [
|
|
77
|
+
s(e.$slots, "default")
|
|
78
|
+
])) : o("", !0)
|
|
79
|
+
], 16));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
H as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as B, computed as f, ref as T, watch as N, openBlock as s, createElementBlock as u, normalizeClass as b, toDisplayString as r, createCommentVNode as y, createElementVNode as x, unref as d, Fragment as z, renderList as S, createTextVNode as M, withDirectives as V, withKeys as J, vModelText as O } from "vue";
|
|
2
|
+
import { useXI18n as j } from "../composables/i18n.js";
|
|
3
|
+
const D = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "x-pagination__total"
|
|
6
|
+
}, E = ["disabled"], K = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "x-pagination__simple"
|
|
9
|
+
}, X = ["disabled", "onClick"], A = ["disabled"], F = {
|
|
10
|
+
key: 3,
|
|
11
|
+
class: "x-pagination__size"
|
|
12
|
+
}, I = ["value"], L = ["value"], U = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "x-pagination__jumper"
|
|
15
|
+
}, q = ["max"], Q = /* @__PURE__ */ B({
|
|
16
|
+
__name: "XPagination",
|
|
17
|
+
props: {
|
|
18
|
+
current: { default: 1 },
|
|
19
|
+
total: { default: 0 },
|
|
20
|
+
pageSize: { default: 10 },
|
|
21
|
+
pageSizeOptions: { default: () => [10, 20, 50, 100] },
|
|
22
|
+
showTotal: { type: Boolean, default: !1 },
|
|
23
|
+
showJumper: { type: Boolean, default: !1 },
|
|
24
|
+
showPageSize: { type: Boolean, default: !1 },
|
|
25
|
+
simple: { type: Boolean, default: !1 },
|
|
26
|
+
size: { default: "medium" }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:current", "update:pageSize", "change", "pageSizeChange"],
|
|
29
|
+
setup(l, { emit: k }) {
|
|
30
|
+
const a = l, c = k, { t: p } = j(), n = f(() => Math.max(1, a.current)), o = f(() => Math.max(1, Math.ceil(a.total / a.pageSize))), g = T(String(n.value));
|
|
31
|
+
N(
|
|
32
|
+
() => n.value,
|
|
33
|
+
(i) => {
|
|
34
|
+
g.value = String(i);
|
|
35
|
+
},
|
|
36
|
+
{ immediate: !0 }
|
|
37
|
+
);
|
|
38
|
+
const C = f(() => {
|
|
39
|
+
if (a.simple) return [];
|
|
40
|
+
if (o.value <= 7)
|
|
41
|
+
return Array.from({ length: o.value }, (h, P) => P + 1);
|
|
42
|
+
const i = Math.min(n.value, o.value), t = [1], e = Math.max(2, i - 1), m = Math.min(o.value - 1, i + 1);
|
|
43
|
+
e > 2 && t.push("ellipsis-left");
|
|
44
|
+
for (let h = e; h <= m; h += 1)
|
|
45
|
+
t.push(h);
|
|
46
|
+
return m < o.value - 1 && t.push("ellipsis-right"), t.push(o.value), t;
|
|
47
|
+
}), w = f(() => {
|
|
48
|
+
const i = Math.min((n.value - 1) * a.pageSize + 1, a.total || 0), t = Math.min(n.value * a.pageSize, a.total || 0), e = p("pagination.totalText", { total: a.total }, `共 ${a.total} 条`);
|
|
49
|
+
if (!a.total) return e;
|
|
50
|
+
const m = p("pagination.rangeText", { start: i, end: t }, `,第 ${i}-${t} 条`);
|
|
51
|
+
return `${e}${m}`;
|
|
52
|
+
});
|
|
53
|
+
function v(i) {
|
|
54
|
+
const t = Math.min(o.value, Math.max(1, i));
|
|
55
|
+
t !== n.value && (c("update:current", t), c("change", t, a.pageSize));
|
|
56
|
+
}
|
|
57
|
+
function $(i) {
|
|
58
|
+
const t = Number(i.target.value) || a.pageSize;
|
|
59
|
+
c("update:pageSize", t), c("pageSizeChange", t);
|
|
60
|
+
const e = Math.min(Math.max(1, n.value), Math.max(1, Math.ceil(a.total / t)));
|
|
61
|
+
c("update:current", e), c("change", e, t);
|
|
62
|
+
}
|
|
63
|
+
function _() {
|
|
64
|
+
v(Number(g.value) || 1);
|
|
65
|
+
}
|
|
66
|
+
return (i, t) => (s(), u("div", {
|
|
67
|
+
class: b(["x-pagination", [`x-pagination--${l.size}`, { "is-simple": l.simple }]])
|
|
68
|
+
}, [
|
|
69
|
+
l.showTotal ? (s(), u("span", D, r(w.value), 1)) : y("", !0),
|
|
70
|
+
x("button", {
|
|
71
|
+
type: "button",
|
|
72
|
+
class: "x-pagination__control",
|
|
73
|
+
disabled: n.value <= 1,
|
|
74
|
+
onClick: t[0] || (t[0] = (e) => v(n.value - 1))
|
|
75
|
+
}, r(d(p)("pagination.prevPage", void 0, "上一页")), 9, E),
|
|
76
|
+
l.simple ? (s(), u("span", K, r(n.value) + " / " + r(o.value), 1)) : (s(!0), u(z, { key: 2 }, S(C.value, (e) => (s(), u("button", {
|
|
77
|
+
key: String(e),
|
|
78
|
+
type: "button",
|
|
79
|
+
class: b(["x-pagination__page", { "is-active": e === n.value, "is-ellipsis": typeof e != "number" }]),
|
|
80
|
+
disabled: typeof e != "number",
|
|
81
|
+
onClick: (m) => typeof e == "number" && v(e)
|
|
82
|
+
}, r(typeof e == "number" ? e : "..."), 11, X))), 128)),
|
|
83
|
+
x("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
class: "x-pagination__control",
|
|
86
|
+
disabled: n.value >= o.value,
|
|
87
|
+
onClick: t[1] || (t[1] = (e) => v(n.value + 1))
|
|
88
|
+
}, r(d(p)("pagination.nextPage", void 0, "下一页")), 9, A),
|
|
89
|
+
l.showPageSize ? (s(), u("label", F, [
|
|
90
|
+
x("select", {
|
|
91
|
+
class: "x-pagination__select",
|
|
92
|
+
value: l.pageSize,
|
|
93
|
+
onChange: $
|
|
94
|
+
}, [
|
|
95
|
+
(s(!0), u(z, null, S(l.pageSizeOptions, (e) => (s(), u("option", {
|
|
96
|
+
key: e,
|
|
97
|
+
value: e
|
|
98
|
+
}, r(d(p)("pagination.pageSizeOption", { size: e }, `${e} / 页`)), 9, L))), 128))
|
|
99
|
+
], 40, I)
|
|
100
|
+
])) : y("", !0),
|
|
101
|
+
l.showJumper ? (s(), u("label", U, [
|
|
102
|
+
M(r(d(p)("pagination.goto", void 0, "跳至")) + " ", 1),
|
|
103
|
+
V(x("input", {
|
|
104
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => g.value = e),
|
|
105
|
+
class: "x-pagination__input",
|
|
106
|
+
type: "number",
|
|
107
|
+
min: "1",
|
|
108
|
+
max: o.value,
|
|
109
|
+
onKeydown: J(_, ["enter"]),
|
|
110
|
+
onBlur: _
|
|
111
|
+
}, null, 40, q), [
|
|
112
|
+
[O, g.value]
|
|
113
|
+
]),
|
|
114
|
+
M(" " + r(d(p)("pagination.page", void 0, "页")), 1)
|
|
115
|
+
])) : y("", !0)
|
|
116
|
+
], 2));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
Q as default
|
|
121
|
+
};
|