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
package/dist/index.d.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export declare const version = "
|
|
6
|
-
export {
|
|
7
|
-
/**
|
|
8
|
-
export {
|
|
9
|
-
export type { CanvasKitMode, CanvasKitDoc, CanvasKitElement, DataModuleDef, DataFieldDef, MergeContext, ElementLink, } from './components/
|
|
10
|
-
export {
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export {
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
export { default as
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as
|
|
33
|
-
export { default as
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as
|
|
36
|
-
export { default as
|
|
37
|
-
export { default as
|
|
38
|
-
export {
|
|
39
|
-
export type {
|
|
40
|
-
export type {
|
|
41
|
-
export type {
|
|
42
|
-
export type {
|
|
43
|
-
export declare const
|
|
44
|
-
/**
|
|
2
|
+
import { FOU_LOADING_EFFECTS, fouLoading } from './components/FouLoading';
|
|
3
|
+
import { fouMsg } from './components/FouMsg';
|
|
4
|
+
import { fouNotify } from './components/FouNotification';
|
|
5
|
+
export declare const version = "2.0.0";
|
|
6
|
+
export { fouMsg, fouNotify, fouLoading };
|
|
7
|
+
/** FouCanvasKit:证件 / 桌签 / Banner 统一画布 */
|
|
8
|
+
export { FouCanvasEditor, FouCanvasRenderer, FouCanvasDataModulesPanel, mergeTemplateText, mergeBadgeText, flattenBadgeForMerge, flattenDeskLabelForMerge, mapRowToContext, resolveDataModules, cloneBuiltinModules, createCustomModule, sampleContextFromModules, listInsertableFields, createBannerDoc, createBadgeDoc, buildCanvasHtml, downloadCanvasHtml, downloadElementPng, downloadElementPdf, BADGE_PLACEHOLDER_KEYS, BADGE_PLACEHOLDER_LABELS, BUILTIN_DATA_MODULES, LEGACY_FLAT_KEY_MAP, } from './components/FouCanvasKit';
|
|
9
|
+
export type { CanvasKitMode, CanvasKitDoc, CanvasKitElement, DataModuleDef, DataFieldDef, MergeContext, ElementLink, } from './components/FouCanvasKit';
|
|
10
|
+
export { fouConfirmPromise, fouAlert, fouConfirm } from './components/FouMsgBox';
|
|
11
|
+
export { default as FouButton } from './components/FouButton/index.vue';
|
|
12
|
+
export { default as FouConfigProvider } from './components/FouConfigProvider/index.vue';
|
|
13
|
+
export { default as FouColorPicker } from './components/FouColorPicker/index.vue';
|
|
14
|
+
export { default as FouNotification } from './components/FouNotification';
|
|
15
|
+
export { default as FouLoading } from './components/FouLoading';
|
|
16
|
+
export { FOU_LOADING_EFFECTS };
|
|
17
|
+
export { default as FouUpload } from './components/FouUpload/index.vue';
|
|
18
|
+
export { default as FouUploadCrop } from './components/FouUploadCrop/index.vue';
|
|
19
|
+
export { default as FouTabBar } from './components/FouTabBar/index.vue';
|
|
20
|
+
export { default as FouTabPane } from './components/FouTabPane/index.vue';
|
|
21
|
+
export { default as FouContextMenu } from './components/FouContextMenu/index.vue';
|
|
22
|
+
export { default as FouHoverCard } from './components/FouHoverCard/index.vue';
|
|
23
|
+
export { default as FouInputOtp } from './components/FouInputOtp/index.vue';
|
|
24
|
+
export { default as FouKbd } from './components/FouKbd/index.vue';
|
|
25
|
+
export { default as FouLayoutContainer } from './components/FouLayoutContainer/index.vue';
|
|
26
|
+
export { default as FouPageMain } from './components/FouPageMain/index.vue';
|
|
27
|
+
export { default as FouPasswordStrength } from './components/FouPasswordStrength/index.vue';
|
|
28
|
+
export { default as FouSearchBar } from './components/FouSearchBar/index.vue';
|
|
29
|
+
export { default as FouTrend } from './components/FouTrend/index.vue';
|
|
30
|
+
export { default as FouCode } from './components/FouCode/index.vue';
|
|
31
|
+
export { default as FouCombobox } from './components/FouCombobox/index.vue';
|
|
32
|
+
export { default as FouDigitalCard } from './components/FouDigitalCard/index.vue';
|
|
33
|
+
export { default as FouLinkPreview } from './components/FouLinkPreview/index.vue';
|
|
34
|
+
export { default as FouMention } from './components/FouMention/index.vue';
|
|
35
|
+
export { default as FouQrcode } from './components/FouQrcode/index.vue';
|
|
36
|
+
export { default as FouSparkline } from './components/FouSparkline/index.vue';
|
|
37
|
+
export { default as FouTimeAgo } from './components/FouTimeAgo/index.vue';
|
|
38
|
+
export { fouApp } from './plugins/fou';
|
|
39
|
+
export type { FouMsgOptions, FouMsgPosition, FouMsgType, FouMsgFn } from './components/FouMsg';
|
|
40
|
+
export type { FouNotifyOptions } from './components/FouNotification';
|
|
41
|
+
export type { FouConfigProviderContext } from './components/FouConfigProvider/index.vue';
|
|
42
|
+
export type { FouFormRules, FouFormRule, FouFormItemContext, FouFormContext } from './components/FouForm/types';
|
|
43
|
+
export declare const setupFou: (app: App<Element>) => void;
|
|
44
|
+
/** setupFou 别名(包名 foucui;兼容旧名 qiuye) */
|
|
45
45
|
export declare const setupQiuye: (app: App<Element>) => void;
|
|
46
46
|
export declare const setupFoucui: (app: App<Element>) => void;
|
|
@@ -4,7 +4,7 @@ export declare const uniqueOpened = true;
|
|
|
4
4
|
export declare const openFirstMenu = false;
|
|
5
5
|
export declare const keepAliveMaxNum = 99;
|
|
6
6
|
export declare const color: string[];
|
|
7
|
-
export declare const title = "
|
|
7
|
+
export declare const title = "fou-ui";
|
|
8
8
|
export declare const logo = "";
|
|
9
9
|
export declare const tokenName = "token";
|
|
10
10
|
export declare const tokenTableName = "token";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foucui",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "FouCui Vue3
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "FouCui Vue3 组件库(组件前缀 Fou/fou-;含 FouCanvasKit)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/foucui.umd.cjs",
|
|
7
7
|
"module": "./dist/foucui.js",
|
|
@@ -13,23 +13,17 @@
|
|
|
13
13
|
"require": "./dist/foucui.umd.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./dist/foucui.css": "./dist/foucui.css",
|
|
16
|
+
"./dist/fou.css": "./dist/foucui.css",
|
|
16
17
|
"./dist/qiuye.css": "./dist/foucui.css",
|
|
18
|
+
"./dist/fouui-vue.css": "./dist/foucui.css",
|
|
17
19
|
"./dist/qiuui-vue.css": "./dist/foucui.css",
|
|
18
|
-
"./
|
|
19
|
-
"./components/*": "./components/*",
|
|
20
|
-
"./plugins/*": "./plugins/*"
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"dist"
|
|
24
|
-
"styles",
|
|
25
|
-
"components",
|
|
26
|
-
"plugins",
|
|
27
|
-
"src"
|
|
23
|
+
"dist"
|
|
28
24
|
],
|
|
29
25
|
"sideEffects": [
|
|
30
|
-
"**/*.
|
|
31
|
-
"**/*.css",
|
|
32
|
-
"virtual:svg-icons-register"
|
|
26
|
+
"**/*.css"
|
|
33
27
|
],
|
|
34
28
|
"scripts": {
|
|
35
29
|
"build": "vite build",
|
|
@@ -41,6 +35,19 @@
|
|
|
41
35
|
"vue-router": ">=4.0.0"
|
|
42
36
|
},
|
|
43
37
|
"dependencies": {
|
|
38
|
+
"@iconify-json/ant-design": "^1.2.5",
|
|
39
|
+
"@iconify-json/bi": "^1.2.2",
|
|
40
|
+
"@iconify-json/carbon": "^1.2.8",
|
|
41
|
+
"@iconify-json/ep": "^1.2.2",
|
|
42
|
+
"@iconify-json/flagpack": "^1.2.1",
|
|
43
|
+
"@iconify-json/icon-park": "^1.2.2",
|
|
44
|
+
"@iconify-json/icon-park-outline": "^1.2.2",
|
|
45
|
+
"@iconify-json/logos": "^1.2.4",
|
|
46
|
+
"@iconify-json/lucide": "^1.2.45",
|
|
47
|
+
"@iconify-json/mdi": "^1.2.3",
|
|
48
|
+
"@iconify-json/ph": "^1.2.2",
|
|
49
|
+
"@iconify-json/ri": "^1.2.5",
|
|
50
|
+
"@iconify-json/tabler": "^1.2.17",
|
|
44
51
|
"@iconify/vue": "^4.1.2",
|
|
45
52
|
"@vueuse/head": "^2.0.0",
|
|
46
53
|
"axios": "^1.6.0",
|
|
@@ -71,13 +78,18 @@
|
|
|
71
78
|
"vue": "^3.4.0",
|
|
72
79
|
"vue-router": "^4.3.0"
|
|
73
80
|
},
|
|
81
|
+
"author": "qiuye <yjk150@qq.com>",
|
|
74
82
|
"license": "MIT",
|
|
75
83
|
"keywords": [
|
|
76
84
|
"vue3",
|
|
77
85
|
"foucui",
|
|
78
86
|
"qiuye",
|
|
79
|
-
"
|
|
87
|
+
"fouui",
|
|
80
88
|
"canvas",
|
|
81
89
|
"badge"
|
|
82
|
-
]
|
|
90
|
+
],
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public",
|
|
93
|
+
"registry": "https://registry.npmjs.org/"
|
|
94
|
+
}
|
|
83
95
|
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="rootRef" class="qiu-affix">
|
|
3
|
-
<div
|
|
4
|
-
v-if="fixed && !useSticky"
|
|
5
|
-
class="qiu-affix__placeholder"
|
|
6
|
-
:style="{ height: `${placeholderHeight}px` }"
|
|
7
|
-
/>
|
|
8
|
-
<div
|
|
9
|
-
ref="affixRef"
|
|
10
|
-
class="qiu-affix__content"
|
|
11
|
-
:class="{ 'is-fixed': fixed && !useSticky, 'is-sticky': useSticky }"
|
|
12
|
-
:style="contentStyle"
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script lang="ts" setup>
|
|
20
|
-
defineOptions({ name: 'QiuAffix' })
|
|
21
|
-
|
|
22
|
-
const props = withDefaults(
|
|
23
|
-
defineProps<{
|
|
24
|
-
offset?: number
|
|
25
|
-
position?: 'top' | 'bottom'
|
|
26
|
-
zIndex?: number
|
|
27
|
-
/** 滚动容器选择器;指定后优先用 sticky(适合 overflow 容器) */
|
|
28
|
-
target?: string
|
|
29
|
-
}>(),
|
|
30
|
-
{
|
|
31
|
-
offset: 0,
|
|
32
|
-
position: 'top',
|
|
33
|
-
zIndex: 100,
|
|
34
|
-
target: '',
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
const emit = defineEmits<{
|
|
39
|
-
change: [fixed: boolean]
|
|
40
|
-
scroll: [payload: { scrollTop: number; fixed: boolean }]
|
|
41
|
-
}>()
|
|
42
|
-
|
|
43
|
-
const rootRef = ref<HTMLElement | null>(null)
|
|
44
|
-
const affixRef = ref<HTMLElement | null>(null)
|
|
45
|
-
const fixed = ref(false)
|
|
46
|
-
const placeholderHeight = ref(0)
|
|
47
|
-
|
|
48
|
-
/** 有 target 时用 sticky,天然适配 overflow 滚动容器 */
|
|
49
|
-
const useSticky = computed(() => !!props.target)
|
|
50
|
-
|
|
51
|
-
const getScrollContainer = (): HTMLElement | Window => {
|
|
52
|
-
if (!props.target) return window
|
|
53
|
-
const el = document.querySelector(props.target)
|
|
54
|
-
return (el as HTMLElement) || window
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const update = () => {
|
|
58
|
-
if (useSticky.value) return
|
|
59
|
-
|
|
60
|
-
const root = rootRef.value
|
|
61
|
-
const affix = affixRef.value
|
|
62
|
-
if (!root || !affix) return
|
|
63
|
-
|
|
64
|
-
const container = getScrollContainer()
|
|
65
|
-
const rootRect = root.getBoundingClientRect()
|
|
66
|
-
placeholderHeight.value = affix.offsetHeight
|
|
67
|
-
|
|
68
|
-
let next = false
|
|
69
|
-
if (props.position === 'top') {
|
|
70
|
-
// 仅判断是否滚过阈值;滚回时自动解除(勿再加与之矛盾的 bottom 条件)
|
|
71
|
-
if (container === window) {
|
|
72
|
-
next = rootRect.top <= props.offset
|
|
73
|
-
} else {
|
|
74
|
-
const cTop = (container as HTMLElement).getBoundingClientRect().top
|
|
75
|
-
next = rootRect.top <= cTop + props.offset
|
|
76
|
-
}
|
|
77
|
-
} else if (container === window) {
|
|
78
|
-
next = rootRect.bottom >= window.innerHeight - props.offset
|
|
79
|
-
} else {
|
|
80
|
-
const cBottom = (container as HTMLElement).getBoundingClientRect().bottom
|
|
81
|
-
next = rootRect.bottom >= cBottom - props.offset
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (next !== fixed.value) {
|
|
85
|
-
fixed.value = next
|
|
86
|
-
emit('change', next)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const scrollTop =
|
|
90
|
-
container === window
|
|
91
|
-
? window.scrollY || document.documentElement.scrollTop
|
|
92
|
-
: (container as HTMLElement).scrollTop
|
|
93
|
-
emit('scroll', { scrollTop, fixed: fixed.value })
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const contentStyle = computed(() => {
|
|
97
|
-
if (useSticky.value) {
|
|
98
|
-
return {
|
|
99
|
-
position: 'sticky',
|
|
100
|
-
zIndex: String(props.zIndex),
|
|
101
|
-
...(props.position === 'top'
|
|
102
|
-
? { top: `${props.offset}px` }
|
|
103
|
-
: { bottom: `${props.offset}px` }),
|
|
104
|
-
} as Record<string, string>
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (!fixed.value) return undefined
|
|
108
|
-
|
|
109
|
-
const container = getScrollContainer()
|
|
110
|
-
const style: Record<string, string> = {
|
|
111
|
-
position: 'fixed',
|
|
112
|
-
zIndex: String(props.zIndex),
|
|
113
|
-
width: `${rootRef.value?.offsetWidth ?? 0}px`,
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (props.position === 'top') {
|
|
117
|
-
const top =
|
|
118
|
-
container === window
|
|
119
|
-
? props.offset
|
|
120
|
-
: (container as HTMLElement).getBoundingClientRect().top + props.offset
|
|
121
|
-
style.top = `${top}px`
|
|
122
|
-
} else {
|
|
123
|
-
const bottom =
|
|
124
|
-
container === window
|
|
125
|
-
? props.offset
|
|
126
|
-
: window.innerHeight -
|
|
127
|
-
(container as HTMLElement).getBoundingClientRect().bottom +
|
|
128
|
-
props.offset
|
|
129
|
-
style.bottom = `${bottom}px`
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (container !== window) {
|
|
133
|
-
const rect = (container as HTMLElement).getBoundingClientRect()
|
|
134
|
-
style.left = `${rect.left}px`
|
|
135
|
-
style.width = `${rect.width}px`
|
|
136
|
-
} else if (rootRef.value) {
|
|
137
|
-
style.left = `${rootRef.value.getBoundingClientRect().left}px`
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return style
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
let containerEl: HTMLElement | Window = window
|
|
144
|
-
|
|
145
|
-
const onScroll = () => update()
|
|
146
|
-
const onResize = () => update()
|
|
147
|
-
|
|
148
|
-
const bind = () => {
|
|
149
|
-
containerEl.removeEventListener('scroll', onScroll)
|
|
150
|
-
window.removeEventListener('resize', onResize)
|
|
151
|
-
if (useSticky.value) return
|
|
152
|
-
containerEl = getScrollContainer()
|
|
153
|
-
containerEl.addEventListener('scroll', onScroll, { passive: true })
|
|
154
|
-
window.addEventListener('resize', onResize, { passive: true })
|
|
155
|
-
update()
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
onMounted(() => {
|
|
159
|
-
nextTick(bind)
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
onBeforeUnmount(() => {
|
|
163
|
-
containerEl.removeEventListener('scroll', onScroll)
|
|
164
|
-
window.removeEventListener('resize', onResize)
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
watch(
|
|
168
|
-
() => [props.target, props.offset, props.position],
|
|
169
|
-
() => nextTick(bind)
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
defineExpose({ update })
|
|
173
|
-
</script>
|
|
174
|
-
|
|
175
|
-
<style lang="scss" scoped>
|
|
176
|
-
.qiu-affix {
|
|
177
|
-
&__content {
|
|
178
|
-
box-sizing: border-box;
|
|
179
|
-
|
|
180
|
-
&.is-fixed,
|
|
181
|
-
&.is-sticky {
|
|
182
|
-
z-index: 10;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
</style>
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-show="visible"
|
|
4
|
-
class="qiu-alert"
|
|
5
|
-
:class="[
|
|
6
|
-
`qiu-alert--${normalizedType}`,
|
|
7
|
-
`qiu-alert--${effect}`,
|
|
8
|
-
{ 'is-center': center },
|
|
9
|
-
]"
|
|
10
|
-
role="alert"
|
|
11
|
-
v-bind="$attrs"
|
|
12
|
-
>
|
|
13
|
-
<qiu-icon v-if="showIcon" class="qiu-alert__icon" :icon="typeIcon" />
|
|
14
|
-
<div class="qiu-alert__content">
|
|
15
|
-
<div v-if="title || $slots.title" class="qiu-alert__title">
|
|
16
|
-
<slot name="title">{{ title }}</slot>
|
|
17
|
-
</div>
|
|
18
|
-
<div v-if="$slots.default || description" class="qiu-alert__description">
|
|
19
|
-
<slot>{{ description }}</slot>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<button
|
|
23
|
-
v-if="closable"
|
|
24
|
-
type="button"
|
|
25
|
-
class="qiu-alert__close"
|
|
26
|
-
:aria-label="closeText || 'Close'"
|
|
27
|
-
@click="handleClose"
|
|
28
|
-
>
|
|
29
|
-
<span v-if="closeText">{{ closeText }}</span>
|
|
30
|
-
<qiu-icon v-else icon="close-line" />
|
|
31
|
-
</button>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script lang="ts" setup>
|
|
36
|
-
defineOptions({
|
|
37
|
-
name: 'QiuAlert',
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const props = defineProps({
|
|
41
|
-
title: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: '',
|
|
44
|
-
},
|
|
45
|
-
description: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: '',
|
|
48
|
-
},
|
|
49
|
-
type: {
|
|
50
|
-
type: String as () => 'success' | 'warning' | 'info' | 'error' | 'danger',
|
|
51
|
-
default: 'info',
|
|
52
|
-
},
|
|
53
|
-
closable: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
closeText: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: '',
|
|
60
|
-
},
|
|
61
|
-
showIcon: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false,
|
|
64
|
-
},
|
|
65
|
-
center: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
effect: {
|
|
70
|
-
type: String as () => 'light' | 'dark',
|
|
71
|
-
default: 'light',
|
|
72
|
-
},
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
const emit = defineEmits<{
|
|
76
|
-
close: []
|
|
77
|
-
}>()
|
|
78
|
-
|
|
79
|
-
const visible = ref(true)
|
|
80
|
-
|
|
81
|
-
const normalizedType = computed(() => (props.type === 'danger' ? 'error' : props.type))
|
|
82
|
-
|
|
83
|
-
const typeIcon = computed(() => {
|
|
84
|
-
const map: Record<string, string> = {
|
|
85
|
-
success: 'checkbox-circle-line',
|
|
86
|
-
warning: 'error-warning-line',
|
|
87
|
-
info: 'information-line',
|
|
88
|
-
error: 'close-circle-line',
|
|
89
|
-
}
|
|
90
|
-
return map[normalizedType.value] || map.info
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const handleClose = () => {
|
|
94
|
-
visible.value = false
|
|
95
|
-
emit('close')
|
|
96
|
-
}
|
|
97
|
-
</script>
|
|
98
|
-
|
|
99
|
-
<style lang="scss" scoped>
|
|
100
|
-
.qiu-alert {
|
|
101
|
-
display: flex;
|
|
102
|
-
gap: 8px;
|
|
103
|
-
align-items: flex-start;
|
|
104
|
-
width: 100%;
|
|
105
|
-
padding: 8px 16px;
|
|
106
|
-
margin: 0;
|
|
107
|
-
overflow: hidden;
|
|
108
|
-
border-radius: var(--qiu-border-radius-base, 4px);
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
transition: opacity 0.2s ease;
|
|
111
|
-
|
|
112
|
-
&.is-center {
|
|
113
|
-
justify-content: center;
|
|
114
|
-
text-align: center;
|
|
115
|
-
|
|
116
|
-
.qiu-alert__content {
|
|
117
|
-
flex: none;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&--light {
|
|
122
|
-
&.qiu-alert--success {
|
|
123
|
-
color: var(--qiu-color-success);
|
|
124
|
-
background-color: var(--qiu-color-success-light-9, #f0f9eb);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&.qiu-alert--warning {
|
|
128
|
-
color: var(--qiu-color-warning);
|
|
129
|
-
background-color: var(--qiu-color-warning-light-9, #fdf6ec);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&.qiu-alert--info {
|
|
133
|
-
color: var(--qiu-color-info);
|
|
134
|
-
background-color: var(--qiu-color-info-light-9, #f4f4f5);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.qiu-alert--error {
|
|
138
|
-
color: var(--qiu-color-error);
|
|
139
|
-
background-color: var(--qiu-color-error-light-9, #fef0f0);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&--dark {
|
|
144
|
-
&.qiu-alert--success {
|
|
145
|
-
color: #fff;
|
|
146
|
-
background-color: var(--qiu-color-success);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&.qiu-alert--warning {
|
|
150
|
-
color: #fff;
|
|
151
|
-
background-color: var(--qiu-color-warning);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.qiu-alert--info {
|
|
155
|
-
color: #fff;
|
|
156
|
-
background-color: var(--qiu-color-info);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&.qiu-alert--error {
|
|
160
|
-
color: #fff;
|
|
161
|
-
background-color: var(--qiu-color-error);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.qiu-alert__icon {
|
|
167
|
-
flex-shrink: 0;
|
|
168
|
-
margin-top: 2px;
|
|
169
|
-
font-size: 16px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.qiu-alert__content {
|
|
173
|
-
flex: 1;
|
|
174
|
-
min-width: 0;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.qiu-alert__title {
|
|
178
|
-
font-size: 14px;
|
|
179
|
-
font-weight: 700;
|
|
180
|
-
line-height: 1.4;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.qiu-alert__description {
|
|
184
|
-
margin: 4px 0 0;
|
|
185
|
-
font-size: 13px;
|
|
186
|
-
line-height: 1.6;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.qiu-alert__close {
|
|
190
|
-
display: inline-flex;
|
|
191
|
-
flex-shrink: 0;
|
|
192
|
-
align-items: center;
|
|
193
|
-
justify-content: center;
|
|
194
|
-
padding: 0;
|
|
195
|
-
margin: 0;
|
|
196
|
-
font-size: 12px;
|
|
197
|
-
color: inherit;
|
|
198
|
-
cursor: pointer;
|
|
199
|
-
background: transparent;
|
|
200
|
-
border: none;
|
|
201
|
-
opacity: 0.7;
|
|
202
|
-
transition: opacity 0.2s ease;
|
|
203
|
-
|
|
204
|
-
&:hover {
|
|
205
|
-
opacity: 1;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { InjectionKey, Ref } from 'vue'
|
|
2
|
-
|
|
3
|
-
export interface QiuAnchorLinkRecord {
|
|
4
|
-
href: string
|
|
5
|
-
title: string
|
|
6
|
-
el: HTMLElement | null
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface QiuAnchorContext {
|
|
10
|
-
offset: Ref<number>
|
|
11
|
-
bound: Ref<string>
|
|
12
|
-
activeLink: Ref<string>
|
|
13
|
-
registerLink: (link: QiuAnchorLinkRecord) => void
|
|
14
|
-
unregisterLink: (href: string) => void
|
|
15
|
-
scrollToLink: (href: string) => void
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const QIU_ANCHOR_KEY: InjectionKey<QiuAnchorContext> = Symbol('QiuAnchor')
|