foucui 1.0.1
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 +43 -0
- package/components/QiuAffix/index.vue +186 -0
- package/components/QiuAlert/index.vue +208 -0
- package/components/QiuAnchor/context.ts +18 -0
- package/components/QiuAnchor/index.vue +180 -0
- package/components/QiuAnchorLink/index.vue +67 -0
- package/components/QiuApp/index.vue +9 -0
- package/components/QiuAutocomplete/index.vue +408 -0
- package/components/QiuAvatar/index.vue +140 -0
- package/components/QiuBacktop/index.vue +121 -0
- package/components/QiuBadge/api/index.ts +389 -0
- package/components/QiuBadge/components/BadgeImagePickerDialog.vue +243 -0
- package/components/QiuBadge/components/BadgeLibraryManagerDialog.vue +30 -0
- package/components/QiuBadge/components/BadgeLibraryPanel.vue +182 -0
- package/components/QiuBadge/composables/useTableHostHeight.ts +53 -0
- package/components/QiuBadge/index.ts +18 -0
- package/components/QiuBadge/shared/BadgeTemplateRenderer.vue +32 -0
- package/components/QiuBadge/shared/assetUrl.ts +26 -0
- package/components/QiuBadge/shared/badgeTemplate.ts +309 -0
- package/components/QiuBadge/utils/chinaAreaData.ts +44 -0
- package/components/QiuBadge/utils/hostRegion.ts +22 -0
- package/components/QiuBadge/utils/pca-code.json +1 -0
- package/components/QiuBadge/utils/pdfFromElement.ts +348 -0
- package/components/QiuBadge/views/BadgeLibraryView.vue +32 -0
- package/components/QiuBadge/views/BadgeManageView.vue +1364 -0
- package/components/QiuBadge/views/BadgeTemplateEditorView.vue +10 -0
- package/components/QiuBadge/views/BadgeTemplateListView.vue +229 -0
- package/components/QiuBadge/views/DeskLabelTemplateListView.vue +227 -0
- package/components/QiuBadge/views/DeskLabelView.vue +683 -0
- package/components/QiuBadgeDot/index.vue +87 -0
- package/components/QiuButton/index.vue +247 -0
- package/components/QiuButtonGroup/index.vue +63 -0
- package/components/QiuCanvasKit/QiuCanvasEditor.vue +5503 -0
- package/components/QiuCanvasKit/QiuCanvasRenderer.vue +348 -0
- package/components/QiuCanvasKit/assetUrl.ts +11 -0
- package/components/QiuCanvasKit/components/DataModulesPanel.vue +352 -0
- package/components/QiuCanvasKit/export/html.ts +132 -0
- package/components/QiuCanvasKit/export/pdf.ts +48 -0
- package/components/QiuCanvasKit/export/png.ts +50 -0
- package/components/QiuCanvasKit/index.ts +20 -0
- package/components/QiuCanvasKit/modules/badgeCompat.ts +84 -0
- package/components/QiuCanvasKit/modules/dataRegistry.ts +207 -0
- package/components/QiuCanvasKit/modules/merge.ts +71 -0
- package/components/QiuCanvasKit/presets/badge.ts +67 -0
- package/components/QiuCanvasKit/presets/banner.ts +79 -0
- package/components/QiuCanvasKit/types.ts +138 -0
- package/components/QiuCard/index.vue +104 -0
- package/components/QiuCarousel/context.ts +16 -0
- package/components/QiuCarousel/index.vue +343 -0
- package/components/QiuCarouselItem/index.vue +47 -0
- package/components/QiuCascader/index.vue +879 -0
- package/components/QiuCascader/types.ts +48 -0
- package/components/QiuCheckbox/QiuCheckboxGroup.vue +78 -0
- package/components/QiuCheckbox/index.vue +231 -0
- package/components/QiuCheckbox/types.ts +8 -0
- package/components/QiuCode/index.vue +64 -0
- package/components/QiuCol/col.scss +55 -0
- package/components/QiuCol/index.vue +64 -0
- package/components/QiuCollapse/context.ts +10 -0
- package/components/QiuCollapse/index.vue +70 -0
- package/components/QiuCollapseItem/index.vue +167 -0
- package/components/QiuColorField/index.vue +296 -0
- package/components/QiuColorPicker/README.md +118 -0
- package/components/QiuColorPicker/index.vue +60 -0
- package/components/QiuColorfulCard/index.vue +101 -0
- package/components/QiuCombobox/index.vue +277 -0
- package/components/QiuConfigProvider/index.vue +31 -0
- package/components/QiuContextMenu/index.vue +209 -0
- package/components/QiuDate/index.vue +1134 -0
- package/components/QiuDescriptions/context.ts +20 -0
- package/components/QiuDescriptions/index.vue +115 -0
- package/components/QiuDescriptionsItem/index.vue +103 -0
- package/components/QiuDialog/index.vue +828 -0
- package/components/QiuDigitalCard/index.vue +159 -0
- package/components/QiuDivider/index.vue +185 -0
- package/components/QiuDot/index.vue +83 -0
- package/components/QiuDrawer/index.vue +350 -0
- package/components/QiuDropdown/QiuDropdownItem.vue +74 -0
- package/components/QiuDropdown/QiuDropdownMenu.vue +22 -0
- package/components/QiuDropdown/context.ts +9 -0
- package/components/QiuDropdown/index.vue +189 -0
- package/components/QiuEmpty/index.vue +73 -0
- package/components/QiuForm/index.vue +172 -0
- package/components/QiuForm/types.ts +39 -0
- package/components/QiuFormItem/index.vue +276 -0
- package/components/QiuFullscreen/index.vue +11 -0
- package/components/QiuGrid/index.vue +408 -0
- package/components/QiuHoverCard/index.vue +192 -0
- package/components/QiuIcon/index.vue +117 -0
- package/components/QiuIconPicker/iconify.libraries.ts +182 -0
- package/components/QiuIconPicker/icons.catalog.ts +3072 -0
- package/components/QiuIconPicker/index.vue +488 -0
- package/components/QiuImage/index.vue +177 -0
- package/components/QiuInput/index.vue +328 -0
- package/components/QiuInputNumber/index.vue +295 -0
- package/components/QiuInputOtp/index.vue +190 -0
- package/components/QiuKbd/index.vue +57 -0
- package/components/QiuLayoutContainer/index.vue +50 -0
- package/components/QiuLinkPreview/index.vue +224 -0
- package/components/QiuLoading/index.ts +176 -0
- package/components/QiuLoading/spinner.vue +820 -0
- package/components/QiuLoading/types.ts +44 -0
- package/components/QiuMention/index.vue +299 -0
- package/components/QiuMenu/QiuMenuRoot.vue +241 -0
- package/components/QiuMenu/components/QiuMenuItem.vue +340 -0
- package/components/QiuMenu/components/QiuSubMenu.vue +504 -0
- package/components/QiuMenu/context.ts +21 -0
- package/components/QiuMenu/index.vue +43 -0
- package/components/QiuMenuNav/QiuMenuNavItem.vue +100 -0
- package/components/QiuMenuNav/QiuMenuNavSub.vue +120 -0
- package/components/QiuMenuNav/context.ts +14 -0
- package/components/QiuMenuNav/index.vue +148 -0
- package/components/QiuMsg/QiuMsgItem.vue +180 -0
- package/components/QiuMsg/index.ts +158 -0
- package/components/QiuMsg/types.ts +23 -0
- package/components/QiuMsgBox/index.ts +147 -0
- package/components/QiuNotification/QiuNotificationItem.vue +168 -0
- package/components/QiuNotification/index.ts +155 -0
- package/components/QiuNotification/types.ts +14 -0
- package/components/QiuPage/index.vue +12 -0
- package/components/QiuPageHeader/index.vue +115 -0
- package/components/QiuPageMain/index.vue +78 -0
- package/components/QiuPagination/index.vue +421 -0
- package/components/QiuPasswordStrength/index.vue +101 -0
- package/components/QiuPopconfirm/index.vue +196 -0
- package/components/QiuPopover/index.vue +277 -0
- package/components/QiuProgress/index.vue +235 -0
- package/components/QiuQrcode/index.vue +302 -0
- package/components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue +13 -0
- package/components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue +37 -0
- package/components/QiuQueryForm/components/QiuQueryFormRightPanel.vue +37 -0
- package/components/QiuQueryForm/components/QiuQueryFormTopPanel.vue +13 -0
- package/components/QiuQueryForm/index.vue +117 -0
- package/components/QiuRadio/QiuRadioGroup.vue +75 -0
- package/components/QiuRadio/index.vue +191 -0
- package/components/QiuRadio/types.ts +9 -0
- package/components/QiuRate/index.vue +184 -0
- package/components/QiuRefresh/index.vue +32 -0
- package/components/QiuResult/index.vue +103 -0
- package/components/QiuRow/index.vue +60 -0
- package/components/QiuRow/types.ts +5 -0
- package/components/QiuScrollbar/index.vue +107 -0
- package/components/QiuSearchBar/index.vue +154 -0
- package/components/QiuSegmented/index.vue +120 -0
- package/components/QiuSelect/QiuOption.vue +93 -0
- package/components/QiuSelect/index.vue +452 -0
- package/components/QiuSelect/types.ts +15 -0
- package/components/QiuSkeleton/index.vue +78 -0
- package/components/QiuSlider/index.vue +266 -0
- package/components/QiuSpace/index.vue +95 -0
- package/components/QiuSparkline/index.vue +92 -0
- package/components/QiuStatistic/index.vue +4 -0
- package/components/QiuStatistics/index.vue +123 -0
- package/components/QiuStep/index.vue +220 -0
- package/components/QiuSteps/context.ts +25 -0
- package/components/QiuSteps/index.vue +84 -0
- package/components/QiuSwitch/index.vue +145 -0
- package/components/QiuTabBar/index.vue +218 -0
- package/components/QiuTabBar/types.ts +19 -0
- package/components/QiuTabPane/index.vue +82 -0
- package/components/QiuTable/columns.ts +16 -0
- package/components/QiuTable/export.ts +102 -0
- package/components/QiuTable/index.ts +24 -0
- package/components/QiuTable/index.vue +3503 -0
- package/components/QiuTable/registry.ts +75 -0
- package/components/QiuTable/styles/table.scss +1230 -0
- package/components/QiuTable/types.ts +413 -0
- package/components/QiuTable/useArea.ts +202 -0
- package/components/QiuTable/useColumns.ts +325 -0
- package/components/QiuTable/useEdit.ts +136 -0
- package/components/QiuTable/useExtras.ts +115 -0
- package/components/QiuTable/useHistory.ts +77 -0
- package/components/QiuTable/useMerge.ts +105 -0
- package/components/QiuTable/useResize.ts +86 -0
- package/components/QiuTable/useScrollSync.ts +152 -0
- package/components/QiuTable/useVirtual.ts +97 -0
- package/components/QiuTable/utils.ts +165 -0
- package/components/QiuTableColumn/index.vue +101 -0
- package/components/QiuTag/index.vue +143 -0
- package/components/QiuText/index.vue +99 -0
- package/components/QiuTime/index.vue +548 -0
- package/components/QiuTimeAgo/index.vue +103 -0
- package/components/QiuTimeline/index.vue +54 -0
- package/components/QiuTimelineItem/index.vue +140 -0
- package/components/QiuTips/index.vue +323 -0
- package/components/QiuTooltip/index.vue +237 -0
- package/components/QiuTransfer/index.vue +277 -0
- package/components/QiuTree/QiuTreeNode.vue +146 -0
- package/components/QiuTree/index.vue +143 -0
- package/components/QiuTree/types.ts +30 -0
- package/components/QiuTreeSelect/index.vue +259 -0
- package/components/QiuTrend/index.vue +92 -0
- package/components/QiuUpload/index.vue +628 -0
- package/components/QiuUploadCrop/index.vue +1267 -0
- package/components/QiuWatermark/index.vue +121 -0
- package/components/useBodyScrollLock.ts +28 -0
- package/dist/components/QiuAnchor/context.d.ts +15 -0
- package/dist/components/QiuAnchorLink/index.vue.d.ts +23 -0
- package/dist/components/QiuBadge/api/index.d.ts +110 -0
- package/dist/components/QiuBadge/components/BadgeImagePickerDialog.vue.d.ts +16 -0
- package/dist/components/QiuBadge/components/BadgeLibraryManagerDialog.vue.d.ts +9 -0
- package/dist/components/QiuBadge/components/BadgeLibraryPanel.vue.d.ts +5 -0
- package/dist/components/QiuBadge/composables/useTableHostHeight.d.ts +7 -0
- package/dist/components/QiuBadge/index.d.ts +18 -0
- package/dist/components/QiuBadge/shared/BadgeTemplateRenderer.vue.d.ts +14 -0
- package/dist/components/QiuBadge/shared/assetUrl.d.ts +1 -0
- package/dist/components/QiuBadge/shared/badgeTemplate.d.ts +132 -0
- package/dist/components/QiuBadge/utils/chinaAreaData.d.ts +9 -0
- package/dist/components/QiuBadge/utils/hostRegion.d.ts +3 -0
- package/dist/components/QiuBadge/utils/pca-code.json.d.ts +3 -0
- package/dist/components/QiuBadge/utils/pdfFromElement.d.ts +14 -0
- package/dist/components/QiuBadge/views/BadgeLibraryView.vue.d.ts +2 -0
- package/dist/components/QiuBadge/views/BadgeManageView.vue.d.ts +7 -0
- package/dist/components/QiuBadge/views/BadgeTemplateListView.vue.d.ts +4 -0
- package/dist/components/QiuBadge/views/DeskLabelTemplateListView.vue.d.ts +4 -0
- package/dist/components/QiuBadge/views/DeskLabelView.vue.d.ts +4 -0
- package/dist/components/QiuButton/index.vue.d.ts +52 -0
- package/dist/components/QiuCanvasKit/QiuCanvasEditor.vue.d.ts +24 -0
- package/dist/components/QiuCanvasKit/QiuCanvasRenderer.vue.d.ts +13 -0
- package/dist/components/QiuCanvasKit/assetUrl.d.ts +7 -0
- package/dist/components/QiuCanvasKit/components/DataModulesPanel.vue.d.ts +23 -0
- package/dist/components/QiuCanvasKit/export/html.d.ts +12 -0
- package/dist/components/QiuCanvasKit/export/pdf.d.ts +9 -0
- package/dist/components/QiuCanvasKit/export/png.d.ts +8 -0
- package/dist/components/QiuCanvasKit/index.d.ts +19 -0
- package/dist/components/QiuCanvasKit/modules/badgeCompat.d.ts +8 -0
- package/dist/components/QiuCanvasKit/modules/dataRegistry.d.ts +23 -0
- package/dist/components/QiuCanvasKit/modules/merge.d.ts +12 -0
- package/dist/components/QiuCanvasKit/presets/badge.d.ts +12 -0
- package/dist/components/QiuCanvasKit/presets/banner.d.ts +4 -0
- package/dist/components/QiuCanvasKit/types.d.ts +119 -0
- package/dist/components/QiuCarousel/context.d.ts +13 -0
- package/dist/components/QiuCarouselItem/index.vue.d.ts +20 -0
- package/dist/components/QiuCascader/types.d.ts +25 -0
- package/dist/components/QiuCheckbox/QiuCheckboxGroup.vue.d.ts +33 -0
- package/dist/components/QiuCheckbox/index.vue.d.ts +38 -0
- package/dist/components/QiuCheckbox/types.d.ts +7 -0
- package/dist/components/QiuCode/index.vue.d.ts +15 -0
- package/dist/components/QiuCollapse/context.d.ts +8 -0
- package/dist/components/QiuCollapseItem/index.vue.d.ts +30 -0
- package/dist/components/QiuColorField/index.vue.d.ts +23 -0
- package/dist/components/QiuColorPicker/index.vue.d.ts +21 -0
- package/dist/components/QiuCombobox/index.vue.d.ts +54 -0
- package/dist/components/QiuContextMenu/index.vue.d.ts +46 -0
- package/dist/components/QiuDescriptions/context.d.ts +16 -0
- package/dist/components/QiuDescriptionsItem/index.vue.d.ts +25 -0
- package/dist/components/QiuDigitalCard/index.vue.d.ts +45 -0
- package/dist/components/QiuDropdown/QiuDropdownItem.vue.d.ts +30 -0
- package/dist/components/QiuDropdown/QiuDropdownMenu.vue.d.ts +17 -0
- package/dist/components/QiuDropdown/context.d.ts +7 -0
- package/dist/components/QiuDropdown/index.vue.d.ts +46 -0
- package/dist/components/QiuForm/types.d.ts +31 -0
- package/dist/components/QiuHoverCard/index.vue.d.ts +44 -0
- package/dist/components/QiuIcon/index.vue.d.ts +18 -0
- package/dist/components/QiuIconPicker/iconify.libraries.d.ts +18 -0
- package/dist/components/QiuIconPicker/icons.catalog.d.ts +12 -0
- package/dist/components/QiuInput/index.vue.d.ts +71 -0
- package/dist/components/QiuInputNumber/index.vue.d.ts +38 -0
- package/dist/components/QiuInputOtp/index.vue.d.ts +28 -0
- package/dist/components/QiuKbd/index.vue.d.ts +22 -0
- package/dist/components/QiuLayoutContainer/index.vue.d.ts +29 -0
- package/dist/components/QiuLinkPreview/index.vue.d.ts +43 -0
- package/dist/components/QiuLoading/index.d.ts +26 -0
- package/dist/components/QiuLoading/spinner.vue.d.ts +14 -0
- package/dist/components/QiuLoading/types.d.ts +2 -0
- package/dist/components/QiuMention/index.vue.d.ts +35 -0
- package/dist/components/QiuMenu/QiuMenuRoot.vue.d.ts +36 -0
- package/dist/components/QiuMenu/context.d.ts +19 -0
- package/dist/components/QiuMenuNav/QiuMenuNavItem.vue.d.ts +26 -0
- package/dist/components/QiuMenuNav/QiuMenuNavSub.vue.d.ts +25 -0
- package/dist/components/QiuMenuNav/context.d.ts +12 -0
- package/dist/components/QiuMenuNav/index.vue.d.ts +35 -0
- package/dist/components/QiuMsg/QiuMsgItem.vue.d.ts +15 -0
- package/dist/components/QiuMsg/index.d.ts +30 -0
- package/dist/components/QiuMsg/types.d.ts +12 -0
- package/dist/components/QiuMsgBox/index.d.ts +14 -0
- package/dist/components/QiuNotification/QiuNotificationItem.vue.d.ts +16 -0
- package/dist/components/QiuNotification/index.d.ts +30 -0
- package/dist/components/QiuNotification/types.d.ts +12 -0
- package/dist/components/QiuPageMain/index.vue.d.ts +27 -0
- package/dist/components/QiuPagination/index.vue.d.ts +44 -0
- package/dist/components/QiuPasswordStrength/index.vue.d.ts +9 -0
- package/dist/components/QiuQrcode/index.vue.d.ts +20 -0
- package/dist/components/QiuRadio/QiuRadioGroup.vue.d.ts +33 -0
- package/dist/components/QiuRadio/types.d.ts +8 -0
- package/dist/components/QiuRow/types.d.ts +4 -0
- package/dist/components/QiuSearchBar/index.vue.d.ts +38 -0
- package/dist/components/QiuSelect/QiuOption.vue.d.ts +24 -0
- package/dist/components/QiuSelect/index.vue.d.ts +52 -0
- package/dist/components/QiuSelect/types.d.ts +13 -0
- package/dist/components/QiuSparkline/index.vue.d.ts +18 -0
- package/dist/components/QiuStep/index.vue.d.ts +31 -0
- package/dist/components/QiuSteps/context.d.ts +21 -0
- package/dist/components/QiuSwitch/index.vue.d.ts +25 -0
- package/dist/components/QiuTabBar/index.vue.d.ts +32 -0
- package/dist/components/QiuTabBar/types.d.ts +16 -0
- package/dist/components/QiuTabPane/index.vue.d.ts +25 -0
- package/dist/components/QiuTable/columns.d.ts +1 -0
- package/dist/components/QiuTable/export.d.ts +18 -0
- package/dist/components/QiuTable/index.d.ts +3 -0
- package/dist/components/QiuTable/index.vue.d.ts +322 -0
- package/dist/components/QiuTable/registry.d.ts +39 -0
- package/dist/components/QiuTable/types.d.ts +353 -0
- package/dist/components/QiuTable/useArea.d.ts +51 -0
- package/dist/components/QiuTable/useColumns.d.ts +67 -0
- package/dist/components/QiuTable/useEdit.d.ts +36 -0
- package/dist/components/QiuTable/useExtras.d.ts +38 -0
- package/dist/components/QiuTable/useHistory.d.ts +44 -0
- package/dist/components/QiuTable/useMerge.d.ts +28 -0
- package/dist/components/QiuTable/useResize.d.ts +19 -0
- package/dist/components/QiuTable/useScrollSync.d.ts +25 -0
- package/dist/components/QiuTable/useVirtual.d.ts +30 -0
- package/dist/components/QiuTable/utils.d.ts +54 -0
- package/dist/components/QiuTime/index.vue.d.ts +43 -0
- package/dist/components/QiuTimeAgo/index.vue.d.ts +35 -0
- package/dist/components/QiuTimelineItem/index.vue.d.ts +35 -0
- package/dist/components/QiuTooltip/index.vue.d.ts +38 -0
- package/dist/components/QiuTree/types.d.ts +13 -0
- package/dist/components/QiuTrend/index.vue.d.ts +34 -0
- package/dist/components/QiuUpload/index.vue.d.ts +86 -0
- package/dist/components/QiuUploadCrop/index.vue.d.ts +136 -0
- package/dist/components/useBodyScrollLock.d.ts +4 -0
- package/dist/foucui.css +1 -0
- package/dist/foucui.js +26509 -0
- package/dist/foucui.umd.cjs +125 -0
- package/dist/index.d.ts +46 -0
- package/dist/src/bridge/@/api/media.d.ts +7 -0
- package/dist/src/bridge/@/api/notice.d.ts +5 -0
- package/dist/src/bridge/@/config/index.d.ts +29 -0
- package/dist/src/bridge/@/config/media.config.d.ts +15 -0
- package/dist/src/bridge/@/config/security.config.d.ts +7 -0
- package/dist/src/bridge/@/i18n/index.d.ts +7 -0
- package/dist/src/bridge/@/store/modules/bing.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/errorLog.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/media.d.ts +4 -0
- package/dist/src/bridge/@/store/modules/routes.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/settings.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/tabs.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/user.d.ts +3 -0
- package/dist/src/bridge/@/utils/convertToCamelCase.d.ts +2 -0
- package/dist/src/bridge/@/utils/index.d.ts +5 -0
- package/dist/src/bridge/@/utils/pageTitle.d.ts +1 -0
- package/dist/src/bridge/@/utils/routes.d.ts +11 -0
- package/dist/src/bridge/@/utils/validate.d.ts +13 -0
- package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +2 -0
- package/dist/src/i18n.d.ts +2 -0
- package/package.json +83 -0
- package/plugins/qiu.ts +83 -0
- package/plugins/shortcuts.ts +69 -0
- package/src/bridge/@/api/media.ts +8 -0
- package/src/bridge/@/api/notice.ts +5 -0
- package/src/bridge/@/config/index.ts +38 -0
- package/src/bridge/@/config/media.config.ts +37 -0
- package/src/bridge/@/config/security.config.ts +8 -0
- package/src/bridge/@/i18n/index.ts +6 -0
- package/src/bridge/@/store/modules/bing.ts +9 -0
- package/src/bridge/@/store/modules/errorLog.ts +9 -0
- package/src/bridge/@/store/modules/media.ts +10 -0
- package/src/bridge/@/store/modules/routes.ts +10 -0
- package/src/bridge/@/store/modules/settings.ts +9 -0
- package/src/bridge/@/store/modules/tabs.ts +9 -0
- package/src/bridge/@/store/modules/user.ts +9 -0
- package/src/bridge/@/utils/convertToCamelCase.ts +11 -0
- package/src/bridge/@/utils/index.ts +9 -0
- package/src/bridge/@/utils/pageTitle.ts +4 -0
- package/src/bridge/@/utils/routes.ts +14 -0
- package/src/bridge/@/utils/validate.ts +17 -0
- package/src/bridge/@qiu/plugins/shortcuts.ts +3 -0
- package/src/i18n.ts +8 -0
- package/src/icons/qiu-logo.svg +1 -0
- package/styles/dark.scss +194 -0
- package/styles/normalize.css +349 -0
- package/styles/plain.scss +423 -0
- package/styles/qiu-tokens.scss +40 -0
- package/styles/qiu.scss +1149 -0
- package/styles/technology.scss +452 -0
- package/styles/var.scss +382 -0
- package/styles/variables.scss +77 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="qiu-upload"
|
|
4
|
+
:class="{
|
|
5
|
+
'is-disabled': disabled,
|
|
6
|
+
[`qiu-upload--${listType}`]: true,
|
|
7
|
+
'is-dragover': dragOver,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<input
|
|
11
|
+
ref="inputRef"
|
|
12
|
+
class="qiu-upload__input"
|
|
13
|
+
type="file"
|
|
14
|
+
:accept="accept"
|
|
15
|
+
:multiple="multiple"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
@change="onInputChange"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<div v-if="listType === 'picture-card'" class="qiu-upload__card-list">
|
|
21
|
+
<div
|
|
22
|
+
v-for="item in fileList"
|
|
23
|
+
:key="item.uid"
|
|
24
|
+
class="qiu-upload__card"
|
|
25
|
+
:style="cardStyle"
|
|
26
|
+
>
|
|
27
|
+
<img
|
|
28
|
+
v-if="showPreview && previewSrc(item)"
|
|
29
|
+
:src="previewSrc(item)!"
|
|
30
|
+
class="qiu-upload__card-img"
|
|
31
|
+
alt=""
|
|
32
|
+
/>
|
|
33
|
+
<div v-else class="qiu-upload__card-name">{{ item.name }}</div>
|
|
34
|
+
<div v-if="item.status === 'uploading'" class="qiu-upload__card-progress">
|
|
35
|
+
{{ item.percentage || 0 }}%
|
|
36
|
+
</div>
|
|
37
|
+
<button type="button" class="qiu-upload__card-remove" :disabled="disabled" @click="removeFile(item)">
|
|
38
|
+
×
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
<button
|
|
42
|
+
v-if="!disabled && (!limit || fileList.length < limit)"
|
|
43
|
+
type="button"
|
|
44
|
+
class="qiu-upload__card-trigger"
|
|
45
|
+
:style="cardStyle"
|
|
46
|
+
@click="openPicker"
|
|
47
|
+
>
|
|
48
|
+
<qiu-icon icon="add-line" />
|
|
49
|
+
<span>上传</span>
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<template v-else>
|
|
54
|
+
<div
|
|
55
|
+
v-if="drag"
|
|
56
|
+
class="qiu-upload__dragger"
|
|
57
|
+
@click="openPicker"
|
|
58
|
+
@dragover.prevent="onDragOver"
|
|
59
|
+
@dragleave.prevent="onDragLeave"
|
|
60
|
+
@drop.prevent="onDrop"
|
|
61
|
+
>
|
|
62
|
+
<qiu-icon icon="upload-cloud-2-line" class="qiu-upload__drag-icon" />
|
|
63
|
+
<p>将文件拖到此处,或 <em>点击上传</em></p>
|
|
64
|
+
<p v-if="tip" class="qiu-upload__tip">{{ tip }}</p>
|
|
65
|
+
</div>
|
|
66
|
+
<div v-else class="qiu-upload__trigger">
|
|
67
|
+
<qiu-button type="primary" :disabled="disabled" icon="upload-2-line" @click="openPicker">
|
|
68
|
+
{{ buttonText }}
|
|
69
|
+
</qiu-button>
|
|
70
|
+
<p v-if="tip" class="qiu-upload__tip">{{ tip }}</p>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<ul v-if="fileList.length" class="qiu-upload__list">
|
|
74
|
+
<li v-for="item in fileList" :key="item.uid" class="qiu-upload__item">
|
|
75
|
+
<div class="qiu-upload__item-main">
|
|
76
|
+
<img
|
|
77
|
+
v-if="showPreview && previewSrc(item)"
|
|
78
|
+
:src="previewSrc(item)!"
|
|
79
|
+
class="qiu-upload__thumb"
|
|
80
|
+
:style="thumbStyle"
|
|
81
|
+
alt=""
|
|
82
|
+
/>
|
|
83
|
+
<qiu-icon v-else :icon="isImage(item.name) ? 'image-line' : 'file-line'" />
|
|
84
|
+
<span class="qiu-upload__name" :title="item.name">{{ item.name }}</span>
|
|
85
|
+
<span class="qiu-upload__size">{{ formatSize(item.size) }}</span>
|
|
86
|
+
<button type="button" class="qiu-upload__remove" :disabled="disabled" @click="removeFile(item)">
|
|
87
|
+
<qiu-icon icon="close-line" />
|
|
88
|
+
</button>
|
|
89
|
+
</div>
|
|
90
|
+
<div v-if="item.status === 'uploading'" class="qiu-upload__progress">
|
|
91
|
+
<div class="qiu-upload__progress-bar" :style="{ width: `${item.percentage || 0}%` }" />
|
|
92
|
+
</div>
|
|
93
|
+
<div v-else-if="item.status === 'fail'" class="qiu-upload__fail">上传失败</div>
|
|
94
|
+
<pre v-if="showResponse && item.response != null" class="qiu-upload__response">{{ formatResponse(item.response) }}</pre>
|
|
95
|
+
</li>
|
|
96
|
+
</ul>
|
|
97
|
+
</template>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script lang="ts" setup>
|
|
102
|
+
/**
|
|
103
|
+
* QiuUpload — 自研上传(事件模式 / action HTTP)
|
|
104
|
+
* 支持实时预览开关、返回内容展示、自动缩略图
|
|
105
|
+
*/
|
|
106
|
+
defineOptions({ name: 'QiuUpload' })
|
|
107
|
+
|
|
108
|
+
export type QiuUploadFile = {
|
|
109
|
+
uid: number
|
|
110
|
+
name: string
|
|
111
|
+
size: number
|
|
112
|
+
raw?: File
|
|
113
|
+
url?: string
|
|
114
|
+
/** 缩略图(blob/dataURL) */
|
|
115
|
+
thumbnail?: string
|
|
116
|
+
status?: 'ready' | 'uploading' | 'success' | 'fail'
|
|
117
|
+
percentage?: number
|
|
118
|
+
response?: unknown
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const props = withDefaults(
|
|
122
|
+
defineProps<{
|
|
123
|
+
modelValue?: QiuUploadFile[]
|
|
124
|
+
accept?: string
|
|
125
|
+
multiple?: boolean
|
|
126
|
+
limit?: number
|
|
127
|
+
disabled?: boolean
|
|
128
|
+
drag?: boolean
|
|
129
|
+
listType?: 'text' | 'picture-card'
|
|
130
|
+
buttonText?: string
|
|
131
|
+
tip?: string
|
|
132
|
+
autoUpload?: boolean
|
|
133
|
+
action?: string
|
|
134
|
+
headers?: Record<string, string>
|
|
135
|
+
name?: string
|
|
136
|
+
data?: Record<string, string | Blob>
|
|
137
|
+
withCredentials?: boolean
|
|
138
|
+
/** 是否显示实时图片预览 */
|
|
139
|
+
showPreview?: boolean
|
|
140
|
+
/** 上传成功后是否展示返回内容 */
|
|
141
|
+
showResponse?: boolean
|
|
142
|
+
/** 是否自动生成缩略图 */
|
|
143
|
+
autoThumbnail?: boolean
|
|
144
|
+
/** 缩略图边长(px) */
|
|
145
|
+
thumbnailSize?: number
|
|
146
|
+
/** 缩略图压缩质量 0.1~1(控制体积,便于存储) */
|
|
147
|
+
outputQuality?: number
|
|
148
|
+
/** 缩略图输出格式 */
|
|
149
|
+
thumbnailType?: 'image/jpeg' | 'image/webp' | 'image/png'
|
|
150
|
+
}>(),
|
|
151
|
+
{
|
|
152
|
+
modelValue: () => [],
|
|
153
|
+
accept: '',
|
|
154
|
+
multiple: false,
|
|
155
|
+
limit: 0,
|
|
156
|
+
disabled: false,
|
|
157
|
+
drag: false,
|
|
158
|
+
listType: 'text',
|
|
159
|
+
buttonText: '点击上传',
|
|
160
|
+
tip: '',
|
|
161
|
+
autoUpload: true,
|
|
162
|
+
action: '',
|
|
163
|
+
headers: () => ({}),
|
|
164
|
+
name: 'file',
|
|
165
|
+
data: () => ({}),
|
|
166
|
+
withCredentials: false,
|
|
167
|
+
showPreview: true,
|
|
168
|
+
showResponse: false,
|
|
169
|
+
autoThumbnail: false,
|
|
170
|
+
thumbnailSize: 64,
|
|
171
|
+
outputQuality: 0.85,
|
|
172
|
+
thumbnailType: 'image/jpeg',
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
const emit = defineEmits<{
|
|
177
|
+
'update:modelValue': [QiuUploadFile[]]
|
|
178
|
+
change: [file: QiuUploadFile, fileList: QiuUploadFile[]]
|
|
179
|
+
remove: [file: QiuUploadFile, fileList: QiuUploadFile[]]
|
|
180
|
+
exceed: [files: File[], fileList: QiuUploadFile[]]
|
|
181
|
+
success: [response: unknown, file: QiuUploadFile, fileList: QiuUploadFile[]]
|
|
182
|
+
error: [error: Error, file: QiuUploadFile, fileList: QiuUploadFile[]]
|
|
183
|
+
progress: [percent: number, file: QiuUploadFile, fileList: QiuUploadFile[]]
|
|
184
|
+
}>()
|
|
185
|
+
|
|
186
|
+
const inputRef = ref<HTMLInputElement | null>(null)
|
|
187
|
+
const dragOver = ref(false)
|
|
188
|
+
const fileList = ref<QiuUploadFile[]>([...props.modelValue])
|
|
189
|
+
let uidSeed = Date.now()
|
|
190
|
+
|
|
191
|
+
watch(
|
|
192
|
+
() => props.modelValue,
|
|
193
|
+
(v) => {
|
|
194
|
+
fileList.value = [...(v || [])]
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
const sync = () => emit('update:modelValue', [...fileList.value])
|
|
199
|
+
|
|
200
|
+
const thumbStyle = computed(() => {
|
|
201
|
+
const s = Math.max(24, props.thumbnailSize || 64)
|
|
202
|
+
return { width: `${s}px`, height: `${s}px` }
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
const cardStyle = computed(() => {
|
|
206
|
+
const s = Math.max(64, props.thumbnailSize || 100)
|
|
207
|
+
return { width: `${s}px`, height: `${s}px` }
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
const formatSize = (size = 0) => {
|
|
211
|
+
if (size < 1024) return `${size} B`
|
|
212
|
+
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KB`
|
|
213
|
+
return `${(size / 1024 / 1024).toFixed(1)} MB`
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const isImage = (name: string) => /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(name)
|
|
217
|
+
|
|
218
|
+
const previewSrc = (item: QiuUploadFile) => {
|
|
219
|
+
if (!props.showPreview) return ''
|
|
220
|
+
if (!isImage(item.name) && !item.url) return ''
|
|
221
|
+
return item.thumbnail || item.url || ''
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const formatResponse = (res: unknown) => {
|
|
225
|
+
if (typeof res === 'string') return res
|
|
226
|
+
try {
|
|
227
|
+
return JSON.stringify(res, null, 2)
|
|
228
|
+
} catch {
|
|
229
|
+
return String(res)
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** 从响应中尝试提取图片 URL */
|
|
234
|
+
const pickUrlFromResponse = (response: unknown): string => {
|
|
235
|
+
if (!response) return ''
|
|
236
|
+
if (typeof response === 'string' && /^https?:|^\/|blob:|data:/i.test(response)) return response
|
|
237
|
+
if (typeof response === 'object' && response) {
|
|
238
|
+
const o = response as Record<string, any>
|
|
239
|
+
return (
|
|
240
|
+
o.url ||
|
|
241
|
+
o.data?.url ||
|
|
242
|
+
o.result?.url ||
|
|
243
|
+
o.path ||
|
|
244
|
+
o.data?.path ||
|
|
245
|
+
''
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
return ''
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const makeThumbnail = (file: File, size: number): Promise<string> =>
|
|
252
|
+
new Promise((resolve) => {
|
|
253
|
+
if (!file.type.startsWith('image/')) {
|
|
254
|
+
resolve('')
|
|
255
|
+
return
|
|
256
|
+
}
|
|
257
|
+
const img = new Image()
|
|
258
|
+
const src = URL.createObjectURL(file)
|
|
259
|
+
img.onload = () => {
|
|
260
|
+
const canvas = document.createElement('canvas')
|
|
261
|
+
const scale = Math.min(size / img.width, size / img.height, 1)
|
|
262
|
+
const w = Math.max(1, Math.round(img.width * scale))
|
|
263
|
+
const h = Math.max(1, Math.round(img.height * scale))
|
|
264
|
+
canvas.width = w
|
|
265
|
+
canvas.height = h
|
|
266
|
+
const ctx = canvas.getContext('2d')
|
|
267
|
+
if (props.thumbnailType === 'image/jpeg' || props.thumbnailType === 'image/webp') {
|
|
268
|
+
ctx?.fillRect(0, 0, w, h)
|
|
269
|
+
}
|
|
270
|
+
ctx?.drawImage(img, 0, 0, w, h)
|
|
271
|
+
URL.revokeObjectURL(src)
|
|
272
|
+
try {
|
|
273
|
+
resolve(canvas.toDataURL(props.thumbnailType, props.outputQuality))
|
|
274
|
+
} catch {
|
|
275
|
+
resolve('')
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
img.onerror = () => {
|
|
279
|
+
URL.revokeObjectURL(src)
|
|
280
|
+
resolve('')
|
|
281
|
+
}
|
|
282
|
+
img.src = src
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
const openPicker = () => {
|
|
286
|
+
if (props.disabled) return
|
|
287
|
+
inputRef.value?.click()
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const onDragOver = () => {
|
|
291
|
+
if (!props.disabled) dragOver.value = true
|
|
292
|
+
}
|
|
293
|
+
const onDragLeave = () => {
|
|
294
|
+
dragOver.value = false
|
|
295
|
+
}
|
|
296
|
+
const onDrop = (e: DragEvent) => {
|
|
297
|
+
dragOver.value = false
|
|
298
|
+
if (props.disabled) return
|
|
299
|
+
addFiles(Array.from(e.dataTransfer?.files || []))
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const onInputChange = (e: Event) => {
|
|
303
|
+
const input = e.target as HTMLInputElement
|
|
304
|
+
const files = Array.from(input.files || [])
|
|
305
|
+
input.value = ''
|
|
306
|
+
addFiles(files)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const addFiles = async (files: File[]) => {
|
|
310
|
+
if (!files.length) return
|
|
311
|
+
if (props.limit && fileList.value.length + files.length > props.limit) {
|
|
312
|
+
emit('exceed', files, [...fileList.value])
|
|
313
|
+
return
|
|
314
|
+
}
|
|
315
|
+
for (const raw of files) {
|
|
316
|
+
const item: QiuUploadFile = {
|
|
317
|
+
uid: ++uidSeed,
|
|
318
|
+
name: raw.name,
|
|
319
|
+
size: raw.size,
|
|
320
|
+
raw,
|
|
321
|
+
url: isImage(raw.name) ? URL.createObjectURL(raw) : undefined,
|
|
322
|
+
status: 'ready',
|
|
323
|
+
percentage: 0,
|
|
324
|
+
}
|
|
325
|
+
if (props.autoThumbnail && isImage(raw.name)) {
|
|
326
|
+
item.thumbnail = await makeThumbnail(raw, props.thumbnailSize)
|
|
327
|
+
}
|
|
328
|
+
fileList.value.push(item)
|
|
329
|
+
sync()
|
|
330
|
+
emit('change', item, [...fileList.value])
|
|
331
|
+
if (props.autoUpload) uploadFile(item)
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const removeFile = (file: QiuUploadFile) => {
|
|
336
|
+
if (props.disabled) return
|
|
337
|
+
if (file.url?.startsWith('blob:')) URL.revokeObjectURL(file.url)
|
|
338
|
+
fileList.value = fileList.value.filter((f) => f.uid !== file.uid)
|
|
339
|
+
sync()
|
|
340
|
+
emit('remove', file, [...fileList.value])
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const uploadFile = (file: QiuUploadFile) => {
|
|
344
|
+
if (!file.raw) return
|
|
345
|
+
if (!props.action) {
|
|
346
|
+
file.status = 'success'
|
|
347
|
+
file.percentage = 100
|
|
348
|
+
file.response = { local: true, name: file.name, size: file.size, url: file.url }
|
|
349
|
+
sync()
|
|
350
|
+
emit('success', file.response, file, [...fileList.value])
|
|
351
|
+
return
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
file.status = 'uploading'
|
|
355
|
+
file.percentage = 0
|
|
356
|
+
sync()
|
|
357
|
+
|
|
358
|
+
const xhr = new XMLHttpRequest()
|
|
359
|
+
const form = new FormData()
|
|
360
|
+
form.append(props.name, file.raw, file.name)
|
|
361
|
+
Object.entries(props.data || {}).forEach(([k, v]) => form.append(k, v))
|
|
362
|
+
|
|
363
|
+
xhr.upload.onprogress = (ev) => {
|
|
364
|
+
if (!ev.lengthComputable) return
|
|
365
|
+
const percent = Math.round((ev.loaded / ev.total) * 100)
|
|
366
|
+
file.percentage = percent
|
|
367
|
+
sync()
|
|
368
|
+
emit('progress', percent, file, [...fileList.value])
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
xhr.onload = () => {
|
|
372
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
373
|
+
let response: unknown = xhr.responseText
|
|
374
|
+
try {
|
|
375
|
+
response = JSON.parse(xhr.responseText)
|
|
376
|
+
} catch {
|
|
377
|
+
/* keep text */
|
|
378
|
+
}
|
|
379
|
+
file.status = 'success'
|
|
380
|
+
file.percentage = 100
|
|
381
|
+
file.response = response
|
|
382
|
+
const remoteUrl = pickUrlFromResponse(response)
|
|
383
|
+
if (remoteUrl) file.url = remoteUrl
|
|
384
|
+
sync()
|
|
385
|
+
emit('success', response, file, [...fileList.value])
|
|
386
|
+
} else {
|
|
387
|
+
file.status = 'fail'
|
|
388
|
+
sync()
|
|
389
|
+
emit('error', new Error(`Upload failed: ${xhr.status}`), file, [...fileList.value])
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
xhr.onerror = () => {
|
|
394
|
+
file.status = 'fail'
|
|
395
|
+
sync()
|
|
396
|
+
emit('error', new Error('Network error'), file, [...fileList.value])
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
xhr.open('POST', props.action)
|
|
400
|
+
Object.entries(props.headers || {}).forEach(([k, v]) => xhr.setRequestHeader(k, v))
|
|
401
|
+
xhr.withCredentials = props.withCredentials
|
|
402
|
+
xhr.send(form)
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
defineExpose({
|
|
406
|
+
clearFiles: () => {
|
|
407
|
+
fileList.value.forEach((f) => {
|
|
408
|
+
if (f.url?.startsWith('blob:')) URL.revokeObjectURL(f.url)
|
|
409
|
+
})
|
|
410
|
+
fileList.value = []
|
|
411
|
+
sync()
|
|
412
|
+
},
|
|
413
|
+
submit: () => {
|
|
414
|
+
fileList.value.filter((f) => f.status === 'ready').forEach(uploadFile)
|
|
415
|
+
},
|
|
416
|
+
})
|
|
417
|
+
</script>
|
|
418
|
+
|
|
419
|
+
<style lang="scss" scoped>
|
|
420
|
+
.qiu-upload {
|
|
421
|
+
width: 100%;
|
|
422
|
+
max-width: 560px;
|
|
423
|
+
font-size: 13px;
|
|
424
|
+
color: var(--qiu-text-color-regular, #606266);
|
|
425
|
+
|
|
426
|
+
&.is-disabled {
|
|
427
|
+
opacity: 0.6;
|
|
428
|
+
pointer-events: none;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.qiu-upload__input {
|
|
433
|
+
display: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.qiu-upload__dragger {
|
|
437
|
+
box-sizing: border-box;
|
|
438
|
+
padding: 28px 16px;
|
|
439
|
+
text-align: center;
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
background: var(--qiu-fill-color-blank, #fff);
|
|
442
|
+
border: 1px dashed var(--qiu-border-color, #dcdfe6);
|
|
443
|
+
border-radius: 8px;
|
|
444
|
+
transition: border-color 0.2s ease, background 0.2s ease;
|
|
445
|
+
|
|
446
|
+
&:hover,
|
|
447
|
+
.is-dragover & {
|
|
448
|
+
background: color-mix(in srgb, var(--qiu-color-primary, #0f766e) 6%, #fff);
|
|
449
|
+
border-color: var(--qiu-color-primary, #0f766e);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
p {
|
|
453
|
+
margin: 6px 0 0;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
em {
|
|
457
|
+
font-style: normal;
|
|
458
|
+
color: var(--qiu-color-primary, #0f766e);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.qiu-upload__drag-icon {
|
|
463
|
+
font-size: 36px;
|
|
464
|
+
color: var(--qiu-color-primary, #0f766e);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.qiu-upload__tip {
|
|
468
|
+
margin: 8px 0 0;
|
|
469
|
+
font-size: 12px;
|
|
470
|
+
color: var(--qiu-text-color-secondary, #909399);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.qiu-upload__list {
|
|
474
|
+
padding: 0;
|
|
475
|
+
margin: 12px 0 0;
|
|
476
|
+
list-style: none;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.qiu-upload__item {
|
|
480
|
+
padding: 8px 10px;
|
|
481
|
+
margin-bottom: 8px;
|
|
482
|
+
background: var(--qiu-fill-color-lighter, #fafafa);
|
|
483
|
+
border: 1px solid var(--qiu-border-color-lighter, #ebeef5);
|
|
484
|
+
border-radius: 6px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.qiu-upload__item-main {
|
|
488
|
+
display: flex;
|
|
489
|
+
gap: 8px;
|
|
490
|
+
align-items: center;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.qiu-upload__thumb {
|
|
494
|
+
flex-shrink: 0;
|
|
495
|
+
object-fit: cover;
|
|
496
|
+
border-radius: 4px;
|
|
497
|
+
background: var(--qiu-fill-color, #f0f2f5);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.qiu-upload__name {
|
|
501
|
+
flex: 1;
|
|
502
|
+
min-width: 0;
|
|
503
|
+
overflow: hidden;
|
|
504
|
+
text-overflow: ellipsis;
|
|
505
|
+
white-space: nowrap;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.qiu-upload__size {
|
|
509
|
+
flex-shrink: 0;
|
|
510
|
+
font-size: 12px;
|
|
511
|
+
color: var(--qiu-text-color-secondary, #909399);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.qiu-upload__remove {
|
|
515
|
+
display: inline-flex;
|
|
516
|
+
padding: 0;
|
|
517
|
+
color: var(--qiu-text-color-secondary, #909399);
|
|
518
|
+
cursor: pointer;
|
|
519
|
+
background: transparent;
|
|
520
|
+
border: 0;
|
|
521
|
+
|
|
522
|
+
&:hover {
|
|
523
|
+
color: var(--qiu-color-danger, #f56c6c);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.qiu-upload__progress {
|
|
528
|
+
height: 4px;
|
|
529
|
+
margin-top: 8px;
|
|
530
|
+
overflow: hidden;
|
|
531
|
+
background: var(--qiu-fill-color, #e5e7eb);
|
|
532
|
+
border-radius: 999px;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.qiu-upload__progress-bar {
|
|
536
|
+
height: 100%;
|
|
537
|
+
background: var(--qiu-color-primary, #0f766e);
|
|
538
|
+
transition: width 0.15s ease;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.qiu-upload__fail {
|
|
542
|
+
margin-top: 4px;
|
|
543
|
+
font-size: 12px;
|
|
544
|
+
color: var(--qiu-color-danger, #f56c6c);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.qiu-upload__response {
|
|
548
|
+
margin: 8px 0 0;
|
|
549
|
+
padding: 8px;
|
|
550
|
+
max-height: 120px;
|
|
551
|
+
overflow: auto;
|
|
552
|
+
font-size: 12px;
|
|
553
|
+
line-height: 1.45;
|
|
554
|
+
color: var(--qiu-text-color-regular, #606266);
|
|
555
|
+
white-space: pre-wrap;
|
|
556
|
+
word-break: break-all;
|
|
557
|
+
background: var(--qiu-fill-color-light, #f5f7fa);
|
|
558
|
+
border-radius: 4px;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.qiu-upload__card-list {
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-wrap: wrap;
|
|
564
|
+
gap: 10px;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.qiu-upload__card,
|
|
568
|
+
.qiu-upload__card-trigger {
|
|
569
|
+
position: relative;
|
|
570
|
+
box-sizing: border-box;
|
|
571
|
+
display: flex;
|
|
572
|
+
flex-direction: column;
|
|
573
|
+
align-items: center;
|
|
574
|
+
justify-content: center;
|
|
575
|
+
overflow: hidden;
|
|
576
|
+
background: var(--qiu-fill-color-blank, #fff);
|
|
577
|
+
border: 1px dashed var(--qiu-border-color, #dcdfe6);
|
|
578
|
+
border-radius: 8px;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.qiu-upload__card-trigger {
|
|
582
|
+
color: var(--qiu-text-color-secondary, #909399);
|
|
583
|
+
cursor: pointer;
|
|
584
|
+
gap: 4px;
|
|
585
|
+
|
|
586
|
+
&:hover {
|
|
587
|
+
color: var(--qiu-color-primary, #0f766e);
|
|
588
|
+
border-color: var(--qiu-color-primary, #0f766e);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.qiu-upload__card-img {
|
|
593
|
+
width: 100%;
|
|
594
|
+
height: 100%;
|
|
595
|
+
object-fit: cover;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.qiu-upload__card-name {
|
|
599
|
+
padding: 6px;
|
|
600
|
+
overflow: hidden;
|
|
601
|
+
font-size: 12px;
|
|
602
|
+
text-align: center;
|
|
603
|
+
text-overflow: ellipsis;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.qiu-upload__card-progress {
|
|
607
|
+
position: absolute;
|
|
608
|
+
inset: 0;
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
justify-content: center;
|
|
612
|
+
color: #fff;
|
|
613
|
+
background: rgba(0, 0, 0, 0.45);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.qiu-upload__card-remove {
|
|
617
|
+
position: absolute;
|
|
618
|
+
top: 2px;
|
|
619
|
+
right: 4px;
|
|
620
|
+
z-index: 1;
|
|
621
|
+
padding: 0 4px;
|
|
622
|
+
color: #fff;
|
|
623
|
+
cursor: pointer;
|
|
624
|
+
background: rgba(0, 0, 0, 0.45);
|
|
625
|
+
border: 0;
|
|
626
|
+
border-radius: 4px;
|
|
627
|
+
}
|
|
628
|
+
</style>
|