foucui 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/components/QiuAffix/index.vue +186 -0
- package/components/QiuAlert/index.vue +208 -0
- package/components/QiuAnchor/context.ts +18 -0
- package/components/QiuAnchor/index.vue +180 -0
- package/components/QiuAnchorLink/index.vue +67 -0
- package/components/QiuApp/index.vue +9 -0
- package/components/QiuAutocomplete/index.vue +408 -0
- package/components/QiuAvatar/index.vue +140 -0
- package/components/QiuBacktop/index.vue +121 -0
- package/components/QiuBadge/api/index.ts +389 -0
- package/components/QiuBadge/components/BadgeImagePickerDialog.vue +243 -0
- package/components/QiuBadge/components/BadgeLibraryManagerDialog.vue +30 -0
- package/components/QiuBadge/components/BadgeLibraryPanel.vue +182 -0
- package/components/QiuBadge/composables/useTableHostHeight.ts +53 -0
- package/components/QiuBadge/index.ts +18 -0
- package/components/QiuBadge/shared/BadgeTemplateRenderer.vue +32 -0
- package/components/QiuBadge/shared/assetUrl.ts +26 -0
- package/components/QiuBadge/shared/badgeTemplate.ts +309 -0
- package/components/QiuBadge/utils/chinaAreaData.ts +44 -0
- package/components/QiuBadge/utils/hostRegion.ts +22 -0
- package/components/QiuBadge/utils/pca-code.json +1 -0
- package/components/QiuBadge/utils/pdfFromElement.ts +348 -0
- package/components/QiuBadge/views/BadgeLibraryView.vue +32 -0
- package/components/QiuBadge/views/BadgeManageView.vue +1364 -0
- package/components/QiuBadge/views/BadgeTemplateEditorView.vue +10 -0
- package/components/QiuBadge/views/BadgeTemplateListView.vue +229 -0
- package/components/QiuBadge/views/DeskLabelTemplateListView.vue +227 -0
- package/components/QiuBadge/views/DeskLabelView.vue +683 -0
- package/components/QiuBadgeDot/index.vue +87 -0
- package/components/QiuButton/index.vue +247 -0
- package/components/QiuButtonGroup/index.vue +63 -0
- package/components/QiuCanvasKit/QiuCanvasEditor.vue +5503 -0
- package/components/QiuCanvasKit/QiuCanvasRenderer.vue +348 -0
- package/components/QiuCanvasKit/assetUrl.ts +11 -0
- package/components/QiuCanvasKit/components/DataModulesPanel.vue +352 -0
- package/components/QiuCanvasKit/export/html.ts +132 -0
- package/components/QiuCanvasKit/export/pdf.ts +48 -0
- package/components/QiuCanvasKit/export/png.ts +50 -0
- package/components/QiuCanvasKit/index.ts +20 -0
- package/components/QiuCanvasKit/modules/badgeCompat.ts +84 -0
- package/components/QiuCanvasKit/modules/dataRegistry.ts +207 -0
- package/components/QiuCanvasKit/modules/merge.ts +71 -0
- package/components/QiuCanvasKit/presets/badge.ts +67 -0
- package/components/QiuCanvasKit/presets/banner.ts +79 -0
- package/components/QiuCanvasKit/types.ts +138 -0
- package/components/QiuCard/index.vue +104 -0
- package/components/QiuCarousel/context.ts +16 -0
- package/components/QiuCarousel/index.vue +343 -0
- package/components/QiuCarouselItem/index.vue +47 -0
- package/components/QiuCascader/index.vue +879 -0
- package/components/QiuCascader/types.ts +48 -0
- package/components/QiuCheckbox/QiuCheckboxGroup.vue +78 -0
- package/components/QiuCheckbox/index.vue +231 -0
- package/components/QiuCheckbox/types.ts +8 -0
- package/components/QiuCode/index.vue +64 -0
- package/components/QiuCol/col.scss +55 -0
- package/components/QiuCol/index.vue +64 -0
- package/components/QiuCollapse/context.ts +10 -0
- package/components/QiuCollapse/index.vue +70 -0
- package/components/QiuCollapseItem/index.vue +167 -0
- package/components/QiuColorField/index.vue +296 -0
- package/components/QiuColorPicker/README.md +118 -0
- package/components/QiuColorPicker/index.vue +60 -0
- package/components/QiuColorfulCard/index.vue +101 -0
- package/components/QiuCombobox/index.vue +277 -0
- package/components/QiuConfigProvider/index.vue +31 -0
- package/components/QiuContextMenu/index.vue +209 -0
- package/components/QiuDate/index.vue +1134 -0
- package/components/QiuDescriptions/context.ts +20 -0
- package/components/QiuDescriptions/index.vue +115 -0
- package/components/QiuDescriptionsItem/index.vue +103 -0
- package/components/QiuDialog/index.vue +828 -0
- package/components/QiuDigitalCard/index.vue +159 -0
- package/components/QiuDivider/index.vue +185 -0
- package/components/QiuDot/index.vue +83 -0
- package/components/QiuDrawer/index.vue +350 -0
- package/components/QiuDropdown/QiuDropdownItem.vue +74 -0
- package/components/QiuDropdown/QiuDropdownMenu.vue +22 -0
- package/components/QiuDropdown/context.ts +9 -0
- package/components/QiuDropdown/index.vue +189 -0
- package/components/QiuEmpty/index.vue +73 -0
- package/components/QiuForm/index.vue +172 -0
- package/components/QiuForm/types.ts +39 -0
- package/components/QiuFormItem/index.vue +276 -0
- package/components/QiuFullscreen/index.vue +11 -0
- package/components/QiuGrid/index.vue +408 -0
- package/components/QiuHoverCard/index.vue +192 -0
- package/components/QiuIcon/index.vue +117 -0
- package/components/QiuIconPicker/iconify.libraries.ts +182 -0
- package/components/QiuIconPicker/icons.catalog.ts +3072 -0
- package/components/QiuIconPicker/index.vue +488 -0
- package/components/QiuImage/index.vue +177 -0
- package/components/QiuInput/index.vue +328 -0
- package/components/QiuInputNumber/index.vue +295 -0
- package/components/QiuInputOtp/index.vue +190 -0
- package/components/QiuKbd/index.vue +57 -0
- package/components/QiuLayoutContainer/index.vue +50 -0
- package/components/QiuLinkPreview/index.vue +224 -0
- package/components/QiuLoading/index.ts +176 -0
- package/components/QiuLoading/spinner.vue +820 -0
- package/components/QiuLoading/types.ts +44 -0
- package/components/QiuMention/index.vue +299 -0
- package/components/QiuMenu/QiuMenuRoot.vue +241 -0
- package/components/QiuMenu/components/QiuMenuItem.vue +340 -0
- package/components/QiuMenu/components/QiuSubMenu.vue +504 -0
- package/components/QiuMenu/context.ts +21 -0
- package/components/QiuMenu/index.vue +43 -0
- package/components/QiuMenuNav/QiuMenuNavItem.vue +100 -0
- package/components/QiuMenuNav/QiuMenuNavSub.vue +120 -0
- package/components/QiuMenuNav/context.ts +14 -0
- package/components/QiuMenuNav/index.vue +148 -0
- package/components/QiuMsg/QiuMsgItem.vue +180 -0
- package/components/QiuMsg/index.ts +158 -0
- package/components/QiuMsg/types.ts +23 -0
- package/components/QiuMsgBox/index.ts +147 -0
- package/components/QiuNotification/QiuNotificationItem.vue +168 -0
- package/components/QiuNotification/index.ts +155 -0
- package/components/QiuNotification/types.ts +14 -0
- package/components/QiuPage/index.vue +12 -0
- package/components/QiuPageHeader/index.vue +115 -0
- package/components/QiuPageMain/index.vue +78 -0
- package/components/QiuPagination/index.vue +421 -0
- package/components/QiuPasswordStrength/index.vue +101 -0
- package/components/QiuPopconfirm/index.vue +196 -0
- package/components/QiuPopover/index.vue +277 -0
- package/components/QiuProgress/index.vue +235 -0
- package/components/QiuQrcode/index.vue +302 -0
- package/components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue +13 -0
- package/components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue +37 -0
- package/components/QiuQueryForm/components/QiuQueryFormRightPanel.vue +37 -0
- package/components/QiuQueryForm/components/QiuQueryFormTopPanel.vue +13 -0
- package/components/QiuQueryForm/index.vue +117 -0
- package/components/QiuRadio/QiuRadioGroup.vue +75 -0
- package/components/QiuRadio/index.vue +191 -0
- package/components/QiuRadio/types.ts +9 -0
- package/components/QiuRate/index.vue +184 -0
- package/components/QiuRefresh/index.vue +32 -0
- package/components/QiuResult/index.vue +103 -0
- package/components/QiuRow/index.vue +60 -0
- package/components/QiuRow/types.ts +5 -0
- package/components/QiuScrollbar/index.vue +107 -0
- package/components/QiuSearchBar/index.vue +154 -0
- package/components/QiuSegmented/index.vue +120 -0
- package/components/QiuSelect/QiuOption.vue +93 -0
- package/components/QiuSelect/index.vue +452 -0
- package/components/QiuSelect/types.ts +15 -0
- package/components/QiuSkeleton/index.vue +78 -0
- package/components/QiuSlider/index.vue +266 -0
- package/components/QiuSpace/index.vue +95 -0
- package/components/QiuSparkline/index.vue +92 -0
- package/components/QiuStatistic/index.vue +4 -0
- package/components/QiuStatistics/index.vue +123 -0
- package/components/QiuStep/index.vue +220 -0
- package/components/QiuSteps/context.ts +25 -0
- package/components/QiuSteps/index.vue +84 -0
- package/components/QiuSwitch/index.vue +145 -0
- package/components/QiuTabBar/index.vue +218 -0
- package/components/QiuTabBar/types.ts +19 -0
- package/components/QiuTabPane/index.vue +82 -0
- package/components/QiuTable/columns.ts +16 -0
- package/components/QiuTable/export.ts +102 -0
- package/components/QiuTable/index.ts +24 -0
- package/components/QiuTable/index.vue +3503 -0
- package/components/QiuTable/registry.ts +75 -0
- package/components/QiuTable/styles/table.scss +1230 -0
- package/components/QiuTable/types.ts +413 -0
- package/components/QiuTable/useArea.ts +202 -0
- package/components/QiuTable/useColumns.ts +325 -0
- package/components/QiuTable/useEdit.ts +136 -0
- package/components/QiuTable/useExtras.ts +115 -0
- package/components/QiuTable/useHistory.ts +77 -0
- package/components/QiuTable/useMerge.ts +105 -0
- package/components/QiuTable/useResize.ts +86 -0
- package/components/QiuTable/useScrollSync.ts +152 -0
- package/components/QiuTable/useVirtual.ts +97 -0
- package/components/QiuTable/utils.ts +165 -0
- package/components/QiuTableColumn/index.vue +101 -0
- package/components/QiuTag/index.vue +143 -0
- package/components/QiuText/index.vue +99 -0
- package/components/QiuTime/index.vue +548 -0
- package/components/QiuTimeAgo/index.vue +103 -0
- package/components/QiuTimeline/index.vue +54 -0
- package/components/QiuTimelineItem/index.vue +140 -0
- package/components/QiuTips/index.vue +323 -0
- package/components/QiuTooltip/index.vue +237 -0
- package/components/QiuTransfer/index.vue +277 -0
- package/components/QiuTree/QiuTreeNode.vue +146 -0
- package/components/QiuTree/index.vue +143 -0
- package/components/QiuTree/types.ts +30 -0
- package/components/QiuTreeSelect/index.vue +259 -0
- package/components/QiuTrend/index.vue +92 -0
- package/components/QiuUpload/index.vue +628 -0
- package/components/QiuUploadCrop/index.vue +1267 -0
- package/components/QiuWatermark/index.vue +121 -0
- package/components/useBodyScrollLock.ts +28 -0
- package/dist/components/QiuAnchor/context.d.ts +15 -0
- package/dist/components/QiuAnchorLink/index.vue.d.ts +23 -0
- package/dist/components/QiuBadge/api/index.d.ts +110 -0
- package/dist/components/QiuBadge/components/BadgeImagePickerDialog.vue.d.ts +16 -0
- package/dist/components/QiuBadge/components/BadgeLibraryManagerDialog.vue.d.ts +9 -0
- package/dist/components/QiuBadge/components/BadgeLibraryPanel.vue.d.ts +5 -0
- package/dist/components/QiuBadge/composables/useTableHostHeight.d.ts +7 -0
- package/dist/components/QiuBadge/index.d.ts +18 -0
- package/dist/components/QiuBadge/shared/BadgeTemplateRenderer.vue.d.ts +14 -0
- package/dist/components/QiuBadge/shared/assetUrl.d.ts +1 -0
- package/dist/components/QiuBadge/shared/badgeTemplate.d.ts +132 -0
- package/dist/components/QiuBadge/utils/chinaAreaData.d.ts +9 -0
- package/dist/components/QiuBadge/utils/hostRegion.d.ts +3 -0
- package/dist/components/QiuBadge/utils/pca-code.json.d.ts +3 -0
- package/dist/components/QiuBadge/utils/pdfFromElement.d.ts +14 -0
- package/dist/components/QiuBadge/views/BadgeLibraryView.vue.d.ts +2 -0
- package/dist/components/QiuBadge/views/BadgeManageView.vue.d.ts +7 -0
- package/dist/components/QiuBadge/views/BadgeTemplateListView.vue.d.ts +4 -0
- package/dist/components/QiuBadge/views/DeskLabelTemplateListView.vue.d.ts +4 -0
- package/dist/components/QiuBadge/views/DeskLabelView.vue.d.ts +4 -0
- package/dist/components/QiuButton/index.vue.d.ts +52 -0
- package/dist/components/QiuCanvasKit/QiuCanvasEditor.vue.d.ts +24 -0
- package/dist/components/QiuCanvasKit/QiuCanvasRenderer.vue.d.ts +13 -0
- package/dist/components/QiuCanvasKit/assetUrl.d.ts +7 -0
- package/dist/components/QiuCanvasKit/components/DataModulesPanel.vue.d.ts +23 -0
- package/dist/components/QiuCanvasKit/export/html.d.ts +12 -0
- package/dist/components/QiuCanvasKit/export/pdf.d.ts +9 -0
- package/dist/components/QiuCanvasKit/export/png.d.ts +8 -0
- package/dist/components/QiuCanvasKit/index.d.ts +19 -0
- package/dist/components/QiuCanvasKit/modules/badgeCompat.d.ts +8 -0
- package/dist/components/QiuCanvasKit/modules/dataRegistry.d.ts +23 -0
- package/dist/components/QiuCanvasKit/modules/merge.d.ts +12 -0
- package/dist/components/QiuCanvasKit/presets/badge.d.ts +12 -0
- package/dist/components/QiuCanvasKit/presets/banner.d.ts +4 -0
- package/dist/components/QiuCanvasKit/types.d.ts +119 -0
- package/dist/components/QiuCarousel/context.d.ts +13 -0
- package/dist/components/QiuCarouselItem/index.vue.d.ts +20 -0
- package/dist/components/QiuCascader/types.d.ts +25 -0
- package/dist/components/QiuCheckbox/QiuCheckboxGroup.vue.d.ts +33 -0
- package/dist/components/QiuCheckbox/index.vue.d.ts +38 -0
- package/dist/components/QiuCheckbox/types.d.ts +7 -0
- package/dist/components/QiuCode/index.vue.d.ts +15 -0
- package/dist/components/QiuCollapse/context.d.ts +8 -0
- package/dist/components/QiuCollapseItem/index.vue.d.ts +30 -0
- package/dist/components/QiuColorField/index.vue.d.ts +23 -0
- package/dist/components/QiuColorPicker/index.vue.d.ts +21 -0
- package/dist/components/QiuCombobox/index.vue.d.ts +54 -0
- package/dist/components/QiuContextMenu/index.vue.d.ts +46 -0
- package/dist/components/QiuDescriptions/context.d.ts +16 -0
- package/dist/components/QiuDescriptionsItem/index.vue.d.ts +25 -0
- package/dist/components/QiuDigitalCard/index.vue.d.ts +45 -0
- package/dist/components/QiuDropdown/QiuDropdownItem.vue.d.ts +30 -0
- package/dist/components/QiuDropdown/QiuDropdownMenu.vue.d.ts +17 -0
- package/dist/components/QiuDropdown/context.d.ts +7 -0
- package/dist/components/QiuDropdown/index.vue.d.ts +46 -0
- package/dist/components/QiuForm/types.d.ts +31 -0
- package/dist/components/QiuHoverCard/index.vue.d.ts +44 -0
- package/dist/components/QiuIcon/index.vue.d.ts +18 -0
- package/dist/components/QiuIconPicker/iconify.libraries.d.ts +18 -0
- package/dist/components/QiuIconPicker/icons.catalog.d.ts +12 -0
- package/dist/components/QiuInput/index.vue.d.ts +71 -0
- package/dist/components/QiuInputNumber/index.vue.d.ts +38 -0
- package/dist/components/QiuInputOtp/index.vue.d.ts +28 -0
- package/dist/components/QiuKbd/index.vue.d.ts +22 -0
- package/dist/components/QiuLayoutContainer/index.vue.d.ts +29 -0
- package/dist/components/QiuLinkPreview/index.vue.d.ts +43 -0
- package/dist/components/QiuLoading/index.d.ts +26 -0
- package/dist/components/QiuLoading/spinner.vue.d.ts +14 -0
- package/dist/components/QiuLoading/types.d.ts +2 -0
- package/dist/components/QiuMention/index.vue.d.ts +35 -0
- package/dist/components/QiuMenu/QiuMenuRoot.vue.d.ts +36 -0
- package/dist/components/QiuMenu/context.d.ts +19 -0
- package/dist/components/QiuMenuNav/QiuMenuNavItem.vue.d.ts +26 -0
- package/dist/components/QiuMenuNav/QiuMenuNavSub.vue.d.ts +25 -0
- package/dist/components/QiuMenuNav/context.d.ts +12 -0
- package/dist/components/QiuMenuNav/index.vue.d.ts +35 -0
- package/dist/components/QiuMsg/QiuMsgItem.vue.d.ts +15 -0
- package/dist/components/QiuMsg/index.d.ts +30 -0
- package/dist/components/QiuMsg/types.d.ts +12 -0
- package/dist/components/QiuMsgBox/index.d.ts +14 -0
- package/dist/components/QiuNotification/QiuNotificationItem.vue.d.ts +16 -0
- package/dist/components/QiuNotification/index.d.ts +30 -0
- package/dist/components/QiuNotification/types.d.ts +12 -0
- package/dist/components/QiuPageMain/index.vue.d.ts +27 -0
- package/dist/components/QiuPagination/index.vue.d.ts +44 -0
- package/dist/components/QiuPasswordStrength/index.vue.d.ts +9 -0
- package/dist/components/QiuQrcode/index.vue.d.ts +20 -0
- package/dist/components/QiuRadio/QiuRadioGroup.vue.d.ts +33 -0
- package/dist/components/QiuRadio/types.d.ts +8 -0
- package/dist/components/QiuRow/types.d.ts +4 -0
- package/dist/components/QiuSearchBar/index.vue.d.ts +38 -0
- package/dist/components/QiuSelect/QiuOption.vue.d.ts +24 -0
- package/dist/components/QiuSelect/index.vue.d.ts +52 -0
- package/dist/components/QiuSelect/types.d.ts +13 -0
- package/dist/components/QiuSparkline/index.vue.d.ts +18 -0
- package/dist/components/QiuStep/index.vue.d.ts +31 -0
- package/dist/components/QiuSteps/context.d.ts +21 -0
- package/dist/components/QiuSwitch/index.vue.d.ts +25 -0
- package/dist/components/QiuTabBar/index.vue.d.ts +32 -0
- package/dist/components/QiuTabBar/types.d.ts +16 -0
- package/dist/components/QiuTabPane/index.vue.d.ts +25 -0
- package/dist/components/QiuTable/columns.d.ts +1 -0
- package/dist/components/QiuTable/export.d.ts +18 -0
- package/dist/components/QiuTable/index.d.ts +3 -0
- package/dist/components/QiuTable/index.vue.d.ts +322 -0
- package/dist/components/QiuTable/registry.d.ts +39 -0
- package/dist/components/QiuTable/types.d.ts +353 -0
- package/dist/components/QiuTable/useArea.d.ts +51 -0
- package/dist/components/QiuTable/useColumns.d.ts +67 -0
- package/dist/components/QiuTable/useEdit.d.ts +36 -0
- package/dist/components/QiuTable/useExtras.d.ts +38 -0
- package/dist/components/QiuTable/useHistory.d.ts +44 -0
- package/dist/components/QiuTable/useMerge.d.ts +28 -0
- package/dist/components/QiuTable/useResize.d.ts +19 -0
- package/dist/components/QiuTable/useScrollSync.d.ts +25 -0
- package/dist/components/QiuTable/useVirtual.d.ts +30 -0
- package/dist/components/QiuTable/utils.d.ts +54 -0
- package/dist/components/QiuTime/index.vue.d.ts +43 -0
- package/dist/components/QiuTimeAgo/index.vue.d.ts +35 -0
- package/dist/components/QiuTimelineItem/index.vue.d.ts +35 -0
- package/dist/components/QiuTooltip/index.vue.d.ts +38 -0
- package/dist/components/QiuTree/types.d.ts +13 -0
- package/dist/components/QiuTrend/index.vue.d.ts +34 -0
- package/dist/components/QiuUpload/index.vue.d.ts +86 -0
- package/dist/components/QiuUploadCrop/index.vue.d.ts +136 -0
- package/dist/components/useBodyScrollLock.d.ts +4 -0
- package/dist/foucui.css +1 -0
- package/dist/foucui.js +26509 -0
- package/dist/foucui.umd.cjs +125 -0
- package/dist/index.d.ts +46 -0
- package/dist/src/bridge/@/api/media.d.ts +7 -0
- package/dist/src/bridge/@/api/notice.d.ts +5 -0
- package/dist/src/bridge/@/config/index.d.ts +29 -0
- package/dist/src/bridge/@/config/media.config.d.ts +15 -0
- package/dist/src/bridge/@/config/security.config.d.ts +7 -0
- package/dist/src/bridge/@/i18n/index.d.ts +7 -0
- package/dist/src/bridge/@/store/modules/bing.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/errorLog.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/media.d.ts +4 -0
- package/dist/src/bridge/@/store/modules/routes.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/settings.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/tabs.d.ts +3 -0
- package/dist/src/bridge/@/store/modules/user.d.ts +3 -0
- package/dist/src/bridge/@/utils/convertToCamelCase.d.ts +2 -0
- package/dist/src/bridge/@/utils/index.d.ts +5 -0
- package/dist/src/bridge/@/utils/pageTitle.d.ts +1 -0
- package/dist/src/bridge/@/utils/routes.d.ts +11 -0
- package/dist/src/bridge/@/utils/validate.d.ts +13 -0
- package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +2 -0
- package/dist/src/i18n.d.ts +2 -0
- package/package.json +83 -0
- package/plugins/qiu.ts +83 -0
- package/plugins/shortcuts.ts +69 -0
- package/src/bridge/@/api/media.ts +8 -0
- package/src/bridge/@/api/notice.ts +5 -0
- package/src/bridge/@/config/index.ts +38 -0
- package/src/bridge/@/config/media.config.ts +37 -0
- package/src/bridge/@/config/security.config.ts +8 -0
- package/src/bridge/@/i18n/index.ts +6 -0
- package/src/bridge/@/store/modules/bing.ts +9 -0
- package/src/bridge/@/store/modules/errorLog.ts +9 -0
- package/src/bridge/@/store/modules/media.ts +10 -0
- package/src/bridge/@/store/modules/routes.ts +10 -0
- package/src/bridge/@/store/modules/settings.ts +9 -0
- package/src/bridge/@/store/modules/tabs.ts +9 -0
- package/src/bridge/@/store/modules/user.ts +9 -0
- package/src/bridge/@/utils/convertToCamelCase.ts +11 -0
- package/src/bridge/@/utils/index.ts +9 -0
- package/src/bridge/@/utils/pageTitle.ts +4 -0
- package/src/bridge/@/utils/routes.ts +14 -0
- package/src/bridge/@/utils/validate.ts +17 -0
- package/src/bridge/@qiu/plugins/shortcuts.ts +3 -0
- package/src/i18n.ts +8 -0
- package/src/icons/qiu-logo.svg +1 -0
- package/styles/dark.scss +194 -0
- package/styles/normalize.css +349 -0
- package/styles/plain.scss +423 -0
- package/styles/qiu-tokens.scss +40 -0
- package/styles/qiu.scss +1149 -0
- package/styles/technology.scss +452 -0
- package/styles/var.scss +382 -0
- package/styles/variables.scss +77 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
class="qiu-radio"
|
|
4
|
+
:class="{
|
|
5
|
+
'is-checked': isChecked,
|
|
6
|
+
'is-disabled': isDisabled,
|
|
7
|
+
'is-button': isButton,
|
|
8
|
+
'is-border': border,
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<span class="qiu-radio__input">
|
|
12
|
+
<input
|
|
13
|
+
type="radio"
|
|
14
|
+
class="qiu-radio__original"
|
|
15
|
+
:checked="isChecked"
|
|
16
|
+
:disabled="isDisabled"
|
|
17
|
+
:name="radioName"
|
|
18
|
+
:value="label"
|
|
19
|
+
@change="onChange"
|
|
20
|
+
/>
|
|
21
|
+
<span class="qiu-radio__inner" />
|
|
22
|
+
</span>
|
|
23
|
+
<span v-if="$slots.default || label !== undefined" class="qiu-radio__label">
|
|
24
|
+
<slot>{{ label }}</slot>
|
|
25
|
+
</span>
|
|
26
|
+
</label>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import type { QiuRadioGroupContext } from './types'
|
|
31
|
+
|
|
32
|
+
defineOptions({ name: 'QiuRadio' })
|
|
33
|
+
|
|
34
|
+
const props = withDefaults(
|
|
35
|
+
defineProps<{
|
|
36
|
+
modelValue?: string | number | boolean
|
|
37
|
+
label?: string | number | boolean
|
|
38
|
+
disabled?: boolean
|
|
39
|
+
border?: boolean
|
|
40
|
+
}>(),
|
|
41
|
+
{
|
|
42
|
+
disabled: false,
|
|
43
|
+
border: false,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits<{
|
|
48
|
+
'update:modelValue': [string | number | boolean]
|
|
49
|
+
change: [string | number | boolean]
|
|
50
|
+
}>()
|
|
51
|
+
|
|
52
|
+
const groupCtx = inject<QiuRadioGroupContext | null>('qiuRadioGroup', null)
|
|
53
|
+
const fallbackName = `qiu-radio-${Math.random().toString(36).slice(2, 9)}`
|
|
54
|
+
|
|
55
|
+
const isDisabled = computed(() => props.disabled || groupCtx?.disabled.value)
|
|
56
|
+
const isButton = computed(() => groupCtx?.type?.value === 'button')
|
|
57
|
+
|
|
58
|
+
const isChecked = computed(() => {
|
|
59
|
+
const current = groupCtx ? groupCtx.modelValue.value : props.modelValue
|
|
60
|
+
return current === props.label
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const radioName = computed(() => groupCtx?.name.value || fallbackName)
|
|
64
|
+
|
|
65
|
+
const onChange = () => {
|
|
66
|
+
if (isDisabled.value || props.label === undefined) return
|
|
67
|
+
if (groupCtx) {
|
|
68
|
+
groupCtx.changeEvent(props.label)
|
|
69
|
+
} else {
|
|
70
|
+
emit('update:modelValue', props.label)
|
|
71
|
+
emit('change', props.label)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" scoped>
|
|
77
|
+
.qiu-radio {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
align-items: center;
|
|
81
|
+
height: 32px;
|
|
82
|
+
margin-right: 16px;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
color: var(--qiu-text-color-regular, var(--qiu-text-color-regular, #606266));
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
user-select: none;
|
|
88
|
+
|
|
89
|
+
&.is-disabled {
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
opacity: 0.6;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.qiu-radio__input {
|
|
96
|
+
position: relative;
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.qiu-radio__original {
|
|
102
|
+
position: absolute;
|
|
103
|
+
z-index: -1;
|
|
104
|
+
width: 0;
|
|
105
|
+
height: 0;
|
|
106
|
+
margin: 0;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.qiu-radio__inner {
|
|
111
|
+
position: relative;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
display: inline-block;
|
|
114
|
+
width: 14px;
|
|
115
|
+
height: 14px;
|
|
116
|
+
background: var(--qiu-bg-color, #fff);
|
|
117
|
+
border: 1px solid var(--qiu-border-color, #dcdfe6);
|
|
118
|
+
border-radius: 50% !important;
|
|
119
|
+
transition: border-color 0.2s ease;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.qiu-radio__inner::after {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 50%;
|
|
125
|
+
left: 50%;
|
|
126
|
+
display: block;
|
|
127
|
+
width: 6px;
|
|
128
|
+
height: 6px;
|
|
129
|
+
content: '';
|
|
130
|
+
background-color: #fff;
|
|
131
|
+
border-radius: 50% !important;
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transform: translate(-50%, -50%) scale(0);
|
|
134
|
+
transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.qiu-radio.is-checked .qiu-radio__inner,
|
|
138
|
+
.is-checked .qiu-radio__inner {
|
|
139
|
+
background-color: var(--qiu-color-primary, #409eff);
|
|
140
|
+
border-color: var(--qiu-color-primary, #409eff);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.qiu-radio.is-checked .qiu-radio__inner::after,
|
|
144
|
+
.is-checked .qiu-radio__inner::after {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
transform: translate(-50%, -50%) scale(1);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.qiu-radio__label {
|
|
150
|
+
line-height: 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.qiu-radio.is-border {
|
|
154
|
+
height: 32px;
|
|
155
|
+
padding: 0 12px;
|
|
156
|
+
border: 1px solid var(--qiu-border-color, #dcdfe6);
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
|
|
159
|
+
&.is-checked {
|
|
160
|
+
border-color: var(--qiu-color-primary, var(--qiu-color-primary));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.qiu-radio.is-button {
|
|
165
|
+
height: 32px;
|
|
166
|
+
padding: 0 16px;
|
|
167
|
+
margin: 0;
|
|
168
|
+
background: #fff;
|
|
169
|
+
border: 1px solid var(--qiu-border-color, #dcdfe6);
|
|
170
|
+
border-left-width: 0;
|
|
171
|
+
|
|
172
|
+
&:first-child {
|
|
173
|
+
border-left-width: 1px;
|
|
174
|
+
border-radius: 4px 0 0 4px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&:last-child {
|
|
178
|
+
border-radius: 0 4px 4px 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.qiu-radio__input {
|
|
182
|
+
display: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&.is-checked {
|
|
186
|
+
color: #fff;
|
|
187
|
+
background: var(--qiu-color-primary, var(--qiu-color-primary));
|
|
188
|
+
border-color: var(--qiu-color-primary, var(--qiu-color-primary));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export interface QiuRadioGroupContext {
|
|
4
|
+
modelValue: Ref<string | number | boolean | undefined>
|
|
5
|
+
disabled: Ref<boolean>
|
|
6
|
+
name: Ref<string>
|
|
7
|
+
type?: ComputedRef<'default' | 'button'>
|
|
8
|
+
changeEvent: (val: string | number | boolean) => void
|
|
9
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="qiu-rate"
|
|
4
|
+
:class="{ 'is-disabled': disabled, 'is-readonly': readonly }"
|
|
5
|
+
role="slider"
|
|
6
|
+
:aria-valuenow="modelValue"
|
|
7
|
+
:aria-valuemin="0"
|
|
8
|
+
:aria-valuemax="max"
|
|
9
|
+
>
|
|
10
|
+
<button
|
|
11
|
+
v-for="i in max"
|
|
12
|
+
:key="i"
|
|
13
|
+
type="button"
|
|
14
|
+
class="qiu-rate__item"
|
|
15
|
+
:class="{
|
|
16
|
+
'is-active': displayValue >= i,
|
|
17
|
+
'is-half': allowHalf && displayValue + 0.5 === i,
|
|
18
|
+
}"
|
|
19
|
+
:disabled="disabled || readonly"
|
|
20
|
+
@mousemove="onMove($event, i)"
|
|
21
|
+
@mouseleave="hoverValue = -1"
|
|
22
|
+
@click="onClick($event, i)"
|
|
23
|
+
>
|
|
24
|
+
<span class="qiu-rate__icon qiu-rate__icon--void">
|
|
25
|
+
<qiu-icon :icon="voidIcon" />
|
|
26
|
+
</span>
|
|
27
|
+
<span
|
|
28
|
+
class="qiu-rate__icon qiu-rate__icon--full"
|
|
29
|
+
:style="fullStyle(i)"
|
|
30
|
+
>
|
|
31
|
+
<qiu-icon :icon="icon" />
|
|
32
|
+
</span>
|
|
33
|
+
</button>
|
|
34
|
+
<span v-if="showScore || showText" class="qiu-rate__text">
|
|
35
|
+
{{ text }}
|
|
36
|
+
</span>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
defineOptions({ name: 'QiuRate' })
|
|
42
|
+
|
|
43
|
+
const props = withDefaults(
|
|
44
|
+
defineProps<{
|
|
45
|
+
modelValue?: number
|
|
46
|
+
max?: number
|
|
47
|
+
disabled?: boolean
|
|
48
|
+
readonly?: boolean
|
|
49
|
+
allowHalf?: boolean
|
|
50
|
+
showScore?: boolean
|
|
51
|
+
showText?: boolean
|
|
52
|
+
texts?: string[]
|
|
53
|
+
colors?: string[]
|
|
54
|
+
voidColor?: string
|
|
55
|
+
icon?: string
|
|
56
|
+
voidIcon?: string
|
|
57
|
+
}>(),
|
|
58
|
+
{
|
|
59
|
+
modelValue: 0,
|
|
60
|
+
max: 5,
|
|
61
|
+
disabled: false,
|
|
62
|
+
readonly: false,
|
|
63
|
+
allowHalf: false,
|
|
64
|
+
showScore: false,
|
|
65
|
+
showText: false,
|
|
66
|
+
texts: () => ['极差', '失望', '一般', '满意', '惊喜'],
|
|
67
|
+
colors: () => ['#f7ba2a', '#f7ba2a', '#f7ba2a'],
|
|
68
|
+
voidColor: '#c0c4cc',
|
|
69
|
+
icon: 'star-fill',
|
|
70
|
+
voidIcon: 'star-line',
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
const emit = defineEmits<{
|
|
75
|
+
'update:modelValue': [number]
|
|
76
|
+
change: [number]
|
|
77
|
+
}>()
|
|
78
|
+
|
|
79
|
+
const hoverValue = ref(-1)
|
|
80
|
+
|
|
81
|
+
const voidColor = computed(() => props.voidColor)
|
|
82
|
+
|
|
83
|
+
const displayValue = computed(() =>
|
|
84
|
+
hoverValue.value >= 0 ? hoverValue.value : props.modelValue
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
const activeColor = computed(() => {
|
|
88
|
+
const v = displayValue.value
|
|
89
|
+
const colors = props.colors
|
|
90
|
+
if (v <= props.max / 3) return colors[0] || '#f7ba2a'
|
|
91
|
+
if (v <= (props.max * 2) / 3) return colors[1] || colors[0] || '#f7ba2a'
|
|
92
|
+
return colors[2] || colors[1] || colors[0] || '#f7ba2a'
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
const text = computed(() => {
|
|
96
|
+
if (props.showScore) return String(displayValue.value)
|
|
97
|
+
if (!props.showText) return ''
|
|
98
|
+
const idx = Math.ceil(displayValue.value) - 1
|
|
99
|
+
return props.texts[Math.max(0, Math.min(props.texts.length - 1, idx))] || ''
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
const fullStyle = (i: number) => {
|
|
103
|
+
const v = displayValue.value
|
|
104
|
+
let width = '0%'
|
|
105
|
+
if (v >= i) width = '100%'
|
|
106
|
+
else if (props.allowHalf && v + 0.5 >= i && v < i) width = '50%'
|
|
107
|
+
return {
|
|
108
|
+
width,
|
|
109
|
+
color: activeColor.value,
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const resolveHalf = (e: MouseEvent, i: number) => {
|
|
114
|
+
if (!props.allowHalf) return i
|
|
115
|
+
const el = e.currentTarget as HTMLElement
|
|
116
|
+
const rect = el.getBoundingClientRect()
|
|
117
|
+
return e.clientX - rect.left < rect.width / 2 ? i - 0.5 : i
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const onMove = (e: MouseEvent, i: number) => {
|
|
121
|
+
if (props.disabled || props.readonly) return
|
|
122
|
+
hoverValue.value = resolveHalf(e, i)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const onClick = (e: MouseEvent, i: number) => {
|
|
126
|
+
if (props.disabled || props.readonly) return
|
|
127
|
+
const next = resolveHalf(e, i)
|
|
128
|
+
emit('update:modelValue', next)
|
|
129
|
+
emit('change', next)
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<style lang="scss" scoped>
|
|
134
|
+
.qiu-rate {
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
gap: 6px;
|
|
137
|
+
align-items: center;
|
|
138
|
+
height: 32px;
|
|
139
|
+
line-height: 1;
|
|
140
|
+
vertical-align: middle;
|
|
141
|
+
|
|
142
|
+
&.is-disabled,
|
|
143
|
+
&.is-readonly {
|
|
144
|
+
.qiu-rate__item {
|
|
145
|
+
cursor: default;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.qiu-rate__item {
|
|
151
|
+
position: relative;
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
padding: 0;
|
|
154
|
+
font-size: 18px;
|
|
155
|
+
color: v-bind(voidColor);
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
background: transparent;
|
|
158
|
+
border: 0;
|
|
159
|
+
|
|
160
|
+
&:disabled {
|
|
161
|
+
cursor: not-allowed;
|
|
162
|
+
opacity: 0.7;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.qiu-rate__icon {
|
|
167
|
+
display: inline-flex;
|
|
168
|
+
line-height: 1;
|
|
169
|
+
|
|
170
|
+
&--full {
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
left: 0;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
white-space: nowrap;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.qiu-rate__text {
|
|
180
|
+
margin-left: 6px;
|
|
181
|
+
font-size: 14px;
|
|
182
|
+
color: var(--qiu-text-color-regular, #606266);
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<qiu-icon :class="className" icon="refresh-line" @click="refreshRoute" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'QiuRefresh',
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const className = ref<string>('')
|
|
11
|
+
|
|
12
|
+
const $pub = inject<(...args: any[]) => void>('$pub')
|
|
13
|
+
const $sub = inject<(...args: any[]) => void>('$sub')
|
|
14
|
+
|
|
15
|
+
const rotate = () => {
|
|
16
|
+
className.value = 'rotate'
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
className.value = ''
|
|
19
|
+
}, 500)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const refreshRoute = () => {
|
|
23
|
+
$pub?.('reload-router-view')
|
|
24
|
+
rotate()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
onBeforeMount(() => {
|
|
28
|
+
$sub?.('refresh-rotate', () => {
|
|
29
|
+
rotate()
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="qiu-result" :class="icon ? `qiu-result--${icon}` : ''">
|
|
3
|
+
<div class="qiu-result__icon">
|
|
4
|
+
<slot name="icon">
|
|
5
|
+
<qiu-icon v-if="resolvedIcon" :icon="resolvedIcon" />
|
|
6
|
+
</slot>
|
|
7
|
+
</div>
|
|
8
|
+
<div v-if="title || $slots.title" class="qiu-result__title">
|
|
9
|
+
<slot name="title">{{ title }}</slot>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-if="subTitle || $slots['sub-title']" class="qiu-result__subtitle">
|
|
12
|
+
<slot name="sub-title">{{ subTitle }}</slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div v-if="$slots.extra" class="qiu-result__extra">
|
|
15
|
+
<slot name="extra" />
|
|
16
|
+
</div>
|
|
17
|
+
<div v-if="$slots.default" class="qiu-result__content">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
defineOptions({ name: 'QiuResult' })
|
|
25
|
+
|
|
26
|
+
const props = withDefaults(
|
|
27
|
+
defineProps<{
|
|
28
|
+
icon?: 'success' | 'warning' | 'info' | 'error' | ''
|
|
29
|
+
title?: string
|
|
30
|
+
subTitle?: string
|
|
31
|
+
}>(),
|
|
32
|
+
{
|
|
33
|
+
icon: '',
|
|
34
|
+
title: '',
|
|
35
|
+
subTitle: '',
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
const iconMap: Record<string, string> = {
|
|
40
|
+
success: 'checkbox-circle-line',
|
|
41
|
+
warning: 'error-warning-line',
|
|
42
|
+
info: 'information-line',
|
|
43
|
+
error: 'close-circle-line',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const resolvedIcon = computed(() => (props.icon ? iconMap[props.icon] || '' : ''))
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style lang="scss" scoped>
|
|
50
|
+
.qiu-result {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: center;
|
|
54
|
+
padding: 40px 24px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qiu-result__icon {
|
|
59
|
+
font-size: 64px;
|
|
60
|
+
line-height: 1;
|
|
61
|
+
color: var(--qiu-color-primary, var(--qiu-color-primary, #0f766e));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.qiu-result--success .qiu-result__icon {
|
|
65
|
+
color: var(--qiu-color-success, var(--qiu-color-success, #67c23a));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.qiu-result--warning .qiu-result__icon {
|
|
69
|
+
color: var(--qiu-color-warning, var(--qiu-color-warning, #e6a23c));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.qiu-result--error .qiu-result__icon {
|
|
73
|
+
color: var(--qiu-color-danger, var(--qiu-color-danger, #f56c6c));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.qiu-result--info .qiu-result__icon {
|
|
77
|
+
color: var(--qiu-color-info, var(--qiu-color-info, #909399));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.qiu-result__title {
|
|
81
|
+
margin-top: 20px;
|
|
82
|
+
font-size: 20px;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
line-height: 1.4;
|
|
85
|
+
color: var(--qiu-text-color-primary, var(--qiu-text-color-primary, #303133));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.qiu-result__subtitle {
|
|
89
|
+
margin-top: 8px;
|
|
90
|
+
font-size: var(--qiu-font-size, 14px);
|
|
91
|
+
line-height: 1.6;
|
|
92
|
+
color: var(--qiu-text-color-secondary, var(--qiu-text-color-secondary, #909399));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.qiu-result__extra {
|
|
96
|
+
margin-top: 24px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.qiu-result__content {
|
|
100
|
+
width: 100%;
|
|
101
|
+
margin-top: 24px;
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="qiu-row" :style="rowStyle">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { QIU_ROW_KEY, type QiuRowContext } from './types'
|
|
9
|
+
|
|
10
|
+
defineOptions({ name: 'QiuRow' })
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<{
|
|
14
|
+
gutter?: number
|
|
15
|
+
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'
|
|
16
|
+
align?: 'top' | 'middle' | 'bottom'
|
|
17
|
+
tag?: string
|
|
18
|
+
}>(),
|
|
19
|
+
{
|
|
20
|
+
gutter: 0,
|
|
21
|
+
justify: 'start',
|
|
22
|
+
align: 'top',
|
|
23
|
+
tag: 'div',
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
const gutterRef = computed(() => props.gutter || 0)
|
|
28
|
+
|
|
29
|
+
provide<QiuRowContext>(QIU_ROW_KEY, {
|
|
30
|
+
gutter: gutterRef,
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const rowStyle = computed(() => {
|
|
34
|
+
const g = props.gutter || 0
|
|
35
|
+
return {
|
|
36
|
+
marginLeft: g ? `${-g / 2}px` : undefined,
|
|
37
|
+
marginRight: g ? `${-g / 2}px` : undefined,
|
|
38
|
+
justifyContent:
|
|
39
|
+
props.justify === 'start'
|
|
40
|
+
? 'flex-start'
|
|
41
|
+
: props.justify === 'end'
|
|
42
|
+
? 'flex-end'
|
|
43
|
+
: props.justify === 'center'
|
|
44
|
+
? 'center'
|
|
45
|
+
: props.justify,
|
|
46
|
+
alignItems:
|
|
47
|
+
props.align === 'top' ? 'flex-start' : props.align === 'bottom' ? 'flex-end' : 'center',
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="scss" scoped>
|
|
53
|
+
.qiu-row {
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
position: relative;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="rootRef"
|
|
4
|
+
class="qiu-scrollbar"
|
|
5
|
+
:class="[wrapClass, { 'qiu-scrollbar--native': native }]"
|
|
6
|
+
:style="wrapStyle"
|
|
7
|
+
@scroll="onScroll"
|
|
8
|
+
>
|
|
9
|
+
<div class="qiu-scrollbar__view">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
defineOptions({ name: 'QiuScrollbar' })
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(
|
|
19
|
+
defineProps<{
|
|
20
|
+
maxHeight?: string | number
|
|
21
|
+
height?: string | number
|
|
22
|
+
native?: boolean
|
|
23
|
+
wrapClass?: string | string[] | Record<string, boolean>
|
|
24
|
+
}>(),
|
|
25
|
+
{
|
|
26
|
+
native: true,
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
scroll: [payload: { scrollTop: number; scrollLeft: number }]
|
|
32
|
+
}>()
|
|
33
|
+
|
|
34
|
+
const rootRef = ref<HTMLElement | null>(null)
|
|
35
|
+
|
|
36
|
+
const toCssSize = (v?: string | number) => {
|
|
37
|
+
if (v === undefined || v === null || v === '') return undefined
|
|
38
|
+
return typeof v === 'number' ? `${v}px` : String(v)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const wrapStyle = computed(() => {
|
|
42
|
+
const style: Record<string, string> = {}
|
|
43
|
+
const maxH = toCssSize(props.maxHeight)
|
|
44
|
+
const h = toCssSize(props.height)
|
|
45
|
+
if (maxH) style.maxHeight = maxH
|
|
46
|
+
if (h) style.height = h
|
|
47
|
+
return style
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const onScroll = (e: Event) => {
|
|
51
|
+
const t = e.target as HTMLElement
|
|
52
|
+
emit('scroll', { scrollTop: t.scrollTop, scrollLeft: t.scrollLeft })
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const setScrollTop = (top: number) => {
|
|
56
|
+
if (rootRef.value) rootRef.value.scrollTop = top
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const setScrollLeft = (left: number) => {
|
|
60
|
+
if (rootRef.value) rootRef.value.scrollLeft = left
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
defineExpose({
|
|
64
|
+
wrapRef: rootRef,
|
|
65
|
+
$el: rootRef,
|
|
66
|
+
setScrollTop,
|
|
67
|
+
setScrollLeft,
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.qiu-scrollbar {
|
|
73
|
+
flex: 1 1 auto;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
min-height: 0;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
overflow: auto;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
|
|
81
|
+
scrollbar-width: thin;
|
|
82
|
+
scrollbar-color: var(--qiu-border-color-lighter, var(--qiu-border-color-lighter, #e4e7ed)) transparent;
|
|
83
|
+
|
|
84
|
+
&::-webkit-scrollbar {
|
|
85
|
+
width: 3px;
|
|
86
|
+
height: 3px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&::-webkit-scrollbar-thumb {
|
|
90
|
+
background: var(--qiu-border-color, var(--qiu-border-color, #dcdfe6));
|
|
91
|
+
border-radius: 2px;
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
background: var(--qiu-text-color-placeholder, var(--qiu-text-color-placeholder, #a8abb2));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::-webkit-scrollbar-track {
|
|
99
|
+
background: transparent;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.qiu-scrollbar__view {
|
|
104
|
+
min-height: 100%;
|
|
105
|
+
min-width: 100%;
|
|
106
|
+
}
|
|
107
|
+
</style>
|