@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,1060 @@
|
|
|
1
|
+
import { defineComponent as Oe, useSlots as vt, toRefs as mt, ref as M, computed as C, watch as fe, onBeforeUnmount as yt, openBlock as a, createElementBlock as u, normalizeClass as D, unref as n, createElementVNode as g, renderSlot as y, createVNode as E, toDisplayString as x, createCommentVNode as v, Fragment as S, withModifiers as U, createBlock as m, withCtx as Ve, createTextVNode as Y, renderList as gt, normalizeStyle as Ae, Teleport as ht, reactive as He } from "vue";
|
|
2
|
+
import kt from "./XButton.vue.js";
|
|
3
|
+
import k from "./XIcon.js";
|
|
4
|
+
import { useXI18n as wt } from "../composables/i18n.js";
|
|
5
|
+
import { hasDarkThemeContext as xt } from "../composables/theme-context.js";
|
|
6
|
+
const bt = ["disabled", "accept", "multiple", "webkitdirectory"], _t = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "x-upload-picture-card"
|
|
9
|
+
}, Ct = { class: "x-upload-picture-card-text" }, Bt = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "x-upload-tip"
|
|
12
|
+
}, $t = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "x-upload-dragger"
|
|
15
|
+
}, Rt = { class: "x-upload-dragger__text" }, Lt = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "x-upload-tip"
|
|
18
|
+
}, Ut = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "x-upload-easy-trigger"
|
|
21
|
+
}, Et = ["src", "alt", "loading"], Ft = { class: "x-upload-easy-mask" }, zt = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "x-upload-easy-progress"
|
|
24
|
+
}, Dt = {
|
|
25
|
+
key: 1,
|
|
26
|
+
class: "x-upload-easy-empty"
|
|
27
|
+
}, It = { class: "x-upload-easy-text" }, Pt = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "x-upload-tip"
|
|
30
|
+
}, Tt = { class: "x-upload-list-item-content" }, jt = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "x-upload-list-item-thumbnail"
|
|
33
|
+
}, Nt = ["src", "alt", "loading"], Mt = { class: "x-upload-list-item-name" }, St = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "x-upload-list-item-file-icon"
|
|
36
|
+
}, Ot = ["href", "download", "onClick"], Vt = ["onClick"], At = ["title"], Ht = { class: "x-upload-progress" }, Kt = ["onClick"], Xt = ["onClick"], qt = {
|
|
37
|
+
key: 1,
|
|
38
|
+
class: "x-upload-icon x-upload-icon-success"
|
|
39
|
+
}, Gt = ["onClick"], Jt = ["onClick"], Qt = { class: "x-upload-icon x-upload-icon-remove" }, Wt = { class: "x-upload-list-picture-uploading-text" }, Yt = ["src", "alt", "loading"], Zt = { class: "x-upload-list-picture-mask" }, eo = {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "x-upload-list-picture-error-tip"
|
|
42
|
+
}, to = { class: "x-upload-icon x-upload-icon-error" }, oo = { class: "x-upload-list-picture-operation" }, no = ["onClick"], ro = ["onClick"], ao = ["onClick"], io = ["disabled", "accept", "multiple", "webkitdirectory"], so = { class: "x-upload-picture-card" }, uo = { class: "x-upload-picture-card-text" }, lo = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "x-upload-tip"
|
|
45
|
+
}, co = ["src"], po = {
|
|
46
|
+
key: 2,
|
|
47
|
+
class: "x-upload-image-preview-indicator"
|
|
48
|
+
}, ho = /* @__PURE__ */ Oe({
|
|
49
|
+
__name: "XUpload",
|
|
50
|
+
props: {
|
|
51
|
+
fileList: { default: void 0 },
|
|
52
|
+
defaultFileList: { default: () => [] },
|
|
53
|
+
modelValue: { default: void 0 },
|
|
54
|
+
accept: { default: void 0 },
|
|
55
|
+
action: { default: void 0 },
|
|
56
|
+
disabled: { type: Boolean, default: !1 },
|
|
57
|
+
multiple: { type: Boolean, default: !1 },
|
|
58
|
+
directory: { type: Boolean, default: !1 },
|
|
59
|
+
draggable: { type: Boolean, default: !1 },
|
|
60
|
+
drag: { type: Boolean, default: !1 },
|
|
61
|
+
easy: { type: Boolean, default: !1 },
|
|
62
|
+
tip: { default: void 0 },
|
|
63
|
+
headers: { default: void 0 },
|
|
64
|
+
data: { type: [Object, Function], default: void 0 },
|
|
65
|
+
name: { type: [String, Function], default: void 0 },
|
|
66
|
+
withCredentials: { type: Boolean, default: !1 },
|
|
67
|
+
customRequest: { type: Function, default: void 0 },
|
|
68
|
+
limit: { default: 0 },
|
|
69
|
+
autoUpload: { type: Boolean, default: !0 },
|
|
70
|
+
showFileList: { type: Boolean, default: !0 },
|
|
71
|
+
showRemoveButton: { type: Boolean, default: !0 },
|
|
72
|
+
showRetryButton: { type: Boolean, default: !0 },
|
|
73
|
+
showCancelButton: { type: Boolean, default: !0 },
|
|
74
|
+
showUploadButton: { type: [Boolean, Object], default: !0 },
|
|
75
|
+
showPreviewButton: { type: Boolean, default: !0 },
|
|
76
|
+
download: { type: Boolean, default: !1 },
|
|
77
|
+
showLink: { type: Boolean, default: !0 },
|
|
78
|
+
imageLoading: { default: void 0 },
|
|
79
|
+
listType: { default: "text" },
|
|
80
|
+
responseUrlKey: { type: [String, Function], default: void 0 },
|
|
81
|
+
customIcon: { default: void 0 },
|
|
82
|
+
imagePreview: { type: Boolean, default: !1 },
|
|
83
|
+
onBeforeUpload: { type: Function, default: void 0 },
|
|
84
|
+
beforeUpload: { type: Function, default: void 0 },
|
|
85
|
+
onBeforeRemove: { type: Function, default: void 0 },
|
|
86
|
+
beforeRemove: { type: Function, default: void 0 },
|
|
87
|
+
onButtonClick: { type: Function, default: void 0 },
|
|
88
|
+
buttonText: { default: "选择文件" }
|
|
89
|
+
},
|
|
90
|
+
emits: ["update:fileList", "update:modelValue", "exceed-limit", "exceedLimit", "exceed", "change", "progress", "preview", "success", "error", "remove", "download", "abort"],
|
|
91
|
+
setup(ve, { expose: Ke, emit: Xe }) {
|
|
92
|
+
const s = ve, b = Xe;
|
|
93
|
+
vt();
|
|
94
|
+
const { t: B } = wt(), {
|
|
95
|
+
customIcon: c,
|
|
96
|
+
directory: me,
|
|
97
|
+
disabled: $,
|
|
98
|
+
download: qe,
|
|
99
|
+
imageLoading: Z,
|
|
100
|
+
listType: R,
|
|
101
|
+
multiple: ye,
|
|
102
|
+
showCancelButton: ge,
|
|
103
|
+
showFileList: he,
|
|
104
|
+
showLink: Ge,
|
|
105
|
+
showPreviewButton: ke,
|
|
106
|
+
showRemoveButton: ee,
|
|
107
|
+
showRetryButton: we,
|
|
108
|
+
tip: I
|
|
109
|
+
} = mt(s), te = M(null), xe = M(null), q = M(0), O = M(!1), h = M([]), F = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), V = M(!1), T = M(0), _ = Oe({
|
|
110
|
+
name: "XUploadVNodeRenderer",
|
|
111
|
+
props: {
|
|
112
|
+
node: {
|
|
113
|
+
type: [Object, String, Number, Boolean, Array],
|
|
114
|
+
required: !0
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
setup(e) {
|
|
118
|
+
return () => e.node;
|
|
119
|
+
}
|
|
120
|
+
}), j = C(() => !!(s.draggable || s.drag)), Je = C(() => !!s.easy), P = C(() => h.value[0]), be = C(() => s.buttonText === "选择文件" ? B("upload.buttonText", void 0, "点击上传") : s.buttonText), A = C(() => {
|
|
121
|
+
if (s.accept) return s.accept;
|
|
122
|
+
if (s.easy || s.listType === "picture" || s.listType === "picture-card")
|
|
123
|
+
return "image/*";
|
|
124
|
+
}), Qe = C(() => s.limit > 0 && h.value.length >= s.limit), oe = C(() => s.showUploadButton ? Qe.value ? typeof s.showUploadButton == "object" ? !!s.showUploadButton.showOnExceedLimit : !1 : !0 : !1), N = C(
|
|
125
|
+
() => h.value.filter((e) => !!e.url).map((e) => e.url)
|
|
126
|
+
), We = C(() => N.value[T.value] || ""), _e = C(() => T.value > 0), Ce = C(() => T.value < N.value.length - 1), Ye = C(() => typeof document > "u" ? "" : (V.value, xt(xe.value) ? "x-theme-dark" : "")), Ze = C(() => O.value ? B("upload.dragHover", void 0, B("upload.dragRelease", void 0, "释放文件并开始上传")) : B("upload.drag", void 0, B("upload.dragDrop", void 0, "点击或拖拽文件到此处上传")));
|
|
127
|
+
function ne(e, t) {
|
|
128
|
+
return typeof e != "number" || Number.isNaN(e) ? t === "done" ? 1 : 0 : e > 1 ? Math.min(1, Math.max(0, e / 100)) : Math.min(1, Math.max(0, e));
|
|
129
|
+
}
|
|
130
|
+
function et(e, t) {
|
|
131
|
+
const o = e.status ?? "done", i = e.uid || `${Date.now()}-${t}`, r = e.raw ?? e.file;
|
|
132
|
+
return He({
|
|
133
|
+
...e,
|
|
134
|
+
uid: i,
|
|
135
|
+
status: o,
|
|
136
|
+
percent: ne(e.percent, o),
|
|
137
|
+
file: e.file ?? r,
|
|
138
|
+
raw: r,
|
|
139
|
+
name: e.name ?? (r == null ? void 0 : r.name) ?? e.uid,
|
|
140
|
+
size: e.size ?? (r == null ? void 0 : r.size),
|
|
141
|
+
type: e.type ?? (r == null ? void 0 : r.type)
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function tt(e) {
|
|
145
|
+
F.clear(), e.forEach((t) => {
|
|
146
|
+
F.set(t.uid, t);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function G(e) {
|
|
150
|
+
const t = H.get(e);
|
|
151
|
+
t && typeof URL < "u" && URL.revokeObjectURL(t), H.delete(e);
|
|
152
|
+
}
|
|
153
|
+
function re(e) {
|
|
154
|
+
if (!e) return;
|
|
155
|
+
const t = new Set(h.value.map((i) => i.uid)), o = e.map((i, r) => et(i, r));
|
|
156
|
+
o.forEach((i) => {
|
|
157
|
+
t.delete(i.uid);
|
|
158
|
+
}), t.forEach((i) => {
|
|
159
|
+
G(i), L.delete(i);
|
|
160
|
+
}), h.value = o, tt(o);
|
|
161
|
+
}
|
|
162
|
+
re(s.defaultFileList), fe(
|
|
163
|
+
() => s.fileList,
|
|
164
|
+
(e) => {
|
|
165
|
+
e !== void 0 && re(e);
|
|
166
|
+
},
|
|
167
|
+
{ immediate: !0, deep: !0 }
|
|
168
|
+
), fe(
|
|
169
|
+
() => s.modelValue,
|
|
170
|
+
(e) => {
|
|
171
|
+
s.fileList === void 0 && e !== void 0 && re(e);
|
|
172
|
+
},
|
|
173
|
+
{ immediate: !0, deep: !0 }
|
|
174
|
+
);
|
|
175
|
+
function z(e) {
|
|
176
|
+
const t = [...h.value];
|
|
177
|
+
b("update:fileList", t), b("update:modelValue", t), b("change", t, e);
|
|
178
|
+
}
|
|
179
|
+
function Be(e, t) {
|
|
180
|
+
if (!t || !e) return !!e;
|
|
181
|
+
const o = t.split(",").map((l) => l.trim()).filter(Boolean);
|
|
182
|
+
if (!o.length) return !0;
|
|
183
|
+
const i = (e.name.includes(".") ? `.${e.name.split(".").pop()}` : "").toLowerCase(), r = (e.type || "").toLowerCase(), p = r.split("/")[0];
|
|
184
|
+
return o.some((l) => {
|
|
185
|
+
const d = l.toLowerCase();
|
|
186
|
+
return d === r || `${p}${i.replace(".", "/")}` === d || /^\*(\/\*)?$/.test(d) ? !0 : /\/\*/.test(d) ? r.replace(/\/.*$/, "") === d.replace(/\/.*$/, "") : /\..*/.test(d) ? (d === ".jpg" || d === ".jpeg" ? [".jpg", ".jpeg"] : [d]).includes(i) : !1;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function ae(e, t) {
|
|
190
|
+
if (!e) return [];
|
|
191
|
+
const o = Array.from(e);
|
|
192
|
+
return t ? o.filter((i) => Be(i, t)) : o;
|
|
193
|
+
}
|
|
194
|
+
function $e(e, t) {
|
|
195
|
+
var o;
|
|
196
|
+
if (!(typeof URL > "u") && (o = e.type) != null && o.includes("image"))
|
|
197
|
+
try {
|
|
198
|
+
const i = URL.createObjectURL(e);
|
|
199
|
+
return H.set(t, i), i;
|
|
200
|
+
} catch {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function Re(e, t) {
|
|
205
|
+
return typeof e == "function" ? e(t) : e;
|
|
206
|
+
}
|
|
207
|
+
function Le(e) {
|
|
208
|
+
const t = e.responseText || e.response;
|
|
209
|
+
if (!t) return;
|
|
210
|
+
const o = e.getResponseHeader("Content-Type");
|
|
211
|
+
if (o != null && o.includes("json"))
|
|
212
|
+
try {
|
|
213
|
+
return JSON.parse(t);
|
|
214
|
+
} catch {
|
|
215
|
+
return t;
|
|
216
|
+
}
|
|
217
|
+
return t;
|
|
218
|
+
}
|
|
219
|
+
function ot(e) {
|
|
220
|
+
const t = new XMLHttpRequest(), o = Re(e.name ?? "file", e.fileItem) || "file", i = e.data ? Re(e.data, e.fileItem) : void 0;
|
|
221
|
+
e.withCredentials && (t.withCredentials = !0), t.upload.onprogress = (p) => {
|
|
222
|
+
const l = p.total > 0 ? Number((p.loaded / p.total).toFixed(2)) : 0;
|
|
223
|
+
e.onProgress(l, p);
|
|
224
|
+
}, t.onerror = (p) => {
|
|
225
|
+
e.onError(p);
|
|
226
|
+
}, t.onload = () => {
|
|
227
|
+
if (t.status < 200 || t.status >= 300) {
|
|
228
|
+
e.onError(Le(t));
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
e.onSuccess(Le(t));
|
|
232
|
+
};
|
|
233
|
+
const r = new FormData();
|
|
234
|
+
return i && Object.keys(i).forEach((p) => {
|
|
235
|
+
const l = i[p];
|
|
236
|
+
l != null && (l instanceof Blob ? r.append(p, l) : r.append(p, String(l)));
|
|
237
|
+
}), e.fileItem.file && r.append(o, e.fileItem.file), t.open("post", e.action ?? "", !0), Object.entries(e.headers ?? {}).forEach(([p, l]) => {
|
|
238
|
+
t.setRequestHeader(p, l);
|
|
239
|
+
}), t.send(r), {
|
|
240
|
+
abort() {
|
|
241
|
+
t.abort();
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function nt(e, t) {
|
|
246
|
+
if (s.responseUrlKey) {
|
|
247
|
+
if (typeof s.responseUrlKey == "function")
|
|
248
|
+
return s.responseUrlKey(e);
|
|
249
|
+
if (t && typeof t == "object")
|
|
250
|
+
return t[s.responseUrlKey];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function K(e, t) {
|
|
254
|
+
const o = F.get(e);
|
|
255
|
+
if (o)
|
|
256
|
+
return t(o), o;
|
|
257
|
+
}
|
|
258
|
+
function ie(e) {
|
|
259
|
+
const t = F.get(e.uid);
|
|
260
|
+
if (!t) return;
|
|
261
|
+
const o = (l, d) => {
|
|
262
|
+
const f = K(t.uid, (w) => {
|
|
263
|
+
w.status = "uploading", w.percent = ne(l, "uploading"), w.error = void 0;
|
|
264
|
+
});
|
|
265
|
+
f && (b("progress", f, d), z(f));
|
|
266
|
+
}, i = (l) => {
|
|
267
|
+
const d = K(t.uid, (f) => {
|
|
268
|
+
f.status = "done", f.percent = 1, f.response = l, f.error = void 0;
|
|
269
|
+
const w = nt(f, l);
|
|
270
|
+
w && (G(f.uid), f.url = w);
|
|
271
|
+
});
|
|
272
|
+
L.delete(t.uid), d && (b("success", d), z(d));
|
|
273
|
+
}, r = (l) => {
|
|
274
|
+
const d = K(t.uid, (f) => {
|
|
275
|
+
f.status = "error", f.percent = 0, f.response = l, f.error = l instanceof Error ? l.message : typeof l == "string" ? l : B("upload.error", void 0, B("upload.statusError", void 0, "上传失败"));
|
|
276
|
+
});
|
|
277
|
+
L.delete(t.uid), d && (b("error", d), z(d));
|
|
278
|
+
};
|
|
279
|
+
K(t.uid, (l) => {
|
|
280
|
+
l.status = "uploading", l.percent = 0, l.error = void 0;
|
|
281
|
+
}), z(t);
|
|
282
|
+
const p = {
|
|
283
|
+
fileItem: t,
|
|
284
|
+
action: s.action,
|
|
285
|
+
name: s.name,
|
|
286
|
+
data: s.data,
|
|
287
|
+
headers: s.headers,
|
|
288
|
+
withCredentials: s.withCredentials,
|
|
289
|
+
onProgress: o,
|
|
290
|
+
onSuccess: i,
|
|
291
|
+
onError: r
|
|
292
|
+
};
|
|
293
|
+
try {
|
|
294
|
+
const l = s.customRequest ? s.customRequest(p) : ot(p);
|
|
295
|
+
if (l && typeof l.then == "function") {
|
|
296
|
+
l.then((d) => {
|
|
297
|
+
d && L.set(t.uid, d);
|
|
298
|
+
}).catch((d) => {
|
|
299
|
+
r(d);
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
l && L.set(t.uid, l);
|
|
304
|
+
} catch (l) {
|
|
305
|
+
r(l);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
function se(e) {
|
|
309
|
+
(e ? [e] : h.value.filter((o) => o.status === "uploading")).forEach((o) => {
|
|
310
|
+
var p;
|
|
311
|
+
const i = L.get(o.uid);
|
|
312
|
+
if (!i) return;
|
|
313
|
+
(p = i.abort) == null || p.call(i), L.delete(o.uid);
|
|
314
|
+
const r = K(o.uid, (l) => {
|
|
315
|
+
l.status = "error", l.percent = 0, l.error = B("upload.cancel", void 0, B("upload.actionCancel", void 0, "取消"));
|
|
316
|
+
});
|
|
317
|
+
r && (b("abort", r), z(r));
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function J(e) {
|
|
321
|
+
if (e) {
|
|
322
|
+
const t = F.get(e.uid);
|
|
323
|
+
t && ie(t);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
h.value.forEach((t) => {
|
|
327
|
+
t.status === "init" && ie(t);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function rt(e, t) {
|
|
331
|
+
var i;
|
|
332
|
+
const o = F.get(e);
|
|
333
|
+
o && (o.file = t, o.raw = t, o.name = t.name, o.size = t.size, o.type = t.type, !o.url && ((i = t.type) != null && i.includes("image")) && (o.url = $e(t, o.uid)), z(o));
|
|
334
|
+
}
|
|
335
|
+
function ue(e) {
|
|
336
|
+
if (b("preview", e), !s.imagePreview || !e.url)
|
|
337
|
+
return;
|
|
338
|
+
const t = N.value.indexOf(e.url);
|
|
339
|
+
t > -1 && (T.value = t, V.value = !0);
|
|
340
|
+
}
|
|
341
|
+
function at() {
|
|
342
|
+
if (s.onBeforeUpload)
|
|
343
|
+
return s.onBeforeUpload;
|
|
344
|
+
if (s.beforeUpload)
|
|
345
|
+
return (e) => {
|
|
346
|
+
var t;
|
|
347
|
+
return (t = s.beforeUpload) == null ? void 0 : t.call(s, e, h.value);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function it() {
|
|
351
|
+
if (s.onBeforeRemove)
|
|
352
|
+
return s.onBeforeRemove;
|
|
353
|
+
if (s.beforeRemove)
|
|
354
|
+
return (e) => {
|
|
355
|
+
var t;
|
|
356
|
+
return (t = s.beforeRemove) == null ? void 0 : t.call(s, e, h.value);
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
async function Ue(e, t) {
|
|
360
|
+
const o = `${Date.now()}-${t}-${Math.random().toString(36).slice(2, 8)}`, i = He({
|
|
361
|
+
uid: o,
|
|
362
|
+
file: e,
|
|
363
|
+
raw: e,
|
|
364
|
+
name: e.name,
|
|
365
|
+
status: "init",
|
|
366
|
+
percent: 0,
|
|
367
|
+
size: e.size,
|
|
368
|
+
type: e.type,
|
|
369
|
+
url: $e(e, o)
|
|
370
|
+
});
|
|
371
|
+
h.value = [...h.value, i], F.set(o, i), z(i), s.autoUpload && ie(i);
|
|
372
|
+
}
|
|
373
|
+
function st(e) {
|
|
374
|
+
const t = [...h.value];
|
|
375
|
+
b("exceed-limit", t, e), b("exceedLimit", t, e), b("exceed", e);
|
|
376
|
+
}
|
|
377
|
+
async function X(e) {
|
|
378
|
+
if (!e.length) return;
|
|
379
|
+
if (s.limit > 0 && h.value.length + e.length > s.limit) {
|
|
380
|
+
st(e);
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const t = at();
|
|
384
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
385
|
+
const i = e[o];
|
|
386
|
+
if (!t) {
|
|
387
|
+
await Ue(i, o);
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
try {
|
|
391
|
+
const r = await Promise.resolve(t(i));
|
|
392
|
+
if (!r) continue;
|
|
393
|
+
await Ue(typeof r == "boolean" ? i : r, o);
|
|
394
|
+
} catch (r) {
|
|
395
|
+
console.error(r);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
function Ee(e) {
|
|
400
|
+
var o;
|
|
401
|
+
const t = L.get(e.uid);
|
|
402
|
+
(o = t == null ? void 0 : t.abort) == null || o.call(t), G(e.uid), L.delete(e.uid), F.delete(e.uid), h.value = h.value.filter((i) => i.uid !== e.uid), z(e), b("remove", e, [...h.value]);
|
|
403
|
+
}
|
|
404
|
+
async function Q(e) {
|
|
405
|
+
const t = it();
|
|
406
|
+
if (!t) {
|
|
407
|
+
Ee(e);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
try {
|
|
411
|
+
await Promise.resolve(t(e)) && Ee(e);
|
|
412
|
+
} catch (o) {
|
|
413
|
+
console.error(o);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function ut() {
|
|
417
|
+
[...h.value].forEach((e) => {
|
|
418
|
+
se(e), G(e.uid);
|
|
419
|
+
}), h.value = [], F.clear(), L.clear(), z();
|
|
420
|
+
}
|
|
421
|
+
function lt(e) {
|
|
422
|
+
b("download", e);
|
|
423
|
+
}
|
|
424
|
+
async function le(e) {
|
|
425
|
+
var t;
|
|
426
|
+
if (!s.disabled) {
|
|
427
|
+
if (s.onButtonClick) {
|
|
428
|
+
const o = s.onButtonClick(e);
|
|
429
|
+
if (o && typeof o.then == "function") {
|
|
430
|
+
const i = await o, r = Array.isArray(i) ? i.filter((p) => p instanceof File) : ae(i, A.value);
|
|
431
|
+
await X(s.multiple ? r : r.slice(0, 1));
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
(t = te.value) == null || t.click();
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
function Fe(e) {
|
|
439
|
+
const t = e.target, o = ae(t.files, A.value);
|
|
440
|
+
X(s.multiple ? o : o.slice(0, 1)), t.value = "";
|
|
441
|
+
}
|
|
442
|
+
function W(e) {
|
|
443
|
+
e === "add" && (q.value += 1), e === "subtract" && (q.value -= 1), e === "reset" && (q.value = 0);
|
|
444
|
+
}
|
|
445
|
+
function dt(e, t, o) {
|
|
446
|
+
const i = [];
|
|
447
|
+
let r = 0;
|
|
448
|
+
const p = () => {
|
|
449
|
+
r || o(i);
|
|
450
|
+
}, l = (d) => {
|
|
451
|
+
if (r += 1, d != null && d.isFile) {
|
|
452
|
+
d.file((f) => {
|
|
453
|
+
var w;
|
|
454
|
+
r -= 1, Be(f, t) && (Object.defineProperty(f, "webkitRelativePath", {
|
|
455
|
+
value: (w = d.fullPath) == null ? void 0 : w.replace(/^\//, ""),
|
|
456
|
+
configurable: !0
|
|
457
|
+
}), i.push(f)), p();
|
|
458
|
+
});
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (d != null && d.isDirectory) {
|
|
462
|
+
const f = d.createReader();
|
|
463
|
+
let w = !1;
|
|
464
|
+
const Me = () => {
|
|
465
|
+
f.readEntries((Se) => {
|
|
466
|
+
w || (r -= 1, w = !0), Se.length === 0 ? p() : (Me(), Se.forEach(l));
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
Me();
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
r -= 1, p();
|
|
473
|
+
};
|
|
474
|
+
Array.from(e).forEach((d) => {
|
|
475
|
+
var w;
|
|
476
|
+
const f = (w = d.webkitGetAsEntry) == null ? void 0 : w.call(d);
|
|
477
|
+
f && l(f);
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
function ze(e) {
|
|
481
|
+
!j.value || s.disabled || (e.preventDefault(), W("add"));
|
|
482
|
+
}
|
|
483
|
+
function De(e) {
|
|
484
|
+
!j.value || s.disabled || (e.preventDefault(), O.value || (O.value = !0));
|
|
485
|
+
}
|
|
486
|
+
function Ie(e) {
|
|
487
|
+
!j.value || s.disabled || (e.preventDefault(), W("subtract"), q.value <= 0 && (O.value = !1, W("reset")));
|
|
488
|
+
}
|
|
489
|
+
function Pe(e) {
|
|
490
|
+
var o, i;
|
|
491
|
+
if (!j.value || s.disabled) return;
|
|
492
|
+
if (e.preventDefault(), O.value = !1, W("reset"), s.directory && ((o = e.dataTransfer) != null && o.items)) {
|
|
493
|
+
dt(e.dataTransfer.items, A.value, (r) => {
|
|
494
|
+
X(s.multiple ? r : r.slice(0, 1));
|
|
495
|
+
});
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
const t = ae((i = e.dataTransfer) == null ? void 0 : i.files, A.value);
|
|
499
|
+
X(s.multiple ? t : t.slice(0, 1));
|
|
500
|
+
}
|
|
501
|
+
function ct(e) {
|
|
502
|
+
var i, r;
|
|
503
|
+
const t = (((i = e.file) == null ? void 0 : i.type) || e.type || "").toLowerCase(), o = (((r = e.name) == null ? void 0 : r.split(".").pop()) || "").toLowerCase();
|
|
504
|
+
return t.includes("image") || ["png", "jpg", "jpeg", "bmp", "gif", "webp"].includes(o) ? "tupian" : t.includes("pdf") || o === "pdf" ? "pdf" : t.includes("audio") || ["mp3", "wav", "m4a", "flac"].includes(o) ? "yuyin" : t.includes("video") || ["mp4", "mkv", "mov", "m4v"].includes(o) ? "video-camera" : "file-text";
|
|
505
|
+
}
|
|
506
|
+
function pt(e) {
|
|
507
|
+
return `x-upload-list-item-${e.status || "init"}`;
|
|
508
|
+
}
|
|
509
|
+
function de(e) {
|
|
510
|
+
const t = ne(e.percent, e.status || "init");
|
|
511
|
+
return Math.round(t * 100);
|
|
512
|
+
}
|
|
513
|
+
function Te(e) {
|
|
514
|
+
return {
|
|
515
|
+
"--x-upload-progress-value": `${de(e)}%`
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
function ce() {
|
|
519
|
+
V.value = !1;
|
|
520
|
+
}
|
|
521
|
+
function je() {
|
|
522
|
+
_e.value && (T.value -= 1);
|
|
523
|
+
}
|
|
524
|
+
function Ne() {
|
|
525
|
+
Ce.value && (T.value += 1);
|
|
526
|
+
}
|
|
527
|
+
function ft(e) {
|
|
528
|
+
e.target === e.currentTarget && ce();
|
|
529
|
+
}
|
|
530
|
+
function pe(e) {
|
|
531
|
+
if (V.value) {
|
|
532
|
+
if (e.key === "Escape") {
|
|
533
|
+
ce();
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (e.key === "ArrowLeft") {
|
|
537
|
+
je();
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
e.key === "ArrowRight" && Ne();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return fe(V, (e) => {
|
|
544
|
+
typeof document > "u" || (e ? (document.body.style.overflow = "hidden", window.addEventListener("keydown", pe)) : (document.body.style.overflow = "", window.removeEventListener("keydown", pe)));
|
|
545
|
+
}), yt(() => {
|
|
546
|
+
L.forEach((e) => {
|
|
547
|
+
var t;
|
|
548
|
+
(t = e.abort) == null || t.call(e);
|
|
549
|
+
}), L.clear(), H.forEach((e) => {
|
|
550
|
+
typeof URL < "u" && URL.revokeObjectURL(e);
|
|
551
|
+
}), H.clear(), typeof window < "u" && window.removeEventListener("keydown", pe), typeof document < "u" && (document.body.style.overflow = "");
|
|
552
|
+
}), Ke({
|
|
553
|
+
submit: J,
|
|
554
|
+
abort: se,
|
|
555
|
+
updateFile: rt,
|
|
556
|
+
upload: X,
|
|
557
|
+
pick: le,
|
|
558
|
+
clear: ut,
|
|
559
|
+
remove: Q
|
|
560
|
+
}), (e, t) => (a(), u("div", {
|
|
561
|
+
ref_key: "uploadRootRef",
|
|
562
|
+
ref: xe,
|
|
563
|
+
class: D(["x-upload-wrapper", [`x-upload-wrapper-type-${n(R)}`]])
|
|
564
|
+
}, [
|
|
565
|
+
oe.value && (n(R) !== "picture-card" || !n(he)) ? (a(), u("div", {
|
|
566
|
+
key: 0,
|
|
567
|
+
class: D(["x-upload-trigger", {
|
|
568
|
+
"is-draggable": j.value && n(R) !== "picture-card",
|
|
569
|
+
"is-dragging": O.value,
|
|
570
|
+
"is-disabled": n($),
|
|
571
|
+
"x-upload-trigger-picture": n(R) === "picture-card"
|
|
572
|
+
}]),
|
|
573
|
+
onClick: le,
|
|
574
|
+
onDragenter: ze,
|
|
575
|
+
onDragover: De,
|
|
576
|
+
onDragleave: Ie,
|
|
577
|
+
onDrop: Pe
|
|
578
|
+
}, [
|
|
579
|
+
g("input", {
|
|
580
|
+
ref_key: "inputRef",
|
|
581
|
+
ref: te,
|
|
582
|
+
class: "x-upload-trigger__input",
|
|
583
|
+
type: "file",
|
|
584
|
+
disabled: n($),
|
|
585
|
+
accept: A.value,
|
|
586
|
+
multiple: n(ye),
|
|
587
|
+
webkitdirectory: n(me) ? "webkitdirectory" : void 0,
|
|
588
|
+
onChange: Fe
|
|
589
|
+
}, null, 40, bt),
|
|
590
|
+
y(e.$slots, "upload-button", {}, () => [
|
|
591
|
+
y(e.$slots, "trigger", {}, () => [
|
|
592
|
+
y(e.$slots, "default", {}, () => {
|
|
593
|
+
var o;
|
|
594
|
+
return [
|
|
595
|
+
n(R) === "picture-card" ? (a(), u("div", _t, [
|
|
596
|
+
g("div", Ct, [
|
|
597
|
+
E(n(k), {
|
|
598
|
+
name: "checkbox-plus",
|
|
599
|
+
size: 14
|
|
600
|
+
}),
|
|
601
|
+
n(I) ? (a(), u("div", Bt, x(n(I)), 1)) : v("", !0)
|
|
602
|
+
])
|
|
603
|
+
])) : j.value ? (a(), u("div", $t, [
|
|
604
|
+
E(n(k), {
|
|
605
|
+
name: "checkbox-plus",
|
|
606
|
+
size: 14
|
|
607
|
+
}),
|
|
608
|
+
g("div", Rt, x(Ze.value), 1),
|
|
609
|
+
n(I) ? (a(), u("div", Lt, x(n(I)), 1)) : v("", !0)
|
|
610
|
+
])) : Je.value ? (a(), u("div", Ut, [
|
|
611
|
+
(o = P.value) != null && o.url ? (a(), u(S, { key: 0 }, [
|
|
612
|
+
g("img", {
|
|
613
|
+
src: P.value.url,
|
|
614
|
+
alt: P.value.name || "upload-image",
|
|
615
|
+
loading: n(Z)
|
|
616
|
+
}, null, 8, Et),
|
|
617
|
+
g("div", Ft, [
|
|
618
|
+
n(ke) && P.value.url ? (a(), u("span", {
|
|
619
|
+
key: 0,
|
|
620
|
+
class: "x-upload-icon x-upload-icon-preview",
|
|
621
|
+
onClick: t[0] || (t[0] = U((i) => ue(P.value), ["stop"]))
|
|
622
|
+
}, [
|
|
623
|
+
E(n(k), {
|
|
624
|
+
name: "yanjing-zhengyan",
|
|
625
|
+
size: 14
|
|
626
|
+
})
|
|
627
|
+
])) : v("", !0),
|
|
628
|
+
n(ee) && !n($) ? (a(), u("span", {
|
|
629
|
+
key: 1,
|
|
630
|
+
class: "x-upload-icon x-upload-icon-remove",
|
|
631
|
+
onClick: t[1] || (t[1] = U((i) => Q(P.value), ["stop"]))
|
|
632
|
+
}, [
|
|
633
|
+
E(n(k), {
|
|
634
|
+
name: "shanchu",
|
|
635
|
+
size: 14
|
|
636
|
+
})
|
|
637
|
+
])) : v("", !0)
|
|
638
|
+
]),
|
|
639
|
+
P.value.status === "uploading" ? (a(), u("div", zt, x(de(P.value)) + "% ", 1)) : v("", !0)
|
|
640
|
+
], 64)) : (a(), u("div", Dt, [
|
|
641
|
+
E(n(k), {
|
|
642
|
+
name: "checkbox-plus",
|
|
643
|
+
size: 14
|
|
644
|
+
}),
|
|
645
|
+
g("div", It, x(be.value), 1)
|
|
646
|
+
]))
|
|
647
|
+
])) : (a(), m(kt, {
|
|
648
|
+
key: 3,
|
|
649
|
+
type: "primary",
|
|
650
|
+
disabled: n($)
|
|
651
|
+
}, {
|
|
652
|
+
icon: Ve(() => [
|
|
653
|
+
E(n(k), {
|
|
654
|
+
name: "upload",
|
|
655
|
+
size: 14
|
|
656
|
+
})
|
|
657
|
+
]),
|
|
658
|
+
default: Ve(() => [
|
|
659
|
+
Y(" " + x(be.value), 1)
|
|
660
|
+
]),
|
|
661
|
+
_: 1
|
|
662
|
+
}, 8, ["disabled"]))
|
|
663
|
+
];
|
|
664
|
+
}, !0)
|
|
665
|
+
], !0)
|
|
666
|
+
], !0),
|
|
667
|
+
n(I) && !j.value && n(R) !== "picture-card" ? (a(), u("div", Pt, x(n(I)), 1)) : v("", !0)
|
|
668
|
+
], 34)) : v("", !0),
|
|
669
|
+
n(he) ? (a(), u("div", {
|
|
670
|
+
key: 1,
|
|
671
|
+
class: D(["x-upload-list", [
|
|
672
|
+
`x-upload-list-type-${n(R)}`,
|
|
673
|
+
{ "x-upload-list-has-trigger": n(R) !== "picture-card" && oe.value }
|
|
674
|
+
]])
|
|
675
|
+
}, [
|
|
676
|
+
(a(!0), u(S, null, gt(h.value, (o, i) => y(e.$slots, "upload-item", {
|
|
677
|
+
key: o.uid,
|
|
678
|
+
fileItem: o,
|
|
679
|
+
index: i
|
|
680
|
+
}, () => [
|
|
681
|
+
n(R) !== "picture-card" ? (a(), u("div", {
|
|
682
|
+
key: 0,
|
|
683
|
+
class: D(["x-upload-list-item", pt(o)])
|
|
684
|
+
}, [
|
|
685
|
+
g("div", Tt, [
|
|
686
|
+
n(R) === "picture" ? (a(), u("span", jt, [
|
|
687
|
+
y(e.$slots, "image", { fileItem: o }, () => [
|
|
688
|
+
o.url ? (a(), u("img", {
|
|
689
|
+
key: 0,
|
|
690
|
+
src: o.url,
|
|
691
|
+
alt: o.name,
|
|
692
|
+
loading: n(Z)
|
|
693
|
+
}, null, 8, Nt)) : v("", !0)
|
|
694
|
+
], !0)
|
|
695
|
+
])) : v("", !0),
|
|
696
|
+
g("div", Mt, [
|
|
697
|
+
n(R) === "text" ? (a(), u("span", St, [
|
|
698
|
+
y(e.$slots, "file-icon", { fileItem: o }, () => {
|
|
699
|
+
var r;
|
|
700
|
+
return [
|
|
701
|
+
(r = n(c)) != null && r.fileIcon ? (a(), m(n(_), {
|
|
702
|
+
key: 0,
|
|
703
|
+
node: n(c).fileIcon(o)
|
|
704
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
705
|
+
key: 1,
|
|
706
|
+
name: ct(o),
|
|
707
|
+
size: 14
|
|
708
|
+
}, null, 8, ["name"]))
|
|
709
|
+
];
|
|
710
|
+
}, !0)
|
|
711
|
+
])) : v("", !0),
|
|
712
|
+
n(Ge) && o.url ? (a(), u("a", {
|
|
713
|
+
key: 1,
|
|
714
|
+
class: "x-upload-list-item-name-link",
|
|
715
|
+
href: o.url,
|
|
716
|
+
target: "_blank",
|
|
717
|
+
download: n(qe) ? o.name : void 0,
|
|
718
|
+
onClick: (r) => lt(o)
|
|
719
|
+
}, [
|
|
720
|
+
y(e.$slots, "file-name", { fileItem: o }, () => {
|
|
721
|
+
var r;
|
|
722
|
+
return [
|
|
723
|
+
(r = n(c)) != null && r.fileName ? (a(), m(n(_), {
|
|
724
|
+
key: 0,
|
|
725
|
+
node: n(c).fileName(o)
|
|
726
|
+
}, null, 8, ["node"])) : (a(), u(S, { key: 1 }, [
|
|
727
|
+
Y(x(o.name), 1)
|
|
728
|
+
], 64))
|
|
729
|
+
];
|
|
730
|
+
}, !0)
|
|
731
|
+
], 8, Ot)) : (a(), u("span", {
|
|
732
|
+
key: 2,
|
|
733
|
+
class: "x-upload-list-item-name-text",
|
|
734
|
+
onClick: (r) => ue(o)
|
|
735
|
+
}, [
|
|
736
|
+
y(e.$slots, "file-name", { fileItem: o }, () => {
|
|
737
|
+
var r;
|
|
738
|
+
return [
|
|
739
|
+
(r = n(c)) != null && r.fileName ? (a(), m(n(_), {
|
|
740
|
+
key: 0,
|
|
741
|
+
node: n(c).fileName(o)
|
|
742
|
+
}, null, 8, ["node"])) : (a(), u(S, { key: 1 }, [
|
|
743
|
+
Y(x(o.name), 1)
|
|
744
|
+
], 64))
|
|
745
|
+
];
|
|
746
|
+
}, !0)
|
|
747
|
+
], 8, Vt)),
|
|
748
|
+
o.status === "error" ? (a(), u("span", {
|
|
749
|
+
key: 3,
|
|
750
|
+
class: "x-upload-icon x-upload-icon-error",
|
|
751
|
+
title: o.error || n(B)("upload.error", void 0, n(B)("upload.statusError", void 0, "上传失败"))
|
|
752
|
+
}, [
|
|
753
|
+
y(e.$slots, "error-icon", {}, () => {
|
|
754
|
+
var r;
|
|
755
|
+
return [
|
|
756
|
+
(r = n(c)) != null && r.errorIcon ? (a(), m(n(_), {
|
|
757
|
+
key: 0,
|
|
758
|
+
node: n(c).errorIcon()
|
|
759
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
760
|
+
key: 1,
|
|
761
|
+
name: "a-014_quxiao",
|
|
762
|
+
size: 14
|
|
763
|
+
}))
|
|
764
|
+
];
|
|
765
|
+
}, !0)
|
|
766
|
+
], 8, At)) : v("", !0)
|
|
767
|
+
]),
|
|
768
|
+
g("div", Ht, [
|
|
769
|
+
o.status === "uploading" || o.status === "init" ? (a(), u(S, { key: 0 }, [
|
|
770
|
+
g("span", {
|
|
771
|
+
class: "x-upload-progress-circle",
|
|
772
|
+
style: Ae(Te(o))
|
|
773
|
+
}, [...t[2] || (t[2] = [
|
|
774
|
+
g("span", { class: "x-upload-progress-circle-inner" }, null, -1)
|
|
775
|
+
])], 4),
|
|
776
|
+
o.status === "uploading" && n(ge) && !n($) ? (a(), u("span", {
|
|
777
|
+
key: 0,
|
|
778
|
+
class: "x-upload-progress-action",
|
|
779
|
+
onClick: U((r) => se(o), ["stop"])
|
|
780
|
+
}, [
|
|
781
|
+
y(e.$slots, "cancel-icon", {}, () => {
|
|
782
|
+
var r;
|
|
783
|
+
return [
|
|
784
|
+
(r = n(c)) != null && r.cancelIcon ? (a(), m(n(_), {
|
|
785
|
+
key: 0,
|
|
786
|
+
node: n(c).cancelIcon()
|
|
787
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
788
|
+
key: 1,
|
|
789
|
+
name: "pause",
|
|
790
|
+
size: 12
|
|
791
|
+
}))
|
|
792
|
+
];
|
|
793
|
+
}, !0)
|
|
794
|
+
], 8, Kt)) : o.status === "init" && !n($) ? (a(), u("span", {
|
|
795
|
+
key: 1,
|
|
796
|
+
class: "x-upload-progress-action",
|
|
797
|
+
onClick: U((r) => J(o), ["stop"])
|
|
798
|
+
}, [
|
|
799
|
+
y(e.$slots, "start-icon", {}, () => {
|
|
800
|
+
var r;
|
|
801
|
+
return [
|
|
802
|
+
(r = n(c)) != null && r.startIcon ? (a(), m(n(_), {
|
|
803
|
+
key: 0,
|
|
804
|
+
node: n(c).startIcon()
|
|
805
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
806
|
+
key: 1,
|
|
807
|
+
name: "play",
|
|
808
|
+
size: 12
|
|
809
|
+
}))
|
|
810
|
+
];
|
|
811
|
+
}, !0)
|
|
812
|
+
], 8, Xt)) : v("", !0)
|
|
813
|
+
], 64)) : o.status === "done" ? (a(), u("span", qt, [
|
|
814
|
+
y(e.$slots, "success-icon", {}, () => {
|
|
815
|
+
var r;
|
|
816
|
+
return [
|
|
817
|
+
(r = n(c)) != null && r.successIcon ? (a(), m(n(_), {
|
|
818
|
+
key: 0,
|
|
819
|
+
node: n(c).successIcon()
|
|
820
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
821
|
+
key: 1,
|
|
822
|
+
name: "dui",
|
|
823
|
+
size: 14
|
|
824
|
+
}))
|
|
825
|
+
];
|
|
826
|
+
}, !0)
|
|
827
|
+
])) : o.status === "error" && n(we) && !n($) ? (a(), u("span", {
|
|
828
|
+
key: 2,
|
|
829
|
+
class: "x-upload-icon x-upload-icon-upload",
|
|
830
|
+
onClick: U((r) => J(o), ["stop"])
|
|
831
|
+
}, [
|
|
832
|
+
y(e.$slots, "retry-icon", {}, () => {
|
|
833
|
+
var r;
|
|
834
|
+
return [
|
|
835
|
+
(r = n(c)) != null && r.retryIcon ? (a(), m(n(_), {
|
|
836
|
+
key: 0,
|
|
837
|
+
node: n(c).retryIcon()
|
|
838
|
+
}, null, 8, ["node"])) : (a(), u(S, { key: 1 }, [
|
|
839
|
+
Y(x(n(B)("upload.retry", void 0, "点击重试")), 1)
|
|
840
|
+
], 64))
|
|
841
|
+
];
|
|
842
|
+
}, !0)
|
|
843
|
+
], 8, Gt)) : v("", !0)
|
|
844
|
+
])
|
|
845
|
+
]),
|
|
846
|
+
n(ee) && !n($) ? (a(), u("span", {
|
|
847
|
+
key: 0,
|
|
848
|
+
class: "x-upload-list-item-operation",
|
|
849
|
+
onClick: U((r) => Q(o), ["stop"])
|
|
850
|
+
}, [
|
|
851
|
+
g("span", Qt, [
|
|
852
|
+
y(e.$slots, "remove-icon", {}, () => {
|
|
853
|
+
var r;
|
|
854
|
+
return [
|
|
855
|
+
(r = n(c)) != null && r.removeIcon ? (a(), m(n(_), {
|
|
856
|
+
key: 0,
|
|
857
|
+
node: n(c).removeIcon()
|
|
858
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
859
|
+
key: 1,
|
|
860
|
+
name: "shanchu",
|
|
861
|
+
size: 14
|
|
862
|
+
}))
|
|
863
|
+
];
|
|
864
|
+
}, !0)
|
|
865
|
+
])
|
|
866
|
+
], 8, Jt)) : v("", !0),
|
|
867
|
+
y(e.$slots, "extra-button", { fileItem: o }, void 0, !0)
|
|
868
|
+
], 2)) : (a(), u("span", {
|
|
869
|
+
key: 1,
|
|
870
|
+
class: D(["x-upload-list-picture", { "is-error": o.status === "error" }])
|
|
871
|
+
}, [
|
|
872
|
+
o.status === "uploading" ? (a(), u("div", {
|
|
873
|
+
key: 0,
|
|
874
|
+
class: "x-upload-list-picture-uploading",
|
|
875
|
+
style: Ae(Te(o))
|
|
876
|
+
}, [
|
|
877
|
+
t[3] || (t[3] = g("span", { class: "x-upload-list-picture-uploading-circle" }, [
|
|
878
|
+
g("span", { class: "x-upload-list-picture-uploading-inner" })
|
|
879
|
+
], -1)),
|
|
880
|
+
g("span", Wt, x(de(o)) + "%", 1)
|
|
881
|
+
], 4)) : (a(), u(S, { key: 1 }, [
|
|
882
|
+
y(e.$slots, "image", { fileItem: o }, () => [
|
|
883
|
+
o.url ? (a(), u("img", {
|
|
884
|
+
key: 0,
|
|
885
|
+
src: o.url,
|
|
886
|
+
alt: o.name,
|
|
887
|
+
loading: n(Z)
|
|
888
|
+
}, null, 8, Yt)) : v("", !0)
|
|
889
|
+
], !0),
|
|
890
|
+
g("div", Zt, [
|
|
891
|
+
o.status === "error" && n(ge) ? (a(), u("div", eo, [
|
|
892
|
+
g("span", to, [
|
|
893
|
+
y(e.$slots, "error-icon", {}, () => {
|
|
894
|
+
var r;
|
|
895
|
+
return [
|
|
896
|
+
(r = n(c)) != null && r.errorIcon ? (a(), m(n(_), {
|
|
897
|
+
key: 0,
|
|
898
|
+
node: n(c).errorIcon()
|
|
899
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
900
|
+
key: 1,
|
|
901
|
+
name: "a-014_quxiao",
|
|
902
|
+
size: 26
|
|
903
|
+
}))
|
|
904
|
+
];
|
|
905
|
+
}, !0)
|
|
906
|
+
])
|
|
907
|
+
])) : v("", !0),
|
|
908
|
+
g("div", oo, [
|
|
909
|
+
o.status !== "error" && n(ke) ? (a(), u("span", {
|
|
910
|
+
key: 0,
|
|
911
|
+
class: "x-upload-icon x-upload-icon-preview",
|
|
912
|
+
onClick: U((r) => ue(o), ["stop"])
|
|
913
|
+
}, [
|
|
914
|
+
y(e.$slots, "preview-icon", {}, () => {
|
|
915
|
+
var r;
|
|
916
|
+
return [
|
|
917
|
+
(r = n(c)) != null && r.previewIcon ? (a(), m(n(_), {
|
|
918
|
+
key: 0,
|
|
919
|
+
node: n(c).previewIcon()
|
|
920
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
921
|
+
key: 1,
|
|
922
|
+
name: "yanjing-zhengyan",
|
|
923
|
+
size: 14
|
|
924
|
+
}))
|
|
925
|
+
];
|
|
926
|
+
}, !0)
|
|
927
|
+
], 8, no)) : v("", !0),
|
|
928
|
+
(o.status === "init" || o.status === "error") && n(we) && !n($) ? (a(), u("span", {
|
|
929
|
+
key: 1,
|
|
930
|
+
class: "x-upload-icon x-upload-icon-upload",
|
|
931
|
+
onClick: U((r) => J(o), ["stop"])
|
|
932
|
+
}, [
|
|
933
|
+
y(e.$slots, "retry-icon", {}, () => {
|
|
934
|
+
var r;
|
|
935
|
+
return [
|
|
936
|
+
(r = n(c)) != null && r.retryIcon ? (a(), m(n(_), {
|
|
937
|
+
key: 0,
|
|
938
|
+
node: n(c).retryIcon()
|
|
939
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
940
|
+
key: 1,
|
|
941
|
+
name: "upload",
|
|
942
|
+
size: 14
|
|
943
|
+
}))
|
|
944
|
+
];
|
|
945
|
+
}, !0)
|
|
946
|
+
], 8, ro)) : v("", !0),
|
|
947
|
+
n(ee) && !n($) ? (a(), u("span", {
|
|
948
|
+
key: 2,
|
|
949
|
+
class: "x-upload-icon x-upload-icon-remove",
|
|
950
|
+
onClick: U((r) => Q(o), ["stop"])
|
|
951
|
+
}, [
|
|
952
|
+
y(e.$slots, "remove-icon", {}, () => {
|
|
953
|
+
var r;
|
|
954
|
+
return [
|
|
955
|
+
(r = n(c)) != null && r.removeIcon ? (a(), m(n(_), {
|
|
956
|
+
key: 0,
|
|
957
|
+
node: n(c).removeIcon()
|
|
958
|
+
}, null, 8, ["node"])) : (a(), m(n(k), {
|
|
959
|
+
key: 1,
|
|
960
|
+
name: "shanchu",
|
|
961
|
+
size: 14
|
|
962
|
+
}))
|
|
963
|
+
];
|
|
964
|
+
}, !0)
|
|
965
|
+
], 8, ao)) : v("", !0),
|
|
966
|
+
y(e.$slots, "extra-button", { fileItem: o }, void 0, !0)
|
|
967
|
+
])
|
|
968
|
+
])
|
|
969
|
+
], 64))
|
|
970
|
+
], 2))
|
|
971
|
+
], !0)), 128)),
|
|
972
|
+
n(R) === "picture-card" && oe.value ? (a(), u("div", {
|
|
973
|
+
key: 0,
|
|
974
|
+
class: D(["x-upload-trigger x-upload-trigger-picture", { "is-disabled": n($) }]),
|
|
975
|
+
onClick: le,
|
|
976
|
+
onDragenter: ze,
|
|
977
|
+
onDragover: De,
|
|
978
|
+
onDragleave: Ie,
|
|
979
|
+
onDrop: Pe
|
|
980
|
+
}, [
|
|
981
|
+
g("input", {
|
|
982
|
+
ref_key: "inputRef",
|
|
983
|
+
ref: te,
|
|
984
|
+
class: "x-upload-trigger__input",
|
|
985
|
+
type: "file",
|
|
986
|
+
disabled: n($),
|
|
987
|
+
accept: A.value,
|
|
988
|
+
multiple: n(ye),
|
|
989
|
+
webkitdirectory: n(me) ? "webkitdirectory" : void 0,
|
|
990
|
+
onChange: Fe
|
|
991
|
+
}, null, 40, io),
|
|
992
|
+
y(e.$slots, "upload-button", {}, () => [
|
|
993
|
+
y(e.$slots, "trigger", {}, () => [
|
|
994
|
+
y(e.$slots, "default", {}, () => [
|
|
995
|
+
g("div", so, [
|
|
996
|
+
g("div", uo, [
|
|
997
|
+
E(n(k), {
|
|
998
|
+
name: "checkbox-plus",
|
|
999
|
+
size: 14
|
|
1000
|
+
}),
|
|
1001
|
+
n(I) ? (a(), u("div", lo, x(n(I)), 1)) : v("", !0)
|
|
1002
|
+
])
|
|
1003
|
+
])
|
|
1004
|
+
], !0)
|
|
1005
|
+
], !0)
|
|
1006
|
+
], !0)
|
|
1007
|
+
], 34)) : v("", !0)
|
|
1008
|
+
], 2)) : v("", !0),
|
|
1009
|
+
(a(), m(ht, { to: "body" }, [
|
|
1010
|
+
ve.imagePreview && V.value ? (a(), u("div", {
|
|
1011
|
+
key: 0,
|
|
1012
|
+
class: D(["x-upload-image-preview", Ye.value]),
|
|
1013
|
+
onClick: ft
|
|
1014
|
+
}, [
|
|
1015
|
+
g("button", {
|
|
1016
|
+
class: "x-upload-image-preview-close",
|
|
1017
|
+
type: "button",
|
|
1018
|
+
onClick: U(ce, ["stop"])
|
|
1019
|
+
}, [
|
|
1020
|
+
E(n(k), {
|
|
1021
|
+
name: "guanbi",
|
|
1022
|
+
size: 18
|
|
1023
|
+
})
|
|
1024
|
+
]),
|
|
1025
|
+
N.value.length > 1 ? (a(), u("button", {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
class: D(["x-upload-image-preview-nav is-prev", { "is-disabled": !_e.value }]),
|
|
1028
|
+
type: "button",
|
|
1029
|
+
onClick: U(je, ["stop"])
|
|
1030
|
+
}, [
|
|
1031
|
+
E(n(k), {
|
|
1032
|
+
name: "fanhui",
|
|
1033
|
+
size: 20
|
|
1034
|
+
})
|
|
1035
|
+
], 2)) : v("", !0),
|
|
1036
|
+
g("img", {
|
|
1037
|
+
class: "x-upload-image-preview-img",
|
|
1038
|
+
src: We.value,
|
|
1039
|
+
alt: "preview"
|
|
1040
|
+
}, null, 8, co),
|
|
1041
|
+
N.value.length > 1 ? (a(), u("button", {
|
|
1042
|
+
key: 1,
|
|
1043
|
+
class: D(["x-upload-image-preview-nav is-next", { "is-disabled": !Ce.value }]),
|
|
1044
|
+
type: "button",
|
|
1045
|
+
onClick: U(Ne, ["stop"])
|
|
1046
|
+
}, [
|
|
1047
|
+
E(n(k), {
|
|
1048
|
+
name: "gengduo",
|
|
1049
|
+
size: 20
|
|
1050
|
+
})
|
|
1051
|
+
], 2)) : v("", !0),
|
|
1052
|
+
N.value.length > 1 ? (a(), u("div", po, x(T.value + 1) + " / " + x(N.value.length), 1)) : v("", !0)
|
|
1053
|
+
], 2)) : v("", !0)
|
|
1054
|
+
]))
|
|
1055
|
+
], 2));
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
export {
|
|
1059
|
+
ho as default
|
|
1060
|
+
};
|