@element-plus/nightly 0.0.20220104 → 0.0.20220108
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 +655 -617
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +653 -614
- package/es/components/cascader/index.d.ts +4 -0
- package/es/components/cascader/src/index.vue.d.ts +2 -0
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs +5 -4
- 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/cascader-panel/src/menu.vue.d.ts +1 -0
- package/es/components/cascader-panel/src/menu.vue_vue_type_script_lang.mjs +6 -0
- package/es/components/cascader-panel/src/menu.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.mjs +19 -2
- package/es/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/types.d.ts +1 -0
- package/es/components/cascader-panel/src/types.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +6 -6
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/es/components/config-provider/index.d.ts +6 -2
- package/es/components/config-provider/index.mjs +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +13 -5
- package/es/components/config-provider/src/config-provider.mjs +12 -5
- package/es/components/config-provider/src/config-provider.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +4 -4
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +2 -2
- package/es/components/form/index.d.ts +1 -0
- package/es/components/form/src/form.vue.d.ts +1 -0
- package/es/components/form/src/form.vue_vue_type_script_lang.mjs +14 -0
- package/es/components/form/src/form.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.mjs +1 -4
- package/es/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/input/index.d.ts +1 -0
- package/es/components/input/src/input.vue.d.ts +1 -0
- package/es/components/input/src/input.vue_vue_type_script_lang.mjs +1 -0
- package/es/components/input/src/input.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.mjs +1 -1
- package/es/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +5 -1
- package/es/components/input-number/src/input-number.vue.d.ts +5 -1
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs +15 -1
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs +5 -4
- package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs.map +1 -1
- package/es/components/message/src/message-method.mjs +5 -1
- package/es/components/message/src/message-method.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +3 -0
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +2 -2
- package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.mjs +1 -0
- package/es/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs +1 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs.map +1 -1
- package/es/components/radio/index.d.ts +6 -6
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +11 -5
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button.vue.d.ts +2 -2
- package/es/components/radio/src/radio-button.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/radio/src/radio-button2.mjs +5 -11
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +2 -2
- package/es/components/rate/index.d.ts +7 -1
- package/es/components/rate/src/rate.d.ts +2 -0
- package/es/components/rate/src/rate.mjs +5 -0
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +7 -1
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs +6 -0
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs +3 -3
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs.map +1 -1
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -1
- package/es/components/select-v2/index.d.ts +2 -2
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/slider/index.d.ts +22 -6
- package/es/components/slider/src/index.vue.d.ts +11 -3
- package/es/components/slider/src/index.vue_vue_type_script_lang.mjs +21 -2
- package/es/components/slider/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.mjs +19 -19
- package/es/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.mjs.map +1 -1
- package/es/components/switch/index.d.ts +7 -2
- package/es/components/switch/src/switch.d.ts +2 -0
- package/es/components/switch/src/switch.mjs +5 -0
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +7 -2
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs +10 -1
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs +1 -1
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs.map +1 -1
- package/es/components/table/index.d.ts +9 -0
- 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.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 +8 -3
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +9 -0
- 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 +99 -6
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +2 -2
- package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -2
- package/es/components/transfer/src/transfer-panel.vue_vue_type_script_lang.mjs +2 -13
- package/es/components/transfer/src/transfer-panel.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs +5 -18
- package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs.map +1 -1
- package/es/defaults.d.ts +3 -1
- package/es/hooks/index.mjs +1 -1
- package/es/hooks/use-global-config/index.d.ts +3 -1
- package/es/hooks/use-global-config/index.mjs +3 -2
- package/es/hooks/use-global-config/index.mjs.map +1 -1
- package/es/hooks/use-id/index.mjs +2 -2
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/hooks/use-locale/index.d.ts +2 -253
- package/es/hooks/use-locale/index.mjs +9 -29
- package/es/hooks/use-locale/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.mjs +2 -2
- package/es/hooks/use-popper-container/index.mjs.map +1 -1
- package/es/index.d.ts +4 -1
- package/es/index.mjs +4 -3
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.d.ts +4 -0
- package/lib/components/cascader/src/index.vue.d.ts +2 -0
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js +5 -4
- 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/cascader-panel/src/menu.vue.d.ts +1 -0
- package/lib/components/cascader-panel/src/menu.vue_vue_type_script_lang.js +10 -4
- package/lib/components/cascader-panel/src/menu.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.js +18 -1
- package/lib/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/types.d.ts +1 -0
- package/lib/components/cascader-panel/src/types.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +6 -6
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/lib/components/config-provider/index.d.ts +6 -2
- package/lib/components/config-provider/index.js +1 -0
- package/lib/components/config-provider/index.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +13 -5
- package/lib/components/config-provider/src/config-provider.js +13 -5
- package/lib/components/config-provider/src/config-provider.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +4 -4
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js.map +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +2 -2
- package/lib/components/form/index.d.ts +1 -0
- package/lib/components/form/src/form.vue.d.ts +1 -0
- package/lib/components/form/src/form.vue_vue_type_script_lang.js +14 -0
- package/lib/components/form/src/form.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.js +1 -4
- package/lib/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.js.map +1 -1
- package/lib/components/index.js +2 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +1 -0
- package/lib/components/input/src/input.vue.d.ts +1 -0
- package/lib/components/input/src/input.vue_vue_type_script_lang.js +1 -0
- package/lib/components/input/src/input.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.js +1 -1
- package/lib/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.js.map +1 -1
- package/lib/components/input-number/index.d.ts +5 -1
- package/lib/components/input-number/src/input-number.vue.d.ts +5 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js +18 -4
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js +5 -4
- package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js.map +1 -1
- package/lib/components/message/src/message-method.js +5 -1
- package/lib/components/message/src/message-method.js.map +1 -1
- package/lib/components/message/src/message.d.ts +3 -0
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +2 -2
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.js +1 -0
- package/lib/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js +1 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js.map +1 -1
- package/lib/components/radio/index.d.ts +6 -6
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +10 -5
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
- package/lib/components/radio/src/radio-button.vue_vue_type_script_lang.js +1 -1
- package/lib/components/radio/src/radio-button2.js +5 -10
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +2 -2
- package/lib/components/rate/index.d.ts +7 -1
- package/lib/components/rate/src/rate.d.ts +2 -0
- package/lib/components/rate/src/rate.js +5 -0
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +7 -1
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js +6 -0
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js +2 -2
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js.map +1 -1
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -1
- package/lib/components/select-v2/index.d.ts +2 -2
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/slider/index.d.ts +22 -6
- package/lib/components/slider/src/index.vue.d.ts +11 -3
- package/lib/components/slider/src/index.vue_vue_type_script_lang.js +21 -2
- package/lib/components/slider/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.js +18 -18
- package/lib/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.js.map +1 -1
- package/lib/components/switch/index.d.ts +7 -2
- package/lib/components/switch/src/switch.d.ts +2 -0
- package/lib/components/switch/src/switch.js +5 -0
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +7 -2
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js +9 -0
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js +1 -1
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js.map +1 -1
- package/lib/components/table/index.d.ts +9 -0
- 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.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 +8 -3
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +9 -0
- 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 +104 -5
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +2 -2
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -2
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_lang.js +3 -14
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.js +4 -17
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.js.map +1 -1
- package/lib/defaults.d.ts +3 -1
- package/lib/hooks/index.js +1 -4
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-global-config/index.d.ts +3 -1
- package/lib/hooks/use-global-config/index.js +3 -2
- package/lib/hooks/use-global-config/index.js.map +1 -1
- package/lib/hooks/use-id/index.js +2 -2
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/hooks/use-locale/index.d.ts +2 -253
- package/lib/hooks/use-locale/index.js +8 -31
- package/lib/hooks/use-locale/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.js +2 -2
- package/lib/hooks/use-popper-container/index.js.map +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-checkbox.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/el-radio.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-slider.css +1 -1
- package/theme-chalk/el-switch.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-tag.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-transfer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader.scss +4 -0
- package/theme-chalk/src/checkbox.scss +40 -6
- package/theme-chalk/src/common/var.scss +2 -4
- package/theme-chalk/src/date-picker/picker-panel.scss +1 -1
- package/theme-chalk/src/date-picker/picker.scss +1 -0
- package/theme-chalk/src/form.scss +101 -24
- package/theme-chalk/src/pagination.scss +0 -3
- package/theme-chalk/src/radio.scss +21 -0
- package/theme-chalk/src/rate.scss +19 -2
- package/theme-chalk/src/select-v2.scss +2 -3
- package/theme-chalk/src/slider.scss +28 -77
- package/theme-chalk/src/switch.scss +43 -4
- package/theme-chalk/src/table.scss +176 -124
- package/theme-chalk/src/tag.scss +3 -3
- package/theme-chalk/src/transfer.scss +27 -31
- package/web-types.json +1 -1
- package/es/utils/isServer.d.ts +0 -2
- package/es/utils/isServer.mjs +0 -4
- package/es/utils/isServer.mjs.map +0 -1
- package/lib/utils/isServer.d.ts +0 -2
- package/lib/utils/isServer.js +0 -8
- package/lib/utils/isServer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["import { nextTick, ref, isRef } from 'vue'\nimport { hasOwn } from '@vue/shared'\nimport { isClient } from '@vueuse/core'\nimport scrollbarWidth from '@element-plus/utils/scrollbar-width'\nimport { parseHeight } from './util'\nimport type { Ref } from 'vue'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n viewportHeight: Ref<null | number> // Table Height - Scroll Bar Height\n bodyHeight: Ref<null | number> // Table Height - Table Header Height\n fixedBodyHeight: Ref<null | number> // Table Height - Table Header Height - Scroll Bar Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.tableHeight = ref(null)\n this.headerHeight = ref(44)\n this.appendHeight = ref(0)\n this.footerHeight = ref(44)\n this.viewportHeight = ref(null)\n this.bodyHeight = ref(null)\n this.fixedBodyHeight = ref(null)\n this.gutterWidth = scrollbarWidth()\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (height === null) return false\n const bodyWrapper = this.table.refs.bodyWrapper as HTMLElement\n if (this.table.vnode.el && bodyWrapper) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n /**\n * When bodyHeight has no value,\n * it means that the table height is not set,\n * and the scroll bar will never appear\n */\n if (this.bodyHeight.value === null) {\n scrollY = false\n } else {\n const body = bodyWrapper.querySelector('.el-table__body') as HTMLElement\n scrollY = body.offsetHeight > this.bodyHeight.value\n }\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (typeof value === 'number') {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (typeof value === 'string') {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n if (!this.table.$ready) return nextTick(() => this.updateElsHeight())\n const { headerWrapper, appendWrapper, footerWrapper } = this.table.refs\n this.appendHeight.value = appendWrapper ? appendWrapper.offsetHeight : 0\n if (this.showHeader && !headerWrapper) return\n\n const headerTrElm: HTMLElement = headerWrapper\n ? headerWrapper.querySelector('.el-table__header tr')\n : null\n const noneHeader = this.headerDisplayNone(headerTrElm)\n\n const headerHeight = (this.headerHeight.value = !this.showHeader\n ? 0\n : headerWrapper.offsetHeight)\n if (\n this.showHeader &&\n !noneHeader &&\n headerWrapper.offsetWidth > 0 &&\n (this.table.store.states.columns.value || []).length > 0 &&\n headerHeight < 2\n ) {\n return nextTick(() => this.updateElsHeight())\n }\n const tableHeight = (this.tableHeight.value =\n this.table.vnode.el.clientHeight)\n const footerHeight = (this.footerHeight.value = footerWrapper\n ? footerWrapper.offsetHeight\n : 0)\n if (this.height.value !== null) {\n this.bodyHeight.value =\n tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0)\n }\n this.fixedBodyHeight.value = this.scrollX.value\n ? this.bodyHeight.value - this.gutterWidth\n : this.bodyHeight.value\n\n this.viewportHeight.value = this.scrollX.value\n ? tableHeight - this.gutterWidth\n : tableHeight\n\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => typeof column.width !== 'number'\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (typeof column.width === 'number' && column.realWidth)\n column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n\n const scrollYWidth = this.scrollY.value ? this.gutterWidth : 0\n\n if (bodyMinWidth <= bodyWidth - scrollYWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach(function (column) {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach(function (column) {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach(function (column) {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","scrollbarWidth","hasOwn","isRef","isClient","parseHeight","nextTick"],"mappings":";;;;;;;;;;AAKA,MAAM,WAAW,CAAC;AAClB,EAAE,WAAW,CAAC,OAAO,EAAE;AACvB,IAAI,IAAI,C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AC,CAAC,CAAC;AACtC,KAAK;AACL,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;AACpC,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["import { nextTick, ref, isRef } from 'vue'\nimport { hasOwn } from '@vue/shared'\nimport { isClient } from '@vueuse/core'\nimport scrollbarWidth from '@element-plus/utils/scrollbar-width'\nimport { parseHeight } from './util'\nimport type { Ref } from 'vue'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n viewportHeight: Ref<null | number> // Table Height - Scroll Bar Height\n bodyHeight: Ref<null | number> // Table Height - Table Header Height\n bodyScrollHeight: Ref<number>\n fixedBodyHeight: Ref<null | number> // Table Height - Table Header Height - Scroll Bar Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.tableHeight = ref(null)\n this.headerHeight = ref(44)\n this.appendHeight = ref(0)\n this.footerHeight = ref(44)\n this.viewportHeight = ref(null)\n this.bodyHeight = ref(null)\n this.bodyScrollHeight = ref(0)\n this.fixedBodyHeight = ref(null)\n this.gutterWidth = scrollbarWidth()\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (height === null) return false\n const bodyWrapper = this.table.refs.bodyWrapper as HTMLElement\n if (this.table.vnode.el && bodyWrapper) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n /**\n * When bodyHeight has no value,\n * it means that the table height is not set,\n * and the scroll bar will never appear\n */\n if (this.bodyHeight.value === null) {\n scrollY = false\n } else {\n scrollY = bodyWrapper.scrollHeight > this.bodyHeight.value\n }\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (typeof value === 'number') {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (typeof value === 'string') {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n if (!this.table.$ready) return nextTick(() => this.updateElsHeight())\n const { headerWrapper, appendWrapper, footerWrapper, bodyWrapper } =\n this.table.refs\n this.appendHeight.value = appendWrapper ? appendWrapper.offsetHeight : 0\n if (this.showHeader && !headerWrapper) return\n\n const headerTrElm: HTMLElement = headerWrapper\n ? headerWrapper.querySelector('.el-table__header tr')\n : null\n const noneHeader = this.headerDisplayNone(headerTrElm)\n\n const headerHeight = (this.headerHeight.value = !this.showHeader\n ? 0\n : headerWrapper.offsetHeight)\n if (\n this.showHeader &&\n !noneHeader &&\n headerWrapper.offsetWidth > 0 &&\n (this.table.store.states.columns.value || []).length > 0 &&\n headerHeight < 2\n ) {\n return nextTick(() => this.updateElsHeight())\n }\n const tableHeight = (this.tableHeight.value =\n this.table.vnode.el.clientHeight)\n const footerHeight = (this.footerHeight.value = footerWrapper\n ? footerWrapper.offsetHeight\n : 0)\n if (this.height.value !== null) {\n if (this.bodyHeight.value === null) {\n requestAnimationFrame(() => this.updateElsHeight())\n }\n this.bodyHeight.value =\n tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0)\n this.bodyScrollHeight.value =\n bodyWrapper.querySelector('.el-table__body')?.scrollHeight!\n }\n this.fixedBodyHeight.value = this.scrollX.value\n ? this.bodyHeight.value - this.gutterWidth\n : this.bodyHeight.value\n\n this.viewportHeight.value = this.scrollX.value\n ? tableHeight - this.gutterWidth\n : tableHeight\n\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => typeof column.width !== 'number'\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (typeof column.width === 'number' && column.realWidth)\n column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n\n const scrollYWidth = this.scrollY.value ? this.gutterWidth : 0\n\n if (bodyMinWidth <= bodyWidth - scrollYWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach(function (column) {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach(function (column) {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach(function (column) {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","scrollbarWidth","hasOwn","isRef","isClient","parseHeight","nextTick"],"mappings":";;;;;;;;;;AAKA,MAAM,WAAW,CAAC;AAClB,EAAE,WAAW,CAAC,OAAO,EAAE;AACvB,IAAI,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACxB,IAAI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xB,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,cAAc,CAAC,QAAQ,EAAE;AAC3B,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACtB,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACtC,KAAK;AACL,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;AACpC,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
|
|
@@ -122,10 +122,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
122
|
height?: undefined;
|
|
123
123
|
'max-height'?: undefined;
|
|
124
124
|
}>;
|
|
125
|
+
tableBodyStyles: import("vue").ComputedRef<{
|
|
126
|
+
width: string;
|
|
127
|
+
}>;
|
|
125
128
|
emptyBlockStyle: import("vue").ComputedRef<{
|
|
126
129
|
width: string;
|
|
127
130
|
height: string;
|
|
128
131
|
} | null>;
|
|
132
|
+
borderBottomPatchStyles: import("vue").ComputedRef<{
|
|
133
|
+
bottom: string;
|
|
134
|
+
right: string;
|
|
135
|
+
}>;
|
|
129
136
|
debouncedUpdateLayout: import("lodash").DebouncedFunc<() => void>;
|
|
130
137
|
handleFixedMousewheel: (event: any, data: any) => void;
|
|
131
138
|
fixedHeight: import("vue").ComputedRef<{
|
|
@@ -160,6 +167,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
167
|
t: import("element-plus/es/hooks").Translator;
|
|
161
168
|
setDragVisible: (visible: boolean) => void;
|
|
162
169
|
context: Table<any>;
|
|
170
|
+
computedSumText: import("vue").ComputedRef<string>;
|
|
171
|
+
computedEmptyText: import("vue").ComputedRef<string>;
|
|
163
172
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
164
173
|
data?: unknown;
|
|
165
174
|
size?: unknown;
|
|
@@ -92,7 +92,9 @@ var script = vue.defineComponent({
|
|
|
92
92
|
resizeProxyVisible,
|
|
93
93
|
bodyWidth,
|
|
94
94
|
resizeState,
|
|
95
|
-
doLayout
|
|
95
|
+
doLayout,
|
|
96
|
+
tableBodyStyles,
|
|
97
|
+
borderBottomPatchStyles
|
|
96
98
|
} = styleHelper["default"](props, layout, store, table);
|
|
97
99
|
const debouncedUpdateLayout = debounce__default["default"](doLayout, 50);
|
|
98
100
|
const tableId = `el-table_${tableIdSeed++}`;
|
|
@@ -103,6 +105,10 @@ var script = vue.defineComponent({
|
|
|
103
105
|
doLayout,
|
|
104
106
|
debouncedUpdateLayout
|
|
105
107
|
};
|
|
108
|
+
const computedSumText = vue.computed(() => props.sumText || t("el.table.sumText"));
|
|
109
|
+
const computedEmptyText = vue.computed(() => {
|
|
110
|
+
return props.emptyText || t("el.table.emptyText");
|
|
111
|
+
});
|
|
106
112
|
return {
|
|
107
113
|
layout,
|
|
108
114
|
store,
|
|
@@ -118,7 +124,9 @@ var script = vue.defineComponent({
|
|
|
118
124
|
isGroup,
|
|
119
125
|
bodyWidth,
|
|
120
126
|
bodyHeight,
|
|
127
|
+
tableBodyStyles,
|
|
121
128
|
emptyBlockStyle,
|
|
129
|
+
borderBottomPatchStyles,
|
|
122
130
|
debouncedUpdateLayout,
|
|
123
131
|
handleFixedMousewheel,
|
|
124
132
|
fixedHeight,
|
|
@@ -134,7 +142,9 @@ var script = vue.defineComponent({
|
|
|
134
142
|
sort,
|
|
135
143
|
t,
|
|
136
144
|
setDragVisible,
|
|
137
|
-
context: table
|
|
145
|
+
context: table,
|
|
146
|
+
computedSumText,
|
|
147
|
+
computedEmptyText
|
|
138
148
|
};
|
|
139
149
|
}
|
|
140
150
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n @mouseleave=\"handleMouseLeave()\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div\n v-if=\"showHeader\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__header-wrapper\"\n >\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n v-mousewheel=\"handleFixedMousewheel\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n v-mousewheel=\"handleFixedMousewheel\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { Mousewheel } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'ElTable',\n directives: {\n Mousewheel,\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n emits: [\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n ],\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocale()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\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 } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n setDragVisible,\n context: table,\n }\n },\n})\n</script>\n"],"names":["Mousewheel","TableHeader","TableBody","defaultProps","useLocale","getCurrentInstance","TableLayout","useStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8QA,IAAI,WAAW,GAAG,EAAE;;AAEpB,EAAE,MAAM,SAAS;;AAEjB,gBAAIA,gBAAU;AACd,GAAG;EACD,UAAU,EAAE;iBACVC;eACAC,kBAAS;;GAEV;OACI,EAAEC;OACF,EAAE;IACL,QAAQ;;IAER;IACA;IACA;IACA;IACA,YAAY;IACZ,eAAe;IACf,WAAW;IACX,iBAAiB;IACjB;IACA,cAAc;IACd;IACA,aAAa;IACb;IACA;IACA,gBAAgB;IAChB;;OAEG,CAAC,KAAK,EAAE;IACX,MAAM,EAAE,CAAC,EAAE,GAAGC;IACd,MAAM,KAAK,GAAGC;;IAEd,KAAK,CAAC,KAAK;IACX,MAAM,MAAM,GAAG,IAAIC,sBAAW,CAAC;MAC7B,YAAY,CAAC,KAAK;MAClB,KAAK;MACL,KAAK,KAAK,IAAI;MACd,UAAU,EAAE;KACb,CAAC,CAAC;SACE,CAAC,MAAM,GAAG;UACT;;MAEJ,aAAa;;MAEb,cAAc;;MAEd,kBAAkB;;MAElB;UACI;KACL;IACD,MAAM;MACJ,QAAQ;MACR,cAAc;MACd,cAAc;MACd,OAAO;MACP,gBAAgB;MAChB;MACA,SAAS;MACT;MACA,eAAe;MACf;MACA;MACA;MACA;MACA;MACA,WAAW;MACX,QAAQ;QACNC;UACE;UACA,OAAO,GAAG,CAAC;SACZ,CAAC,OAAO,GAAG,OAAO;SAClB,CAAC,KAAK;MACT,OAAO;MACP,WAAW;MACX,QAAQ;MACR;MACA;IACF,OAAO;;MAEL,KAAK;;MAEL,gBAAgB;MAChB,OAAO;MACP;MACA;MACA,OAAO;MACP;MACA,kBAAkB;;MAElB;MACA;MACA;MACA,eAAe;MACf;MACA;MACA;MACA;MACA;MACA;MACA,cAAc;MACd,WAAW;MACX;MACA;MACA,SAAS;MACT,QAAQ;MACR,IAAI;MACJ,CAAC;MACD;MACA,OAAO,EAAE,KAAK;MACd;;;;;;"}
|
|
1
|
+
{"version":3,"file":"table.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n ref=\"tableWrapper\"\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n @mouseleave=\"handleMouseLeave()\"\n >\n <div class=\"el-table__inner-wrapper\">\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div\n v-if=\"showHeader\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__header-wrapper\"\n >\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"tableBodyStyles\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"bodyHeight\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ computedEmptyText }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div v-if=\"border || isGroup\" class=\"el-table__border-left-patch\"></div>\n <div\n v-if=\"layout.scrollX.value && layout.height.value\"\n class=\"el-table__border-bottom-patch\"\n :style=\"borderBottomPatchStyles\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"tableBodyStyles\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { Mousewheel } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'ElTable',\n directives: {\n Mousewheel,\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n emits: [\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n ],\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocale()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\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 } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n const computedSumText = computed(\n () => props.sumText || t('el.table.sumText')\n )\n\n const computedEmptyText = computed(() => {\n return props.emptyText || t('el.table.emptyText')\n })\n\n return {\n layout,\n store,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n tableBodyStyles,\n emptyBlockStyle,\n borderBottomPatchStyles,\n debouncedUpdateLayout,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n setDragVisible,\n context: table,\n computedSumText,\n computedEmptyText,\n }\n },\n})\n</script>\n"],"names":["Mousewheel","TableHeader","TableBody","defaultProps","useLocale","getCurrentInstance","TableLayout","useStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsHA,IAAI,WAAW,GAAG,EAAE;;AAEpB,EAAE,MAAM,SAAS;;AAEjB,gBAAIA,gBAAU;AACd,GAAG;EACD,UAAU,EAAE;iBACVC;eACAC,kBAAS;;GAEV;OACI,EAAEC;OACF,EAAE;IACL,QAAQ;;IAER;IACA;IACA;IACA;IACA,YAAY;IACZ,eAAe;IACf,WAAW;IACX,iBAAiB;IACjB;IACA,cAAc;IACd;IACA,aAAa;IACb;IACA;IACA,gBAAgB;IAChB;;OAEG,CAAC,KAAK,EAAE;IACX,MAAM,EAAE,CAAC,EAAE,GAAGC;IACd,MAAM,KAAK,GAAGC;;IAEd,KAAK,CAAC,KAAK;IACX,MAAM,MAAM,GAAG,IAAIC,sBAAW,CAAC;MAC7B,YAAY,CAAC,KAAK;MAClB,KAAK;MACL,KAAK,KAAK,IAAI;MACd,UAAU,EAAE;KACb,CAAC,CAAC;SACE,CAAC,MAAM,GAAG;UACT;;MAEJ,aAAa;;MAEb,cAAc;;MAEd,kBAAkB;;MAElB;UACI;KACL;IACD,MAAM;MACJ,QAAQ;MACR,cAAc;MACd,cAAc;MACd,OAAO;MACP,gBAAgB;MAChB;MACA,SAAS;MACT;MACA,eAAe;MACf;MACA;MACA;MACA;MACA;MACA,WAAW;MACX,QAAQ;MACR;MACA;QACEC,sBAAQ,CAAC;UACP;UACA,OAAO;SACR,CAAC,OAAO,GAAG;SACX,CAAC,KAAK,GAAG;MACZ,OAAO;MACP,WAAW;MACX,QAAQ;MACR;MACA;IACF,MAAM,eAAe,gBAAY,WAAW,CAAC;;MAE3C,OAAO,KAAK,CAAC,SAAS,IAAI,EAAE,oBAAoB,CAAC;;IAEnD,OAAO;MACL,MAAM;MACN,KAAK;MACL;MACA;MACA,OAAO;MACP,SAAS;;MAET,OAAO;MACP,cAAc;;;MAGd,OAAO;MACP,SAAS;;;MAGT;MACA;MACA;MACA,qBAAqB;MACrB,WAAW;MACX;MACA;MACA;MACA;MACA,WAAW;MACX,kBAAkB;MAClB;MACA;MACA,QAAQ;MACR,IAAI;MACJ,CAAC;MACD,cAAc;MACd,OAAO,EAAE,KAAK;MACd,eAAe;MACf,iBAAiB;MACjB;;;;;;"}
|
|
@@ -4,47 +4,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
|
-
const _hoisted_1 = {
|
|
7
|
+
const _hoisted_1 = { class: "el-table__inner-wrapper" };
|
|
8
|
+
const _hoisted_2 = {
|
|
8
9
|
ref: "hiddenColumns",
|
|
9
10
|
class: "hidden-columns"
|
|
10
11
|
};
|
|
11
|
-
const
|
|
12
|
+
const _hoisted_3 = {
|
|
12
13
|
key: 0,
|
|
13
14
|
ref: "headerWrapper",
|
|
14
15
|
class: "el-table__header-wrapper"
|
|
15
16
|
};
|
|
16
|
-
const
|
|
17
|
-
const
|
|
17
|
+
const _hoisted_4 = { class: "el-table__empty-text" };
|
|
18
|
+
const _hoisted_5 = {
|
|
18
19
|
key: 1,
|
|
19
20
|
ref: "appendWrapper",
|
|
20
21
|
class: "el-table__append-wrapper"
|
|
21
22
|
};
|
|
22
|
-
const _hoisted_5 = {
|
|
23
|
-
key: 1,
|
|
24
|
-
ref: "footerWrapper",
|
|
25
|
-
class: "el-table__footer-wrapper"
|
|
26
|
-
};
|
|
27
23
|
const _hoisted_6 = {
|
|
28
|
-
key: 0,
|
|
29
|
-
ref: "fixedHeaderWrapper",
|
|
30
|
-
class: "el-table__fixed-header-wrapper"
|
|
31
|
-
};
|
|
32
|
-
const _hoisted_7 = {
|
|
33
24
|
key: 1,
|
|
34
|
-
|
|
35
|
-
class: "el-table__fixed-footer-wrapper"
|
|
25
|
+
class: "el-table__border-left-patch"
|
|
36
26
|
};
|
|
37
|
-
const
|
|
27
|
+
const _hoisted_7 = {
|
|
38
28
|
key: 0,
|
|
39
|
-
ref: "
|
|
40
|
-
class: "el-
|
|
41
|
-
};
|
|
42
|
-
const _hoisted_9 = {
|
|
43
|
-
key: 1,
|
|
44
|
-
ref: "rightFixedFooterWrapper",
|
|
45
|
-
class: "el-table__fixed-footer-wrapper"
|
|
29
|
+
ref: "footerWrapper",
|
|
30
|
+
class: "el-table__footer-wrapper"
|
|
46
31
|
};
|
|
47
|
-
const
|
|
32
|
+
const _hoisted_8 = {
|
|
48
33
|
ref: "resizeProxy",
|
|
49
34
|
class: "el-table__column-resize-proxy"
|
|
50
35
|
};
|
|
@@ -54,6 +39,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
54
39
|
const _component_table_footer = vue.resolveComponent("table-footer");
|
|
55
40
|
const _directive_mousewheel = vue.resolveDirective("mousewheel");
|
|
56
41
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
42
|
+
ref: "tableWrapper",
|
|
57
43
|
class: vue.normalizeClass([
|
|
58
44
|
{
|
|
59
45
|
"el-table--fit": _ctx.fit,
|
|
@@ -75,168 +61,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75
61
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => _ctx.handleMouseLeave())
|
|
76
62
|
}, [
|
|
77
63
|
vue.createElementVNode("div", _hoisted_1, [
|
|
78
|
-
vue.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
vue.
|
|
82
|
-
ref: "tableHeader",
|
|
83
|
-
border: _ctx.border,
|
|
84
|
-
"default-sort": _ctx.defaultSort,
|
|
85
|
-
store: _ctx.store,
|
|
86
|
-
style: vue.normalizeStyle({
|
|
87
|
-
width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + "px" : ""
|
|
88
|
-
}),
|
|
89
|
-
onSetDragVisible: _ctx.setDragVisible
|
|
90
|
-
}, null, 8, ["border", "default-sort", "store", "style", "onSetDragVisible"])
|
|
91
|
-
])), [
|
|
92
|
-
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
|
|
93
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
94
|
-
vue.createElementVNode("div", {
|
|
95
|
-
ref: "bodyWrapper",
|
|
96
|
-
style: vue.normalizeStyle([_ctx.bodyHeight]),
|
|
97
|
-
class: "el-table__body-wrapper"
|
|
98
|
-
}, [
|
|
99
|
-
vue.createVNode(_component_table_body, {
|
|
100
|
-
context: _ctx.context,
|
|
101
|
-
highlight: _ctx.highlightCurrentRow,
|
|
102
|
-
"row-class-name": _ctx.rowClassName,
|
|
103
|
-
"tooltip-effect": _ctx.tooltipEffect,
|
|
104
|
-
"row-style": _ctx.rowStyle,
|
|
105
|
-
store: _ctx.store,
|
|
106
|
-
stripe: _ctx.stripe,
|
|
107
|
-
style: vue.normalizeStyle({
|
|
108
|
-
width: _ctx.bodyWidth
|
|
109
|
-
})
|
|
110
|
-
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
|
|
111
|
-
_ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
112
|
-
key: 0,
|
|
113
|
-
ref: "emptyBlock",
|
|
114
|
-
style: vue.normalizeStyle(_ctx.emptyBlockStyle),
|
|
115
|
-
class: "el-table__empty-block"
|
|
116
|
-
}, [
|
|
117
|
-
vue.createElementVNode("span", _hoisted_3, [
|
|
118
|
-
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
119
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.emptyText || _ctx.t("el.table.emptyText")), 1)
|
|
120
|
-
])
|
|
121
|
-
])
|
|
122
|
-
], 4)) : vue.createCommentVNode("v-if", true),
|
|
123
|
-
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
124
|
-
vue.renderSlot(_ctx.$slots, "append")
|
|
125
|
-
], 512)) : vue.createCommentVNode("v-if", true)
|
|
126
|
-
], 4),
|
|
127
|
-
_ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
128
|
-
vue.createVNode(_component_table_footer, {
|
|
129
|
-
border: _ctx.border,
|
|
130
|
-
"default-sort": _ctx.defaultSort,
|
|
131
|
-
store: _ctx.store,
|
|
132
|
-
style: vue.normalizeStyle({
|
|
133
|
-
width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + "px" : ""
|
|
134
|
-
}),
|
|
135
|
-
"sum-text": _ctx.sumText || _ctx.t("el.table.sumText"),
|
|
136
|
-
"summary-method": _ctx.summaryMethod
|
|
137
|
-
}, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
|
|
138
|
-
])), [
|
|
139
|
-
[vue.vShow, !_ctx.isEmpty],
|
|
140
|
-
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
|
|
141
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
142
|
-
_ctx.store.states.fixedColumns.value.length > 0 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
143
|
-
key: 2,
|
|
144
|
-
ref: "fixedWrapper",
|
|
145
|
-
style: vue.normalizeStyle([
|
|
146
|
-
{
|
|
147
|
-
width: _ctx.layout.fixedWidth.value ? _ctx.layout.fixedWidth.value + "px" : ""
|
|
148
|
-
},
|
|
149
|
-
_ctx.fixedHeight
|
|
150
|
-
]),
|
|
151
|
-
class: "el-table__fixed"
|
|
152
|
-
}, [
|
|
153
|
-
_ctx.showHeader ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
154
|
-
vue.createVNode(_component_table_header, {
|
|
155
|
-
ref: "fixedTableHeader",
|
|
156
|
-
border: _ctx.border,
|
|
157
|
-
store: _ctx.store,
|
|
158
|
-
style: vue.normalizeStyle({
|
|
159
|
-
width: _ctx.bodyWidth
|
|
160
|
-
}),
|
|
161
|
-
fixed: "left",
|
|
162
|
-
onSetDragVisible: _ctx.setDragVisible
|
|
163
|
-
}, null, 8, ["border", "store", "style", "onSetDragVisible"])
|
|
164
|
-
], 512)) : vue.createCommentVNode("v-if", true),
|
|
165
|
-
vue.createElementVNode("div", {
|
|
166
|
-
ref: "fixedBodyWrapper",
|
|
167
|
-
style: vue.normalizeStyle([
|
|
168
|
-
{
|
|
169
|
-
top: _ctx.layout.headerHeight.value + "px"
|
|
170
|
-
},
|
|
171
|
-
_ctx.fixedBodyHeight
|
|
172
|
-
]),
|
|
173
|
-
class: "el-table__fixed-body-wrapper"
|
|
174
|
-
}, [
|
|
175
|
-
vue.createVNode(_component_table_body, {
|
|
176
|
-
highlight: _ctx.highlightCurrentRow,
|
|
177
|
-
"row-class-name": _ctx.rowClassName,
|
|
178
|
-
"tooltip-effect": _ctx.tooltipEffect,
|
|
179
|
-
"row-style": _ctx.rowStyle,
|
|
180
|
-
store: _ctx.store,
|
|
181
|
-
stripe: _ctx.stripe,
|
|
182
|
-
style: vue.normalizeStyle({
|
|
183
|
-
width: _ctx.bodyWidth
|
|
184
|
-
}),
|
|
185
|
-
fixed: "left"
|
|
186
|
-
}, null, 8, ["highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
|
|
187
|
-
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
188
|
-
key: 0,
|
|
189
|
-
style: vue.normalizeStyle({ height: _ctx.layout.appendHeight.value + "px" }),
|
|
190
|
-
class: "el-table__append-gutter"
|
|
191
|
-
}, null, 4)) : vue.createCommentVNode("v-if", true)
|
|
192
|
-
], 4),
|
|
193
|
-
_ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
194
|
-
vue.createVNode(_component_table_footer, {
|
|
195
|
-
border: _ctx.border,
|
|
196
|
-
store: _ctx.store,
|
|
197
|
-
style: vue.normalizeStyle({
|
|
198
|
-
width: _ctx.bodyWidth
|
|
199
|
-
}),
|
|
200
|
-
"sum-text": _ctx.sumText || _ctx.t("el.table.sumText"),
|
|
201
|
-
"summary-method": _ctx.summaryMethod,
|
|
202
|
-
fixed: "left"
|
|
203
|
-
}, null, 8, ["border", "store", "style", "sum-text", "summary-method"])
|
|
204
|
-
], 512)), [
|
|
205
|
-
[vue.vShow, !_ctx.isEmpty]
|
|
206
|
-
]) : vue.createCommentVNode("v-if", true)
|
|
207
|
-
], 4)), [
|
|
208
|
-
[_directive_mousewheel, _ctx.handleFixedMousewheel]
|
|
209
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
210
|
-
_ctx.store.states.rightFixedColumns.value.length > 0 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
211
|
-
key: 3,
|
|
212
|
-
ref: "rightFixedWrapper",
|
|
213
|
-
style: vue.normalizeStyle([
|
|
214
|
-
{
|
|
215
|
-
width: _ctx.layout.rightFixedWidth.value ? _ctx.layout.rightFixedWidth.value + "px" : "",
|
|
216
|
-
right: _ctx.layout.scrollY.value ? (_ctx.border ? _ctx.layout.gutterWidth : _ctx.layout.gutterWidth || 0) + "px" : ""
|
|
217
|
-
},
|
|
218
|
-
_ctx.fixedHeight
|
|
219
|
-
]),
|
|
220
|
-
class: "el-table__fixed-right"
|
|
221
|
-
}, [
|
|
222
|
-
_ctx.showHeader ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
64
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
65
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
66
|
+
], 512),
|
|
67
|
+
_ctx.showHeader ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
223
68
|
vue.createVNode(_component_table_header, {
|
|
224
|
-
ref: "
|
|
69
|
+
ref: "tableHeader",
|
|
225
70
|
border: _ctx.border,
|
|
71
|
+
"default-sort": _ctx.defaultSort,
|
|
226
72
|
store: _ctx.store,
|
|
227
|
-
style: vue.normalizeStyle(
|
|
228
|
-
width: _ctx.bodyWidth
|
|
229
|
-
}),
|
|
230
|
-
fixed: "right",
|
|
73
|
+
style: vue.normalizeStyle(_ctx.tableBodyStyles),
|
|
231
74
|
onSetDragVisible: _ctx.setDragVisible
|
|
232
|
-
}, null, 8, ["border", "store", "style", "onSetDragVisible"])
|
|
233
|
-
]
|
|
75
|
+
}, null, 8, ["border", "default-sort", "store", "style", "onSetDragVisible"])
|
|
76
|
+
])), [
|
|
77
|
+
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
|
|
78
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
234
79
|
vue.createElementVNode("div", {
|
|
235
|
-
ref: "
|
|
236
|
-
style: vue.normalizeStyle(
|
|
237
|
-
class: "el-
|
|
80
|
+
ref: "bodyWrapper",
|
|
81
|
+
style: vue.normalizeStyle(_ctx.bodyHeight),
|
|
82
|
+
class: "el-table__body-wrapper"
|
|
238
83
|
}, [
|
|
239
84
|
vue.createVNode(_component_table_body, {
|
|
85
|
+
context: _ctx.context,
|
|
240
86
|
highlight: _ctx.highlightCurrentRow,
|
|
241
87
|
"row-class-name": _ctx.rowClassName,
|
|
242
88
|
"tooltip-effect": _ctx.tooltipEffect,
|
|
@@ -245,42 +91,45 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
245
91
|
stripe: _ctx.stripe,
|
|
246
92
|
style: vue.normalizeStyle({
|
|
247
93
|
width: _ctx.bodyWidth
|
|
248
|
-
})
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
94
|
+
})
|
|
95
|
+
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
|
|
96
|
+
_ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
252
97
|
key: 0,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
98
|
+
ref: "emptyBlock",
|
|
99
|
+
style: vue.normalizeStyle(_ctx.emptyBlockStyle),
|
|
100
|
+
class: "el-table__empty-block"
|
|
101
|
+
}, [
|
|
102
|
+
vue.createElementVNode("span", _hoisted_4, [
|
|
103
|
+
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
104
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.computedEmptyText), 1)
|
|
105
|
+
])
|
|
106
|
+
])
|
|
107
|
+
], 4)) : vue.createCommentVNode("v-if", true),
|
|
108
|
+
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
109
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
110
|
+
], 512)) : vue.createCommentVNode("v-if", true)
|
|
256
111
|
], 4),
|
|
257
|
-
_ctx.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
[
|
|
112
|
+
_ctx.border || _ctx.isGroup ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6)) : vue.createCommentVNode("v-if", true),
|
|
113
|
+
_ctx.layout.scrollX.value && _ctx.layout.height.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
114
|
+
key: 2,
|
|
115
|
+
class: "el-table__border-bottom-patch",
|
|
116
|
+
style: vue.normalizeStyle(_ctx.borderBottomPatchStyles)
|
|
117
|
+
}, null, 4)) : vue.createCommentVNode("v-if", true)
|
|
118
|
+
]),
|
|
119
|
+
_ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
120
|
+
vue.createVNode(_component_table_footer, {
|
|
121
|
+
border: _ctx.border,
|
|
122
|
+
"default-sort": _ctx.defaultSort,
|
|
123
|
+
store: _ctx.store,
|
|
124
|
+
style: vue.normalizeStyle(_ctx.tableBodyStyles),
|
|
125
|
+
"sum-text": _ctx.computedSumText,
|
|
126
|
+
"summary-method": _ctx.summaryMethod
|
|
127
|
+
}, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
|
|
128
|
+
])), [
|
|
129
|
+
[vue.vShow, !_ctx.isEmpty],
|
|
130
|
+
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
|
|
273
131
|
]) : vue.createCommentVNode("v-if", true),
|
|
274
|
-
|
|
275
|
-
key: 4,
|
|
276
|
-
ref: "rightFixedPatch",
|
|
277
|
-
style: vue.normalizeStyle({
|
|
278
|
-
width: _ctx.layout.scrollY.value ? _ctx.layout.gutterWidth + "px" : "0",
|
|
279
|
-
height: _ctx.layout.headerHeight.value + "px"
|
|
280
|
-
}),
|
|
281
|
-
class: "el-table__fixed-right-patch"
|
|
282
|
-
}, null, 4)) : vue.createCommentVNode("v-if", true),
|
|
283
|
-
vue.withDirectives(vue.createElementVNode("div", _hoisted_10, null, 512), [
|
|
132
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_8, null, 512), [
|
|
284
133
|
[vue.vShow, _ctx.resizeProxyVisible]
|
|
285
134
|
])
|
|
286
135
|
], 38);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.vue_vue_type_template_id_4a1660ad_lang.js","sources":["../../../../../../packages/components/table/src/table.vue?vue&type=template&id=4a1660ad&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n @mouseleave=\"handleMouseLeave()\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div\n v-if=\"showHeader\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__header-wrapper\"\n >\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n v-mousewheel=\"handleFixedMousewheel\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n v-mousewheel=\"handleFixedMousewheel\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { Mousewheel } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'ElTable',\n directives: {\n Mousewheel,\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n emits: [\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n ],\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocale()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\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 } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n setDragVisible,\n context: table,\n }\n },\n})\n</script>\n"],"names":["_normalizeStyle","_withDirectives"],"mappings":";;;;;;;;EAwBS,KAAI;EAAgB;;;;EAKvB,KAAI;EAEJ;;;;;EAsCE,KAAI;EACJ;;;;EAQF,KAAI;EAEJ;;;;EA2BE,KAAI;EACJ;;;;EA4CA,KAAI;EACJ;;;;EAiCA,KAAI;EACJ;;;;EAuCA,KAAI;EACJ;;;EAyBF,KAAI;EACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvOD;;;;;oBAMiB;;UAKhB;;+BAEiB;;;;;;;;;;;;;;8BASa;;;;QAE3B,OAAOA;iBACE;;;qCAGU;QACnB,KAAK;QACL;QACA,KAAK;;;;;;;;sCAOE;iBACH;;YAEL;;wDACwB,2BAAc;;;;;;oDAGxC;;;;;KASM;;;;;YASH;;;;sBAIQ,kBAAa;;;;;;;;eAKb;;;UACX,KAAI;;;;;;;;;;;;;;;;;;yBAsBM;;;;;UAIV;eACK,EAACA;YACH,KAAK;;;;;;iBAMDA;;;;;;;qBAOK;oCACO;mBACT;;;;;+BAMa;;;;;;;;WAMf;;;;;;;;;oCAYa;;;;sCAXH;;;;;;;+CAiByB;;;;;;;;;;;;;;;UAc3C,KAAK,EAACA;;WAGE;;;;;sCAOS;;;;yBAIPC;;;;;;YAKR;2CACgB;;;;;iCAKC;iCACA;;;;cAId;;;;;;;;sDAOiB;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"table.vue_vue_type_template_id_4a1660ad_lang.js","sources":["../../../../../../packages/components/table/src/table.vue?vue&type=template&id=4a1660ad&lang.js"],"sourcesContent":["<template>\n <div\n ref=\"tableWrapper\"\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n @mouseleave=\"handleMouseLeave()\"\n >\n <div class=\"el-table__inner-wrapper\">\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div\n v-if=\"showHeader\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__header-wrapper\"\n >\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"tableBodyStyles\"\n @set-drag-visible=\"setDragVisible\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"bodyHeight\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ computedEmptyText }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div v-if=\"border || isGroup\" class=\"el-table__border-left-patch\"></div>\n <div\n v-if=\"layout.scrollX.value && layout.height.value\"\n class=\"el-table__border-bottom-patch\"\n :style=\"borderBottomPatchStyles\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"tableBodyStyles\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { Mousewheel } from '@element-plus/directives'\nimport { useLocale } from '@element-plus/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'ElTable',\n directives: {\n Mousewheel,\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n emits: [\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n ],\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocale()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\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 } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n const computedSumText = computed(\n () => props.sumText || t('el.table.sumText')\n )\n\n const computedEmptyText = computed(() => {\n return props.emptyText || t('el.table.emptyText')\n })\n\n return {\n layout,\n store,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n tableBodyStyles,\n emptyBlockStyle,\n borderBottomPatchStyles,\n debouncedUpdateLayout,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n setDragVisible,\n context: table,\n computedSumText,\n computedEmptyText,\n }\n },\n})\n</script>\n"],"names":["_normalizeStyle","_createCommentVNode"],"mappings":";;;;;;;;;EA0BW,KAAI;EAAgB;;;;EAKvB,KAAI;EAEJ;;;;;EAoCE,KAAI;EACJ;;;;EAK0B;;;;EAU9B,KAAI;EAEJ;;;EAaA,KAAI;EACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAvEkB;;;iBAMX;;8BAEY;kCACF;;;;;;;;;;8CAKwB;;;;UAEpC,OAAOA;mBACE;;;uCAGU;UACnB,KAAK;UACL;UACA,KAAK;;;;;;;;wCAOE;mBACH;;cAEL;;;;;;;SAKM,YAAOC;;;;;;;uDAOjB;;0BAEsB;;;;mCAEZ,4BAAuB;;;;KAI3B;;;;;;"}
|