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,488 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="qiu-icon-picker">
|
|
3
|
-
<div class="qiu-icon-picker__trigger" @click="openDialog">
|
|
4
|
-
<span class="qiu-icon-picker__preview-wrap" :class="{ 'is-on': !!modelValue }">
|
|
5
|
-
<qiu-icon v-if="modelValue" :icon="modelValue" class="qiu-icon-picker__preview" />
|
|
6
|
-
<span v-else class="qiu-icon-picker__placeholder">{{ translate('选择图标') }}</span>
|
|
7
|
-
</span>
|
|
8
|
-
<qiu-input
|
|
9
|
-
:model-value="modelValue"
|
|
10
|
-
class="qiu-icon-picker__input"
|
|
11
|
-
:placeholder="placeholder"
|
|
12
|
-
clearable
|
|
13
|
-
@update:model-value="onInput"
|
|
14
|
-
@focus="openDialog"
|
|
15
|
-
@click.stop="openDialog"
|
|
16
|
-
/>
|
|
17
|
-
<qiu-button size="small" @click.stop="openDialog">
|
|
18
|
-
<qiu-icon icon="apps-2-line" />
|
|
19
|
-
</qiu-button>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<qiu-dialog
|
|
23
|
-
v-model="visible"
|
|
24
|
-
:title="translate('选择图标')"
|
|
25
|
-
width="920px"
|
|
26
|
-
:z-index="5300"
|
|
27
|
-
:show-minimize="false"
|
|
28
|
-
:show-fullscreen="false"
|
|
29
|
-
destroy-on-close
|
|
30
|
-
@opened="onDialogOpened"
|
|
31
|
-
>
|
|
32
|
-
<div class="qiu-icon-picker__body">
|
|
33
|
-
<qiu-loading-spinner v-if="loadingLib" class="qiu-icon-picker__loading" />
|
|
34
|
-
<aside class="qiu-icon-picker__libs">
|
|
35
|
-
<button
|
|
36
|
-
v-for="lib in libraryStats"
|
|
37
|
-
:key="lib.id"
|
|
38
|
-
type="button"
|
|
39
|
-
class="qiu-icon-picker__lib"
|
|
40
|
-
:class="{ 'is-active': activeLib === lib.id }"
|
|
41
|
-
@click="switchLib(lib.id)"
|
|
42
|
-
>
|
|
43
|
-
<strong>{{ lib.name }}</strong>
|
|
44
|
-
<span>{{ lib.count }} icons</span>
|
|
45
|
-
<em>{{ lib.license }}</em>
|
|
46
|
-
</button>
|
|
47
|
-
<p class="qiu-icon-picker__license-tip">
|
|
48
|
-
{{ translate('均为免费开源图标,可商用(按需懒加载)') }}
|
|
49
|
-
</p>
|
|
50
|
-
</aside>
|
|
51
|
-
|
|
52
|
-
<div class="qiu-icon-picker__main">
|
|
53
|
-
<qiu-input
|
|
54
|
-
v-model="keyword"
|
|
55
|
-
clearable
|
|
56
|
-
:placeholder="translate('搜索图标名')"
|
|
57
|
-
class="qiu-icon-picker__search"
|
|
58
|
-
@input="page = 1"
|
|
59
|
-
>
|
|
60
|
-
<template #prefix>
|
|
61
|
-
<qiu-icon icon="search-line" />
|
|
62
|
-
</template>
|
|
63
|
-
</qiu-input>
|
|
64
|
-
|
|
65
|
-
<div class="qiu-icon-picker__meta">
|
|
66
|
-
<span>{{ filteredIcons.length }} / {{ currentCatalog.length }}</span>
|
|
67
|
-
<span v-if="modelValue" class="qiu-icon-picker__current">
|
|
68
|
-
{{ translate('当前') }}:
|
|
69
|
-
<span class="qiu-icon-picker__current-icon">
|
|
70
|
-
<qiu-icon :icon="modelValue" />
|
|
71
|
-
</span>
|
|
72
|
-
<code>{{ modelValue }}</code>
|
|
73
|
-
</span>
|
|
74
|
-
<qiu-button v-if="modelValue" link type="danger" size="small" @click="clearIcon">
|
|
75
|
-
{{ translate('清除') }}
|
|
76
|
-
</qiu-button>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="qiu-icon-picker__grid">
|
|
80
|
-
<button
|
|
81
|
-
type="button"
|
|
82
|
-
class="qiu-icon-picker__item is-clear"
|
|
83
|
-
:title="translate('清除图标')"
|
|
84
|
-
@click="clearIcon"
|
|
85
|
-
>
|
|
86
|
-
<qiu-icon icon="delete-bin-line" />
|
|
87
|
-
<span>{{ translate('清除') }}</span>
|
|
88
|
-
</button>
|
|
89
|
-
<button
|
|
90
|
-
v-for="name in pagedIcons"
|
|
91
|
-
:key="name"
|
|
92
|
-
type="button"
|
|
93
|
-
class="qiu-icon-picker__item"
|
|
94
|
-
:class="{ 'is-active': modelValue === toValue(name) }"
|
|
95
|
-
:title="toValue(name)"
|
|
96
|
-
@click="pick(name)"
|
|
97
|
-
>
|
|
98
|
-
<qiu-icon :icon="toValue(name)" />
|
|
99
|
-
<span>{{ name }}</span>
|
|
100
|
-
</button>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<qiu-empty v-if="!loadingLib && !filteredIcons.length" :description="translate('无匹配图标')" />
|
|
104
|
-
|
|
105
|
-
<div v-if="pageCount > 1" class="qiu-icon-picker__pager">
|
|
106
|
-
<qiu-pagination
|
|
107
|
-
v-model:current-page="page"
|
|
108
|
-
background
|
|
109
|
-
layout="prev, pager, next, jumper"
|
|
110
|
-
:page-size="pageSize"
|
|
111
|
-
:total="filteredIcons.length"
|
|
112
|
-
small
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</qiu-dialog>
|
|
118
|
-
</div>
|
|
119
|
-
</template>
|
|
120
|
-
|
|
121
|
-
<script lang="ts" setup>
|
|
122
|
-
import QiuLoadingSpinner from '../QiuLoading/spinner.vue'
|
|
123
|
-
import { translate } from '../../src/i18n'
|
|
124
|
-
import { remixIconCatalog } from './icons.catalog'
|
|
125
|
-
import {
|
|
126
|
-
detectLibraryId,
|
|
127
|
-
ensureIconifyLibrary,
|
|
128
|
-
iconifyLibraries,
|
|
129
|
-
toPickerValue,
|
|
130
|
-
type IconifyLibId,
|
|
131
|
-
type IconifyLibraryDef,
|
|
132
|
-
} from './iconify.libraries'
|
|
133
|
-
|
|
134
|
-
defineOptions({
|
|
135
|
-
name: 'QiuIconPicker',
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
const props = withDefaults(
|
|
139
|
-
defineProps<{
|
|
140
|
-
modelValue?: string
|
|
141
|
-
placeholder?: string
|
|
142
|
-
}>(),
|
|
143
|
-
{
|
|
144
|
-
modelValue: '',
|
|
145
|
-
placeholder: 'home-2-line / mdi:home',
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
const emit = defineEmits<{
|
|
150
|
-
'update:modelValue': [value: string]
|
|
151
|
-
}>()
|
|
152
|
-
|
|
153
|
-
const visible = ref(false)
|
|
154
|
-
const keyword = ref('')
|
|
155
|
-
const page = ref(1)
|
|
156
|
-
const pageSize = 60
|
|
157
|
-
const activeLib = ref<IconifyLibId>('remix')
|
|
158
|
-
const loadingLib = ref(false)
|
|
159
|
-
const catalogByLib = reactive<Record<string, string[]>>({
|
|
160
|
-
remix: remixIconCatalog,
|
|
161
|
-
})
|
|
162
|
-
const countByLib = reactive<Record<string, number>>({
|
|
163
|
-
remix: remixIconCatalog.length,
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
const currentLib = computed(
|
|
167
|
-
() => iconifyLibraries.find((l) => l.id === activeLib.value) || iconifyLibraries[0]
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
const libraryStats = computed(() =>
|
|
171
|
-
iconifyLibraries.map((lib) => ({
|
|
172
|
-
...lib,
|
|
173
|
-
count: countByLib[lib.id] || (lib.localRemix ? remixIconCatalog.length : '…'),
|
|
174
|
-
}))
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
const currentCatalog = computed(() => catalogByLib[activeLib.value] || [])
|
|
178
|
-
|
|
179
|
-
const filteredIcons = computed(() => {
|
|
180
|
-
const q = keyword.value.trim().toLowerCase()
|
|
181
|
-
if (!q) return currentCatalog.value
|
|
182
|
-
return currentCatalog.value.filter((name) => name.toLowerCase().includes(q))
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
const pageCount = computed(() => Math.max(1, Math.ceil(filteredIcons.value.length / pageSize)))
|
|
186
|
-
|
|
187
|
-
const pagedIcons = computed(() => {
|
|
188
|
-
const start = (page.value - 1) * pageSize
|
|
189
|
-
return filteredIcons.value.slice(start, start + pageSize)
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
const toValue = (iconName: string) => toPickerValue(currentLib.value, iconName)
|
|
193
|
-
|
|
194
|
-
const loadLib = async (lib: IconifyLibraryDef) => {
|
|
195
|
-
if (lib.localRemix) {
|
|
196
|
-
catalogByLib.remix = remixIconCatalog
|
|
197
|
-
countByLib.remix = remixIconCatalog.length
|
|
198
|
-
return
|
|
199
|
-
}
|
|
200
|
-
if (catalogByLib[lib.id]?.length) return
|
|
201
|
-
loadingLib.value = true
|
|
202
|
-
try {
|
|
203
|
-
const names = await ensureIconifyLibrary(lib)
|
|
204
|
-
catalogByLib[lib.id] = names
|
|
205
|
-
countByLib[lib.id] = names.length
|
|
206
|
-
} finally {
|
|
207
|
-
loadingLib.value = false
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const switchLib = async (id: IconifyLibId) => {
|
|
212
|
-
activeLib.value = id
|
|
213
|
-
page.value = 1
|
|
214
|
-
keyword.value = ''
|
|
215
|
-
const lib = iconifyLibraries.find((l) => l.id === id)
|
|
216
|
-
if (lib) await loadLib(lib)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const openDialog = () => {
|
|
220
|
-
visible.value = true
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const onDialogOpened = async () => {
|
|
224
|
-
activeLib.value = detectLibraryId(props.modelValue)
|
|
225
|
-
await loadLib(currentLib.value)
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const pick = (name: string) => {
|
|
229
|
-
emit('update:modelValue', toValue(name))
|
|
230
|
-
visible.value = false
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const clearIcon = () => {
|
|
234
|
-
emit('update:modelValue', '')
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const onInput = (val: string) => {
|
|
238
|
-
emit('update:modelValue', val || '')
|
|
239
|
-
keyword.value = val?.includes(':') ? val.split(':')[1] || '' : val || ''
|
|
240
|
-
page.value = 1
|
|
241
|
-
visible.value = true
|
|
242
|
-
}
|
|
243
|
-
</script>
|
|
244
|
-
|
|
245
|
-
<style lang="scss" scoped>
|
|
246
|
-
.qiu-icon-picker {
|
|
247
|
-
width: 100%;
|
|
248
|
-
|
|
249
|
-
&__trigger {
|
|
250
|
-
display: flex;
|
|
251
|
-
gap: 8px;
|
|
252
|
-
align-items: center;
|
|
253
|
-
width: 100%;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
&__preview-wrap {
|
|
257
|
-
display: inline-flex;
|
|
258
|
-
flex-shrink: 0;
|
|
259
|
-
align-items: center;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
width: 36px;
|
|
262
|
-
height: 36px;
|
|
263
|
-
color: var(--qiu-text-color-secondary);
|
|
264
|
-
background: var(--qiu-fill-color-light);
|
|
265
|
-
border: 1px solid var(--qiu-border-color-lighter);
|
|
266
|
-
border-radius: 8px;
|
|
267
|
-
|
|
268
|
-
&.is-on {
|
|
269
|
-
color: var(--qiu-color-primary);
|
|
270
|
-
background: var(--qiu-color-primary-light-9);
|
|
271
|
-
border-color: color-mix(in srgb, var(--qiu-color-primary) 35%, transparent);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&__preview {
|
|
276
|
-
font-size: 20px;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
&__placeholder {
|
|
280
|
-
font-size: 11px;
|
|
281
|
-
color: var(--qiu-text-color-placeholder);
|
|
282
|
-
text-align: center;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
&__input {
|
|
286
|
-
flex: 1;
|
|
287
|
-
min-width: 0;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
&__body {
|
|
291
|
-
position: relative;
|
|
292
|
-
display: grid;
|
|
293
|
-
grid-template-columns: 210px minmax(0, 1fr);
|
|
294
|
-
gap: 12px;
|
|
295
|
-
height: min(48vh, 420px);
|
|
296
|
-
max-height: min(48vh, 420px);
|
|
297
|
-
min-height: 280px;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
&__loading {
|
|
301
|
-
position: absolute;
|
|
302
|
-
inset: 0;
|
|
303
|
-
z-index: 10;
|
|
304
|
-
pointer-events: auto;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
&__libs {
|
|
308
|
-
display: flex;
|
|
309
|
-
flex-direction: column;
|
|
310
|
-
gap: 6px;
|
|
311
|
-
height: 100%;
|
|
312
|
-
min-height: 0;
|
|
313
|
-
padding: 4px;
|
|
314
|
-
overflow-x: hidden;
|
|
315
|
-
overflow-y: auto;
|
|
316
|
-
background: var(--qiu-fill-color-lighter);
|
|
317
|
-
border-radius: 8px;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
&__lib {
|
|
321
|
-
display: flex;
|
|
322
|
-
flex-direction: column;
|
|
323
|
-
gap: 2px;
|
|
324
|
-
flex-shrink: 0;
|
|
325
|
-
align-items: flex-start;
|
|
326
|
-
padding: 10px 12px;
|
|
327
|
-
text-align: left;
|
|
328
|
-
cursor: pointer;
|
|
329
|
-
background: transparent;
|
|
330
|
-
border: 1px solid transparent;
|
|
331
|
-
border-radius: 8px;
|
|
332
|
-
|
|
333
|
-
strong {
|
|
334
|
-
font-size: 13px;
|
|
335
|
-
color: var(--qiu-text-color-primary);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
span {
|
|
339
|
-
font-size: 12px;
|
|
340
|
-
color: var(--qiu-text-color-secondary);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
em {
|
|
344
|
-
font-size: 11px;
|
|
345
|
-
font-style: normal;
|
|
346
|
-
color: var(--qiu-text-color-placeholder);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
&:hover,
|
|
350
|
-
&.is-active {
|
|
351
|
-
background: var(--qiu-bg-color);
|
|
352
|
-
border-color: var(--qiu-color-primary-light-5);
|
|
353
|
-
box-shadow: 0 1px 4px rgb(0 0 0 / 6%);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
&.is-active strong {
|
|
357
|
-
color: var(--qiu-color-primary);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
&__license-tip {
|
|
362
|
-
flex-shrink: 0;
|
|
363
|
-
margin: 8px 4px 0;
|
|
364
|
-
font-size: 11px;
|
|
365
|
-
line-height: 1.4;
|
|
366
|
-
color: var(--qiu-text-color-placeholder);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
&__main {
|
|
370
|
-
display: flex;
|
|
371
|
-
flex-direction: column;
|
|
372
|
-
height: 100%;
|
|
373
|
-
min-width: 0;
|
|
374
|
-
min-height: 0;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
&__search {
|
|
378
|
-
flex-shrink: 0;
|
|
379
|
-
margin-bottom: 8px;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
&__meta {
|
|
383
|
-
display: flex;
|
|
384
|
-
flex-shrink: 0;
|
|
385
|
-
flex-wrap: wrap;
|
|
386
|
-
gap: 12px;
|
|
387
|
-
align-items: center;
|
|
388
|
-
margin-bottom: 8px;
|
|
389
|
-
font-size: 12px;
|
|
390
|
-
color: var(--qiu-text-color-secondary);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
&__current {
|
|
394
|
-
display: inline-flex;
|
|
395
|
-
gap: 6px;
|
|
396
|
-
align-items: center;
|
|
397
|
-
|
|
398
|
-
code {
|
|
399
|
-
font-size: 12px;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
&__current-icon {
|
|
404
|
-
display: inline-flex;
|
|
405
|
-
align-items: center;
|
|
406
|
-
justify-content: center;
|
|
407
|
-
width: 26px;
|
|
408
|
-
height: 26px;
|
|
409
|
-
color: var(--qiu-color-primary);
|
|
410
|
-
background: var(--qiu-color-primary-light-9);
|
|
411
|
-
border-radius: 6px;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
&__grid {
|
|
415
|
-
display: grid;
|
|
416
|
-
flex: 1 1 auto;
|
|
417
|
-
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
|
|
418
|
-
gap: 8px;
|
|
419
|
-
align-content: start;
|
|
420
|
-
min-height: 0;
|
|
421
|
-
max-height: none;
|
|
422
|
-
padding-right: 4px;
|
|
423
|
-
overflow: auto;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
&__item {
|
|
427
|
-
display: flex;
|
|
428
|
-
flex-direction: column;
|
|
429
|
-
gap: 6px;
|
|
430
|
-
align-items: center;
|
|
431
|
-
padding: 10px 6px;
|
|
432
|
-
font-size: 11px;
|
|
433
|
-
line-height: 1.2;
|
|
434
|
-
color: var(--qiu-text-color-regular);
|
|
435
|
-
cursor: pointer;
|
|
436
|
-
background: var(--qiu-fill-color-blank);
|
|
437
|
-
border: 1px solid var(--qiu-border-color-lighter);
|
|
438
|
-
border-radius: 8px;
|
|
439
|
-
transition: border-color 0.15s, background 0.15s, color 0.15s;
|
|
440
|
-
|
|
441
|
-
:deep(.qiu-icon) {
|
|
442
|
-
font-size: 22px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
span {
|
|
446
|
-
width: 100%;
|
|
447
|
-
overflow: hidden;
|
|
448
|
-
text-align: center;
|
|
449
|
-
text-overflow: ellipsis;
|
|
450
|
-
white-space: nowrap;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
&:hover,
|
|
454
|
-
&.is-active {
|
|
455
|
-
color: var(--qiu-color-primary);
|
|
456
|
-
background: var(--qiu-color-primary-light-9);
|
|
457
|
-
border-color: var(--qiu-color-primary);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
&.is-clear {
|
|
461
|
-
color: var(--qiu-color-danger);
|
|
462
|
-
border-style: dashed;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
&__pager {
|
|
467
|
-
display: flex;
|
|
468
|
-
flex-shrink: 0;
|
|
469
|
-
justify-content: center;
|
|
470
|
-
margin-top: 12px;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
@media (width <= 720px) {
|
|
475
|
-
.qiu-icon-picker__body {
|
|
476
|
-
grid-template-columns: 1fr;
|
|
477
|
-
height: min(60vh, 480px);
|
|
478
|
-
max-height: min(60vh, 480px);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.qiu-icon-picker__libs {
|
|
482
|
-
flex-direction: row;
|
|
483
|
-
height: auto;
|
|
484
|
-
max-height: 120px;
|
|
485
|
-
overflow: auto;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
</style>
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="qiu-image"
|
|
4
|
-
:class="{ 'is-preview': previewable }"
|
|
5
|
-
@click="onPreview"
|
|
6
|
-
>
|
|
7
|
-
<img
|
|
8
|
-
class="qiu-image__inner"
|
|
9
|
-
:src="src"
|
|
10
|
-
:alt="alt"
|
|
11
|
-
:loading="lazy ? 'lazy' : undefined"
|
|
12
|
-
:style="{ objectFit: fit }"
|
|
13
|
-
/>
|
|
14
|
-
<div v-if="previewable" class="qiu-image__mask">
|
|
15
|
-
<qiu-icon icon="zoom-in-line" />
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<Teleport to="body">
|
|
19
|
-
<Transition name="qiu-image-fade">
|
|
20
|
-
<div
|
|
21
|
-
v-if="previewVisible"
|
|
22
|
-
class="qiu-image__viewer"
|
|
23
|
-
@click.self="closePreview"
|
|
24
|
-
>
|
|
25
|
-
<button type="button" class="qiu-image__close" aria-label="关闭" @click="closePreview">
|
|
26
|
-
<qiu-icon icon="close-line" />
|
|
27
|
-
</button>
|
|
28
|
-
<img
|
|
29
|
-
class="qiu-image__preview"
|
|
30
|
-
:src="currentPreviewSrc"
|
|
31
|
-
:alt="alt"
|
|
32
|
-
@click.stop
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
</Transition>
|
|
36
|
-
</Teleport>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script lang="ts" setup>
|
|
41
|
-
defineOptions({ name: 'QiuImage' })
|
|
42
|
-
|
|
43
|
-
const props = withDefaults(
|
|
44
|
-
defineProps<{
|
|
45
|
-
src?: string
|
|
46
|
-
fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
|
|
47
|
-
alt?: string
|
|
48
|
-
lazy?: boolean
|
|
49
|
-
previewSrcList?: string[]
|
|
50
|
-
hideOnClickModal?: boolean
|
|
51
|
-
}>(),
|
|
52
|
-
{
|
|
53
|
-
src: '',
|
|
54
|
-
fit: 'fill',
|
|
55
|
-
alt: '',
|
|
56
|
-
lazy: false,
|
|
57
|
-
previewSrcList: () => [],
|
|
58
|
-
hideOnClickModal: true,
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
const previewVisible = ref(false)
|
|
63
|
-
|
|
64
|
-
const previewable = computed(() => props.previewSrcList.length > 0 || !!props.src)
|
|
65
|
-
|
|
66
|
-
const currentPreviewSrc = computed(() => {
|
|
67
|
-
if (props.previewSrcList.length > 0) return props.previewSrcList[0]
|
|
68
|
-
return props.src
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const onPreview = () => {
|
|
72
|
-
if (!previewable.value) return
|
|
73
|
-
previewVisible.value = true
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const closePreview = () => {
|
|
77
|
-
if (!props.hideOnClickModal) return
|
|
78
|
-
previewVisible.value = false
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const onKeydown = (e: KeyboardEvent) => {
|
|
82
|
-
if (e.key === 'Escape' && previewVisible.value) {
|
|
83
|
-
previewVisible.value = false
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
onMounted(() => window.addEventListener('keydown', onKeydown))
|
|
88
|
-
onUnmounted(() => window.removeEventListener('keydown', onKeydown))
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<style lang="scss" scoped>
|
|
92
|
-
.qiu-image {
|
|
93
|
-
position: relative;
|
|
94
|
-
display: inline-block;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
line-height: 0;
|
|
97
|
-
background: var(--qiu-fill-color-light, var(--qiu-fill-color-light, #f5f7fa));
|
|
98
|
-
border-radius: var(--qiu-border-radius, var(--qiu-border-radius-base, 4px));
|
|
99
|
-
|
|
100
|
-
&.is-preview {
|
|
101
|
-
cursor: zoom-in;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.qiu-image__inner {
|
|
106
|
-
display: block;
|
|
107
|
-
width: 100%;
|
|
108
|
-
height: 100%;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.qiu-image__mask {
|
|
112
|
-
position: absolute;
|
|
113
|
-
inset: 0;
|
|
114
|
-
display: flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
font-size: 24px;
|
|
118
|
-
color: #fff;
|
|
119
|
-
background: rgb(0 0 0 / 35%);
|
|
120
|
-
opacity: 0;
|
|
121
|
-
transition: opacity 0.2s ease;
|
|
122
|
-
|
|
123
|
-
.qiu-image:hover & {
|
|
124
|
-
opacity: 1;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.qiu-image__viewer {
|
|
129
|
-
position: fixed;
|
|
130
|
-
inset: 0;
|
|
131
|
-
z-index: 3000;
|
|
132
|
-
display: flex;
|
|
133
|
-
align-items: center;
|
|
134
|
-
justify-content: center;
|
|
135
|
-
background: rgb(0 0 0 / 75%);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.qiu-image__preview {
|
|
139
|
-
max-width: 90vw;
|
|
140
|
-
max-height: 90vh;
|
|
141
|
-
object-fit: contain;
|
|
142
|
-
border-radius: 4px;
|
|
143
|
-
box-shadow: 0 8px 32px rgb(0 0 0 / 40%);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.qiu-image__close {
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 24px;
|
|
149
|
-
right: 24px;
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
width: 40px;
|
|
154
|
-
height: 40px;
|
|
155
|
-
font-size: 20px;
|
|
156
|
-
color: #fff;
|
|
157
|
-
cursor: pointer;
|
|
158
|
-
background: rgb(255 255 255 / 15%);
|
|
159
|
-
border: 0;
|
|
160
|
-
border-radius: 50%;
|
|
161
|
-
transition: background 0.2s ease;
|
|
162
|
-
|
|
163
|
-
&:hover {
|
|
164
|
-
background: rgb(255 255 255 / 25%);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.qiu-image-fade-enter-active,
|
|
169
|
-
.qiu-image-fade-leave-active {
|
|
170
|
-
transition: opacity 0.25s ease;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.qiu-image-fade-enter-from,
|
|
174
|
-
.qiu-image-fade-leave-to {
|
|
175
|
-
opacity: 0;
|
|
176
|
-
}
|
|
177
|
-
</style>
|