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,353 @@
|
|
|
1
|
+
/** QiuTable 列配置(props.columns) */
|
|
2
|
+
export interface QiuTableColumnConfig {
|
|
3
|
+
/** 列标题(同 title,优先 label) */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** vxe 别名,与 label 等价 */
|
|
6
|
+
title?: string;
|
|
7
|
+
prop?: string;
|
|
8
|
+
field?: string;
|
|
9
|
+
/** 固定列宽;与 minWidth 同时存在时以 width 为准 */
|
|
10
|
+
width?: string | number;
|
|
11
|
+
/** 最小列宽;未设 width 时作为弹性列下限,并可参与剩余宽度分配 */
|
|
12
|
+
minWidth?: string | number;
|
|
13
|
+
/** 最大列宽;拖拽与自适应时的上限 */
|
|
14
|
+
maxWidth?: string | number;
|
|
15
|
+
fixed?: boolean | 'left' | 'right';
|
|
16
|
+
sortable?: boolean | string;
|
|
17
|
+
/** 开启筛选;未传 filters 时按当前列数据自动生成选项 */
|
|
18
|
+
filterable?: boolean;
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
20
|
+
footerAlign?: 'left' | 'center' | 'right';
|
|
21
|
+
/**
|
|
22
|
+
* 编辑器类型(与 type 二选一,优先 editor)
|
|
23
|
+
* switch | select | input | number | date | datetime | text
|
|
24
|
+
*/
|
|
25
|
+
editor?: 'switch' | 'select' | 'input' | 'number' | 'date' | 'datetime' | 'time' | 'text';
|
|
26
|
+
/**
|
|
27
|
+
* 完整编辑渲染对象(优先于 editor / type)
|
|
28
|
+
* 对齐 vxe editRender:{ name, props, options, events, attrs, enabled }
|
|
29
|
+
*/
|
|
30
|
+
editRender?: string | QiuTableEditRender;
|
|
31
|
+
/**
|
|
32
|
+
* selection/index/seq,或编辑器类型别名
|
|
33
|
+
*/
|
|
34
|
+
type?: string;
|
|
35
|
+
editorProps?: Record<string, any>;
|
|
36
|
+
options?: {
|
|
37
|
+
label: string;
|
|
38
|
+
value: any;
|
|
39
|
+
}[];
|
|
40
|
+
slot?: string;
|
|
41
|
+
formatter?: (row: any, column: QiuTableColumnConfig, cellValue: any) => string;
|
|
42
|
+
editable?: boolean;
|
|
43
|
+
filters?: {
|
|
44
|
+
text: string;
|
|
45
|
+
value: any;
|
|
46
|
+
}[];
|
|
47
|
+
filterMethod?: (value: any, row: any, column: QiuTableColumnConfig) => boolean;
|
|
48
|
+
treeNode?: boolean;
|
|
49
|
+
dragSort?: boolean;
|
|
50
|
+
showOverflowTooltip?: boolean;
|
|
51
|
+
className?: string;
|
|
52
|
+
headerClassName?: string;
|
|
53
|
+
footerClassName?: string;
|
|
54
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
55
|
+
/** 多级表头子列(父子列自动合并表头单元格) */
|
|
56
|
+
children?: QiuTableColumnConfig[];
|
|
57
|
+
/** 表尾格式化 */
|
|
58
|
+
footerFormatter?: (params: {
|
|
59
|
+
column: QiuTableColumnConfig;
|
|
60
|
+
items: any[];
|
|
61
|
+
data: any[];
|
|
62
|
+
rowIndex: number;
|
|
63
|
+
}) => string;
|
|
64
|
+
/** 快捷聚合:sum | avg | count(配合 showFooter) */
|
|
65
|
+
aggFunc?: 'sum' | 'avg' | 'count';
|
|
66
|
+
resizable?: boolean;
|
|
67
|
+
/** 全局 formats 名称,或列内 formatter 优先 */
|
|
68
|
+
format?: string;
|
|
69
|
+
/** 全局 renderer 名称 */
|
|
70
|
+
cellRender?: string | {
|
|
71
|
+
name: string;
|
|
72
|
+
props?: Record<string, any>;
|
|
73
|
+
};
|
|
74
|
+
/** 自定义列面板中是否默认可见 */
|
|
75
|
+
visible?: boolean;
|
|
76
|
+
/** 透传业务参数 */
|
|
77
|
+
params?: Record<string, any>;
|
|
78
|
+
}
|
|
79
|
+
/** 列 editRender 完整对象 */
|
|
80
|
+
export interface QiuTableEditRender {
|
|
81
|
+
/** 内置:input/select/number/date/datetime/time/switch/text;或 QiuTableEditRenderer 注册名 */
|
|
82
|
+
name: string;
|
|
83
|
+
props?: Record<string, any>;
|
|
84
|
+
options?: {
|
|
85
|
+
label: string;
|
|
86
|
+
value: any;
|
|
87
|
+
}[];
|
|
88
|
+
attrs?: Record<string, any>;
|
|
89
|
+
events?: Record<string, (...args: any[]) => void>;
|
|
90
|
+
/** false 时禁用编辑 */
|
|
91
|
+
enabled?: boolean;
|
|
92
|
+
autofocus?: string | boolean;
|
|
93
|
+
}
|
|
94
|
+
/** @deprecated 使用 QiuTableColumnConfig */
|
|
95
|
+
export type QiuTableColumn = QiuTableColumnConfig;
|
|
96
|
+
export interface QiuTableRegisteredColumn {
|
|
97
|
+
id: symbol;
|
|
98
|
+
props: Record<string, any>;
|
|
99
|
+
slots: {
|
|
100
|
+
default?: (scope: QiuTableCellScope) => any;
|
|
101
|
+
header?: (scope: QiuTableHeaderScope) => any;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface QiuTableCellScope {
|
|
105
|
+
row: any;
|
|
106
|
+
column: QiuTableColumnConfig;
|
|
107
|
+
$index: number;
|
|
108
|
+
cellValue: any;
|
|
109
|
+
level?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface QiuTableHeaderScope {
|
|
112
|
+
column: QiuTableColumnConfig;
|
|
113
|
+
}
|
|
114
|
+
export interface QiuTableFlatRow {
|
|
115
|
+
row: any;
|
|
116
|
+
level: number;
|
|
117
|
+
hasChildren: boolean;
|
|
118
|
+
expanded: boolean;
|
|
119
|
+
flatIndex: number;
|
|
120
|
+
}
|
|
121
|
+
export interface QiuTableRegisterContext {
|
|
122
|
+
register: (col: QiuTableRegisteredColumn) => void;
|
|
123
|
+
unregister: (id: symbol) => void;
|
|
124
|
+
update: (col: QiuTableRegisteredColumn) => void;
|
|
125
|
+
}
|
|
126
|
+
export interface QiuTableEditConfig {
|
|
127
|
+
trigger?: 'click' | 'dblclick' | 'manual' | 'always';
|
|
128
|
+
mode?: 'cell' | 'row';
|
|
129
|
+
showIcon?: boolean;
|
|
130
|
+
/** 点击表格外自动清除编辑态,默认 true */
|
|
131
|
+
autoClear?: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface QiuTableSortConfig {
|
|
134
|
+
/** true:不本地排序,仅抛 sort-change */
|
|
135
|
+
remote?: boolean;
|
|
136
|
+
multiple?: boolean;
|
|
137
|
+
chronological?: boolean;
|
|
138
|
+
defaultSort?: {
|
|
139
|
+
field?: string;
|
|
140
|
+
prop?: string;
|
|
141
|
+
order?: 'asc' | 'desc' | null;
|
|
142
|
+
} | {
|
|
143
|
+
field?: string;
|
|
144
|
+
prop?: string;
|
|
145
|
+
order?: 'asc' | 'desc' | null;
|
|
146
|
+
}[];
|
|
147
|
+
trigger?: 'default' | 'cell';
|
|
148
|
+
}
|
|
149
|
+
export interface QiuTableRadioConfig {
|
|
150
|
+
highlight?: boolean;
|
|
151
|
+
checkRowKey?: string | number;
|
|
152
|
+
strict?: boolean;
|
|
153
|
+
trigger?: 'default' | 'row' | 'cell';
|
|
154
|
+
}
|
|
155
|
+
export interface QiuTableExpandConfig {
|
|
156
|
+
expandAll?: boolean;
|
|
157
|
+
accordion?: boolean;
|
|
158
|
+
lazy?: boolean;
|
|
159
|
+
labelField?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface QiuTableColumnDragConfig {
|
|
162
|
+
enabled?: boolean;
|
|
163
|
+
showIcon?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export interface QiuTableKeepSourceConfig {
|
|
166
|
+
enabled?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export interface QiuTableFilterConfig {
|
|
169
|
+
/** true:不本地过滤,仅抛 filter-change */
|
|
170
|
+
remote?: boolean;
|
|
171
|
+
}
|
|
172
|
+
export interface QiuTableRowConfig {
|
|
173
|
+
/** 点击高亮当前行,默认 true */
|
|
174
|
+
isCurrent?: boolean;
|
|
175
|
+
/** 鼠标悬停高亮,默认 true */
|
|
176
|
+
isHover?: boolean;
|
|
177
|
+
/** vxe 别名 → isHover */
|
|
178
|
+
highlightHoverRow?: boolean;
|
|
179
|
+
/** vxe 别名 → isCurrent */
|
|
180
|
+
highlightCurrentRow?: boolean;
|
|
181
|
+
height?: number;
|
|
182
|
+
keyField?: string;
|
|
183
|
+
}
|
|
184
|
+
/** 键盘行为(对齐 vxe keyboardConfig) */
|
|
185
|
+
export interface QiuTableKeyboardConfig {
|
|
186
|
+
/** ↑↓ 移动当前行 / 活动单元格,默认 true */
|
|
187
|
+
isArrow?: boolean;
|
|
188
|
+
/** Enter 进入编辑,默认 true(需 editable) */
|
|
189
|
+
isEnter?: boolean;
|
|
190
|
+
/** Esc 退出编辑,默认 true */
|
|
191
|
+
isEsc?: boolean;
|
|
192
|
+
/** Tab 横向移动单元格,默认 false */
|
|
193
|
+
isTab?: boolean;
|
|
194
|
+
/** Ctrl+Z / Ctrl+Y 撤销重做,默认 true(需 historyConfig 开启) */
|
|
195
|
+
isUndo?: boolean;
|
|
196
|
+
/** 编辑时方向键是否仍导航,默认 false */
|
|
197
|
+
isEdit?: boolean;
|
|
198
|
+
}
|
|
199
|
+
/** 剪贴板(对齐 vxe clipboardConfig) */
|
|
200
|
+
export interface QiuTableClipboardConfig {
|
|
201
|
+
/** Ctrl+C 复制选区,默认 true */
|
|
202
|
+
isCopy?: boolean;
|
|
203
|
+
/** Ctrl+X 剪切,默认 true */
|
|
204
|
+
isCut?: boolean;
|
|
205
|
+
/** Ctrl+V 粘贴,默认 true */
|
|
206
|
+
isPaste?: boolean;
|
|
207
|
+
}
|
|
208
|
+
/** 溢出提示(对齐 vxe tooltipConfig) */
|
|
209
|
+
export interface QiuTableTooltipConfig {
|
|
210
|
+
/** 全局开启溢出 tooltip,默认 true */
|
|
211
|
+
showAll?: boolean;
|
|
212
|
+
/** 主题:light | dark */
|
|
213
|
+
theme?: 'light' | 'dark';
|
|
214
|
+
/** 进入延迟 ms */
|
|
215
|
+
enterDelay?: number;
|
|
216
|
+
/** 离开延迟 ms */
|
|
217
|
+
leaveDelay?: number;
|
|
218
|
+
/** 自定义内容;返回 null 则不显示 */
|
|
219
|
+
contentMethod?: (params: {
|
|
220
|
+
row: any;
|
|
221
|
+
column: QiuTableColumnConfig;
|
|
222
|
+
cellValue: any;
|
|
223
|
+
}) => string | null | undefined;
|
|
224
|
+
}
|
|
225
|
+
/** 导出配置对象(对齐 vxe exportConfig) */
|
|
226
|
+
export interface QiuTableExportConfig {
|
|
227
|
+
filename?: string;
|
|
228
|
+
/** 默认格式 */
|
|
229
|
+
type?: 'csv' | 'xls' | 'xlsx';
|
|
230
|
+
sheetName?: string;
|
|
231
|
+
/** 导出模式:当前页 / 全部 / 选中 / 指定页码范围 */
|
|
232
|
+
mode?: 'current' | 'all' | 'selected' | 'range';
|
|
233
|
+
modes?: Array<'current' | 'all' | 'selected' | 'range'>;
|
|
234
|
+
/** 范围导出起始页(从 1 开始,mode=range 时有效) */
|
|
235
|
+
startPage?: number;
|
|
236
|
+
/** 范围导出结束页(从 1 开始,mode=range 时有效) */
|
|
237
|
+
endPage?: number;
|
|
238
|
+
/** 打开导出前 */
|
|
239
|
+
beforeExportMethod?: (params: {
|
|
240
|
+
options: QiuTableExportConfig;
|
|
241
|
+
}) => void | boolean | Promise<void | boolean>;
|
|
242
|
+
/** 导出后 */
|
|
243
|
+
afterExportMethod?: (params: {
|
|
244
|
+
options: QiuTableExportConfig;
|
|
245
|
+
}) => void;
|
|
246
|
+
/** 列过滤 */
|
|
247
|
+
columnFilterMethod?: (params: {
|
|
248
|
+
column: QiuTableColumnConfig;
|
|
249
|
+
}) => boolean;
|
|
250
|
+
}
|
|
251
|
+
/** 自定义工具栏工具 */
|
|
252
|
+
export interface QiuTableToolbarTool {
|
|
253
|
+
/** 唯一名称 */
|
|
254
|
+
name: string;
|
|
255
|
+
/** 渲染组件;传入组件对象 */
|
|
256
|
+
component?: any;
|
|
257
|
+
/** 透传给组件的 props */
|
|
258
|
+
props?: Record<string, any>;
|
|
259
|
+
/** 位置:left | center | right,默认 right */
|
|
260
|
+
position?: 'left' | 'center' | 'right';
|
|
261
|
+
/** 排序权重 */
|
|
262
|
+
order?: number;
|
|
263
|
+
}
|
|
264
|
+
/** 工具栏配置对象(对齐 vxe toolbarConfig) */
|
|
265
|
+
export interface QiuTableToolbarConfig {
|
|
266
|
+
enabled?: boolean;
|
|
267
|
+
/** 刷新按钮,默认 true */
|
|
268
|
+
refresh?: boolean;
|
|
269
|
+
/** 导出按钮,默认 true */
|
|
270
|
+
export?: boolean;
|
|
271
|
+
/** 导入按钮,默认 false */
|
|
272
|
+
import?: boolean;
|
|
273
|
+
/** 打印按钮,默认 false */
|
|
274
|
+
print?: boolean;
|
|
275
|
+
/** 列自定义按钮,默认 true */
|
|
276
|
+
custom?: boolean;
|
|
277
|
+
/** 全屏按钮,默认 true */
|
|
278
|
+
zoom?: boolean;
|
|
279
|
+
/** Excel 复制按钮,默认 false */
|
|
280
|
+
copy?: boolean;
|
|
281
|
+
/** 内置工具按钮的位置,默认 right */
|
|
282
|
+
toolsPlacement?: 'left' | 'center' | 'right';
|
|
283
|
+
/** 自定义工具插件 */
|
|
284
|
+
customTools?: QiuTableToolbarTool[];
|
|
285
|
+
}
|
|
286
|
+
/** 编辑历史(undo/redo) */
|
|
287
|
+
export interface QiuTableHistoryConfig {
|
|
288
|
+
/** 默认 false;设 true 或配合 keyboardConfig.isUndo */
|
|
289
|
+
enabled?: boolean;
|
|
290
|
+
/** 栈深度,默认 50 */
|
|
291
|
+
size?: number;
|
|
292
|
+
}
|
|
293
|
+
/** 解析行 hover 是否开启 */
|
|
294
|
+
export declare function resolveRowHover(cfg?: QiuTableRowConfig): boolean;
|
|
295
|
+
/** 解析当前行高亮是否开启 */
|
|
296
|
+
export declare function resolveRowCurrent(cfg?: QiuTableRowConfig): boolean;
|
|
297
|
+
/** 解析列 editRender 对象 */
|
|
298
|
+
export declare function resolveEditRender(col: Pick<QiuTableColumnConfig, 'editRender' | 'editor' | 'type' | 'editorProps' | 'options'>): QiuTableEditRender | undefined;
|
|
299
|
+
export interface QiuTableColumnConfigExtra {
|
|
300
|
+
resizable?: boolean;
|
|
301
|
+
/** 未指定列宽时的默认最小宽 */
|
|
302
|
+
minWidth?: number;
|
|
303
|
+
/** 默认最大宽 */
|
|
304
|
+
maxWidth?: number;
|
|
305
|
+
/** 默认固定宽 */
|
|
306
|
+
width?: number;
|
|
307
|
+
}
|
|
308
|
+
export interface QiuTableMergeCell {
|
|
309
|
+
row: number;
|
|
310
|
+
col: number;
|
|
311
|
+
rowspan: number;
|
|
312
|
+
colspan: number;
|
|
313
|
+
}
|
|
314
|
+
export type QiuTableSpanMethod = (params: {
|
|
315
|
+
row: any;
|
|
316
|
+
column: QiuTableColumnConfig;
|
|
317
|
+
rowIndex: number;
|
|
318
|
+
columnIndex: number;
|
|
319
|
+
data: any[];
|
|
320
|
+
}) => {
|
|
321
|
+
rowspan: number;
|
|
322
|
+
colspan: number;
|
|
323
|
+
} | [number, number] | number[] | null | undefined;
|
|
324
|
+
export interface QiuTablePagerConfig {
|
|
325
|
+
enabled?: boolean;
|
|
326
|
+
currentPage?: number;
|
|
327
|
+
pageSize?: number;
|
|
328
|
+
pageSizes?: number[];
|
|
329
|
+
total?: number;
|
|
330
|
+
layouts?: string[];
|
|
331
|
+
background?: boolean;
|
|
332
|
+
small?: boolean;
|
|
333
|
+
}
|
|
334
|
+
export interface QiuTableFooterMethodParams {
|
|
335
|
+
columns: QiuTableColumnConfig[];
|
|
336
|
+
data: any[];
|
|
337
|
+
}
|
|
338
|
+
export type QiuTableFooterMethod = (params: QiuTableFooterMethodParams) => string[][];
|
|
339
|
+
export interface QiuTableHeaderCell {
|
|
340
|
+
column: QiuTableColumnConfig & {
|
|
341
|
+
_key: string;
|
|
342
|
+
};
|
|
343
|
+
label: string;
|
|
344
|
+
colspan: number;
|
|
345
|
+
rowspan: number;
|
|
346
|
+
isLeaf: boolean;
|
|
347
|
+
colIndex: number;
|
|
348
|
+
}
|
|
349
|
+
export declare const QIU_TABLE_REGISTER_KEY: unique symbol;
|
|
350
|
+
export declare const QIU_EDITOR_TYPES: Set<string>;
|
|
351
|
+
export declare const QIU_SPECIAL_COL_TYPES: Set<string>;
|
|
352
|
+
export declare function resolveColumnEditor(col: Pick<QiuTableColumnConfig, 'editor' | 'type' | 'editRender'>): QiuTableColumnConfig['editor'] | string | undefined;
|
|
353
|
+
export declare function resolveColumnProp(col: QiuTableColumnConfig): string | undefined;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { QiuTableColumnConfig } from './types';
|
|
3
|
+
export type QiuTableCellPos = {
|
|
4
|
+
rowId: string;
|
|
5
|
+
/** 叶子列 prop / field */
|
|
6
|
+
prop: string;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
colIndex: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 键盘/剪贴板活动单元格与矩形选区
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTableArea(opts: {
|
|
14
|
+
getRows: () => any[];
|
|
15
|
+
getColumns: () => (QiuTableColumnConfig & {
|
|
16
|
+
_key: string;
|
|
17
|
+
})[];
|
|
18
|
+
getRowId: (row: any) => string;
|
|
19
|
+
}): {
|
|
20
|
+
activeCell: Ref<QiuTableCellPos | null>;
|
|
21
|
+
areaEnd: Ref<{
|
|
22
|
+
rowId: string;
|
|
23
|
+
prop: string;
|
|
24
|
+
rowIndex: number;
|
|
25
|
+
colIndex: number;
|
|
26
|
+
}, QiuTableCellPos | {
|
|
27
|
+
rowId: string;
|
|
28
|
+
prop: string;
|
|
29
|
+
rowIndex: number;
|
|
30
|
+
colIndex: number;
|
|
31
|
+
}>;
|
|
32
|
+
areaBounds: globalThis.ComputedRef<{
|
|
33
|
+
r0: number;
|
|
34
|
+
r1: number;
|
|
35
|
+
c0: number;
|
|
36
|
+
c1: number;
|
|
37
|
+
}>;
|
|
38
|
+
setActive: (row: any, col: QiuTableColumnConfig, extend?: boolean) => void;
|
|
39
|
+
clearArea: () => void;
|
|
40
|
+
isCellInArea: (row: any, col: QiuTableColumnConfig) => boolean;
|
|
41
|
+
isActiveCell: (row: any, col: QiuTableColumnConfig) => boolean;
|
|
42
|
+
moveActive: (dRow: number, dCol: number, extend?: boolean) => {
|
|
43
|
+
row: any;
|
|
44
|
+
prop: string;
|
|
45
|
+
pos: QiuTableCellPos;
|
|
46
|
+
};
|
|
47
|
+
buildTsv: (formatCell: (row: any, prop: string) => string) => string;
|
|
48
|
+
pasteTsv: (text: string, apply: (row: any, prop: string, value: string) => void) => void;
|
|
49
|
+
clearAreaValues: (apply: (row: any, prop: string, value: string) => void) => void;
|
|
50
|
+
findPos: (rowId: string, prop: string) => QiuTableCellPos | null;
|
|
51
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { QiuTableColumnConfig, QiuTableHeaderCell } from './types';
|
|
2
|
+
export type LeafColumn = QiuTableColumnConfig & {
|
|
3
|
+
_key: string;
|
|
4
|
+
_defaultSlot?: (scope: any) => any;
|
|
5
|
+
_headerSlot?: (scope: any) => any;
|
|
6
|
+
};
|
|
7
|
+
/** 解析列宽为像素;百分比需传入 containerWidth */
|
|
8
|
+
export declare function parseWidth(w?: string | number, containerWidth?: number): number;
|
|
9
|
+
export declare function colStyle(col: LeafColumn): Record<string, string>;
|
|
10
|
+
export type ColumnSizeHints = {
|
|
11
|
+
/** 显式 width(固定列宽) */
|
|
12
|
+
fixedWidth: number;
|
|
13
|
+
minWidth: number;
|
|
14
|
+
maxWidth: number;
|
|
15
|
+
/** 无 width,仅靠 minWidth 参与剩余空间分配 */
|
|
16
|
+
isFlex: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function getColumnSizeHints(col: LeafColumn, containerWidth?: number, defaults?: {
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
maxWidth?: number;
|
|
21
|
+
}): ColumnSizeHints;
|
|
22
|
+
/**
|
|
23
|
+
* 计算每列最终渲染宽度(对齐 vxe:width 固定;仅 minWidth 的列吃剩余空间)
|
|
24
|
+
* resized 优先
|
|
25
|
+
*/
|
|
26
|
+
export declare function computeRenderWidths(leafColumns: LeafColumn[], opts: {
|
|
27
|
+
containerWidth: number;
|
|
28
|
+
showSelection: boolean;
|
|
29
|
+
showIndex: boolean;
|
|
30
|
+
showRadio?: boolean;
|
|
31
|
+
showExpand?: boolean;
|
|
32
|
+
fit?: boolean;
|
|
33
|
+
resized?: Record<string, number>;
|
|
34
|
+
defaults?: {
|
|
35
|
+
minWidth?: number;
|
|
36
|
+
maxWidth?: number;
|
|
37
|
+
};
|
|
38
|
+
}): Record<string, number>;
|
|
39
|
+
export declare function computeTableMinWidth(leafColumns: LeafColumn[], opts: {
|
|
40
|
+
showSelection: boolean;
|
|
41
|
+
showIndex: boolean;
|
|
42
|
+
showRadio?: boolean;
|
|
43
|
+
showExpand?: boolean;
|
|
44
|
+
},
|
|
45
|
+
/** 优先用最终渲染宽 / 拖拽宽 */
|
|
46
|
+
resolveWidth?: (col: LeafColumn) => number | undefined, defaults?: {
|
|
47
|
+
minWidth?: number;
|
|
48
|
+
maxWidth?: number;
|
|
49
|
+
}): number;
|
|
50
|
+
export declare function leftOffsetForColumn(leafColumns: LeafColumn[], colKey: string, opts: {
|
|
51
|
+
showSelection: boolean;
|
|
52
|
+
showIndex: boolean;
|
|
53
|
+
showRadio?: boolean;
|
|
54
|
+
showExpand?: boolean;
|
|
55
|
+
}, resolveWidth?: (col: LeafColumn) => number): number;
|
|
56
|
+
export declare function rightOffsetForColumn(leafColumns: LeafColumn[], colKey: string, resolveWidth?: (col: LeafColumn) => number): number;
|
|
57
|
+
/** 是否左侧固定列中的最后一列(用于阴影) */
|
|
58
|
+
export declare function isLastFixedLeft(leafColumns: LeafColumn[], colKey: string): boolean;
|
|
59
|
+
/** 是否右侧固定列中的第一列(从右往左的最内侧,用于阴影) */
|
|
60
|
+
export declare function isFirstFixedRight(leafColumns: LeafColumn[], colKey: string): boolean;
|
|
61
|
+
/** 生成稳定且唯一的列 key(同 prop 多列也不会冲突) */
|
|
62
|
+
export declare function makeColumnKey(col: QiuTableColumnConfig, index: number, prefix?: string): string;
|
|
63
|
+
export { makeColumnKey as createColumnKey };
|
|
64
|
+
/** 扁平化叶子列(跳过仅分组的父列) */
|
|
65
|
+
export declare function flattenLeafColumns(columns: QiuTableColumnConfig[], prefix?: string): LeafColumn[];
|
|
66
|
+
/** 生成多级表头矩阵(每行一组 th) */
|
|
67
|
+
export declare function buildHeaderRows(columns: QiuTableColumnConfig[], keyPrefix?: string): QiuTableHeaderCell[][];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { QiuTableColumnConfig, QiuTableEditConfig } from './types';
|
|
3
|
+
export declare function useTableEdit(opts: {
|
|
4
|
+
editable: Ref<boolean> | (() => boolean);
|
|
5
|
+
editTrigger: Ref<string> | (() => string);
|
|
6
|
+
editConfig: Ref<QiuTableEditConfig | undefined> | (() => QiuTableEditConfig | undefined);
|
|
7
|
+
getRowId: (row: any) => string;
|
|
8
|
+
emit: (event: string, payload: any) => void;
|
|
9
|
+
}): {
|
|
10
|
+
editing: Ref<{
|
|
11
|
+
rowId: string;
|
|
12
|
+
prop: string;
|
|
13
|
+
}, {
|
|
14
|
+
rowId: string;
|
|
15
|
+
prop: string;
|
|
16
|
+
} | {
|
|
17
|
+
rowId: string;
|
|
18
|
+
prop: string;
|
|
19
|
+
}>;
|
|
20
|
+
getColEditor: (col: QiuTableColumnConfig) => string;
|
|
21
|
+
getEditRender: (col: QiuTableColumnConfig) => import('./types').QiuTableEditRender;
|
|
22
|
+
getProp: (col: QiuTableColumnConfig) => string;
|
|
23
|
+
canEditCol: (col: QiuTableColumnConfig) => boolean;
|
|
24
|
+
hasAlwaysEditor: (col: QiuTableColumnConfig) => boolean;
|
|
25
|
+
isInputEditor: (col: QiuTableColumnConfig) => boolean;
|
|
26
|
+
isEditing: (row: any, col: QiuTableColumnConfig) => boolean;
|
|
27
|
+
isInputFill: (row: any, col: QiuTableColumnConfig) => boolean;
|
|
28
|
+
startEdit: (row: any, col: QiuTableColumnConfig, focusRoot?: HTMLElement | null) => void;
|
|
29
|
+
clearEdit: () => void;
|
|
30
|
+
commitEdit: (row: any, col: QiuTableColumnConfig, value: any) => void;
|
|
31
|
+
inEditGuard: () => boolean;
|
|
32
|
+
getTrigger: () => string;
|
|
33
|
+
getMode: () => "cell" | "row";
|
|
34
|
+
getAutoClear: () => boolean;
|
|
35
|
+
getShowIcon: () => boolean;
|
|
36
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/** 行展开(非树) */
|
|
3
|
+
export declare function useExpandRows(opts: {
|
|
4
|
+
getRowId: (row: any) => string;
|
|
5
|
+
}): {
|
|
6
|
+
expanded: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
7
|
+
isRowExpand: (row: any) => boolean;
|
|
8
|
+
toggleRowExpand: (row: any) => void;
|
|
9
|
+
setRowExpand: (rows: any[], checked: boolean) => void;
|
|
10
|
+
clearRowExpand: () => void;
|
|
11
|
+
};
|
|
12
|
+
/** 单选 radio */
|
|
13
|
+
export declare function useRadioRow(opts: {
|
|
14
|
+
getRowId: (row: any) => string;
|
|
15
|
+
}): {
|
|
16
|
+
radioRowId: Ref<string, string>;
|
|
17
|
+
isRadioChecked: (row: any) => boolean;
|
|
18
|
+
setRadioRow: (row: any | null) => void;
|
|
19
|
+
clearRadioRow: () => void;
|
|
20
|
+
};
|
|
21
|
+
/** keepSource 脏数据追踪 */
|
|
22
|
+
export declare function useKeepSource(opts: {
|
|
23
|
+
enabled: () => boolean;
|
|
24
|
+
getRowId: (row: any) => string;
|
|
25
|
+
data: Ref<any[]> | (() => any[]);
|
|
26
|
+
}): {
|
|
27
|
+
snapshot: () => void;
|
|
28
|
+
isUpdateByRow: (row: any) => boolean;
|
|
29
|
+
getUpdateRecords: () => any[];
|
|
30
|
+
getInsertRecords: () => any[];
|
|
31
|
+
reloadRow: (row: any) => void;
|
|
32
|
+
sourceMap: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
export type SortItem = {
|
|
35
|
+
prop: string;
|
|
36
|
+
order: 'asc' | 'desc';
|
|
37
|
+
};
|
|
38
|
+
export declare function compareRows(a: any, b: any, sorts: SortItem[]): number;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type QiuTableHistoryPatch = {
|
|
2
|
+
rowId: string;
|
|
3
|
+
prop: string;
|
|
4
|
+
oldValue: any;
|
|
5
|
+
newValue: any;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 单元格编辑 undo/redo 栈
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTableHistory(opts: {
|
|
11
|
+
enabled: () => boolean;
|
|
12
|
+
size?: () => number;
|
|
13
|
+
findRow: (rowId: string) => any | null;
|
|
14
|
+
onApply?: (patch: QiuTableHistoryPatch, direction: 'undo' | 'redo') => void;
|
|
15
|
+
}): {
|
|
16
|
+
undoStack: globalThis.Ref<{
|
|
17
|
+
rowId: string;
|
|
18
|
+
prop: string;
|
|
19
|
+
oldValue: any;
|
|
20
|
+
newValue: any;
|
|
21
|
+
}[], QiuTableHistoryPatch[] | {
|
|
22
|
+
rowId: string;
|
|
23
|
+
prop: string;
|
|
24
|
+
oldValue: any;
|
|
25
|
+
newValue: any;
|
|
26
|
+
}[]>;
|
|
27
|
+
redoStack: globalThis.Ref<{
|
|
28
|
+
rowId: string;
|
|
29
|
+
prop: string;
|
|
30
|
+
oldValue: any;
|
|
31
|
+
newValue: any;
|
|
32
|
+
}[], QiuTableHistoryPatch[] | {
|
|
33
|
+
rowId: string;
|
|
34
|
+
prop: string;
|
|
35
|
+
oldValue: any;
|
|
36
|
+
newValue: any;
|
|
37
|
+
}[]>;
|
|
38
|
+
push: (patch: QiuTableHistoryPatch) => void;
|
|
39
|
+
undo: () => boolean;
|
|
40
|
+
redo: () => boolean;
|
|
41
|
+
clear: () => void;
|
|
42
|
+
canUndo: () => boolean;
|
|
43
|
+
canRedo: () => boolean;
|
|
44
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QiuTableColumnConfig, QiuTableMergeCell, QiuTableSpanMethod } from './types';
|
|
2
|
+
export type SpanResult = {
|
|
3
|
+
rowspan: number;
|
|
4
|
+
colspan: number;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 根据 spanMethod / mergeCells 计算单元格合并。
|
|
9
|
+
* columnIndex 为叶子数据列下标(不含 selection/index)。
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveCellSpan(opts: {
|
|
12
|
+
row: any;
|
|
13
|
+
column: QiuTableColumnConfig;
|
|
14
|
+
rowIndex: number;
|
|
15
|
+
columnIndex: number;
|
|
16
|
+
data: any[];
|
|
17
|
+
spanMethod?: QiuTableSpanMethod;
|
|
18
|
+
mergeCells?: QiuTableMergeCell[];
|
|
19
|
+
/** 预计算:被合并覆盖的格子 key `${rowIndex}:${columnIndex}` */
|
|
20
|
+
covered?: Set<string>;
|
|
21
|
+
}): SpanResult;
|
|
22
|
+
/** 根据 mergeCells 生成被覆盖格子集合 */
|
|
23
|
+
export declare function buildMergeCoveredSet(mergeCells?: QiuTableMergeCell[]): Set<string>;
|
|
24
|
+
/**
|
|
25
|
+
* 将 mergeHeaderCells 应用到表头矩阵(按 row/col 下标合并 th)
|
|
26
|
+
* children 多级表头已自动合并;本 API 用于扁平表头额外合并。
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyMergeHeaderCells(headerRows: import('./types').QiuTableHeaderCell[][], merges?: QiuTableMergeCell[]): import('./types').QiuTableHeaderCell[][];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/** 列宽拖拽:写入 columnWidths,供 colgroup / 单元格样式使用 */
|
|
3
|
+
export declare function useColumnResize(opts?: {
|
|
4
|
+
minWidth?: number;
|
|
5
|
+
maxWidth?: number;
|
|
6
|
+
}): {
|
|
7
|
+
columnWidths: Record<string, number>;
|
|
8
|
+
getWidth: (key: string, fallback?: string | number) => number;
|
|
9
|
+
onResizeStart: (key: string, currentWidth: number, e: MouseEvent, bounds?: {
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
}) => void;
|
|
13
|
+
setColumnWidth: (key: string, width: number) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function bindAutoClearEdit(opts: {
|
|
16
|
+
rootRef: Ref<HTMLElement | null>;
|
|
17
|
+
enabled: () => boolean;
|
|
18
|
+
clearEdit: () => void;
|
|
19
|
+
}): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 表头 / 表体 / 表尾横向滚动同步。
|
|
4
|
+
* 对齐策略(双表经典坑):
|
|
5
|
+
* 1. 量出 body 纵向滚动条占用
|
|
6
|
+
* 2. header/footer wrap 用 paddingRight 留出同宽空隙
|
|
7
|
+
* 3. 强制 header/footer 内 table 的像素宽 = body table 宽
|
|
8
|
+
* 4. 把 body 各 col 的实际像素宽抄到 header/footer
|
|
9
|
+
* 5. 有纵向条时由根节点 --qiu-table-v-scrollbar + --scroll-y 在 padding 内侧补竖线
|
|
10
|
+
*
|
|
11
|
+
* @author qiuye
|
|
12
|
+
* @email yjk150@qq.com
|
|
13
|
+
* @date 2026-08-16
|
|
14
|
+
*/
|
|
15
|
+
export declare function useScrollSync(opts: {
|
|
16
|
+
headerWrapRef: Ref<HTMLElement | null>;
|
|
17
|
+
bodyWrapRef: Ref<HTMLElement | null>;
|
|
18
|
+
footerWrapRef: Ref<HTMLElement | null>;
|
|
19
|
+
onLayoutChange?: () => void;
|
|
20
|
+
}): {
|
|
21
|
+
scrollbarSize: Ref<number, number>;
|
|
22
|
+
measureScrollbar: () => void;
|
|
23
|
+
syncFromBody: () => void;
|
|
24
|
+
scheduleLayout: () => void;
|
|
25
|
+
};
|