huibo-ui 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{a11y-802de67a.js → a11y-4385c871.js} +17 -2
- package/dist/cjs/a11y-4385c871.js.map +1 -0
- package/dist/cjs/{date-helpers-1ffddc59.js → date-helpers-c05ef385.js} +5 -16
- package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
- package/dist/cjs/hb-alert.cjs.entry.js +2 -1
- package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-calendar.cjs.entry.js +2 -2
- package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-cascader.cjs.entry.js +48 -12
- package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
- package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
- package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
- package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
- package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-color-picker.cjs.entry.js +22 -19
- package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-picker-pane.cjs.entry.js +1 -1
- package/dist/cjs/hb-date-picker.cjs.entry.js +13 -10
- package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/hb-date-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
- package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
- package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-dropdown.cjs.entry.js +27 -15
- package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-empty.cjs.entry.js +1 -1
- package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
- package/dist/cjs/hb-form-item.cjs.entry.js +67 -16
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +115 -7
- package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-image.cjs.entry.js +21 -3
- package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
- package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
- package/dist/cjs/hb-input.cjs.entry.js +3 -2
- package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-link.cjs.entry.js +2 -2
- package/dist/cjs/hb-loading.cjs.entry.js +2 -2
- package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
- package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-menu.cjs.entry.js +2 -2
- package/dist/cjs/hb-message.cjs.entry.js +13 -4
- package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-pagination.cjs.entry.js +8 -5
- package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popconfirm.cjs.entry.js +27 -8
- package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popover.cjs.entry.js +26 -14
- package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-progress.cjs.entry.js +1 -1
- package/dist/cjs/hb-radio.cjs.entry.js +8 -3
- package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-rate.cjs.entry.js +3 -3
- package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-row.cjs.entry.js +2 -2
- package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
- package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-segmented.cjs.entry.js +13 -2
- package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +100 -19
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-slider.cjs.entry.js +6 -12
- package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-space.cjs.entry.js +2 -2
- package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
- package/dist/cjs/hb-step.cjs.entry.js +1 -1
- package/dist/cjs/hb-steps.cjs.entry.js +3 -3
- package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
- package/dist/cjs/hb-switch.cjs.entry.js +3 -3
- package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/hb-table.cjs.entry.js +218 -41
- package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
- package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tag.cjs.entry.js +3 -2
- package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-text.cjs.entry.js +2 -2
- package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
- package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
- package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tooltip.cjs.entry.js +30 -10
- package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tree-select.cjs.entry.js +125 -10
- package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tree.cjs.entry.js +145 -12
- package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
- package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
- package/dist/cjs/huibo-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/transition-59f1da0f.js +34 -0
- package/dist/cjs/transition-59f1da0f.js.map +1 -0
- package/dist/collection/components/Alert/Alert.js +2 -1
- package/dist/collection/components/Alert/Alert.js.map +1 -1
- package/dist/collection/components/Calendar/Calendar.js +2 -2
- package/dist/collection/components/Calendar/Calendar.js.map +1 -1
- package/dist/collection/components/Cascader/Cascader.js +47 -11
- package/dist/collection/components/Cascader/Cascader.js.map +1 -1
- package/dist/collection/components/Checkbox/Checkbox.js +9 -4
- package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
- package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/collection/components/Collapse/Collapse.js +20 -15
- package/dist/collection/components/Collapse/Collapse.js.map +1 -1
- package/dist/collection/components/Collapse/CollapseItem.js +33 -4
- package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
- package/dist/collection/components/ColorPicker/ColorPicker.js +22 -19
- package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/collection/components/ColorPicker/color-picker.css +8 -3
- package/dist/collection/components/DatePicker/DatePicker.js +12 -9
- package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/collection/components/DatePicker/date-picker.css +3 -2
- package/dist/collection/components/Descriptions/descriptions.css +30 -10
- package/dist/collection/components/Dialog/Dialog.js +54 -10
- package/dist/collection/components/Dialog/Dialog.js.map +1 -1
- package/dist/collection/components/Dialog/dialog.css +57 -11
- package/dist/collection/components/Drawer/Drawer.js +34 -3
- package/dist/collection/components/Drawer/Drawer.js.map +1 -1
- package/dist/collection/components/Drawer/drawer.css +207 -17
- package/dist/collection/components/Dropdown/Dropdown.js +28 -13
- package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/collection/components/Dropdown/dropdown.css +24 -2
- package/dist/collection/components/Empty/Empty.js +1 -1
- package/dist/collection/components/FloatButton/FloatButton.js +2 -2
- package/dist/collection/components/Form/Form.js +217 -9
- package/dist/collection/components/Form/Form.js.map +1 -1
- package/dist/collection/components/Form/FormItem.js +126 -18
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Form/form-item.css +8 -2
- package/dist/collection/components/Image/Image.js +24 -3
- package/dist/collection/components/Image/Image.js.map +1 -1
- package/dist/collection/components/ImagePreview/ImagePreview.js +1 -1
- package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
- package/dist/collection/components/Input/Input.js +3 -2
- package/dist/collection/components/Input/Input.js.map +1 -1
- package/dist/collection/components/Input/input.css +1 -2
- package/dist/collection/components/InputNumber/InputNumber.js +6 -6
- package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/collection/components/InputNumber/input-number.css +11 -1
- package/dist/collection/components/InputTag/InputTag.js +2 -2
- package/dist/collection/components/Layout/Layout.js.map +1 -1
- package/dist/collection/components/Layout/Row.js +2 -2
- package/dist/collection/components/Layout/layout.css +1713 -576
- package/dist/collection/components/Link/Link.js +2 -2
- package/dist/collection/components/Loading/Loading.js +2 -2
- package/dist/collection/components/Menu/Menu.js +2 -2
- package/dist/collection/components/Menu/MenuItem.js +34 -5
- package/dist/collection/components/Menu/MenuItem.js.map +1 -1
- package/dist/collection/components/Menu/SubMenu.js +4 -4
- package/dist/collection/components/Message/Message.js +13 -4
- package/dist/collection/components/Message/Message.js.map +1 -1
- package/dist/collection/components/PageHeader/PageHeader.js +1 -1
- package/dist/collection/components/Pagination/Pagination.js +8 -5
- package/dist/collection/components/Pagination/Pagination.js.map +1 -1
- package/dist/collection/components/Popconfirm/Popconfirm.js +28 -6
- package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
- package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
- package/dist/collection/components/Popover/Popover.js +27 -12
- package/dist/collection/components/Popover/Popover.js.map +1 -1
- package/dist/collection/components/Popover/popover.css +49 -8
- package/dist/collection/components/Progress/Progress.js +1 -1
- package/dist/collection/components/Radio/Radio.js +8 -3
- package/dist/collection/components/Radio/Radio.js.map +1 -1
- package/dist/collection/components/Rate/Rate.js +3 -3
- package/dist/collection/components/Rate/Rate.js.map +1 -1
- package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
- package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
- package/dist/collection/components/Segmented/Segmented.js +15 -1
- package/dist/collection/components/Segmented/Segmented.js.map +1 -1
- package/dist/collection/components/Select/Select.js +123 -19
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Select/select.css +0 -1
- package/dist/collection/components/Slider/Slider.js +6 -12
- package/dist/collection/components/Slider/Slider.js.map +1 -1
- package/dist/collection/components/Slider/slider.css +0 -1
- package/dist/collection/components/Space/Space.js +2 -2
- package/dist/collection/components/Statistic/Statistic.js +1 -1
- package/dist/collection/components/Steps/Step.js +1 -1
- package/dist/collection/components/Steps/Steps.js +2 -2
- package/dist/collection/components/Steps/Steps.js.map +1 -1
- package/dist/collection/components/Switch/Switch.js +3 -3
- package/dist/collection/components/Switch/Switch.js.map +1 -1
- package/dist/collection/components/Switch/switch.css +3 -2
- package/dist/collection/components/Table/Table.js +296 -41
- package/dist/collection/components/Table/Table.js.map +1 -1
- package/dist/collection/components/Table/table.css +6 -2
- package/dist/collection/components/Tabs/TabPane.js +1 -1
- package/dist/collection/components/Tabs/Tabs.js +31 -10
- package/dist/collection/components/Tabs/Tabs.js.map +1 -1
- package/dist/collection/components/Tag/Tag.js +3 -2
- package/dist/collection/components/Tag/Tag.js.map +1 -1
- package/dist/collection/components/Text/Text.js +2 -2
- package/dist/collection/components/TimePicker/TimePicker.js +14 -9
- package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
- package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
- package/dist/collection/components/Tooltip/Tooltip.js +31 -8
- package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/collection/components/Tooltip/tooltip.css +24 -2
- package/dist/collection/components/Tree/Tree.js +147 -13
- package/dist/collection/components/Tree/Tree.js.map +1 -1
- package/dist/collection/components/TreeSelect/TreeSelect.js +130 -11
- package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
- package/dist/collection/components/Watermark/Watermark.js +19 -11
- package/dist/collection/components/Watermark/Watermark.js.map +1 -1
- package/dist/collection/utils/a11y.js +15 -1
- package/dist/collection/utils/a11y.js.map +1 -1
- package/dist/collection/utils/date-helpers.js +4 -15
- package/dist/collection/utils/date-helpers.js.map +1 -1
- package/dist/collection/utils/transition.js +29 -0
- package/dist/collection/utils/transition.js.map +1 -0
- package/dist/collection/utils/virtual-scroll.js +39 -0
- package/dist/collection/utils/virtual-scroll.js.map +1 -0
- package/dist/components/hb-alert.js +2 -1
- package/dist/components/hb-alert.js.map +1 -1
- package/dist/components/hb-calendar.js +2 -2
- package/dist/components/hb-calendar.js.map +1 -1
- package/dist/components/hb-cascader.js +48 -12
- package/dist/components/hb-cascader.js.map +1 -1
- package/dist/components/hb-checkbox-group.js +12 -8
- package/dist/components/hb-checkbox-group.js.map +1 -1
- package/dist/components/hb-checkbox.js +9 -4
- package/dist/components/hb-checkbox.js.map +1 -1
- package/dist/components/hb-collapse-item.js +14 -4
- package/dist/components/hb-collapse-item.js.map +1 -1
- package/dist/components/hb-collapse.js +20 -15
- package/dist/components/hb-collapse.js.map +1 -1
- package/dist/components/hb-color-picker.js +22 -19
- package/dist/components/hb-color-picker.js.map +1 -1
- package/dist/components/hb-date-picker-pane.js +1 -1
- package/dist/components/hb-date-picker.js +13 -10
- package/dist/components/hb-date-picker.js.map +1 -1
- package/dist/components/hb-date-range-picker.js +1 -1
- package/dist/components/hb-date-time-picker.js +1 -1
- package/dist/components/hb-descriptions.js.map +1 -1
- package/dist/components/hb-dialog.js +53 -13
- package/dist/components/hb-dialog.js.map +1 -1
- package/dist/components/hb-drawer.js +36 -5
- package/dist/components/hb-drawer.js.map +1 -1
- package/dist/components/hb-dropdown.js +28 -15
- package/dist/components/hb-dropdown.js.map +1 -1
- package/dist/components/hb-empty.js +1 -1
- package/dist/components/hb-float-button.js +2 -2
- package/dist/components/hb-form-item.js +70 -16
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +120 -7
- package/dist/components/hb-form.js.map +1 -1
- package/dist/components/hb-image-preview.js +1 -1
- package/dist/components/hb-image-preview.js.map +1 -1
- package/dist/components/hb-image.js +23 -3
- package/dist/components/hb-image.js.map +1 -1
- package/dist/components/hb-input-number.js +7 -7
- package/dist/components/hb-input-number.js.map +1 -1
- package/dist/components/hb-input-tag.js +2 -2
- package/dist/components/hb-input.js +3 -2
- package/dist/components/hb-input.js.map +1 -1
- package/dist/components/hb-layout.js.map +1 -1
- package/dist/components/hb-link.js +2 -2
- package/dist/components/hb-loading.js +2 -2
- package/dist/components/hb-menu-item.js +15 -5
- package/dist/components/hb-menu-item.js.map +1 -1
- package/dist/components/hb-menu.js +2 -2
- package/dist/components/hb-message.js +13 -4
- package/dist/components/hb-message.js.map +1 -1
- package/dist/components/hb-page-header.js +1 -1
- package/dist/components/hb-pagination.js +8 -5
- package/dist/components/hb-pagination.js.map +1 -1
- package/dist/components/hb-popconfirm.js +28 -8
- package/dist/components/hb-popconfirm.js.map +1 -1
- package/dist/components/hb-popover.js +27 -14
- package/dist/components/hb-popover.js.map +1 -1
- package/dist/components/hb-progress.js +1 -1
- package/dist/components/hb-radio.js +8 -3
- package/dist/components/hb-radio.js.map +1 -1
- package/dist/components/hb-rate.js +3 -3
- package/dist/components/hb-rate.js.map +1 -1
- package/dist/components/hb-row.js +2 -2
- package/dist/components/hb-scrollbar.js +5 -5
- package/dist/components/hb-scrollbar.js.map +1 -1
- package/dist/components/hb-segmented.js +15 -2
- package/dist/components/hb-segmented.js.map +1 -1
- package/dist/components/hb-select.js +105 -20
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-slider.js +6 -12
- package/dist/components/hb-slider.js.map +1 -1
- package/dist/components/hb-space.js +2 -2
- package/dist/components/hb-statistic.js +1 -1
- package/dist/components/hb-step.js +1 -1
- package/dist/components/hb-steps.js +3 -3
- package/dist/components/hb-steps.js.map +1 -1
- package/dist/components/hb-sub-menu.js +5 -5
- package/dist/components/hb-switch.js +3 -3
- package/dist/components/hb-switch.js.map +1 -1
- package/dist/components/hb-tab-pane.js +1 -1
- package/dist/components/hb-table.js +226 -43
- package/dist/components/hb-table.js.map +1 -1
- package/dist/components/hb-tabs.js +31 -10
- package/dist/components/hb-tabs.js.map +1 -1
- package/dist/components/hb-tag.js +3 -2
- package/dist/components/hb-tag.js.map +1 -1
- package/dist/components/hb-text.js +2 -2
- package/dist/components/hb-time-picker.js +14 -9
- package/dist/components/hb-time-picker.js.map +1 -1
- package/dist/components/hb-time-select.js +13 -4
- package/dist/components/hb-time-select.js.map +1 -1
- package/dist/components/hb-tooltip.js +31 -10
- package/dist/components/hb-tooltip.js.map +1 -1
- package/dist/components/hb-tree-select.js +129 -11
- package/dist/components/hb-tree-select.js.map +1 -1
- package/dist/components/hb-tree.js +147 -13
- package/dist/components/hb-tree.js.map +1 -1
- package/dist/components/hb-watermark.js +19 -11
- package/dist/components/hb-watermark.js.map +1 -1
- package/dist/{esm/a11y-f9ab2964.js → components/p-00aa34c8.js} +17 -3
- package/dist/components/p-00aa34c8.js.map +1 -0
- package/dist/components/{p-08b4005c.js → p-e0876aca.js} +5 -16
- package/dist/components/p-e0876aca.js.map +1 -0
- package/dist/components/p-fad66d69.js +32 -0
- package/dist/components/p-fad66d69.js.map +1 -0
- package/dist/{components/p-cc0aeb50.js → esm/a11y-e4cde5b0.js} +17 -3
- package/dist/esm/a11y-e4cde5b0.js.map +1 -0
- package/dist/esm/{date-helpers-44507189.js → date-helpers-259ed2f1.js} +5 -16
- package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
- package/dist/esm/hb-alert.entry.js +2 -1
- package/dist/esm/hb-alert.entry.js.map +1 -1
- package/dist/esm/hb-calendar.entry.js +2 -2
- package/dist/esm/hb-calendar.entry.js.map +1 -1
- package/dist/esm/hb-cascader.entry.js +48 -12
- package/dist/esm/hb-cascader.entry.js.map +1 -1
- package/dist/esm/hb-checkbox-group.entry.js +12 -8
- package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
- package/dist/esm/hb-checkbox.entry.js +9 -4
- package/dist/esm/hb-checkbox.entry.js.map +1 -1
- package/dist/esm/hb-collapse-item.entry.js +13 -4
- package/dist/esm/hb-collapse-item.entry.js.map +1 -1
- package/dist/esm/hb-collapse.entry.js +20 -15
- package/dist/esm/hb-collapse.entry.js.map +1 -1
- package/dist/esm/hb-color-picker.entry.js +22 -19
- package/dist/esm/hb-color-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-picker-pane.entry.js +1 -1
- package/dist/esm/hb-date-picker.entry.js +13 -10
- package/dist/esm/hb-date-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-range-picker.entry.js +1 -1
- package/dist/esm/hb-date-time-picker.entry.js +1 -1
- package/dist/esm/hb-descriptions.entry.js.map +1 -1
- package/dist/esm/hb-dialog.entry.js +51 -12
- package/dist/esm/hb-dialog.entry.js.map +1 -1
- package/dist/esm/hb-drawer.entry.js +34 -4
- package/dist/esm/hb-drawer.entry.js.map +1 -1
- package/dist/esm/hb-dropdown.entry.js +27 -15
- package/dist/esm/hb-dropdown.entry.js.map +1 -1
- package/dist/esm/hb-empty.entry.js +1 -1
- package/dist/esm/hb-float-button.entry.js +2 -2
- package/dist/esm/hb-form-item.entry.js +67 -16
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +115 -7
- package/dist/esm/hb-form.entry.js.map +1 -1
- package/dist/esm/hb-image-preview.entry.js +1 -1
- package/dist/esm/hb-image-preview.entry.js.map +1 -1
- package/dist/esm/hb-image.entry.js +21 -3
- package/dist/esm/hb-image.entry.js.map +1 -1
- package/dist/esm/hb-input-number.entry.js +7 -7
- package/dist/esm/hb-input-number.entry.js.map +1 -1
- package/dist/esm/hb-input-tag.entry.js +2 -2
- package/dist/esm/hb-input.entry.js +3 -2
- package/dist/esm/hb-input.entry.js.map +1 -1
- package/dist/esm/hb-layout.entry.js.map +1 -1
- package/dist/esm/hb-link.entry.js +2 -2
- package/dist/esm/hb-loading.entry.js +2 -2
- package/dist/esm/hb-menu-item.entry.js +14 -5
- package/dist/esm/hb-menu-item.entry.js.map +1 -1
- package/dist/esm/hb-menu.entry.js +2 -2
- package/dist/esm/hb-message.entry.js +13 -4
- package/dist/esm/hb-message.entry.js.map +1 -1
- package/dist/esm/hb-page-header.entry.js +1 -1
- package/dist/esm/hb-pagination.entry.js +8 -5
- package/dist/esm/hb-pagination.entry.js.map +1 -1
- package/dist/esm/hb-popconfirm.entry.js +27 -8
- package/dist/esm/hb-popconfirm.entry.js.map +1 -1
- package/dist/esm/hb-popover.entry.js +26 -14
- package/dist/esm/hb-popover.entry.js.map +1 -1
- package/dist/esm/hb-progress.entry.js +1 -1
- package/dist/esm/hb-radio.entry.js +8 -3
- package/dist/esm/hb-radio.entry.js.map +1 -1
- package/dist/esm/hb-rate.entry.js +3 -3
- package/dist/esm/hb-rate.entry.js.map +1 -1
- package/dist/esm/hb-row.entry.js +2 -2
- package/dist/esm/hb-scrollbar.entry.js +5 -5
- package/dist/esm/hb-scrollbar.entry.js.map +1 -1
- package/dist/esm/hb-segmented.entry.js +13 -2
- package/dist/esm/hb-segmented.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +100 -19
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-slider.entry.js +6 -12
- package/dist/esm/hb-slider.entry.js.map +1 -1
- package/dist/esm/hb-space.entry.js +2 -2
- package/dist/esm/hb-statistic.entry.js +1 -1
- package/dist/esm/hb-step.entry.js +1 -1
- package/dist/esm/hb-steps.entry.js +3 -3
- package/dist/esm/hb-steps.entry.js.map +1 -1
- package/dist/esm/hb-sub-menu.entry.js +5 -5
- package/dist/esm/hb-switch.entry.js +3 -3
- package/dist/esm/hb-switch.entry.js.map +1 -1
- package/dist/esm/hb-tab-pane.entry.js +1 -1
- package/dist/esm/hb-table.entry.js +218 -41
- package/dist/esm/hb-table.entry.js.map +1 -1
- package/dist/esm/hb-tabs.entry.js +31 -10
- package/dist/esm/hb-tabs.entry.js.map +1 -1
- package/dist/esm/hb-tag.entry.js +3 -2
- package/dist/esm/hb-tag.entry.js.map +1 -1
- package/dist/esm/hb-text.entry.js +2 -2
- package/dist/esm/hb-time-picker.entry.js +14 -9
- package/dist/esm/hb-time-picker.entry.js.map +1 -1
- package/dist/esm/hb-time-select.entry.js +13 -4
- package/dist/esm/hb-time-select.entry.js.map +1 -1
- package/dist/esm/hb-tooltip.entry.js +30 -10
- package/dist/esm/hb-tooltip.entry.js.map +1 -1
- package/dist/esm/hb-tree-select.entry.js +125 -10
- package/dist/esm/hb-tree-select.entry.js.map +1 -1
- package/dist/esm/hb-tree.entry.js +145 -12
- package/dist/esm/hb-tree.entry.js.map +1 -1
- package/dist/esm/hb-watermark.entry.js +19 -11
- package/dist/esm/hb-watermark.entry.js.map +1 -1
- package/dist/esm/huibo-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/transition-4295d789.js +32 -0
- package/dist/esm/transition-4295d789.js.map +1 -0
- package/dist/huibo-ui/huibo-ui.esm.js +1 -1
- package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
- package/dist/huibo-ui/p-00aa34c8.js +2 -0
- package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
- package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
- package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-678b4212.entry.js → p-0ddae4e9.entry.js} +2 -2
- package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -1
- package/dist/huibo-ui/{p-f4336be9.entry.js → p-14c3b47b.entry.js} +2 -2
- package/dist/huibo-ui/{p-c50ad398.entry.js → p-193efdc0.entry.js} +2 -2
- package/dist/huibo-ui/{p-735bceef.entry.js → p-1b98152b.entry.js} +2 -2
- package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
- package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
- package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
- package/dist/huibo-ui/{p-0d4b2997.entry.js → p-2bcda1bb.entry.js} +2 -2
- package/dist/huibo-ui/{p-b8d87f7e.entry.js → p-2ca9796a.entry.js} +2 -2
- package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c80f8ace.entry.js → p-2cf5bf20.entry.js} +2 -2
- package/dist/huibo-ui/p-2cf5bf20.entry.js.map +1 -0
- package/dist/huibo-ui/{p-7da14d7c.entry.js → p-3042f986.entry.js} +2 -2
- package/dist/huibo-ui/{p-e039155d.entry.js → p-3dacb26b.entry.js} +2 -2
- package/dist/huibo-ui/{p-a084b8e5.entry.js → p-412ff618.entry.js} +2 -2
- package/dist/huibo-ui/p-4148d875.entry.js +2 -0
- package/dist/huibo-ui/p-4148d875.entry.js.map +1 -0
- package/dist/huibo-ui/{p-6beb5b81.entry.js → p-415295f3.entry.js} +2 -2
- package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
- package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
- package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
- package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
- package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
- package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
- package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
- package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
- package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
- package/dist/huibo-ui/{p-ccd09d5a.entry.js → p-6518c435.entry.js} +2 -2
- package/dist/huibo-ui/{p-1f8db37a.entry.js → p-687d8dff.entry.js} +2 -2
- package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
- package/dist/huibo-ui/p-688460ce.entry.js +2 -0
- package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
- package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
- package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2811e603.entry.js → p-6bfe1954.entry.js} +2 -2
- package/dist/huibo-ui/p-6bfe1954.entry.js.map +1 -0
- package/dist/huibo-ui/{p-e5cbfa9e.entry.js → p-6c23fbd1.entry.js} +2 -2
- package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
- package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -1
- package/dist/huibo-ui/p-6efed295.entry.js +2 -0
- package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
- package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
- package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
- package/dist/huibo-ui/{p-cad57c2d.entry.js → p-7a682c56.entry.js} +2 -2
- package/dist/huibo-ui/{p-a8996d22.entry.js → p-815fc943.entry.js} +2 -2
- package/dist/huibo-ui/{p-af74667d.entry.js → p-89be7973.entry.js} +2 -2
- package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -1
- package/dist/huibo-ui/{p-213b9de7.entry.js → p-8c4415ed.entry.js} +2 -2
- package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
- package/dist/huibo-ui/{p-8fdbd17c.entry.js → p-950e7465.entry.js} +2 -2
- package/dist/huibo-ui/{p-ab9cf0e4.entry.js → p-96cecd21.entry.js} +2 -2
- package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2b4556ff.entry.js → p-98b513cd.entry.js} +2 -2
- package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
- package/dist/huibo-ui/{p-89ea1141.entry.js → p-ac45291c.entry.js} +2 -2
- package/dist/huibo-ui/{p-e10fcfbe.entry.js → p-b105cf76.entry.js} +2 -2
- package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-9a5406f0.entry.js → p-b38802b0.entry.js} +2 -2
- package/dist/huibo-ui/{p-9a5406f0.entry.js.map → p-b38802b0.entry.js.map} +1 -1
- package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
- package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
- package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
- package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
- package/dist/huibo-ui/{p-41d9c846.entry.js → p-b6afe81e.entry.js} +2 -2
- package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
- package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
- package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
- package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
- package/dist/huibo-ui/p-c7713947.entry.js +2 -0
- package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
- package/dist/huibo-ui/{p-33de6878.entry.js → p-c869842c.entry.js} +2 -2
- package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
- package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -1
- package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
- package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
- package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
- package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-f5969181.entry.js → p-dd9c6459.entry.js} +2 -2
- package/dist/huibo-ui/{p-08b4005c.js → p-e0876aca.js} +1 -1
- package/dist/huibo-ui/p-e0876aca.js.map +1 -0
- package/dist/huibo-ui/{p-aa5e5e02.entry.js → p-e1773c93.entry.js} +2 -2
- package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
- package/dist/huibo-ui/{p-626b48f1.entry.js → p-e73c357f.entry.js} +2 -2
- package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
- package/dist/huibo-ui/{p-60532a1f.entry.js → p-e7c73624.entry.js} +2 -2
- package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
- package/dist/huibo-ui/{p-86bdc48a.entry.js → p-e8824b2c.entry.js} +2 -2
- package/dist/huibo-ui/p-e8824b2c.entry.js.map +1 -0
- package/dist/huibo-ui/{p-13010da2.entry.js → p-e9e7abca.entry.js} +2 -2
- package/dist/huibo-ui/{p-f6889710.entry.js → p-ea0823f3.entry.js} +2 -2
- package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-b468858e.entry.js → p-f1f2483f.entry.js} +2 -2
- package/dist/huibo-ui/p-f69599fa.entry.js +2 -0
- package/dist/huibo-ui/p-f69599fa.entry.js.map +1 -0
- package/dist/huibo-ui/p-fad66d69.js +2 -0
- package/dist/huibo-ui/p-fad66d69.js.map +1 -0
- package/dist/huibo-ui/{p-fd8301c6.entry.js → p-fd6831f9.entry.js} +2 -2
- package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
- package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
- package/dist/types/components/Cascader/Cascader.d.ts +12 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
- package/dist/types/components/Collapse/Collapse.d.ts +2 -0
- package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
- package/dist/types/components/Dialog/Dialog.d.ts +13 -1
- package/dist/types/components/Drawer/Drawer.d.ts +4 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +6 -2
- package/dist/types/components/Form/Form.d.ts +59 -0
- package/dist/types/components/Form/FormItem.d.ts +23 -0
- package/dist/types/components/Image/Image.d.ts +6 -0
- package/dist/types/components/Menu/MenuItem.d.ts +8 -1
- package/dist/types/components/Message/Message.d.ts +3 -0
- package/dist/types/components/Popconfirm/Popconfirm.d.ts +6 -2
- package/dist/types/components/Popover/Popover.d.ts +6 -1
- package/dist/types/components/Radio/Radio.d.ts +5 -0
- package/dist/types/components/Segmented/Segmented.d.ts +6 -0
- package/dist/types/components/Select/Select.d.ts +24 -0
- package/dist/types/components/Table/Table.d.ts +110 -9
- package/dist/types/components/Tabs/Tabs.d.ts +6 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/types/components/Tree/Tree.d.ts +24 -0
- package/dist/types/components/TreeSelect/TreeSelect.d.ts +17 -0
- package/dist/types/components/Watermark/Watermark.d.ts +7 -1
- package/dist/types/components.d.ts +188 -6
- package/dist/types/utils/a11y.d.ts +9 -0
- package/dist/types/utils/transition.d.ts +27 -0
- package/dist/types/utils/virtual-scroll.d.ts +38 -0
- package/package.json +1 -1
- package/dist/cjs/a11y-802de67a.js.map +0 -1
- package/dist/cjs/date-helpers-1ffddc59.js.map +0 -1
- package/dist/components/p-08b4005c.js.map +0 -1
- package/dist/components/p-cc0aeb50.js.map +0 -1
- package/dist/esm/a11y-f9ab2964.js.map +0 -1
- package/dist/esm/date-helpers-44507189.js.map +0 -1
- package/dist/huibo-ui/p-08b4005c.js.map +0 -1
- package/dist/huibo-ui/p-1f8db37a.entry.js.map +0 -1
- package/dist/huibo-ui/p-213b9de7.entry.js.map +0 -1
- package/dist/huibo-ui/p-25fd7d5c.entry.js +0 -2
- package/dist/huibo-ui/p-25fd7d5c.entry.js.map +0 -1
- package/dist/huibo-ui/p-2811e603.entry.js.map +0 -1
- package/dist/huibo-ui/p-2943f5d0.entry.js +0 -2
- package/dist/huibo-ui/p-2943f5d0.entry.js.map +0 -1
- package/dist/huibo-ui/p-2b4556ff.entry.js.map +0 -1
- package/dist/huibo-ui/p-33de6878.entry.js.map +0 -1
- package/dist/huibo-ui/p-3807da71.entry.js +0 -2
- package/dist/huibo-ui/p-3807da71.entry.js.map +0 -1
- package/dist/huibo-ui/p-47ef7a86.entry.js +0 -2
- package/dist/huibo-ui/p-47ef7a86.entry.js.map +0 -1
- package/dist/huibo-ui/p-4d34e43e.entry.js +0 -2
- package/dist/huibo-ui/p-4d34e43e.entry.js.map +0 -1
- package/dist/huibo-ui/p-54aa2fd8.entry.js +0 -2
- package/dist/huibo-ui/p-54aa2fd8.entry.js.map +0 -1
- package/dist/huibo-ui/p-60532a1f.entry.js.map +0 -1
- package/dist/huibo-ui/p-626b48f1.entry.js.map +0 -1
- package/dist/huibo-ui/p-639f167d.entry.js +0 -2
- package/dist/huibo-ui/p-639f167d.entry.js.map +0 -1
- package/dist/huibo-ui/p-6beb5b81.entry.js.map +0 -1
- package/dist/huibo-ui/p-735bceef.entry.js.map +0 -1
- package/dist/huibo-ui/p-76519752.entry.js +0 -2
- package/dist/huibo-ui/p-76519752.entry.js.map +0 -1
- package/dist/huibo-ui/p-79af2efa.entry.js +0 -2
- package/dist/huibo-ui/p-79af2efa.entry.js.map +0 -1
- package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
- package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
- package/dist/huibo-ui/p-86bdc48a.entry.js.map +0 -1
- package/dist/huibo-ui/p-8a8443b8.entry.js +0 -2
- package/dist/huibo-ui/p-8a8443b8.entry.js.map +0 -1
- package/dist/huibo-ui/p-8fd788c9.entry.js +0 -2
- package/dist/huibo-ui/p-8fd788c9.entry.js.map +0 -1
- package/dist/huibo-ui/p-92521c31.entry.js +0 -2
- package/dist/huibo-ui/p-92521c31.entry.js.map +0 -1
- package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
- package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
- package/dist/huibo-ui/p-aa5e5e02.entry.js.map +0 -1
- package/dist/huibo-ui/p-ab9cf0e4.entry.js.map +0 -1
- package/dist/huibo-ui/p-b8d87f7e.entry.js.map +0 -1
- package/dist/huibo-ui/p-c6c91664.entry.js +0 -2
- package/dist/huibo-ui/p-c6c91664.entry.js.map +0 -1
- package/dist/huibo-ui/p-c80f8ace.entry.js.map +0 -1
- package/dist/huibo-ui/p-cc0aeb50.js +0 -2
- package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
- package/dist/huibo-ui/p-d79a15b1.entry.js +0 -2
- package/dist/huibo-ui/p-d79a15b1.entry.js.map +0 -1
- package/dist/huibo-ui/p-e10fcfbe.entry.js.map +0 -1
- package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +0 -1
- package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
- package/dist/huibo-ui/p-edbda423.entry.js +0 -2
- package/dist/huibo-ui/p-edbda423.entry.js.map +0 -1
- package/dist/huibo-ui/p-f6889710.entry.js.map +0 -1
- package/dist/huibo-ui/p-f9bb5217.entry.js +0 -2
- package/dist/huibo-ui/p-f9bb5217.entry.js.map +0 -1
- package/dist/huibo-ui/p-fea20295.entry.js +0 -2
- package/dist/huibo-ui/p-fea20295.entry.js.map +0 -1
- /package/dist/huibo-ui/{p-678b4212.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f4336be9.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c50ad398.entry.js.map → p-193efdc0.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-0d4b2997.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-7da14d7c.entry.js.map → p-3042f986.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e039155d.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a084b8e5.entry.js.map → p-412ff618.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-ccd09d5a.entry.js.map → p-6518c435.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-cad57c2d.entry.js.map → p-7a682c56.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a8996d22.entry.js.map → p-815fc943.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-af74667d.entry.js.map → p-89be7973.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8fdbd17c.entry.js.map → p-950e7465.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-89ea1141.entry.js.map → p-ac45291c.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-41d9c846.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f5969181.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-13010da2.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-b468858e.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-fd8301c6.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
|
@@ -16,6 +16,8 @@ const Table = class {
|
|
|
16
16
|
this.hbAction = index.createEvent(this, "hbAction", 7);
|
|
17
17
|
this.hbExpandChange = index.createEvent(this, "hbExpandChange", 7);
|
|
18
18
|
this.hbCellChange = index.createEvent(this, "hbCellChange", 7);
|
|
19
|
+
this.hbPageChange = index.createEvent(this, "hbPageChange", 7);
|
|
20
|
+
this.hbFilterChange = index.createEvent(this, "hbFilterChange", 7);
|
|
19
21
|
}
|
|
20
22
|
/** 数据源 */
|
|
21
23
|
data = [];
|
|
@@ -55,6 +57,13 @@ const Table = class {
|
|
|
55
57
|
treeProps;
|
|
56
58
|
/** 是否开启行内编辑模式(默认关闭)。需列配置 column.editable=true 才对该列生效 */
|
|
57
59
|
editable = false;
|
|
60
|
+
/**
|
|
61
|
+
* 内置分页配置(T1)。传入后 Table 自动对 data 切片并在底部渲染 <hb-pagination>。
|
|
62
|
+
* 不传则不分页(向后兼容)。
|
|
63
|
+
*/
|
|
64
|
+
pagination;
|
|
65
|
+
/** 行 className(函数,按行返回附加 class,T8) */
|
|
66
|
+
rowClassName;
|
|
58
67
|
sortProp = '';
|
|
59
68
|
sortDirection = null;
|
|
60
69
|
currentRow = -1;
|
|
@@ -65,6 +74,12 @@ const Table = class {
|
|
|
65
74
|
expandedRowKeys = [];
|
|
66
75
|
/** 行内编辑:当前正在编辑的单元格 { key, prop },null 表示无 */
|
|
67
76
|
editingCell = null;
|
|
77
|
+
/** T1 分页:内部当前页(非受控时用) */
|
|
78
|
+
internalPage = 1;
|
|
79
|
+
/** T1 分页:内部每页条数(非受控时用) */
|
|
80
|
+
internalPageSize = 10;
|
|
81
|
+
/** T3 筛选:内部筛选状态 { prop: 选中的 value 列表 }(非受控时用) */
|
|
82
|
+
internalFilters = {};
|
|
68
83
|
/** 排序变化事件 */
|
|
69
84
|
hbSortChange;
|
|
70
85
|
/** 行点击事件 */
|
|
@@ -77,10 +92,21 @@ const Table = class {
|
|
|
77
92
|
hbExpandChange;
|
|
78
93
|
/** 行内编辑提交事件 */
|
|
79
94
|
hbCellChange;
|
|
95
|
+
/** T1 分页变化事件 { current, pageSize } */
|
|
96
|
+
hbPageChange;
|
|
97
|
+
/** T3 筛选变化事件 { prop, values } */
|
|
98
|
+
hbFilterChange;
|
|
80
99
|
handleDataChange() {
|
|
81
100
|
this.selectedRows = new Set();
|
|
82
101
|
this.emitSelection();
|
|
83
102
|
}
|
|
103
|
+
handlePaginationChange() {
|
|
104
|
+
// 受控分页:从 pagination.current/pageSize 初始化内部状态
|
|
105
|
+
if (this.pagination) {
|
|
106
|
+
this.internalPage = this.pagination.current ?? this.pagination.defaultCurrent ?? 1;
|
|
107
|
+
this.internalPageSize = this.pagination.pageSize ?? this.pagination.defaultPageSize ?? 10;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
84
110
|
/** 树形模式是否启用(显式传入 treeProps 即启用) */
|
|
85
111
|
get isTreeMode() {
|
|
86
112
|
return !!this.treeProps;
|
|
@@ -91,9 +117,6 @@ const Table = class {
|
|
|
91
117
|
}
|
|
92
118
|
/**
|
|
93
119
|
* 把树拍平成可见行列表:仅保留「祖先链路全部已展开」的后代。
|
|
94
|
-
* @param list 当前层级的数组
|
|
95
|
-
* @param level 当前层级(根 = 0)
|
|
96
|
-
* @param parentKeyPath 父级 key 路径,用于构造深层稳定 key(避免不同分支同 index 撞 key)
|
|
97
120
|
*/
|
|
98
121
|
flattenTree(list, level = 0, parentKeyPath = '') {
|
|
99
122
|
const field = this.childrenField;
|
|
@@ -104,7 +127,6 @@ const Table = class {
|
|
|
104
127
|
const kids = row[field];
|
|
105
128
|
const hasKids = Array.isArray(kids) && kids.length > 0;
|
|
106
129
|
result.push({ row, level, key, hasChildren: hasKids, index: i });
|
|
107
|
-
// 仅当该行已展开时,递归拍入其 children
|
|
108
130
|
if (hasKids && this.expandedRowKeys.indexOf(key) !== -1) {
|
|
109
131
|
result.push(...this.flattenTree(kids, level + 1, keyPath));
|
|
110
132
|
}
|
|
@@ -115,7 +137,7 @@ const Table = class {
|
|
|
115
137
|
toggleExpand = (row, key) => {
|
|
116
138
|
const idx = this.expandedRowKeys.indexOf(key);
|
|
117
139
|
const expanded = idx === -1;
|
|
118
|
-
this.expandedRowKeys = expanded ? [...this.expandedRowKeys, key] : this.expandedRowKeys.filter(
|
|
140
|
+
this.expandedRowKeys = expanded ? [...this.expandedRowKeys, key] : this.expandedRowKeys.filter(k => k !== key);
|
|
119
141
|
this.hbExpandChange.emit({ expanded, row });
|
|
120
142
|
};
|
|
121
143
|
/** 行内编辑:进入编辑态 */
|
|
@@ -129,7 +151,6 @@ const Table = class {
|
|
|
129
151
|
commitEdit = (e, row, prop) => {
|
|
130
152
|
const input = e.target;
|
|
131
153
|
const value = input.value;
|
|
132
|
-
// 就地更新(简单可用版):修改 row[prop] 后强制重渲染
|
|
133
154
|
row[prop] = value;
|
|
134
155
|
this.editingCell = null;
|
|
135
156
|
this.hbCellChange.emit({ row, prop, value });
|
|
@@ -147,7 +168,6 @@ const Table = class {
|
|
|
147
168
|
};
|
|
148
169
|
allCheckboxRef;
|
|
149
170
|
componentDidRender() {
|
|
150
|
-
// indeterminate 不是可反射的 HTML 属性,必须通过 DOM 属性设置
|
|
151
171
|
if (this.allCheckboxRef) {
|
|
152
172
|
this.allCheckboxRef.indeterminate = this.isIndeterminate;
|
|
153
173
|
}
|
|
@@ -178,10 +198,26 @@ const Table = class {
|
|
|
178
198
|
get virtualTotalHeight() {
|
|
179
199
|
return this.data.length * (this.itemHeight > 0 ? this.itemHeight : 1);
|
|
180
200
|
}
|
|
181
|
-
|
|
201
|
+
/**
|
|
202
|
+
* T2:解析某列的有效排序方向。
|
|
203
|
+
* 受控(col.sortOrder 设置)→ 用该值;否则用内部 state(sortProp/sortDirection)。
|
|
204
|
+
*/
|
|
205
|
+
effectiveSortOrder(col) {
|
|
206
|
+
if (col.sortOrder !== undefined)
|
|
207
|
+
return col.sortOrder;
|
|
208
|
+
if (this.sortProp === col.prop)
|
|
209
|
+
return this.sortDirection;
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
handleSort = (col) => {
|
|
213
|
+
const prop = col.prop;
|
|
214
|
+
// T2:受控排序(col.sortOrder 已定义)→ 不内部切换,仅 emit 交外部决策
|
|
215
|
+
if (col.sortOrder !== undefined) {
|
|
216
|
+
this.hbSortChange.emit({ prop, order: col.sortOrder });
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
182
219
|
if (this.sortProp === prop) {
|
|
183
|
-
this.sortDirection =
|
|
184
|
-
this.sortDirection === 'ascending' ? 'descending' : this.sortDirection === 'descending' ? null : 'ascending';
|
|
220
|
+
this.sortDirection = this.sortDirection === 'ascending' ? 'descending' : this.sortDirection === 'descending' ? null : 'ascending';
|
|
185
221
|
}
|
|
186
222
|
else {
|
|
187
223
|
this.sortProp = prop;
|
|
@@ -189,13 +225,38 @@ const Table = class {
|
|
|
189
225
|
}
|
|
190
226
|
this.hbSortChange.emit({ prop, order: this.sortDirection });
|
|
191
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* T2 增强的排序数据:支持 col.sorter 自定义排序函数 + 受控 sortOrder。
|
|
230
|
+
* 多列排序不支持(与 antd 行为一致,取首个有效排序列)。
|
|
231
|
+
*/
|
|
192
232
|
get sortedData() {
|
|
193
|
-
|
|
233
|
+
// 找到当前生效的排序列
|
|
234
|
+
let activeCol;
|
|
235
|
+
let activeOrder = null;
|
|
236
|
+
for (const col of this.columns) {
|
|
237
|
+
if (col.sortable || col.sorter) {
|
|
238
|
+
const order = this.effectiveSortOrder(col);
|
|
239
|
+
if (order) {
|
|
240
|
+
activeCol = col;
|
|
241
|
+
activeOrder = order;
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// 兼容旧逻辑:若没有列级 sortOrder,回退到内部 sortProp/sortDirection
|
|
247
|
+
if (!activeCol && this.sortProp && this.sortDirection) {
|
|
248
|
+
activeOrder = this.sortDirection;
|
|
249
|
+
}
|
|
250
|
+
if (!activeOrder)
|
|
194
251
|
return this.data;
|
|
195
|
-
const direction =
|
|
252
|
+
const direction = activeOrder === 'ascending' ? 1 : -1;
|
|
253
|
+
const sortProp = activeCol ? activeCol.prop : this.sortProp;
|
|
254
|
+
const sorterFn = activeCol && activeCol.sorter;
|
|
196
255
|
return [...this.data].sort((a, b) => {
|
|
197
|
-
|
|
198
|
-
|
|
256
|
+
if (sorterFn)
|
|
257
|
+
return sorterFn(a, b) * direction;
|
|
258
|
+
const va = a[sortProp];
|
|
259
|
+
const vb = b[sortProp];
|
|
199
260
|
if (va < vb)
|
|
200
261
|
return -1 * direction;
|
|
201
262
|
if (va > vb)
|
|
@@ -203,7 +264,72 @@ const Table = class {
|
|
|
203
264
|
return 0;
|
|
204
265
|
});
|
|
205
266
|
}
|
|
206
|
-
|
|
267
|
+
/**
|
|
268
|
+
* T3 筛选:应用所有列的 onFilter。
|
|
269
|
+
* 受控(col.filteredValue 已定义)→ 用该值;否则用内部 internalFilters[prop]。
|
|
270
|
+
*/
|
|
271
|
+
get filteredData() {
|
|
272
|
+
let result = this.sortedData;
|
|
273
|
+
for (const col of this.columns) {
|
|
274
|
+
if (!col.onFilter || !col.filters)
|
|
275
|
+
continue;
|
|
276
|
+
const values = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop];
|
|
277
|
+
if (!values || values.length === 0)
|
|
278
|
+
continue;
|
|
279
|
+
result = result.filter(row => values.some(v => col.onFilter(row, v)));
|
|
280
|
+
}
|
|
281
|
+
return result;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* T1 分页:取当前页数据切片(仅当 pagination 配置时)。
|
|
285
|
+
* 在 sorted+filtered 之后切片。
|
|
286
|
+
*/
|
|
287
|
+
get pagedData() {
|
|
288
|
+
const filtered = this.filteredData;
|
|
289
|
+
if (!this.pagination)
|
|
290
|
+
return filtered;
|
|
291
|
+
const page = this.currentPage;
|
|
292
|
+
const size = this.currentPageSize;
|
|
293
|
+
const start = (page - 1) * size;
|
|
294
|
+
return filtered.slice(start, start + size);
|
|
295
|
+
}
|
|
296
|
+
/** T1:当前页(受控优先) */
|
|
297
|
+
get currentPage() {
|
|
298
|
+
return this.pagination?.current ?? this.internalPage;
|
|
299
|
+
}
|
|
300
|
+
/** T1:当前每页条数(受控优先) */
|
|
301
|
+
get currentPageSize() {
|
|
302
|
+
return this.pagination?.pageSize ?? this.internalPageSize;
|
|
303
|
+
}
|
|
304
|
+
/** T1:分页切换 */
|
|
305
|
+
handlePageChange = (page) => {
|
|
306
|
+
this.internalPage = page;
|
|
307
|
+
this.hbPageChange.emit({ current: page, pageSize: this.currentPageSize });
|
|
308
|
+
};
|
|
309
|
+
/** T1:每页条数切换 */
|
|
310
|
+
handlePageSizeChange = (size) => {
|
|
311
|
+
this.internalPageSize = size;
|
|
312
|
+
// 切条数后回到第一页避免越界
|
|
313
|
+
this.internalPage = 1;
|
|
314
|
+
this.hbPageChange.emit({ current: 1, pageSize: size });
|
|
315
|
+
};
|
|
316
|
+
/** T3:筛选下拉切换某项 */
|
|
317
|
+
handleFilterToggle = (col, value) => {
|
|
318
|
+
const current = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop] || [];
|
|
319
|
+
const next = current.includes(value) ? current.filter(v => v !== value) : [...current, value];
|
|
320
|
+
// 仅内部状态时更新;受控(filteredValue 已定义)则只 emit 交外部
|
|
321
|
+
if (col.filteredValue === undefined) {
|
|
322
|
+
this.internalFilters = { ...this.internalFilters, [col.prop]: next };
|
|
323
|
+
}
|
|
324
|
+
this.hbFilterChange.emit({ prop: col.prop, values: next });
|
|
325
|
+
};
|
|
326
|
+
/** T3:清空某列筛选 */
|
|
327
|
+
handleFilterReset = (col) => {
|
|
328
|
+
if (col.filteredValue === undefined) {
|
|
329
|
+
this.internalFilters = { ...this.internalFilters, [col.prop]: [] };
|
|
330
|
+
}
|
|
331
|
+
this.hbFilterChange.emit({ prop: col.prop, values: [] });
|
|
332
|
+
};
|
|
207
333
|
get isAllSelected() {
|
|
208
334
|
return this.data.length > 0 && this.selectedRows.size === this.data.length;
|
|
209
335
|
}
|
|
@@ -234,7 +360,7 @@ const Table = class {
|
|
|
234
360
|
emitSelection() {
|
|
235
361
|
const selected = Array.from(this.selectedRows)
|
|
236
362
|
.sort((a, b) => a - b)
|
|
237
|
-
.map(
|
|
363
|
+
.map(i => this.data[i])
|
|
238
364
|
.filter(Boolean);
|
|
239
365
|
this.hbSelectionChange.emit(selected);
|
|
240
366
|
}
|
|
@@ -248,8 +374,21 @@ const Table = class {
|
|
|
248
374
|
get hasActions() {
|
|
249
375
|
return !!this.actions && this.actions.length > 0;
|
|
250
376
|
}
|
|
251
|
-
/**
|
|
252
|
-
|
|
377
|
+
/** T3:某列是否有激活筛选 */
|
|
378
|
+
isColumnFiltered(col) {
|
|
379
|
+
const values = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop];
|
|
380
|
+
return !!values && values.length > 0;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* 计算固定列的 sticky 偏移(左侧/右侧累计宽度)。
|
|
384
|
+
* P1 优化:缓存结果,仅当 columns 引用变化时重算。
|
|
385
|
+
*/
|
|
386
|
+
_fixedOffsetsCache = null;
|
|
387
|
+
_fixedOffsetsColumnsRef = null;
|
|
388
|
+
getFixedOffsets() {
|
|
389
|
+
if (this._fixedOffsetsCache && this._fixedOffsetsColumnsRef === this.columns) {
|
|
390
|
+
return this._fixedOffsetsCache;
|
|
391
|
+
}
|
|
253
392
|
const result = {};
|
|
254
393
|
let leftAcc = '0px';
|
|
255
394
|
for (const c of this.columns) {
|
|
@@ -267,10 +406,12 @@ const Table = class {
|
|
|
267
406
|
rightAcc = `calc(${rightAcc} + ${c.width || '0px'})`;
|
|
268
407
|
}
|
|
269
408
|
}
|
|
409
|
+
this._fixedOffsetsCache = result;
|
|
410
|
+
this._fixedOffsetsColumnsRef = this.columns;
|
|
270
411
|
return result;
|
|
271
412
|
}
|
|
272
413
|
cellStyle(prop, base) {
|
|
273
|
-
const off = this.
|
|
414
|
+
const off = this.getFixedOffsets()[prop];
|
|
274
415
|
const style = { ...(base || {}) };
|
|
275
416
|
if (off?.side === 'left') {
|
|
276
417
|
style.position = 'sticky';
|
|
@@ -284,11 +425,18 @@ const Table = class {
|
|
|
284
425
|
}
|
|
285
426
|
return style;
|
|
286
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* 渲染单元格内容(T7:优先 col.render,其次 formatter,最后原值)。
|
|
430
|
+
*/
|
|
431
|
+
renderCell(col, row, rowIndex) {
|
|
432
|
+
if (col.render)
|
|
433
|
+
return col.render(row, rowIndex);
|
|
434
|
+
if (col.formatter)
|
|
435
|
+
return col.formatter(row, rowIndex);
|
|
436
|
+
return row[col.prop] ?? '';
|
|
437
|
+
}
|
|
287
438
|
/**
|
|
288
439
|
* 渲染单行(普通 + 虚拟滚动 + 树形 共用)。
|
|
289
|
-
* - 普通模式:rowIndex 为在 sortedData 中的全局索引。
|
|
290
|
-
* - 树形模式:fr.level 决定缩进,第一列渲染展开箭头,key 取 fr.key。
|
|
291
|
-
* fr 为可选;未传时按普通模式渲染。
|
|
292
440
|
*/
|
|
293
441
|
renderRow(row, rowIndex, fr) {
|
|
294
442
|
const tree = !!fr;
|
|
@@ -296,15 +444,17 @@ const Table = class {
|
|
|
296
444
|
const rowKeyVal = fr ? fr.key : this.rowKey ? row[this.rowKey] : rowIndex;
|
|
297
445
|
const indent = level * 16;
|
|
298
446
|
const isEditing = (prop) => !!this.editingCell && this.editingCell.rowKey === rowKeyVal && this.editingCell.prop === prop;
|
|
447
|
+
// T8:行 className
|
|
448
|
+
const extraRowClass = this.rowClassName ? this.rowClassName(row, rowIndex) : '';
|
|
299
449
|
return (index.h("tr", { key: rowKeyVal, class: {
|
|
300
450
|
'hb-table__row': true,
|
|
301
451
|
'hb-table__row--striped': this.stripe && rowIndex % 2 === 1,
|
|
302
452
|
'hb-table__row--current': this.highlightCurrentRow && rowIndex === this.currentRow,
|
|
303
453
|
'hb-table__row--selected': this.selectedRows.has(rowIndex),
|
|
304
454
|
'hb-table__row--tree': tree,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
455
|
+
[extraRowClass]: !!extraRowClass,
|
|
456
|
+
}, onClick: () => this.handleRowClick(row, rowIndex) }, this.selectable && (index.h("td", { class: "hb-table__selection", onClick: e => e.stopPropagation() }, index.h("input", { type: "checkbox", class: "hb-table__checkbox", checked: this.selectedRows.has(rowIndex), onChange: e => this.toggleRow(rowIndex, e) }))), this.columns.map((col, colIdx) => {
|
|
457
|
+
const off = this.getFixedOffsets()[col.prop];
|
|
308
458
|
const isFirstCol = colIdx === 0;
|
|
309
459
|
const showExpand = tree && isFirstCol && fr.hasChildren;
|
|
310
460
|
const expanded = showExpand && this.expandedRowKeys.indexOf(rowKeyVal) !== -1;
|
|
@@ -315,52 +465,79 @@ const Table = class {
|
|
|
315
465
|
'hb-table__cell--fixed-left': off?.side === 'left',
|
|
316
466
|
'hb-table__cell--fixed-right': off?.side === 'right',
|
|
317
467
|
'hb-table__cell--editable': editableActive,
|
|
318
|
-
|
|
468
|
+
'hb-table__cell--ellipsis': !!col.ellipsis,
|
|
469
|
+
}, onClick: editableActive ? e => this.startEdit(e, rowKeyVal, col.prop) : undefined }, tree && isFirstCol && index.h("span", { class: "hb-table__indent", style: { display: 'inline-block', width: `${indent}px` }, "aria-hidden": "true" }), showExpand && (index.h("button", { type: "button", class: { 'hb-table__expand': true, 'hb-table__expand--expanded': expanded }, "aria-label": expanded ? '收起' : '展开', onClick: e => {
|
|
319
470
|
e.stopPropagation();
|
|
320
471
|
this.toggleExpand(row, rowKeyVal);
|
|
321
|
-
} }, expanded ? '▼' : '▶')), showExpand === false && tree && isFirstCol &&
|
|
322
|
-
|
|
472
|
+
} }, expanded ? '▼' : '▶')), showExpand === false && tree && isFirstCol && index.h("span", { class: "hb-table__expand-placeholder", style: { display: 'inline-block', width: '16px' }, "aria-hidden": "true" }), editing ? (index.h("input", { class: "hb-table__edit-input", type: "text", value: row[col.prop] ?? '', onBlur: e => this.commitEdit(e, row, col.prop), onKeyDown: e => this.onEditKeydown(e, row, col.prop) })) : (
|
|
473
|
+
// T7:col.render 优先(支持返回 JSX);否则 formatter;否则原值
|
|
474
|
+
index.h("slot", { name: `cell-${col.prop}` }, this.renderCell(col, row, rowIndex)))));
|
|
475
|
+
}), this.hasActions && (index.h("td", { class: "hb-table__td--actions", style: { textAlign: 'right', whiteSpace: 'nowrap' }, onClick: e => e.stopPropagation() }, this.actions.map(act => (index.h("button", { type: "button", class: {
|
|
323
476
|
'hb-table__action': true,
|
|
324
477
|
'hb-table__action--primary': act.type === 'primary',
|
|
325
478
|
'hb-table__action--danger': act.type === 'danger',
|
|
326
479
|
}, disabled: act.disabled ? act.disabled(row, rowIndex) : false, onClick: () => this.handleAction(row, rowIndex, act.key) }, act.label)))))));
|
|
327
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* T3:渲染表头某列的筛选下拉。
|
|
483
|
+
*/
|
|
484
|
+
renderColumnFilter = (col) => {
|
|
485
|
+
if (!col.filters || col.filters.length === 0 || !col.onFilter)
|
|
486
|
+
return null;
|
|
487
|
+
const activeValues = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop] || [];
|
|
488
|
+
const filtered = this.isColumnFiltered(col);
|
|
489
|
+
return (index.h("span", { class: "hb-table__filter", onClick: e => e.stopPropagation() }, index.h("details", { class: "hb-table__filter-dropdown" }, index.h("summary", { class: { 'hb-table__filter-trigger': true, 'hb-table__filter-trigger--active': filtered }, "aria-label": "\u7B5B\u9009" }, index.h("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" }))), index.h("div", { class: "hb-table__filter-menu", role: "menu" }, index.h("ul", { class: "hb-table__filter-list" }, col.filters.map(f => {
|
|
490
|
+
const checked = activeValues.includes(f.value);
|
|
491
|
+
return (index.h("li", { class: "hb-table__filter-item", role: "menuitemcheckbox", "aria-checked": checked ? 'true' : 'false' }, index.h("label", { class: "hb-table__filter-label" }, index.h("input", { type: "checkbox", class: "hb-table__filter-checkbox", checked: checked, onChange: () => this.handleFilterToggle(col, f.value) }), index.h("span", null, f.label))));
|
|
492
|
+
})), index.h("div", { class: "hb-table__filter-actions" }, index.h("button", { type: "button", class: "hb-table__filter-reset", onClick: () => this.handleFilterReset(col) }, "\u91CD\u7F6E"))))));
|
|
493
|
+
};
|
|
328
494
|
/** 渲染表头(普通 + 虚拟滚动共用,表头始终固定不随滚) */
|
|
329
495
|
renderHeader() {
|
|
330
|
-
return (index.h("thead", null, index.h("tr", null, this.selectable && (index.h("th", { class: "hb-table__selection" }, index.h("input", { type: "checkbox", class: "hb-table__checkbox", checked: this.isAllSelected, ref:
|
|
496
|
+
return (index.h("thead", null, index.h("tr", null, this.selectable && (index.h("th", { class: "hb-table__selection" }, index.h("input", { type: "checkbox", class: "hb-table__checkbox", checked: this.isAllSelected, ref: el => {
|
|
331
497
|
this.allCheckboxRef = el;
|
|
332
|
-
}, onChange: this.toggleAll }))), this.columns.map(
|
|
333
|
-
const off = this.
|
|
498
|
+
}, onChange: this.toggleAll }))), this.columns.map(col => {
|
|
499
|
+
const off = this.getFixedOffsets()[col.prop];
|
|
500
|
+
// T2:列可排序的条件(sortable 或 sorter)
|
|
501
|
+
const canSort = !!col.sortable || !!col.sorter;
|
|
502
|
+
const order = this.effectiveSortOrder(col);
|
|
334
503
|
return (index.h("th", { key: col.prop, style: this.cellStyle(col.prop, {
|
|
335
504
|
width: col.width,
|
|
336
505
|
minWidth: col.minWidth,
|
|
337
506
|
textAlign: col.align || 'left',
|
|
338
507
|
}), class: {
|
|
339
|
-
'hb-table__th--sortable':
|
|
508
|
+
'hb-table__th--sortable': canSort,
|
|
340
509
|
'hb-table__cell--fixed-left': off?.side === 'left',
|
|
341
510
|
'hb-table__cell--fixed-right': off?.side === 'right',
|
|
342
|
-
}, onClick:
|
|
511
|
+
}, onClick: canSort ? () => this.handleSort(col) : undefined }, index.h("div", { class: "hb-table__th-content" }, index.h("span", null, col.label), canSort && (index.h("span", { class: "hb-table__sort" }, index.h("span", { class: { 'hb-table__sort-icon': true, 'hb-table__sort-icon--active': order === 'ascending' } }, "\u25B2"), index.h("span", { class: { 'hb-table__sort-icon': true, 'hb-table__sort-icon--active': order === 'descending' } }, "\u25BC"))), this.renderColumnFilter(col))));
|
|
343
512
|
}), this.hasActions && (index.h("th", { class: "hb-table__th--actions", style: { textAlign: 'right', whiteSpace: 'nowrap' } }, "\u64CD\u4F5C")))));
|
|
344
513
|
}
|
|
514
|
+
/** T1:渲染内置分页底部栏 */
|
|
515
|
+
renderPagination() {
|
|
516
|
+
if (!this.pagination)
|
|
517
|
+
return null;
|
|
518
|
+
const total = this.filteredData.length;
|
|
519
|
+
const page = this.currentPage;
|
|
520
|
+
const size = this.currentPageSize;
|
|
521
|
+
const totalPages = Math.max(1, Math.ceil(total / size));
|
|
522
|
+
const showTotal = this.pagination.showTotal;
|
|
523
|
+
return (index.h("div", { class: "hb-table__pagination" }, showTotal && index.h("span", { class: "hb-table__pagination-total" }, "\u5171 ", total, " \u6761"), index.h("span", { class: "hb-table__pagination-pages" }, index.h("button", { type: "button", class: "hb-table__pagination-btn", disabled: page <= 1, onClick: () => this.handlePageChange(page - 1), "aria-label": "\u4E0A\u4E00\u9875" }, "\u2039"), index.h("span", { class: "hb-table__pagination-current" }, page, " / ", totalPages), index.h("button", { type: "button", class: "hb-table__pagination-btn", disabled: page >= totalPages, onClick: () => this.handlePageChange(page + 1), "aria-label": "\u4E0B\u4E00\u9875" }, "\u203A")), this.pagination.pageSizes && (index.h("select", { class: "hb-table__pagination-size", onChange: e => this.handlePageSizeChange(parseInt(e.target.value, 10)) }, this.pagination.pageSizes.map(s => (index.h("option", { value: String(s), selected: s === size }, s, " \u6761/\u9875")))))));
|
|
524
|
+
}
|
|
345
525
|
render() {
|
|
346
|
-
|
|
526
|
+
// T1+T2+T3:排序 → 筛选 → 分页 依次应用
|
|
527
|
+
const displayData = this.pagedData;
|
|
347
528
|
const isEmpty = displayData.length === 0;
|
|
348
|
-
// 树形模式:把可见树拍平成带 level 的行列表(仅含已展开链路上的后代)
|
|
349
529
|
const flatRows = this.isTreeMode ? this.flattenTree(displayData) : [];
|
|
350
|
-
// 虚拟滚动:固定高度滚动视口 + 撑高容器 + 仅渲染可见窗口行(绝对定位 offset)
|
|
351
|
-
// 注意:树形 + 虚拟滚动组合较复杂,此处虚拟滚动沿用普通行渲染(不展开树),
|
|
352
|
-
// 保留树形仅在普通模式下生效以降低风险。
|
|
353
530
|
const renderVirtualBody = () => {
|
|
354
531
|
const { startIndex, endIndex } = this.visibleRange;
|
|
355
532
|
const offsetTop = startIndex * (this.itemHeight > 0 ? this.itemHeight : 1);
|
|
356
533
|
return (index.h("div", { class: "hb-table__virtual-viewport", style: { height: `${this.virtualScrollHeight}px`, overflowY: 'auto' }, onScroll: this.handleVirtualScroll }, index.h("div", { class: "hb-table__virtual-spacer", style: { height: `${this.virtualTotalHeight}px`, position: 'relative' } }, index.h("table", { class: "hb-table__table hb-table__table--virtual" }, index.h("tbody", null, isEmpty ? (index.h("tr", null, index.h("td", { colSpan: this.columns.length + (this.selectable ? 1 : 0) + (this.hasActions ? 1 : 0), class: "hb-table__empty" }, this.emptyText))) : (index.h("tr", { style: { height: `${offsetTop}px` }, "aria-hidden": "true" })), displayData.slice(startIndex, endIndex).map((row, i) => this.renderRow(row, startIndex + i)))))));
|
|
357
534
|
};
|
|
358
|
-
// 普通模式:树形启用时按拍平列表渲染(带 level 缩进 + 展开箭头),否则原样按行渲染
|
|
359
535
|
const renderNormalBody = () => (index.h("tbody", null, isEmpty ? (index.h("tr", null, index.h("td", { colSpan: this.columns.length + (this.selectable ? 1 : 0) + (this.hasActions ? 1 : 0), class: "hb-table__empty" }, this.emptyText))) : this.isTreeMode ? (flatRows.map((fr, i) => this.renderRow(fr.row, i, fr))) : (displayData.map((row, rowIndex) => this.renderRow(row, rowIndex)))));
|
|
360
|
-
return (index.h("div", { class: { 'hb-table': true, [`hb-table--${this.size}`]: true, 'hb-table--border': this.border, 'hb-table--virtual': this.virtualScroll } }, this.loading && (index.h("div", { class: "hb-table__loading" }, index.h("div", { class: "hb-table__loading-spinner" }))), this.virtualScroll ? (index.h("div", { class: "hb-table__virtual-wrapper" }, index.h("table", { class: "hb-table__table" }, this.renderHeader()), renderVirtualBody())) : (index.h("div", { class: "hb-table__wrapper", style: this.maxHeight ? { maxHeight: this.maxHeight, overflow: 'auto' } : undefined }, index.h("table", { class: "hb-table__table" }, this.renderHeader(), renderNormalBody())))));
|
|
536
|
+
return (index.h("div", { class: { 'hb-table': true, [`hb-table--${this.size}`]: true, 'hb-table--border': this.border, 'hb-table--virtual': this.virtualScroll, 'hb-table--has-pagination': !!this.pagination } }, this.loading && (index.h("div", { class: "hb-table__loading" }, index.h("div", { class: "hb-table__loading-spinner" }))), this.virtualScroll ? (index.h("div", { class: "hb-table__virtual-wrapper" }, index.h("table", { class: "hb-table__table" }, this.renderHeader()), renderVirtualBody())) : (index.h("div", { class: "hb-table__wrapper", style: this.maxHeight ? { maxHeight: this.maxHeight, overflow: 'auto' } : undefined }, index.h("table", { class: "hb-table__table" }, this.renderHeader(), renderNormalBody()))), this.renderPagination()));
|
|
361
537
|
}
|
|
362
538
|
static get watchers() { return {
|
|
363
|
-
"data": ["handleDataChange"]
|
|
539
|
+
"data": ["handleDataChange"],
|
|
540
|
+
"pagination": ["handlePaginationChange"]
|
|
364
541
|
}; }
|
|
365
542
|
};
|
|
366
543
|
Table.style = HbTableStyle0;
|