element-ps 2.0.12 → 2.0.15
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/dist/index.full.js +1934 -1383
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1937 -1387
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/components/autocomplete/index.d.ts +13 -6
- package/es/components/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +18 -11
- package/es/components/autocomplete/src/autocomplete2.mjs +0 -2
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +29 -61
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +61 -29
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +59 -18
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +18 -67
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +46 -11
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -46
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +5 -30
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +30 -5
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +148 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -148
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +23 -49
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +28 -2
- package/es/components/cascader/src/index.mjs +16 -11
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +14 -1
- package/es/components/cascader-panel/index.d.ts +14 -0
- package/es/components/cascader-panel/src/config.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +110 -6
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue.d.ts +7 -0
- package/es/components/cascader-panel/src/menu.mjs +17 -2
- package/es/components/cascader-panel/src/menu.mjs.map +1 -1
- package/es/components/cascader-panel/src/node.mjs +120 -138
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node.vue.d.ts +9 -2
- package/es/components/cascader-panel/src/node2.mjs +200 -120
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/cascader-panel/src/utils.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +2 -6
- package/es/components/checkbox/src/checkbox.mjs +5 -14
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -6
- package/es/components/checkbox/src/useCheckbox.d.ts +0 -1
- package/es/components/checkbox/src/useCheckbox.mjs +2 -26
- package/es/components/checkbox/src/useCheckbox.mjs.map +1 -1
- package/es/components/collapse/index.d.ts +2 -2
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +91 -12
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +12 -91
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +14 -0
- package/es/components/descriptions/src/description-item.d.ts +6 -0
- package/es/components/descriptions/src/description-item.mjs +3 -0
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-cell.mjs +2 -1
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions.type.d.ts +1 -0
- package/es/components/descriptions/src/index.mjs +18 -9
- package/es/components/descriptions/src/index.mjs.map +1 -1
- package/es/components/descriptions/src/index.vue.d.ts +2 -0
- package/es/components/dialog/index.d.ts +101 -0
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog-content.d.ts +1 -0
- package/es/components/dialog/src/dialog-content.mjs +79 -31
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +3 -0
- package/es/components/dialog/src/dialog-content2.mjs +34 -72
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +1 -0
- package/es/components/dialog/src/dialog.mjs +87 -58
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +101 -0
- package/es/components/dialog/src/dialog2.mjs +61 -96
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.d.ts +0 -1
- package/es/components/dialog/src/use-dialog.mjs +18 -22
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +17 -34
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +34 -17
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/drawer/index.d.ts +3 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.d.ts +1 -0
- package/es/components/drawer/src/drawer.mjs +117 -20
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +3 -1
- package/es/components/drawer/src/drawer2.mjs +23 -118
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +3 -3
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +11 -56
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +56 -11
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.d.ts +8 -0
- package/es/components/form/src/form-item.d.ts +1 -0
- package/es/components/form/src/form-item.mjs +3 -0
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item.vue.d.ts +4 -0
- package/es/components/form/src/form-item2.mjs +12 -7
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -35
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +35 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image/index.d.ts +9 -5
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.d.ts +0 -1
- package/es/components/image/src/image.mjs +46 -158
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +9 -5
- package/es/components/image/src/image2.mjs +170 -50
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +210 -31
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +31 -210
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +34 -33
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/index.d.ts +4 -0
- package/es/components/input/src/input.d.ts +1 -0
- package/es/components/input/src/input.mjs +8 -6
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +4 -0
- package/es/components/input/src/input2.mjs +3 -0
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +8 -0
- package/es/components/input-number/src/input-number.vue.d.ts +8 -0
- package/es/components/link/index.d.ts +29 -2
- package/es/components/link/src/link.mjs +3 -0
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link.vue.d.ts +29 -2
- package/es/components/menu/index.d.ts +3 -3
- package/es/components/menu/index.mjs +4 -4
- package/es/components/menu/src/menu-item-group.mjs +4 -56
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +56 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/menu/src/menu-item.mjs +15 -73
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +65 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +4 -4
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +55 -14
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +14 -55
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +20 -53
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +53 -20
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/index.d.ts +6 -6
- package/es/components/popover/src/index.vue.d.ts +3 -3
- package/es/components/popover/src/popover.d.ts +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +6 -6
- package/es/components/popper/src/content.mjs +52 -64
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +64 -52
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/popper.mjs +20 -27
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +27 -20
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/popper/src/trigger.mjs +28 -17
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger.vue.d.ts +0 -1
- package/es/components/popper/src/trigger2.mjs +17 -36
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-button2.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +37 -18
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +18 -37
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +74 -67
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +62 -74
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +22 -35
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +35 -22
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +11 -59
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +59 -11
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/index.d.ts +5 -5
- package/es/components/select/src/select.mjs +2 -2
- package/es/components/select/src/select.vue.d.ts +5 -5
- package/es/components/select/src/useSelect.d.ts +5 -5
- package/es/components/select-v2/index.d.ts +10 -10
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/select-v2/src/useSelect.d.ts +5 -5
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +49 -22
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +22 -49
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +176 -81
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +81 -176
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/index.d.ts +13 -1
- package/es/components/table/src/filter-panel.vue.d.ts +5 -5
- package/es/components/table/src/table-body/render-helper.mjs +2 -1
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +4 -0
- package/es/components/table/src/table-column/defaults.mjs +3 -0
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +6 -0
- package/es/components/table/src/table-column/index.mjs +2 -1
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs +1 -8
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +33 -81
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +81 -33
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +18 -43
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +43 -18
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/text/index.d.ts +2 -0
- package/es/components/text/index.mjs +8 -0
- package/es/components/text/index.mjs.map +1 -0
- package/es/components/text/src/text.mjs +15 -0
- package/es/components/text/src/text.mjs.map +1 -0
- package/es/components/text/src/text.vue.d.ts +2 -0
- package/es/components/time-picker/src/common/picker.vue.d.ts +5 -5
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +73 -39
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +39 -73
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.mjs +64 -51
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/es/components/tooltip/src/tooltip2.mjs +51 -64
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +2 -2
- package/es/components/tooltip/src/trigger.vue.d.ts +3 -3
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/arrow.mjs +22 -38
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +38 -22
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.mjs +113 -50
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +50 -113
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +81 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -81
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +3 -3
- package/es/components/tooltip-v2/src/tooltip2.mjs +6 -6
- package/es/components/upload/index.d.ts +313 -0
- package/es/components/upload/index.mjs +5 -5
- package/es/components/upload/src/upload-content.mjs +46 -15
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +15 -46
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger.mjs +32 -11
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +11 -32
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +155 -26
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +26 -155
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.mjs +99 -106
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +313 -0
- package/es/components/upload/src/upload2.mjs +106 -99
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/index.mjs +34 -33
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +13 -6
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +18 -11
- package/lib/components/autocomplete/src/autocomplete2.js +0 -2
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +29 -61
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +61 -29
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +59 -18
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +18 -67
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +46 -11
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -46
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +5 -30
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +30 -5
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +148 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -148
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +22 -48
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +28 -2
- package/lib/components/cascader/src/index.js +16 -11
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +14 -1
- package/lib/components/cascader-panel/index.d.ts +14 -0
- package/lib/components/cascader-panel/src/config.js +1 -1
- package/lib/components/cascader-panel/src/index.js +117 -13
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue.d.ts +7 -0
- package/lib/components/cascader-panel/src/menu.js +16 -1
- package/lib/components/cascader-panel/src/menu.js.map +1 -1
- package/lib/components/cascader-panel/src/node.js +121 -138
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node.vue.d.ts +9 -2
- package/lib/components/cascader-panel/src/node2.js +200 -121
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/cascader-panel/src/utils.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +2 -6
- package/lib/components/checkbox/src/checkbox.js +5 -14
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -6
- package/lib/components/checkbox/src/useCheckbox.d.ts +0 -1
- package/lib/components/checkbox/src/useCheckbox.js +1 -25
- package/lib/components/checkbox/src/useCheckbox.js.map +1 -1
- package/lib/components/collapse/index.d.ts +2 -2
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +91 -12
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/lib/components/collapse/src/collapse-item2.js +12 -91
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +14 -0
- package/lib/components/descriptions/src/description-item.d.ts +6 -0
- package/lib/components/descriptions/src/description-item.js +3 -0
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-cell.js +2 -1
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/descriptions.type.d.ts +1 -0
- package/lib/components/descriptions/src/index.js +18 -9
- package/lib/components/descriptions/src/index.js.map +1 -1
- package/lib/components/descriptions/src/index.vue.d.ts +2 -0
- package/lib/components/dialog/index.d.ts +101 -0
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog-content.d.ts +1 -0
- package/lib/components/dialog/src/dialog-content.js +78 -30
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +3 -0
- package/lib/components/dialog/src/dialog-content2.js +33 -71
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +1 -0
- package/lib/components/dialog/src/dialog.js +86 -57
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +101 -0
- package/lib/components/dialog/src/dialog2.js +61 -96
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.d.ts +0 -1
- package/lib/components/dialog/src/use-dialog.js +19 -23
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +17 -34
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +34 -17
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/drawer/index.d.ts +3 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.d.ts +1 -0
- package/lib/components/drawer/src/drawer.js +117 -20
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -1
- package/lib/components/drawer/src/drawer2.js +23 -118
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +11 -56
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +56 -11
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.d.ts +8 -0
- package/lib/components/form/src/form-item.d.ts +1 -0
- package/lib/components/form/src/form-item.js +3 -0
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +4 -0
- package/lib/components/form/src/form-item2.js +12 -7
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -35
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +35 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image/index.d.ts +9 -5
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.d.ts +0 -1
- package/lib/components/image/src/image.js +46 -158
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +9 -5
- package/lib/components/image/src/image2.js +170 -50
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +210 -31
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +31 -210
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +42 -40
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +4 -0
- package/lib/components/input/src/input.d.ts +1 -0
- package/lib/components/input/src/input.js +8 -6
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +4 -0
- package/lib/components/input/src/input2.js +3 -0
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.d.ts +8 -0
- package/lib/components/input-number/src/input-number.vue.d.ts +8 -0
- package/lib/components/link/index.d.ts +29 -2
- package/lib/components/link/src/link.js +3 -0
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link.vue.d.ts +29 -2
- package/lib/components/menu/index.d.ts +3 -3
- package/lib/components/menu/index.js +4 -4
- package/lib/components/menu/src/menu-item-group.js +4 -56
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +56 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/menu/src/menu-item.js +16 -73
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +65 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +4 -4
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +55 -14
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +14 -55
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +20 -53
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +53 -20
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/index.d.ts +6 -6
- package/lib/components/popover/src/index.vue.d.ts +3 -3
- package/lib/components/popover/src/popover.d.ts +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +6 -6
- package/lib/components/popper/src/content.js +52 -65
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +65 -52
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/popper.js +21 -27
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +27 -21
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/popper/src/trigger.js +28 -17
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger.vue.d.ts +0 -1
- package/lib/components/popper/src/trigger2.js +17 -36
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-button2.js +1 -1
- package/lib/components/radio/src/radio-group.js +37 -18
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +18 -37
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.js +73 -69
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +64 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar.js +22 -35
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +35 -22
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +11 -59
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +59 -11
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/index.d.ts +5 -5
- package/lib/components/select/src/select.js +2 -2
- package/lib/components/select/src/select.vue.d.ts +5 -5
- package/lib/components/select/src/useSelect.d.ts +5 -5
- package/lib/components/select-v2/index.d.ts +10 -10
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/select-v2/src/useSelect.d.ts +5 -5
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +49 -22
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +22 -49
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +176 -81
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +81 -176
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/index.d.ts +13 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
- package/lib/components/table/src/table-body/render-helper.js +2 -1
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +4 -0
- package/lib/components/table/src/table-column/defaults.js +3 -0
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +6 -0
- package/lib/components/table/src/table-column/index.js +2 -1
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table-header/index.js +1 -8
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +34 -81
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +81 -34
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +18 -43
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +43 -18
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/text/index.d.ts +2 -0
- package/lib/components/text/index.js +13 -0
- package/lib/components/text/index.js.map +1 -0
- package/lib/components/text/src/text.js +19 -0
- package/lib/components/text/src/text.js.map +1 -0
- package/lib/components/text/src/text.vue.d.ts +2 -0
- package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -5
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +73 -39
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +39 -73
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.js +65 -50
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/lib/components/tooltip/src/tooltip2.js +50 -65
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +2 -2
- package/lib/components/tooltip/src/trigger.vue.d.ts +3 -3
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/arrow.js +23 -38
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +38 -23
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.js +113 -50
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +50 -113
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +81 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -81
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +3 -3
- package/lib/components/tooltip-v2/src/tooltip2.js +6 -6
- package/lib/components/upload/index.d.ts +313 -0
- package/lib/components/upload/index.js +5 -5
- package/lib/components/upload/src/upload-content.js +46 -15
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +15 -46
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-dragger.js +32 -12
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +12 -32
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +155 -27
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +27 -155
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.js +99 -109
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +313 -0
- package/lib/components/upload/src/upload2.js +109 -99
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/index.js +129 -127
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -2,184 +2,89 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
require('../../../
|
|
9
|
-
var _switch = require('./switch.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var index$1 = require('../../../hooks/use-common-props/index.js');
|
|
12
|
-
var index$2 = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var props = require('../../../utils/vue/props.js');
|
|
7
|
+
var icon = require('../../../utils/vue/icon.js');
|
|
8
|
+
var validator = require('../../../utils/vue/validator.js');
|
|
13
9
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
10
|
+
const switchProps = props.buildProps({
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: [Boolean, String, Number],
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
value: {
|
|
16
|
+
type: [Boolean, String, Number],
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
width: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 40
|
|
26
|
+
},
|
|
27
|
+
inlinePrompt: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
activeIcon: {
|
|
32
|
+
type: icon.iconPropType,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
inactiveIcon: {
|
|
36
|
+
type: icon.iconPropType,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
activeText: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
inactiveText: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
activeColor: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ""
|
|
50
|
+
},
|
|
51
|
+
inactiveColor: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
borderColor: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: ""
|
|
58
|
+
},
|
|
59
|
+
activeValue: {
|
|
60
|
+
type: [Boolean, String, Number],
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
inactiveValue: {
|
|
64
|
+
type: [Boolean, String, Number],
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
name: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: ""
|
|
70
|
+
},
|
|
71
|
+
validateEvent: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
75
|
+
id: String,
|
|
76
|
+
loading: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
beforeChange: {
|
|
81
|
+
type: props.definePropType(Function)
|
|
82
|
+
},
|
|
83
|
+
size: {
|
|
84
|
+
type: String,
|
|
85
|
+
validator: validator.isValidComponentSize
|
|
60
86
|
}
|
|
61
87
|
});
|
|
62
|
-
const _hoisted_1 = ["aria-checked", "aria-disabled"];
|
|
63
|
-
const _hoisted_2 = ["id", "name", "true-value", "false-value", "disabled"];
|
|
64
|
-
const _hoisted_3 = ["aria-hidden"];
|
|
65
|
-
const _hoisted_4 = ["aria-hidden"];
|
|
66
|
-
const _hoisted_5 = ["aria-hidden"];
|
|
67
|
-
const _hoisted_6 = ["aria-hidden"];
|
|
68
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
69
|
-
const _component_ps_icon = vue.resolveComponent("ps-icon");
|
|
70
|
-
const _component_loading = vue.resolveComponent("loading");
|
|
71
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
72
|
-
class: vue.normalizeClass(_ctx.switchKls),
|
|
73
|
-
role: "switch",
|
|
74
|
-
"aria-checked": _ctx.checked,
|
|
75
|
-
"aria-disabled": _ctx.switchDisabled
|
|
76
|
-
}, [
|
|
77
|
-
vue.createElementVNode("input", {
|
|
78
|
-
id: _ctx.id,
|
|
79
|
-
ref: "input",
|
|
80
|
-
class: vue.normalizeClass(_ctx.ns.e("input")),
|
|
81
|
-
type: "checkbox",
|
|
82
|
-
name: _ctx.name,
|
|
83
|
-
"true-value": _ctx.activeValue,
|
|
84
|
-
"false-value": _ctx.inactiveValue,
|
|
85
|
-
disabled: _ctx.switchDisabled
|
|
86
|
-
}, null, 10, _hoisted_2),
|
|
87
|
-
!_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: vue.normalizeClass([
|
|
90
|
-
_ctx.ns.e("label"),
|
|
91
|
-
_ctx.ns.em("label", "left"),
|
|
92
|
-
_ctx.ns.is("active", !_ctx.checked)
|
|
93
|
-
])
|
|
94
|
-
}, [
|
|
95
|
-
_ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, { key: 0 }, {
|
|
96
|
-
default: vue.withCtx(() => [
|
|
97
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveIcon)))
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
})) : vue.createCommentVNode("v-if", true),
|
|
101
|
-
!_ctx.inactiveIcon && _ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
102
|
-
key: 1,
|
|
103
|
-
"aria-hidden": _ctx.checked
|
|
104
|
-
}, vue.toDisplayString(_ctx.inactiveText), 9, _hoisted_3)) : vue.createCommentVNode("v-if", true)
|
|
105
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
106
|
-
vue.createElementVNode("span", {
|
|
107
|
-
ref: "core",
|
|
108
|
-
class: vue.normalizeClass(_ctx.ns.e("core")),
|
|
109
|
-
style: vue.normalizeStyle({ width: (_ctx.width || 40) + "px" })
|
|
110
|
-
}, [
|
|
111
|
-
_ctx.inlinePrompt ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
112
|
-
key: 0,
|
|
113
|
-
class: vue.normalizeClass(_ctx.ns.e("inner"))
|
|
114
|
-
}, [
|
|
115
|
-
_ctx.activeIcon || _ctx.inactiveIcon ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
116
|
-
_ctx.activeIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
117
|
-
key: 0,
|
|
118
|
-
class: vue.normalizeClass([_ctx.ns.is("icon"), _ctx.checked ? _ctx.ns.is("show") : _ctx.ns.is("hide")])
|
|
119
|
-
}, {
|
|
120
|
-
default: vue.withCtx(() => [
|
|
121
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeIcon)))
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
125
|
-
_ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
126
|
-
key: 1,
|
|
127
|
-
class: vue.normalizeClass([_ctx.ns.is("icon"), !_ctx.checked ? _ctx.ns.is("show") : _ctx.ns.is("hide")])
|
|
128
|
-
}, {
|
|
129
|
-
default: vue.withCtx(() => [
|
|
130
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveIcon)))
|
|
131
|
-
]),
|
|
132
|
-
_: 1
|
|
133
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
134
|
-
], 64)) : _ctx.activeText || _ctx.inactiveIcon ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
135
|
-
_ctx.activeText ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
136
|
-
key: 0,
|
|
137
|
-
class: vue.normalizeClass([_ctx.ns.is("text"), _ctx.checked ? _ctx.ns.is("show") : _ctx.ns.is("hide")]),
|
|
138
|
-
"aria-hidden": !_ctx.checked
|
|
139
|
-
}, vue.toDisplayString(_ctx.activeText.substring(0, 3)), 11, _hoisted_4)) : vue.createCommentVNode("v-if", true),
|
|
140
|
-
_ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
141
|
-
key: 1,
|
|
142
|
-
class: vue.normalizeClass([_ctx.ns.is("text"), !_ctx.checked ? _ctx.ns.is("show") : _ctx.ns.is("hide")]),
|
|
143
|
-
"aria-hidden": _ctx.checked
|
|
144
|
-
}, vue.toDisplayString(_ctx.inactiveText.substring(0, 3)), 11, _hoisted_5)) : vue.createCommentVNode("v-if", true)
|
|
145
|
-
], 64)) : vue.createCommentVNode("v-if", true)
|
|
146
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
147
|
-
vue.createElementVNode("div", {
|
|
148
|
-
class: vue.normalizeClass(_ctx.ns.e("action"))
|
|
149
|
-
}, [
|
|
150
|
-
_ctx.loading ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
151
|
-
key: 0,
|
|
152
|
-
class: vue.normalizeClass(_ctx.ns.is("loading"))
|
|
153
|
-
}, {
|
|
154
|
-
default: vue.withCtx(() => [
|
|
155
|
-
vue.createVNode(_component_loading)
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
159
|
-
], 2)
|
|
160
|
-
], 6),
|
|
161
|
-
!_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
162
|
-
key: 1,
|
|
163
|
-
class: vue.normalizeClass([
|
|
164
|
-
_ctx.ns.e("label"),
|
|
165
|
-
_ctx.ns.em("label", "right"),
|
|
166
|
-
_ctx.ns.is("active", _ctx.checked)
|
|
167
|
-
])
|
|
168
|
-
}, [
|
|
169
|
-
_ctx.activeIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, { key: 0 }, {
|
|
170
|
-
default: vue.withCtx(() => [
|
|
171
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeIcon)))
|
|
172
|
-
]),
|
|
173
|
-
_: 1
|
|
174
|
-
})) : vue.createCommentVNode("v-if", true),
|
|
175
|
-
!_ctx.activeIcon && _ctx.activeText ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
176
|
-
key: 1,
|
|
177
|
-
"aria-hidden": !_ctx.checked
|
|
178
|
-
}, vue.toDisplayString(_ctx.activeText), 9, _hoisted_6)) : vue.createCommentVNode("v-if", true)
|
|
179
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
|
180
|
-
], 10, _hoisted_1);
|
|
181
|
-
}
|
|
182
|
-
var Switch = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/switch/src/switch.vue"]]);
|
|
183
88
|
|
|
184
|
-
exports
|
|
89
|
+
exports.switchProps = switchProps;
|
|
185
90
|
//# sourceMappingURL=switch2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div\n :class=\"switchKls\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n >\n <input\n :id=\"id\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"[\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked),\n ]\"\n >\n <ps-icon v-if=\"inactiveIcon\"><component :is=\"inactiveIcon\" /></ps-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span\n ref=\"core\"\n :class=\"ns.e('core')\"\n :style=\"{ width: (width || 40) + 'px' }\"\n >\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <ps-icon\n v-if=\"activeIcon\"\n :class=\"[ns.is('icon'), checked ? ns.is('show') : ns.is('hide')]\"\n >\n <component :is=\"activeIcon\" />\n </ps-icon>\n <ps-icon\n v-if=\"inactiveIcon\"\n :class=\"[ns.is('icon'), !checked ? ns.is('show') : ns.is('hide')]\"\n >\n <component :is=\"inactiveIcon\" />\n </ps-icon>\n </template>\n <template v-else-if=\"activeText || inactiveIcon\">\n <span\n v-if=\"activeText\"\n :class=\"[ns.is('text'), checked ? ns.is('show') : ns.is('hide')]\"\n :aria-hidden=\"!checked\"\n >\n {{ activeText.substring(0, 3) }}\n </span>\n <span\n v-if=\"inactiveText\"\n :class=\"[ns.is('text'), !checked ? ns.is('show') : ns.is('hide')]\"\n :aria-hidden=\"checked\"\n >\n {{ inactiveText.substring(0, 3) }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <ps-icon v-if=\"loading\" :class=\"ns.is('loading')\"><loading /></ps-icon>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"[\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked),\n ]\"\n >\n <ps-icon v-if=\"activeIcon\"><component :is=\"activeIcon\" /></ps-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, onMounted, ref } from 'vue'\nimport PsIcon from '@element-ps/components/icon'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n useDisabled,\n useNamespace,\n useSize,\n} from '@element-ps/hooks'\nimport { switchProps } from './switch'\n\nconst COMPONENT_NAME = 'PsSwitch'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n components: { PsIcon, Loading },\n props: switchProps,\n setup(props) {\n const switchDisabled = useDisabled(computed(() => props.loading))\n const ns = useNamespace('switch')\n\n const switchSize = useSize()\n const isModelValue = ref(props.modelValue !== false)\n const input = ref<HTMLInputElement>()\n const core = ref<HTMLSpanElement>()\n\n const switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('checked', checked.value),\n ])\n\n const actualValue = computed(() => {\n return isModelValue.value ? props.modelValue : props.value\n })\n\n const checked = computed(() => actualValue.value === props.activeValue)\n\n const setBackgroundColor = (): void => {\n const newColor = checked.value ? props.activeColor : props.inactiveColor\n const coreEl = core.value\n if (props.borderColor) coreEl!.style.borderColor = props.borderColor\n else if (!props.borderColor) coreEl!.style.borderColor = newColor\n coreEl!.style.backgroundColor = newColor\n ;(coreEl!.children[0] as HTMLDivElement).style.color = newColor\n }\n\n onMounted(() => {\n if (props.activeColor || props.inactiveColor || props.borderColor) {\n setBackgroundColor()\n }\n\n input.value!.checked = checked.value\n })\n\n return {\n ns,\n input,\n core,\n switchDisabled,\n checked,\n switchKls,\n }\n },\n})\n</script>\n"],"names":["defineComponent","PsIcon","Loading","switchProps","useDisabled","computed","useNamespace","useSize","ref","onMounted","_createElementBlock","_normalizeClass","_createElementVNode","_openBlock","_createBlock","_withCtx","_resolveDynamicComponent","_toDisplayString","_createCommentVNode","_normalizeStyle","_Fragment","_createVNode"],"mappings":";;;;;;;;;;;;;AAkGA,MAAM,cAAiB,GAAA,UAAA,CAAA;AAEvB,MAAK,YAAaA,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,cAAA;AAAA,EACN,UAAA,EAAY,UAAEC,YAAA,WAAQC,gBAAQ,EAAA;AAAA,EAC9B,KAAO,EAAAC,mBAAA;AAAA,EACP,MAAM,KAAO,EAAA;AACX,IAAA,MAAM,iBAAiBC,mBAAY,CAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AAChE,IAAM,MAAA,EAAA,GAAKC,qBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,aAAaC,eAAQ,EAAA,CAAA;AAC3B,IAAA,MAAM,YAAe,GAAAC,OAAA,CAAI,KAAM,CAAA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A,YAAXU,eAAW,CAAA,kBAAA,CAAA;AAAA,WAAA,CAAA;;;;;KAIxD,IAAiB,CAAA,YAAA,KAAA,IAAA,CAAA,UAAA,IAAc,qCADxCX,sBAYO,CAAA,MAAA,EAAA;AAAA,MAAA,GAAA,EAAA,CAAA;MAVJ,KAAK,EAAAC,kBAAA,CAAA;AAAA,QAAY,QAAG,CAAC,CAAA,OAAA,CAAA;AAAA,QAAmB,QAAG,EAAE,CAAA,OAAA,EAAA,OAAA,CAAA;AAAA,QAA4B,IAAA,CAAA,EAAA,CAAG,EAAE,CAAA,QAAA,EAAW,IAAO,CAAA,OAAA,CAAA;AAAA,OAAA,CAAA;;AAMlF,MAAA,IAAA,CAAA,UAAA,IAAAE,aAAA,EAAA,EAAfC,eAAmE,CAAA,kBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;AAAA,QAAA,OAAA,EAAAC,WAAA,CAAxC,MAA8B;AAAA,WAA9BF,aAAA,EAAA,EAAAC,eAAA,CAA8BE,4BAAd,IAAU,CAAA,UAAA,CAAA,CAAA;AAAA,SAAA,CAAA;;;AACxC,MAAA,CAAA,IAAA,CAAA,UAAA,IAAc,oCAA3BN,sBAES,CAAA,MAAA,EAAA;AAAA,QAAA,GAAA,EAAA,CAAA;AAF+B,QAAA,aAAA,EAAW,CAAG,IAAA,CAAA,OAAA;AAAA,OAAA,EAAAO,mBAAA,CACpD,IAAU,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,UAAA,CAAA,IAAAC,sBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isValidComponentSize,\n} from '@element-ps/utils'\nimport type { ComponentSize } from '@element-ps/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport const switchProps = buildProps({\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n value: {\n type: [Boolean, String, Number],\n default: false,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n width: {\n type: Number,\n default: 40,\n },\n inlinePrompt: {\n type: Boolean,\n default: false,\n },\n activeIcon: {\n type: iconPropType,\n default: '',\n },\n inactiveIcon: {\n type: iconPropType,\n default: '',\n },\n activeText: {\n type: String,\n default: '',\n },\n inactiveText: {\n type: String,\n default: '',\n },\n activeColor: {\n type: String,\n default: '',\n },\n inactiveColor: {\n type: String,\n default: '',\n },\n borderColor: {\n type: String,\n default: '',\n },\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n name: {\n type: String,\n default: '',\n },\n validateEvent: {\n type: Boolean,\n default: true,\n },\n id: String,\n loading: {\n type: Boolean,\n default: false,\n },\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\n\nexport type SwitchInstance = InstanceType<typeof Switch>\n"],"names":["buildProps","iconPropType","definePropType","isValidComponentSize"],"mappings":";;;;;;;;;AAMY,MAAC,WAAW,GAAGA,gBAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,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E,EAAE,EAAE,MAAM;AACZ,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEC,oBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAEC,8BAAoB;AACnC,GAAG;AACH,CAAC;;;;"}
|
|
@@ -196,7 +196,7 @@ export declare const PsTable: import("element-ps/es/utils").SFCWithInstall<impor
|
|
|
196
196
|
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
197
197
|
setScrollLeft: (left?: number | undefined) => void;
|
|
198
198
|
setScrollTop: (top?: number | undefined) => void;
|
|
199
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "select
|
|
199
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select-all" | "select" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "current-change" | "header-dragend" | "expand-change")[], "select-all" | "select" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "current-change" | "header-dragend" | "expand-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
200
200
|
data: {
|
|
201
201
|
type: import("vue").PropType<any[]>;
|
|
202
202
|
default: () => never[];
|
|
@@ -398,6 +398,9 @@ export declare const PsTable: import("element-ps/es/utils").SFCWithInstall<impor
|
|
|
398
398
|
default: () => (string | null)[];
|
|
399
399
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
400
400
|
};
|
|
401
|
+
widget: {
|
|
402
|
+
type: StringConstructor;
|
|
403
|
+
};
|
|
401
404
|
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
402
405
|
type: {
|
|
403
406
|
type: StringConstructor;
|
|
@@ -457,6 +460,9 @@ export declare const PsTable: import("element-ps/es/utils").SFCWithInstall<impor
|
|
|
457
460
|
default: () => (string | null)[];
|
|
458
461
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
459
462
|
};
|
|
463
|
+
widget: {
|
|
464
|
+
type: StringConstructor;
|
|
465
|
+
};
|
|
460
466
|
}>>, {
|
|
461
467
|
type: string;
|
|
462
468
|
width: string | number;
|
|
@@ -530,6 +536,9 @@ export declare const PsTableColumn: import("element-ps/es/utils").SFCWithInstall
|
|
|
530
536
|
default: () => (string | null)[];
|
|
531
537
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
532
538
|
};
|
|
539
|
+
widget: {
|
|
540
|
+
type: StringConstructor;
|
|
541
|
+
};
|
|
533
542
|
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
534
543
|
type: {
|
|
535
544
|
type: StringConstructor;
|
|
@@ -589,6 +598,9 @@ export declare const PsTableColumn: import("element-ps/es/utils").SFCWithInstall
|
|
|
589
598
|
default: () => (string | null)[];
|
|
590
599
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
591
600
|
};
|
|
601
|
+
widget: {
|
|
602
|
+
type: StringConstructor;
|
|
603
|
+
};
|
|
592
604
|
}>>, {
|
|
593
605
|
type: string;
|
|
594
606
|
width: string | number;
|
|
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
$data: {};
|
|
49
49
|
$props: Partial<{
|
|
50
50
|
disabled: boolean;
|
|
51
|
-
trigger: import("../../../utils").BuildPropType<import("../../../utils").PropWrapper<"
|
|
51
|
+
trigger: import("../../../utils").BuildPropType<import("../../../utils").PropWrapper<"hover" | "focus" | "click" | "contextmenu" | ("hover" | "focus" | "click" | "contextmenu")[]>, unknown, unknown>;
|
|
52
52
|
offset: number;
|
|
53
53
|
effect: string;
|
|
54
54
|
style: import("vue").StyleValue;
|
|
@@ -137,7 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
137
|
showArrow: import("../../../utils").BuildPropReturn<BooleanConstructor, boolean | (() => false) | (() => true) | undefined, unknown, unknown, unknown>;
|
|
138
138
|
arrowOffset: import("../../../utils").BuildPropReturn<NumberConstructor, 5, unknown, unknown, unknown>;
|
|
139
139
|
disabled: BooleanConstructor;
|
|
140
|
-
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"
|
|
140
|
+
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"hover" | "focus" | "click" | "contextmenu" | ("hover" | "focus" | "click" | "contextmenu")[]>, "hover", unknown, unknown, unknown>;
|
|
141
141
|
virtualRef: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<import("../../..").Measurable>, unknown, unknown, unknown, unknown>;
|
|
142
142
|
virtualTriggering: BooleanConstructor;
|
|
143
143
|
onMouseenter: FunctionConstructor;
|
|
@@ -245,7 +245,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
245
245
|
showArrow: import("../../../utils").BuildPropReturn<BooleanConstructor, boolean | (() => false) | (() => true) | undefined, unknown, unknown, unknown>;
|
|
246
246
|
arrowOffset: import("../../../utils").BuildPropReturn<NumberConstructor, 5, unknown, unknown, unknown>;
|
|
247
247
|
disabled: BooleanConstructor;
|
|
248
|
-
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"
|
|
248
|
+
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"hover" | "focus" | "click" | "contextmenu" | ("hover" | "focus" | "click" | "contextmenu")[]>, "hover", unknown, unknown, unknown>;
|
|
249
249
|
virtualRef: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<import("../../..").Measurable>, unknown, unknown, unknown, unknown>;
|
|
250
250
|
virtualTriggering: BooleanConstructor;
|
|
251
251
|
onMouseenter: FunctionConstructor;
|
|
@@ -334,7 +334,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
334
334
|
"onUpdate:visible": import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<(val: boolean) => void>, never, false, never, never>;
|
|
335
335
|
}>>, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
336
336
|
disabled: boolean;
|
|
337
|
-
trigger: import("../../../utils").BuildPropType<import("../../../utils").PropWrapper<"
|
|
337
|
+
trigger: import("../../../utils").BuildPropType<import("../../../utils").PropWrapper<"hover" | "focus" | "click" | "contextmenu" | ("hover" | "focus" | "click" | "contextmenu")[]>, unknown, unknown>;
|
|
338
338
|
offset: number;
|
|
339
339
|
effect: string;
|
|
340
340
|
style: import("vue").StyleValue;
|
|
@@ -443,7 +443,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
443
443
|
showArrow: import("../../../utils").BuildPropReturn<BooleanConstructor, boolean | (() => false) | (() => true) | undefined, unknown, unknown, unknown>;
|
|
444
444
|
arrowOffset: import("../../../utils").BuildPropReturn<NumberConstructor, 5, unknown, unknown, unknown>;
|
|
445
445
|
disabled: BooleanConstructor;
|
|
446
|
-
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"
|
|
446
|
+
trigger: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<"hover" | "focus" | "click" | "contextmenu" | ("hover" | "focus" | "click" | "contextmenu")[]>, "hover", unknown, unknown, unknown>;
|
|
447
447
|
virtualRef: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<import("../../..").Measurable>, unknown, unknown, unknown, unknown>;
|
|
448
448
|
virtualTriggering: BooleanConstructor;
|
|
449
449
|
onMouseenter: FunctionConstructor;
|
|
@@ -101,7 +101,8 @@ function useRender(props) {
|
|
|
101
101
|
rowspan,
|
|
102
102
|
colspan,
|
|
103
103
|
onMouseenter: ($event) => handleCellMouseEnter($event, { ...row, tooltipEffect }),
|
|
104
|
-
onMouseleave: handleCellMouseLeave
|
|
104
|
+
onMouseleave: handleCellMouseLeave,
|
|
105
|
+
widget: column.widget ? "table-column:default:" + column.widget.split(":")[1] : void 0
|
|
105
106
|
}, [tdChildren]);
|
|
106
107
|
}));
|
|
107
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-helper.js","sources":["../../../../../../../packages/components/table/src/table-body/render-helper.ts"],"sourcesContent":["import { computed, h, inject } from 'vue'\nimport { getRowIdentity } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useEvents from './events-helper'\nimport useStyles from './styles-helper'\nimport type { TableBodyProps } from './defaults'\nimport type { RenderRowData, TableProps, TreeNode } from '../table/defaults'\n\nfunction useRender<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n } = useEvents(props)\n const {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n } = useStyles(props)\n const firstDefaultColumnIndex = computed(() => {\n return props.store.states.columns.value.findIndex(\n ({ type }) => type === 'default'\n )\n })\n const getKeyOfRow = (row: T, index: number) => {\n const rowKey = (parent.props as Partial<TableProps<T>>).rowKey\n if (rowKey) {\n return getRowIdentity(row, rowKey)\n }\n return index\n }\n const rowRender = (\n row: T,\n $index: number,\n treeRowData?: TreeNode,\n expanded = false\n ) => {\n const { tooltipEffect, store } = props\n const { indent, columns } = store.states\n const rowClasses = getRowClass(row, $index)\n let display = true\n if (treeRowData) {\n rowClasses.push(`el-table__row--level-${treeRowData.level}`)\n display = treeRowData.display\n }\n const displayStyle = display\n ? null\n : {\n display: 'none',\n }\n return h(\n 'tr',\n {\n style: [displayStyle, getRowStyle(row, $index)],\n class: rowClasses,\n key: getKeyOfRow(row, $index),\n onDblclick: ($event) => handleDoubleClick($event, row),\n onClick: ($event) => handleClick($event, row),\n onContextmenu: ($event) => handleContextMenu($event, row),\n onMouseenter: () => handleMouseEnter($index),\n onMouseleave: handleMouseLeave,\n },\n columns.value.map((column, cellIndex) => {\n const { rowspan, colspan } = getSpan(row, column, $index, cellIndex)\n if (!rowspan || !colspan) {\n return null\n }\n const columnData = { ...column }\n columnData.realWidth = getColspanRealWidth(\n columns.value,\n colspan,\n cellIndex\n )\n const data: RenderRowData<T> = {\n store: props.store,\n _self: props.context || parent,\n column: columnData,\n row,\n $index,\n cellIndex,\n expanded,\n }\n if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {\n data.treeNode = {\n indent: treeRowData.level * indent.value,\n level: treeRowData.level,\n }\n if (typeof treeRowData.expanded === 'boolean') {\n data.treeNode.expanded = treeRowData.expanded\n // 表明是懒加载\n if ('loading' in treeRowData) {\n data.treeNode.loading = treeRowData.loading\n }\n if ('noLazyChildren' in treeRowData) {\n data.treeNode.noLazyChildren = treeRowData.noLazyChildren\n }\n }\n }\n const baseKey = `${$index},${cellIndex}`\n const patchKey = columnData.columnKey || columnData.rawColumnKey || ''\n const tdChildren = cellChildren(cellIndex, column, data)\n return h(\n 'td',\n {\n style: getCellStyle($index, cellIndex, row, column),\n class: getCellClass($index, cellIndex, row, column),\n key: `${patchKey}${baseKey}`,\n rowspan,\n colspan,\n onMouseenter: ($event) =>\n handleCellMouseEnter($event, { ...row, tooltipEffect }),\n onMouseleave: handleCellMouseLeave,\n },\n [tdChildren]\n )\n })\n )\n }\n const cellChildren = (cellIndex, column, data) => {\n return column.renderCell(data)\n }\n\n const wrappedRowRender = (row: T, $index: number) => {\n const store = props.store\n const { isRowExpanded, assertRowKey } = store\n const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } =\n store.states\n const columns = store.states.columns.value\n const hasExpandColumn = columns.some(({ type }) => type === 'expand')\n if (hasExpandColumn) {\n const expanded = isRowExpanded(row)\n const tr = rowRender(row, $index, undefined, expanded)\n const renderExpanded = parent.renderExpanded\n if (expanded) {\n if (!renderExpanded) {\n console.error('[Element Error]renderExpanded is required.')\n return tr\n }\n // 使用二维数组,避免修改 $index\n // Use a matrix to avoid modifying $index\n return [\n [\n tr,\n h(\n 'tr',\n {\n key: `expanded-row__${tr.key as string}`,\n },\n [\n h(\n 'td',\n {\n colspan: columns.length,\n class: 'el-table__cell el-table__expanded-cell',\n },\n [renderExpanded({ row, $index, store, expanded })]\n ),\n ]\n ),\n ],\n ]\n } else {\n // 使用二维数组,避免修改 $index\n // Use a two dimensional array avoid modifying $index\n return [[tr]]\n }\n } else if (Object.keys(treeData.value).length) {\n assertRowKey()\n // TreeTable 时,rowKey 必须由用户设定,不使用 getKeyOfRow 计算\n // 在调用 rowRender 函数时,仍然会计算 rowKey,不太好的操作\n const key = getRowIdentity(row, rowKey.value)\n let cur = treeData.value[key]\n let treeRowData = null\n if (cur) {\n treeRowData = {\n expanded: cur.expanded,\n level: cur.level,\n display: true,\n }\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n treeRowData.noLazyChildren = !(cur.children && cur.children.length)\n }\n treeRowData.loading = cur.loading\n }\n }\n const tmp = [rowRender(row, $index, treeRowData)]\n // 渲染嵌套数据\n if (cur) {\n // currentRow 记录的是 index,所以还需主动增加 TreeTable 的 index\n let i = 0\n const traverse = (children, parent) => {\n if (!(children && children.length && parent)) return\n children.forEach((node) => {\n // 父节点的 display 状态影响子节点的显示状态\n const innerTreeRowData = {\n display: parent.display && parent.expanded,\n level: parent.level + 1,\n expanded: false,\n noLazyChildren: false,\n loading: false,\n }\n const childKey = getRowIdentity(node, rowKey.value)\n if (childKey === undefined || childKey === null) {\n throw new Error('For nested data item, row-key is required.')\n }\n cur = { ...treeData.value[childKey] }\n // 对于当前节点,分成有无子节点两种情况。\n // 如果包含子节点的,设置 expanded 属性。\n // 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。\n if (cur) {\n innerTreeRowData.expanded = cur.expanded\n // 懒加载的某些节点,level 未知\n cur.level = cur.level || innerTreeRowData.level\n cur.display = !!(cur.expanded && innerTreeRowData.display)\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n innerTreeRowData.noLazyChildren = !(\n cur.children && cur.children.length\n )\n }\n innerTreeRowData.loading = cur.loading\n }\n }\n i++\n tmp.push(rowRender(node, $index + i, innerTreeRowData))\n if (cur) {\n const nodes =\n lazyTreeNodeMap.value[childKey] ||\n node[childrenColumnName.value]\n traverse(nodes, cur)\n }\n })\n }\n // 对于 root 节点,display 一定为 true\n cur.display = true\n const nodes =\n lazyTreeNodeMap.value[key] || row[childrenColumnName.value]\n traverse(nodes, cur)\n }\n return tmp\n } else {\n return rowRender(row, $index, undefined)\n }\n }\n\n return {\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useRender\n"],"names":["inject","TABLE_INJECTION_KEY","useEvents","useStyles","computed","getRowIdentity","h"],"mappings":";;;;;;;;;;AAKA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,MAAM,GAAGA,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM;AACR,IAAI,iBAAiB;AACrB,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IA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aAAa;AACb,WAAW,CAAC,CAAC;AACb,SAAS,CAAC;AACV,QAAQ,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAC3B,QAAQ,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAClF,QAAQ,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7B,OAAO;AACP,MAAM,OAAO,GAAG,CAAC;AACjB,KAAK,MAAM;AACX,MAAM,OAAO,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5C,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"render-helper.js","sources":["../../../../../../../packages/components/table/src/table-body/render-helper.ts"],"sourcesContent":["import { computed, h, inject } from 'vue'\nimport { getRowIdentity } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useEvents from './events-helper'\nimport useStyles from './styles-helper'\nimport type { TableBodyProps } from './defaults'\nimport type { RenderRowData, TableProps, TreeNode } from '../table/defaults'\n\nfunction useRender<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n } = useEvents(props)\n const {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n } = useStyles(props)\n const firstDefaultColumnIndex = computed(() => {\n return props.store.states.columns.value.findIndex(\n ({ type }) => type === 'default'\n )\n })\n const getKeyOfRow = (row: T, index: number) => {\n const rowKey = (parent.props as Partial<TableProps<T>>).rowKey\n if (rowKey) {\n return getRowIdentity(row, rowKey)\n }\n return index\n }\n const rowRender = (\n row: T,\n $index: number,\n treeRowData?: TreeNode,\n expanded = false\n ) => {\n const { tooltipEffect, store } = props\n const { indent, columns } = store.states\n const rowClasses = getRowClass(row, $index)\n let display = true\n if (treeRowData) {\n rowClasses.push(`el-table__row--level-${treeRowData.level}`)\n display = treeRowData.display\n }\n const displayStyle = display\n ? null\n : {\n display: 'none',\n }\n return h(\n 'tr',\n {\n style: [displayStyle, getRowStyle(row, $index)],\n class: rowClasses,\n key: getKeyOfRow(row, $index),\n onDblclick: ($event) => handleDoubleClick($event, row),\n onClick: ($event) => handleClick($event, row),\n onContextmenu: ($event) => handleContextMenu($event, row),\n onMouseenter: () => handleMouseEnter($index),\n onMouseleave: handleMouseLeave,\n },\n columns.value.map((column, cellIndex) => {\n const { rowspan, colspan } = getSpan(row, column, $index, cellIndex)\n if (!rowspan || !colspan) {\n return null\n }\n const columnData = { ...column }\n columnData.realWidth = getColspanRealWidth(\n columns.value,\n colspan,\n cellIndex\n )\n const data: RenderRowData<T> = {\n store: props.store,\n _self: props.context || parent,\n column: columnData,\n row,\n $index,\n cellIndex,\n expanded,\n }\n if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {\n data.treeNode = {\n indent: treeRowData.level * indent.value,\n level: treeRowData.level,\n }\n if (typeof treeRowData.expanded === 'boolean') {\n data.treeNode.expanded = treeRowData.expanded\n // 表明是懒加载\n if ('loading' in treeRowData) {\n data.treeNode.loading = treeRowData.loading\n }\n if ('noLazyChildren' in treeRowData) {\n data.treeNode.noLazyChildren = treeRowData.noLazyChildren\n }\n }\n }\n const baseKey = `${$index},${cellIndex}`\n const patchKey = columnData.columnKey || columnData.rawColumnKey || ''\n const tdChildren = cellChildren(cellIndex, column, data)\n return h(\n 'td',\n {\n style: getCellStyle($index, cellIndex, row, column),\n class: getCellClass($index, cellIndex, row, column),\n key: `${patchKey}${baseKey}`,\n rowspan,\n colspan,\n onMouseenter: ($event) =>\n handleCellMouseEnter($event, { ...row, tooltipEffect }),\n onMouseleave: handleCellMouseLeave,\n widget: column.widget ? 'table-column:default:' + column.widget.split(':')[1] : undefined,\n },\n [tdChildren]\n )\n })\n )\n }\n const cellChildren = (cellIndex, column, data) => {\n return column.renderCell(data)\n }\n\n const wrappedRowRender = (row: T, $index: number) => {\n const store = props.store\n const { isRowExpanded, assertRowKey } = store\n const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } =\n store.states\n const columns = store.states.columns.value\n const hasExpandColumn = columns.some(({ type }) => type === 'expand')\n if (hasExpandColumn) {\n const expanded = isRowExpanded(row)\n const tr = rowRender(row, $index, undefined, expanded)\n const renderExpanded = parent.renderExpanded\n if (expanded) {\n if (!renderExpanded) {\n console.error('[Element Error]renderExpanded is required.')\n return tr\n }\n // 使用二维数组,避免修改 $index\n // Use a matrix to avoid modifying $index\n return [\n [\n tr,\n h(\n 'tr',\n {\n key: `expanded-row__${tr.key as string}`,\n },\n [\n h(\n 'td',\n {\n colspan: columns.length,\n class: 'el-table__cell el-table__expanded-cell',\n },\n [renderExpanded({ row, $index, store, expanded })]\n ),\n ]\n ),\n ],\n ]\n } else {\n // 使用二维数组,避免修改 $index\n // Use a two dimensional array avoid modifying $index\n return [[tr]]\n }\n } else if (Object.keys(treeData.value).length) {\n assertRowKey()\n // TreeTable 时,rowKey 必须由用户设定,不使用 getKeyOfRow 计算\n // 在调用 rowRender 函数时,仍然会计算 rowKey,不太好的操作\n const key = getRowIdentity(row, rowKey.value)\n let cur = treeData.value[key]\n let treeRowData = null\n if (cur) {\n treeRowData = {\n expanded: cur.expanded,\n level: cur.level,\n display: true,\n }\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n treeRowData.noLazyChildren = !(cur.children && cur.children.length)\n }\n treeRowData.loading = cur.loading\n }\n }\n const tmp = [rowRender(row, $index, treeRowData)]\n // 渲染嵌套数据\n if (cur) {\n // currentRow 记录的是 index,所以还需主动增加 TreeTable 的 index\n let i = 0\n const traverse = (children, parent) => {\n if (!(children && children.length && parent)) return\n children.forEach((node) => {\n // 父节点的 display 状态影响子节点的显示状态\n const innerTreeRowData = {\n display: parent.display && parent.expanded,\n level: parent.level + 1,\n expanded: false,\n noLazyChildren: false,\n loading: false,\n }\n const childKey = getRowIdentity(node, rowKey.value)\n if (childKey === undefined || childKey === null) {\n throw new Error('For nested data item, row-key is required.')\n }\n cur = { ...treeData.value[childKey] }\n // 对于当前节点,分成有无子节点两种情况。\n // 如果包含子节点的,设置 expanded 属性。\n // 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。\n if (cur) {\n innerTreeRowData.expanded = cur.expanded\n // 懒加载的某些节点,level 未知\n cur.level = cur.level || innerTreeRowData.level\n cur.display = !!(cur.expanded && innerTreeRowData.display)\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n innerTreeRowData.noLazyChildren = !(\n cur.children && cur.children.length\n )\n }\n innerTreeRowData.loading = cur.loading\n }\n }\n i++\n tmp.push(rowRender(node, $index + i, innerTreeRowData))\n if (cur) {\n const nodes =\n lazyTreeNodeMap.value[childKey] ||\n node[childrenColumnName.value]\n traverse(nodes, cur)\n }\n })\n }\n // 对于 root 节点,display 一定为 true\n cur.display = true\n const nodes =\n lazyTreeNodeMap.value[key] || row[childrenColumnName.value]\n traverse(nodes, cur)\n }\n return tmp\n } else {\n return rowRender(row, $index, undefined)\n }\n }\n\n return {\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useRender\n"],"names":["inject","TABLE_INJECTION_KEY","useEvents","useStyles","computed","getRowIdentity","h"],"mappings":";;;;;;;;;;AAKA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,MAAM,GAAGA,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM;AACR,IAAI,iBAAiB;AACrB,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,gBAA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;AACrB,cAAc,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC/F,cAAc,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACpC,aAAa;AACb,WAAW,CAAC,CAAC;AACb,SAAS,CAAC;AACV,QAAQ,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAC3B,QAAQ,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAClF,QAAQ,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7B,OAAO;AACP,MAAM,OAAO,GAAG,CAAC;AACjB,KAAK,MAAM;AACX,MAAM,OAAO,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5C,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -56,6 +56,7 @@ interface TableColumnCtx<T> {
|
|
|
56
56
|
getColumnIndex: () => number;
|
|
57
57
|
no: number;
|
|
58
58
|
filterOpened?: boolean;
|
|
59
|
+
widget: string;
|
|
59
60
|
}
|
|
60
61
|
interface TableColumn<T> extends ComponentInternalInstance {
|
|
61
62
|
vnode: {
|
|
@@ -122,5 +123,8 @@ declare const _default: {
|
|
|
122
123
|
default: () => (string | null)[];
|
|
123
124
|
validator: (val: TableColumnCtx<unknown>['sortOrders']) => boolean;
|
|
124
125
|
};
|
|
126
|
+
widget: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
};
|
|
125
129
|
};
|
|
126
130
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["import type { ComponentInternalInstance, PropType, Ref, VNode } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\n\ntype CI<T> = { column: TableColumnCtx<T>; $index: number }\n\ntype Filters = {\n text: string\n value: string\n}[]\n\ntype FilterMethods<T> = (value, row: T, column: TableColumnCtx<T>) => void\n\ntype ValueOf<T> = T[keyof T]\n\ninterface TableColumnCtx<T> {\n id: string\n realWidth: number\n type: string\n label: string\n className: string\n labelClassName: string\n property: string\n prop: string\n width: string | number\n minWidth: string | number\n renderHeader: (data: CI<T>) => VNode\n sortable: boolean | string\n sortMethod: (a: T, b: T) => number\n sortBy: string | ((row: T, index: number) => string) | string[]\n resizable: boolean\n columnKey: string\n rawColumnKey: string\n align: string\n headerAlign: string\n showTooltipWhenOverflow: boolean\n showOverflowTooltip: boolean\n fixed: boolean | string\n formatter: (\n row: T,\n column: TableColumnCtx<T>,\n cellValue,\n index: number\n ) => VNode | string\n selectable: (row: T, index: number) => boolean\n reserveSelection: boolean\n filterMethod: FilterMethods<T>\n filteredValue: string[]\n filters: Filters\n filterPlacement: string\n filterMultiple: boolean\n index: number | ((index: number) => number)\n sortOrders: ('ascending' | 'descending' | null)[]\n renderCell: (data: any) => void\n colSpan: number\n rowSpan: number\n children: TableColumnCtx<T>[]\n level: number\n filterable: boolean | FilterMethods<T> | Filters\n order: string\n isColumnGroup: boolean\n isSubColumn: boolean\n columns: TableColumnCtx<T>[]\n getColumnIndex: () => number\n no: number\n filterOpened?: boolean\n}\n\ninterface TableColumn<T> extends ComponentInternalInstance {\n vnode: {\n vParent: TableColumn<T> | Table<T>\n } & VNode\n vParent: TableColumn<T> | Table<T>\n columnId: string\n columnConfig: Ref<Partial<TableColumnCtx<T>>>\n}\n\nexport type { Filters, FilterMethods, TableColumnCtx, TableColumn, ValueOf }\n\nexport default {\n type: {\n type: String,\n default: 'default',\n },\n label: String,\n className: String,\n labelClassName: String,\n property: String,\n prop: String,\n width: {\n type: [String, Number],\n default: '',\n },\n minWidth: {\n type: [String, Number],\n default: '',\n },\n renderHeader: Function as PropType<\n TableColumnCtx<DefaultRow>['renderHeader']\n >,\n sortable: {\n type: [Boolean, String],\n default: false,\n },\n sortMethod: Function as PropType<TableColumnCtx<DefaultRow>['sortMethod']>,\n sortBy: [String, Function, Array] as PropType<\n TableColumnCtx<DefaultRow>['sortBy']\n >,\n resizable: {\n type: Boolean,\n default: true,\n },\n columnKey: String,\n align: String,\n headerAlign: String,\n showTooltipWhenOverflow: Boolean,\n showOverflowTooltip: Boolean,\n fixed: [Boolean, String],\n formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,\n selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,\n reserveSelection: Boolean,\n filterMethod: Function as PropType<\n TableColumnCtx<DefaultRow>['filterMethod']\n >,\n filteredValue: Array as PropType<TableColumnCtx<DefaultRow>['filteredValue']>,\n filters: Array as PropType<TableColumnCtx<DefaultRow>['filters']>,\n filterPlacement: String,\n filterMultiple: {\n type: Boolean,\n default: true,\n },\n index: [Number, Function] as PropType<TableColumnCtx<DefaultRow>['index']>,\n sortOrders: {\n type: Array as PropType<TableColumnCtx<DefaultRow>['sortOrders']>,\n default: () => {\n return ['ascending', 'descending', null]\n },\n validator: (val: TableColumnCtx<unknown>['sortOrders']) => {\n return val.every((order: string) =>\n ['ascending', 'descending', null].includes(order)\n )\n },\n },\n}\n"],"names":[],"mappings":";;;;AAAA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,cAAc,EAAE,MAAM;AACxB,EAAE,QAAQ,EAAE,MAAM;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAA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AAK;AACL,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK;AACxB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"defaults.js","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["import type { ComponentInternalInstance, PropType, Ref, VNode } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\n\ntype CI<T> = { column: TableColumnCtx<T>; $index: number }\n\ntype Filters = {\n text: string\n value: string\n}[]\n\ntype FilterMethods<T> = (value, row: T, column: TableColumnCtx<T>) => void\n\ntype ValueOf<T> = T[keyof T]\n\ninterface TableColumnCtx<T> {\n id: string\n realWidth: number\n type: string\n label: string\n className: string\n labelClassName: string\n property: string\n prop: string\n width: string | number\n minWidth: string | number\n renderHeader: (data: CI<T>) => VNode\n sortable: boolean | string\n sortMethod: (a: T, b: T) => number\n sortBy: string | ((row: T, index: number) => string) | string[]\n resizable: boolean\n columnKey: string\n rawColumnKey: string\n align: string\n headerAlign: string\n showTooltipWhenOverflow: boolean\n showOverflowTooltip: boolean\n fixed: boolean | string\n formatter: (\n row: T,\n column: TableColumnCtx<T>,\n cellValue,\n index: number\n ) => VNode | string\n selectable: (row: T, index: number) => boolean\n reserveSelection: boolean\n filterMethod: FilterMethods<T>\n filteredValue: string[]\n filters: Filters\n filterPlacement: string\n filterMultiple: boolean\n index: number | ((index: number) => number)\n sortOrders: ('ascending' | 'descending' | null)[]\n renderCell: (data: any) => void\n colSpan: number\n rowSpan: number\n children: TableColumnCtx<T>[]\n level: number\n filterable: boolean | FilterMethods<T> | Filters\n order: string\n isColumnGroup: boolean\n isSubColumn: boolean\n columns: TableColumnCtx<T>[]\n getColumnIndex: () => number\n no: number\n filterOpened?: boolean\n widget: string\n}\n\ninterface TableColumn<T> extends ComponentInternalInstance {\n vnode: {\n vParent: TableColumn<T> | Table<T>\n } & VNode\n vParent: TableColumn<T> | Table<T>\n columnId: string\n columnConfig: Ref<Partial<TableColumnCtx<T>>>\n}\n\nexport type { Filters, FilterMethods, TableColumnCtx, TableColumn, ValueOf }\n\nexport default {\n type: {\n type: String,\n default: 'default',\n },\n label: String,\n className: String,\n labelClassName: String,\n property: String,\n prop: String,\n width: {\n type: [String, Number],\n default: '',\n },\n minWidth: {\n type: [String, Number],\n default: '',\n },\n renderHeader: Function as PropType<\n TableColumnCtx<DefaultRow>['renderHeader']\n >,\n sortable: {\n type: [Boolean, String],\n default: false,\n },\n sortMethod: Function as PropType<TableColumnCtx<DefaultRow>['sortMethod']>,\n sortBy: [String, Function, Array] as PropType<\n TableColumnCtx<DefaultRow>['sortBy']\n >,\n resizable: {\n type: Boolean,\n default: true,\n },\n columnKey: String,\n align: String,\n headerAlign: String,\n showTooltipWhenOverflow: Boolean,\n showOverflowTooltip: Boolean,\n fixed: [Boolean, String],\n formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,\n selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,\n reserveSelection: Boolean,\n filterMethod: Function as PropType<\n TableColumnCtx<DefaultRow>['filterMethod']\n >,\n filteredValue: Array as PropType<TableColumnCtx<DefaultRow>['filteredValue']>,\n filters: Array as PropType<TableColumnCtx<DefaultRow>['filters']>,\n filterPlacement: String,\n filterMultiple: {\n type: Boolean,\n default: true,\n },\n index: [Number, Function] as PropType<TableColumnCtx<DefaultRow>['index']>,\n sortOrders: {\n type: Array as PropType<TableColumnCtx<DefaultRow>['sortOrders']>,\n default: () => {\n return ['ascending', 'descending', null]\n },\n validator: (val: TableColumnCtx<unknown>['sortOrders']) => {\n return val.every((order: string) =>\n ['ascending', 'descending', null].includes(order)\n )\n },\n },\n widget: {\n type: String,\n },\n}\n"],"names":[],"mappings":";;;;AAAA,mBAAe;AACf,EAAE,IAA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,MAAM;AACzB,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM;AACnB,MAAM,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAC/C,KAAK;AACL,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK;AACxB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,KAAK;AACL,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -58,6 +58,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
58
|
default: () => (string | null)[];
|
|
59
59
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
60
60
|
};
|
|
61
|
+
widget: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
61
64
|
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
65
|
type: {
|
|
63
66
|
type: StringConstructor;
|
|
@@ -117,6 +120,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
117
120
|
default: () => (string | null)[];
|
|
118
121
|
validator: (val: ("ascending" | "descending" | null)[]) => boolean;
|
|
119
122
|
};
|
|
123
|
+
widget: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
};
|
|
120
126
|
}>>, {
|
|
121
127
|
type: string;
|
|
122
128
|
width: string | number;
|