@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,141 @@
|
|
|
1
|
+
import { defineComponent as K, ref as d, watch as M, computed as m, onMounted as N, onUnmounted as X, openBlock as o, createElementBlock as r, normalizeClass as k, createElementVNode as a, withModifiers as S, createVNode as L, unref as c, toDisplayString as f, createCommentVNode as h, Transition as U, withCtx as V, withDirectives as F, vModelText as q, Fragment as A, renderList as P, createBlock as Q, vShow as $ } from "vue";
|
|
2
|
+
import T from "./XIcon.js";
|
|
3
|
+
import { useXI18n as j } from "../composables/i18n.js";
|
|
4
|
+
const G = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "x-table-filter-badge"
|
|
7
|
+
}, H = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "x-table-filter-search"
|
|
10
|
+
}, J = ["placeholder"], W = { class: "x-table-filter-options" }, Y = ["type", "checked", "onChange"], Z = { class: "x-table-filter-check" }, ee = { class: "x-table-filter-text" }, te = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "x-table-filter-empty"
|
|
13
|
+
}, le = { class: "x-table-filter-footer" }, se = /* @__PURE__ */ K({
|
|
14
|
+
__name: "XTableFilter",
|
|
15
|
+
props: {
|
|
16
|
+
options: {},
|
|
17
|
+
value: {},
|
|
18
|
+
multiple: { type: Boolean, default: !0 },
|
|
19
|
+
columnKey: { default: "" },
|
|
20
|
+
alignLeft: { type: Boolean, default: !1 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["change"],
|
|
23
|
+
setup(v, { emit: B }) {
|
|
24
|
+
const s = v, g = B, i = d(!1), { t: p } = j(), b = d(), R = d(), u = d(""), l = d([...s.value]);
|
|
25
|
+
M(() => s.value, (e) => {
|
|
26
|
+
l.value = [...e];
|
|
27
|
+
}, { deep: !0 });
|
|
28
|
+
const C = m(() => {
|
|
29
|
+
if (!u.value) return s.options;
|
|
30
|
+
const e = u.value.toLowerCase();
|
|
31
|
+
return s.options.filter(
|
|
32
|
+
(t) => String(t.text).toLowerCase().includes(e)
|
|
33
|
+
);
|
|
34
|
+
}), E = m(() => l.value.length > 0), _ = m(() => l.value.length), x = m(() => s.columnKey ?? "");
|
|
35
|
+
function O() {
|
|
36
|
+
i.value = !i.value, i.value && (u.value = "");
|
|
37
|
+
}
|
|
38
|
+
function z(e) {
|
|
39
|
+
if (s.multiple) {
|
|
40
|
+
const t = l.value.findIndex((n) => String(n) === String(e));
|
|
41
|
+
t > -1 ? l.value.splice(t, 1) : l.value.push(e), g("change", [...l.value], x.value);
|
|
42
|
+
} else
|
|
43
|
+
l.value = [e], g("change", [e], x.value), i.value = !1;
|
|
44
|
+
}
|
|
45
|
+
function y(e) {
|
|
46
|
+
return l.value.some((t) => String(t) === String(e));
|
|
47
|
+
}
|
|
48
|
+
function D() {
|
|
49
|
+
l.value = [], g("change", [], x.value);
|
|
50
|
+
}
|
|
51
|
+
function I() {
|
|
52
|
+
i.value = !1;
|
|
53
|
+
}
|
|
54
|
+
function w(e) {
|
|
55
|
+
const t = e.target;
|
|
56
|
+
b.value && !b.value.contains(t) && (i.value = !1);
|
|
57
|
+
}
|
|
58
|
+
return N(() => {
|
|
59
|
+
document.addEventListener("click", w);
|
|
60
|
+
}), X(() => {
|
|
61
|
+
document.removeEventListener("click", w);
|
|
62
|
+
}), (e, t) => (o(), r("div", {
|
|
63
|
+
ref_key: "dropdownRef",
|
|
64
|
+
ref: b,
|
|
65
|
+
class: k(["x-table-filter-dropdown", { "is-open": i.value, "align-left": v.alignLeft }])
|
|
66
|
+
}, [
|
|
67
|
+
a("button", {
|
|
68
|
+
ref_key: "triggerRef",
|
|
69
|
+
ref: R,
|
|
70
|
+
type: "button",
|
|
71
|
+
class: k(["x-table-filter-trigger", { "is-active": E.value }]),
|
|
72
|
+
onClick: S(O, ["stop"])
|
|
73
|
+
}, [
|
|
74
|
+
L(c(T), {
|
|
75
|
+
name: "filter",
|
|
76
|
+
size: 12
|
|
77
|
+
}),
|
|
78
|
+
_.value > 0 ? (o(), r("span", G, f(_.value), 1)) : h("", !0)
|
|
79
|
+
], 2),
|
|
80
|
+
L(U, { name: "x-table-filter" }, {
|
|
81
|
+
default: V(() => [
|
|
82
|
+
F(a("div", {
|
|
83
|
+
class: "x-table-filter-panel",
|
|
84
|
+
onClick: t[1] || (t[1] = S(() => {
|
|
85
|
+
}, ["stop"]))
|
|
86
|
+
}, [
|
|
87
|
+
v.options.length > 8 ? (o(), r("div", H, [
|
|
88
|
+
F(a("input", {
|
|
89
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => u.value = n),
|
|
90
|
+
type: "text",
|
|
91
|
+
placeholder: c(p)("tableFilter.searchPlaceholder", void 0, "搜索..."),
|
|
92
|
+
class: "x-table-filter-input"
|
|
93
|
+
}, null, 8, J), [
|
|
94
|
+
[q, u.value]
|
|
95
|
+
])
|
|
96
|
+
])) : h("", !0),
|
|
97
|
+
a("div", W, [
|
|
98
|
+
(o(!0), r(A, null, P(C.value, (n) => (o(), r("label", {
|
|
99
|
+
key: String(n.value),
|
|
100
|
+
class: k(["x-table-filter-option", { "is-selected": y(n.value) }])
|
|
101
|
+
}, [
|
|
102
|
+
a("input", {
|
|
103
|
+
type: v.multiple ? "checkbox" : "radio",
|
|
104
|
+
checked: y(n.value),
|
|
105
|
+
onChange: (ne) => z(n.value)
|
|
106
|
+
}, null, 40, Y),
|
|
107
|
+
a("span", Z, [
|
|
108
|
+
y(n.value) ? (o(), Q(c(T), {
|
|
109
|
+
key: 0,
|
|
110
|
+
name: "check",
|
|
111
|
+
size: 10
|
|
112
|
+
})) : h("", !0)
|
|
113
|
+
]),
|
|
114
|
+
a("span", ee, f(n.text), 1)
|
|
115
|
+
], 2))), 128)),
|
|
116
|
+
C.value.length === 0 ? (o(), r("div", te, f(c(p)("tableFilter.emptyText", void 0, "无匹配选项")), 1)) : h("", !0)
|
|
117
|
+
]),
|
|
118
|
+
a("div", le, [
|
|
119
|
+
a("button", {
|
|
120
|
+
type: "button",
|
|
121
|
+
class: "x-table-filter-btn",
|
|
122
|
+
onClick: D
|
|
123
|
+
}, f(c(p)("tableFilter.resetText", void 0, "重置")), 1),
|
|
124
|
+
a("button", {
|
|
125
|
+
type: "button",
|
|
126
|
+
class: "x-table-filter-btn is-primary",
|
|
127
|
+
onClick: I
|
|
128
|
+
}, f(c(p)("tableFilter.confirmText", void 0, "确定")), 1)
|
|
129
|
+
])
|
|
130
|
+
], 512), [
|
|
131
|
+
[$, i.value]
|
|
132
|
+
])
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
], 2));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
export {
|
|
140
|
+
se as default
|
|
141
|
+
};
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { defineComponent as ne, reactive as Se, ref as b, computed as o, provide as Be, watch as O, nextTick as $, onMounted as Le, onBeforeUnmount as Te, resolveComponent as Ke, openBlock as d, createElementBlock as c, normalizeClass as f, createElementVNode as C, normalizeStyle as P, renderSlot as A, createCommentVNode as m, createVNode as B, Fragment as Me, renderList as He, withKeys as Re, unref as We, withModifiers as Oe } from "vue";
|
|
2
|
+
import { xTabsKey as Pe, updateTabsScrollOffset as Ae } from "../composables/tabs.js";
|
|
3
|
+
const Ee = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "x-tabs__nav-extra x-tabs__nav-extra--left"
|
|
6
|
+
}, Ne = ["tabindex", "onClick", "onMouseover", "onKeydown"], je = { class: "x-tabs__tab-title" }, De = ["onClick"], Ie = { class: "x-tabs__nav-extra" }, Ve = /* @__PURE__ */ ne({
|
|
7
|
+
__name: "XTabs",
|
|
8
|
+
props: {
|
|
9
|
+
activeKey: { default: void 0 },
|
|
10
|
+
defaultActiveKey: { default: void 0 },
|
|
11
|
+
position: { default: "top" },
|
|
12
|
+
size: { default: "medium" },
|
|
13
|
+
type: { default: "line" },
|
|
14
|
+
direction: { default: "horizontal" },
|
|
15
|
+
editable: { type: Boolean, default: !1 },
|
|
16
|
+
showAddButton: { type: Boolean, default: !1 },
|
|
17
|
+
addable: { type: Boolean, default: void 0 },
|
|
18
|
+
destroyOnHide: { type: Boolean, default: !1 },
|
|
19
|
+
lazyLoad: { type: Boolean, default: !1 },
|
|
20
|
+
justify: { type: Boolean, default: !1 },
|
|
21
|
+
animation: { type: Boolean, default: !1 },
|
|
22
|
+
headerPadding: { type: Boolean, default: !0 },
|
|
23
|
+
autoSwitch: { type: Boolean, default: !1 },
|
|
24
|
+
hideContent: { type: Boolean, default: !1 },
|
|
25
|
+
trigger: { default: "click" },
|
|
26
|
+
scrollPosition: { default: "auto" }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:activeKey", "change", "tabClick", "add", "delete"],
|
|
29
|
+
setup(le, { emit: oe }) {
|
|
30
|
+
const a = le, L = oe, ie = ne({
|
|
31
|
+
name: "XTabsRenderTitle",
|
|
32
|
+
props: {
|
|
33
|
+
render: {
|
|
34
|
+
type: Function,
|
|
35
|
+
default: void 0
|
|
36
|
+
},
|
|
37
|
+
text: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
setup(e) {
|
|
43
|
+
return () => e.render ? e.render() : e.text;
|
|
44
|
+
}
|
|
45
|
+
}), E = Se(/* @__PURE__ */ new Map()), p = b([]), F = o(
|
|
46
|
+
() => p.value.map((e) => E.get(e)).filter((e) => !!e)
|
|
47
|
+
), T = o(() => F.value.map((e) => e.key)), X = b(a.defaultActiveKey), g = o(
|
|
48
|
+
() => a.direction === "vertical" ? "left" : a.position
|
|
49
|
+
), u = o(
|
|
50
|
+
() => g.value === "left" || g.value === "right" ? "vertical" : "horizontal"
|
|
51
|
+
), V = o(() => a.size ?? "medium"), Y = o(() => a.addable ?? a.showAddButton), R = o(
|
|
52
|
+
() => a.editable && ["line", "card", "card-gutter"].includes(a.type)
|
|
53
|
+
), K = o(() => {
|
|
54
|
+
const e = a.activeKey ?? X.value;
|
|
55
|
+
return e == null || e === "" ? T.value[0] : e;
|
|
56
|
+
}), U = o(() => {
|
|
57
|
+
const e = T.value.findIndex((t) => t === K.value);
|
|
58
|
+
return e === -1 ? 0 : e;
|
|
59
|
+
}), se = o(() => [
|
|
60
|
+
"x-tabs",
|
|
61
|
+
`x-tabs--${u.value}`,
|
|
62
|
+
`x-tabs--${g.value}`,
|
|
63
|
+
`x-tabs--type-${a.type}`,
|
|
64
|
+
`x-tabs--size-${V.value}`,
|
|
65
|
+
{
|
|
66
|
+
"x-tabs--justify": a.justify
|
|
67
|
+
}
|
|
68
|
+
]), ue = o(() => [
|
|
69
|
+
"x-tabs__nav",
|
|
70
|
+
`x-tabs__nav--${u.value}`,
|
|
71
|
+
`x-tabs__nav--${g.value}`,
|
|
72
|
+
`x-tabs__nav--type-${a.type}`,
|
|
73
|
+
`x-tabs__nav--size-${V.value}`
|
|
74
|
+
]), re = o(() => [
|
|
75
|
+
"x-tabs__nav-tab",
|
|
76
|
+
{
|
|
77
|
+
"x-tabs__nav-tab--scroll": _.value
|
|
78
|
+
}
|
|
79
|
+
]), ve = o(() => [
|
|
80
|
+
"x-tabs__nav-tab-list",
|
|
81
|
+
{
|
|
82
|
+
"x-tabs__nav-tab-list--no-padding": !a.headerPadding && ["line", "text"].includes(a.type) && u.value === "horizontal"
|
|
83
|
+
}
|
|
84
|
+
]), i = b(), y = b(), h = b({}), v = o(() => {
|
|
85
|
+
const e = K.value;
|
|
86
|
+
if (e != null)
|
|
87
|
+
return h.value[String(e)];
|
|
88
|
+
}), _ = b(!1), N = b(0), M = b(0), r = b(0), j = b(0), D = b(0), de = o(() => ({
|
|
89
|
+
transform: u.value === "vertical" ? `translateY(${-r.value}px)` : `translateX(${-r.value}px)`
|
|
90
|
+
})), ce = o(
|
|
91
|
+
() => u.value === "vertical" ? {
|
|
92
|
+
top: `${j.value}px`,
|
|
93
|
+
height: `${D.value}px`
|
|
94
|
+
} : {
|
|
95
|
+
left: `${j.value}px`,
|
|
96
|
+
width: `${D.value}px`
|
|
97
|
+
}
|
|
98
|
+
), q = o(() => ({
|
|
99
|
+
marginLeft: `-${U.value * 100}%`
|
|
100
|
+
})), fe = o(
|
|
101
|
+
() => u.value === "vertical" ? "xiangshang" : "fanhui"
|
|
102
|
+
), be = o(
|
|
103
|
+
() => u.value === "vertical" ? "xiangxia" : "gengduo"
|
|
104
|
+
), G = o(() => r.value <= 0), J = o(() => r.value >= M.value);
|
|
105
|
+
function ye(e) {
|
|
106
|
+
E.set(e.uid, e), p.value.includes(e.uid) || (p.value = [...p.value, e.uid]);
|
|
107
|
+
}
|
|
108
|
+
function _e(e) {
|
|
109
|
+
E.delete(e), p.value.includes(e) && (p.value = p.value.filter((t) => t !== e));
|
|
110
|
+
}
|
|
111
|
+
Be(Pe, {
|
|
112
|
+
activeKey: K,
|
|
113
|
+
lazyLoad: o(() => a.lazyLoad),
|
|
114
|
+
destroyOnHide: o(() => a.destroyOnHide),
|
|
115
|
+
trigger: o(() => a.trigger),
|
|
116
|
+
register: ye,
|
|
117
|
+
unregister: _e
|
|
118
|
+
});
|
|
119
|
+
function xe(e, t) {
|
|
120
|
+
const l = String(e), n = h.value[l];
|
|
121
|
+
let s = null;
|
|
122
|
+
if (t instanceof HTMLElement ? s = t : typeof t == "object" && t !== null && "$el" in t && t.$el instanceof HTMLElement && (s = t.$el), s) {
|
|
123
|
+
n !== s && (h.value[l] = s);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
n && delete h.value[l];
|
|
127
|
+
}
|
|
128
|
+
function Q(e) {
|
|
129
|
+
e !== K.value && (X.value = e, L("update:activeKey", e), L("change", e));
|
|
130
|
+
}
|
|
131
|
+
function I(e, t) {
|
|
132
|
+
e.disabled || (Q(e.key), L("tabClick", e.key, t));
|
|
133
|
+
}
|
|
134
|
+
function me(e, t) {
|
|
135
|
+
a.trigger === "click" && I(e, t);
|
|
136
|
+
}
|
|
137
|
+
function he(e, t) {
|
|
138
|
+
a.trigger === "hover" && I(e, t);
|
|
139
|
+
}
|
|
140
|
+
function pe(e, t) {
|
|
141
|
+
t.key === "Enter" && I(e, t);
|
|
142
|
+
}
|
|
143
|
+
function Z(e) {
|
|
144
|
+
L("add", e), a.autoSwitch && $(() => {
|
|
145
|
+
const t = T.value[T.value.length - 1];
|
|
146
|
+
t !== void 0 && Q(t);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function ge(e, t) {
|
|
150
|
+
e.disabled || (L("delete", e.key, t), $(() => {
|
|
151
|
+
const l = { ...h.value };
|
|
152
|
+
delete l[String(e.key)], h.value = l;
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
function ke() {
|
|
156
|
+
return i.value ? u.value === "vertical" ? i.value.offsetHeight : i.value.offsetWidth : 0;
|
|
157
|
+
}
|
|
158
|
+
function ze() {
|
|
159
|
+
return !i.value || !y.value ? 0 : u.value === "vertical" ? y.value.offsetHeight - i.value.offsetHeight : y.value.offsetWidth - i.value.offsetWidth;
|
|
160
|
+
}
|
|
161
|
+
function we() {
|
|
162
|
+
return !i.value || !y.value ? !1 : u.value === "vertical" ? y.value.offsetHeight > i.value.offsetHeight : y.value.offsetWidth > i.value.offsetWidth;
|
|
163
|
+
}
|
|
164
|
+
function W(e) {
|
|
165
|
+
const t = Number.isFinite(e) ? e : 0, l = 0, n = Math.max(0, M.value);
|
|
166
|
+
r.value = Math.min(Math.max(t, l), n);
|
|
167
|
+
}
|
|
168
|
+
function S() {
|
|
169
|
+
if (_.value = we(), N.value = ke(), M.value = Math.max(0, ze()), !_.value) {
|
|
170
|
+
r.value = 0;
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
r.value > M.value && (r.value = M.value);
|
|
174
|
+
}
|
|
175
|
+
function k() {
|
|
176
|
+
if (!v.value) return;
|
|
177
|
+
const e = u.value === "vertical" ? v.value.offsetTop : v.value.offsetLeft, t = u.value === "vertical" ? v.value.offsetHeight : v.value.offsetWidth;
|
|
178
|
+
j.value = e, D.value = t;
|
|
179
|
+
}
|
|
180
|
+
function z() {
|
|
181
|
+
if (!v.value || !i.value || !_.value) return;
|
|
182
|
+
Ae(i.value, u.value);
|
|
183
|
+
const e = u.value === "horizontal", t = e ? i.value.offsetWidth : i.value.offsetHeight, l = e ? v.value.offsetWidth : v.value.offsetHeight, n = e ? v.value.offsetLeft : v.value.offsetTop, s = e ? a.scrollPosition === "end" ? "marginRight" : "marginLeft" : a.scrollPosition === "end" ? "marginBottom" : "marginTop", Ce = window.getComputedStyle(v.value), H = Number.parseFloat(Ce[s]) || 0;
|
|
184
|
+
let w = r.value;
|
|
185
|
+
switch (a.scrollPosition) {
|
|
186
|
+
case "auto":
|
|
187
|
+
n < r.value ? w = n - H : n + l > r.value + t && (w = n + l - t + H);
|
|
188
|
+
break;
|
|
189
|
+
case "center":
|
|
190
|
+
w = n + (l - t + H) / 2;
|
|
191
|
+
break;
|
|
192
|
+
case "start":
|
|
193
|
+
w = n - H;
|
|
194
|
+
break;
|
|
195
|
+
case "end":
|
|
196
|
+
w = n + l - t + H;
|
|
197
|
+
break;
|
|
198
|
+
default:
|
|
199
|
+
typeof a.scrollPosition == "number" && (w = n - a.scrollPosition);
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
W(w);
|
|
203
|
+
}
|
|
204
|
+
function $e(e) {
|
|
205
|
+
if (!_.value) return;
|
|
206
|
+
e.preventDefault();
|
|
207
|
+
const { deltaX: t, deltaY: l } = e;
|
|
208
|
+
if (Math.abs(t) > Math.abs(l)) {
|
|
209
|
+
W(r.value + t);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
W(r.value + l);
|
|
213
|
+
}
|
|
214
|
+
function ee(e) {
|
|
215
|
+
if (!_.value || e === "previous" && G.value || e === "next" && J.value) return;
|
|
216
|
+
const t = e === "previous" ? -N.value : N.value;
|
|
217
|
+
W(r.value + t);
|
|
218
|
+
}
|
|
219
|
+
const te = () => {
|
|
220
|
+
S(), z(), k();
|
|
221
|
+
};
|
|
222
|
+
let x = null;
|
|
223
|
+
function ae() {
|
|
224
|
+
typeof ResizeObserver > "u" || (x == null || x.disconnect(), x = new ResizeObserver(() => {
|
|
225
|
+
S(), z(), k();
|
|
226
|
+
}), i.value && x.observe(i.value), y.value && x.observe(y.value));
|
|
227
|
+
}
|
|
228
|
+
return O(
|
|
229
|
+
T,
|
|
230
|
+
(e) => {
|
|
231
|
+
const t = new Set(e.map((l) => String(l)));
|
|
232
|
+
Object.keys(h.value).forEach((l) => {
|
|
233
|
+
t.has(l) || delete h.value[l];
|
|
234
|
+
}), $(() => {
|
|
235
|
+
S(), z(), k();
|
|
236
|
+
});
|
|
237
|
+
},
|
|
238
|
+
{ immediate: !0 }
|
|
239
|
+
), O(
|
|
240
|
+
[U, () => a.scrollPosition],
|
|
241
|
+
() => {
|
|
242
|
+
$(() => {
|
|
243
|
+
z(), k();
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
{ immediate: !0 }
|
|
247
|
+
), O(
|
|
248
|
+
[() => a.type, () => a.headerPadding, u, g],
|
|
249
|
+
() => {
|
|
250
|
+
$(() => {
|
|
251
|
+
S(), z(), k();
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
), O([i, y], () => {
|
|
255
|
+
$(() => {
|
|
256
|
+
ae(), S(), z(), k();
|
|
257
|
+
});
|
|
258
|
+
}), Le(() => {
|
|
259
|
+
ae(), window.addEventListener("resize", te), $(() => {
|
|
260
|
+
S(), z(), k();
|
|
261
|
+
});
|
|
262
|
+
}), Te(() => {
|
|
263
|
+
x == null || x.disconnect(), x = null, window.removeEventListener("resize", te);
|
|
264
|
+
}), (e, t) => {
|
|
265
|
+
const l = Ke("x-icon");
|
|
266
|
+
return d(), c("div", {
|
|
267
|
+
class: f(se.value)
|
|
268
|
+
}, [
|
|
269
|
+
g.value === "bottom" ? (d(), c("div", {
|
|
270
|
+
key: 0,
|
|
271
|
+
class: f(["x-tabs__content", { "x-tabs__content--hide": a.hideContent }])
|
|
272
|
+
}, [
|
|
273
|
+
C("div", {
|
|
274
|
+
class: f(["x-tabs__content-list", { "x-tabs__content-list--animation": a.animation }]),
|
|
275
|
+
style: P(q.value)
|
|
276
|
+
}, [
|
|
277
|
+
A(e.$slots, "default")
|
|
278
|
+
], 6)
|
|
279
|
+
], 2)) : m("", !0),
|
|
280
|
+
C("div", {
|
|
281
|
+
class: f([ue.value, { "x-tabs__nav--with-extra-left": e.$slots.extraLeft }])
|
|
282
|
+
}, [
|
|
283
|
+
e.$slots.extraLeft ? (d(), c("div", Ee, [
|
|
284
|
+
A(e.$slots, "extraLeft")
|
|
285
|
+
])) : m("", !0),
|
|
286
|
+
_.value ? (d(), c("button", {
|
|
287
|
+
key: 1,
|
|
288
|
+
type: "button",
|
|
289
|
+
class: f(["x-tabs__nav-button x-tabs__nav-button--previous", { "is-disabled": G.value }]),
|
|
290
|
+
onClick: t[0] || (t[0] = (n) => ee("previous"))
|
|
291
|
+
}, [
|
|
292
|
+
B(l, {
|
|
293
|
+
name: fe.value,
|
|
294
|
+
size: 14
|
|
295
|
+
}, null, 8, ["name"])
|
|
296
|
+
], 2)) : m("", !0),
|
|
297
|
+
C("div", {
|
|
298
|
+
ref_key: "navWrapperRef",
|
|
299
|
+
ref: i,
|
|
300
|
+
class: f(re.value),
|
|
301
|
+
onWheel: $e
|
|
302
|
+
}, [
|
|
303
|
+
C("div", {
|
|
304
|
+
ref_key: "navListRef",
|
|
305
|
+
ref: y,
|
|
306
|
+
class: f(ve.value),
|
|
307
|
+
style: P(de.value)
|
|
308
|
+
}, [
|
|
309
|
+
(d(!0), c(Me, null, He(F.value, (n) => (d(), c("div", {
|
|
310
|
+
key: n.key,
|
|
311
|
+
ref_for: !0,
|
|
312
|
+
ref: (s) => xe(n.key, s),
|
|
313
|
+
class: f(["x-tabs__tab", {
|
|
314
|
+
"x-tabs__tab--active": n.key === K.value,
|
|
315
|
+
"x-tabs__tab--disabled": n.disabled,
|
|
316
|
+
"x-tabs__tab--closable": R.value && n.closable
|
|
317
|
+
}]),
|
|
318
|
+
tabindex: n.disabled ? -1 : 0,
|
|
319
|
+
onClick: (s) => me(n, s),
|
|
320
|
+
onMouseover: (s) => he(n, s),
|
|
321
|
+
onKeydown: Re((s) => pe(n, s), ["enter"])
|
|
322
|
+
}, [
|
|
323
|
+
C("span", je, [
|
|
324
|
+
B(We(ie), {
|
|
325
|
+
render: n.slots.title,
|
|
326
|
+
text: n.title ?? ""
|
|
327
|
+
}, null, 8, ["render", "text"])
|
|
328
|
+
]),
|
|
329
|
+
R.value && n.closable ? (d(), c("button", {
|
|
330
|
+
key: 0,
|
|
331
|
+
type: "button",
|
|
332
|
+
class: "x-tabs__tab-close-btn",
|
|
333
|
+
onClick: Oe((s) => ge(n, s), ["stop"])
|
|
334
|
+
}, [
|
|
335
|
+
B(l, {
|
|
336
|
+
name: "guanbi",
|
|
337
|
+
size: 12
|
|
338
|
+
})
|
|
339
|
+
], 8, De)) : m("", !0)
|
|
340
|
+
], 42, Ne))), 128)),
|
|
341
|
+
a.type === "line" && v.value ? (d(), c("div", {
|
|
342
|
+
key: 0,
|
|
343
|
+
class: f(["x-tabs__nav-ink", { "x-tabs__nav-ink--animation": a.animation }]),
|
|
344
|
+
style: P(ce.value)
|
|
345
|
+
}, null, 6)) : m("", !0)
|
|
346
|
+
], 6),
|
|
347
|
+
!_.value && R.value && Y.value ? (d(), c("button", {
|
|
348
|
+
key: 0,
|
|
349
|
+
type: "button",
|
|
350
|
+
class: "x-tabs__nav-add-btn",
|
|
351
|
+
onClick: Z
|
|
352
|
+
}, [
|
|
353
|
+
B(l, {
|
|
354
|
+
name: "checkbox-plus",
|
|
355
|
+
size: 14
|
|
356
|
+
})
|
|
357
|
+
])) : m("", !0)
|
|
358
|
+
], 34),
|
|
359
|
+
_.value ? (d(), c("button", {
|
|
360
|
+
key: 2,
|
|
361
|
+
type: "button",
|
|
362
|
+
class: f(["x-tabs__nav-button x-tabs__nav-button--next", { "is-disabled": J.value }]),
|
|
363
|
+
onClick: t[1] || (t[1] = (n) => ee("next"))
|
|
364
|
+
}, [
|
|
365
|
+
B(l, {
|
|
366
|
+
name: be.value,
|
|
367
|
+
size: 14
|
|
368
|
+
}, null, 8, ["name"])
|
|
369
|
+
], 2)) : m("", !0),
|
|
370
|
+
C("div", Ie, [
|
|
371
|
+
_.value && R.value && Y.value ? (d(), c("button", {
|
|
372
|
+
key: 0,
|
|
373
|
+
type: "button",
|
|
374
|
+
class: "x-tabs__nav-add-btn",
|
|
375
|
+
onClick: Z
|
|
376
|
+
}, [
|
|
377
|
+
B(l, {
|
|
378
|
+
name: "checkbox-plus",
|
|
379
|
+
size: 14
|
|
380
|
+
})
|
|
381
|
+
])) : m("", !0),
|
|
382
|
+
A(e.$slots, "extra")
|
|
383
|
+
])
|
|
384
|
+
], 2),
|
|
385
|
+
g.value !== "bottom" ? (d(), c("div", {
|
|
386
|
+
key: 1,
|
|
387
|
+
class: f(["x-tabs__content", { "x-tabs__content--hide": a.hideContent }])
|
|
388
|
+
}, [
|
|
389
|
+
C("div", {
|
|
390
|
+
class: f(["x-tabs__content-list", { "x-tabs__content-list--animation": a.animation }]),
|
|
391
|
+
style: P(q.value)
|
|
392
|
+
}, [
|
|
393
|
+
A(e.$slots, "default")
|
|
394
|
+
], 6)
|
|
395
|
+
], 2)) : m("", !0)
|
|
396
|
+
], 2);
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
export {
|
|
401
|
+
Ve as default
|
|
402
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as A, ref as p, watch as k, computed as s, useAttrs as N, openBlock as l, createBlock as X, Transition as E, withCtx as I, createElementBlock as c, mergeProps as P, unref as u, createElementVNode as h, renderSlot as y, createCommentVNode as f, createVNode as T } from "vue";
|
|
2
|
+
import j from "./XIcon.js";
|
|
3
|
+
import { useXI18n as W } from "../composables/i18n.js";
|
|
4
|
+
const q = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "x-tag__icon x-tag__loading"
|
|
7
|
+
}, D = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "x-tag__icon"
|
|
10
|
+
}, F = { class: "x-tag__content" }, G = ["aria-label"], L = /* @__PURE__ */ A({
|
|
11
|
+
__name: "XTag",
|
|
12
|
+
props: {
|
|
13
|
+
color: { default: "default" },
|
|
14
|
+
bordered: { type: Boolean, default: !1 },
|
|
15
|
+
round: { type: Boolean, default: !1 },
|
|
16
|
+
closable: { type: Boolean, default: !1 },
|
|
17
|
+
visible: { type: Boolean, default: void 0 },
|
|
18
|
+
size: { default: "medium" },
|
|
19
|
+
checkable: { type: Boolean, default: !1 },
|
|
20
|
+
checked: { type: Boolean, default: void 0 },
|
|
21
|
+
defaultChecked: { type: Boolean, default: !1 },
|
|
22
|
+
loading: { type: Boolean, default: !1 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:visible", "update:checked", "close", "check"],
|
|
25
|
+
setup(a, { emit: v }) {
|
|
26
|
+
function C(e, o = "14") {
|
|
27
|
+
if (!e.startsWith("#")) return "transparent";
|
|
28
|
+
const d = e.slice(1);
|
|
29
|
+
return d.length === 3 ? `#${d.split("").map((m) => `${m}${m}`).join("")}${o}` : d.length === 6 ? `${e}${o}` : "transparent";
|
|
30
|
+
}
|
|
31
|
+
const t = a, n = v, i = p(!0), r = p(t.defaultChecked);
|
|
32
|
+
k(
|
|
33
|
+
() => t.visible,
|
|
34
|
+
(e) => {
|
|
35
|
+
typeof e == "boolean" && (i.value = e);
|
|
36
|
+
},
|
|
37
|
+
{ immediate: !0 }
|
|
38
|
+
), k(
|
|
39
|
+
() => t.checked,
|
|
40
|
+
(e) => {
|
|
41
|
+
typeof e == "boolean" && (r.value = e);
|
|
42
|
+
},
|
|
43
|
+
{ immediate: !0 }
|
|
44
|
+
);
|
|
45
|
+
const x = s(() => typeof t.visible == "boolean" ? t.visible : i.value), b = s(() => typeof t.checked == "boolean" ? t.checked : r.value), B = N(), { t: $ } = W(), w = [
|
|
46
|
+
"default",
|
|
47
|
+
"primary",
|
|
48
|
+
"success",
|
|
49
|
+
"warning",
|
|
50
|
+
"danger",
|
|
51
|
+
"red",
|
|
52
|
+
"orangered",
|
|
53
|
+
"orange",
|
|
54
|
+
"gold",
|
|
55
|
+
"lime",
|
|
56
|
+
"green",
|
|
57
|
+
"cyan",
|
|
58
|
+
"blue",
|
|
59
|
+
"blue",
|
|
60
|
+
"purple",
|
|
61
|
+
"pinkpurple",
|
|
62
|
+
"magenta",
|
|
63
|
+
"gray"
|
|
64
|
+
], g = s(() => w.includes(t.color)), z = s(() => {
|
|
65
|
+
if (g.value) return;
|
|
66
|
+
const e = t.color;
|
|
67
|
+
return {
|
|
68
|
+
color: e,
|
|
69
|
+
borderColor: t.bordered ? e : "transparent",
|
|
70
|
+
background: t.bordered ? "transparent" : C(e, "14")
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
function V(e) {
|
|
74
|
+
e.stopPropagation(), typeof t.visible != "boolean" && (i.value = !1), n("update:visible", !1), n("close", e);
|
|
75
|
+
}
|
|
76
|
+
function S(e) {
|
|
77
|
+
if (t.checkable && !t.loading) {
|
|
78
|
+
const o = !b.value;
|
|
79
|
+
typeof t.checked != "boolean" && (r.value = o), n("update:checked", o), n("check", o, e);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return (e, o) => (l(), X(E, { name: "x-tag" }, {
|
|
83
|
+
default: I(() => [
|
|
84
|
+
x.value ? (l(), c("span", P({ key: 0 }, u(B), {
|
|
85
|
+
class: ["x-tag", [
|
|
86
|
+
g.value ? `x-tag--${a.color}` : "x-tag--custom",
|
|
87
|
+
a.bordered ? "is-bordered" : "",
|
|
88
|
+
a.round ? "is-round" : "",
|
|
89
|
+
a.closable ? "is-closable" : "",
|
|
90
|
+
a.checkable ? "is-checkable" : "",
|
|
91
|
+
b.value ? "is-checked" : "",
|
|
92
|
+
a.loading ? "is-loading" : "",
|
|
93
|
+
`x-tag--${a.size}`
|
|
94
|
+
]],
|
|
95
|
+
style: z.value,
|
|
96
|
+
onClick: S
|
|
97
|
+
}), [
|
|
98
|
+
a.loading ? (l(), c("span", q, [...o[0] || (o[0] = [
|
|
99
|
+
h("span", { class: "x-tag__loading-spinner" }, null, -1)
|
|
100
|
+
])])) : e.$slots.icon ? (l(), c("span", D, [
|
|
101
|
+
y(e.$slots, "icon")
|
|
102
|
+
])) : f("", !0),
|
|
103
|
+
h("span", F, [
|
|
104
|
+
y(e.$slots, "default")
|
|
105
|
+
]),
|
|
106
|
+
a.closable && !a.loading ? (l(), c("button", {
|
|
107
|
+
key: 2,
|
|
108
|
+
type: "button",
|
|
109
|
+
class: "x-tag__close",
|
|
110
|
+
onClick: V,
|
|
111
|
+
"aria-label": u($)("tag.closeAria", void 0, "关闭")
|
|
112
|
+
}, [
|
|
113
|
+
T(u(j), {
|
|
114
|
+
name: "window-close",
|
|
115
|
+
size: a.size === "small" ? 10 : 12
|
|
116
|
+
}, null, 8, ["size"])
|
|
117
|
+
], 8, G)) : f("", !0)
|
|
118
|
+
], 16)) : f("", !0)
|
|
119
|
+
]),
|
|
120
|
+
_: 3
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
L as default
|
|
126
|
+
};
|