@rhino-design/vue 0.2.2 → 0.2.6
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 +10 -40
- 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,715 @@
|
|
|
1
|
+
import { defineComponent as Bl, ref as D, computed as n, watch as Ml, openBlock as i, createBlock as le, mergeProps as ve, withCtx as E, createElementVNode as F, normalizeClass as q, createElementBlock as c, renderSlot as b, createCommentVNode as $, createVNode as te, unref as w, toDisplayString as O, resolveDynamicComponent as xl, createSlots as Tl, Fragment as pe, renderList as Kl, createTextVNode as Oe, withModifiers as Re, nextTick as Le } from "vue";
|
|
2
|
+
import G from "./XIcon.js";
|
|
3
|
+
import Nl from "./XScrollbar.vue.js";
|
|
4
|
+
import El from "./XTrigger.vue.js";
|
|
5
|
+
import Fl from "./XTree.vue.js";
|
|
6
|
+
import { useXConfig as $l, sizeClass as Il } from "../composables/config.js";
|
|
7
|
+
import { useXFormField as Pl } from "../composables/form.js";
|
|
8
|
+
import { useXI18n as zl } from "../composables/i18n.js";
|
|
9
|
+
const Al = ["tabindex"], Dl = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "x-tree-select__prefix"
|
|
12
|
+
}, Ol = { class: "x-tree-select__value" }, Rl = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "x-tree-select__tags"
|
|
15
|
+
}, Ll = { class: "x-tree-select__tag-label" }, jl = ["onClick"], Xl = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "x-tree-select__tag x-tree-select__tag--rest"
|
|
18
|
+
}, Hl = ["value", "placeholder", "disabled", "id"], ql = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "x-tree-select__display is-placeholder"
|
|
21
|
+
}, Gl = ["value", "placeholder", "disabled", "id"], Ul = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "x-tree-select__display"
|
|
24
|
+
}, Jl = {
|
|
25
|
+
key: 2,
|
|
26
|
+
class: "x-tree-select__display is-placeholder"
|
|
27
|
+
}, Ql = { class: "x-tree-select__suffix" }, Wl = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "x-tree-select__header"
|
|
30
|
+
}, Yl = { class: "x-tree-select__loading" }, Zl = { class: "x-tree-select__state" }, et = {
|
|
31
|
+
key: 4,
|
|
32
|
+
class: "x-tree-select__footer"
|
|
33
|
+
}, it = /* @__PURE__ */ Bl({
|
|
34
|
+
__name: "XTreeSelect",
|
|
35
|
+
props: {
|
|
36
|
+
disabled: { type: Boolean, default: !1 },
|
|
37
|
+
loading: { type: Boolean, default: !1 },
|
|
38
|
+
error: { type: Boolean, default: !1 },
|
|
39
|
+
size: { default: void 0 },
|
|
40
|
+
border: { type: Boolean, default: !0 },
|
|
41
|
+
allowSearch: { type: [Boolean, Object], default: void 0 },
|
|
42
|
+
allowClear: { type: Boolean, default: void 0 },
|
|
43
|
+
placeholder: { default: "请选择" },
|
|
44
|
+
maxTagCount: { default: 0 },
|
|
45
|
+
defaultValue: { default: void 0 },
|
|
46
|
+
modelValue: { default: void 0 },
|
|
47
|
+
multiple: { type: Boolean, default: !1 },
|
|
48
|
+
fieldNames: { default: void 0 },
|
|
49
|
+
data: { default: () => [] },
|
|
50
|
+
labelInValue: { type: Boolean, default: !1 },
|
|
51
|
+
treeCheckable: { type: Boolean, default: void 0 },
|
|
52
|
+
treeCheckStrictly: { type: Boolean, default: void 0 },
|
|
53
|
+
treeCheckedStrategy: { default: void 0 },
|
|
54
|
+
treeProps: { default: () => ({}) },
|
|
55
|
+
triggerProps: { default: () => ({}) },
|
|
56
|
+
popupVisible: { type: Boolean, default: void 0 },
|
|
57
|
+
defaultPopupVisible: { type: Boolean, default: !1 },
|
|
58
|
+
dropdownStyle: { default: void 0 },
|
|
59
|
+
dropdownClassName: { default: void 0 },
|
|
60
|
+
filterTreeNode: { type: Function, default: void 0 },
|
|
61
|
+
loadMore: { type: Function, default: void 0 },
|
|
62
|
+
disableFilter: { type: Boolean, default: !1 },
|
|
63
|
+
popupContainer: { default: void 0 },
|
|
64
|
+
fallbackOption: { type: [Boolean, Function], default: !0 },
|
|
65
|
+
selectable: { type: [Boolean, String, Function], default: !0 },
|
|
66
|
+
scrollbar: { type: [Boolean, Object], default: !0 },
|
|
67
|
+
showHeaderOnEmpty: { type: Boolean, default: !1 },
|
|
68
|
+
showFooterOnEmpty: { type: Boolean, default: !1 },
|
|
69
|
+
inputValue: { default: void 0 },
|
|
70
|
+
defaultInputValue: { default: "" },
|
|
71
|
+
checkable: { type: Boolean, default: void 0 },
|
|
72
|
+
checkStrictly: { type: Boolean, default: void 0 },
|
|
73
|
+
checkedStrategy: { default: void 0 },
|
|
74
|
+
open: { type: Boolean, default: void 0 },
|
|
75
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
76
|
+
searchValue: { default: void 0 },
|
|
77
|
+
defaultSearchValue: { default: "" },
|
|
78
|
+
filterable: { type: Boolean, default: void 0 },
|
|
79
|
+
clearable: { type: Boolean, default: void 0 }
|
|
80
|
+
},
|
|
81
|
+
emits: ["update:modelValue", "change", "update:popupVisible", "popup-visible-change", "popupVisibleChange", "update:open", "update:inputValue", "update:searchValue", "inputValueChange", "input-value-change", "search", "clear"],
|
|
82
|
+
setup(C, { expose: je, emit: Xe }) {
|
|
83
|
+
const t = C, h = Xe, He = $l(), s = Pl(), { t: he } = zl(), I = D(null), ae = D(!1), R = n(() => {
|
|
84
|
+
var e;
|
|
85
|
+
return ((e = t.fieldNames) == null ? void 0 : e.key) || "key";
|
|
86
|
+
}), ye = n(() => {
|
|
87
|
+
var e;
|
|
88
|
+
return ((e = t.fieldNames) == null ? void 0 : e.title) || "title";
|
|
89
|
+
}), U = n(() => {
|
|
90
|
+
var e;
|
|
91
|
+
return ((e = t.fieldNames) == null ? void 0 : e.children) || "children";
|
|
92
|
+
}), ge = n(() => t.size ?? He.size.value), f = n(() => !!(t.disabled || s != null && s.disabled.value)), J = n(() => t.placeholder === "请选择" ? he("treeSelect.placeholder", void 0, "请选择") : t.placeholder), v = n(() => t.treeCheckable ?? t.checkable ?? !1), L = n(() => t.treeCheckStrictly ?? t.checkStrictly ?? !1), be = n(() => t.treeCheckedStrategy ?? t.checkedStrategy ?? "all"), p = n(() => !!(t.multiple || v.value)), S = n(() => t.filterable !== void 0 ? t.filterable : t.allowSearch !== void 0 ? t.allowSearch !== !1 : !!t.multiple), Q = n(() => typeof t.allowSearch == "object" && !!t.allowSearch.retainInputValue), qe = n(() => t.allowClear ?? t.clearable ?? !1), Ge = n(() => t.popupVisible !== void 0 || t.open !== void 0), Ue = n(() => t.inputValue !== void 0 || t.searchValue !== void 0), ke = n(() => t.modelValue !== void 0), me = D(!!(t.defaultPopupVisible ?? t.defaultOpen)), Ce = D(t.defaultInputValue ?? t.defaultSearchValue ?? ""), Se = D(
|
|
93
|
+
t.defaultValue ?? (p.value ? [] : void 0)
|
|
94
|
+
), y = n(() => t.popupVisible !== void 0 ? !!t.popupVisible : t.open !== void 0 ? !!t.open : me.value), _ = n(() => t.inputValue !== void 0 ? String(t.inputValue ?? "") : t.searchValue !== void 0 ? String(t.searchValue ?? "") : Ce.value), _e = n(() => ke.value ? t.modelValue : Se.value);
|
|
95
|
+
function B(e) {
|
|
96
|
+
return e != null && e !== "";
|
|
97
|
+
}
|
|
98
|
+
function Je(e) {
|
|
99
|
+
return typeof e == "object" && e !== null && "value" in e;
|
|
100
|
+
}
|
|
101
|
+
function Qe(e) {
|
|
102
|
+
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
103
|
+
}
|
|
104
|
+
const u = n(() => {
|
|
105
|
+
const e = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set(), Y = [];
|
|
106
|
+
let K = 0;
|
|
107
|
+
const Pe = (H, z, N) => {
|
|
108
|
+
const V = t.selectable;
|
|
109
|
+
let g = !0;
|
|
110
|
+
return V === "leaf" ? g = N : typeof V == "function" ? g = !!V(H, { isLeaf: N, level: z }) : g = V !== !1, H.selectable === !1 && (g = !1), g;
|
|
111
|
+
}, de = (H, z, N, V) => H.map((g) => {
|
|
112
|
+
const A = { ...g }, Z = g, ee = Array.isArray(Z[U.value]) ? Z[U.value] : [], m = Z[R.value], fe = B(m), Sl = !!(g.isLeaf ?? ee.length === 0), ze = Pe(g, z, Sl), Ae = g.checkable !== !1 && ze && !g.disabled;
|
|
113
|
+
A.selectable = ze, v.value && (A.checkable = Ae);
|
|
114
|
+
const _l = fe ? [...V, m] : [...V], wl = fe ? m : N, De = ee.length ? de(ee, z + 1, wl, _l) : [];
|
|
115
|
+
return (ee.length > 0 || U.value in Z) && (A[U.value] = De), fe && (e.set(m, A), l.set(m, N), a.set(
|
|
116
|
+
m,
|
|
117
|
+
De.map((Vl) => Vl[R.value]).filter(B)
|
|
118
|
+
), r.set(m, z), o.set(m, K), K += 1, Ae && d.add(m), Y.push({
|
|
119
|
+
key: m,
|
|
120
|
+
node: A,
|
|
121
|
+
parentKeys: [...V]
|
|
122
|
+
})), A;
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
clonedData: de(t.data ?? [], 0, void 0, []),
|
|
126
|
+
keyMap: e,
|
|
127
|
+
parentMap: l,
|
|
128
|
+
childrenMap: a,
|
|
129
|
+
levelMap: r,
|
|
130
|
+
orderMap: o,
|
|
131
|
+
checkableSet: d,
|
|
132
|
+
flatNodes: Y
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
function oe(e) {
|
|
136
|
+
const l = e[ye.value];
|
|
137
|
+
return l == null || l === "" ? "" : typeof l == "number" ? l : String(l);
|
|
138
|
+
}
|
|
139
|
+
function we(e) {
|
|
140
|
+
if (t.fallbackOption === !1) return null;
|
|
141
|
+
if (typeof t.fallbackOption == "function") {
|
|
142
|
+
const l = t.fallbackOption(e);
|
|
143
|
+
if (l === !1) return null;
|
|
144
|
+
if (l && typeof l == "object")
|
|
145
|
+
return l;
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
[R.value]: e,
|
|
149
|
+
[ye.value]: String(e)
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function re(e, l) {
|
|
153
|
+
if (l != null && l !== "")
|
|
154
|
+
return l;
|
|
155
|
+
const a = u.value.keyMap.get(e);
|
|
156
|
+
if (a) {
|
|
157
|
+
const o = oe(a);
|
|
158
|
+
return o === "" ? String(e) : o;
|
|
159
|
+
}
|
|
160
|
+
const r = we(e);
|
|
161
|
+
if (r) {
|
|
162
|
+
const o = oe(r);
|
|
163
|
+
return o === "" ? String(e) : o;
|
|
164
|
+
}
|
|
165
|
+
return String(e);
|
|
166
|
+
}
|
|
167
|
+
const ne = n(() => {
|
|
168
|
+
const e = Qe(_e.value).map((l) => Je(l) ? { key: l.value, label: l.label } : { key: l }).filter((l) => B(l.key));
|
|
169
|
+
return p.value ? e : e.slice(0, 1);
|
|
170
|
+
}), ue = n(() => ne.value.map((e) => e.key)), We = n(() => {
|
|
171
|
+
const e = /* @__PURE__ */ new Map();
|
|
172
|
+
return ne.value.forEach((l) => {
|
|
173
|
+
l.label !== void 0 && l.label !== null && l.label !== "" && e.set(l.key, l.label);
|
|
174
|
+
}), e;
|
|
175
|
+
});
|
|
176
|
+
function Ye(e) {
|
|
177
|
+
return e.disabled ? !1 : v.value ? e.checkable !== !1 : e.selectable !== !1;
|
|
178
|
+
}
|
|
179
|
+
const k = n(() => {
|
|
180
|
+
const e = [], l = /* @__PURE__ */ new Set();
|
|
181
|
+
return ne.value.forEach((a) => {
|
|
182
|
+
if (l.has(a.key)) return;
|
|
183
|
+
l.add(a.key);
|
|
184
|
+
const r = u.value.keyMap.get(a.key);
|
|
185
|
+
if (r) {
|
|
186
|
+
e.push({
|
|
187
|
+
key: a.key,
|
|
188
|
+
label: re(a.key, a.label),
|
|
189
|
+
closable: !f.value && Ye(r),
|
|
190
|
+
data: r
|
|
191
|
+
});
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const o = we(a.key);
|
|
195
|
+
o && e.push({
|
|
196
|
+
key: a.key,
|
|
197
|
+
label: re(a.key, a.label),
|
|
198
|
+
closable: !f.value,
|
|
199
|
+
data: o
|
|
200
|
+
});
|
|
201
|
+
}), e;
|
|
202
|
+
}), Ze = n(() => k.value.length > 0), j = n(() => p.value ? !t.maxTagCount || t.maxTagCount <= 0 ? k.value : k.value.slice(0, t.maxTagCount) : []), Ve = n(() => !p.value || !t.maxTagCount || t.maxTagCount <= 0 ? 0 : Math.max(k.value.length - j.value.length, 0)), el = n(() => {
|
|
203
|
+
var e;
|
|
204
|
+
return ((e = k.value[0]) == null ? void 0 : e.label) ?? "";
|
|
205
|
+
}), ll = n(() => y.value ? _.value : _.value || String(el.value || "")), tl = n(() => qe.value && !f.value && !t.loading && Ze.value && ae.value);
|
|
206
|
+
function M(e) {
|
|
207
|
+
return Array.from(new Set(e.filter(B))).sort((a, r) => {
|
|
208
|
+
const o = u.value.orderMap.get(a) ?? Number.MAX_SAFE_INTEGER, d = u.value.orderMap.get(r) ?? Number.MAX_SAFE_INTEGER;
|
|
209
|
+
return o - d;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function Be() {
|
|
213
|
+
return Array.from(u.value.orderMap.keys()).sort((e, l) => {
|
|
214
|
+
const a = u.value.levelMap.get(e) ?? 0, r = u.value.levelMap.get(l) ?? 0;
|
|
215
|
+
return a === r ? (u.value.orderMap.get(l) ?? 0) - (u.value.orderMap.get(e) ?? 0) : r - a;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function al(e, l = !1) {
|
|
219
|
+
const a = [], r = (o) => {
|
|
220
|
+
(l || o !== e) && a.push(o), (u.value.childrenMap.get(o) ?? []).forEach((d) => {
|
|
221
|
+
r(d);
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
return r(e), a;
|
|
225
|
+
}
|
|
226
|
+
function Me(e) {
|
|
227
|
+
const l = /* @__PURE__ */ new Set();
|
|
228
|
+
if (L.value)
|
|
229
|
+
return e.forEach((o) => {
|
|
230
|
+
u.value.checkableSet.has(o) && l.add(o);
|
|
231
|
+
}), M(Array.from(l));
|
|
232
|
+
const a = (o) => {
|
|
233
|
+
u.value.checkableSet.has(o) && (l.add(o), (u.value.childrenMap.get(o) ?? []).forEach((d) => {
|
|
234
|
+
a(d);
|
|
235
|
+
}));
|
|
236
|
+
};
|
|
237
|
+
return e.forEach((o) => {
|
|
238
|
+
a(o);
|
|
239
|
+
}), Be().forEach((o) => {
|
|
240
|
+
if (!u.value.checkableSet.has(o)) return;
|
|
241
|
+
const d = (u.value.childrenMap.get(o) ?? []).filter((K) => u.value.checkableSet.has(K));
|
|
242
|
+
if (!d.length) return;
|
|
243
|
+
d.every((K) => l.has(K)) ? l.add(o) : l.delete(o);
|
|
244
|
+
}), M(Array.from(l));
|
|
245
|
+
}
|
|
246
|
+
const x = D([]);
|
|
247
|
+
Ml(
|
|
248
|
+
() => [ue.value, v.value, L.value, u.value.orderMap.size],
|
|
249
|
+
() => {
|
|
250
|
+
if (!v.value) {
|
|
251
|
+
x.value = [];
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
x.value = Me(ue.value);
|
|
255
|
+
},
|
|
256
|
+
{ immediate: !0, deep: !0 }
|
|
257
|
+
);
|
|
258
|
+
function ol(e) {
|
|
259
|
+
const l = M(e);
|
|
260
|
+
if (!v.value || L.value) return l;
|
|
261
|
+
const a = new Set(l);
|
|
262
|
+
return be.value === "child" ? l.filter((r) => (u.value.childrenMap.get(r) ?? []).filter((d) => u.value.checkableSet.has(d)).length === 0) : be.value === "parent" ? l.filter((r) => {
|
|
263
|
+
let o = u.value.parentMap.get(r);
|
|
264
|
+
for (; o !== void 0; ) {
|
|
265
|
+
if (a.has(o))
|
|
266
|
+
return !1;
|
|
267
|
+
o = u.value.parentMap.get(o);
|
|
268
|
+
}
|
|
269
|
+
return !0;
|
|
270
|
+
}) : l;
|
|
271
|
+
}
|
|
272
|
+
function rl(e) {
|
|
273
|
+
const l = M(e);
|
|
274
|
+
if (t.labelInValue) {
|
|
275
|
+
const a = l.map((r) => ({
|
|
276
|
+
value: r,
|
|
277
|
+
label: re(r, We.value.get(r))
|
|
278
|
+
}));
|
|
279
|
+
return p.value ? a : a[0];
|
|
280
|
+
}
|
|
281
|
+
return p.value ? l : l[0];
|
|
282
|
+
}
|
|
283
|
+
function xe(e, l) {
|
|
284
|
+
const a = rl(e);
|
|
285
|
+
ke.value || (Se.value = a), h("update:modelValue", a), h("change", a), s == null || s.notifyChange(), v.value && l && (x.value = M(l));
|
|
286
|
+
}
|
|
287
|
+
function se(e) {
|
|
288
|
+
const l = p.value ? M(e) : M(e).slice(0, 1);
|
|
289
|
+
xe(l), p.value || T(!1), !Q.value && _.value && P("", !1);
|
|
290
|
+
}
|
|
291
|
+
function W(e) {
|
|
292
|
+
const l = Me(e), a = ol(l);
|
|
293
|
+
xe(a, l), !Q.value && _.value && P("", !1);
|
|
294
|
+
}
|
|
295
|
+
const X = n(() => _.value.trim());
|
|
296
|
+
function nl(e, l) {
|
|
297
|
+
const a = l[R.value];
|
|
298
|
+
return B(a) ? String(a).toLowerCase().includes(e.toLowerCase()) : !1;
|
|
299
|
+
}
|
|
300
|
+
const Te = n(() => {
|
|
301
|
+
if (t.disableFilter || !X.value) return;
|
|
302
|
+
const e = /* @__PURE__ */ new Set(), l = t.filterTreeNode ?? nl;
|
|
303
|
+
return u.value.flatNodes.forEach((a) => {
|
|
304
|
+
l(X.value, a.node) && (e.add(a.key), a.parentKeys.forEach((r) => e.add(r)));
|
|
305
|
+
}), e;
|
|
306
|
+
}), ul = n(() => {
|
|
307
|
+
if (!(t.disableFilter || !X.value))
|
|
308
|
+
return (e) => {
|
|
309
|
+
var a;
|
|
310
|
+
const l = e[R.value];
|
|
311
|
+
return B(l) ? ((a = Te.value) == null ? void 0 : a.has(l)) ?? !1 : !1;
|
|
312
|
+
};
|
|
313
|
+
}), ie = n(() => {
|
|
314
|
+
var e;
|
|
315
|
+
return u.value.flatNodes.length ? t.disableFilter || !X.value ? !1 : (((e = Te.value) == null ? void 0 : e.size) ?? 0) === 0 : !0;
|
|
316
|
+
}), sl = n(() => {
|
|
317
|
+
var e;
|
|
318
|
+
return t.scrollbar !== !1 && !((e = t.treeProps) != null && e.virtualListProps);
|
|
319
|
+
}), il = n(() => t.scrollbar && typeof t.scrollbar == "object" ? t.scrollbar : {}), cl = n(() => {
|
|
320
|
+
var e;
|
|
321
|
+
return [
|
|
322
|
+
"x-tree-select__panel",
|
|
323
|
+
t.dropdownClassName,
|
|
324
|
+
(e = t.triggerProps) == null ? void 0 : e.contentClass
|
|
325
|
+
];
|
|
326
|
+
}), dl = n(() => {
|
|
327
|
+
var l;
|
|
328
|
+
const e = { ...t.dropdownStyle ?? {} };
|
|
329
|
+
return (l = t.treeProps) != null && l.virtualListProps && (e.maxHeight = "unset"), e;
|
|
330
|
+
}), fl = n(() => {
|
|
331
|
+
const {
|
|
332
|
+
data: e,
|
|
333
|
+
fieldNames: l,
|
|
334
|
+
size: a,
|
|
335
|
+
loadMore: r,
|
|
336
|
+
filterTreeNode: o,
|
|
337
|
+
searchValue: d,
|
|
338
|
+
checkable: Y,
|
|
339
|
+
selectable: K,
|
|
340
|
+
multiple: Pe,
|
|
341
|
+
checkedKeys: de,
|
|
342
|
+
selectedKeys: Cl,
|
|
343
|
+
checkedStrategy: H,
|
|
344
|
+
checkStrictly: z,
|
|
345
|
+
...N
|
|
346
|
+
} = t.treeProps ?? {};
|
|
347
|
+
return {
|
|
348
|
+
...N,
|
|
349
|
+
data: u.value.clonedData,
|
|
350
|
+
fieldNames: t.fieldNames,
|
|
351
|
+
size: ge.value,
|
|
352
|
+
loadMore: t.loadMore,
|
|
353
|
+
filterTreeNode: ul.value,
|
|
354
|
+
searchValue: X.value,
|
|
355
|
+
multiple: p.value,
|
|
356
|
+
checkable: v.value,
|
|
357
|
+
selectable: !0,
|
|
358
|
+
checkedStrategy: "all",
|
|
359
|
+
checkStrictly: L.value,
|
|
360
|
+
checkedKeys: v.value ? x.value : void 0,
|
|
361
|
+
selectedKeys: v.value ? [] : ue.value
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
function P(e, l = !1) {
|
|
365
|
+
Ue.value || (Ce.value = e), h("update:inputValue", e), h("update:searchValue", e), h("inputValueChange", e), h("input-value-change", e), l && h("search", e);
|
|
366
|
+
}
|
|
367
|
+
function T(e) {
|
|
368
|
+
if (!(f.value && e) && e !== y.value) {
|
|
369
|
+
if (Ge.value || (me.value = e), h("update:popupVisible", e), h("update:open", e), h("popup-visible-change", e), h("popupVisibleChange", e), e) {
|
|
370
|
+
S.value && Le(() => {
|
|
371
|
+
var l;
|
|
372
|
+
(l = I.value) == null || l.focus();
|
|
373
|
+
});
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
!Q.value && _.value && P("", !1);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function Ke() {
|
|
380
|
+
if (!f.value) {
|
|
381
|
+
if (S.value) {
|
|
382
|
+
T(!0), Le(() => {
|
|
383
|
+
var e;
|
|
384
|
+
(e = I.value) == null || e.focus();
|
|
385
|
+
});
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
T(!y.value);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
function vl(e) {
|
|
392
|
+
e !== y.value && T(e);
|
|
393
|
+
}
|
|
394
|
+
function Ne(e) {
|
|
395
|
+
const l = e.target.value;
|
|
396
|
+
P(l, !0), s == null || s.notifyInput(e), y.value || T(!0);
|
|
397
|
+
}
|
|
398
|
+
function Ee(e) {
|
|
399
|
+
s == null || s.notifyBlur(e), !Q.value && _.value && P("", !1);
|
|
400
|
+
}
|
|
401
|
+
function Fe(e) {
|
|
402
|
+
s == null || s.notifyFocus(e);
|
|
403
|
+
}
|
|
404
|
+
function pl(e) {
|
|
405
|
+
S.value || s == null || s.notifyFocus(e);
|
|
406
|
+
}
|
|
407
|
+
function hl(e) {
|
|
408
|
+
S.value || s == null || s.notifyBlur(e);
|
|
409
|
+
}
|
|
410
|
+
function yl(e) {
|
|
411
|
+
Be().forEach((l) => {
|
|
412
|
+
if (!u.value.checkableSet.has(l)) return;
|
|
413
|
+
const a = (u.value.childrenMap.get(l) ?? []).filter((o) => u.value.checkableSet.has(o));
|
|
414
|
+
if (!a.length) return;
|
|
415
|
+
a.every((o) => e.has(o)) ? e.add(l) : e.delete(l);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
function $e(e) {
|
|
419
|
+
const l = new Set(x.value);
|
|
420
|
+
L.value ? l.delete(e) : ([e, ...al(e)].forEach((a) => {
|
|
421
|
+
l.delete(a);
|
|
422
|
+
}), yl(l)), W(Array.from(l));
|
|
423
|
+
}
|
|
424
|
+
function gl(e) {
|
|
425
|
+
if (v.value) {
|
|
426
|
+
const l = e[e.length - 1];
|
|
427
|
+
if (!B(l) || !u.value.checkableSet.has(l)) return;
|
|
428
|
+
if (x.value.includes(l)) {
|
|
429
|
+
$e(l);
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
W([...x.value, l]);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
se(e);
|
|
436
|
+
}
|
|
437
|
+
function bl(e) {
|
|
438
|
+
v.value && W(e);
|
|
439
|
+
}
|
|
440
|
+
function kl(e) {
|
|
441
|
+
e.stopPropagation(), v.value ? W([]) : se([]), P("", !1), h("clear");
|
|
442
|
+
}
|
|
443
|
+
function Ie(e, l) {
|
|
444
|
+
if (l.stopPropagation(), f.value || !e.closable) return;
|
|
445
|
+
if (v.value) {
|
|
446
|
+
$e(e.key);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
const a = k.value.filter((r) => r.key !== e.key).map((r) => r.key);
|
|
450
|
+
se(a);
|
|
451
|
+
}
|
|
452
|
+
function ce(e) {
|
|
453
|
+
if (!f.value) {
|
|
454
|
+
if (e.key === "Escape" && y.value) {
|
|
455
|
+
e.preventDefault(), T(!1);
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
if (e.key === "ArrowDown" || e.key === "Enter") {
|
|
459
|
+
y.value || (e.preventDefault(), T(!0));
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
if (e.key === "Backspace" && p.value && S.value && _.value.length === 0 && k.value.length > 0) {
|
|
463
|
+
const l = [...k.value].reverse().find((a) => a.closable);
|
|
464
|
+
if (!l) return;
|
|
465
|
+
e.preventDefault(), Ie(l, e);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
function ml(e) {
|
|
470
|
+
return oe(e);
|
|
471
|
+
}
|
|
472
|
+
return je({
|
|
473
|
+
focus: () => {
|
|
474
|
+
var e;
|
|
475
|
+
return (e = I.value) == null ? void 0 : e.focus();
|
|
476
|
+
},
|
|
477
|
+
blur: () => {
|
|
478
|
+
var e;
|
|
479
|
+
return (e = I.value) == null ? void 0 : e.blur();
|
|
480
|
+
}
|
|
481
|
+
}), (e, l) => (i(), le(El, ve(C.triggerProps, {
|
|
482
|
+
class: "x-tree-select__trigger-wrapper",
|
|
483
|
+
"popup-visible": y.value,
|
|
484
|
+
"popup-container": C.popupContainer,
|
|
485
|
+
disabled: f.value,
|
|
486
|
+
trigger: [],
|
|
487
|
+
position: "bottom-start",
|
|
488
|
+
"click-to-close": !S.value,
|
|
489
|
+
"unmount-on-close": !1,
|
|
490
|
+
"auto-fit-popup-min-width": !0,
|
|
491
|
+
"content-class": cl.value,
|
|
492
|
+
"content-style": dl.value,
|
|
493
|
+
"onUpdate:popupVisible": vl
|
|
494
|
+
}), {
|
|
495
|
+
default: E(() => {
|
|
496
|
+
var a, r;
|
|
497
|
+
return [
|
|
498
|
+
e.$slots.trigger ? (i(), c("div", {
|
|
499
|
+
key: 0,
|
|
500
|
+
class: q(["x-tree-select__custom-trigger", { "is-disabled": f.value }]),
|
|
501
|
+
onClick: Ke
|
|
502
|
+
}, [
|
|
503
|
+
b(e.$slots, "trigger", {
|
|
504
|
+
value: _e.value,
|
|
505
|
+
open: y.value
|
|
506
|
+
}, void 0, !0)
|
|
507
|
+
], 2)) : (i(), c("div", {
|
|
508
|
+
key: 1,
|
|
509
|
+
class: q(["x-tree-select", [
|
|
510
|
+
w(Il)(ge.value),
|
|
511
|
+
{
|
|
512
|
+
"is-open": y.value,
|
|
513
|
+
"is-disabled": f.value,
|
|
514
|
+
"is-error": C.error,
|
|
515
|
+
"is-multiple": p.value,
|
|
516
|
+
"is-borderless": !C.border
|
|
517
|
+
}
|
|
518
|
+
]]),
|
|
519
|
+
tabindex: f.value || S.value ? -1 : 0,
|
|
520
|
+
onMouseenter: l[2] || (l[2] = (o) => ae.value = !0),
|
|
521
|
+
onMouseleave: l[3] || (l[3] = (o) => ae.value = !1),
|
|
522
|
+
onFocus: pl,
|
|
523
|
+
onBlur: hl,
|
|
524
|
+
onKeydown: ce
|
|
525
|
+
}, [
|
|
526
|
+
F("div", {
|
|
527
|
+
class: q(["x-tree-select__control x-tree-select__trigger", {
|
|
528
|
+
"x-tree-select__trigger--focused": y.value,
|
|
529
|
+
"x-tree-select__trigger--disabled": f.value,
|
|
530
|
+
"x-tree-select__trigger--multiple": p.value
|
|
531
|
+
}]),
|
|
532
|
+
onClick: Ke
|
|
533
|
+
}, [
|
|
534
|
+
e.$slots.prefix ? (i(), c("span", Dl, [
|
|
535
|
+
b(e.$slots, "prefix", {}, void 0, !0)
|
|
536
|
+
])) : $("", !0),
|
|
537
|
+
F("div", Ol, [
|
|
538
|
+
p.value ? (i(), c("div", Rl, [
|
|
539
|
+
j.value.length ? (i(), c(pe, { key: 0 }, [
|
|
540
|
+
(i(!0), c(pe, null, Kl(j.value, (o) => (i(), c("span", {
|
|
541
|
+
key: o.key,
|
|
542
|
+
class: "x-tree-select__tag"
|
|
543
|
+
}, [
|
|
544
|
+
F("span", Ll, [
|
|
545
|
+
b(e.$slots, "label", {
|
|
546
|
+
data: o.data
|
|
547
|
+
}, () => [
|
|
548
|
+
Oe(O(o.label), 1)
|
|
549
|
+
], !0)
|
|
550
|
+
]),
|
|
551
|
+
o.closable ? (i(), c("button", {
|
|
552
|
+
key: 0,
|
|
553
|
+
type: "button",
|
|
554
|
+
class: "x-tree-select__tag-remove",
|
|
555
|
+
onClick: (d) => Ie(o, d)
|
|
556
|
+
}, [
|
|
557
|
+
te(w(G), {
|
|
558
|
+
name: "guanbi",
|
|
559
|
+
size: 10
|
|
560
|
+
})
|
|
561
|
+
], 8, jl)) : $("", !0)
|
|
562
|
+
]))), 128)),
|
|
563
|
+
Ve.value > 0 ? (i(), c("span", Xl, " +" + O(Ve.value), 1)) : $("", !0)
|
|
564
|
+
], 64)) : $("", !0),
|
|
565
|
+
S.value ? (i(), c("input", {
|
|
566
|
+
key: 1,
|
|
567
|
+
ref_key: "inputRef",
|
|
568
|
+
ref: I,
|
|
569
|
+
class: "x-tree-select__search x-tree-select__input",
|
|
570
|
+
value: _.value,
|
|
571
|
+
placeholder: j.value.length ? "" : J.value,
|
|
572
|
+
disabled: f.value,
|
|
573
|
+
id: (a = w(s)) == null ? void 0 : a.id,
|
|
574
|
+
onInput: Ne,
|
|
575
|
+
onFocus: Fe,
|
|
576
|
+
onBlur: Ee,
|
|
577
|
+
onKeydown: ce,
|
|
578
|
+
onClick: l[0] || (l[0] = Re(() => {
|
|
579
|
+
}, ["stop"]))
|
|
580
|
+
}, null, 40, Hl)) : j.value.length ? $("", !0) : (i(), c("span", ql, O(J.value), 1))
|
|
581
|
+
])) : (i(), c(pe, { key: 1 }, [
|
|
582
|
+
S.value ? (i(), c("input", {
|
|
583
|
+
key: 0,
|
|
584
|
+
ref_key: "inputRef",
|
|
585
|
+
ref: I,
|
|
586
|
+
class: "x-tree-select__search x-tree-select__input",
|
|
587
|
+
value: ll.value,
|
|
588
|
+
placeholder: J.value,
|
|
589
|
+
disabled: f.value,
|
|
590
|
+
id: (r = w(s)) == null ? void 0 : r.id,
|
|
591
|
+
onInput: Ne,
|
|
592
|
+
onFocus: Fe,
|
|
593
|
+
onBlur: Ee,
|
|
594
|
+
onKeydown: ce,
|
|
595
|
+
onClick: l[1] || (l[1] = Re(() => {
|
|
596
|
+
}, ["stop"]))
|
|
597
|
+
}, null, 40, Gl)) : k.value.length ? (i(), c("span", Ul, [
|
|
598
|
+
b(e.$slots, "label", {
|
|
599
|
+
data: k.value[0].data
|
|
600
|
+
}, () => [
|
|
601
|
+
Oe(O(k.value[0].label), 1)
|
|
602
|
+
], !0)
|
|
603
|
+
])) : (i(), c("span", Jl, O(J.value), 1))
|
|
604
|
+
], 64))
|
|
605
|
+
]),
|
|
606
|
+
F("span", Ql, [
|
|
607
|
+
tl.value ? (i(), c("button", {
|
|
608
|
+
key: 0,
|
|
609
|
+
type: "button",
|
|
610
|
+
class: "x-tree-select__clear",
|
|
611
|
+
onClick: kl
|
|
612
|
+
}, [
|
|
613
|
+
te(w(G), {
|
|
614
|
+
name: "guanbi",
|
|
615
|
+
size: 12
|
|
616
|
+
})
|
|
617
|
+
])) : (i(), c("span", {
|
|
618
|
+
key: 1,
|
|
619
|
+
class: q(["x-tree-select__icon", { "is-open": y.value }])
|
|
620
|
+
}, [
|
|
621
|
+
C.loading ? (i(), le(w(G), {
|
|
622
|
+
key: 0,
|
|
623
|
+
name: "jiazai",
|
|
624
|
+
size: 12,
|
|
625
|
+
spin: ""
|
|
626
|
+
})) : (i(), le(w(G), {
|
|
627
|
+
key: 1,
|
|
628
|
+
name: "xiangxia",
|
|
629
|
+
size: 12
|
|
630
|
+
}))
|
|
631
|
+
], 2))
|
|
632
|
+
])
|
|
633
|
+
], 2)
|
|
634
|
+
], 42, Al))
|
|
635
|
+
];
|
|
636
|
+
}),
|
|
637
|
+
content: E(() => [
|
|
638
|
+
F("div", {
|
|
639
|
+
class: q(["x-tree-select__dropdown", {
|
|
640
|
+
"x-tree-select__dropdown--has-header": !!e.$slots.header,
|
|
641
|
+
"x-tree-select__dropdown--has-footer": !!e.$slots.footer
|
|
642
|
+
}])
|
|
643
|
+
}, [
|
|
644
|
+
e.$slots.header && (!ie.value || C.showHeaderOnEmpty) ? (i(), c("div", Wl, [
|
|
645
|
+
b(e.$slots, "header", {}, void 0, !0)
|
|
646
|
+
])) : $("", !0),
|
|
647
|
+
C.loading ? b(e.$slots, "loader", { key: 1 }, () => [
|
|
648
|
+
F("div", Yl, [
|
|
649
|
+
te(w(G), {
|
|
650
|
+
name: "jiazai",
|
|
651
|
+
size: 14,
|
|
652
|
+
spin: ""
|
|
653
|
+
})
|
|
654
|
+
])
|
|
655
|
+
], !0) : ie.value ? b(e.$slots, "empty", { key: 2 }, () => [
|
|
656
|
+
F("div", Zl, O(w(he)("tree.emptyText", void 0, "暂无数据")), 1)
|
|
657
|
+
], !0) : (i(), le(xl(sl.value ? Nl : "div"), ve({
|
|
658
|
+
key: 3,
|
|
659
|
+
class: "x-tree-select__tree-wrapper"
|
|
660
|
+
}, il.value), {
|
|
661
|
+
default: E(() => [
|
|
662
|
+
te(Fl, ve(fl.value, {
|
|
663
|
+
onSelect: gl,
|
|
664
|
+
onCheck: bl
|
|
665
|
+
}), Tl({ _: 2 }, [
|
|
666
|
+
e.$slots["tree-slot-title"] ? {
|
|
667
|
+
name: "title",
|
|
668
|
+
fn: E(({ node: a }) => [
|
|
669
|
+
b(e.$slots, "tree-slot-title", {
|
|
670
|
+
node: a,
|
|
671
|
+
title: ml(a)
|
|
672
|
+
}, void 0, !0)
|
|
673
|
+
]),
|
|
674
|
+
key: "0"
|
|
675
|
+
} : void 0,
|
|
676
|
+
e.$slots["tree-slot-icon"] ? {
|
|
677
|
+
name: "icon",
|
|
678
|
+
fn: E(({ node: a }) => [
|
|
679
|
+
b(e.$slots, "tree-slot-icon", { node: a }, void 0, !0)
|
|
680
|
+
]),
|
|
681
|
+
key: "1"
|
|
682
|
+
} : void 0,
|
|
683
|
+
e.$slots["tree-slot-extra"] ? {
|
|
684
|
+
name: "extra",
|
|
685
|
+
fn: E(({ node: a }) => [
|
|
686
|
+
b(e.$slots, "tree-slot-extra", { node: a }, void 0, !0)
|
|
687
|
+
]),
|
|
688
|
+
key: "2"
|
|
689
|
+
} : void 0,
|
|
690
|
+
e.$slots["tree-slot-switcher-icon"] ? {
|
|
691
|
+
name: "switcherIcon",
|
|
692
|
+
fn: E(({ node: a, expanded: r }) => [
|
|
693
|
+
b(e.$slots, "tree-slot-switcher-icon", {
|
|
694
|
+
node: a,
|
|
695
|
+
expanded: r
|
|
696
|
+
}, void 0, !0)
|
|
697
|
+
]),
|
|
698
|
+
key: "3"
|
|
699
|
+
} : void 0
|
|
700
|
+
]), 1040)
|
|
701
|
+
]),
|
|
702
|
+
_: 3
|
|
703
|
+
}, 16)),
|
|
704
|
+
e.$slots.footer && (!ie.value || C.showFooterOnEmpty) ? (i(), c("div", et, [
|
|
705
|
+
b(e.$slots, "footer", {}, void 0, !0)
|
|
706
|
+
])) : $("", !0)
|
|
707
|
+
], 2)
|
|
708
|
+
]),
|
|
709
|
+
_: 3
|
|
710
|
+
}, 16, ["popup-visible", "popup-container", "disabled", "click-to-close", "content-class", "content-style"]));
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
export {
|
|
714
|
+
it as default
|
|
715
|
+
};
|