@element-plus/nightly 0.0.20220102 → 0.0.20220106
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +7914 -7042
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +7889 -7034
- package/es/components/autocomplete/index.d.ts +26 -18
- package/es/components/autocomplete/src/index.vue.d.ts +13 -10
- package/es/components/autocomplete/src/index.vue_vue_type_script_lang.mjs +14 -18
- package/es/components/autocomplete/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.mjs +52 -49
- package/es/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +4 -4
- package/es/components/carousel/src/main.vue.d.ts +4 -4
- package/es/components/cascader/index.d.ts +1118 -6532
- package/es/components/cascader/src/index.vue.d.ts +559 -3267
- package/es/components/cascader/src/index.vue_vue_type_script_lang.mjs +10 -10
- package/es/components/cascader/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.mjs +12 -12
- package/es/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs +3 -0
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.mjs +7 -13
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.mjs +2 -2
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.mjs.map +1 -1
- package/es/components/collection/index.d.ts +2 -0
- package/es/components/collection/index.mjs +3 -0
- package/es/components/{popper/src → collection}/index.mjs.map +1 -1
- package/es/components/collection/src/collection-item.mjs +7 -0
- package/es/components/collection/src/collection-item.mjs.map +1 -0
- package/es/components/collection/src/collection-item.vue.d.ts +2 -0
- package/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs +9 -0
- package/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.mjs +8 -0
- package/es/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.mjs.map +1 -0
- package/es/components/collection/src/collection.d.ts +263 -0
- package/es/components/collection/src/collection.mjs +68 -0
- package/es/components/collection/src/collection.mjs.map +1 -0
- package/es/components/collection/src/collection.vue.d.ts +2 -0
- package/es/components/collection/src/collection.vue_vue_type_script_lang.mjs +8 -0
- package/es/components/collection/src/collection.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.mjs +8 -0
- package/es/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.mjs.map +1 -0
- package/es/components/collection/src/collection2.mjs +7 -0
- package/es/components/collection/src/collection2.mjs.map +1 -0
- package/es/components/collection/src/tokens.d.ts +12 -0
- package/es/components/collection/src/tokens.mjs +2 -0
- package/es/components/collection/src/tokens.mjs.map +1 -0
- package/es/components/color-picker/index.d.ts +0 -2
- package/es/components/color-picker/src/index.vue.d.ts +0 -2
- package/es/components/color-picker/src/index.vue_vue_type_script_lang.mjs +2 -4
- package/es/components/color-picker/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.mjs +9 -10
- package/es/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +4 -4
- package/es/components/date-picker/src/date-picker.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/description-item.d.ts +2 -2
- package/es/components/dialog/index.d.ts +5 -5
- package/es/components/dialog/src/dialog.vue.d.ts +5 -5
- package/es/components/drawer/index.d.ts +5 -5
- package/es/components/drawer/src/drawer.vue.d.ts +5 -5
- package/es/components/dropdown/index.d.ts +767 -84
- package/es/components/dropdown/src/dropdown-item-impl.mjs +7 -0
- package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +39 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs +53 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.mjs +33 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +17 -9
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs +51 -21
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.mjs +30 -20
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +17 -6
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs +59 -23
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.mjs +12 -9
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +295 -1
- package/es/components/dropdown/src/dropdown.mjs +84 -0
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +712 -73
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs +60 -153
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.mjs +92 -52
- package/es/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.mjs.map +1 -1
- package/es/components/dropdown/src/tokens.d.ts +8 -0
- package/es/components/dropdown/src/tokens.mjs +4 -0
- package/es/components/dropdown/src/tokens.mjs.map +1 -0
- package/es/components/focus-trap/index.d.ts +5 -0
- package/es/components/focus-trap/index.mjs +6 -0
- package/es/components/focus-trap/index.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.mjs +7 -0
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +21 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs +137 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.mjs +8 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.mjs.map +1 -0
- package/es/components/focus-trap/src/tokens.d.ts +11 -0
- package/es/components/focus-trap/src/tokens.mjs +12 -0
- package/es/components/focus-trap/src/tokens.mjs.map +1 -0
- package/es/components/focus-trap/src/utils.d.ts +18 -0
- package/es/components/focus-trap/src/utils.mjs +92 -0
- package/es/components/focus-trap/src/utils.mjs.map +1 -0
- package/es/components/image/index.d.ts +2 -2
- package/es/components/image/src/image.vue.d.ts +2 -2
- package/es/components/index.mjs +7 -6
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/index.d.ts +5 -5
- package/es/components/input/src/input.vue.d.ts +5 -5
- package/es/components/input-number/index.d.ts +12 -12
- package/es/components/input-number/src/input-number.vue.d.ts +12 -12
- package/es/components/menu/index.d.ts +9 -3
- package/es/components/menu/src/menu-item.vue.d.ts +4 -2
- package/es/components/menu/src/menu-item.vue_vue_type_script_lang.mjs +3 -3
- package/es/components/menu/src/menu-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +1 -1
- package/es/components/menu/src/menu.mjs +2 -1
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +18 -21
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/menu/src/types.d.ts +2 -0
- package/es/components/message-box/src/index.vue.d.ts +2 -2
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/popconfirm/index.d.ts +19 -12
- package/es/components/popconfirm/index.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +3 -5
- package/es/components/popconfirm/src/popconfirm.mjs +11 -5
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +19 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.mjs +22 -20
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.mjs +12 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.mjs.map +1 -1
- package/es/components/popover/index.d.ts +1690 -420
- package/es/components/popover/src/directive.mjs +7 -13
- package/es/components/popover/src/directive.mjs.map +1 -1
- package/es/components/popover/src/index.mjs +2 -0
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +846 -213
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs +41 -107
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs +31 -0
- package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs.map +1 -0
- package/es/components/popover/src/popover.d.ts +70 -0
- package/es/components/popover/src/popover.mjs +31 -0
- package/es/components/popover/src/popover.mjs.map +1 -0
- package/es/components/popper/index.d.ts +7 -3479
- package/es/components/popper/index.mjs +13 -14
- package/es/components/popper/index.mjs.map +1 -1
- package/es/components/popper/src/arrow.mjs +7 -0
- package/es/components/popper/src/arrow.mjs.map +1 -0
- package/es/components/popper/src/arrow.vue.d.ts +12 -0
- package/es/components/popper/src/arrow.vue_vue_type_script_lang.mjs +27 -0
- package/es/components/popper/src/arrow.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.mjs +13 -0
- package/es/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.mjs.map +1 -0
- package/es/components/popper/src/container.d.ts +3 -0
- package/es/components/popper/src/container.mjs +22 -0
- package/es/components/popper/src/container.mjs.map +1 -0
- package/es/components/popper/src/content.mjs +7 -0
- package/es/components/popper/src/content.mjs.map +1 -0
- package/es/components/popper/src/content.vue.d.ts +299 -0
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs +85 -0
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs +16 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs.map +1 -0
- package/es/components/popper/src/popper.d.ts +58 -0
- package/es/components/popper/src/popper.mjs +98 -0
- package/es/components/popper/src/popper.mjs.map +1 -0
- package/es/components/popper/src/popper.vue.d.ts +3 -0
- package/es/components/popper/src/popper.vue_vue_type_script_lang.mjs +19 -0
- package/es/components/popper/src/popper.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.mjs +8 -0
- package/es/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.mjs.map +1 -0
- package/es/components/popper/src/popper2.mjs +7 -0
- package/es/components/popper/src/popper2.mjs.map +1 -0
- package/es/components/popper/src/tokens.d.ts +14 -0
- package/es/components/popper/src/tokens.mjs +5 -0
- package/es/components/popper/src/tokens.mjs.map +1 -0
- package/es/components/popper/src/trigger.mjs +7 -0
- package/es/components/popper/src/trigger.mjs.map +1 -0
- package/es/components/popper/src/trigger.vue.d.ts +45 -0
- package/es/components/popper/src/trigger.vue_vue_type_script_lang.mjs +66 -0
- package/es/components/popper/src/trigger.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.mjs +16 -0
- package/es/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.mjs.map +1 -0
- package/es/components/popper/src/utils.d.ts +55 -0
- package/es/components/popper/src/utils.mjs +76 -0
- package/es/components/popper/src/utils.mjs.map +1 -0
- package/es/components/roving-focus-group/index.d.ts +7 -0
- package/es/components/roving-focus-group/index.mjs +9 -0
- package/es/components/roving-focus-group/index.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +43 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs +102 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.mjs +8 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.d.ts +269 -0
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +32 -0
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs +15 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.mjs +20 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +29 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs +100 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.mjs +18 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/tokens.d.ts +27 -0
- package/es/components/roving-focus-group/src/tokens.mjs +5 -0
- package/es/components/roving-focus-group/src/tokens.mjs.map +1 -0
- package/es/components/roving-focus-group/src/utils.d.ts +8 -0
- package/es/components/roving-focus-group/src/utils.mjs +48 -0
- package/es/components/roving-focus-group/src/utils.mjs.map +1 -0
- package/es/components/select/index.d.ts +680 -14
- package/es/components/select/src/select-dropdown.vue.d.ts +1 -1
- package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs +1 -0
- package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select-dropdown.vue_vue_type_template_id_46cf6eee_lang.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +681 -15
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs +25 -11
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select.vue_vue_type_template_id_33774f85_lang.mjs +11 -12
- package/es/components/select/src/select.vue_vue_type_template_id_33774f85_lang.mjs.map +1 -1
- package/es/components/select/src/token.d.ts +1 -0
- package/es/components/select/src/token.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +671 -7
- package/es/components/select/src/useSelect.mjs +33 -23
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +1326 -16
- package/es/components/select-v2/src/select.vue.d.ts +665 -10
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +2 -2
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.mjs +8 -9
- package/es/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.d.ts +659 -4
- package/es/components/select-v2/src/useSelect.mjs +7 -7
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/slider/src/button.vue_vue_type_script_lang.mjs +2 -2
- package/es/components/slider/src/button.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/slot/index.d.ts +5 -0
- package/es/components/slot/index.mjs +2 -0
- package/es/components/slot/index.mjs.map +1 -0
- package/es/components/slot/src/only-child.d.ts +5 -0
- package/es/components/slot/src/only-child.mjs +61 -0
- package/es/components/slot/src/only-child.mjs.map +1 -0
- package/es/components/table/index.d.ts +13 -4
- package/es/components/table/src/filter-panel.vue.d.ts +654 -4
- package/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs +5 -7
- package/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs +8 -9
- package/es/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +7 -0
- package/es/components/table/src/table/style-helper.mjs +20 -17
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +5 -3
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.d.ts +0 -1
- package/es/components/table/src/table-body/styles-helper.mjs +10 -17
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +1 -0
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table/src/table-column/index.mjs +1 -0
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.d.ts +4 -2
- package/es/components/table/src/table-footer/index.mjs +33 -18
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-footer/style-helper.d.ts +4 -2
- package/es/components/table/src/table-footer/style-helper.mjs +28 -31
- package/es/components/table/src/table-footer/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.d.ts +3 -2
- package/es/components/table/src/table-header/index.mjs +89 -51
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table-header/style.helper.d.ts +1 -1
- package/es/components/table/src/table-header/style.helper.mjs +14 -24
- package/es/components/table/src/table-header/style.helper.mjs.map +1 -1
- package/es/components/table/src/table-header/utils-helper.mjs +1 -0
- package/es/components/table/src/table-header/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-layout.d.ts +1 -0
- package/es/components/table/src/table-layout.mjs +7 -1
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +11 -2
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs +12 -2
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs +62 -213
- package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs.map +1 -1
- package/es/components/table/src/util.d.ts +16 -2
- package/es/components/table/src/util.mjs +90 -1
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/teleport/index.d.ts +11 -8
- package/es/components/teleport/src/teleport.d.ts +4 -3
- package/es/components/teleport/src/teleport.mjs +5 -1
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport.vue.d.ts +11 -8
- package/es/components/teleport/src/teleport.vue_vue_type_script_lang.mjs +1 -2
- package/es/components/teleport/src/teleport.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.mjs +3 -2
- package/es/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.mjs.map +1 -1
- package/es/components/time-picker/index.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +663 -9
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs +29 -17
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs +38 -38
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +2 -2
- package/es/components/time-select/index.d.ts +4 -4
- package/es/components/time-select/src/time-select.vue.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +346 -430
- package/es/components/tooltip/index.mjs +6 -7
- package/es/components/tooltip/index.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +7 -0
- package/es/components/tooltip/src/content.mjs.map +1 -0
- package/es/components/tooltip/src/content.vue.d.ts +809 -0
- package/es/components/tooltip/src/content.vue_vue_type_script_lang.mjs +135 -0
- package/es/components/tooltip/src/content.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.mjs +65 -0
- package/es/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tokens.d.ts +14 -0
- package/es/components/tooltip/src/tokens.mjs +4 -0
- package/es/components/tooltip/src/tokens.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.d.ts +146 -0
- package/es/components/tooltip/src/tooltip.mjs +63 -0
- package/es/components/tooltip/src/tooltip.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.vue.d.ts +383 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs +104 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs +67 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip2.mjs +7 -0
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.mjs +7 -0
- package/es/components/tooltip/src/trigger.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.vue.d.ts +39 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_script_lang.mjs +60 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.mjs +27 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.mjs.map +1 -0
- package/es/components/tooltip/src/utils.d.ts +4 -0
- package/es/components/tooltip/src/utils.mjs +18 -0
- package/es/components/tooltip/src/utils.mjs.map +1 -0
- package/es/components/tree/index.d.ts +4 -4
- package/es/components/tree/src/tree.vue.d.ts +2 -2
- package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/es/components/visual-hidden/index.d.ts +3 -0
- package/es/components/visual-hidden/index.mjs +4 -0
- package/es/components/{popper/src/renderers → visual-hidden}/index.mjs.map +0 -0
- package/es/components/visual-hidden/src/visual-hidden.mjs +7 -0
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -0
- package/es/components/visual-hidden/src/visual-hidden.vue.d.ts +12 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.mjs +34 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.mjs +8 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.mjs.map +1 -0
- package/es/directives/click-outside/index.mjs.map +1 -1
- package/es/hooks/index.d.ts +8 -1
- package/es/hooks/index.mjs +8 -2
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-delayed-toggle/index.d.ts +13 -0
- package/es/hooks/use-delayed-toggle/index.mjs +39 -0
- package/es/hooks/use-delayed-toggle/index.mjs.map +1 -0
- package/es/hooks/use-escape-keydown/index.d.ts +1 -0
- package/es/hooks/use-escape-keydown/index.mjs +21 -0
- package/es/hooks/use-escape-keydown/index.mjs.map +1 -0
- package/es/hooks/use-focus/index.d.ts +3 -1
- package/es/hooks/use-focus/index.mjs.map +1 -1
- package/es/hooks/use-forward-ref/index.d.ts +13 -0
- package/es/hooks/use-forward-ref/index.mjs +27 -0
- package/es/hooks/use-forward-ref/index.mjs.map +1 -0
- package/es/hooks/use-id/index.d.ts +8 -0
- package/es/hooks/use-id/index.mjs +24 -0
- package/es/hooks/use-id/index.mjs.map +1 -0
- package/es/hooks/use-intermediate-render/index.d.ts +11 -0
- package/es/hooks/use-intermediate-render/index.mjs +43 -0
- package/es/hooks/use-intermediate-render/index.mjs.map +1 -0
- package/es/hooks/use-model-toggle/index.d.ts +18 -9
- package/es/hooks/use-model-toggle/index.mjs +103 -93
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.d.ts +3 -0
- package/es/hooks/use-popper-container/index.mjs +22 -0
- package/es/hooks/use-popper-container/index.mjs.map +1 -0
- package/es/hooks/use-restore-active/index.mjs +1 -1
- package/es/hooks/use-restore-active/index.mjs.map +1 -1
- package/es/index.mjs +15 -8
- package/es/index.mjs.map +1 -1
- package/es/utils/aria.d.ts +4 -0
- package/es/utils/aria.mjs +5 -1
- package/es/utils/aria.mjs.map +1 -1
- package/es/utils/dom.d.ts +9 -1
- package/es/utils/dom.mjs +27 -1
- package/es/utils/dom.mjs.map +1 -1
- package/es/utils/props.d.ts +2 -2
- package/es/utils/props.mjs +1 -1
- package/es/utils/props.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 +26 -18
- package/lib/components/autocomplete/src/index.vue.d.ts +13 -10
- package/lib/components/autocomplete/src/index.vue_vue_type_script_lang.js +13 -17
- package/lib/components/autocomplete/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.js +51 -48
- package/lib/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.js.map +1 -1
- package/lib/components/carousel/index.d.ts +4 -4
- package/lib/components/carousel/src/main.vue.d.ts +4 -4
- package/lib/components/cascader/index.d.ts +1118 -6532
- package/lib/components/cascader/src/index.vue.d.ts +559 -3267
- package/lib/components/cascader/src/index.vue_vue_type_script_lang.js +10 -10
- package/lib/components/cascader/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.js +12 -12
- package/lib/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js +3 -0
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.js +7 -13
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.js +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.js.map +1 -1
- package/lib/components/collection/index.d.ts +2 -0
- package/lib/components/collection/index.js +12 -0
- package/lib/components/{popper/src → collection}/index.js.map +0 -0
- package/lib/components/collection/src/collection-item.js +12 -0
- package/lib/components/collection/src/collection-item.js.map +1 -0
- package/lib/components/collection/src/collection-item.vue.d.ts +2 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_script_lang.js +13 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.js +12 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.js.map +1 -0
- package/lib/components/collection/src/collection.d.ts +263 -0
- package/lib/components/collection/src/collection.js +73 -0
- package/lib/components/collection/src/collection.js.map +1 -0
- package/lib/components/collection/src/collection.vue.d.ts +2 -0
- package/lib/components/collection/src/collection.vue_vue_type_script_lang.js +12 -0
- package/lib/components/collection/src/collection.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.js +12 -0
- package/lib/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.js.map +1 -0
- package/lib/components/collection/src/collection2.js +12 -0
- package/lib/components/collection/src/collection2.js.map +1 -0
- package/lib/components/collection/src/tokens.d.ts +12 -0
- package/lib/components/collection/src/tokens.js +3 -0
- package/lib/components/collection/src/tokens.js.map +1 -0
- package/lib/components/color-picker/index.d.ts +0 -2
- package/lib/components/color-picker/src/index.vue.d.ts +0 -2
- package/lib/components/color-picker/src/index.vue_vue_type_script_lang.js +2 -4
- package/lib/components/color-picker/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.js +9 -10
- package/lib/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +4 -4
- package/lib/components/date-picker/src/date-picker.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/description-item.d.ts +2 -2
- package/lib/components/dialog/index.d.ts +5 -5
- package/lib/components/dialog/src/dialog.vue.d.ts +5 -5
- package/lib/components/drawer/index.d.ts +5 -5
- package/lib/components/drawer/src/drawer.vue.d.ts +5 -5
- package/lib/components/dropdown/index.d.ts +767 -84
- package/lib/components/dropdown/src/dropdown-item-impl.js +12 -0
- package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +39 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.js +57 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.js +37 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +17 -9
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.js +50 -20
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.js +29 -19
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +17 -6
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.js +57 -21
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.js +11 -8
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +295 -1
- package/lib/components/dropdown/src/dropdown.js +96 -0
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +712 -73
- package/lib/components/dropdown/src/dropdown.vue_vue_type_script_lang.js +59 -152
- package/lib/components/dropdown/src/dropdown.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.js +91 -51
- package/lib/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.js.map +1 -1
- package/lib/components/dropdown/src/tokens.d.ts +8 -0
- package/lib/components/dropdown/src/tokens.js +8 -0
- package/lib/components/dropdown/src/tokens.js.map +1 -0
- package/lib/components/focus-trap/index.d.ts +5 -0
- package/lib/components/focus-trap/index.js +27 -0
- package/lib/components/focus-trap/index.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.js +12 -0
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +21 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.js +141 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.js +12 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.js.map +1 -0
- package/lib/components/focus-trap/src/tokens.d.ts +11 -0
- package/lib/components/focus-trap/src/tokens.js +21 -0
- package/lib/components/focus-trap/src/tokens.js.map +1 -0
- package/lib/components/focus-trap/src/utils.d.ts +18 -0
- package/lib/components/focus-trap/src/utils.js +102 -0
- package/lib/components/focus-trap/src/utils.js.map +1 -0
- package/lib/components/image/index.d.ts +2 -2
- package/lib/components/image/src/image.vue.d.ts +2 -2
- package/lib/components/index.js +92 -84
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +5 -5
- package/lib/components/input/src/input.vue.d.ts +5 -5
- package/lib/components/input-number/index.d.ts +12 -12
- package/lib/components/input-number/src/input-number.vue.d.ts +12 -12
- package/lib/components/menu/index.d.ts +9 -3
- package/lib/components/menu/src/menu-item.vue.d.ts +4 -2
- package/lib/components/menu/src/menu-item.vue_vue_type_script_lang.js +3 -3
- package/lib/components/menu/src/menu-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +1 -1
- package/lib/components/menu/src/menu.js +2 -1
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +18 -21
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/menu/src/types.d.ts +2 -0
- package/lib/components/message-box/src/index.vue.d.ts +2 -2
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/popconfirm/index.d.ts +19 -12
- package/lib/components/popconfirm/index.js +0 -1
- package/lib/components/popconfirm/index.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +3 -5
- package/lib/components/popconfirm/src/popconfirm.js +10 -5
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +19 -13
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.js +20 -18
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.js +11 -12
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.js.map +1 -1
- package/lib/components/popover/index.d.ts +1690 -420
- package/lib/components/popover/src/directive.js +7 -13
- package/lib/components/popover/src/directive.js.map +1 -1
- package/lib/components/popover/src/index.js +2 -0
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +846 -213
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js +40 -106
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js +35 -0
- package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js.map +1 -0
- package/lib/components/popover/src/popover.d.ts +70 -0
- package/lib/components/popover/src/popover.js +35 -0
- package/lib/components/popover/src/popover.js.map +1 -0
- package/lib/components/popper/index.d.ts +7 -3479
- package/lib/components/popper/index.js +24 -20
- package/lib/components/popper/index.js.map +1 -1
- package/lib/components/popper/src/arrow.js +12 -0
- package/lib/components/popper/src/arrow.js.map +1 -0
- package/lib/components/popper/src/arrow.vue.d.ts +12 -0
- package/lib/components/popper/src/arrow.vue_vue_type_script_lang.js +31 -0
- package/lib/components/popper/src/arrow.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.js +17 -0
- package/lib/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.js.map +1 -0
- package/lib/components/popper/src/container.d.ts +3 -0
- package/lib/components/popper/src/container.js +28 -0
- package/lib/components/popper/src/container.js.map +1 -0
- package/lib/components/popper/src/content.js +12 -0
- package/lib/components/popper/src/content.js.map +1 -0
- package/lib/components/popper/src/content.vue.d.ts +299 -0
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js +89 -0
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js +20 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js.map +1 -0
- package/lib/components/popper/src/popper.d.ts +58 -0
- package/lib/components/popper/src/popper.js +107 -0
- package/lib/components/popper/src/popper.js.map +1 -0
- package/lib/components/popper/src/popper.vue.d.ts +3 -0
- package/lib/components/popper/src/popper.vue_vue_type_script_lang.js +23 -0
- package/lib/components/popper/src/popper.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.js +12 -0
- package/lib/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.js.map +1 -0
- package/lib/components/popper/src/popper2.js +12 -0
- package/lib/components/popper/src/popper2.js.map +1 -0
- package/lib/components/popper/src/tokens.d.ts +14 -0
- package/lib/components/popper/src/tokens.js +10 -0
- package/lib/components/popper/src/tokens.js.map +1 -0
- package/lib/components/popper/src/trigger.js +12 -0
- package/lib/components/popper/src/trigger.js.map +1 -0
- package/lib/components/popper/src/trigger.vue.d.ts +45 -0
- package/lib/components/popper/src/trigger.vue_vue_type_script_lang.js +70 -0
- package/lib/components/popper/src/trigger.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.js +20 -0
- package/lib/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.js.map +1 -0
- package/lib/components/popper/src/utils.d.ts +55 -0
- package/lib/components/popper/src/utils.js +81 -0
- package/lib/components/popper/src/utils.js.map +1 -0
- package/lib/components/roving-focus-group/index.d.ts +7 -0
- package/lib/components/roving-focus-group/index.js +25 -0
- package/lib/components/roving-focus-group/index.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +43 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.js +106 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +269 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.js +40 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.js +19 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.js +24 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +29 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.js +104 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.js +22 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/tokens.d.ts +27 -0
- package/lib/components/roving-focus-group/src/tokens.js +10 -0
- package/lib/components/roving-focus-group/src/tokens.js.map +1 -0
- package/lib/components/roving-focus-group/src/utils.d.ts +8 -0
- package/lib/components/roving-focus-group/src/utils.js +54 -0
- package/lib/components/roving-focus-group/src/utils.js.map +1 -0
- package/lib/components/select/index.d.ts +680 -14
- package/lib/components/select/src/select-dropdown.vue.d.ts +1 -1
- package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js +1 -0
- package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select-dropdown.vue_vue_type_template_id_46cf6eee_lang.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +681 -15
- package/lib/components/select/src/select.vue_vue_type_script_lang.js +24 -10
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select.vue_vue_type_template_id_33774f85_lang.js +11 -12
- package/lib/components/select/src/select.vue_vue_type_template_id_33774f85_lang.js.map +1 -1
- package/lib/components/select/src/token.d.ts +1 -0
- package/lib/components/select/src/token.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +671 -7
- package/lib/components/select/src/useSelect.js +33 -23
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +1326 -16
- package/lib/components/select-v2/src/select.vue.d.ts +665 -10
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +2 -2
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.js +8 -9
- package/lib/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.d.ts +659 -4
- package/lib/components/select-v2/src/useSelect.js +11 -11
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/slider/src/button.vue_vue_type_script_lang.js +1 -1
- package/lib/components/slider/src/button.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slot/index.d.ts +5 -0
- package/lib/components/slot/index.js +10 -0
- package/lib/components/{popper/src/renderers → slot}/index.js.map +1 -1
- package/lib/components/slot/src/only-child.d.ts +5 -0
- package/lib/components/slot/src/only-child.js +65 -0
- package/lib/components/slot/src/only-child.js.map +1 -0
- package/lib/components/table/index.d.ts +13 -4
- package/lib/components/table/src/filter-panel.vue.d.ts +654 -4
- package/lib/components/table/src/filter-panel.vue_vue_type_script_lang.js +5 -7
- package/lib/components/table/src/filter-panel.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.js +8 -9
- package/lib/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +7 -0
- package/lib/components/table/src/table/style-helper.js +20 -21
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +5 -3
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.d.ts +0 -1
- package/lib/components/table/src/table-body/styles-helper.js +10 -17
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +1 -0
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table/src/table-column/index.js +1 -0
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table-footer/index.d.ts +4 -2
- package/lib/components/table/src/table-footer/index.js +32 -17
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-footer/style-helper.d.ts +4 -2
- package/lib/components/table/src/table-footer/style-helper.js +28 -31
- package/lib/components/table/src/table-footer/style-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.d.ts +3 -2
- package/lib/components/table/src/table-header/index.js +89 -51
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table-header/style.helper.d.ts +1 -1
- package/lib/components/table/src/table-header/style.helper.js +14 -24
- package/lib/components/table/src/table-header/style.helper.js.map +1 -1
- package/lib/components/table/src/table-header/utils-helper.js +1 -0
- package/lib/components/table/src/table-header/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-layout.d.ts +1 -0
- package/lib/components/table/src/table-layout.js +7 -1
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +11 -2
- package/lib/components/table/src/table.vue_vue_type_script_lang.js +12 -2
- package/lib/components/table/src/table.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js +62 -213
- package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js.map +1 -1
- package/lib/components/table/src/util.d.ts +16 -2
- package/lib/components/table/src/util.js +95 -0
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/teleport/index.d.ts +11 -8
- package/lib/components/teleport/src/teleport.d.ts +4 -3
- package/lib/components/teleport/src/teleport.js +5 -1
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport.vue.d.ts +11 -8
- package/lib/components/teleport/src/teleport.vue_vue_type_script_lang.js +1 -2
- package/lib/components/teleport/src/teleport.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.js +3 -2
- package/lib/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.js.map +1 -1
- package/lib/components/time-picker/index.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +663 -9
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js +33 -21
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js +37 -37
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +2 -2
- package/lib/components/time-select/index.d.ts +4 -4
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +346 -430
- package/lib/components/tooltip/index.js +9 -7
- package/lib/components/tooltip/index.js.map +1 -1
- package/lib/components/tooltip/src/content.js +12 -0
- package/lib/components/tooltip/src/content.js.map +1 -0
- package/lib/components/tooltip/src/content.vue.d.ts +809 -0
- package/lib/components/tooltip/src/content.vue_vue_type_script_lang.js +139 -0
- package/lib/components/tooltip/src/content.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.js +69 -0
- package/lib/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.js.map +1 -0
- package/lib/components/tooltip/src/tokens.d.ts +14 -0
- package/lib/components/tooltip/src/tokens.js +8 -0
- package/lib/components/tooltip/src/tokens.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.d.ts +146 -0
- package/lib/components/tooltip/src/tooltip.js +69 -0
- package/lib/components/tooltip/src/tooltip.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.vue.d.ts +383 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js +108 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js +71 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js.map +1 -0
- package/lib/components/tooltip/src/tooltip2.js +12 -0
- package/lib/components/tooltip/src/tooltip2.js.map +1 -0
- package/lib/components/tooltip/src/trigger.js +12 -0
- package/lib/components/tooltip/src/trigger.js.map +1 -0
- package/lib/components/tooltip/src/trigger.vue.d.ts +39 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_script_lang.js +64 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.js +31 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.js.map +1 -0
- package/lib/components/tooltip/src/utils.d.ts +4 -0
- package/lib/components/tooltip/src/utils.js +23 -0
- package/lib/components/tooltip/src/utils.js.map +1 -0
- package/lib/components/tree/index.d.ts +4 -4
- package/lib/components/tree/src/tree.vue.d.ts +2 -2
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/lib/components/visual-hidden/index.d.ts +3 -0
- package/lib/components/visual-hidden/index.js +12 -0
- package/lib/components/visual-hidden/index.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.js +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue.d.ts +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.js +38 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.js +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.js.map +1 -0
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/hooks/index.d.ts +8 -1
- package/lib/hooks/index.js +36 -20
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-delayed-toggle/index.d.ts +13 -0
- package/lib/hooks/use-delayed-toggle/index.js +44 -0
- package/lib/hooks/use-delayed-toggle/index.js.map +1 -0
- package/lib/hooks/use-escape-keydown/index.d.ts +1 -0
- package/lib/hooks/use-escape-keydown/index.js +25 -0
- package/lib/hooks/use-escape-keydown/index.js.map +1 -0
- package/lib/hooks/use-focus/index.d.ts +3 -1
- package/lib/hooks/use-focus/index.js.map +1 -1
- package/lib/hooks/use-forward-ref/index.d.ts +13 -0
- package/lib/hooks/use-forward-ref/index.js +33 -0
- package/lib/hooks/use-forward-ref/index.js.map +1 -0
- package/lib/hooks/use-id/index.d.ts +8 -0
- package/lib/hooks/use-id/index.js +29 -0
- package/lib/hooks/use-id/index.js.map +1 -0
- package/lib/hooks/use-intermediate-render/index.d.ts +11 -0
- package/lib/hooks/use-intermediate-render/index.js +47 -0
- package/lib/hooks/use-intermediate-render/index.js.map +1 -0
- package/lib/hooks/use-model-toggle/index.d.ts +18 -9
- package/lib/hooks/use-model-toggle/index.js +102 -91
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.d.ts +3 -0
- package/lib/hooks/use-popper-container/index.js +28 -0
- package/lib/hooks/use-popper-container/index.js.map +1 -0
- package/lib/hooks/use-restore-active/index.js +1 -1
- package/lib/hooks/use-restore-active/index.js.map +1 -1
- package/lib/index.js +167 -143
- package/lib/index.js.map +1 -1
- package/lib/utils/aria.d.ts +4 -0
- package/lib/utils/aria.js +5 -1
- package/lib/utils/aria.js.map +1 -1
- package/lib/utils/dom.d.ts +9 -1
- package/lib/utils/dom.js +30 -0
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/props.d.ts +2 -2
- package/lib/utils/props.js +1 -1
- package/lib/utils/props.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 +2 -2
- package/tags.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/el-collapse.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-dropdown.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-table-column.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/el-tree.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/transition.scss +8 -0
- package/theme-chalk/src/dropdown.scss +1 -2
- package/theme-chalk/src/select-v2.scss +2 -3
- package/theme-chalk/src/table-column.scss +0 -1
- package/theme-chalk/src/table.scss +176 -124
- package/web-types.json +1 -1
- package/es/components/popover/src/usePopover.d.ts +0 -32
- package/es/components/popover/src/usePopover.mjs +0 -38
- package/es/components/popover/src/usePopover.mjs.map +0 -1
- package/es/components/popper/src/index.mjs +0 -5
- package/es/components/popper/src/index.vue.d.ts +0 -1737
- package/es/components/popper/src/index.vue_vue_type_script_lang.mjs +0 -103
- package/es/components/popper/src/index.vue_vue_type_script_lang.mjs.map +0 -1
- package/es/components/popper/src/renderers/arrow.d.ts +0 -3
- package/es/components/popper/src/renderers/arrow.mjs +0 -12
- package/es/components/popper/src/renderers/arrow.mjs.map +0 -1
- package/es/components/popper/src/renderers/index.d.ts +0 -3
- package/es/components/popper/src/renderers/index.mjs +0 -4
- package/es/components/popper/src/renderers/popper.d.ts +0 -23
- package/es/components/popper/src/renderers/popper.mjs +0 -51
- package/es/components/popper/src/renderers/popper.mjs.map +0 -1
- package/es/components/popper/src/renderers/trigger.d.ts +0 -13
- package/es/components/popper/src/renderers/trigger.mjs +0 -13
- package/es/components/popper/src/renderers/trigger.mjs.map +0 -1
- package/es/components/popper/src/use-popper/build-modifiers.d.ts +0 -10
- package/es/components/popper/src/use-popper/build-modifiers.mjs +0 -50
- package/es/components/popper/src/use-popper/build-modifiers.mjs.map +0 -1
- package/es/components/popper/src/use-popper/defaults.d.ts +0 -142
- package/es/components/popper/src/use-popper/defaults.mjs +0 -116
- package/es/components/popper/src/use-popper/defaults.mjs.map +0 -1
- package/es/components/popper/src/use-popper/index.d.ts +0 -1554
- package/es/components/popper/src/use-popper/index.mjs +0 -235
- package/es/components/popper/src/use-popper/index.mjs.map +0 -1
- package/es/components/popper/src/use-popper/popper-options.d.ts +0 -20
- package/es/components/popper/src/use-popper/popper-options.mjs +0 -22
- package/es/components/popper/src/use-popper/popper-options.mjs.map +0 -1
- package/es/components/tooltip/src/index.d.ts +0 -240
- package/es/components/tooltip/src/index.mjs +0 -101
- package/es/components/tooltip/src/index.mjs.map +0 -1
- package/es/hooks/use-popper/index.d.ts +0 -103
- package/es/hooks/use-popper/index.mjs +0 -256
- package/es/hooks/use-popper/index.mjs.map +0 -1
- package/es/hooks/use-popper/use-popper-options.d.ts +0 -49
- package/es/hooks/use-popper/use-popper-options.mjs +0 -47
- package/es/hooks/use-popper/use-popper-options.mjs.map +0 -1
- package/es/hooks/use-popper/use-target-events.d.ts +0 -13
- package/es/hooks/use-popper/use-target-events.mjs +0 -68
- package/es/hooks/use-popper/use-target-events.mjs.map +0 -1
- package/lib/components/popover/src/usePopover.d.ts +0 -32
- package/lib/components/popover/src/usePopover.js +0 -44
- package/lib/components/popover/src/usePopover.js.map +0 -1
- package/lib/components/popper/src/index.js +0 -10
- package/lib/components/popper/src/index.vue.d.ts +0 -1737
- package/lib/components/popper/src/index.vue_vue_type_script_lang.js +0 -107
- package/lib/components/popper/src/index.vue_vue_type_script_lang.js.map +0 -1
- package/lib/components/popper/src/renderers/arrow.d.ts +0 -3
- package/lib/components/popper/src/renderers/arrow.js +0 -16
- package/lib/components/popper/src/renderers/arrow.js.map +0 -1
- package/lib/components/popper/src/renderers/index.d.ts +0 -3
- package/lib/components/popper/src/renderers/index.js +0 -14
- package/lib/components/popper/src/renderers/popper.d.ts +0 -23
- package/lib/components/popper/src/renderers/popper.js +0 -55
- package/lib/components/popper/src/renderers/popper.js.map +0 -1
- package/lib/components/popper/src/renderers/trigger.d.ts +0 -13
- package/lib/components/popper/src/renderers/trigger.js +0 -17
- package/lib/components/popper/src/renderers/trigger.js.map +0 -1
- package/lib/components/popper/src/use-popper/build-modifiers.d.ts +0 -10
- package/lib/components/popper/src/use-popper/build-modifiers.js +0 -54
- package/lib/components/popper/src/use-popper/build-modifiers.js.map +0 -1
- package/lib/components/popper/src/use-popper/defaults.d.ts +0 -142
- package/lib/components/popper/src/use-popper/defaults.js +0 -121
- package/lib/components/popper/src/use-popper/defaults.js.map +0 -1
- package/lib/components/popper/src/use-popper/index.d.ts +0 -1554
- package/lib/components/popper/src/use-popper/index.js +0 -242
- package/lib/components/popper/src/use-popper/index.js.map +0 -1
- package/lib/components/popper/src/use-popper/popper-options.d.ts +0 -20
- package/lib/components/popper/src/use-popper/popper-options.js +0 -26
- package/lib/components/popper/src/use-popper/popper-options.js.map +0 -1
- package/lib/components/tooltip/src/index.d.ts +0 -240
- package/lib/components/tooltip/src/index.js +0 -105
- package/lib/components/tooltip/src/index.js.map +0 -1
- package/lib/hooks/use-popper/index.d.ts +0 -103
- package/lib/hooks/use-popper/index.js +0 -264
- package/lib/hooks/use-popper/index.js.map +0 -1
- package/lib/hooks/use-popper/use-popper-options.d.ts +0 -49
- package/lib/hooks/use-popper/use-popper-options.js +0 -53
- package/lib/hooks/use-popper/use-popper-options.js.map +0 -1
- package/lib/hooks/use-popper/use-target-events.d.ts +0 -13
- package/lib/hooks/use-popper/use-target-events.js +0 -73
- package/lib/hooks/use-popper/use-target-events.js.map +0 -1
|
@@ -4,11 +4,10 @@ import { ElIcon } from '../../icon/index.mjs';
|
|
|
4
4
|
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
|
5
5
|
import '../../../directives/index.mjs';
|
|
6
6
|
import '../../../hooks/index.mjs';
|
|
7
|
-
import
|
|
7
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
8
8
|
import { ElScrollbar } from '../../scrollbar/index.mjs';
|
|
9
9
|
import ClickOutside from '../../../directives/click-outside/index.mjs';
|
|
10
10
|
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
11
|
-
import { Effect } from '../../popper/src/use-popper/defaults.mjs';
|
|
12
11
|
|
|
13
12
|
const { CheckboxGroup: ElCheckboxGroup } = ElCheckbox;
|
|
14
13
|
var script = defineComponent({
|
|
@@ -17,7 +16,7 @@ var script = defineComponent({
|
|
|
17
16
|
ElCheckbox,
|
|
18
17
|
ElCheckboxGroup,
|
|
19
18
|
ElScrollbar,
|
|
20
|
-
|
|
19
|
+
ElTooltip,
|
|
21
20
|
ElIcon,
|
|
22
21
|
ArrowDown,
|
|
23
22
|
ArrowUp
|
|
@@ -127,8 +126,8 @@ var script = defineComponent({
|
|
|
127
126
|
immediate: true
|
|
128
127
|
});
|
|
129
128
|
const popperPaneRef = computed(() => {
|
|
130
|
-
var _a;
|
|
131
|
-
return (_a = tooltip.value) == null ? void 0 : _a.popperRef;
|
|
129
|
+
var _a, _b;
|
|
130
|
+
return (_b = (_a = tooltip.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
|
|
132
131
|
});
|
|
133
132
|
return {
|
|
134
133
|
tooltipVisible,
|
|
@@ -144,8 +143,7 @@ var script = defineComponent({
|
|
|
144
143
|
showFilterPanel,
|
|
145
144
|
hideFilterPanel,
|
|
146
145
|
popperPaneRef,
|
|
147
|
-
tooltip
|
|
148
|
-
Effect
|
|
146
|
+
tooltip
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
149
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-panel.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/table/src/filter-panel.vue"],"sourcesContent":["<template>\n <el-
|
|
1
|
+
{"version":3,"file":"filter-panel.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/table/src/filter-panel.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltip\"\n v-model:visible=\"tooltipVisible\"\n :offset=\"0\"\n :placement=\"placement\"\n :show-arrow=\"false\"\n :stop-popper-mouse-event=\"false\"\n append-to-body\n effect=\"light\"\n pure\n popper-class=\"el-table-filter\"\n >\n <template #content>\n <div v-if=\"multiple\">\n <div class=\"el-table-filter__content\">\n <el-scrollbar wrap-class=\"el-table-filter__wrap\">\n <el-checkbox-group\n v-model=\"filteredValue\"\n class=\"el-table-filter__checkbox-group\"\n >\n <el-checkbox\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :label=\"filter.value\"\n >\n {{ filter.text }}\n </el-checkbox>\n </el-checkbox-group>\n </el-scrollbar>\n </div>\n <div class=\"el-table-filter__bottom\">\n <button\n :class=\"{ 'is-disabled': filteredValue.length === 0 }\"\n :disabled=\"filteredValue.length === 0\"\n type=\"button\"\n @click=\"handleConfirm\"\n >\n {{ t('el.table.confirmFilter') }}\n </button>\n <button type=\"button\" @click=\"handleReset\">\n {{ t('el.table.resetFilter') }}\n </button>\n </div>\n </div>\n <ul v-else class=\"el-table-filter__list\">\n <li\n :class=\"{\n 'is-active': filterValue === undefined || filterValue === null,\n }\"\n class=\"el-table-filter__list-item\"\n @click=\"handleSelect(null)\"\n >\n {{ t('el.table.clearFilter') }}\n </li>\n <li\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :class=\"{ 'is-active': isActive(filter) }\"\n :label=\"filter.value\"\n class=\"el-table-filter__list-item\"\n @click=\"handleSelect(filter.value)\"\n >\n {{ filter.text }}\n </li>\n </ul>\n </template>\n <template #default>\n <span\n v-click-outside:[popperPaneRef]=\"hideFilterPanel\"\n class=\"el-table__column-filter-trigger el-none-outline\"\n @click=\"showFilterPanel\"\n >\n <el-icon>\n <arrow-up v-if=\"column.filterOpened\" />\n <arrow-down v-else />\n </el-icon>\n </span>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, computed, getCurrentInstance, watch } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { ClickOutside } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport type { Placement } from '@element-plus/components/popper'\n\nimport type { WritableComputedRef, PropType } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Store } from './store'\n\nconst { CheckboxGroup: ElCheckboxGroup } = ElCheckbox\n\nexport default defineComponent({\n name: 'ElTableFilterPanel',\n components: {\n ElCheckbox,\n ElCheckboxGroup,\n ElScrollbar,\n ElTooltip,\n ElIcon,\n ArrowDown,\n ArrowUp,\n },\n directives: { ClickOutside },\n props: {\n placement: {\n type: String as PropType<Placement>,\n default: 'bottom-start',\n },\n store: {\n type: Object as PropType<Store<unknown>>,\n },\n column: {\n type: Object as PropType<TableColumnCtx<unknown>>,\n },\n upDataColumn: {\n type: Function,\n },\n },\n setup(props) {\n const instance = getCurrentInstance()\n const { t } = useLocale()\n const parent = instance.parent as TableHeader\n if (!parent.filterPanels.value[props.column.id]) {\n parent.filterPanels.value[props.column.id] = instance\n }\n const tooltipVisible = ref(false)\n const tooltip = ref<InstanceType<typeof ElTooltip> | null>(null)\n const filters = computed(() => {\n return props.column && props.column.filters\n })\n const filterValue = computed({\n get: () => (props.column.filteredValue || [])[0],\n set: (value: string) => {\n if (filteredValue.value) {\n if (typeof value !== 'undefined' && value !== null) {\n filteredValue.value.splice(0, 1, value)\n } else {\n filteredValue.value.splice(0, 1)\n }\n }\n },\n })\n const filteredValue: WritableComputedRef<unknown[]> = computed({\n get() {\n if (props.column) {\n return props.column.filteredValue || []\n }\n return []\n },\n set(value: unknown[]) {\n if (props.column) {\n props.upDataColumn('filteredValue', value)\n }\n },\n })\n const multiple = computed(() => {\n if (props.column) {\n return props.column.filterMultiple\n }\n return true\n })\n const isActive = (filter) => {\n return filter.value === filterValue.value\n }\n const hidden = () => {\n tooltipVisible.value = false\n }\n const showFilterPanel = (e: MouseEvent) => {\n e.stopPropagation()\n tooltipVisible.value = !tooltipVisible.value\n }\n const hideFilterPanel = () => {\n tooltipVisible.value = false\n }\n const handleConfirm = () => {\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleReset = () => {\n filteredValue.value = []\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleSelect = (_filterValue?: string) => {\n filterValue.value = _filterValue\n if (typeof _filterValue !== 'undefined' && _filterValue !== null) {\n confirmFilter(filteredValue.value)\n } else {\n confirmFilter([])\n }\n hidden()\n }\n const confirmFilter = (filteredValue: unknown[]) => {\n props.store.commit('filterChange', {\n column: props.column,\n values: filteredValue,\n })\n props.store.updateAllSelected()\n }\n watch(\n tooltipVisible,\n (value) => {\n // todo\n if (props.column) {\n props.upDataColumn('filterOpened', value)\n }\n },\n {\n immediate: true,\n }\n )\n\n const popperPaneRef = computed(() => {\n return tooltip.value?.popperRef?.contentRef\n })\n\n return {\n tooltipVisible,\n multiple,\n filteredValue,\n filterValue,\n filters,\n handleConfirm,\n handleReset,\n handleSelect,\n isActive,\n t,\n showFilterPanel,\n hideFilterPanel,\n popperPaneRef,\n tooltip,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;AA0FA,QAAQ,aAAa,iBAAiB,EAAE,GAAG,UAAU,CAAC;AACtD,aAAe,gBAAgB;;AAE/B,EAAE,UAAU,EAAE;AACd,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,WAAW;;AAEf,IAAI,MAAM;;AAEV,IAAI,OAAO;GACR;EACD,UAAU,EAAE;OACP,EAAE;IACL,SAAS,EAAE;MACT,IAAI,EAAE;MACN,OAAO;KACR;IACD,KAAK,EAAE;MACL,IAAI;;IAEN,MAAM,EAAE;MACN;KACD;gBACW;MACV,IAAI,EAAE,QAAQ;KACf;;OAEE,CAAC,KAAK,EAAE;IACX;IACA,MAAM,EAAE;UACF,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B;MACE,MAAM,CAAC;;IAET;;IAEA,MAAM;MACJ,OAAO,MAAM,MAAM,IAAI,KAAK,CAAC;KAC9B,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC;SACxB,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,GAAG;MAC/C,GAAG,EAAE,CAAC,KAAK,KAAK;;UAEZ,IAAI,OAAO,UAAU;YACnB,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;WACzC;0BACe,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;;;OAGtC;MACD,CAAC;uBACgB,GAAG;;YAEd,KAAK,CAAC,MAAM,EAAE;UAChB,OAAO;;;;MAIX;;UAEI,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;SAC5C;;;;UAIC,KAAK,CAAC;;OAET;aACM,IAAI,CAAC;;;MAGZ;KACD;IACD,MAAM,MAAM,GAAG,MAAM;MACnB,cAAc,CAAC;;;MAGf,CAAC,CAAC;;KAEH,CAAC;UACI,kBAAkB,MAAM;;KAE7B,CAAC;UACI,aAAa,SAAS;;MAE1B,MAAM,EAAE,CAAC;MACT;UACI,WAAW,GAAG,MAAM;;MAExB,aAAa,CAAC,cAAc;MAC5B,MAAM,EAAE,CAAC;;IAEX,MAAM,YAAY,IAAI;MACpB,WAAW,CAAC,KAAK,GAAG,YAAY,CAAC;MACjC,IAAI;;OAEH,MAAM;QACL,aAAa,CAAC,EAAE,EAAE;OACnB;MACD,MAAM;;IAER,MAAM,aAAa,GAAG,CAAC,cAAc,KAAK;MACxC,KAAK,CAAC,KAAK,CAAC,MAAM;cACV,OAAO,CAAC,MAAM;QACpB,MAAM,EAAE,cAAc;QACtB,CAAC;WACE,CAAC,KAAK,CAAC;MACZ;SACG,CAAC;;QAEF,KAAK,CAAC,YAAY,CAAC,gBAAgB,KAAK,CAAC,CAAC;OAC3C;;iBAEU,IAAI;MACf,CAAC;UACG,aAAa,GAAG,QAAQ,CAAC;;MAE7B;MACA,CAAC;WACI;;cAEG;mBACK;;MAEb;MACA;iBACW;MACX;;;MAGA,eAAe;MACf,eAAe;;;KAGhB,CAAC;;;;;;"}
|
|
@@ -16,9 +16,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16
16
|
const _component_arrow_up = resolveComponent("arrow-up");
|
|
17
17
|
const _component_arrow_down = resolveComponent("arrow-down");
|
|
18
18
|
const _component_el_icon = resolveComponent("el-icon");
|
|
19
|
-
const
|
|
19
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
20
20
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
21
|
-
return openBlock(), createBlock(
|
|
21
|
+
return openBlock(), createBlock(_component_el_tooltip, {
|
|
22
22
|
ref: "tooltip",
|
|
23
23
|
visible: _ctx.tooltipVisible,
|
|
24
24
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => _ctx.tooltipVisible = $event),
|
|
@@ -26,13 +26,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26
26
|
placement: _ctx.placement,
|
|
27
27
|
"show-arrow": false,
|
|
28
28
|
"stop-popper-mouse-event": false,
|
|
29
|
-
|
|
29
|
+
"append-to-body": "",
|
|
30
|
+
effect: "light",
|
|
30
31
|
pure: "",
|
|
31
|
-
"
|
|
32
|
-
"popper-class": "el-table-filter",
|
|
33
|
-
"append-to-body": ""
|
|
32
|
+
"popper-class": "el-table-filter"
|
|
34
33
|
}, {
|
|
35
|
-
|
|
34
|
+
content: withCtx(() => [
|
|
36
35
|
_ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
37
36
|
createElementVNode("div", _hoisted_2, [
|
|
38
37
|
createVNode(_component_el_scrollbar, { "wrap-class": "el-table-filter__wrap" }, {
|
|
@@ -90,7 +89,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
89
|
}), 128))
|
|
91
90
|
]))
|
|
92
91
|
]),
|
|
93
|
-
|
|
92
|
+
default: withCtx(() => [
|
|
94
93
|
withDirectives((openBlock(), createElementBlock("span", {
|
|
95
94
|
class: "el-table__column-filter-trigger el-none-outline",
|
|
96
95
|
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.showFilterPanel && _ctx.showFilterPanel(...args))
|
|
@@ -106,7 +105,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
106
105
|
])
|
|
107
106
|
]),
|
|
108
107
|
_: 1
|
|
109
|
-
}, 8, ["visible", "placement"
|
|
108
|
+
}, 8, ["visible", "placement"]);
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
export { render };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs","sources":["../../../../../../packages/components/table/src/filter-panel.vue?vue&type=template&id=fde1c940&lang.js"],"sourcesContent":["<template>\n <el-
|
|
1
|
+
{"version":3,"file":"filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs","sources":["../../../../../../packages/components/table/src/filter-panel.vue?vue&type=template&id=fde1c940&lang.js"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltip\"\n v-model:visible=\"tooltipVisible\"\n :offset=\"0\"\n :placement=\"placement\"\n :show-arrow=\"false\"\n :stop-popper-mouse-event=\"false\"\n append-to-body\n effect=\"light\"\n pure\n popper-class=\"el-table-filter\"\n >\n <template #content>\n <div v-if=\"multiple\">\n <div class=\"el-table-filter__content\">\n <el-scrollbar wrap-class=\"el-table-filter__wrap\">\n <el-checkbox-group\n v-model=\"filteredValue\"\n class=\"el-table-filter__checkbox-group\"\n >\n <el-checkbox\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :label=\"filter.value\"\n >\n {{ filter.text }}\n </el-checkbox>\n </el-checkbox-group>\n </el-scrollbar>\n </div>\n <div class=\"el-table-filter__bottom\">\n <button\n :class=\"{ 'is-disabled': filteredValue.length === 0 }\"\n :disabled=\"filteredValue.length === 0\"\n type=\"button\"\n @click=\"handleConfirm\"\n >\n {{ t('el.table.confirmFilter') }}\n </button>\n <button type=\"button\" @click=\"handleReset\">\n {{ t('el.table.resetFilter') }}\n </button>\n </div>\n </div>\n <ul v-else class=\"el-table-filter__list\">\n <li\n :class=\"{\n 'is-active': filterValue === undefined || filterValue === null,\n }\"\n class=\"el-table-filter__list-item\"\n @click=\"handleSelect(null)\"\n >\n {{ t('el.table.clearFilter') }}\n </li>\n <li\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :class=\"{ 'is-active': isActive(filter) }\"\n :label=\"filter.value\"\n class=\"el-table-filter__list-item\"\n @click=\"handleSelect(filter.value)\"\n >\n {{ filter.text }}\n </li>\n </ul>\n </template>\n <template #default>\n <span\n v-click-outside:[popperPaneRef]=\"hideFilterPanel\"\n class=\"el-table__column-filter-trigger el-none-outline\"\n @click=\"showFilterPanel\"\n >\n <el-icon>\n <arrow-up v-if=\"column.filterOpened\" />\n <arrow-down v-else />\n </el-icon>\n </span>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, computed, getCurrentInstance, watch } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { ClickOutside } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport type { Placement } from '@element-plus/components/popper'\n\nimport type { WritableComputedRef, PropType } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Store } from './store'\n\nconst { CheckboxGroup: ElCheckboxGroup } = ElCheckbox\n\nexport default defineComponent({\n name: 'ElTableFilterPanel',\n components: {\n ElCheckbox,\n ElCheckboxGroup,\n ElScrollbar,\n ElTooltip,\n ElIcon,\n ArrowDown,\n ArrowUp,\n },\n directives: { ClickOutside },\n props: {\n placement: {\n type: String as PropType<Placement>,\n default: 'bottom-start',\n },\n store: {\n type: Object as PropType<Store<unknown>>,\n },\n column: {\n type: Object as PropType<TableColumnCtx<unknown>>,\n },\n upDataColumn: {\n type: Function,\n },\n },\n setup(props) {\n const instance = getCurrentInstance()\n const { t } = useLocale()\n const parent = instance.parent as TableHeader\n if (!parent.filterPanels.value[props.column.id]) {\n parent.filterPanels.value[props.column.id] = instance\n }\n const tooltipVisible = ref(false)\n const tooltip = ref<InstanceType<typeof ElTooltip> | null>(null)\n const filters = computed(() => {\n return props.column && props.column.filters\n })\n const filterValue = computed({\n get: () => (props.column.filteredValue || [])[0],\n set: (value: string) => {\n if (filteredValue.value) {\n if (typeof value !== 'undefined' && value !== null) {\n filteredValue.value.splice(0, 1, value)\n } else {\n filteredValue.value.splice(0, 1)\n }\n }\n },\n })\n const filteredValue: WritableComputedRef<unknown[]> = computed({\n get() {\n if (props.column) {\n return props.column.filteredValue || []\n }\n return []\n },\n set(value: unknown[]) {\n if (props.column) {\n props.upDataColumn('filteredValue', value)\n }\n },\n })\n const multiple = computed(() => {\n if (props.column) {\n return props.column.filterMultiple\n }\n return true\n })\n const isActive = (filter) => {\n return filter.value === filterValue.value\n }\n const hidden = () => {\n tooltipVisible.value = false\n }\n const showFilterPanel = (e: MouseEvent) => {\n e.stopPropagation()\n tooltipVisible.value = !tooltipVisible.value\n }\n const hideFilterPanel = () => {\n tooltipVisible.value = false\n }\n const handleConfirm = () => {\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleReset = () => {\n filteredValue.value = []\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleSelect = (_filterValue?: string) => {\n filterValue.value = _filterValue\n if (typeof _filterValue !== 'undefined' && _filterValue !== null) {\n confirmFilter(filteredValue.value)\n } else {\n confirmFilter([])\n }\n hidden()\n }\n const confirmFilter = (filteredValue: unknown[]) => {\n props.store.commit('filterChange', {\n column: props.column,\n values: filteredValue,\n })\n props.store.updateAllSelected()\n }\n watch(\n tooltipVisible,\n (value) => {\n // todo\n if (props.column) {\n props.upDataColumn('filterOpened', value)\n }\n },\n {\n immediate: true,\n }\n )\n\n const popperPaneRef = computed(() => {\n return tooltip.value?.popperRef?.contentRef\n })\n\n return {\n tooltipVisible,\n multiple,\n filteredValue,\n filterValue,\n filters,\n handleConfirm,\n handleReset,\n handleSelect,\n isActive,\n t,\n showFilterPanel,\n hideFilterPanel,\n popperPaneRef,\n tooltip,\n }\n },\n})\n</script>\n"],"names":["_openBlock"],"mappings":";;;;qBAea,KAAK,EAAC;;;;;EA8BF;;;;;;;;;;;;;;wBA5Cf;IACE;IACQ,SAAS;;IAChB;IACA;IACA;IACA;IACD;;IAEA;;;qBAIE;;;;kEAE4B;;;;;oBAGpB,OAAMA;;;;6CAEN;;;;;;;;;;;;;;;;;YAUN;;;;gBAII;iEACQ;iCAEL;;;;iCAGA;;;yBAIT;;kBAEU;;;;;;mCAQR;gBAEG;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -51,5 +51,12 @@ declare function useStyle<T>(props: TableProps<T>, layout: TableLayout<T>, store
|
|
|
51
51
|
height: null;
|
|
52
52
|
}>;
|
|
53
53
|
doLayout: () => void;
|
|
54
|
+
tableBodyStyles: import("vue").ComputedRef<{
|
|
55
|
+
width: string;
|
|
56
|
+
}>;
|
|
57
|
+
borderBottomPatchStyles: import("vue").ComputedRef<{
|
|
58
|
+
bottom: string;
|
|
59
|
+
right: string;
|
|
60
|
+
}>;
|
|
54
61
|
};
|
|
55
62
|
export default useStyle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ref, watchEffect, watch, unref, computed, onMounted, nextTick, onUnmounted } from 'vue';
|
|
2
|
-
import throttle from 'lodash/throttle';
|
|
3
2
|
import { addResizeListener, removeResizeListener } from '../../../../utils/resize-event.mjs';
|
|
4
3
|
import { on, off } from '../../../../utils/dom.mjs';
|
|
5
4
|
import '../../../../hooks/index.mjs';
|
|
@@ -56,6 +55,17 @@ function useStyle(props, layout, store, table) {
|
|
|
56
55
|
const shouldUpdateHeight = computed(() => {
|
|
57
56
|
return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
|
|
58
57
|
});
|
|
58
|
+
const tableBodyStyles = computed(() => {
|
|
59
|
+
return {
|
|
60
|
+
width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : ""
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
const borderBottomPatchStyles = computed(() => {
|
|
64
|
+
return {
|
|
65
|
+
bottom: `${layout.gutterWidth}px`,
|
|
66
|
+
right: `${layout.gutterWidth}px`
|
|
67
|
+
};
|
|
68
|
+
});
|
|
59
69
|
const doLayout = () => {
|
|
60
70
|
if (shouldUpdateHeight.value) {
|
|
61
71
|
layout.updateElsHeight();
|
|
@@ -92,27 +102,18 @@ function useStyle(props, layout, store, table) {
|
|
|
92
102
|
el.className = classList.join(" ");
|
|
93
103
|
};
|
|
94
104
|
const setScrollClass = (className) => {
|
|
95
|
-
const {
|
|
96
|
-
setScrollClassByEl(
|
|
105
|
+
const { tableWrapper } = table.refs;
|
|
106
|
+
setScrollClassByEl(tableWrapper, className);
|
|
97
107
|
};
|
|
98
|
-
const syncPostion =
|
|
108
|
+
const syncPostion = function() {
|
|
99
109
|
if (!table.refs.bodyWrapper)
|
|
100
110
|
return;
|
|
101
|
-
const { scrollLeft,
|
|
102
|
-
const {
|
|
103
|
-
headerWrapper,
|
|
104
|
-
footerWrapper,
|
|
105
|
-
fixedBodyWrapper,
|
|
106
|
-
rightFixedBodyWrapper
|
|
107
|
-
} = table.refs;
|
|
111
|
+
const { scrollLeft, offsetWidth, scrollWidth } = table.refs.bodyWrapper;
|
|
112
|
+
const { headerWrapper, footerWrapper } = table.refs;
|
|
108
113
|
if (headerWrapper)
|
|
109
114
|
headerWrapper.scrollLeft = scrollLeft;
|
|
110
115
|
if (footerWrapper)
|
|
111
116
|
footerWrapper.scrollLeft = scrollLeft;
|
|
112
|
-
if (fixedBodyWrapper)
|
|
113
|
-
fixedBodyWrapper.scrollTop = scrollTop;
|
|
114
|
-
if (rightFixedBodyWrapper)
|
|
115
|
-
rightFixedBodyWrapper.scrollTop = scrollTop;
|
|
116
117
|
const maxScrollLeftPosition = scrollWidth - offsetWidth - 1;
|
|
117
118
|
if (scrollLeft >= maxScrollLeftPosition) {
|
|
118
119
|
setScrollClass("is-scrolling-right");
|
|
@@ -121,7 +122,7 @@ function useStyle(props, layout, store, table) {
|
|
|
121
122
|
} else {
|
|
122
123
|
setScrollClass("is-scrolling-middle");
|
|
123
124
|
}
|
|
124
|
-
}
|
|
125
|
+
};
|
|
125
126
|
const bindEvents = () => {
|
|
126
127
|
table.refs.bodyWrapper.addEventListener("scroll", syncPostion, {
|
|
127
128
|
passive: true
|
|
@@ -273,7 +274,9 @@ function useStyle(props, layout, store, table) {
|
|
|
273
274
|
resizeProxyVisible,
|
|
274
275
|
bodyWidth,
|
|
275
276
|
resizeState,
|
|
276
|
-
doLayout
|
|
277
|
+
doLayout,
|
|
278
|
+
tableBodyStyles,
|
|
279
|
+
borderBottomPatchStyles
|
|
277
280
|
};
|
|
278
281
|
}
|
|
279
282
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["import {\n onMounted,\n onUnmounted,\n computed,\n ref,\n watchEffect,\n watch,\n unref,\n nextTick,\n} from 'vue'\nimport throttle from 'lodash/throttle'\nimport {\n addResizeListener,\n removeResizeListener,\n} from '@element-plus/utils/resize-event'\nimport { on, off } from '@element-plus/utils/dom'\nimport { useSize } from '@element-plus/hooks'\nimport { parseHeight } from '../util'\n\nimport type { ResizableElement } from '@element-plus/utils/resize-event'\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref({\n width: null,\n height: null,\n })\n const isGroup = ref(false)\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth()\n requestAnimationFrame(syncPostion)\n }\n onMounted(async () => {\n setScrollClass('is-scrolling-left')\n store.updateColumns()\n await nextTick()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n resizeState.value = {\n width: table.vnode.el.offsetWidth,\n height: table.vnode.el.offsetHeight,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { bodyWrapper } = table.refs\n setScrollClassByEl(bodyWrapper, className)\n }\n const syncPostion = throttle(function () {\n if (!table.refs.bodyWrapper) return\n const { scrollLeft, scrollTop, offsetWidth, scrollWidth } =\n table.refs.bodyWrapper\n const {\n headerWrapper,\n footerWrapper,\n fixedBodyWrapper,\n rightFixedBodyWrapper,\n } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n if (fixedBodyWrapper) fixedBodyWrapper.scrollTop = scrollTop\n if (rightFixedBodyWrapper) rightFixedBodyWrapper.scrollTop = scrollTop\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }, 10)\n\n const bindEvents = () => {\n table.refs.bodyWrapper.addEventListener('scroll', syncPostion, {\n passive: true,\n })\n if (props.fit) {\n addResizeListener(table.vnode.el as ResizableElement, resizeListener)\n } else {\n on(window, 'resize', doLayout)\n }\n }\n onUnmounted(() => {\n unbindEvents()\n })\n const unbindEvents = () => {\n table.refs.bodyWrapper?.removeEventListener('scroll', syncPostion, true)\n if (props.fit) {\n removeResizeListener(table.vnode.el as ResizableElement, resizeListener)\n } else {\n off(window, 'resize', doLayout)\n }\n }\n const resizeListener = () => {\n if (!table.$ready) return\n let shouldUpdateLayout = false\n const el = table.vnode.el\n const { width: oldWidth, height: oldHeight } = resizeState.value\n\n const width = el.offsetWidth\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n }\n doLayout()\n }\n }\n const tableSize = useSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n const bodyHeight = computed(() => {\n const headerHeight = layout.headerHeight.value || 0\n const bodyHeight = layout.bodyHeight.value\n const footerHeight = layout.footerHeight.value || 0\n if (props.height) {\n return {\n height: bodyHeight ? `${bodyHeight}px` : '',\n }\n } else if (props.maxHeight) {\n const maxHeight = parseHeight(props.maxHeight)\n if (typeof maxHeight === 'number') {\n return {\n 'max-height': `${\n maxHeight - footerHeight - (props.showHeader ? headerHeight : 0)\n }px`,\n }\n }\n }\n return {}\n })\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (layout.appendHeight.value) {\n height = `calc(100% - ${layout.appendHeight.value}px)`\n }\n return {\n width: bodyWidth.value,\n height,\n }\n })\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n const fixedHeight = computed(() => {\n if (props.maxHeight) {\n if (props.showSummary) {\n return {\n bottom: 0,\n }\n }\n return {\n bottom:\n layout.scrollX.value && props.data.length\n ? `${layout.gutterWidth}px`\n : '',\n }\n } else {\n if (props.showSummary) {\n return {\n height: layout.tableHeight.value\n ? `${layout.tableHeight.value}px`\n : '',\n }\n }\n return {\n height: layout.viewportHeight.value\n ? `${layout.viewportHeight.value}px`\n : '',\n }\n }\n })\n const fixedBodyHeight = computed(() => {\n if (props.height) {\n return {\n height: layout.fixedBodyHeight.value\n ? `${layout.fixedBodyHeight.value}px`\n : '',\n }\n } else if (props.maxHeight) {\n let maxHeight = parseHeight(props.maxHeight)\n if (typeof maxHeight === 'number') {\n maxHeight = layout.scrollX.value\n ? maxHeight - layout.gutterWidth\n : maxHeight\n if (props.showHeader) {\n maxHeight -= layout.headerHeight.value\n }\n maxHeight -= layout.footerHeight.value\n return {\n 'max-height': `${maxHeight}px`,\n }\n }\n }\n return {}\n })\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;;;;AAkBA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAC;AACvC,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC;AAC1B,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,MAAM,EAAE,IAAI;AAChB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,WAAW,CAAC,MAAM;AACpB,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACnC,GAAG,CAAC,CAAC;AACL,EAAE,WAAW,CAAC,MAAM;AACpB,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACzC,GAAG,CAAC,CAAC;AACL,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,KA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K,MAAM,IAAI,KAAK,CAAC,SAAS,EAAE;AAChC,MAAM,IAAI,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;AACzC,QAAQ,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;AACtF,QAAQ,IAAI,KAAK,CAAC,UAAU,EAAE;AAC9B,UAAU,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC;AACjD,SAAS;AACT,QAAQ,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC;AAC/C,QAAQ,OAAO;AACf,UAAU,YAAY,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;AACxC,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,IAAI,OAAO,EAAE,CAAC;AACd,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,IAAI,4BAA4B;AAChC,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,qBAAqB;AACzB,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["import {\n onMounted,\n onUnmounted,\n computed,\n ref,\n watchEffect,\n watch,\n unref,\n nextTick,\n} from 'vue'\nimport {\n addResizeListener,\n removeResizeListener,\n} from '@element-plus/utils/resize-event'\nimport { on, off } from '@element-plus/utils/dom'\nimport { useSize } from '@element-plus/hooks'\nimport { parseHeight } from '../util'\n\nimport type { ResizableElement } from '@element-plus/utils/resize-event'\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref({\n width: null,\n height: null,\n })\n const isGroup = ref(false)\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const tableBodyStyles = computed(() => {\n return {\n width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : '',\n }\n })\n\n const borderBottomPatchStyles = computed(() => {\n return {\n bottom: `${layout.gutterWidth}px`,\n right: `${layout.gutterWidth}px`,\n }\n })\n\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth()\n requestAnimationFrame(syncPostion)\n }\n onMounted(async () => {\n setScrollClass('is-scrolling-left')\n store.updateColumns()\n await nextTick()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n resizeState.value = {\n width: table.vnode.el.offsetWidth,\n height: table.vnode.el.offsetHeight,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n setScrollClassByEl(tableWrapper, className)\n }\n const syncPostion = function () {\n if (!table.refs.bodyWrapper) return\n const { scrollLeft, offsetWidth, scrollWidth } = table.refs.bodyWrapper\n const { headerWrapper, footerWrapper } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }\n\n const bindEvents = () => {\n table.refs.bodyWrapper.addEventListener('scroll', syncPostion, {\n passive: true,\n })\n if (props.fit) {\n addResizeListener(table.vnode.el as ResizableElement, resizeListener)\n } else {\n on(window, 'resize', doLayout)\n }\n }\n onUnmounted(() => {\n unbindEvents()\n })\n const unbindEvents = () => {\n table.refs.bodyWrapper?.removeEventListener('scroll', syncPostion, true)\n if (props.fit) {\n removeResizeListener(table.vnode.el as ResizableElement, resizeListener)\n } else {\n off(window, 'resize', doLayout)\n }\n }\n const resizeListener = () => {\n if (!table.$ready) return\n let shouldUpdateLayout = false\n const el = table.vnode.el\n const { width: oldWidth, height: oldHeight } = resizeState.value\n\n const width = el.offsetWidth\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n }\n doLayout()\n }\n }\n const tableSize = useSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n const bodyHeight = computed(() => {\n const headerHeight = layout.headerHeight.value || 0\n const bodyHeight = layout.bodyHeight.value\n const footerHeight = layout.footerHeight.value || 0\n if (props.height) {\n return {\n height: bodyHeight ? `${bodyHeight}px` : '',\n }\n } else if (props.maxHeight) {\n const maxHeight = parseHeight(props.maxHeight)\n if (typeof maxHeight === 'number') {\n return {\n 'max-height': `${\n maxHeight - footerHeight - (props.showHeader ? headerHeight : 0)\n }px`,\n }\n }\n }\n return {}\n })\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (layout.appendHeight.value) {\n height = `calc(100% - ${layout.appendHeight.value}px)`\n }\n return {\n width: bodyWidth.value,\n height,\n }\n })\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n const fixedHeight = computed(() => {\n if (props.maxHeight) {\n if (props.showSummary) {\n return {\n bottom: 0,\n }\n }\n return {\n bottom:\n layout.scrollX.value && props.data.length\n ? `${layout.gutterWidth}px`\n : '',\n }\n } else {\n if (props.showSummary) {\n return {\n height: layout.tableHeight.value\n ? `${layout.tableHeight.value}px`\n : '',\n }\n }\n return {\n height: layout.viewportHeight.value\n ? `${layout.viewportHeight.value}px`\n : '',\n }\n }\n })\n const fixedBodyHeight = computed(() => {\n if (props.height) {\n return {\n height: layout.fixedBodyHeight.value\n ? `${layout.fixedBodyHeight.value}px`\n : '',\n }\n } else if (props.maxHeight) {\n let maxHeight = parseHeight(props.maxHeight)\n if (typeof maxHeight === 'number') {\n maxHeight = layout.scrollX.value\n ? maxHeight - layout.gutterWidth\n : maxHeight\n if (props.showHeader) {\n maxHeight -= layout.headerHeight.value\n }\n maxHeight -= layout.footerHeight.value\n return {\n 'max-height': `${maxHeight}px`,\n }\n }\n }\n return {}\n })\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n borderBottomPatchStyles,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;;;AAiBA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,kBAAkB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AO;AACf,UAAU,YAAY,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;AACxC,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,IAAI,OAAO,EAAE,CAAC;AACd,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,IAAI,4BAA4B;AAChC,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,qBAAqB;AACzB,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -51,17 +51,19 @@ var TableBody = defineComponent({
|
|
|
51
51
|
};
|
|
52
52
|
},
|
|
53
53
|
render() {
|
|
54
|
-
const
|
|
54
|
+
const { wrappedRowRender, store } = this;
|
|
55
|
+
const data = store.states.data.value || [];
|
|
56
|
+
const columns = store.states.columns.value;
|
|
55
57
|
return h("table", {
|
|
56
58
|
class: "el-table__body",
|
|
57
59
|
cellspacing: "0",
|
|
58
60
|
cellpadding: "0",
|
|
59
61
|
border: "0"
|
|
60
62
|
}, [
|
|
61
|
-
hColgroup(
|
|
63
|
+
hColgroup(columns),
|
|
62
64
|
h("tbody", {}, [
|
|
63
65
|
data.reduce((acc, row) => {
|
|
64
|
-
return acc.concat(
|
|
66
|
+
return acc.concat(wrappedRowRender(row, acc.length));
|
|
65
67
|
}, [])
|
|
66
68
|
])
|
|
67
69
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n h,\n watch,\n onUnmounted,\n onUpdated,\n} from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { addClass, removeClass } from '@element-plus/utils/dom'\nimport { hColgroup } from '../h-helper'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<DefaultRow>\n\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent)\n\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n if (!props.store.states.isComplex.value || !isClient) return\n let raf = window.requestAnimationFrame\n if (!raf) {\n raf = (fn) => window.setTimeout(fn, 16)\n }\n raf(() => {\n const rows = instance.vnode.el.querySelectorAll('.el-table__row')\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n if (oldRow) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n onUpdated(() => {\n removePopper?.()\n })\n\n return {\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const data =
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n h,\n watch,\n onUnmounted,\n onUpdated,\n} from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { addClass, removeClass } from '@element-plus/utils/dom'\nimport { hColgroup } from '../h-helper'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<DefaultRow>\n\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent)\n\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n if (!props.store.states.isComplex.value || !isClient) return\n let raf = window.requestAnimationFrame\n if (!raf) {\n raf = (fn) => window.setTimeout(fn, 16)\n }\n raf(() => {\n const rows = instance.vnode.el.querySelectorAll('.el-table__row')\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n if (oldRow) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n onUpdated(() => {\n removePopper?.()\n })\n\n return {\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n const columns = store.states.columns.value\n return h(\n 'table',\n {\n class: 'el-table__body',\n cellspacing: '0',\n cellpadding: '0',\n border: '0',\n },\n [\n hColgroup(columns),\n h('tbody', {}, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ]),\n ]\n )\n },\n})\n"],"names":[],"mappings":";;;;;;;;;AAeA,gBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACnC,IAAI,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAClF,IAAI,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,G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,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;AAC/C,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE;AACtB,MAAM,KAAK,EAAE,gBAAgB;AAC7B,MAAM,WAAW,EAAE,GAAG;AACtB,MAAM,WAAW,EAAE,GAAG;AACtB,MAAM,MAAM,EAAE,GAAG;AACjB,KAAK,EAAE;AACP,MAAM,SAAS,CAAC,OAAO,CAAC;AACxB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE;AACrB,QAAQ,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAClC,UAAU,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,SAAS,EAAE,EAAE,CAAC;AACd,OAAO,CAAC;AACR,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -10,6 +10,5 @@ declare function useStyles<T>(props: Partial<TableBodyProps<T>>): {
|
|
|
10
10
|
colspan: number;
|
|
11
11
|
};
|
|
12
12
|
getColspanRealWidth: (columns: TableColumnCtx<T>[], colspan: number, index: number) => number;
|
|
13
|
-
isColumnHidden: (index: any) => boolean;
|
|
14
13
|
};
|
|
15
14
|
export default useStyles;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
|
+
import { getFixedColumnOffset, ensurePosition, getFixedColumnsClass } from '../util.mjs';
|
|
2
3
|
|
|
3
4
|
function useStyles(props) {
|
|
4
5
|
const instance = getCurrentInstance();
|
|
5
6
|
const parent = instance.parent;
|
|
6
|
-
const isColumnHidden = (index) => {
|
|
7
|
-
if (props.fixed === "left") {
|
|
8
|
-
return index >= props.store.states.fixedLeafColumnsLength.value;
|
|
9
|
-
} else if (props.fixed === "right") {
|
|
10
|
-
return index < props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;
|
|
11
|
-
} else {
|
|
12
|
-
return index < props.store.states.fixedLeafColumnsLength.value || index >= props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
7
|
const getRowStyle = (row, rowIndex) => {
|
|
16
8
|
const rowStyle = parent.props.rowStyle;
|
|
17
9
|
if (typeof rowStyle === "function") {
|
|
@@ -46,21 +38,23 @@ function useStyles(props) {
|
|
|
46
38
|
};
|
|
47
39
|
const getCellStyle = (rowIndex, columnIndex, row, column) => {
|
|
48
40
|
const cellStyle = parent.props.cellStyle;
|
|
41
|
+
let cellStyles = cellStyle != null ? cellStyle : {};
|
|
49
42
|
if (typeof cellStyle === "function") {
|
|
50
|
-
|
|
43
|
+
cellStyles = cellStyle.call(null, {
|
|
51
44
|
rowIndex,
|
|
52
45
|
columnIndex,
|
|
53
46
|
row,
|
|
54
47
|
column
|
|
55
48
|
});
|
|
56
49
|
}
|
|
57
|
-
|
|
50
|
+
const fixedStyle = getFixedColumnOffset(columnIndex, props.fixed, props.store);
|
|
51
|
+
ensurePosition(fixedStyle, "left");
|
|
52
|
+
ensurePosition(fixedStyle, "right");
|
|
53
|
+
return Object.assign({}, cellStyles, fixedStyle);
|
|
58
54
|
};
|
|
59
55
|
const getCellClass = (rowIndex, columnIndex, row, column) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
classes.push("is-hidden");
|
|
63
|
-
}
|
|
56
|
+
const fixedClasses = column.isSubColumn ? [] : getFixedColumnsClass(columnIndex, props.fixed, props.store);
|
|
57
|
+
const classes = [column.id, column.align, column.className, ...fixedClasses];
|
|
64
58
|
const cellClassName = parent.props.cellClassName;
|
|
65
59
|
if (typeof cellClassName === "string") {
|
|
66
60
|
classes.push(cellClassName);
|
|
@@ -109,8 +103,7 @@ function useStyles(props) {
|
|
|
109
103
|
getCellStyle,
|
|
110
104
|
getCellClass,
|
|
111
105
|
getSpan,
|
|
112
|
-
getColspanRealWidth
|
|
113
|
-
isColumnHidden
|
|
106
|
+
getColspanRealWidth
|
|
114
107
|
};
|
|
115
108
|
}
|
|
116
109
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-body/styles-helper.ts"],"sourcesContent":["import { getCurrentInstance } from 'vue'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { Table } from '../table/defaults'\nimport type { TableBodyProps } from './defaults'\n\nfunction useStyles<T>(props: Partial<TableBodyProps<T>>) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<T>\n
|
|
1
|
+
{"version":3,"file":"styles-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-body/styles-helper.ts"],"sourcesContent":["import { getCurrentInstance } from 'vue'\nimport {\n getFixedColumnOffset,\n getFixedColumnsClass,\n ensurePosition,\n} from '../util'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { Table } from '../table/defaults'\nimport type { TableBodyProps } from './defaults'\n\nfunction useStyles<T>(props: Partial<TableBodyProps<T>>) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<T>\n\n const getRowStyle = (row: T, rowIndex: number) => {\n const rowStyle = parent.props.rowStyle\n if (typeof rowStyle === 'function') {\n return rowStyle.call(null, {\n row,\n rowIndex,\n })\n }\n return rowStyle || null\n }\n\n const getRowClass = (row: T, rowIndex: number) => {\n const classes = ['el-table__row']\n if (\n parent.props.highlightCurrentRow &&\n row === props.store.states.currentRow.value\n ) {\n classes.push('current-row')\n }\n\n if (props.stripe && rowIndex % 2 === 1) {\n classes.push('el-table__row--striped')\n }\n const rowClassName = parent.props.rowClassName\n if (typeof rowClassName === 'string') {\n classes.push(rowClassName)\n } else if (typeof rowClassName === 'function') {\n classes.push(\n rowClassName.call(null, {\n row,\n rowIndex,\n })\n )\n }\n\n if (props.store.states.expandRows.value.indexOf(row) > -1) {\n classes.push('expanded')\n }\n\n return classes\n }\n\n const getCellStyle = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n const cellStyle = parent.props.cellStyle\n let cellStyles = cellStyle ?? {}\n if (typeof cellStyle === 'function') {\n cellStyles = cellStyle.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n }\n const fixedStyle = getFixedColumnOffset(\n columnIndex,\n props.fixed,\n props.store\n )\n ensurePosition(fixedStyle, 'left')\n ensurePosition(fixedStyle, 'right')\n return Object.assign({}, cellStyles, fixedStyle)\n }\n\n const getCellClass = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n const fixedClasses = column.isSubColumn\n ? []\n : getFixedColumnsClass(columnIndex, props.fixed, props.store)\n const classes = [column.id, column.align, column.className, ...fixedClasses]\n const cellClassName = parent.props.cellClassName\n if (typeof cellClassName === 'string') {\n classes.push(cellClassName)\n } else if (typeof cellClassName === 'function') {\n classes.push(\n cellClassName.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n )\n }\n\n classes.push('el-table__cell')\n\n return classes.join(' ')\n }\n const getSpan = (\n row: T,\n column: TableColumnCtx<T>,\n rowIndex: number,\n columnIndex: number\n ) => {\n let rowspan = 1\n let colspan = 1\n const fn = parent.props.spanMethod\n if (typeof fn === 'function') {\n const result = fn({\n row,\n column,\n rowIndex,\n columnIndex,\n })\n if (Array.isArray(result)) {\n rowspan = result[0]\n colspan = result[1]\n } else if (typeof result === 'object') {\n rowspan = result.rowspan\n colspan = result.colspan\n }\n }\n return { rowspan, colspan }\n }\n const getColspanRealWidth = (\n columns: TableColumnCtx<T>[],\n colspan: number,\n index: number\n ): number => {\n if (colspan < 1) {\n return columns[index].realWidth\n }\n const widthArr = columns\n .map(({ realWidth, width }) => realWidth || width)\n .slice(index, index + colspan)\n return Number(\n widthArr.reduce((acc, width) => Number(acc) + Number(width), -1)\n )\n }\n\n return {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n }\n}\n\nexport default useStyles\n"],"names":[],"mappings":";;;AAMA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,EAAE,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,KAAK;AACzC,IAAI,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;AAC3C,IAAI,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AACxC,MAAM,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE;AACjC,QAAQ,GAAG;AACX,QAAQ,QAAQ;AAChB,OAAO,CAAC,CAAC;AACT,KAAK;AACL,IAAI,OAAO,QAAQ,IAAI,IAAI,CAAC;AAC5B,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,KAAK;AACzC,IAAI,MAAM,OAAO,GAAG,CAAC,eAAe,CAAC,CAAC;AACtC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,mBAAmB,IAAI,GAAG,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE;AACzF,MAAM,OAAO,CAAC,IAAI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O,CAAC,CAAC;AAC7G,IAAI,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,OAAO;AACX,IAAI,mBAAmB;AACvB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["import type { PropType, ComponentInternalInstance, 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 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(\n (order: string) => ['ascending', 'descending', null].indexOf(order) > -1\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,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,QAAQ;AACxB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC3B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,QAAQ;AACtB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC;AACnC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,uBAAuB,EAAE,OAAO;AAClC,EAAE,mBAAmB,EAAE,OAAO;AAC9B,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC1B,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,UAAU,EAAE,QAAQ;AACtB,EAAE,gBAAgB,EAAE,OAAO;AAC3B,EAAE,YAAY,EAAE,QAAQ;AACxB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE,eAAe,EAAE,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,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACzF,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["import type { PropType, ComponentInternalInstance, 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(\n (order: string) => ['ascending', 'descending', null].indexOf(order) > -1\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,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,QAAQ;AACxB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC3B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,QAAQ;AACtB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC;AACnC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,uBAAuB,EAAE,OAAO;AAClC,EAAE,mBAAmB,EAAE,OAAO;AAC9B,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC1B,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,UAAU,EAAE,QAAQ;AACtB,EAAE,gBAAgB,EAAE,OAAO;AAC3B,EAAE,YAAY,EAAE,QAAQ;AACxB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE,eAAe,EAAE,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,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACzF,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
@@ -105,9 +105,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
105
|
index?: number | ((index: number) => number) | undefined;
|
|
106
106
|
align?: string | undefined;
|
|
107
107
|
filters?: import("./defaults").Filters | undefined;
|
|
108
|
+
className?: string | undefined;
|
|
108
109
|
prop?: string | undefined;
|
|
109
110
|
filterMethod?: import("./defaults").FilterMethods<any> | undefined;
|
|
110
|
-
className?: string | undefined;
|
|
111
111
|
labelClassName?: string | undefined;
|
|
112
112
|
renderHeader?: ((data: {
|
|
113
113
|
column: TableColumnCtx<any>;
|