foucui 1.0.1 → 2.0.0
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 +8 -8
- package/README.publish.md +19 -0
- package/dist/components/{QiuAnchor → FouAnchor}/context.d.ts +4 -4
- package/dist/components/{QiuBadge → FouBadge}/composables/useTableHostHeight.d.ts +1 -1
- package/dist/components/FouBadge/index.d.ts +18 -0
- package/dist/components/{QiuBadge → FouBadge}/shared/BadgeTemplateRenderer.vue.d.ts +1 -1
- package/dist/components/{QiuBadge → FouBadge}/shared/badgeTemplate.d.ts +1 -1
- package/dist/components/{QiuButton → FouButton}/index.vue.d.ts +4 -4
- package/dist/components/{QiuCanvasKit/QiuCanvasEditor.vue.d.ts → FouCanvasKit/FouCanvasEditor.vue.d.ts} +4 -2
- package/dist/components/{QiuCanvasKit → FouCanvasKit}/components/DataModulesPanel.vue.d.ts +1 -0
- package/dist/components/{QiuCanvasKit → FouCanvasKit}/index.d.ts +4 -4
- package/dist/components/{QiuCanvasKit → FouCanvasKit}/types.d.ts +1 -1
- package/dist/components/{QiuCarousel → FouCarousel}/context.d.ts +4 -4
- package/dist/components/{QiuCascader → FouCascader}/types.d.ts +7 -7
- package/dist/components/{QiuCheckbox → FouCheckbox}/types.d.ts +1 -1
- package/dist/components/{QiuCollapse → FouCollapse}/context.d.ts +2 -2
- package/dist/components/{QiuDescriptions → FouDescriptions}/context.d.ts +4 -4
- package/dist/components/{QiuDropdown → FouDropdown}/context.d.ts +2 -2
- package/dist/components/{QiuForm → FouForm}/types.d.ts +10 -10
- package/dist/components/FouLoading/index.d.ts +26 -0
- package/dist/components/{QiuLoading → FouLoading}/spinner.vue.d.ts +3 -3
- package/dist/components/{QiuLoading → FouLoading}/types.d.ts +2 -2
- package/dist/components/{QiuMenu → FouMenu}/context.d.ts +2 -2
- package/dist/components/{QiuMenuNav → FouMenuNav}/context.d.ts +2 -2
- package/dist/components/{QiuMsg/QiuMsgItem.vue.d.ts → FouMsg/FouMsgItem.vue.d.ts} +3 -3
- package/dist/components/FouMsg/index.d.ts +30 -0
- package/dist/components/{QiuMsg → FouMsg}/types.d.ts +5 -5
- package/dist/components/{QiuMsgBox → FouMsgBox}/index.d.ts +3 -3
- package/dist/components/{QiuNotification/QiuNotificationItem.vue.d.ts → FouNotification/FouNotificationItem.vue.d.ts} +3 -3
- package/dist/components/FouNotification/index.d.ts +30 -0
- package/dist/components/FouNotification/types.d.ts +12 -0
- package/dist/components/{QiuRadio → FouRadio}/types.d.ts +1 -1
- package/dist/components/FouRow/types.d.ts +4 -0
- package/dist/components/{QiuSelect → FouSelect}/index.vue.d.ts +3 -3
- package/dist/components/{QiuSelect → FouSelect}/types.d.ts +3 -3
- package/dist/components/{QiuStep → FouStep}/index.vue.d.ts +1 -1
- package/dist/components/{QiuSteps → FouSteps}/context.d.ts +5 -5
- package/dist/components/{QiuTabBar → FouTabBar}/index.vue.d.ts +3 -3
- package/dist/components/{QiuTabBar → FouTabBar}/types.d.ts +5 -5
- package/dist/components/{QiuTable → FouTable}/export.d.ts +5 -5
- package/dist/components/FouTable/index.d.ts +3 -0
- package/dist/components/{QiuTable → FouTable}/index.vue.d.ts +60 -60
- package/dist/components/FouTable/registry.d.ts +39 -0
- package/dist/components/{QiuTable → FouTable}/types.d.ts +60 -60
- package/dist/components/{QiuTable → FouTable}/useArea.d.ts +10 -10
- package/dist/components/{QiuTable → FouTable}/useColumns.d.ts +5 -5
- package/dist/components/FouTable/useEdit.d.ts +36 -0
- package/dist/components/{QiuTable → FouTable}/useHistory.d.ts +5 -5
- package/dist/components/{QiuTable → FouTable}/useMerge.d.ts +6 -6
- package/dist/components/{QiuTable → FouTable}/useScrollSync.d.ts +1 -1
- package/dist/components/{QiuTable → FouTable}/utils.d.ts +17 -17
- package/dist/components/FouTree/types.d.ts +13 -0
- package/dist/components/{QiuUpload → FouUpload}/index.vue.d.ts +17 -17
- package/dist/foucui.css +1 -1
- package/dist/foucui.js +10749 -10646
- package/dist/foucui.umd.cjs +40 -40
- package/dist/index.d.ts +43 -43
- package/dist/src/bridge/@/config/index.d.ts +1 -1
- package/dist/src/bridge/@fou/plugins/shortcuts.d.ts +2 -0
- package/package.json +27 -15
- package/components/QiuAffix/index.vue +0 -186
- package/components/QiuAlert/index.vue +0 -208
- package/components/QiuAnchor/context.ts +0 -18
- package/components/QiuAnchor/index.vue +0 -180
- package/components/QiuAnchorLink/index.vue +0 -67
- package/components/QiuApp/index.vue +0 -9
- package/components/QiuAutocomplete/index.vue +0 -408
- package/components/QiuAvatar/index.vue +0 -140
- package/components/QiuBacktop/index.vue +0 -121
- package/components/QiuBadge/api/index.ts +0 -389
- package/components/QiuBadge/components/BadgeImagePickerDialog.vue +0 -243
- package/components/QiuBadge/components/BadgeLibraryManagerDialog.vue +0 -30
- package/components/QiuBadge/components/BadgeLibraryPanel.vue +0 -182
- package/components/QiuBadge/composables/useTableHostHeight.ts +0 -53
- package/components/QiuBadge/index.ts +0 -18
- package/components/QiuBadge/shared/BadgeTemplateRenderer.vue +0 -32
- package/components/QiuBadge/shared/assetUrl.ts +0 -26
- package/components/QiuBadge/shared/badgeTemplate.ts +0 -309
- package/components/QiuBadge/utils/chinaAreaData.ts +0 -44
- package/components/QiuBadge/utils/hostRegion.ts +0 -22
- package/components/QiuBadge/utils/pca-code.json +0 -1
- package/components/QiuBadge/utils/pdfFromElement.ts +0 -348
- package/components/QiuBadge/views/BadgeLibraryView.vue +0 -32
- package/components/QiuBadge/views/BadgeManageView.vue +0 -1364
- package/components/QiuBadge/views/BadgeTemplateEditorView.vue +0 -10
- package/components/QiuBadge/views/BadgeTemplateListView.vue +0 -229
- package/components/QiuBadge/views/DeskLabelTemplateListView.vue +0 -227
- package/components/QiuBadge/views/DeskLabelView.vue +0 -683
- package/components/QiuBadgeDot/index.vue +0 -87
- package/components/QiuButton/index.vue +0 -247
- package/components/QiuButtonGroup/index.vue +0 -63
- package/components/QiuCanvasKit/QiuCanvasEditor.vue +0 -5503
- package/components/QiuCanvasKit/QiuCanvasRenderer.vue +0 -348
- package/components/QiuCanvasKit/assetUrl.ts +0 -11
- package/components/QiuCanvasKit/components/DataModulesPanel.vue +0 -352
- package/components/QiuCanvasKit/export/html.ts +0 -132
- package/components/QiuCanvasKit/export/pdf.ts +0 -48
- package/components/QiuCanvasKit/export/png.ts +0 -50
- package/components/QiuCanvasKit/index.ts +0 -20
- package/components/QiuCanvasKit/modules/badgeCompat.ts +0 -84
- package/components/QiuCanvasKit/modules/dataRegistry.ts +0 -207
- package/components/QiuCanvasKit/modules/merge.ts +0 -71
- package/components/QiuCanvasKit/presets/badge.ts +0 -67
- package/components/QiuCanvasKit/presets/banner.ts +0 -79
- package/components/QiuCanvasKit/types.ts +0 -138
- package/components/QiuCard/index.vue +0 -104
- package/components/QiuCarousel/context.ts +0 -16
- package/components/QiuCarousel/index.vue +0 -343
- package/components/QiuCarouselItem/index.vue +0 -47
- package/components/QiuCascader/index.vue +0 -879
- package/components/QiuCascader/types.ts +0 -48
- package/components/QiuCheckbox/QiuCheckboxGroup.vue +0 -78
- package/components/QiuCheckbox/index.vue +0 -231
- package/components/QiuCheckbox/types.ts +0 -8
- package/components/QiuCode/index.vue +0 -64
- package/components/QiuCol/col.scss +0 -55
- package/components/QiuCol/index.vue +0 -64
- package/components/QiuCollapse/context.ts +0 -10
- package/components/QiuCollapse/index.vue +0 -70
- package/components/QiuCollapseItem/index.vue +0 -167
- package/components/QiuColorField/index.vue +0 -296
- package/components/QiuColorPicker/README.md +0 -118
- package/components/QiuColorPicker/index.vue +0 -60
- package/components/QiuColorfulCard/index.vue +0 -101
- package/components/QiuCombobox/index.vue +0 -277
- package/components/QiuConfigProvider/index.vue +0 -31
- package/components/QiuContextMenu/index.vue +0 -209
- package/components/QiuDate/index.vue +0 -1134
- package/components/QiuDescriptions/context.ts +0 -20
- package/components/QiuDescriptions/index.vue +0 -115
- package/components/QiuDescriptionsItem/index.vue +0 -103
- package/components/QiuDialog/index.vue +0 -828
- package/components/QiuDigitalCard/index.vue +0 -159
- package/components/QiuDivider/index.vue +0 -185
- package/components/QiuDot/index.vue +0 -83
- package/components/QiuDrawer/index.vue +0 -350
- package/components/QiuDropdown/QiuDropdownItem.vue +0 -74
- package/components/QiuDropdown/QiuDropdownMenu.vue +0 -22
- package/components/QiuDropdown/context.ts +0 -9
- package/components/QiuDropdown/index.vue +0 -189
- package/components/QiuEmpty/index.vue +0 -73
- package/components/QiuForm/index.vue +0 -172
- package/components/QiuForm/types.ts +0 -39
- package/components/QiuFormItem/index.vue +0 -276
- package/components/QiuFullscreen/index.vue +0 -11
- package/components/QiuGrid/index.vue +0 -408
- package/components/QiuHoverCard/index.vue +0 -192
- package/components/QiuIcon/index.vue +0 -117
- package/components/QiuIconPicker/iconify.libraries.ts +0 -182
- package/components/QiuIconPicker/icons.catalog.ts +0 -3072
- package/components/QiuIconPicker/index.vue +0 -488
- package/components/QiuImage/index.vue +0 -177
- package/components/QiuInput/index.vue +0 -328
- package/components/QiuInputNumber/index.vue +0 -295
- package/components/QiuInputOtp/index.vue +0 -190
- package/components/QiuKbd/index.vue +0 -57
- package/components/QiuLayoutContainer/index.vue +0 -50
- package/components/QiuLinkPreview/index.vue +0 -224
- package/components/QiuLoading/index.ts +0 -176
- package/components/QiuLoading/spinner.vue +0 -820
- package/components/QiuLoading/types.ts +0 -44
- package/components/QiuMention/index.vue +0 -299
- package/components/QiuMenu/QiuMenuRoot.vue +0 -241
- package/components/QiuMenu/components/QiuMenuItem.vue +0 -340
- package/components/QiuMenu/components/QiuSubMenu.vue +0 -504
- package/components/QiuMenu/context.ts +0 -21
- package/components/QiuMenu/index.vue +0 -43
- package/components/QiuMenuNav/QiuMenuNavItem.vue +0 -100
- package/components/QiuMenuNav/QiuMenuNavSub.vue +0 -120
- package/components/QiuMenuNav/context.ts +0 -14
- package/components/QiuMenuNav/index.vue +0 -148
- package/components/QiuMsg/QiuMsgItem.vue +0 -180
- package/components/QiuMsg/index.ts +0 -158
- package/components/QiuMsg/types.ts +0 -23
- package/components/QiuMsgBox/index.ts +0 -147
- package/components/QiuNotification/QiuNotificationItem.vue +0 -168
- package/components/QiuNotification/index.ts +0 -155
- package/components/QiuNotification/types.ts +0 -14
- package/components/QiuPage/index.vue +0 -12
- package/components/QiuPageHeader/index.vue +0 -115
- package/components/QiuPageMain/index.vue +0 -78
- package/components/QiuPagination/index.vue +0 -421
- package/components/QiuPasswordStrength/index.vue +0 -101
- package/components/QiuPopconfirm/index.vue +0 -196
- package/components/QiuPopover/index.vue +0 -277
- package/components/QiuProgress/index.vue +0 -235
- package/components/QiuQrcode/index.vue +0 -302
- package/components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue +0 -13
- package/components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue +0 -37
- package/components/QiuQueryForm/components/QiuQueryFormRightPanel.vue +0 -37
- package/components/QiuQueryForm/components/QiuQueryFormTopPanel.vue +0 -13
- package/components/QiuQueryForm/index.vue +0 -117
- package/components/QiuRadio/QiuRadioGroup.vue +0 -75
- package/components/QiuRadio/index.vue +0 -191
- package/components/QiuRadio/types.ts +0 -9
- package/components/QiuRate/index.vue +0 -184
- package/components/QiuRefresh/index.vue +0 -32
- package/components/QiuResult/index.vue +0 -103
- package/components/QiuRow/index.vue +0 -60
- package/components/QiuRow/types.ts +0 -5
- package/components/QiuScrollbar/index.vue +0 -107
- package/components/QiuSearchBar/index.vue +0 -154
- package/components/QiuSegmented/index.vue +0 -120
- package/components/QiuSelect/QiuOption.vue +0 -93
- package/components/QiuSelect/index.vue +0 -452
- package/components/QiuSelect/types.ts +0 -15
- package/components/QiuSkeleton/index.vue +0 -78
- package/components/QiuSlider/index.vue +0 -266
- package/components/QiuSpace/index.vue +0 -95
- package/components/QiuSparkline/index.vue +0 -92
- package/components/QiuStatistic/index.vue +0 -4
- package/components/QiuStatistics/index.vue +0 -123
- package/components/QiuStep/index.vue +0 -220
- package/components/QiuSteps/context.ts +0 -25
- package/components/QiuSteps/index.vue +0 -84
- package/components/QiuSwitch/index.vue +0 -145
- package/components/QiuTabBar/index.vue +0 -218
- package/components/QiuTabBar/types.ts +0 -19
- package/components/QiuTabPane/index.vue +0 -82
- package/components/QiuTable/columns.ts +0 -16
- package/components/QiuTable/export.ts +0 -102
- package/components/QiuTable/index.ts +0 -24
- package/components/QiuTable/index.vue +0 -3503
- package/components/QiuTable/registry.ts +0 -75
- package/components/QiuTable/styles/table.scss +0 -1230
- package/components/QiuTable/types.ts +0 -413
- package/components/QiuTable/useArea.ts +0 -202
- package/components/QiuTable/useColumns.ts +0 -325
- package/components/QiuTable/useEdit.ts +0 -136
- package/components/QiuTable/useExtras.ts +0 -115
- package/components/QiuTable/useHistory.ts +0 -77
- package/components/QiuTable/useMerge.ts +0 -105
- package/components/QiuTable/useResize.ts +0 -86
- package/components/QiuTable/useScrollSync.ts +0 -152
- package/components/QiuTable/useVirtual.ts +0 -97
- package/components/QiuTable/utils.ts +0 -165
- package/components/QiuTableColumn/index.vue +0 -101
- package/components/QiuTag/index.vue +0 -143
- package/components/QiuText/index.vue +0 -99
- package/components/QiuTime/index.vue +0 -548
- package/components/QiuTimeAgo/index.vue +0 -103
- package/components/QiuTimeline/index.vue +0 -54
- package/components/QiuTimelineItem/index.vue +0 -140
- package/components/QiuTips/index.vue +0 -323
- package/components/QiuTooltip/index.vue +0 -237
- package/components/QiuTransfer/index.vue +0 -277
- package/components/QiuTree/QiuTreeNode.vue +0 -146
- package/components/QiuTree/index.vue +0 -143
- package/components/QiuTree/types.ts +0 -30
- package/components/QiuTreeSelect/index.vue +0 -259
- package/components/QiuTrend/index.vue +0 -92
- package/components/QiuUpload/index.vue +0 -628
- package/components/QiuUploadCrop/index.vue +0 -1267
- package/components/QiuWatermark/index.vue +0 -121
- package/components/useBodyScrollLock.ts +0 -28
- package/dist/components/QiuBadge/index.d.ts +0 -18
- package/dist/components/QiuBadge/utils/pca-code.json.d.ts +0 -3
- package/dist/components/QiuLoading/index.d.ts +0 -26
- package/dist/components/QiuMsg/index.d.ts +0 -30
- package/dist/components/QiuNotification/index.d.ts +0 -30
- package/dist/components/QiuNotification/types.d.ts +0 -12
- package/dist/components/QiuRow/types.d.ts +0 -4
- package/dist/components/QiuTable/index.d.ts +0 -3
- package/dist/components/QiuTable/registry.d.ts +0 -39
- package/dist/components/QiuTable/useEdit.d.ts +0 -36
- package/dist/components/QiuTree/types.d.ts +0 -13
- package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +0 -2
- package/plugins/qiu.ts +0 -83
- package/plugins/shortcuts.ts +0 -69
- package/src/bridge/@/api/media.ts +0 -8
- package/src/bridge/@/api/notice.ts +0 -5
- package/src/bridge/@/config/index.ts +0 -38
- package/src/bridge/@/config/media.config.ts +0 -37
- package/src/bridge/@/config/security.config.ts +0 -8
- package/src/bridge/@/i18n/index.ts +0 -6
- package/src/bridge/@/store/modules/bing.ts +0 -9
- package/src/bridge/@/store/modules/errorLog.ts +0 -9
- package/src/bridge/@/store/modules/media.ts +0 -10
- package/src/bridge/@/store/modules/routes.ts +0 -10
- package/src/bridge/@/store/modules/settings.ts +0 -9
- package/src/bridge/@/store/modules/tabs.ts +0 -9
- package/src/bridge/@/store/modules/user.ts +0 -9
- package/src/bridge/@/utils/convertToCamelCase.ts +0 -11
- package/src/bridge/@/utils/index.ts +0 -9
- package/src/bridge/@/utils/pageTitle.ts +0 -4
- package/src/bridge/@/utils/routes.ts +0 -14
- package/src/bridge/@/utils/validate.ts +0 -17
- package/src/bridge/@qiu/plugins/shortcuts.ts +0 -3
- package/src/i18n.ts +0 -8
- package/src/icons/qiu-logo.svg +0 -1
- package/styles/dark.scss +0 -194
- package/styles/normalize.css +0 -349
- package/styles/plain.scss +0 -423
- package/styles/qiu-tokens.scss +0 -40
- package/styles/qiu.scss +0 -1149
- package/styles/technology.scss +0 -452
- package/styles/var.scss +0 -382
- package/styles/variables.scss +0 -77
- /package/dist/components/{QiuAnchorLink → FouAnchorLink}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/api/index.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeImagePickerDialog.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryManagerDialog.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryPanel.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/shared/assetUrl.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/chinaAreaData.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/hostRegion.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/pdfFromElement.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeLibraryView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeManageView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeTemplateListView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelTemplateListView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelView.vue.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit/QiuCanvasRenderer.vue.d.ts → FouCanvasKit/FouCanvasRenderer.vue.d.ts} +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/assetUrl.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/html.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/pdf.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/png.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/badgeCompat.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/dataRegistry.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/merge.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/badge.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/banner.d.ts +0 -0
- /package/dist/components/{QiuCarouselItem → FouCarouselItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCheckbox/QiuCheckboxGroup.vue.d.ts → FouCheckbox/FouCheckboxGroup.vue.d.ts} +0 -0
- /package/dist/components/{QiuCheckbox → FouCheckbox}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCode → FouCode}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCollapseItem → FouCollapseItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuColorField → FouColorField}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuColorPicker → FouColorPicker}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCombobox → FouCombobox}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuContextMenu → FouContextMenu}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDescriptionsItem → FouDescriptionsItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDigitalCard → FouDigitalCard}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDropdown/QiuDropdownItem.vue.d.ts → FouDropdown/FouDropdownItem.vue.d.ts} +0 -0
- /package/dist/components/{QiuDropdown/QiuDropdownMenu.vue.d.ts → FouDropdown/FouDropdownMenu.vue.d.ts} +0 -0
- /package/dist/components/{QiuDropdown → FouDropdown}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuHoverCard → FouHoverCard}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuIcon → FouIcon}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuIconPicker → FouIconPicker}/iconify.libraries.d.ts +0 -0
- /package/dist/components/{QiuIconPicker → FouIconPicker}/icons.catalog.d.ts +0 -0
- /package/dist/components/{QiuInput → FouInput}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuInputNumber → FouInputNumber}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuInputOtp → FouInputOtp}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuKbd → FouKbd}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuLayoutContainer → FouLayoutContainer}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuLinkPreview → FouLinkPreview}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuMention → FouMention}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuMenu/QiuMenuRoot.vue.d.ts → FouMenu/FouMenuRoot.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav/QiuMenuNavItem.vue.d.ts → FouMenuNav/FouMenuNavItem.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav/QiuMenuNavSub.vue.d.ts → FouMenuNav/FouMenuNavSub.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav → FouMenuNav}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPageMain → FouPageMain}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPagination → FouPagination}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPasswordStrength → FouPasswordStrength}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuQrcode → FouQrcode}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuRadio/QiuRadioGroup.vue.d.ts → FouRadio/FouRadioGroup.vue.d.ts} +0 -0
- /package/dist/components/{QiuSearchBar → FouSearchBar}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuSelect/QiuOption.vue.d.ts → FouSelect/FouOption.vue.d.ts} +0 -0
- /package/dist/components/{QiuSparkline → FouSparkline}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuSwitch → FouSwitch}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTabPane → FouTabPane}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/columns.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useExtras.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useResize.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useVirtual.d.ts +0 -0
- /package/dist/components/{QiuTime → FouTime}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTimeAgo → FouTimeAgo}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTimelineItem → FouTimelineItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTooltip → FouTooltip}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTrend → FouTrend}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuUploadCrop → FouUploadCrop}/index.vue.d.ts +0 -0
|
@@ -1,628 +0,0 @@
|
|
|
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>
|