@vaebe/ccui 2.0.1-beta.1 → 2.0.1-beta.3
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 +1 -1
- package/affix/index.d.ts +10 -0
- package/affix/src/affix-types.d.ts +20 -0
- package/affix/src/affix.d.ts +20 -0
- package/alert/index.d.ts +10 -0
- package/alert/src/alert-types.d.ts +48 -0
- package/alert/src/alert.d.ts +36 -0
- package/anchor/index.d.ts +10 -0
- package/anchor/src/anchor-types.d.ts +37 -0
- package/anchor/src/anchor.d.ts +31 -0
- package/auto-complete/index.d.ts +10 -0
- package/auto-complete/index.es.js +1986 -0
- package/auto-complete/index.umd.js +1 -0
- package/auto-complete/src/auto-complete-types.d.ts +134 -0
- package/auto-complete/src/auto-complete.d.ts +94 -0
- package/auto-complete/style.css +2 -0
- package/avatar/index.d.ts +10 -0
- package/avatar/src/avatar-types.d.ts +53 -0
- package/avatar/src/avatar.d.ts +36 -0
- package/avatar/src/components/icon-body.d.ts +4 -0
- package/avatar/src/components/icon-img-error.d.ts +4 -0
- package/avatar/src/components/icon-nobody.d.ts +4 -0
- package/avatar/src/composables/use-get-background-color.d.ts +1 -0
- package/avatar/src/composables/use-get-display-name.d.ts +1 -0
- package/avatar-group/index.d.ts +12 -0
- package/avatar-group/index.es.js +119 -0
- package/avatar-group/index.umd.js +1 -0
- package/avatar-group/src/avatar-group-types.d.ts +56 -0
- package/avatar-group/src/avatar-group.d.ts +27 -0
- package/avatar-group/style.css +2 -0
- package/badge/index.d.ts +10 -0
- package/badge/src/badge-types.d.ts +52 -0
- package/badge/src/badge.d.ts +36 -0
- package/badge-ribbon/index.d.ts +12 -0
- package/badge-ribbon/index.es.js +84 -0
- package/badge-ribbon/index.umd.js +1 -0
- package/badge-ribbon/src/badge-ribbon-types.d.ts +30 -0
- package/badge-ribbon/src/badge-ribbon.d.ts +17 -0
- package/badge-ribbon/style.css +2 -0
- package/breadcrumb/index.d.ts +10 -0
- package/breadcrumb/src/breadcrumb-types.d.ts +29 -0
- package/breadcrumb/src/breadcrumb.d.ts +21 -0
- package/button/index.d.ts +12 -0
- package/button/src/button-group.d.ts +12 -0
- package/button/src/button-types.d.ts +168 -0
- package/button/src/button.d.ts +75 -0
- package/button-3d/index.d.ts +10 -0
- package/button-3d/src/button-3d-types.d.ts +27 -0
- package/button-3d/src/button-3d.d.ts +23 -0
- package/calendar/index.d.ts +10 -0
- package/calendar/src/calendar-types.d.ts +56 -0
- package/calendar/src/calendar.d.ts +27 -0
- package/card/index.d.ts +10 -0
- package/card/src/card-types.d.ts +34 -0
- package/card/src/card.d.ts +21 -0
- package/card-meta/index.d.ts +11 -0
- package/card-meta/index.es.js +53 -0
- package/card-meta/index.umd.js +1 -0
- package/card-meta/src/card-meta-types.d.ts +19 -0
- package/card-meta/src/card-meta.d.ts +14 -0
- package/card-meta/style.css +2 -0
- package/carousel/index.d.ts +10 -0
- package/carousel/index.es.js +306 -0
- package/carousel/index.umd.js +1 -0
- package/carousel/src/carousel-types.d.ts +72 -0
- package/carousel/src/carousel.d.ts +58 -0
- package/carousel/style.css +2 -0
- package/cascader/index.d.ts +12 -0
- package/cascader/index.es.js +2267 -0
- package/cascader/index.umd.js +1 -0
- package/cascader/src/cascader-types.d.ts +214 -0
- package/cascader/src/cascader.d.ts +133 -0
- package/cascader/style.css +2 -0
- package/check-box/index.d.ts +10 -0
- package/check-box/src/check-box-group.d.ts +31 -0
- package/check-box/src/check-box-types.d.ts +74 -0
- package/check-box/src/check-box.d.ts +28 -0
- package/check-box/src/components/icon-active.d.ts +2 -0
- package/check-box/src/components/icon-default.d.ts +2 -0
- package/checkable-tag/index.d.ts +13 -0
- package/checkable-tag/index.es.js +141 -0
- package/checkable-tag/index.umd.js +1 -0
- package/checkable-tag/src/checkable-tag-group.d.ts +26 -0
- package/checkable-tag/src/checkable-tag-types.d.ts +83 -0
- package/checkable-tag/src/checkable-tag.d.ts +20 -0
- package/checkable-tag/style.css +2 -0
- package/collapse/index.d.ts +11 -0
- package/collapse/src/collapse-item.d.ts +16 -0
- package/collapse/src/collapse-types.d.ts +52 -0
- package/collapse/src/collapse.d.ts +24 -0
- package/color-picker/index.d.ts +10 -0
- package/color-picker/index.es.js +1881 -0
- package/color-picker/index.umd.js +1 -0
- package/color-picker/src/color-picker-types.d.ts +121 -0
- package/color-picker/src/color-picker.d.ts +75 -0
- package/color-picker/style.css +2 -0
- package/config-provider/index.d.ts +10 -0
- package/config-provider/src/config-provider-types.d.ts +131 -0
- package/config-provider/src/config-provider.d.ts +24 -0
- package/date-picker/index.d.ts +10 -0
- package/date-picker/src/date-picker-types.d.ts +179 -0
- package/date-picker/src/date-picker.d.ts +113 -0
- package/descriptions/index.d.ts +11 -0
- package/descriptions/src/descriptions-item.d.ts +19 -0
- package/descriptions/src/descriptions-types.d.ts +64 -0
- package/descriptions/src/descriptions.d.ts +31 -0
- package/divider/index.d.ts +10 -0
- package/divider/src/divider-types.d.ts +31 -0
- package/divider/src/divider.d.ts +24 -0
- package/drawer/index.d.ts +10 -0
- package/drawer/src/drawer-types.d.ts +155 -0
- package/drawer/src/drawer.d.ts +79 -0
- package/dropdown/index.d.ts +10 -0
- package/dropdown/index.es.js +2 -2
- package/dropdown/index.umd.js +1 -1
- package/dropdown/src/dropdown-types.d.ts +41 -0
- package/dropdown/src/dropdown.d.ts +32 -0
- package/empty/index.d.ts +10 -0
- package/empty/src/empty-types.d.ts +16 -0
- package/empty/src/empty.d.ts +15 -0
- package/flex/index.d.ts +10 -0
- package/flex/src/flex-types.d.ts +36 -0
- package/flex/src/flex.d.ts +29 -0
- package/float-button/index.d.ts +11 -0
- package/float-button/src/back-top.d.ts +26 -0
- package/float-button/src/float-button-types.d.ts +65 -0
- package/float-button/src/float-button.d.ts +32 -0
- package/form/index.d.ts +14 -0
- package/form/src/form-item.d.ts +72 -0
- package/form/src/form-list.d.ts +12 -0
- package/form/src/form-provider.d.ts +7 -0
- package/form/src/form-types.d.ts +360 -0
- package/form/src/form.d.ts +64 -0
- package/form/src/utils.d.ts +10 -0
- package/grid/index.d.ts +10 -0
- package/grid/src/grid-types.d.ts +90 -0
- package/grid/src/grid.d.ts +58 -0
- package/icon/index.d.ts +12 -0
- package/icon/src/icon-registry.d.ts +5 -0
- package/icon/src/icon-types.d.ts +95 -0
- package/icon/src/icon.d.ts +63 -0
- package/image/index.d.ts +10 -0
- package/image/src/image-types.d.ts +56 -0
- package/image/src/image.d.ts +42 -0
- package/image-preview-group/index.d.ts +11 -0
- package/image-preview-group/index.es.js +162 -0
- package/image-preview-group/index.umd.js +1 -0
- package/image-preview-group/src/image-preview-group-types.d.ts +51 -0
- package/image-preview-group/src/image-preview-group.d.ts +25 -0
- package/image-preview-group/style.css +2 -0
- package/index.d.ts +93 -7
- package/input/index.d.ts +10 -0
- package/input/src/input-types.d.ts +164 -0
- package/input/src/input.d.ts +74 -0
- package/input-number/index.d.ts +10 -0
- package/input-number/src/input-number-types.d.ts +165 -0
- package/input-number/src/input-number.d.ts +66 -0
- package/input-otp/index.d.ts +11 -0
- package/input-otp/index.es.js +186 -0
- package/input-otp/index.umd.js +1 -0
- package/input-otp/src/input-otp-types.d.ts +68 -0
- package/input-otp/src/input-otp.d.ts +40 -0
- package/input-otp/style.css +2 -0
- package/input-search/index.d.ts +11 -0
- package/input-search/index.es.js +1228 -0
- package/input-search/index.umd.js +1 -0
- package/input-search/src/input-search-types.d.ts +106 -0
- package/input-search/src/input-search.d.ts +84 -0
- package/input-search/style.css +2 -0
- package/layout/index.d.ts +10 -0
- package/layout/src/layout-types.d.ts +70 -0
- package/layout/src/layout.d.ts +56 -0
- package/masonry/index.d.ts +10 -0
- package/masonry/src/masonry-types.d.ts +19 -0
- package/masonry/src/masonry.d.ts +16 -0
- package/mentions/index.d.ts +10 -0
- package/mentions/index.es.js +711 -0
- package/mentions/index.umd.js +1 -0
- package/mentions/src/mentions-types.d.ts +124 -0
- package/mentions/src/mentions.d.ts +79 -0
- package/mentions/style.css +2 -0
- package/menu/index.d.ts +10 -0
- package/menu/src/menu-types.d.ts +109 -0
- package/menu/src/menu.d.ts +63 -0
- package/message/index.d.ts +22 -0
- package/message/src/message-item.d.ts +46 -0
- package/message/src/message-types.d.ts +86 -0
- package/message/src/message.d.ts +21 -0
- package/message/src/use-message.d.ts +35 -0
- package/modal/index.d.ts +24 -0
- package/modal/src/confirm-types.d.ts +30 -0
- package/modal/src/confirm.d.ts +17 -0
- package/modal/src/modal-types.d.ts +175 -0
- package/modal/src/modal.d.ts +99 -0
- package/modal/src/use-modal.d.ts +34 -0
- package/notification/index.d.ts +21 -0
- package/notification/src/notification-item.d.ts +49 -0
- package/notification/src/notification-types.d.ts +91 -0
- package/notification/src/notification.d.ts +20 -0
- package/notification/src/use-notification.d.ts +34 -0
- package/package.json +611 -12
- package/pagination/index.d.ts +10 -0
- package/pagination/index.es.js +4 -2
- package/pagination/index.umd.js +1 -1
- package/pagination/src/pagination-types.d.ts +49 -0
- package/pagination/src/pagination.d.ts +43 -0
- package/popconfirm/index.d.ts +10 -0
- package/popconfirm/src/popconfirm-types.d.ts +82 -0
- package/popconfirm/src/popconfirm.d.ts +55 -0
- package/popover/index.d.ts +10 -0
- package/popover/src/popover-types.d.ts +235 -0
- package/popover/src/popover.d.ts +130 -0
- package/progress/index.d.ts +10 -0
- package/progress/src/progress-types.d.ts +48 -0
- package/progress/src/progress.d.ts +37 -0
- package/radio/index.d.ts +11 -0
- package/radio/src/components/icon-active.d.ts +2 -0
- package/radio/src/components/icon-circle.d.ts +2 -0
- package/radio/src/radio-group.d.ts +21 -0
- package/radio/src/radio-types.d.ts +55 -0
- package/radio/src/radio.d.ts +24 -0
- package/range-picker/index.d.ts +10 -0
- package/range-picker/index.es.js +2415 -0
- package/range-picker/index.umd.js +1 -0
- package/range-picker/src/range-picker-types.d.ts +169 -0
- package/range-picker/src/range-picker.d.ts +112 -0
- package/range-picker/style.css +2 -0
- package/rate/index.d.ts +10 -0
- package/rate/src/components/icon-default.d.ts +2 -0
- package/rate/src/rate-types.d.ts +34 -0
- package/rate/src/rate.d.ts +30 -0
- package/result/index.d.ts +10 -0
- package/result/src/result-types.d.ts +21 -0
- package/result/src/result.d.ts +18 -0
- package/segmented/index.d.ts +10 -0
- package/segmented/src/segmented-types.d.ts +32 -0
- package/segmented/src/segmented.d.ts +25 -0
- package/select/index.d.ts +10 -0
- package/select/src/composables/use-select.d.ts +29 -0
- package/select/src/select-types.d.ts +215 -0
- package/select/src/select.d.ts +149 -0
- package/skeleton/index.d.ts +10 -0
- package/skeleton/src/skeleton-types.d.ts +39 -0
- package/skeleton/src/skeleton.d.ts +27 -0
- package/skeleton-node/index.d.ts +11 -0
- package/skeleton-node/index.es.js +71 -0
- package/skeleton-node/index.umd.js +1 -0
- package/skeleton-node/src/skeleton-node-types.d.ts +23 -0
- package/skeleton-node/src/skeleton-node.d.ts +17 -0
- package/skeleton-node/style.css +2 -0
- package/slider/index.d.ts +10 -0
- package/slider/index.es.js +3 -3
- package/slider/index.umd.js +1 -1
- package/slider/src/composables/use-slider-tooltip.d.ts +18 -0
- package/slider/src/composables/use-slider.d.ts +68 -0
- package/slider/src/slider-types.d.ts +112 -0
- package/slider/src/slider.d.ts +149 -0
- package/space/index.d.ts +10 -0
- package/space/src/space-types.d.ts +28 -0
- package/space/src/space.d.ts +21 -0
- package/space-compact/index.d.ts +11 -0
- package/space-compact/index.es.js +59 -0
- package/space-compact/index.umd.js +1 -0
- package/space-compact/src/space-compact-types.d.ts +27 -0
- package/space-compact/src/space-compact.d.ts +15 -0
- package/space-compact/style.css +2 -0
- package/spin/index.d.ts +10 -0
- package/spin/src/spin-types.d.ts +29 -0
- package/spin/src/spin.d.ts +24 -0
- package/splitter/index.d.ts +10 -0
- package/splitter/src/splitter-types.d.ts +70 -0
- package/splitter/src/splitter.d.ts +62 -0
- package/status/index.d.ts +10 -0
- package/status/src/status-types.d.ts +10 -0
- package/status/src/status.d.ts +9 -0
- package/steps/index.d.ts +10 -0
- package/steps/src/steps-types.d.ts +48 -0
- package/steps/src/steps.d.ts +34 -0
- package/style.css +2 -0
- package/switch/index.d.ts +10 -0
- package/switch/src/switch-types.d.ts +45 -0
- package/switch/src/switch.d.ts +37 -0
- package/table/index.d.ts +11 -0
- package/table/src/table-types.d.ts +172 -0
- package/table/src/table.d.ts +67 -0
- package/table-column/index.d.ts +11 -0
- package/table-column/index.es.js +155 -0
- package/table-column/index.umd.js +1 -0
- package/table-column/src/table-column-types.d.ts +75 -0
- package/table-column/src/table-column.d.ts +63 -0
- package/table-column-group/index.d.ts +11 -0
- package/table-column-group/index.es.js +80 -0
- package/table-column-group/index.umd.js +1 -0
- package/table-column-group/src/table-column-group-types.d.ts +36 -0
- package/table-column-group/src/table-column-group.d.ts +20 -0
- package/table-summary/index.d.ts +11 -0
- package/table-summary/index.es.js +30 -0
- package/table-summary/index.umd.js +1 -0
- package/table-summary/src/table-summary-types.d.ts +29 -0
- package/table-summary/src/table-summary.d.ts +8 -0
- package/tabs/index.d.ts +11 -0
- package/tabs/src/components/tab/tab-types.d.ts +18 -0
- package/tabs/src/components/tab/tab.d.ts +15 -0
- package/tabs/src/components/tabs-nav/index.d.ts +26 -0
- package/tabs/src/tabs-types.d.ts +49 -0
- package/tabs/src/tabs.d.ts +27 -0
- package/tag/index.d.ts +10 -0
- package/tag/src/tag-types.d.ts +41 -0
- package/tag/src/tag.d.ts +24 -0
- package/textarea/index.d.ts +11 -0
- package/textarea/index.es.js +1241 -0
- package/textarea/index.umd.js +1 -0
- package/textarea/src/textarea-types.d.ts +150 -0
- package/textarea/src/textarea.d.ts +63 -0
- package/textarea/style.css +2 -0
- package/time-picker/index.d.ts +10 -0
- package/time-picker/index.es.js +2325 -0
- package/time-picker/index.umd.js +1 -0
- package/time-picker/src/time-picker-types.d.ts +168 -0
- package/time-picker/src/time-picker.d.ts +127 -0
- package/time-picker/style.css +2 -0
- package/time-range-picker/index.d.ts +10 -0
- package/time-range-picker/index.es.js +2568 -0
- package/time-range-picker/index.umd.js +1 -0
- package/time-range-picker/src/time-range-picker-types.d.ts +147 -0
- package/time-range-picker/src/time-range-picker.d.ts +124 -0
- package/time-range-picker/style.css +2 -0
- package/timeline/index.d.ts +11 -0
- package/timeline/src/timeline-item.d.ts +31 -0
- package/timeline/src/timeline-types.d.ts +72 -0
- package/timeline/src/timeline.d.ts +3 -0
- package/tooltip/index.d.ts +10 -0
- package/tooltip/src/tooltip-types.d.ts +201 -0
- package/tooltip/src/tooltip.d.ts +87 -0
- package/transfer/index.d.ts +10 -0
- package/transfer/index.es.js +1407 -0
- package/transfer/index.umd.js +1 -0
- package/transfer/src/transfer-types.d.ts +76 -0
- package/transfer/src/transfer.d.ts +59 -0
- package/transfer/style.css +2 -0
- package/tree/index.d.ts +10 -0
- package/tree/src/composables/use-tree-check.d.ts +9 -0
- package/tree/src/composables/use-tree-flatten.d.ts +11 -0
- package/tree/src/composables/use-tree-state.d.ts +17 -0
- package/tree/src/tree-types.d.ts +202 -0
- package/tree/src/tree.d.ts +122 -0
- package/tree-select/index.d.ts +12 -0
- package/tree-select/index.es.js +3009 -0
- package/tree-select/index.umd.js +1 -0
- package/tree-select/src/tree-select-types.d.ts +188 -0
- package/tree-select/src/tree-select.d.ts +128 -0
- package/tree-select/style.css +2 -0
- package/typography/index.d.ts +10 -0
- package/typography/src/typography-types.d.ts +316 -0
- package/typography/src/typography.d.ts +33 -0
- package/upload/index.d.ts +10 -0
- package/upload/index.es.js +1450 -0
- package/upload/index.umd.js +1 -0
- package/upload/src/upload-types.d.ts +99 -0
- package/upload/src/upload.d.ts +66 -0
- package/upload/style.css +2 -0
- package/upload-dragger/index.d.ts +10 -0
- package/upload-dragger/index.es.js +1472 -0
- package/upload-dragger/index.umd.js +1 -0
- package/upload-dragger/src/upload-dragger.d.ts +167 -0
- package/upload-dragger/style.css +2 -0
- package/util/index.d.ts +12 -0
- package/util/src/dom.d.ts +8 -0
- package/util/src/func.d.ts +7 -0
- package/util/src/type.d.ts +3 -0
- package/vue-ccui.es.js +11 -9
- package/vue-ccui.umd.js +1 -1
- package/watermark/index.d.ts +10 -0
- package/watermark/src/watermark-types.d.ts +47 -0
- package/watermark/src/watermark.d.ts +34 -0
- package/ccui-cli.css +0 -2
- package/nuxt/components/category.js +0 -2
- package/nuxt/components/install.js +0 -2
- package/nuxt/components/status.js +0 -2
- package/nuxt/components/title.js +0 -2
- package/nuxt/index.js +0 -13
- /package/affix/{ccui-cli.css → style.css} +0 -0
- /package/alert/{ccui-cli.css → style.css} +0 -0
- /package/anchor/{ccui-cli.css → style.css} +0 -0
- /package/avatar/{ccui-cli.css → style.css} +0 -0
- /package/badge/{ccui-cli.css → style.css} +0 -0
- /package/breadcrumb/{ccui-cli.css → style.css} +0 -0
- /package/button/{ccui-cli.css → style.css} +0 -0
- /package/button-3d/{ccui-cli.css → style.css} +0 -0
- /package/calendar/{ccui-cli.css → style.css} +0 -0
- /package/card/{ccui-cli.css → style.css} +0 -0
- /package/check-box/{ccui-cli.css → style.css} +0 -0
- /package/collapse/{ccui-cli.css → style.css} +0 -0
- /package/date-picker/{ccui-cli.css → style.css} +0 -0
- /package/descriptions/{ccui-cli.css → style.css} +0 -0
- /package/divider/{ccui-cli.css → style.css} +0 -0
- /package/drawer/{ccui-cli.css → style.css} +0 -0
- /package/dropdown/{ccui-cli.css → style.css} +0 -0
- /package/empty/{ccui-cli.css → style.css} +0 -0
- /package/flex/{ccui-cli.css → style.css} +0 -0
- /package/float-button/{ccui-cli.css → style.css} +0 -0
- /package/form/{ccui-cli.css → style.css} +0 -0
- /package/grid/{ccui-cli.css → style.css} +0 -0
- /package/icon/{ccui-cli.css → style.css} +0 -0
- /package/image/{ccui-cli.css → style.css} +0 -0
- /package/input/{ccui-cli.css → style.css} +0 -0
- /package/input-number/{ccui-cli.css → style.css} +0 -0
- /package/layout/{ccui-cli.css → style.css} +0 -0
- /package/masonry/{ccui-cli.css → style.css} +0 -0
- /package/menu/{ccui-cli.css → style.css} +0 -0
- /package/message/{ccui-cli.css → style.css} +0 -0
- /package/modal/{ccui-cli.css → style.css} +0 -0
- /package/notification/{ccui-cli.css → style.css} +0 -0
- /package/pagination/{ccui-cli.css → style.css} +0 -0
- /package/popconfirm/{ccui-cli.css → style.css} +0 -0
- /package/popover/{ccui-cli.css → style.css} +0 -0
- /package/progress/{ccui-cli.css → style.css} +0 -0
- /package/radio/{ccui-cli.css → style.css} +0 -0
- /package/rate/{ccui-cli.css → style.css} +0 -0
- /package/result/{ccui-cli.css → style.css} +0 -0
- /package/segmented/{ccui-cli.css → style.css} +0 -0
- /package/select/{ccui-cli.css → style.css} +0 -0
- /package/skeleton/{ccui-cli.css → style.css} +0 -0
- /package/slider/{ccui-cli.css → style.css} +0 -0
- /package/space/{ccui-cli.css → style.css} +0 -0
- /package/spin/{ccui-cli.css → style.css} +0 -0
- /package/splitter/{ccui-cli.css → style.css} +0 -0
- /package/status/{ccui-cli.css → style.css} +0 -0
- /package/steps/{ccui-cli.css → style.css} +0 -0
- /package/switch/{ccui-cli.css → style.css} +0 -0
- /package/table/{ccui-cli.css → style.css} +0 -0
- /package/tabs/{ccui-cli.css → style.css} +0 -0
- /package/tag/{ccui-cli.css → style.css} +0 -0
- /package/timeline/{ccui-cli.css → style.css} +0 -0
- /package/tooltip/{ccui-cli.css → style.css} +0 -0
- /package/tree/{ccui-cli.css → style.css} +0 -0
- /package/typography/{ccui-cli.css → style.css} +0 -0
- /package/watermark/{ccui-cli.css → style.css} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Switch 尺寸。`'default'` 与 `'medium'` 等价。
|
|
4
|
+
*/
|
|
5
|
+
export type SwitchSize = 'default' | 'medium' | 'small';
|
|
6
|
+
export type SwitchValue = boolean | string | number;
|
|
7
|
+
export declare const switchProps: {
|
|
8
|
+
readonly modelValue: {
|
|
9
|
+
readonly type: PropType<SwitchValue>;
|
|
10
|
+
readonly default: false;
|
|
11
|
+
};
|
|
12
|
+
readonly checkedValue: {
|
|
13
|
+
readonly type: PropType<SwitchValue>;
|
|
14
|
+
readonly default: true;
|
|
15
|
+
};
|
|
16
|
+
readonly uncheckedValue: {
|
|
17
|
+
readonly type: PropType<SwitchValue>;
|
|
18
|
+
readonly default: false;
|
|
19
|
+
};
|
|
20
|
+
readonly disabled: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: false;
|
|
23
|
+
};
|
|
24
|
+
readonly loading: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: false;
|
|
27
|
+
};
|
|
28
|
+
readonly size: {
|
|
29
|
+
readonly type: PropType<SwitchSize>;
|
|
30
|
+
readonly default: "default";
|
|
31
|
+
};
|
|
32
|
+
readonly checkedChildren: {
|
|
33
|
+
readonly type: StringConstructor;
|
|
34
|
+
readonly default: "";
|
|
35
|
+
};
|
|
36
|
+
readonly uncheckedChildren: {
|
|
37
|
+
readonly type: StringConstructor;
|
|
38
|
+
readonly default: "";
|
|
39
|
+
};
|
|
40
|
+
readonly autofocus: {
|
|
41
|
+
readonly type: BooleanConstructor;
|
|
42
|
+
readonly default: false;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type SwitchProps = ExtractPropTypes<typeof switchProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
readonly size: import("./switch-types").SwitchSize;
|
|
4
|
+
readonly disabled: boolean;
|
|
5
|
+
readonly modelValue: import("./switch-types").SwitchValue;
|
|
6
|
+
readonly loading: boolean;
|
|
7
|
+
readonly autofocus: boolean;
|
|
8
|
+
readonly checkedValue: import("./switch-types").SwitchValue;
|
|
9
|
+
readonly uncheckedValue: import("./switch-types").SwitchValue;
|
|
10
|
+
readonly checkedChildren: string;
|
|
11
|
+
readonly uncheckedChildren: string;
|
|
12
|
+
}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "click" | "update:modelValue")[], "change" | "click" | "update:modelValue", import("vue").PublicProps, Readonly<{
|
|
13
|
+
readonly size: import("./switch-types").SwitchSize;
|
|
14
|
+
readonly disabled: boolean;
|
|
15
|
+
readonly modelValue: import("./switch-types").SwitchValue;
|
|
16
|
+
readonly loading: boolean;
|
|
17
|
+
readonly autofocus: boolean;
|
|
18
|
+
readonly checkedValue: import("./switch-types").SwitchValue;
|
|
19
|
+
readonly uncheckedValue: import("./switch-types").SwitchValue;
|
|
20
|
+
readonly checkedChildren: string;
|
|
21
|
+
readonly uncheckedChildren: string;
|
|
22
|
+
}> & Readonly<{
|
|
23
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
readonly size: import("./switch-types").SwitchSize;
|
|
28
|
+
readonly disabled: boolean;
|
|
29
|
+
readonly modelValue: import("./switch-types").SwitchValue;
|
|
30
|
+
readonly loading: boolean;
|
|
31
|
+
readonly autofocus: boolean;
|
|
32
|
+
readonly checkedValue: import("./switch-types").SwitchValue;
|
|
33
|
+
readonly uncheckedValue: import("./switch-types").SwitchValue;
|
|
34
|
+
readonly checkedChildren: string;
|
|
35
|
+
readonly uncheckedChildren: string;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
export default _default;
|
package/table/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import Table from './src/table';
|
|
3
|
+
export { Table };
|
|
4
|
+
export type { TableCellRenderProps, TableColumn, TableExpandable, TableFilterOption, TableFilters, TableRowSelection, TableSelectionKey, TableSelectionType, TableSorter, TableSortOrder, } from './src/table-types';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
status: string;
|
|
9
|
+
install(app: App): void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { CSSProperties, ExtractPropTypes, InjectionKey, PropType, Slot, VNodeChild } from 'vue';
|
|
2
|
+
import type { CcSemanticClasses, CcSemanticStyles } from '../../shared/hooks/use-semantic';
|
|
3
|
+
export type TableRowKey = string | ((record: any, index: number) => string | number);
|
|
4
|
+
export type TableSize = 'small' | 'middle' | 'default';
|
|
5
|
+
export type TableAlign = 'left' | 'center' | 'right';
|
|
6
|
+
export type TableSortOrder = 'ascend' | 'descend' | null;
|
|
7
|
+
export type TableFilterValue = string | number | boolean;
|
|
8
|
+
export type TableSelectionType = 'checkbox' | 'radio';
|
|
9
|
+
export type TableSelectionKey = string | number;
|
|
10
|
+
export interface TableFilterOption {
|
|
11
|
+
text: string;
|
|
12
|
+
value: TableFilterValue;
|
|
13
|
+
}
|
|
14
|
+
export interface TableCellRenderProps {
|
|
15
|
+
rowSpan?: number;
|
|
16
|
+
colSpan?: number;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
class?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TableColumn {
|
|
21
|
+
title: string;
|
|
22
|
+
dataIndex?: string | Array<string | number>;
|
|
23
|
+
key?: string;
|
|
24
|
+
width?: string | number;
|
|
25
|
+
align?: TableAlign;
|
|
26
|
+
fixed?: 'left' | 'right';
|
|
27
|
+
sorter?: boolean | ((a: any, b: any) => number);
|
|
28
|
+
sortOrder?: TableSortOrder;
|
|
29
|
+
filters?: TableFilterOption[];
|
|
30
|
+
filteredValue?: TableFilterValue[];
|
|
31
|
+
filterMultiple?: boolean;
|
|
32
|
+
customRender?: (scope: {
|
|
33
|
+
text: any;
|
|
34
|
+
record: any;
|
|
35
|
+
index: number;
|
|
36
|
+
column: TableColumn;
|
|
37
|
+
}) => VNodeChild;
|
|
38
|
+
onCell?: (record: any, index: number) => TableCellRenderProps;
|
|
39
|
+
onHeaderCell?: (column: TableColumn) => TableCellRenderProps;
|
|
40
|
+
/**
|
|
41
|
+
* 列分组:仅当本列由 `<c-table-column-group>` 生成时存在。子列在 tbody 中被展平渲染,
|
|
42
|
+
* 在 thead 中表现为「分组标题 + 子列标题」两行结构。
|
|
43
|
+
*/
|
|
44
|
+
children?: TableColumn[];
|
|
45
|
+
}
|
|
46
|
+
export interface TableSorter {
|
|
47
|
+
column?: TableColumn;
|
|
48
|
+
columnKey?: string;
|
|
49
|
+
order: TableSortOrder;
|
|
50
|
+
}
|
|
51
|
+
export type TableFilters = Record<string, TableFilterValue[]>;
|
|
52
|
+
export interface TableRowSelection {
|
|
53
|
+
type?: TableSelectionType;
|
|
54
|
+
selectedRowKeys?: TableSelectionKey[];
|
|
55
|
+
defaultSelectedRowKeys?: TableSelectionKey[];
|
|
56
|
+
columnWidth?: string | number;
|
|
57
|
+
hideSelectAll?: boolean;
|
|
58
|
+
fixed?: boolean;
|
|
59
|
+
getCheckboxProps?: (record: any) => {
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
name?: string;
|
|
62
|
+
};
|
|
63
|
+
onChange?: (selectedRowKeys: TableSelectionKey[], selectedRows: any[]) => void;
|
|
64
|
+
onSelect?: (record: any, selected: boolean, selectedRows: any[]) => void;
|
|
65
|
+
onSelectAll?: (selected: boolean, selectedRows: any[], changedRows: any[]) => void;
|
|
66
|
+
}
|
|
67
|
+
export interface TableExpandable {
|
|
68
|
+
expandedRowKeys?: TableSelectionKey[];
|
|
69
|
+
defaultExpandedRowKeys?: TableSelectionKey[];
|
|
70
|
+
defaultExpandAllRows?: boolean;
|
|
71
|
+
expandedRowRender?: (record: any, index: number) => VNodeChild;
|
|
72
|
+
rowExpandable?: (record: any) => boolean;
|
|
73
|
+
columnWidth?: string | number;
|
|
74
|
+
fixed?: boolean;
|
|
75
|
+
expandRowByClick?: boolean;
|
|
76
|
+
onExpand?: (expanded: boolean, record: any) => void;
|
|
77
|
+
onChange?: (expandedRowKeys: TableSelectionKey[]) => void;
|
|
78
|
+
}
|
|
79
|
+
export declare const tableProps: {
|
|
80
|
+
readonly columns: {
|
|
81
|
+
readonly type: PropType<TableColumn[]>;
|
|
82
|
+
readonly default: () => never[];
|
|
83
|
+
};
|
|
84
|
+
readonly dataSource: {
|
|
85
|
+
readonly type: PropType<any[]>;
|
|
86
|
+
readonly default: () => never[];
|
|
87
|
+
};
|
|
88
|
+
readonly rowKey: {
|
|
89
|
+
readonly type: PropType<TableRowKey>;
|
|
90
|
+
readonly default: "key";
|
|
91
|
+
};
|
|
92
|
+
readonly bordered: {
|
|
93
|
+
readonly type: BooleanConstructor;
|
|
94
|
+
readonly default: false;
|
|
95
|
+
};
|
|
96
|
+
readonly loading: {
|
|
97
|
+
readonly type: BooleanConstructor;
|
|
98
|
+
readonly default: false;
|
|
99
|
+
};
|
|
100
|
+
readonly showHeader: {
|
|
101
|
+
readonly type: BooleanConstructor;
|
|
102
|
+
readonly default: true;
|
|
103
|
+
};
|
|
104
|
+
readonly size: {
|
|
105
|
+
readonly type: PropType<TableSize>;
|
|
106
|
+
readonly default: "default";
|
|
107
|
+
};
|
|
108
|
+
readonly rowSelection: {
|
|
109
|
+
readonly type: PropType<TableRowSelection>;
|
|
110
|
+
readonly default: undefined;
|
|
111
|
+
};
|
|
112
|
+
readonly expandable: {
|
|
113
|
+
readonly type: PropType<TableExpandable>;
|
|
114
|
+
readonly default: undefined;
|
|
115
|
+
};
|
|
116
|
+
readonly scroll: {
|
|
117
|
+
readonly type: PropType<{
|
|
118
|
+
x?: string | number;
|
|
119
|
+
y?: string | number;
|
|
120
|
+
}>;
|
|
121
|
+
readonly default: undefined;
|
|
122
|
+
};
|
|
123
|
+
readonly childrenColumnName: {
|
|
124
|
+
readonly type: StringConstructor;
|
|
125
|
+
readonly default: "children";
|
|
126
|
+
};
|
|
127
|
+
readonly indentSize: {
|
|
128
|
+
readonly type: NumberConstructor;
|
|
129
|
+
readonly default: 15;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* 语义化 DOM className 注入。可用 key:`root` / `header` / `body` / `row`。
|
|
133
|
+
*/
|
|
134
|
+
readonly classNames: {
|
|
135
|
+
readonly type: PropType<CcSemanticClasses>;
|
|
136
|
+
readonly default: undefined;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* 语义化 DOM style 注入。可用 key 与 classNames 一致。
|
|
140
|
+
*/
|
|
141
|
+
readonly styles: {
|
|
142
|
+
readonly type: PropType<CcSemanticStyles>;
|
|
143
|
+
readonly default: undefined;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type TableProps = ExtractPropTypes<typeof tableProps>;
|
|
147
|
+
/**
|
|
148
|
+
* 模板式列收集器:`<c-table-column>` / `<c-table-column-group>` 在挂载时把列定义
|
|
149
|
+
* 注册到父 Table;卸载时清理。同一 Table 实例下的子列共享一个收集器。
|
|
150
|
+
*
|
|
151
|
+
* 与 `columns` prop 互斥:`columns` 非空时优先用 prop,否则用收集到的列。
|
|
152
|
+
*/
|
|
153
|
+
export interface TableColumnsCollector {
|
|
154
|
+
register: (id: symbol, column: TableColumn, order: number) => void;
|
|
155
|
+
unregister: (id: symbol) => void;
|
|
156
|
+
}
|
|
157
|
+
export declare const tableColumnsCollectorKey: InjectionKey<TableColumnsCollector>;
|
|
158
|
+
/**
|
|
159
|
+
* ColumnGroup 子作用域收集器:内部 `<c-table-column>` 注册到 group,而非 root Table。
|
|
160
|
+
*/
|
|
161
|
+
export interface TableColumnGroupCollector {
|
|
162
|
+
register: (id: symbol, column: TableColumn, order: number) => void;
|
|
163
|
+
unregister: (id: symbol) => void;
|
|
164
|
+
}
|
|
165
|
+
export declare const tableColumnGroupCollectorKey: InjectionKey<TableColumnGroupCollector>;
|
|
166
|
+
/**
|
|
167
|
+
* Summary slot 注入容器:`<c-table-summary>` 通过此 key 把 default slot 暴露给父 Table 渲染到 tfoot。
|
|
168
|
+
*/
|
|
169
|
+
export interface TableSummaryCollector {
|
|
170
|
+
setSummary: (slot: Slot | null) => void;
|
|
171
|
+
}
|
|
172
|
+
export declare const tableSummaryCollectorKey: InjectionKey<TableSummaryCollector>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { TableColumn } from './table-types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
readonly columns: TableColumn[];
|
|
5
|
+
readonly size: import("./table-types").TableSize;
|
|
6
|
+
readonly loading: boolean;
|
|
7
|
+
readonly bordered: boolean;
|
|
8
|
+
readonly dataSource: any[];
|
|
9
|
+
readonly rowKey: import("./table-types").TableRowKey;
|
|
10
|
+
readonly showHeader: boolean;
|
|
11
|
+
readonly childrenColumnName: string;
|
|
12
|
+
readonly indentSize: number;
|
|
13
|
+
readonly scroll?: {
|
|
14
|
+
x?: string | number;
|
|
15
|
+
y?: string | number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
18
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
19
|
+
readonly rowSelection?: import("./table-types").TableRowSelection | undefined;
|
|
20
|
+
readonly expandable?: import("./table-types").TableExpandable | undefined;
|
|
21
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:filters" | "update:sorter" | "update:selectedRowKeys" | "update:expandedRowKeys" | "expand")[], "change" | "update:filters" | "update:sorter" | "update:selectedRowKeys" | "update:expandedRowKeys" | "expand", import("vue").PublicProps, Readonly<{
|
|
24
|
+
readonly columns: TableColumn[];
|
|
25
|
+
readonly size: import("./table-types").TableSize;
|
|
26
|
+
readonly loading: boolean;
|
|
27
|
+
readonly bordered: boolean;
|
|
28
|
+
readonly dataSource: any[];
|
|
29
|
+
readonly rowKey: import("./table-types").TableRowKey;
|
|
30
|
+
readonly showHeader: boolean;
|
|
31
|
+
readonly childrenColumnName: string;
|
|
32
|
+
readonly indentSize: number;
|
|
33
|
+
readonly scroll?: {
|
|
34
|
+
x?: string | number;
|
|
35
|
+
y?: string | number;
|
|
36
|
+
} | undefined;
|
|
37
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
38
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
39
|
+
readonly rowSelection?: import("./table-types").TableRowSelection | undefined;
|
|
40
|
+
readonly expandable?: import("./table-types").TableExpandable | undefined;
|
|
41
|
+
}> & Readonly<{
|
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
"onUpdate:filters"?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
"onUpdate:sorter"?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
"onUpdate:selectedRowKeys"?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
"onUpdate:expandedRowKeys"?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
readonly columns: TableColumn[];
|
|
50
|
+
readonly scroll: {
|
|
51
|
+
x?: string | number;
|
|
52
|
+
y?: string | number;
|
|
53
|
+
};
|
|
54
|
+
readonly size: import("./table-types").TableSize;
|
|
55
|
+
readonly classNames: import("../../shared/hooks/use-semantic").CcSemanticClasses;
|
|
56
|
+
readonly styles: import("../../shared/hooks/use-semantic").CcSemanticStyles;
|
|
57
|
+
readonly loading: boolean;
|
|
58
|
+
readonly bordered: boolean;
|
|
59
|
+
readonly dataSource: any[];
|
|
60
|
+
readonly rowKey: import("./table-types").TableRowKey;
|
|
61
|
+
readonly showHeader: boolean;
|
|
62
|
+
readonly rowSelection: import("./table-types").TableRowSelection;
|
|
63
|
+
readonly expandable: import("./table-types").TableExpandable;
|
|
64
|
+
readonly childrenColumnName: string;
|
|
65
|
+
readonly indentSize: number;
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
67
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import TableColumn from './src/table-column';
|
|
3
|
+
export { TableColumn };
|
|
4
|
+
export type { TableColumnProps } from './src/table-column-types';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
status: string;
|
|
9
|
+
install(app: App): void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { defineComponent as e, inject as t, onBeforeUnmount as n } from "vue";
|
|
2
|
+
//#region ../ccui/ui/table/src/table-types.ts
|
|
3
|
+
var r = Symbol("TableColumnsCollector"), i = Symbol("TableColumnGroupCollector"), a = {
|
|
4
|
+
title: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ""
|
|
7
|
+
},
|
|
8
|
+
dataIndex: {
|
|
9
|
+
type: [String, Array],
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
columnKey: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
width: {
|
|
17
|
+
type: [String, Number],
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
align: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
fixed: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
sorter: {
|
|
29
|
+
type: [Boolean, Function],
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
sortOrder: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
filters: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
filteredValue: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: void 0
|
|
43
|
+
},
|
|
44
|
+
filterMultiple: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
customRender: {
|
|
49
|
+
type: Function,
|
|
50
|
+
default: void 0
|
|
51
|
+
},
|
|
52
|
+
onCell: {
|
|
53
|
+
type: Function,
|
|
54
|
+
default: void 0
|
|
55
|
+
},
|
|
56
|
+
onHeaderCell: {
|
|
57
|
+
type: Function,
|
|
58
|
+
default: void 0
|
|
59
|
+
}
|
|
60
|
+
}, o = 0, s = /* @__PURE__ */ e({
|
|
61
|
+
name: "CTableColumn",
|
|
62
|
+
props: a,
|
|
63
|
+
setup(e, { slots: a }) {
|
|
64
|
+
let s = t(i, null), c = t(r, null), l = s ?? c, u = Symbol("CTableColumn"), d = ++o, f = {};
|
|
65
|
+
return Object.defineProperties(f, {
|
|
66
|
+
title: {
|
|
67
|
+
get: () => e.title,
|
|
68
|
+
enumerable: !0,
|
|
69
|
+
configurable: !0
|
|
70
|
+
},
|
|
71
|
+
dataIndex: {
|
|
72
|
+
get: () => e.dataIndex,
|
|
73
|
+
enumerable: !0,
|
|
74
|
+
configurable: !0
|
|
75
|
+
},
|
|
76
|
+
key: {
|
|
77
|
+
get: () => e.columnKey,
|
|
78
|
+
enumerable: !0,
|
|
79
|
+
configurable: !0
|
|
80
|
+
},
|
|
81
|
+
width: {
|
|
82
|
+
get: () => e.width,
|
|
83
|
+
enumerable: !0,
|
|
84
|
+
configurable: !0
|
|
85
|
+
},
|
|
86
|
+
align: {
|
|
87
|
+
get: () => e.align,
|
|
88
|
+
enumerable: !0,
|
|
89
|
+
configurable: !0
|
|
90
|
+
},
|
|
91
|
+
fixed: {
|
|
92
|
+
get: () => e.fixed,
|
|
93
|
+
enumerable: !0,
|
|
94
|
+
configurable: !0
|
|
95
|
+
},
|
|
96
|
+
sorter: {
|
|
97
|
+
get: () => e.sorter,
|
|
98
|
+
enumerable: !0,
|
|
99
|
+
configurable: !0
|
|
100
|
+
},
|
|
101
|
+
sortOrder: {
|
|
102
|
+
get: () => e.sortOrder,
|
|
103
|
+
enumerable: !0,
|
|
104
|
+
configurable: !0
|
|
105
|
+
},
|
|
106
|
+
filters: {
|
|
107
|
+
get: () => e.filters,
|
|
108
|
+
enumerable: !0,
|
|
109
|
+
configurable: !0
|
|
110
|
+
},
|
|
111
|
+
filteredValue: {
|
|
112
|
+
get: () => e.filteredValue,
|
|
113
|
+
enumerable: !0,
|
|
114
|
+
configurable: !0
|
|
115
|
+
},
|
|
116
|
+
filterMultiple: {
|
|
117
|
+
get: () => e.filterMultiple,
|
|
118
|
+
enumerable: !0,
|
|
119
|
+
configurable: !0
|
|
120
|
+
},
|
|
121
|
+
onCell: {
|
|
122
|
+
get: () => e.onCell,
|
|
123
|
+
enumerable: !0,
|
|
124
|
+
configurable: !0
|
|
125
|
+
},
|
|
126
|
+
onHeaderCell: {
|
|
127
|
+
get: () => e.onHeaderCell,
|
|
128
|
+
enumerable: !0,
|
|
129
|
+
configurable: !0
|
|
130
|
+
},
|
|
131
|
+
customRender: {
|
|
132
|
+
get: () => {
|
|
133
|
+
if (!(!a.customRender && !e.customRender)) return (t) => a.customRender ? a.customRender(t) : e.customRender?.(t);
|
|
134
|
+
},
|
|
135
|
+
enumerable: !0,
|
|
136
|
+
configurable: !0
|
|
137
|
+
}
|
|
138
|
+
}), l && (l.register(u, f, d), n(() => l.unregister(u))), () => null;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../ccui/ui/table-column/index.ts
|
|
143
|
+
s.install = function(e) {
|
|
144
|
+
e.component(s.name, s);
|
|
145
|
+
};
|
|
146
|
+
var c = {
|
|
147
|
+
title: "TableColumn 表格列",
|
|
148
|
+
category: "数据展示",
|
|
149
|
+
status: "90%",
|
|
150
|
+
install(e) {
|
|
151
|
+
e.component(s.name, s);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
155
|
+
export { s as TableColumn, c as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=Symbol(`TableColumnsCollector`),r=Symbol(`TableColumnGroupCollector`),i={title:{type:String,default:``},dataIndex:{type:[String,Array],default:void 0},columnKey:{type:String,default:void 0},width:{type:[String,Number],default:void 0},align:{type:String,default:void 0},fixed:{type:String,default:void 0},sorter:{type:[Boolean,Function],default:void 0},sortOrder:{type:String,default:void 0},filters:{type:Array,default:void 0},filteredValue:{type:Array,default:void 0},filterMultiple:{type:Boolean,default:void 0},customRender:{type:Function,default:void 0},onCell:{type:Function,default:void 0},onHeaderCell:{type:Function,default:void 0}},a=0,o=(0,t.defineComponent)({name:`CTableColumn`,props:i,setup(e,{slots:i}){let o=(0,t.inject)(r,null),s=(0,t.inject)(n,null),c=o??s,l=Symbol(`CTableColumn`),u=++a,d={};return Object.defineProperties(d,{title:{get:()=>e.title,enumerable:!0,configurable:!0},dataIndex:{get:()=>e.dataIndex,enumerable:!0,configurable:!0},key:{get:()=>e.columnKey,enumerable:!0,configurable:!0},width:{get:()=>e.width,enumerable:!0,configurable:!0},align:{get:()=>e.align,enumerable:!0,configurable:!0},fixed:{get:()=>e.fixed,enumerable:!0,configurable:!0},sorter:{get:()=>e.sorter,enumerable:!0,configurable:!0},sortOrder:{get:()=>e.sortOrder,enumerable:!0,configurable:!0},filters:{get:()=>e.filters,enumerable:!0,configurable:!0},filteredValue:{get:()=>e.filteredValue,enumerable:!0,configurable:!0},filterMultiple:{get:()=>e.filterMultiple,enumerable:!0,configurable:!0},onCell:{get:()=>e.onCell,enumerable:!0,configurable:!0},onHeaderCell:{get:()=>e.onHeaderCell,enumerable:!0,configurable:!0},customRender:{get:()=>{if(!(!i.customRender&&!e.customRender))return t=>i.customRender?i.customRender(t):e.customRender?.(t)},enumerable:!0,configurable:!0}}),c&&(c.register(l,d,u),(0,t.onBeforeUnmount)(()=>c.unregister(l))),()=>null}});o.install=function(e){e.component(o.name,o)},e.TableColumn=o,e.default={title:`TableColumn 表格列`,category:`数据展示`,status:`90%`,install(e){e.component(o.name,o)}}});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, VNodeChild } from 'vue';
|
|
2
|
+
import type { TableAlign, TableCellRenderProps, TableColumn, TableFilterOption, TableFilterValue, TableSortOrder } from '../../table/src/table-types';
|
|
3
|
+
/**
|
|
4
|
+
* 模板式表格列声明,作为 `<c-table>` 的子组件出现,
|
|
5
|
+
* 在挂载阶段通过 provide/inject 把列定义注册回父 Table;本组件自身不渲染 DOM。
|
|
6
|
+
*
|
|
7
|
+
* 与 `<c-table :columns="...">` 数组式声明互斥(数组优先;都传时数组胜出)。
|
|
8
|
+
*/
|
|
9
|
+
export declare const tableColumnProps: {
|
|
10
|
+
readonly title: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
readonly dataIndex: {
|
|
15
|
+
readonly type: PropType<string | Array<string | number>>;
|
|
16
|
+
readonly default: undefined;
|
|
17
|
+
};
|
|
18
|
+
readonly columnKey: {
|
|
19
|
+
readonly type: StringConstructor;
|
|
20
|
+
readonly default: undefined;
|
|
21
|
+
};
|
|
22
|
+
readonly width: {
|
|
23
|
+
readonly type: PropType<string | number>;
|
|
24
|
+
readonly default: undefined;
|
|
25
|
+
};
|
|
26
|
+
readonly align: {
|
|
27
|
+
readonly type: PropType<TableAlign>;
|
|
28
|
+
readonly default: undefined;
|
|
29
|
+
};
|
|
30
|
+
readonly fixed: {
|
|
31
|
+
readonly type: PropType<"left" | "right">;
|
|
32
|
+
readonly default: undefined;
|
|
33
|
+
};
|
|
34
|
+
readonly sorter: {
|
|
35
|
+
readonly type: PropType<boolean | ((a: any, b: any) => number)>;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
readonly sortOrder: {
|
|
39
|
+
readonly type: PropType<TableSortOrder>;
|
|
40
|
+
readonly default: undefined;
|
|
41
|
+
};
|
|
42
|
+
readonly filters: {
|
|
43
|
+
readonly type: PropType<TableFilterOption[]>;
|
|
44
|
+
readonly default: undefined;
|
|
45
|
+
};
|
|
46
|
+
readonly filteredValue: {
|
|
47
|
+
readonly type: PropType<TableFilterValue[]>;
|
|
48
|
+
readonly default: undefined;
|
|
49
|
+
};
|
|
50
|
+
readonly filterMultiple: {
|
|
51
|
+
readonly type: BooleanConstructor;
|
|
52
|
+
readonly default: undefined;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 函数式自定义渲染。若同时提供 `customRender` slot(scoped),slot 优先。
|
|
56
|
+
*/
|
|
57
|
+
readonly customRender: {
|
|
58
|
+
readonly type: PropType<(scope: {
|
|
59
|
+
text: any;
|
|
60
|
+
record: any;
|
|
61
|
+
index: number;
|
|
62
|
+
column: TableColumn;
|
|
63
|
+
}) => VNodeChild>;
|
|
64
|
+
readonly default: undefined;
|
|
65
|
+
};
|
|
66
|
+
readonly onCell: {
|
|
67
|
+
readonly type: PropType<(record: any, index: number) => TableCellRenderProps>;
|
|
68
|
+
readonly default: undefined;
|
|
69
|
+
};
|
|
70
|
+
readonly onHeaderCell: {
|
|
71
|
+
readonly type: PropType<(column: TableColumn) => TableCellRenderProps>;
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type TableColumnProps = ExtractPropTypes<typeof tableColumnProps>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TableColumn } from '../../table/src/table-types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly fixed?: "left" | "right" | undefined;
|
|
5
|
+
readonly width?: string | number | undefined;
|
|
6
|
+
readonly filters?: import("../../table").TableFilterOption[] | undefined;
|
|
7
|
+
readonly align?: import("../../table/src/table-types").TableAlign | undefined;
|
|
8
|
+
readonly columnKey?: string | undefined;
|
|
9
|
+
readonly dataIndex?: string | (string | number)[] | undefined;
|
|
10
|
+
readonly sorter?: boolean | ((a: any, b: any) => number) | undefined;
|
|
11
|
+
readonly sortOrder?: import("../../table").TableSortOrder | undefined;
|
|
12
|
+
readonly filteredValue?: import("../../table/src/table-types").TableFilterValue[] | undefined;
|
|
13
|
+
readonly filterMultiple?: boolean | undefined;
|
|
14
|
+
readonly customRender?: ((scope: {
|
|
15
|
+
text: any;
|
|
16
|
+
record: any;
|
|
17
|
+
index: number;
|
|
18
|
+
column: TableColumn;
|
|
19
|
+
}) => import("vue").VNodeChild) | undefined;
|
|
20
|
+
readonly onCell?: ((record: any, index: number) => import("../../table").TableCellRenderProps) | undefined;
|
|
21
|
+
readonly onHeaderCell?: ((column: TableColumn) => import("../../table").TableCellRenderProps) | undefined;
|
|
22
|
+
}, () => null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
23
|
+
readonly title: string;
|
|
24
|
+
readonly fixed?: "left" | "right" | undefined;
|
|
25
|
+
readonly width?: string | number | undefined;
|
|
26
|
+
readonly filters?: import("../../table").TableFilterOption[] | undefined;
|
|
27
|
+
readonly align?: import("../../table/src/table-types").TableAlign | undefined;
|
|
28
|
+
readonly columnKey?: string | undefined;
|
|
29
|
+
readonly dataIndex?: string | (string | number)[] | undefined;
|
|
30
|
+
readonly sorter?: boolean | ((a: any, b: any) => number) | undefined;
|
|
31
|
+
readonly sortOrder?: import("../../table").TableSortOrder | undefined;
|
|
32
|
+
readonly filteredValue?: import("../../table/src/table-types").TableFilterValue[] | undefined;
|
|
33
|
+
readonly filterMultiple?: boolean | undefined;
|
|
34
|
+
readonly customRender?: ((scope: {
|
|
35
|
+
text: any;
|
|
36
|
+
record: any;
|
|
37
|
+
index: number;
|
|
38
|
+
column: TableColumn;
|
|
39
|
+
}) => import("vue").VNodeChild) | undefined;
|
|
40
|
+
readonly onCell?: ((record: any, index: number) => import("../../table").TableCellRenderProps) | undefined;
|
|
41
|
+
readonly onHeaderCell?: ((column: TableColumn) => import("../../table").TableCellRenderProps) | undefined;
|
|
42
|
+
}> & Readonly<{}>, {
|
|
43
|
+
readonly fixed: "left" | "right";
|
|
44
|
+
readonly title: string;
|
|
45
|
+
readonly width: string | number;
|
|
46
|
+
readonly filters: import("../../table").TableFilterOption[];
|
|
47
|
+
readonly align: import("../../table/src/table-types").TableAlign;
|
|
48
|
+
readonly columnKey: string;
|
|
49
|
+
readonly dataIndex: string | (string | number)[];
|
|
50
|
+
readonly sorter: boolean | ((a: any, b: any) => number);
|
|
51
|
+
readonly sortOrder: import("../../table").TableSortOrder;
|
|
52
|
+
readonly filteredValue: import("../../table/src/table-types").TableFilterValue[];
|
|
53
|
+
readonly filterMultiple: boolean;
|
|
54
|
+
readonly customRender: (scope: {
|
|
55
|
+
text: any;
|
|
56
|
+
record: any;
|
|
57
|
+
index: number;
|
|
58
|
+
column: TableColumn;
|
|
59
|
+
}) => import("vue").VNodeChild;
|
|
60
|
+
readonly onCell: (record: any, index: number) => import("../../table").TableCellRenderProps;
|
|
61
|
+
readonly onHeaderCell: (column: TableColumn) => import("../../table").TableCellRenderProps;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import TableColumnGroup from './src/table-column-group';
|
|
3
|
+
export { TableColumnGroup };
|
|
4
|
+
export type { TableColumnGroupProps } from './src/table-column-group-types';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
status: string;
|
|
9
|
+
install(app: App): void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|