@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,118 @@
|
|
|
1
|
+
import { defineComponent as E, ref as g, onMounted as A, onBeforeUnmount as S, resolveComponent as w, openBlock as O, createBlock as B, Transition as F, withCtx as y, createElementBlock as H, renderSlot as L, createElementVNode as N, createVNode as V, createCommentVNode as P } from "vue";
|
|
2
|
+
const U = {
|
|
3
|
+
type: "button",
|
|
4
|
+
class: "x-back-top-btn"
|
|
5
|
+
}, X = /* @__PURE__ */ E({
|
|
6
|
+
__name: "XBackTop",
|
|
7
|
+
props: {
|
|
8
|
+
visibleHeight: { default: 200 },
|
|
9
|
+
targetContainer: {},
|
|
10
|
+
easing: { default: "quartOut" },
|
|
11
|
+
duration: { default: 200 }
|
|
12
|
+
},
|
|
13
|
+
setup(b) {
|
|
14
|
+
const o = b, m = g(!1), n = g(null);
|
|
15
|
+
let l = !0, a = 0, i = 0, t = null;
|
|
16
|
+
const p = {
|
|
17
|
+
linear: (e) => e,
|
|
18
|
+
quadIn: (e) => e * e,
|
|
19
|
+
quadOut: (e) => e * (2 - e),
|
|
20
|
+
quadInOut: (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e,
|
|
21
|
+
cubicIn: (e) => e * e * e,
|
|
22
|
+
cubicOut: (e) => {
|
|
23
|
+
const r = e - 1;
|
|
24
|
+
return r * r * r + 1;
|
|
25
|
+
},
|
|
26
|
+
cubicInOut: (e) => e < 0.5 ? 4 * e * e * e : 1 + 4 * (e - 1) * (e - 1) * (e - 1),
|
|
27
|
+
quartIn: (e) => e * e * e * e,
|
|
28
|
+
quartOut: (e) => 1 - (1 - e) ** 4,
|
|
29
|
+
quartInOut: (e) => e < 0.5 ? 8 * e * e * e * e : 1 - 8 * (1 - e) ** 4,
|
|
30
|
+
quintIn: (e) => e ** 5,
|
|
31
|
+
quintOut: (e) => 1 - (1 - e) ** 5,
|
|
32
|
+
quintInOut: (e) => e < 0.5 ? 16 * e ** 5 : 1 - 16 * (1 - e) ** 5,
|
|
33
|
+
sineIn: (e) => 1 - Math.cos(e * Math.PI / 2),
|
|
34
|
+
sineOut: (e) => Math.sin(e * Math.PI / 2),
|
|
35
|
+
sineInOut: (e) => -(Math.cos(Math.PI * e) - 1) / 2,
|
|
36
|
+
expoIn: (e) => e === 0 ? 0 : 2 ** (10 * (e - 1)),
|
|
37
|
+
expoOut: (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e),
|
|
38
|
+
expoInOut: (e) => e === 0 || e === 1 ? e : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2,
|
|
39
|
+
circIn: (e) => 1 - Math.sqrt(1 - e * e),
|
|
40
|
+
circOut: (e) => Math.sqrt(1 - (e - 1) * (e - 1)),
|
|
41
|
+
circInOut: (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e * e)) / 2 : (Math.sqrt(1 - 4 * (1 - e) * (1 - e)) + 1) / 2
|
|
42
|
+
};
|
|
43
|
+
function M(e) {
|
|
44
|
+
return typeof e == "string" ? document.querySelector(e) : e;
|
|
45
|
+
}
|
|
46
|
+
function x(e) {
|
|
47
|
+
return p[e] ?? p.quartOut;
|
|
48
|
+
}
|
|
49
|
+
function c() {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = n.value) == null ? void 0 : e.scrollTop) ?? 0;
|
|
52
|
+
}
|
|
53
|
+
function s(e) {
|
|
54
|
+
n.value && (n.value.scrollTop = e);
|
|
55
|
+
}
|
|
56
|
+
function u() {
|
|
57
|
+
m.value = c() >= o.visibleHeight;
|
|
58
|
+
}
|
|
59
|
+
function v() {
|
|
60
|
+
i && (cancelAnimationFrame(i), i = 0);
|
|
61
|
+
}
|
|
62
|
+
function T() {
|
|
63
|
+
if (!n.value) return;
|
|
64
|
+
v();
|
|
65
|
+
const e = c(), r = Math.max(0, Number(o.duration) || 0);
|
|
66
|
+
if (e <= 0 || r === 0) {
|
|
67
|
+
s(0), u();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const f = x(o.easing);
|
|
71
|
+
let d = 0;
|
|
72
|
+
const h = (q) => {
|
|
73
|
+
d || (d = q);
|
|
74
|
+
const k = q - d, I = Math.min(k / r, 1), C = e * (1 - f(I));
|
|
75
|
+
if (s(C), u(), I < 1 && c() > 0) {
|
|
76
|
+
i = requestAnimationFrame(h);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
s(0), u(), i = 0;
|
|
80
|
+
};
|
|
81
|
+
i = requestAnimationFrame(h);
|
|
82
|
+
}
|
|
83
|
+
function _() {
|
|
84
|
+
return () => {
|
|
85
|
+
a || (a = requestAnimationFrame(() => {
|
|
86
|
+
a = 0, u();
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return A(() => {
|
|
91
|
+
n.value = o.targetContainer ? M(o.targetContainer) ?? null : (document == null ? void 0 : document.documentElement) ?? null, l = !o.targetContainer, n.value && (t = _(), l ? window.addEventListener("scroll", t, { passive: !0 }) : n.value.addEventListener("scroll", t, { passive: !0 }), u());
|
|
92
|
+
}), S(() => {
|
|
93
|
+
var e;
|
|
94
|
+
t && (l ? window.removeEventListener("scroll", t) : (e = n.value) == null || e.removeEventListener("scroll", t), t = null), a && (cancelAnimationFrame(a), a = 0), v();
|
|
95
|
+
}), (e, r) => {
|
|
96
|
+
const f = w("x-icon");
|
|
97
|
+
return O(), B(F, { name: "x-back-top-fade" }, {
|
|
98
|
+
default: y(() => [
|
|
99
|
+
m.value ? (O(), H("div", {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "x-back-top",
|
|
102
|
+
onClick: T
|
|
103
|
+
}, [
|
|
104
|
+
L(e.$slots, "default", {}, () => [
|
|
105
|
+
N("button", U, [
|
|
106
|
+
V(f, { name: "xiangshang" })
|
|
107
|
+
])
|
|
108
|
+
])
|
|
109
|
+
])) : P("", !0)
|
|
110
|
+
]),
|
|
111
|
+
_: 3
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
X as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as p, useSlots as B, computed as s, openBlock as a, createElementBlock as n, createElementVNode as u, normalizeStyle as r, normalizeClass as c, toDisplayString as d, renderSlot as f, createTextVNode as h, createCommentVNode as V } from "vue";
|
|
2
|
+
const w = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "x-badge-status"
|
|
5
|
+
}, z = { class: "x-badge__status-text" }, D = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "x-badge x-badge--standalone"
|
|
8
|
+
}, E = {
|
|
9
|
+
key: 2,
|
|
10
|
+
class: "x-badge"
|
|
11
|
+
}, X = /* @__PURE__ */ p({
|
|
12
|
+
__name: "XBadge",
|
|
13
|
+
props: {
|
|
14
|
+
count: { default: 0 },
|
|
15
|
+
dot: { type: Boolean, default: !1 },
|
|
16
|
+
maxCount: { default: 99 },
|
|
17
|
+
status: { default: "danger" },
|
|
18
|
+
color: { default: "" },
|
|
19
|
+
offset: { default: () => [0, 0] },
|
|
20
|
+
text: { default: "" },
|
|
21
|
+
showZero: { type: Boolean, default: !1 }
|
|
22
|
+
},
|
|
23
|
+
setup(e) {
|
|
24
|
+
const t = e, S = B(), k = s(() => !!S.default), i = s(() => Number(t.count)), g = s(() => !!(t.dot || t.showZero || t.text || String(t.count) !== "0")), x = s(() => !k.value), b = s(() => t.dot ? "" : !Number.isNaN(i.value) && i.value > t.maxCount ? `${t.maxCount}+` : t.count), m = s(() => {
|
|
25
|
+
var C, $;
|
|
26
|
+
const o = {};
|
|
27
|
+
t.color && (o.background = t.color);
|
|
28
|
+
const l = ((C = t.offset) == null ? void 0 : C[0]) ?? 0, y = (($ = t.offset) == null ? void 0 : $[1]) ?? 0;
|
|
29
|
+
return (l !== 0 || y !== 0) && (o.transform = `translate(calc(50% + ${l}px), calc(-50% + ${y}px))`), o;
|
|
30
|
+
}), N = s(() => ({
|
|
31
|
+
background: t.color || void 0
|
|
32
|
+
})), v = s(() => t.color && !t.color.startsWith("#") ? `x-badge__count--${t.color}` : `x-badge__count--${t.status}`), _ = s(() => t.color && !t.color.startsWith("#") ? `x-badge__status-dot--${t.color}` : `x-badge__status-dot--${t.status}`);
|
|
33
|
+
return (o, l) => x.value && e.text ? (a(), n("span", w, [
|
|
34
|
+
u("i", {
|
|
35
|
+
class: c(["x-badge__status-dot", [_.value, { "is-processing": e.status === "processing" }]]),
|
|
36
|
+
style: r(N.value)
|
|
37
|
+
}, null, 6),
|
|
38
|
+
u("span", z, d(e.text), 1)
|
|
39
|
+
])) : x.value && g.value ? (a(), n("span", D, [
|
|
40
|
+
u("sup", {
|
|
41
|
+
class: c(["x-badge__count", [{ "is-dot": e.dot }, v.value]]),
|
|
42
|
+
style: r(m.value)
|
|
43
|
+
}, [
|
|
44
|
+
f(o.$slots, "content", {}, () => [
|
|
45
|
+
h(d(e.dot ? "" : e.text || b.value), 1)
|
|
46
|
+
])
|
|
47
|
+
], 6)
|
|
48
|
+
])) : (a(), n("span", E, [
|
|
49
|
+
f(o.$slots, "default"),
|
|
50
|
+
g.value || o.$slots.content ? (a(), n("sup", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: c(["x-badge__count", [{ "is-dot": e.dot && !o.$slots.content }, v.value]]),
|
|
53
|
+
style: r(m.value)
|
|
54
|
+
}, [
|
|
55
|
+
f(o.$slots, "content", {}, () => [
|
|
56
|
+
h(d(e.dot ? "" : e.text || b.value), 1)
|
|
57
|
+
])
|
|
58
|
+
], 6)) : V("", !0)
|
|
59
|
+
]));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
X as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import p from "./XBaseMenu.vue2.js";
|
|
2
|
+
import { resolveComponent as d, openBlock as n, createElementBlock as r, mergeProps as m, createElementVNode as u, normalizeClass as s, renderSlot as a, normalizeStyle as f, createCommentVNode as t, createVNode as C } from "vue";
|
|
3
|
+
import v from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function c(o, e, $, z, I, k) {
|
|
5
|
+
const i = d("XIcon");
|
|
6
|
+
return n(), r("div", m({ class: o.classNames }, o.$attrs, { style: o.computedStyle }), [
|
|
7
|
+
u("div", {
|
|
8
|
+
ref: "menuInnerRef",
|
|
9
|
+
class: s(`${o.prefixCls}__inner`),
|
|
10
|
+
onMouseover: e[0] || (e[0] = (...l) => o.onHorizontalIndicatorOver && o.onHorizontalIndicatorOver(...l)),
|
|
11
|
+
onMouseleave: e[1] || (e[1] = (...l) => o.onHorizontalIndicatorLeave && o.onHorizontalIndicatorLeave(...l))
|
|
12
|
+
}, [
|
|
13
|
+
a(o.$slots, "default"),
|
|
14
|
+
o.showHorizontalIndicator ? (n(), r("div", {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: s(`${o.prefixCls}__selected-label`),
|
|
17
|
+
style: f(o.horizontalIndicatorStyle)
|
|
18
|
+
}, null, 6)) : t("", !0)
|
|
19
|
+
], 34),
|
|
20
|
+
o.computedHasCollapseButton ? (n(), r("div", {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: s(`${o.prefixCls}__collapse-button`),
|
|
23
|
+
onClick: e[2] || (e[2] = (...l) => o.onCollapseBtnClick && o.onCollapseBtnClick(...l))
|
|
24
|
+
}, [
|
|
25
|
+
a(o.$slots, "collapse-icon", { collapsed: o.computedCollapsed }, () => [
|
|
26
|
+
C(i, {
|
|
27
|
+
name: o.computedCollapsed ? "mono-right" : "mono-left",
|
|
28
|
+
size: 14
|
|
29
|
+
}, null, 8, ["name"])
|
|
30
|
+
])
|
|
31
|
+
], 2)) : t("", !0)
|
|
32
|
+
], 16);
|
|
33
|
+
}
|
|
34
|
+
const N = /* @__PURE__ */ v(p, [["render", c]]);
|
|
35
|
+
export {
|
|
36
|
+
N as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { defineComponent as ye, toRefs as me, reactive as X, computed as y, ref as _, provide as he, watch as ge, onMounted as xe, onBeforeUnmount as Ke, nextTick as Ce } from "vue";
|
|
2
|
+
import { useMergeState as N } from "../composables/useMergeState.js";
|
|
3
|
+
import { provideLevel as Be } from "../composables/menu-hooks/use-level.js";
|
|
4
|
+
import { MenuInjectionKey as Se } from "../composables/menu-context.js";
|
|
5
|
+
import be from "../composables/menu-hooks/use-menu-data-collector.js";
|
|
6
|
+
import we from "../composables/menu-hooks/use-menu-open-state.js";
|
|
7
|
+
import { useResponsive as Ie } from "../composables/useResponsive.js";
|
|
8
|
+
import Oe from "./XIcon.js";
|
|
9
|
+
const Me = (t) => typeof t == "number", ze = (t) => t !== null && typeof t == "object" && !Array.isArray(t), ke = (t) => t === void 0, $e = (t, n) => {
|
|
10
|
+
const a = { ...t };
|
|
11
|
+
return n.forEach((r) => delete a[r]), a;
|
|
12
|
+
}, He = (t, n) => {
|
|
13
|
+
const a = (r) => {
|
|
14
|
+
for (let o = 0; o < r.length; o++) {
|
|
15
|
+
const u = r[o];
|
|
16
|
+
if (u.key === n)
|
|
17
|
+
return u;
|
|
18
|
+
if (u.children) {
|
|
19
|
+
const s = a(u.children);
|
|
20
|
+
if (s) return s;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
return a(t);
|
|
26
|
+
}, D = (t) => {
|
|
27
|
+
if (!(!t || !t.length))
|
|
28
|
+
for (let n = 0; n < t.length; n++) {
|
|
29
|
+
const a = t[n];
|
|
30
|
+
if (!a.children || a.children.length === 0)
|
|
31
|
+
return a.key;
|
|
32
|
+
const r = D(a.children);
|
|
33
|
+
if (r)
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
}, Le = (t, n) => {
|
|
37
|
+
if (!t || !t.length || !n.length) return !1;
|
|
38
|
+
const a = new Set(n), r = (o) => {
|
|
39
|
+
for (let u = 0; u < o.length; u++) {
|
|
40
|
+
const s = o[u];
|
|
41
|
+
if (a.has(s.key) || s.children && r(s.children))
|
|
42
|
+
return !0;
|
|
43
|
+
}
|
|
44
|
+
return !1;
|
|
45
|
+
};
|
|
46
|
+
return r(t);
|
|
47
|
+
}, Pe = ye({
|
|
48
|
+
name: "XBaseMenu",
|
|
49
|
+
components: {
|
|
50
|
+
XIcon: Oe
|
|
51
|
+
},
|
|
52
|
+
inheritAttrs: !1,
|
|
53
|
+
props: {
|
|
54
|
+
style: {
|
|
55
|
+
type: Object
|
|
56
|
+
},
|
|
57
|
+
theme: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "light"
|
|
60
|
+
},
|
|
61
|
+
mode: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "vertical"
|
|
64
|
+
},
|
|
65
|
+
levelIndent: {
|
|
66
|
+
type: Number
|
|
67
|
+
},
|
|
68
|
+
autoOpen: {
|
|
69
|
+
type: Boolean
|
|
70
|
+
},
|
|
71
|
+
collapsed: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: void 0
|
|
74
|
+
},
|
|
75
|
+
defaultCollapsed: {
|
|
76
|
+
type: Boolean
|
|
77
|
+
},
|
|
78
|
+
collapsedWidth: {
|
|
79
|
+
type: Number
|
|
80
|
+
},
|
|
81
|
+
accordion: {
|
|
82
|
+
type: Boolean
|
|
83
|
+
},
|
|
84
|
+
autoScrollIntoView: {
|
|
85
|
+
type: Boolean
|
|
86
|
+
},
|
|
87
|
+
showCollapseButton: {
|
|
88
|
+
type: Boolean
|
|
89
|
+
},
|
|
90
|
+
selectedKeys: {
|
|
91
|
+
type: Array
|
|
92
|
+
},
|
|
93
|
+
defaultSelectedKeys: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: () => []
|
|
96
|
+
},
|
|
97
|
+
openKeys: {
|
|
98
|
+
type: Array
|
|
99
|
+
},
|
|
100
|
+
defaultOpenKeys: {
|
|
101
|
+
type: Array,
|
|
102
|
+
default: () => []
|
|
103
|
+
},
|
|
104
|
+
scrollConfig: {
|
|
105
|
+
type: Object
|
|
106
|
+
},
|
|
107
|
+
triggerProps: {
|
|
108
|
+
type: Object
|
|
109
|
+
},
|
|
110
|
+
tooltipProps: {
|
|
111
|
+
type: Object
|
|
112
|
+
},
|
|
113
|
+
autoOpenSelected: {
|
|
114
|
+
type: Boolean
|
|
115
|
+
},
|
|
116
|
+
breakpoint: {
|
|
117
|
+
type: String
|
|
118
|
+
},
|
|
119
|
+
popupMaxHeight: {
|
|
120
|
+
type: [Boolean, Number],
|
|
121
|
+
default: !0
|
|
122
|
+
},
|
|
123
|
+
prefixCls: {
|
|
124
|
+
type: String,
|
|
125
|
+
default: "x-menu"
|
|
126
|
+
},
|
|
127
|
+
inTrigger: {
|
|
128
|
+
type: Boolean
|
|
129
|
+
},
|
|
130
|
+
siderCollapsed: {
|
|
131
|
+
type: Boolean
|
|
132
|
+
},
|
|
133
|
+
isRoot: {
|
|
134
|
+
type: Boolean
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
emits: [
|
|
138
|
+
"update:collapsed",
|
|
139
|
+
"update:selectedKeys",
|
|
140
|
+
"update:openKeys",
|
|
141
|
+
"collapse",
|
|
142
|
+
"menu-item-click",
|
|
143
|
+
"sub-menu-click"
|
|
144
|
+
],
|
|
145
|
+
setup(t, { emit: n, slots: a }) {
|
|
146
|
+
const {
|
|
147
|
+
style: r,
|
|
148
|
+
mode: o,
|
|
149
|
+
theme: u,
|
|
150
|
+
levelIndent: s,
|
|
151
|
+
accordion: M,
|
|
152
|
+
showCollapseButton: S,
|
|
153
|
+
scrollConfig: P,
|
|
154
|
+
autoScrollIntoView: E,
|
|
155
|
+
collapsedWidth: m,
|
|
156
|
+
autoOpen: V,
|
|
157
|
+
collapsed: W,
|
|
158
|
+
defaultCollapsed: h,
|
|
159
|
+
selectedKeys: q,
|
|
160
|
+
defaultSelectedKeys: z,
|
|
161
|
+
openKeys: U,
|
|
162
|
+
defaultOpenKeys: F,
|
|
163
|
+
triggerProps: G,
|
|
164
|
+
tooltipProps: J,
|
|
165
|
+
autoOpenSelected: Q,
|
|
166
|
+
breakpoint: Y,
|
|
167
|
+
popupMaxHeight: Z,
|
|
168
|
+
prefixCls: c,
|
|
169
|
+
inTrigger: g,
|
|
170
|
+
siderCollapsed: b,
|
|
171
|
+
isRoot: v
|
|
172
|
+
} = me(t), { subMenuKeys: ee, menuData: k } = be({
|
|
173
|
+
type: v != null && v.value ? "menu" : "popupMenu"
|
|
174
|
+
}), [x, $] = N(
|
|
175
|
+
z.value,
|
|
176
|
+
{
|
|
177
|
+
value: q,
|
|
178
|
+
defaultValue: z,
|
|
179
|
+
syncDefaultValue: !0
|
|
180
|
+
}
|
|
181
|
+
), { openKeys: H, setOpenKeys: te, open: ne } = we(
|
|
182
|
+
X({
|
|
183
|
+
modelValue: U,
|
|
184
|
+
defaultValue: F,
|
|
185
|
+
autoOpen: V,
|
|
186
|
+
autoOpenSelected: Q,
|
|
187
|
+
selectedKeys: x,
|
|
188
|
+
subMenuKeys: ee,
|
|
189
|
+
menuData: k,
|
|
190
|
+
accordion: M
|
|
191
|
+
})
|
|
192
|
+
), oe = ke(h == null ? void 0 : h.value) ? o.value === "pop" : h.value, [w, le] = N(
|
|
193
|
+
oe,
|
|
194
|
+
{
|
|
195
|
+
value: W
|
|
196
|
+
}
|
|
197
|
+
), f = y(
|
|
198
|
+
() => (b == null ? void 0 : b.value) || w.value || o.value === "popButton"
|
|
199
|
+
), L = y(
|
|
200
|
+
() => ["horizontal", "popButton"].indexOf(o.value) < 0 && !(g != null && g.value) && (S == null ? void 0 : S.value)
|
|
201
|
+
), R = (e, l) => {
|
|
202
|
+
e !== w.value && (le(e), n("update:collapsed", e), n("collapse", e, l));
|
|
203
|
+
}, re = () => {
|
|
204
|
+
R(!w.value, "clickTrigger");
|
|
205
|
+
};
|
|
206
|
+
Ie(Y, (e) => {
|
|
207
|
+
R(!e, "responsive");
|
|
208
|
+
});
|
|
209
|
+
const ae = y(() => [
|
|
210
|
+
c.value,
|
|
211
|
+
`${c.value}--${u == null ? void 0 : u.value}`,
|
|
212
|
+
`${c.value}--${o.value === "horizontal" ? "horizontal" : "vertical"}`,
|
|
213
|
+
{
|
|
214
|
+
[`${c.value}--has-collapse-button`]: L.value,
|
|
215
|
+
[`${c.value}--collapsed`]: f.value,
|
|
216
|
+
[`${c.value}--pop`]: o.value === "pop" || f.value,
|
|
217
|
+
[`${c.value}--pop-button`]: o.value === "popButton"
|
|
218
|
+
}
|
|
219
|
+
]), K = _(null), C = _({
|
|
220
|
+
width: "0px",
|
|
221
|
+
transform: "translateX(0px)",
|
|
222
|
+
opacity: "0"
|
|
223
|
+
}), I = y(
|
|
224
|
+
() => o.value === "horizontal" && !f.value
|
|
225
|
+
), ue = () => {
|
|
226
|
+
const e = K.value;
|
|
227
|
+
return e ? e.querySelector(
|
|
228
|
+
'[data-menu-indicator="true"].x-menu-item--selected, [data-menu-indicator="true"].x-sub-menu--selected'
|
|
229
|
+
) : null;
|
|
230
|
+
}, A = async (e) => {
|
|
231
|
+
if (!I.value) {
|
|
232
|
+
C.value = {
|
|
233
|
+
width: "0px",
|
|
234
|
+
transform: "translateX(0px)",
|
|
235
|
+
opacity: "0"
|
|
236
|
+
};
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
await Ce();
|
|
240
|
+
const l = K.value, i = e ?? ue();
|
|
241
|
+
if (!l || !i) {
|
|
242
|
+
C.value = {
|
|
243
|
+
width: "0px",
|
|
244
|
+
transform: "translateX(0px)",
|
|
245
|
+
opacity: "0"
|
|
246
|
+
};
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const p = l.getBoundingClientRect();
|
|
250
|
+
i.getBoundingClientRect();
|
|
251
|
+
const d = (i.querySelector(".x-menu-item__text, .x-sub-menu__title-text") ?? i).getBoundingClientRect(), j = Math.max(Math.round(d.width), 16), ve = d.left - p.left + (d.width - j) / 2;
|
|
252
|
+
C.value = {
|
|
253
|
+
width: `${j}px`,
|
|
254
|
+
transform: `translateX(${ve}px)`,
|
|
255
|
+
opacity: "1"
|
|
256
|
+
};
|
|
257
|
+
}, B = () => {
|
|
258
|
+
A();
|
|
259
|
+
}, ie = (e) => {
|
|
260
|
+
var i, p;
|
|
261
|
+
if (!I.value) return;
|
|
262
|
+
const l = (i = e.target) == null ? void 0 : i.closest(
|
|
263
|
+
'[data-menu-indicator="true"]'
|
|
264
|
+
);
|
|
265
|
+
l && ((p = K.value) != null && p.contains(l)) && A(l);
|
|
266
|
+
}, ce = () => {
|
|
267
|
+
B();
|
|
268
|
+
}, T = () => {
|
|
269
|
+
B();
|
|
270
|
+
}, se = y(() => {
|
|
271
|
+
const e = Me(m == null ? void 0 : m.value) ? `${m.value}px` : void 0, l = ze(r == null ? void 0 : r.value) ? r.value : void 0, i = f.value ? e : l == null ? void 0 : l.width;
|
|
272
|
+
return [
|
|
273
|
+
l ? $e(l, ["width"]) : r.value,
|
|
274
|
+
{ width: i }
|
|
275
|
+
];
|
|
276
|
+
}), pe = a["expand-icon-down"], de = a["expand-icon-right"], fe = X({
|
|
277
|
+
theme: u,
|
|
278
|
+
mode: o,
|
|
279
|
+
levelIndent: s,
|
|
280
|
+
autoScrollIntoView: E,
|
|
281
|
+
selectedKeys: x,
|
|
282
|
+
openKeys: H,
|
|
283
|
+
prefixCls: c.value,
|
|
284
|
+
scrollConfig: P,
|
|
285
|
+
inTrigger: g,
|
|
286
|
+
collapsed: f,
|
|
287
|
+
accordion: M,
|
|
288
|
+
triggerProps: G,
|
|
289
|
+
tooltipProps: J,
|
|
290
|
+
popupMaxHeight: Z,
|
|
291
|
+
expandIconDown: pe,
|
|
292
|
+
expandIconRight: de,
|
|
293
|
+
onMenuItemClick: (e) => {
|
|
294
|
+
$([e]), n("update:selectedKeys", [e]), n("menu-item-click", e);
|
|
295
|
+
},
|
|
296
|
+
onSubMenuClick: (e, l) => {
|
|
297
|
+
const i = ne(e, l);
|
|
298
|
+
if (te(i), n("update:openKeys", i), n("sub-menu-click", e, i), !(v != null && v.value && o.value === "vertical" && l === 1))
|
|
299
|
+
return;
|
|
300
|
+
const p = He(k.value, e), O = p == null ? void 0 : p.children;
|
|
301
|
+
if (Le(O, x.value || []))
|
|
302
|
+
return;
|
|
303
|
+
const d = D(O);
|
|
304
|
+
d && ($([d]), n("update:selectedKeys", [d]), n("menu-item-click", d));
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
return he(Se, fe), Be(1), ge(
|
|
308
|
+
[o, f, x, H],
|
|
309
|
+
() => {
|
|
310
|
+
B();
|
|
311
|
+
},
|
|
312
|
+
{ deep: !0, immediate: !0 }
|
|
313
|
+
), xe(() => {
|
|
314
|
+
window.addEventListener("resize", T), B();
|
|
315
|
+
}), Ke(() => {
|
|
316
|
+
window.removeEventListener("resize", T);
|
|
317
|
+
}), {
|
|
318
|
+
prefixCls: c.value,
|
|
319
|
+
classNames: ae,
|
|
320
|
+
computedStyle: se,
|
|
321
|
+
computedCollapsed: f,
|
|
322
|
+
computedHasCollapseButton: L,
|
|
323
|
+
menuInnerRef: K,
|
|
324
|
+
showHorizontalIndicator: I,
|
|
325
|
+
horizontalIndicatorStyle: C,
|
|
326
|
+
onHorizontalIndicatorOver: ie,
|
|
327
|
+
onHorizontalIndicatorLeave: ce,
|
|
328
|
+
onCollapseBtnClick: re
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
export {
|
|
333
|
+
Pe as default
|
|
334
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
1
2
|
interface XBreadcrumbRoute {
|
|
2
3
|
label: string;
|
|
3
4
|
path: string;
|
|
@@ -6,6 +7,16 @@ interface XBreadcrumbRoute {
|
|
|
6
7
|
path: string;
|
|
7
8
|
}>;
|
|
8
9
|
}
|
|
10
|
+
type XBreadcrumbSlots = {
|
|
11
|
+
default?: (_: Record<string, never>) => VNode[];
|
|
12
|
+
separator?: (_: Record<string, never>) => VNode[];
|
|
13
|
+
'more-icon'?: (_: Record<string, never>) => VNode[];
|
|
14
|
+
'item-render'?: (_: {
|
|
15
|
+
route: XBreadcrumbRoute;
|
|
16
|
+
routes: XBreadcrumbRoute[];
|
|
17
|
+
paths: string[];
|
|
18
|
+
}) => VNode[];
|
|
19
|
+
};
|
|
9
20
|
type __VLS_Props = {
|
|
10
21
|
maxCount?: number;
|
|
11
22
|
routes?: XBreadcrumbRoute[];
|
|
@@ -14,13 +25,7 @@ type __VLS_Props = {
|
|
|
14
25
|
};
|
|
15
26
|
declare function __VLS_template(): {
|
|
16
27
|
attrs: Partial<{}>;
|
|
17
|
-
slots:
|
|
18
|
-
'item-render'?(_: {
|
|
19
|
-
route: XBreadcrumbRoute;
|
|
20
|
-
routes: XBreadcrumbRoute[];
|
|
21
|
-
paths: string[];
|
|
22
|
-
}): any;
|
|
23
|
-
};
|
|
28
|
+
slots: Readonly<XBreadcrumbSlots> & XBreadcrumbSlots;
|
|
24
29
|
refs: {};
|
|
25
30
|
rootEl: HTMLDivElement;
|
|
26
31
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as F, useSlots as L, ref as N, toRef as b, computed as f, cloneVNode as j, watchEffect as P, provide as $, openBlock as a, createElementBlock as i, Fragment as y, renderList as A, createBlock as C, resolveDynamicComponent as w, withCtx as H, renderSlot as D, toDisplayString as g, isVNode as G, Comment as I } from "vue";
|
|
2
|
+
import M from "./XBreadcrumbItem.vue.js";
|
|
3
|
+
import { xBreadcrumbInjectionKey as O } from "./x-breadcrumb-context.js";
|
|
4
|
+
const T = {
|
|
5
|
+
role: "list",
|
|
6
|
+
class: "x-breadcrumb"
|
|
7
|
+
}, U = { key: 0 }, V = ["href"], X = 1, K = 6, J = /* @__PURE__ */ F({
|
|
8
|
+
name: "XBreadcrumb",
|
|
9
|
+
__name: "XBreadcrumb",
|
|
10
|
+
props: {
|
|
11
|
+
maxCount: { default: 0 },
|
|
12
|
+
routes: { default: () => [] },
|
|
13
|
+
separator: { default: void 0 },
|
|
14
|
+
customUrl: { type: Function, default: void 0 }
|
|
15
|
+
},
|
|
16
|
+
setup(E) {
|
|
17
|
+
const l = E, s = L(), h = N(0), p = b(l, "maxCount"), x = b(l, "separator"), B = f(() => p.value > 0 && h.value > p.value + 1);
|
|
18
|
+
function S(o) {
|
|
19
|
+
const r = [], e = (n) => {
|
|
20
|
+
var c, d, u, k;
|
|
21
|
+
for (const t of n ?? [])
|
|
22
|
+
if (t) {
|
|
23
|
+
if (Array.isArray(t)) {
|
|
24
|
+
e(t);
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (G(t) && t.type !== I) {
|
|
28
|
+
if (t.type === y) {
|
|
29
|
+
Array.isArray(t.children) ? e(t.children) : t.children && typeof t.children == "object" && "default" in t.children && typeof t.children.default == "function" && e((d = (c = t.children).default) == null ? void 0 : d.call(c));
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (t.shapeFlag & X || t.shapeFlag & K) {
|
|
33
|
+
r.push(t);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
Array.isArray(t.children) ? e(t.children) : t.children && typeof t.children == "object" && "default" in t.children && typeof t.children.default == "function" && e((k = (u = t.children).default) == null ? void 0 : k.call(u));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return e(o), r;
|
|
41
|
+
}
|
|
42
|
+
const m = f(() => {
|
|
43
|
+
var r;
|
|
44
|
+
return S((r = s.default) == null ? void 0 : r.call(s, {})).map((e, n) => j(e, { index: n }));
|
|
45
|
+
}), _ = f(() => !!s.default), v = f(() => {
|
|
46
|
+
const o = l.routes ?? [], r = [];
|
|
47
|
+
return o.map((e, n) => {
|
|
48
|
+
var u;
|
|
49
|
+
r.push((e.path ?? "").replace(/^\//, ""));
|
|
50
|
+
const c = [...r], d = ((u = l.customUrl) == null ? void 0 : u.call(l, c)) ?? `#/${c.join("/").replace(/^\//, "")}`;
|
|
51
|
+
return {
|
|
52
|
+
key: e.path || e.label || String(n),
|
|
53
|
+
route: e,
|
|
54
|
+
routes: o,
|
|
55
|
+
paths: c,
|
|
56
|
+
href: d,
|
|
57
|
+
index: n,
|
|
58
|
+
isLast: n === o.length - 1
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
return P(() => {
|
|
63
|
+
h.value = _.value ? m.value.length : v.value.length;
|
|
64
|
+
}), $(O, {
|
|
65
|
+
total: h,
|
|
66
|
+
maxCount: p,
|
|
67
|
+
separator: x,
|
|
68
|
+
needHide: B,
|
|
69
|
+
slots: s
|
|
70
|
+
}), (o, r) => (a(), i("div", T, [
|
|
71
|
+
_.value ? (a(!0), i(y, { key: 0 }, A(m.value, (e, n) => (a(), C(w(e), {
|
|
72
|
+
key: e.key ?? `breadcrumb-child-${n}`
|
|
73
|
+
}))), 128)) : (a(!0), i(y, { key: 1 }, A(v.value, (e) => (a(), C(M, {
|
|
74
|
+
key: e.key,
|
|
75
|
+
index: e.index,
|
|
76
|
+
droplist: e.route.children
|
|
77
|
+
}, {
|
|
78
|
+
default: H(() => [
|
|
79
|
+
D(o.$slots, "item-render", {
|
|
80
|
+
route: e.route,
|
|
81
|
+
routes: e.routes,
|
|
82
|
+
paths: e.paths
|
|
83
|
+
}, () => [
|
|
84
|
+
e.isLast ? (a(), i("span", U, g(e.route.label), 1)) : (a(), i("a", {
|
|
85
|
+
key: 1,
|
|
86
|
+
href: e.href
|
|
87
|
+
}, g(e.route.label), 9, V))
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
_: 2
|
|
91
|
+
}, 1032, ["index", "droplist"]))), 128))
|
|
92
|
+
]));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export {
|
|
96
|
+
J as default
|
|
97
|
+
};
|