huibo-ui 0.3.0 → 0.5.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-904747ff.js → date-helpers-c05ef385.js} +10 -17
- package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
- package/dist/cjs/hb-affix.cjs.entry.js +1 -1
- 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-aside.cjs.entry.js +1 -1
- package/dist/cjs/hb-avatar.cjs.entry.js +1 -1
- package/dist/cjs/hb-backtop.cjs.entry.js +2 -2
- package/dist/cjs/hb-badge.cjs.entry.js +1 -1
- package/dist/cjs/hb-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/hb-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/hb-button.cjs.entry.js +2 -2
- package/dist/cjs/hb-calendar.cjs.entry.js +78 -10
- package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-card.cjs.entry.js +1 -1
- package/dist/cjs/hb-cascader.cjs.entry.js +306 -146
- 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-panel.cjs.entry.js +2 -2
- package/dist/cjs/hb-color-picker.cjs.entry.js +108 -28
- package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-config-provider.cjs.entry.js +1 -1
- package/dist/cjs/hb-container.cjs.entry.js +2 -2
- package/dist/cjs/hb-date-picker-pane.cjs.entry.js +2 -2
- package/dist/cjs/hb-date-picker.cjs.entry.js +90 -9
- package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/hb-date-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/hb-descriptions.cjs.entry.js +2 -2
- 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-divider.cjs.entry.js +2 -2
- 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 +91 -11
- 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-footer.cjs.entry.js +1 -1
- package/dist/cjs/hb-form-item.cjs.entry.js +61 -9
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +13 -8
- package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js +13 -9
- 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 +40 -3
- package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-layout.cjs.entry.js +36 -14
- 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-main.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/hb-menu.cjs.entry.js.map +1 -1
- 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-notification.cjs.entry.js +2 -2
- package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-pagination.cjs.entry.js +24 -8
- package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popconfirm.cjs.entry.js +57 -8
- package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popover.cjs.entry.js +37 -5
- 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 +46 -4
- package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-result.cjs.entry.js +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 +50 -5
- package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +64 -16
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-slider.cjs.entry.js +186 -23
- 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 +30 -9
- 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 +9 -4
- 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 +26 -17
- 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-timeline.cjs.entry.js +1 -1
- package/dist/cjs/hb-tooltip.cjs.entry.js +43 -6
- package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-transfer.cjs.entry.js +2 -2
- package/dist/cjs/hb-tree-select.cjs.entry.js +215 -23
- 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-upload.cjs.entry.js +3 -3
- 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/collection-manifest.json +3 -3
- package/dist/collection/components/Affix/Affix.js +1 -1
- package/dist/collection/components/Alert/Alert.js +2 -1
- package/dist/collection/components/Alert/Alert.js.map +1 -1
- package/dist/collection/components/Avatar/Avatar.js +1 -1
- package/dist/collection/components/Backtop/Backtop.js +2 -2
- package/dist/collection/components/Badge/Badge.js +1 -1
- package/dist/collection/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/collection/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/collection/components/Button/Button.js +2 -2
- package/dist/collection/components/Calendar/Calendar.js +84 -10
- package/dist/collection/components/Calendar/Calendar.js.map +1 -1
- package/dist/collection/components/Calendar/calendar.css +16 -0
- package/dist/collection/components/Card/Card.js +1 -1
- package/dist/collection/components/Cascader/Cascader.js +410 -194
- package/dist/collection/components/Cascader/Cascader.js.map +1 -1
- package/dist/collection/components/Cascader/cascader.css +170 -16
- 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 +109 -28
- package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/collection/components/ColorPicker/color-picker.css +21 -3
- package/dist/collection/components/ColorPickerPanel/ColorPickerPanel.js +2 -2
- package/dist/collection/components/ConfigProvider/ConfigProvider.js +1 -1
- package/dist/collection/components/Container/Aside.js +1 -1
- package/dist/collection/components/Container/Container.js +2 -2
- package/dist/collection/components/Container/Footer.js +1 -1
- package/dist/collection/components/Container/Header.js +1 -1
- package/dist/collection/components/Container/Main.js +1 -1
- package/dist/collection/components/DatePicker/DatePicker.js +94 -12
- package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/collection/components/DatePicker/date-picker.css +63 -2
- package/dist/collection/components/DatePickerPane/DatePickerPane.js +1 -1
- package/dist/collection/components/DateRangePicker/DateRangePicker.js +2 -2
- package/dist/collection/components/DateTimePicker/DateTimePicker.js +2 -2
- package/dist/collection/components/Descriptions/Descriptions.js +1 -1
- package/dist/collection/components/Descriptions/descriptions.css +52 -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/Divider/Divider.js +2 -2
- 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 +103 -12
- package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/collection/components/Dropdown/dropdown.css +26 -3
- 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 +14 -9
- package/dist/collection/components/Form/Form.js.map +1 -1
- package/dist/collection/components/Form/FormItem.js +62 -10
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Form/form-item.css +57 -6
- package/dist/collection/components/Form/form.css +1 -0
- 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 +13 -9
- package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
- package/dist/collection/components/Input/Input.js +39 -2
- package/dist/collection/components/Input/Input.js.map +1 -1
- package/dist/collection/components/Input/input.css +22 -4
- 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 +87 -34
- 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 +1732 -71
- 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/Menu/menu.css +25 -0
- package/dist/collection/components/Message/Message.js +13 -4
- package/dist/collection/components/Message/Message.js.map +1 -1
- package/dist/collection/components/Notification/Notification.js +2 -2
- package/dist/collection/components/PageHeader/PageHeader.js +1 -1
- package/dist/collection/components/Pagination/Pagination.js +26 -7
- package/dist/collection/components/Pagination/Pagination.js.map +1 -1
- package/dist/collection/components/Pagination/pagination.css +23 -0
- package/dist/collection/components/Popconfirm/Popconfirm.js +66 -7
- 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 +46 -4
- 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 +46 -4
- package/dist/collection/components/Rate/Rate.js.map +1 -1
- package/dist/collection/components/Result/Result.js +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 +65 -6
- package/dist/collection/components/Segmented/Segmented.js.map +1 -1
- package/dist/collection/components/Select/Select.js +63 -15
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Select/select.css +50 -5
- package/dist/collection/components/Slider/Slider.js +218 -24
- package/dist/collection/components/Slider/Slider.js.map +1 -1
- package/dist/collection/components/Slider/slider.css +57 -7
- 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 +35 -8
- package/dist/collection/components/Steps/Steps.js.map +1 -1
- package/dist/collection/components/Switch/Switch.js +8 -3
- package/dist/collection/components/Switch/Switch.js.map +1 -1
- package/dist/collection/components/Switch/switch.css +47 -1
- package/dist/collection/components/Table/Table.js +25 -16
- package/dist/collection/components/Table/Table.js.map +1 -1
- package/dist/collection/components/Table/table.css +26 -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/Timeline/Timeline.js +1 -1
- package/dist/collection/components/Tooltip/Tooltip.js +52 -6
- package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/collection/components/Tooltip/tooltip.css +24 -2
- package/dist/collection/components/Transfer/Transfer.js +2 -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 +219 -23
- package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
- package/dist/collection/components/TreeSelect/tree-select.css +41 -7
- package/dist/collection/components/Upload/Upload.js +3 -3
- 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 +9 -16
- 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/components/hb-affix.js +1 -1
- package/dist/components/hb-alert.js +2 -1
- package/dist/components/hb-alert.js.map +1 -1
- package/dist/components/hb-aside.js +1 -1
- package/dist/components/hb-avatar.js +1 -1
- package/dist/components/hb-backtop.js +2 -2
- package/dist/components/hb-badge.js +1 -1
- package/dist/components/hb-breadcrumb-item.js +1 -1
- package/dist/components/hb-breadcrumb.js +1 -1
- package/dist/components/hb-button.js +2 -2
- package/dist/components/hb-calendar.js +80 -11
- package/dist/components/hb-calendar.js.map +1 -1
- package/dist/components/hb-card.js +1 -1
- package/dist/components/hb-cascader.js +309 -146
- 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-panel.js +2 -2
- package/dist/components/hb-color-picker.js +110 -29
- package/dist/components/hb-color-picker.js.map +1 -1
- package/dist/components/hb-config-provider.js +1 -1
- package/dist/components/hb-container.js +2 -2
- package/dist/components/hb-date-picker-pane.js +2 -2
- package/dist/components/hb-date-picker.js +92 -10
- package/dist/components/hb-date-picker.js.map +1 -1
- package/dist/components/hb-date-range-picker.js +3 -3
- package/dist/components/hb-date-time-picker.js +3 -3
- package/dist/components/hb-descriptions.js +2 -2
- 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-divider.js +2 -2
- package/dist/components/hb-drawer.js +36 -5
- package/dist/components/hb-drawer.js.map +1 -1
- package/dist/components/hb-dropdown.js +94 -12
- 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-footer.js +1 -1
- package/dist/components/hb-form-item.js +61 -9
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +13 -8
- package/dist/components/hb-form.js.map +1 -1
- package/dist/components/hb-header.js +1 -1
- package/dist/components/hb-icon.js +1 -89
- package/dist/components/hb-icon.js.map +1 -1
- package/dist/components/hb-image-preview.js +13 -9
- 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 +40 -3
- package/dist/components/hb-input.js.map +1 -1
- package/dist/components/hb-layout.js +36 -14
- 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-main.js +1 -1
- 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 +3 -3
- package/dist/components/hb-menu.js.map +1 -1
- package/dist/components/hb-message.js +13 -4
- package/dist/components/hb-message.js.map +1 -1
- package/dist/components/hb-notification.js +2 -2
- package/dist/components/hb-page-header.js +1 -1
- package/dist/components/hb-pagination.js +28 -10
- package/dist/components/hb-pagination.js.map +1 -1
- package/dist/components/hb-popconfirm.js +58 -8
- package/dist/components/hb-popconfirm.js.map +1 -1
- package/dist/components/hb-popover.js +38 -5
- 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 +46 -4
- package/dist/components/hb-rate.js.map +1 -1
- package/dist/components/hb-result.js +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 +54 -6
- package/dist/components/hb-segmented.js.map +1 -1
- package/dist/components/hb-select.js +64 -16
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-slider.js +191 -24
- 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 +35 -8
- package/dist/components/hb-steps.js.map +1 -1
- package/dist/components/hb-sub-menu.js +5 -5
- package/dist/components/hb-switch.js +9 -4
- package/dist/components/hb-switch.js.map +1 -1
- package/dist/components/hb-tab-pane.js +1 -1
- package/dist/components/hb-table.js +26 -17
- 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-timeline.js +1 -1
- package/dist/components/hb-tooltip.js +44 -6
- package/dist/components/hb-tooltip.js.map +1 -1
- package/dist/components/hb-transfer.js +2 -2
- package/dist/components/hb-tree-select.js +219 -24
- 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-upload.js +3 -3
- package/dist/components/hb-watermark.js +19 -11
- package/dist/components/hb-watermark.js.map +1 -1
- package/dist/components/{p-cc0aeb50.js → p-00aa34c8.js} +17 -3
- package/dist/components/p-00aa34c8.js.map +1 -0
- package/dist/components/p-86d92faf.js +93 -0
- package/dist/components/p-86d92faf.js.map +1 -0
- package/dist/{esm/date-helpers-e4d85a67.js → components/p-e0876aca.js} +10 -17
- 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/esm/{a11y-f9ab2964.js → a11y-e4cde5b0.js} +17 -3
- package/dist/esm/a11y-e4cde5b0.js.map +1 -0
- package/dist/{components/p-cf94cbf6.js → esm/date-helpers-259ed2f1.js} +10 -17
- package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
- package/dist/esm/hb-affix.entry.js +1 -1
- package/dist/esm/hb-alert.entry.js +2 -1
- package/dist/esm/hb-alert.entry.js.map +1 -1
- package/dist/esm/hb-aside.entry.js +1 -1
- package/dist/esm/hb-avatar.entry.js +1 -1
- package/dist/esm/hb-backtop.entry.js +2 -2
- package/dist/esm/hb-badge.entry.js +1 -1
- package/dist/esm/hb-breadcrumb-item.entry.js +1 -1
- package/dist/esm/hb-breadcrumb.entry.js +1 -1
- package/dist/esm/hb-button.entry.js +2 -2
- package/dist/esm/hb-calendar.entry.js +78 -10
- package/dist/esm/hb-calendar.entry.js.map +1 -1
- package/dist/esm/hb-card.entry.js +1 -1
- package/dist/esm/hb-cascader.entry.js +306 -146
- 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-panel.entry.js +2 -2
- package/dist/esm/hb-color-picker.entry.js +108 -28
- package/dist/esm/hb-color-picker.entry.js.map +1 -1
- package/dist/esm/hb-config-provider.entry.js +1 -1
- package/dist/esm/hb-container.entry.js +2 -2
- package/dist/esm/hb-date-picker-pane.entry.js +2 -2
- package/dist/esm/hb-date-picker.entry.js +90 -9
- package/dist/esm/hb-date-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-range-picker.entry.js +3 -3
- package/dist/esm/hb-date-time-picker.entry.js +3 -3
- package/dist/esm/hb-descriptions.entry.js +2 -2
- 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-divider.entry.js +2 -2
- 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 +91 -11
- 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-footer.entry.js +1 -1
- package/dist/esm/hb-form-item.entry.js +61 -9
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +13 -8
- package/dist/esm/hb-form.entry.js.map +1 -1
- package/dist/esm/hb-header.entry.js +1 -1
- package/dist/esm/hb-image-preview.entry.js +13 -9
- 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 +40 -3
- package/dist/esm/hb-input.entry.js.map +1 -1
- package/dist/esm/hb-layout.entry.js +36 -14
- 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-main.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/hb-menu.entry.js.map +1 -1
- package/dist/esm/hb-message.entry.js +13 -4
- package/dist/esm/hb-message.entry.js.map +1 -1
- package/dist/esm/hb-notification.entry.js +2 -2
- package/dist/esm/hb-page-header.entry.js +1 -1
- package/dist/esm/hb-pagination.entry.js +24 -8
- package/dist/esm/hb-pagination.entry.js.map +1 -1
- package/dist/esm/hb-popconfirm.entry.js +57 -8
- package/dist/esm/hb-popconfirm.entry.js.map +1 -1
- package/dist/esm/hb-popover.entry.js +37 -5
- 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 +46 -4
- package/dist/esm/hb-rate.entry.js.map +1 -1
- package/dist/esm/hb-result.entry.js +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 +51 -6
- package/dist/esm/hb-segmented.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +64 -16
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-slider.entry.js +186 -23
- 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 +28 -7
- 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 +9 -4
- 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 +26 -17
- 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-timeline.entry.js +1 -1
- package/dist/esm/hb-tooltip.entry.js +43 -6
- package/dist/esm/hb-tooltip.entry.js.map +1 -1
- package/dist/esm/hb-transfer.entry.js +2 -2
- package/dist/esm/hb-tree-select.entry.js +215 -23
- 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-upload.entry.js +3 -3
- 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.css +1 -1
- 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-02f15843.entry.js +2 -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-f1c084c5.entry.js → p-0ddae4e9.entry.js} +2 -2
- package/dist/huibo-ui/{p-672076c3.entry.js → p-10f6c184.entry.js} +2 -2
- package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -0
- package/dist/huibo-ui/{p-6ac242fe.entry.js → p-14c3b47b.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c80a765.entry.js → p-15db24e9.entry.js} +2 -2
- package/dist/huibo-ui/{p-8b027491.entry.js → p-193efdc0.entry.js} +2 -2
- package/dist/huibo-ui/{p-8d925e3d.entry.js → p-1b0fbe69.entry.js} +2 -2
- package/dist/huibo-ui/{p-85f68526.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-f374d5a3.entry.js → p-20632186.entry.js} +2 -2
- package/dist/huibo-ui/{p-e6f2d71d.entry.js → p-20fc554b.entry.js} +2 -2
- package/dist/huibo-ui/{p-64ca0980.entry.js → p-29092b85.entry.js} +2 -2
- package/dist/huibo-ui/p-29092b85.entry.js.map +1 -0
- package/dist/huibo-ui/p-2bc30b1b.entry.js +2 -0
- package/dist/huibo-ui/p-2bc30b1b.entry.js.map +1 -0
- package/dist/huibo-ui/{p-fd19813c.entry.js → p-2bcda1bb.entry.js} +2 -2
- package/dist/huibo-ui/{p-231a7335.entry.js → p-2ca9796a.entry.js} +2 -2
- package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
- package/dist/huibo-ui/{p-e0768565.entry.js → p-3042f986.entry.js} +2 -2
- package/dist/huibo-ui/{p-be48d2aa.entry.js → p-3dacb26b.entry.js} +2 -2
- package/dist/huibo-ui/{p-6a1ec3ff.entry.js → p-3deff48c.entry.js} +2 -2
- package/dist/huibo-ui/{p-c321c4aa.entry.js → p-412ff618.entry.js} +2 -2
- package/dist/huibo-ui/p-415295f3.entry.js +2 -0
- 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-54a28052.entry.js +2 -0
- package/dist/huibo-ui/p-54a28052.entry.js.map +1 -0
- package/dist/huibo-ui/{p-88127de1.entry.js → p-55cd13eb.entry.js} +2 -2
- package/dist/huibo-ui/{p-58ebb9b3.entry.js → p-5c839288.entry.js} +2 -2
- 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-a042e3d0.entry.js → p-6518c435.entry.js} +2 -2
- package/dist/huibo-ui/p-687d8dff.entry.js +2 -0
- 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-a0015341.entry.js → p-6bfeab80.entry.js} +2 -2
- package/dist/huibo-ui/{p-4001c08d.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 +2 -0
- package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -0
- 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-8b1ae77e.entry.js → p-746a11a3.entry.js} +2 -2
- package/dist/huibo-ui/{p-c3e8893d.entry.js → p-79b24b83.entry.js} +2 -2
- package/dist/huibo-ui/p-79b24b83.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-c922d672.entry.js → p-7a682c56.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c987d57.entry.js → p-7f65dc36.entry.js} +2 -2
- package/dist/huibo-ui/{p-463de26d.entry.js → p-815fc943.entry.js} +2 -2
- package/dist/huibo-ui/{p-d87fc21a.entry.js → p-88a6c905.entry.js} +2 -2
- package/dist/huibo-ui/{p-77017274.entry.js → p-89be7973.entry.js} +2 -2
- package/dist/huibo-ui/p-8a202bc5.entry.js +2 -0
- package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -0
- package/dist/huibo-ui/{p-315feadf.entry.js → p-8c4415ed.entry.js} +2 -2
- package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
- package/dist/huibo-ui/{p-9319c650.entry.js → p-950e7465.entry.js} +2 -2
- package/dist/huibo-ui/{p-6b381d0e.entry.js → p-96cecd21.entry.js} +2 -2
- package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
- package/dist/huibo-ui/{p-710f38de.entry.js → p-98b513cd.entry.js} +2 -2
- package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
- package/dist/huibo-ui/{p-5df47135.entry.js → p-a190ca89.entry.js} +2 -2
- package/dist/huibo-ui/{p-0e65e1bd.entry.js → p-ac18c68b.entry.js} +2 -2
- package/dist/huibo-ui/p-ac18c68b.entry.js.map +1 -0
- package/dist/huibo-ui/{p-d64b91ef.entry.js → p-ac45291c.entry.js} +2 -2
- package/dist/huibo-ui/p-ac45291c.entry.js.map +1 -0
- package/dist/huibo-ui/{p-477d8568.entry.js → p-aeae83af.entry.js} +2 -2
- package/dist/huibo-ui/{p-b489a526.entry.js → p-b06c8020.entry.js} +2 -2
- package/dist/huibo-ui/{p-dfaf7e37.entry.js → p-b105cf76.entry.js} +2 -2
- package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c3e665f6.entry.js → p-b38802b0.entry.js} +2 -2
- package/dist/huibo-ui/p-b38802b0.entry.js.map +1 -0
- 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-e2a8a396.entry.js → p-b6afe81e.entry.js} +2 -2
- package/dist/huibo-ui/{p-2b286698.entry.js → p-b7885d4a.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-e0ab9010.entry.js → p-c869842c.entry.js} +2 -2
- package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
- package/dist/huibo-ui/{p-476527c1.entry.js → p-c8e917db.entry.js} +2 -2
- package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -0
- 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-10c088f3.entry.js → p-d9c7c378.entry.js} +2 -2
- package/dist/huibo-ui/{p-332c8877.entry.js → p-dd9c6459.entry.js} +2 -2
- package/dist/huibo-ui/{p-80aca641.entry.js → p-dfccc7aa.entry.js} +2 -2
- package/dist/huibo-ui/{p-21682e92.entry.js → p-dfd144d8.entry.js} +2 -2
- package/dist/huibo-ui/p-e0876aca.js +2 -0
- package/dist/huibo-ui/p-e0876aca.js.map +1 -0
- package/dist/huibo-ui/p-e1773c93.entry.js +2 -0
- package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
- package/dist/huibo-ui/{p-079a4130.entry.js → p-e3155cd7.entry.js} +2 -2
- package/dist/huibo-ui/{p-59b2e61c.entry.js → p-e73c357f.entry.js} +2 -2
- package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c1b4eacb.entry.js → p-e7c73624.entry.js} +2 -2
- package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
- package/dist/huibo-ui/{p-d7815b4f.entry.js → p-e9e7abca.entry.js} +2 -2
- package/dist/huibo-ui/{p-f81ec512.entry.js → p-ea0823f3.entry.js} +2 -2
- package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2e6584ea.entry.js → p-f1f2483f.entry.js} +2 -2
- package/dist/huibo-ui/{p-465dcb4c.entry.js → p-f2c78699.entry.js} +2 -2
- package/dist/huibo-ui/p-fad66d69.js +2 -0
- package/dist/huibo-ui/p-fad66d69.js.map +1 -0
- package/dist/huibo-ui/{p-4d8b1404.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/Calendar/Calendar.d.ts +13 -1
- package/dist/types/components/Cascader/Cascader.d.ts +80 -90
- 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/ColorPicker/ColorPicker.d.ts +11 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +14 -3
- 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 +18 -1
- package/dist/types/components/Form/Form.d.ts +2 -0
- package/dist/types/components/Form/FormItem.d.ts +10 -0
- package/dist/types/components/Image/Image.d.ts +6 -0
- package/dist/types/components/ImagePreview/ImagePreview.d.ts +5 -1
- package/dist/types/components/Input/Input.d.ts +9 -0
- package/dist/types/components/Layout/Layout.d.ts +20 -10
- package/dist/types/components/Menu/MenuItem.d.ts +8 -1
- package/dist/types/components/Message/Message.d.ts +3 -0
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Popconfirm/Popconfirm.d.ts +16 -0
- package/dist/types/components/Popover/Popover.d.ts +14 -0
- package/dist/types/components/Radio/Radio.d.ts +5 -0
- package/dist/types/components/Rate/Rate.d.ts +7 -0
- package/dist/types/components/Segmented/Segmented.d.ts +18 -1
- package/dist/types/components/Select/Select.d.ts +11 -0
- package/dist/types/components/Slider/Slider.d.ts +27 -1
- package/dist/types/components/Steps/Steps.d.ts +14 -6
- package/dist/types/components/Table/Table.d.ts +8 -2
- package/dist/types/components/Tabs/Tabs.d.ts +6 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +15 -1
- package/dist/types/components/Tree/Tree.d.ts +24 -0
- package/dist/types/components/TreeSelect/TreeSelect.d.ts +26 -0
- package/dist/types/components/Watermark/Watermark.d.ts +7 -1
- package/dist/types/components.d.ts +290 -98
- package/dist/types/utils/a11y.d.ts +9 -0
- package/dist/types/utils/date-helpers.d.ts +1 -1
- package/dist/types/utils/transition.d.ts +27 -0
- package/package.json +8 -2
- package/readme.md +88 -73
- package/dist/cjs/a11y-802de67a.js.map +0 -1
- package/dist/cjs/date-helpers-904747ff.js.map +0 -1
- package/dist/components/p-cc0aeb50.js.map +0 -1
- package/dist/components/p-cf94cbf6.js.map +0 -1
- package/dist/esm/a11y-f9ab2964.js.map +0 -1
- package/dist/esm/date-helpers-e4d85a67.js.map +0 -1
- package/dist/huibo-ui/p-003cee87.entry.js +0 -2
- package/dist/huibo-ui/p-003cee87.entry.js.map +0 -1
- package/dist/huibo-ui/p-0a033738.entry.js +0 -2
- package/dist/huibo-ui/p-0a033738.entry.js.map +0 -1
- package/dist/huibo-ui/p-0bef78ac.entry.js +0 -2
- package/dist/huibo-ui/p-0bef78ac.entry.js.map +0 -1
- package/dist/huibo-ui/p-0e65e1bd.entry.js.map +0 -1
- package/dist/huibo-ui/p-0f189251.entry.js +0 -2
- package/dist/huibo-ui/p-0f189251.entry.js.map +0 -1
- package/dist/huibo-ui/p-1b5acd6d.entry.js +0 -2
- package/dist/huibo-ui/p-1b5acd6d.entry.js.map +0 -1
- package/dist/huibo-ui/p-231a7335.entry.js.map +0 -1
- package/dist/huibo-ui/p-24ad7eec.entry.js +0 -2
- package/dist/huibo-ui/p-24ad7eec.entry.js.map +0 -1
- package/dist/huibo-ui/p-315feadf.entry.js.map +0 -1
- package/dist/huibo-ui/p-3c7f73c8.entry.js +0 -2
- package/dist/huibo-ui/p-3c7f73c8.entry.js.map +0 -1
- package/dist/huibo-ui/p-4001c08d.entry.js.map +0 -1
- package/dist/huibo-ui/p-44c48246.entry.js +0 -2
- package/dist/huibo-ui/p-44c48246.entry.js.map +0 -1
- package/dist/huibo-ui/p-476527c1.entry.js.map +0 -1
- package/dist/huibo-ui/p-4d0dff15.entry.js +0 -2
- package/dist/huibo-ui/p-58d20809.entry.js +0 -2
- package/dist/huibo-ui/p-58d20809.entry.js.map +0 -1
- package/dist/huibo-ui/p-59b2e61c.entry.js.map +0 -1
- package/dist/huibo-ui/p-64ca0980.entry.js.map +0 -1
- package/dist/huibo-ui/p-672076c3.entry.js.map +0 -1
- package/dist/huibo-ui/p-6b381d0e.entry.js.map +0 -1
- package/dist/huibo-ui/p-710f38de.entry.js.map +0 -1
- package/dist/huibo-ui/p-756acbdb.entry.js +0 -2
- package/dist/huibo-ui/p-756acbdb.entry.js.map +0 -1
- package/dist/huibo-ui/p-75a93de3.entry.js +0 -2
- package/dist/huibo-ui/p-75a93de3.entry.js.map +0 -1
- package/dist/huibo-ui/p-769960f4.entry.js +0 -2
- package/dist/huibo-ui/p-769960f4.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-85f68526.entry.js.map +0 -1
- package/dist/huibo-ui/p-8d615521.entry.js +0 -2
- package/dist/huibo-ui/p-8d615521.entry.js.map +0 -1
- package/dist/huibo-ui/p-953b9514.entry.js +0 -2
- package/dist/huibo-ui/p-953b9514.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-ad6b0c6e.entry.js +0 -2
- package/dist/huibo-ui/p-ad6b0c6e.entry.js.map +0 -1
- package/dist/huibo-ui/p-c1a059d9.entry.js +0 -2
- package/dist/huibo-ui/p-c1a059d9.entry.js.map +0 -1
- package/dist/huibo-ui/p-c1b4eacb.entry.js.map +0 -1
- package/dist/huibo-ui/p-c3e665f6.entry.js.map +0 -1
- package/dist/huibo-ui/p-c3e8893d.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-cf94cbf6.js +0 -2
- package/dist/huibo-ui/p-cf94cbf6.js.map +0 -1
- package/dist/huibo-ui/p-d3939d44.entry.js +0 -2
- package/dist/huibo-ui/p-d3939d44.entry.js.map +0 -1
- package/dist/huibo-ui/p-d64b91ef.entry.js.map +0 -1
- package/dist/huibo-ui/p-dd05cb2c.entry.js +0 -2
- package/dist/huibo-ui/p-dd05cb2c.entry.js.map +0 -1
- package/dist/huibo-ui/p-dfaf7e37.entry.js.map +0 -1
- package/dist/huibo-ui/p-e0ab9010.entry.js.map +0 -1
- package/dist/huibo-ui/p-e9490259.entry.js +0 -2
- package/dist/huibo-ui/p-e9490259.entry.js.map +0 -1
- package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
- package/dist/huibo-ui/p-ebd04656.entry.js +0 -2
- package/dist/huibo-ui/p-ebd04656.entry.js.map +0 -1
- package/dist/huibo-ui/p-ed0ff857.entry.js +0 -2
- package/dist/huibo-ui/p-ed0ff857.entry.js.map +0 -1
- package/dist/huibo-ui/p-f0ac7db5.entry.js +0 -2
- package/dist/huibo-ui/p-f0ac7db5.entry.js.map +0 -1
- package/dist/huibo-ui/p-f81ec512.entry.js.map +0 -1
- /package/dist/huibo-ui/{p-4d0dff15.entry.js.map → p-02f15843.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f1c084c5.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6ac242fe.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8c80a765.entry.js.map → p-15db24e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8b027491.entry.js.map → p-193efdc0.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8d925e3d.entry.js.map → p-1b0fbe69.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f374d5a3.entry.js.map → p-20632186.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e6f2d71d.entry.js.map → p-20fc554b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-fd19813c.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e0768565.entry.js.map → p-3042f986.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-be48d2aa.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6a1ec3ff.entry.js.map → p-3deff48c.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c321c4aa.entry.js.map → p-412ff618.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-88127de1.entry.js.map → p-55cd13eb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-58ebb9b3.entry.js.map → p-5c839288.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a042e3d0.entry.js.map → p-6518c435.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a0015341.entry.js.map → p-6bfeab80.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8b1ae77e.entry.js.map → p-746a11a3.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c922d672.entry.js.map → p-7a682c56.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8c987d57.entry.js.map → p-7f65dc36.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-463de26d.entry.js.map → p-815fc943.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d87fc21a.entry.js.map → p-88a6c905.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-77017274.entry.js.map → p-89be7973.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-9319c650.entry.js.map → p-950e7465.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-5df47135.entry.js.map → p-a190ca89.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-477d8568.entry.js.map → p-aeae83af.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-b489a526.entry.js.map → p-b06c8020.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e2a8a396.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-2b286698.entry.js.map → p-b7885d4a.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-10c088f3.entry.js.map → p-d9c7c378.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-332c8877.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-80aca641.entry.js.map → p-dfccc7aa.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-21682e92.entry.js.map → p-dfd144d8.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-079a4130.entry.js.map → p-e3155cd7.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d7815b4f.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-2e6584ea.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-465dcb4c.entry.js.map → p-f2c78699.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-4d8b1404.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
|
@@ -2,114 +2,94 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { createClickOutsideHandler } from "../../utils/click-outside";
|
|
3
3
|
/**
|
|
4
4
|
* Cascader 级联选择器组件
|
|
5
|
-
*
|
|
5
|
+
* 当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。
|
|
6
|
+
* 支持单选 / 多选(multiple)、可选任意层级(checkStrictly)、搜索(filterable)、动态加载(lazy)。
|
|
6
7
|
*/
|
|
7
8
|
export class Cascader {
|
|
8
9
|
el;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* 选中项绑定值。单选为一维路径数组(如 ['zhejiang','hangzhou']),
|
|
12
|
+
* 多选(multiple)为二维数组(如 [['zhejiang','ningbo'], ['jiangsu']])。
|
|
11
13
|
*/
|
|
12
14
|
modelValue;
|
|
13
|
-
/**
|
|
14
|
-
* 可选项数据源
|
|
15
|
-
*/
|
|
15
|
+
/** 可选项数据源 */
|
|
16
16
|
options = [];
|
|
17
|
-
/**
|
|
18
|
-
* 输入框占位文本
|
|
19
|
-
*/
|
|
17
|
+
/** 输入框占位文本 */
|
|
20
18
|
placeholder = '请选择';
|
|
21
|
-
/**
|
|
22
|
-
* 是否禁用
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
19
|
+
/** 是否禁用 */
|
|
25
20
|
disabled = false;
|
|
26
|
-
/**
|
|
27
|
-
* 输入框尺寸
|
|
28
|
-
*/
|
|
21
|
+
/** 输入框尺寸 */
|
|
29
22
|
size = 'default';
|
|
30
|
-
/**
|
|
31
|
-
* 是否可清空
|
|
32
|
-
* @default false
|
|
33
|
-
*/
|
|
23
|
+
/** 是否可清空 */
|
|
34
24
|
clearable = false;
|
|
35
|
-
/**
|
|
36
|
-
* 是否显示完整路径
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
25
|
+
/** 是否显示完整路径(单选输入框 / 多选 tag 文本) */
|
|
39
26
|
showAllLevels = true;
|
|
40
|
-
/**
|
|
41
|
-
* 输入框的原生属性
|
|
42
|
-
*/
|
|
27
|
+
/** 输入框原生属性 */
|
|
43
28
|
name;
|
|
44
|
-
/**
|
|
45
|
-
* 输入框的原生属性
|
|
46
|
-
*/
|
|
29
|
+
/** 输入框原生属性 */
|
|
47
30
|
inputId;
|
|
48
|
-
/**
|
|
49
|
-
* 分隔符
|
|
50
|
-
* @default ' / '
|
|
51
|
-
*/
|
|
31
|
+
/** 路径分隔符 */
|
|
52
32
|
separator = ' / ';
|
|
53
|
-
/**
|
|
54
|
-
* 是否动态加载子节点
|
|
55
|
-
* @default true
|
|
56
|
-
*/
|
|
33
|
+
/** modelValue 是否输出完整路径(保留 AntD 兼容位) */
|
|
57
34
|
emitPath = true;
|
|
58
35
|
/**
|
|
59
|
-
* 是否可搜索(filterable
|
|
60
|
-
*
|
|
61
|
-
* 匹配项以完整路径展示,点击即选中其完整路径。
|
|
62
|
-
* @default false
|
|
36
|
+
* 是否可搜索(filterable)。下拉顶部渲染搜索框,输入时按 label 扁平化过滤,
|
|
37
|
+
* 匹配项以完整路径展示,点击即选中(单选)或 toggle 勾选(多选)。
|
|
63
38
|
*/
|
|
64
39
|
filterable = false;
|
|
65
40
|
/**
|
|
66
|
-
* 是否开启动态加载(lazy
|
|
67
|
-
* 调用 load(node) 获取其子级并填充进 options,加载中显示 loading 态。
|
|
68
|
-
* @default false
|
|
41
|
+
* 是否开启动态加载(lazy)。展开 children=undefined 的节点时调用 load(node) 填充子级。
|
|
69
42
|
*/
|
|
70
43
|
lazy = false;
|
|
44
|
+
/** 动态加载函数(仅 lazy=true 生效) */
|
|
45
|
+
load;
|
|
71
46
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* 加载结果会以不可变方式合并进 options 树(替换该节点 children)。
|
|
47
|
+
* 是否开启多选。开启后 modelValue 为二维数组,每条为一个选中路径;
|
|
48
|
+
* 菜单项前渲染 checkbox,输入框以 tag 列表展示选中项。
|
|
75
49
|
*/
|
|
76
|
-
|
|
77
|
-
isOpen = false;
|
|
78
|
-
inputValue = '';
|
|
79
|
-
searchValue = '';
|
|
50
|
+
multiple = false;
|
|
80
51
|
/**
|
|
81
|
-
*
|
|
52
|
+
* 是否严格的选中行为(父子不关联)。
|
|
53
|
+
* 单选:点击任意层级(含非叶子)即选中该路径;
|
|
54
|
+
* 多选:勾选独立,不向下联动选中叶子、取消也不联动。
|
|
82
55
|
*/
|
|
83
|
-
|
|
56
|
+
checkStrictly = false;
|
|
84
57
|
/**
|
|
85
|
-
*
|
|
86
|
-
* 仅在 filterable 且 searchValue 非空时使用。
|
|
58
|
+
* 多选时输入框最多展示的 tag 数量,超出折叠为 +N(可选)。
|
|
87
59
|
*/
|
|
60
|
+
maxTagCount;
|
|
61
|
+
isOpen = false;
|
|
62
|
+
inputValue = '';
|
|
63
|
+
searchValue = '';
|
|
64
|
+
/** 正在动态加载子级的节点 value 集合 */
|
|
65
|
+
loadingKeys = new Set();
|
|
66
|
+
/** 扁平化搜索结果:每项为根到匹配节点的完整路径 */
|
|
88
67
|
filteredPaths = [];
|
|
89
68
|
activePath = [];
|
|
90
|
-
/**
|
|
91
|
-
* 值改变事件
|
|
92
|
-
*/
|
|
69
|
+
/** 值改变事件:单选 emit 一维路径或 undefined;多选 emit 二维数组(可能为 []) */
|
|
93
70
|
hbChange;
|
|
94
|
-
/**
|
|
95
|
-
* 展开节点发生变化时触发
|
|
96
|
-
*/
|
|
71
|
+
/** 展开节点变化时触发 */
|
|
97
72
|
hbExpandChange;
|
|
98
73
|
clickOutside = createClickOutsideHandler({
|
|
99
74
|
host: null,
|
|
100
75
|
isOpen: () => this.isOpen,
|
|
101
|
-
onClose: () => {
|
|
76
|
+
onClose: () => {
|
|
77
|
+
this.closeAndClearSearch();
|
|
78
|
+
},
|
|
102
79
|
});
|
|
80
|
+
/** P4:搜索结果上限,防止超大树一次返回上万条结果拖垮渲染(封顶替代防抖,避免定时器/测试复杂性) */
|
|
81
|
+
static MAX_FILTER_RESULTS = 200;
|
|
103
82
|
componentDidLoad() {
|
|
104
83
|
this.clickOutside = createClickOutsideHandler({
|
|
105
84
|
host: this.el,
|
|
106
85
|
isOpen: () => this.isOpen,
|
|
107
|
-
onClose: () => {
|
|
86
|
+
onClose: () => {
|
|
87
|
+
this.closeAndClearSearch();
|
|
88
|
+
},
|
|
108
89
|
});
|
|
109
90
|
this.clickOutside.connect();
|
|
110
91
|
this.updateInputValue();
|
|
111
92
|
}
|
|
112
|
-
/** 关闭下拉并清空搜索态(filterable 模式下避免重开时残留搜索结果) */
|
|
113
93
|
closeAndClearSearch() {
|
|
114
94
|
this.isOpen = false;
|
|
115
95
|
this.searchValue = '';
|
|
@@ -122,19 +102,24 @@ export class Cascader {
|
|
|
122
102
|
this.updateInputValue();
|
|
123
103
|
}
|
|
124
104
|
updateInputValue() {
|
|
105
|
+
if (this.multiple) {
|
|
106
|
+
this.inputValue = '';
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
125
109
|
if (!this.modelValue || this.modelValue.length === 0) {
|
|
126
110
|
this.inputValue = '';
|
|
127
111
|
return;
|
|
128
112
|
}
|
|
113
|
+
const mv = this.modelValue;
|
|
129
114
|
if (!this.showAllLevels) {
|
|
130
|
-
const lastValue =
|
|
115
|
+
const lastValue = mv[mv.length - 1];
|
|
131
116
|
const option = this.findOptionByValue(this.options, lastValue);
|
|
132
117
|
this.inputValue = option ? option.label : '';
|
|
133
118
|
return;
|
|
134
119
|
}
|
|
135
120
|
const labels = [];
|
|
136
121
|
let currentOptions = this.options;
|
|
137
|
-
for (const value of
|
|
122
|
+
for (const value of mv) {
|
|
138
123
|
const option = currentOptions.find(opt => opt.value === value);
|
|
139
124
|
if (option) {
|
|
140
125
|
labels.push(option.label);
|
|
@@ -148,9 +133,8 @@ export class Cascader {
|
|
|
148
133
|
}
|
|
149
134
|
findOptionByValue(options, value) {
|
|
150
135
|
for (const option of options) {
|
|
151
|
-
if (option.value === value)
|
|
136
|
+
if (option.value === value)
|
|
152
137
|
return option;
|
|
153
|
-
}
|
|
154
138
|
if (option.children) {
|
|
155
139
|
const found = this.findOptionByValue(option.children, value);
|
|
156
140
|
if (found)
|
|
@@ -159,59 +143,213 @@ export class Cascader {
|
|
|
159
143
|
}
|
|
160
144
|
return null;
|
|
161
145
|
}
|
|
146
|
+
// ===== 多选(multiple)核心算法 =====
|
|
147
|
+
/** 取多选 modelValue 为二维数组(非多选模式或形状不符时返回 []) */
|
|
148
|
+
getMultiModel() {
|
|
149
|
+
if (!this.multiple)
|
|
150
|
+
return [];
|
|
151
|
+
const mv = this.modelValue;
|
|
152
|
+
if (Array.isArray(mv) && mv.length > 0 && Array.isArray(mv[0]))
|
|
153
|
+
return mv;
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* 多选 modelValue 的字符串键集合(P2 优化)。
|
|
158
|
+
* 缓存:仅当 modelValue 引用变化时重算。check-state 查询从 O(model×pathLen)
|
|
159
|
+
* 降为 O(1) Set.has。key 用 \u0000 连接 path 各段,避免与合法分隔符冲突。
|
|
160
|
+
*/
|
|
161
|
+
_modelKeySet = null;
|
|
162
|
+
_modelKeySetRef = null;
|
|
163
|
+
getModelKeySet() {
|
|
164
|
+
if (this._modelKeySet && this._modelKeySetRef === this.modelValue) {
|
|
165
|
+
return this._modelKeySet;
|
|
166
|
+
}
|
|
167
|
+
const set = new Set();
|
|
168
|
+
for (const p of this.getMultiModel()) {
|
|
169
|
+
set.add(p.join('\u0000'));
|
|
170
|
+
}
|
|
171
|
+
this._modelKeySet = set;
|
|
172
|
+
this._modelKeySetRef = this.modelValue;
|
|
173
|
+
return set;
|
|
174
|
+
}
|
|
175
|
+
/** path 是否在当前 model 集合中(O(1)) */
|
|
176
|
+
pathInModel(path) {
|
|
177
|
+
return this.getModelKeySet().has(path.join('\u0000'));
|
|
178
|
+
}
|
|
179
|
+
/** 两条 value 路径是否完全相等 */
|
|
180
|
+
pathEquals(a, b) {
|
|
181
|
+
if (!a || a.length !== b.length)
|
|
182
|
+
return false;
|
|
183
|
+
return a.every((v, i) => v === b[i]);
|
|
184
|
+
}
|
|
185
|
+
/** 收集某节点子树下的全部叶子 value 路径(用于父子联动计算) */
|
|
186
|
+
collectLeafValuePaths(option, basePath) {
|
|
187
|
+
const currentPath = [...basePath, option.value];
|
|
188
|
+
const hasChildren = option.children && option.children.length > 0;
|
|
189
|
+
if (!hasChildren || option.leaf)
|
|
190
|
+
return [currentPath];
|
|
191
|
+
const result = [];
|
|
192
|
+
for (const child of option.children) {
|
|
193
|
+
result.push(...this.collectLeafValuePaths(child, currentPath));
|
|
194
|
+
}
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* 多选模式下某节点的勾选三态。
|
|
199
|
+
* checkStrictly:该节点路径是否在 modelValue(checked / unchecked)。
|
|
200
|
+
* 默认:按叶子计算 —— 全部叶子入选=checked,部分=indeterminate,无=unchecked。
|
|
201
|
+
*/
|
|
202
|
+
getCheckState(option, path) {
|
|
203
|
+
const valuePath = [...path, option.value];
|
|
204
|
+
if (this.checkStrictly) {
|
|
205
|
+
// P2:O(1) Set 查询替代 O(model) 的 some(pathEquals)
|
|
206
|
+
return this.pathInModel(valuePath) ? 'checked' : 'unchecked';
|
|
207
|
+
}
|
|
208
|
+
const leafPaths = this.collectLeafValuePaths(option, path);
|
|
209
|
+
// P2:用 pathInModel(Set.has)替代 model.some(pathEquals),整段从 O(leaves×model) 降为 O(leaves)
|
|
210
|
+
if (leafPaths.every(lp => this.pathInModel(lp)))
|
|
211
|
+
return 'checked';
|
|
212
|
+
if (leafPaths.some(lp => this.pathInModel(lp)))
|
|
213
|
+
return 'indeterminate';
|
|
214
|
+
return 'unchecked';
|
|
215
|
+
}
|
|
216
|
+
/** 多选:toggle 某节点勾选(按 checkStrictly 决定是否联动叶子) */
|
|
217
|
+
handleCheck(option, path) {
|
|
218
|
+
let model = this.getMultiModel().map(p => [...p]);
|
|
219
|
+
const valuePath = [...path, option.value];
|
|
220
|
+
if (this.checkStrictly) {
|
|
221
|
+
const idx = model.findIndex(p => this.pathEquals(p, valuePath));
|
|
222
|
+
if (idx >= 0)
|
|
223
|
+
model.splice(idx, 1);
|
|
224
|
+
else
|
|
225
|
+
model.push(valuePath);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
const leafPaths = this.collectLeafValuePaths(option, path);
|
|
229
|
+
const allIn = leafPaths.every(lp => model.some(p => this.pathEquals(p, lp)));
|
|
230
|
+
if (allIn) {
|
|
231
|
+
model = model.filter(p => !leafPaths.some(lp => this.pathEquals(lp, p)));
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
for (const lp of leafPaths) {
|
|
235
|
+
if (!model.some(p => this.pathEquals(p, lp)))
|
|
236
|
+
model.push([...lp]);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
this.modelValue = model;
|
|
241
|
+
this.hbChange.emit(model);
|
|
242
|
+
}
|
|
243
|
+
/** 多选输入框 tag 数据:每条选中路径 → 展示文本 + 路径 */
|
|
244
|
+
getDisplayTags() {
|
|
245
|
+
return this.getMultiModel().map(path => {
|
|
246
|
+
const labels = path.map(v => {
|
|
247
|
+
const opt = this.findOptionByValue(this.options, v);
|
|
248
|
+
return opt ? opt.label : String(v);
|
|
249
|
+
});
|
|
250
|
+
const label = this.showAllLevels ? labels.join(this.separator) : labels[labels.length - 1];
|
|
251
|
+
return { label, path };
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** 多选:删除单个 tag(移除对应路径) */
|
|
255
|
+
handleTagRemove = (path, e) => {
|
|
256
|
+
e.stopPropagation();
|
|
257
|
+
const model = this.getMultiModel().filter(p => !this.pathEquals(p, path));
|
|
258
|
+
this.modelValue = model;
|
|
259
|
+
this.hbChange.emit(model);
|
|
260
|
+
};
|
|
261
|
+
hasValue() {
|
|
262
|
+
return this.multiple ? this.getMultiModel().length > 0 : !!this.modelValue && this.modelValue.length > 0;
|
|
263
|
+
}
|
|
264
|
+
// ===== 交互 =====
|
|
162
265
|
handleInputClick = () => {
|
|
163
266
|
if (this.disabled)
|
|
164
267
|
return;
|
|
165
268
|
if (this.isOpen) {
|
|
166
|
-
// 关闭时清空搜索态
|
|
167
269
|
this.closeAndClearSearch();
|
|
168
270
|
}
|
|
169
271
|
else {
|
|
170
272
|
this.isOpen = true;
|
|
171
273
|
}
|
|
172
274
|
};
|
|
173
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* 键盘交互(对齐 antd / WAI-ARIA combobox):
|
|
277
|
+
* Enter/Space/ArrowDown 在关闭时打开;Escape 关闭;ArrowRight/ArrowLeft 跨级导航。
|
|
278
|
+
*/
|
|
279
|
+
handleKeyDown = (e) => {
|
|
280
|
+
if (this.disabled)
|
|
281
|
+
return;
|
|
282
|
+
const key = e.key;
|
|
283
|
+
if (!this.isOpen) {
|
|
284
|
+
if (key === 'Enter' || key === ' ' || key === 'ArrowDown') {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
this.isOpen = true;
|
|
287
|
+
}
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (key === 'Escape') {
|
|
291
|
+
e.preventDefault();
|
|
292
|
+
this.closeAndClearSearch();
|
|
293
|
+
}
|
|
294
|
+
else if (key === 'Enter' && this.activePath.length > 0 && !this.multiple) {
|
|
295
|
+
// 选中当前路径末端叶子(若已是叶子)
|
|
296
|
+
e.preventDefault();
|
|
297
|
+
const lastValue = this.activePath[this.activePath.length - 1];
|
|
298
|
+
const parentPath = this.activePath.slice(0, -1);
|
|
299
|
+
this.handleSelect(lastValue, parentPath);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
174
302
|
handleSearchInput = (e) => {
|
|
175
303
|
const target = e.target;
|
|
176
304
|
this.searchValue = target.value;
|
|
305
|
+
// P4:清空时立即返回空;非空时同步过滤但结果数封顶(MAX_FILTER_RESULTS),
|
|
306
|
+
// 避免超大树返回上万条结果拖垮渲染。封顶比防抖更稳妥(不引入定时器与测试复杂性)。
|
|
177
307
|
this.filteredPaths = this.collectFilteredPaths(this.searchValue);
|
|
178
308
|
};
|
|
179
|
-
/**
|
|
180
|
-
* 扁平化全树搜索:把 options 深度遍历,收集所有「节点 label 含关键字」的完整路径。
|
|
181
|
-
* 一个节点的完整路径 = 从根到该节点(含自身)的 CascaderOption 数组。
|
|
182
|
-
* 关键字为空时返回空数组(交由正常级联视图渲染)。
|
|
183
|
-
*
|
|
184
|
-
* 注意:这里按 label 子串匹配(大小写不敏感),匹配任意层级的节点,
|
|
185
|
-
* 并保留其祖先链以便点击时还原完整路径。
|
|
186
|
-
*/
|
|
187
309
|
collectFilteredPaths(keyword) {
|
|
188
310
|
const trimmed = keyword.trim().toLowerCase();
|
|
189
311
|
if (!trimmed)
|
|
190
312
|
return [];
|
|
191
313
|
const results = [];
|
|
314
|
+
const max = Cascader.MAX_FILTER_RESULTS;
|
|
192
315
|
const walk = (opts, ancestors) => {
|
|
316
|
+
// P4:达到上限即停止递归,避免超大树返回过多结果
|
|
317
|
+
if (results.length >= max)
|
|
318
|
+
return;
|
|
193
319
|
for (const opt of opts) {
|
|
320
|
+
if (results.length >= max)
|
|
321
|
+
return;
|
|
194
322
|
const currentPath = [...ancestors, opt];
|
|
195
|
-
if (opt.label.toLowerCase().includes(trimmed))
|
|
323
|
+
if (opt.label.toLowerCase().includes(trimmed))
|
|
196
324
|
results.push(currentPath);
|
|
197
|
-
|
|
198
|
-
if (opt.children && opt.children.length > 0) {
|
|
325
|
+
if (opt.children && opt.children.length > 0)
|
|
199
326
|
walk(opt.children, currentPath);
|
|
200
|
-
}
|
|
201
327
|
}
|
|
202
328
|
};
|
|
203
329
|
walk(this.options, []);
|
|
204
330
|
return results;
|
|
205
331
|
}
|
|
206
|
-
/**
|
|
332
|
+
/** 搜索结果点击:单选选中(叶子或 checkStrictly 任意层),多选 toggle 该路径 */
|
|
207
333
|
handleSearchSelect = (path) => {
|
|
208
|
-
const valuePath = path.map(
|
|
334
|
+
const valuePath = path.map(opt => opt.value);
|
|
335
|
+
if (this.multiple) {
|
|
336
|
+
let model = this.getMultiModel().map(p => [...p]);
|
|
337
|
+
const idx = model.findIndex(p => this.pathEquals(p, valuePath));
|
|
338
|
+
if (idx >= 0)
|
|
339
|
+
model.splice(idx, 1);
|
|
340
|
+
else
|
|
341
|
+
model.push(valuePath);
|
|
342
|
+
this.modelValue = model;
|
|
343
|
+
this.hbChange.emit(model);
|
|
344
|
+
this.searchValue = '';
|
|
345
|
+
this.filteredPaths = [];
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
209
348
|
const last = path[path.length - 1];
|
|
210
349
|
const isLeaf = !last.children || last.children.length === 0 || last.leaf;
|
|
211
350
|
this.searchValue = '';
|
|
212
351
|
this.filteredPaths = [];
|
|
213
|
-
if (isLeaf) {
|
|
214
|
-
// 叶子:选中并关闭
|
|
352
|
+
if (isLeaf || this.checkStrictly) {
|
|
215
353
|
this.modelValue = valuePath;
|
|
216
354
|
this.updateInputValue();
|
|
217
355
|
this.hbChange.emit(valuePath);
|
|
@@ -219,21 +357,42 @@ export class Cascader {
|
|
|
219
357
|
this.activePath = [];
|
|
220
358
|
}
|
|
221
359
|
else {
|
|
222
|
-
// 非叶子:进入该路径的级联展开(便于继续选下级)
|
|
223
360
|
this.activePath = valuePath;
|
|
224
361
|
this.hbExpandChange.emit(valuePath);
|
|
225
362
|
}
|
|
226
363
|
};
|
|
227
364
|
handleClear = (e) => {
|
|
228
365
|
e.stopPropagation();
|
|
229
|
-
this.
|
|
230
|
-
|
|
366
|
+
if (this.multiple) {
|
|
367
|
+
this.modelValue = [];
|
|
368
|
+
this.hbChange.emit([]);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
this.modelValue = undefined;
|
|
372
|
+
this.inputValue = '';
|
|
373
|
+
this.hbChange.emit(undefined);
|
|
374
|
+
}
|
|
231
375
|
this.isOpen = false;
|
|
232
|
-
this.hbChange.emit(undefined);
|
|
233
376
|
};
|
|
234
|
-
|
|
377
|
+
/** 菜单项点击(label 区):多选→叶子 toggle/非叶子展开;单选→handleSelect */
|
|
378
|
+
handleItemClick = (option, path) => {
|
|
379
|
+
if (this.multiple) {
|
|
380
|
+
const isLeaf = !option.children || option.children.length === 0 || option.leaf;
|
|
381
|
+
if (isLeaf) {
|
|
382
|
+
this.handleCheck(option, path);
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
const newPath = [...path, option.value];
|
|
386
|
+
this.activePath = newPath;
|
|
387
|
+
this.hbExpandChange.emit(newPath);
|
|
388
|
+
}
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
this.handleSelect(option.value, path);
|
|
392
|
+
};
|
|
393
|
+
/** 单选:选中(叶子或 checkStrictly 任意层)或展开 / lazy 加载 */
|
|
394
|
+
handleSelect(value, path) {
|
|
235
395
|
const newPath = [...path, value];
|
|
236
|
-
// Find the selected option
|
|
237
396
|
let currentOptions = this.options;
|
|
238
397
|
let selectedOption = null;
|
|
239
398
|
for (const pathValue of newPath) {
|
|
@@ -242,21 +401,16 @@ export class Cascader {
|
|
|
242
401
|
break;
|
|
243
402
|
currentOptions = selectedOption.children || [];
|
|
244
403
|
}
|
|
245
|
-
// lazy + load
|
|
246
|
-
if (this.lazy &&
|
|
247
|
-
this.load &&
|
|
248
|
-
selectedOption &&
|
|
249
|
-
selectedOption.children === undefined &&
|
|
250
|
-
!selectedOption.leaf) {
|
|
251
|
-
// 先展开该路径(显示 loading 态的下一级面板占位),再异步填充
|
|
404
|
+
// lazy + load:children 未加载 → 触发加载
|
|
405
|
+
if (this.lazy && this.load && selectedOption && selectedOption.children === undefined && !selectedOption.leaf) {
|
|
252
406
|
this.activePath = newPath;
|
|
253
407
|
this.hbExpandChange.emit(newPath);
|
|
254
408
|
void this.loadChildren(selectedOption, newPath);
|
|
255
409
|
return;
|
|
256
410
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
411
|
+
const isLeaf = !selectedOption || !selectedOption.children || selectedOption.children.length === 0 || selectedOption.leaf;
|
|
412
|
+
// checkStrictly 或叶子 → 选中并关闭
|
|
413
|
+
if (this.checkStrictly || isLeaf) {
|
|
260
414
|
this.modelValue = newPath;
|
|
261
415
|
this.updateInputValue();
|
|
262
416
|
this.hbChange.emit(newPath);
|
|
@@ -264,29 +418,20 @@ export class Cascader {
|
|
|
264
418
|
this.activePath = [];
|
|
265
419
|
}
|
|
266
420
|
else {
|
|
267
|
-
//
|
|
421
|
+
// 非叶子 → 展开
|
|
268
422
|
this.activePath = newPath;
|
|
269
423
|
this.hbExpandChange.emit(newPath);
|
|
270
424
|
}
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* 动态加载某节点的子级。不可变地合并进 options 树(替换该节点 children)。
|
|
274
|
-
* 加载中:把节点 value 加入 loadingKeys(渲染 loading 态);
|
|
275
|
-
* 加载完成:写入 children(新数组,触发 @Watch/重渲染),移出 loadingKeys。
|
|
276
|
-
* 若 load 返回空数组,把 children 设为 [] 以标记该节点为叶子(避免重复加载)。
|
|
277
|
-
*/
|
|
425
|
+
}
|
|
278
426
|
async loadChildren(node, path) {
|
|
279
427
|
if (!this.load)
|
|
280
428
|
return;
|
|
281
|
-
// 标记 loading
|
|
282
429
|
this.loadingKeys = new Set([...this.loadingKeys, node.value]);
|
|
283
430
|
try {
|
|
284
431
|
const children = await this.load(node);
|
|
285
|
-
// 不可变合并:重建 options 树,仅替换目标节点的 children。
|
|
286
432
|
this.options = this.replaceOptionChildren(this.options, node.value, children);
|
|
287
433
|
}
|
|
288
434
|
catch (err) {
|
|
289
|
-
// 加载失败:回退 activePath,避免卡在 loading;保持 options 不变。
|
|
290
435
|
// eslint-disable-next-line no-console
|
|
291
436
|
console.error('[hb-cascader] lazy load failed:', err);
|
|
292
437
|
this.activePath = this.activePath.slice(0, this.activePath.indexOf(node.value) + 1);
|
|
@@ -296,46 +441,54 @@ export class Cascader {
|
|
|
296
441
|
next.delete(node.value);
|
|
297
442
|
this.loadingKeys = next;
|
|
298
443
|
}
|
|
299
|
-
// 重新校验该路径是否还能继续展开(叶子情况则收起下一级面板)
|
|
300
444
|
void path;
|
|
301
445
|
void node;
|
|
302
446
|
}
|
|
303
|
-
/**
|
|
304
|
-
* 不可变地替换 options 树中 value===targetValue 节点的 children 字段。
|
|
305
|
-
* 返回一棵全新的 options 树(不修改原数组与原节点对象)。
|
|
306
|
-
*/
|
|
307
447
|
replaceOptionChildren(options, targetValue, newChildren) {
|
|
308
|
-
return options.map(
|
|
309
|
-
if (opt.value === targetValue)
|
|
448
|
+
return options.map(opt => {
|
|
449
|
+
if (opt.value === targetValue)
|
|
310
450
|
return { ...opt, children: newChildren };
|
|
311
|
-
}
|
|
312
451
|
if (opt.children && opt.children.length > 0) {
|
|
313
452
|
return { ...opt, children: this.replaceOptionChildren(opt.children, targetValue, newChildren) };
|
|
314
453
|
}
|
|
315
454
|
return opt;
|
|
316
455
|
});
|
|
317
456
|
}
|
|
457
|
+
// ===== render =====
|
|
318
458
|
render() {
|
|
319
|
-
|
|
459
|
+
// P3:getDisplayTags() 涉及全树递归,单次 render 仅算一次,避免 3 次重复递归。
|
|
460
|
+
const displayTags = this.multiple ? this.getDisplayTags() : [];
|
|
461
|
+
const visibleTags = this.maxTagCount === undefined ? displayTags : displayTags.slice(0, this.maxTagCount);
|
|
462
|
+
const overflowCount = this.maxTagCount !== undefined ? Math.max(0, displayTags.length - this.maxTagCount) : 0;
|
|
463
|
+
return (h("div", { key: 'bb73a58c2631b45200fa7e4e317660efe6683f8e', class: {
|
|
320
464
|
'hb-cascader': true,
|
|
321
465
|
'hb-cascader--open': this.isOpen,
|
|
322
466
|
'hb-cascader--disabled': this.disabled,
|
|
467
|
+
'hb-cascader--multiple': this.multiple,
|
|
323
468
|
[`hb-cascader--${this.size}`]: true,
|
|
324
|
-
} }, h("div", { key: '
|
|
469
|
+
} }, h("div", { key: '3c0dd3a737b533c32ed86fc0c3c5454e9bcc46d6', class: "hb-cascader__input-wrapper", onClick: this.handleInputClick }, this.multiple &&
|
|
470
|
+
visibleTags.map(tag => (h("span", { class: "hb-cascader__tag" }, h("span", { class: "hb-cascader__tag-label" }, tag.label), !this.disabled && (h("span", { class: "hb-cascader__tag-close", role: "button", "aria-label": "\u5220\u9664", tabindex: 0, onClick: e => this.handleTagRemove(tag.path, e), onKeyDown: e => {
|
|
471
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
472
|
+
e.preventDefault();
|
|
473
|
+
this.handleTagRemove(tag.path, e);
|
|
474
|
+
}
|
|
475
|
+
} }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M6 6l12 12M18 6L6 18" }))))))), this.multiple && overflowCount > 0 && h("span", { key: 'd598659ffcb4c0e1085da1476413fedc561c3017', class: "hb-cascader__tag-overflow" }, "+", overflowCount), h("input", { key: 'd171dc3467e238cfcd2de761bc5ff99d66765b1c', type: "text", id: this.inputId, name: this.name, class: "hb-cascader__input", placeholder: this.hasValue() ? '' : this.placeholder, value: this.multiple ? '' : this.inputValue, disabled: this.disabled, readonly: true, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', onKeyDown: this.handleKeyDown }), h("span", { key: '3b9492164b342fabeaa901be0f5b82079288c6eb', class: "hb-cascader__suffix" }, this.clearable && this.hasValue() && (h("span", { key: 'fad80bdcab2dc2f6cc0550fdde2626159994606d', class: "hb-cascader__clear", role: "button", "aria-label": "\u6E05\u7A7A", tabindex: 0, onClick: this.handleClear, onKeyDown: e => {
|
|
476
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
477
|
+
e.preventDefault();
|
|
478
|
+
this.handleClear(e);
|
|
479
|
+
}
|
|
480
|
+
} }, h("svg", { key: '14104b827fc9406fb6e6fd670c3401135f786d27', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: '8b25d28b878f237d610c430625abef6990490289', d: "M6 6l12 12M18 6L6 18" })))), h("span", { key: '5948e9fd65445aae63db23c868d3e0b773d35f8b', class: "hb-cascader__arrow", "aria-hidden": "true" }, h("svg", { key: '81c42e2f49f5ef433288e1a810a42ab2d60557dc', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '0960e7b2391417d4ca98ff0b2b2e4629b4456285', d: "M6 9l6 6 6-6" }))))), this.isOpen && (h("div", { key: '98e0dbb48d9c6b4e372fdea3f1dfddc4eabf0d0f', class: "hb-cascader__dropdown" }, this.filterable && (h("div", { key: '8c8a620342182941a98222139d2d156ef81f0e30', class: "hb-cascader__search" }, h("input", { key: 'f6efd8233131cbfb4eda6beaacd4cec908f2e944', type: "text", class: "hb-cascader__search-input", placeholder: "\u641C\u7D22", value: this.searchValue, onInput: this.handleSearchInput, "aria-label": "\u641C\u7D22\u9009\u9879" }))), this.filterable && this.searchValue.trim() !== '' ? (this.renderSearchResults()) : (h("div", { class: "hb-cascader__menus", role: "listbox", "aria-multiselectable": this.multiple ? 'true' : 'false' }, this.renderCascaderMenus()))))));
|
|
325
481
|
}
|
|
326
482
|
renderCascaderMenus() {
|
|
327
483
|
const menus = [];
|
|
328
484
|
let currentOptions = this.options;
|
|
329
485
|
let currentPath = [];
|
|
330
|
-
// Render first level
|
|
331
486
|
menus.push(this.renderMenu(currentOptions, currentPath));
|
|
332
|
-
// Render active path levels
|
|
333
487
|
for (let i = 0; i < this.activePath.length; i++) {
|
|
334
488
|
const pathValue = this.activePath[i];
|
|
335
489
|
const option = currentOptions.find(opt => opt.value === pathValue);
|
|
336
490
|
if (!option)
|
|
337
491
|
break;
|
|
338
|
-
// lazy 加载中:节点 children 尚未填充 → 渲染 loading 面板
|
|
339
492
|
if (option.children === undefined && this.loadingKeys.has(option.value)) {
|
|
340
493
|
menus.push(this.renderLoadingMenu());
|
|
341
494
|
break;
|
|
@@ -351,49 +504,56 @@ export class Cascader {
|
|
|
351
504
|
}
|
|
352
505
|
return menus;
|
|
353
506
|
}
|
|
354
|
-
/** lazy 加载中渲染的面板:一个 loading 占位提示 */
|
|
355
507
|
renderLoadingMenu() {
|
|
356
508
|
return (h("ul", { class: "hb-cascader__menu-list hb-cascader__menu-list--loading", role: "status", "aria-live": "polite" }, h("li", { class: "hb-cascader__menu-item hb-cascader__menu-item--loading" }, h("span", { class: "hb-cascader__menu-item-label" }, "\u52A0\u8F7D\u4E2D\u2026"))));
|
|
357
509
|
}
|
|
358
|
-
/**
|
|
359
|
-
* 渲染扁平化搜索结果:每一项展示完整路径(label 用 separator 连接),点击选中完整路径。
|
|
360
|
-
* 无匹配时渲染空状态。
|
|
361
|
-
*/
|
|
362
510
|
renderSearchResults() {
|
|
363
511
|
if (this.filteredPaths.length === 0) {
|
|
364
512
|
return (h("div", { class: "hb-cascader__search-empty", role: "status" }, "\u65E0\u5339\u914D\u6570\u636E"));
|
|
365
513
|
}
|
|
366
|
-
return (h("div", { class: "hb-cascader__search-results", role: "listbox", "aria-label": "\u641C\u7D22\u7ED3\u679C" }, this.filteredPaths.map(
|
|
367
|
-
const labelPath = path.map(
|
|
368
|
-
const valuePath = path.map(
|
|
514
|
+
return (h("div", { class: "hb-cascader__search-results", role: "listbox", "aria-label": "\u641C\u7D22\u7ED3\u679C" }, this.filteredPaths.map(path => {
|
|
515
|
+
const labelPath = path.map(opt => opt.label).join(this.separator);
|
|
516
|
+
const valuePath = path.map(opt => opt.value);
|
|
369
517
|
const last = path[path.length - 1];
|
|
370
518
|
const disabled = !!last.disabled;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.modelValue
|
|
374
|
-
valuePath.every((v, idx) => this.modelValue && this.modelValue[idx] === v);
|
|
519
|
+
const selected = this.multiple
|
|
520
|
+
? this.getMultiModel().some(p => this.pathEquals(p, valuePath))
|
|
521
|
+
: !!this.modelValue && this.pathEquals(this.modelValue, valuePath);
|
|
375
522
|
return (h("div", { class: {
|
|
376
523
|
'hb-cascader__search-item': true,
|
|
377
524
|
'hb-cascader__search-item--selected': selected,
|
|
378
525
|
'hb-cascader__search-item--disabled': disabled,
|
|
379
|
-
}, role: "option", "aria-selected": selected ? 'true' : 'false', "aria-disabled": disabled ? 'true' : undefined, onClick: () => !disabled && this.handleSearchSelect(path) }, labelPath));
|
|
526
|
+
}, role: "option", "aria-selected": selected ? 'true' : 'false', "aria-disabled": disabled ? 'true' : undefined, onClick: () => !disabled && this.handleSearchSelect(path) }, this.multiple && (h("span", { class: "hb-cascader__menu-item-checkbox", "data-state": selected ? 'checked' : 'unchecked', role: "checkbox", "aria-checked": selected ? 'true' : 'false' })), labelPath));
|
|
380
527
|
})));
|
|
381
528
|
}
|
|
382
529
|
renderMenu(options, path) {
|
|
383
|
-
if (!options || options.length === 0)
|
|
530
|
+
if (!options || options.length === 0)
|
|
384
531
|
return null;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
path.
|
|
532
|
+
return (h("ul", { class: "hb-cascader__menu-list", role: "group" }, options.map(option => {
|
|
533
|
+
const checkState = this.getCheckState(option, path);
|
|
534
|
+
// 单选高亮:路径在当前 modelValue 上
|
|
535
|
+
const isSelected = !this.multiple &&
|
|
536
|
+
path.length > 0 &&
|
|
537
|
+
!!this.modelValue &&
|
|
538
|
+
path.every((val, idx) => this.modelValue[idx] === val) &&
|
|
390
539
|
this.modelValue.length === path.length + 1 &&
|
|
391
540
|
this.modelValue[path.length] === option.value;
|
|
541
|
+
const showArrow = this.loadingKeys.has(option.value)
|
|
542
|
+
? false
|
|
543
|
+
: (option.children && option.children.length > 0) || (this.lazy && option.children === undefined && !option.leaf);
|
|
392
544
|
return (h("li", { class: {
|
|
393
545
|
'hb-cascader__menu-item': true,
|
|
394
|
-
'hb-cascader__menu-item--selected': isSelected
|
|
546
|
+
'hb-cascader__menu-item--selected': isSelected,
|
|
395
547
|
'hb-cascader__menu-item--disabled': option.disabled,
|
|
396
|
-
}, role: "option", "aria-selected":
|
|
548
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : undefined, onClick: () => !option.disabled && this.handleItemClick(option, path) }, this.multiple && (h("span", { class: {
|
|
549
|
+
'hb-cascader__menu-item-checkbox': true,
|
|
550
|
+
'hb-cascader__menu-item-checkbox--checked': checkState === 'checked',
|
|
551
|
+
'hb-cascader__menu-item-checkbox--indeterminate': checkState === 'indeterminate',
|
|
552
|
+
}, "data-state": checkState, role: "checkbox", "aria-checked": checkState === 'indeterminate' ? 'mixed' : checkState === 'checked' ? 'true' : 'false', onClick: e => {
|
|
553
|
+
e.stopPropagation();
|
|
554
|
+
if (!option.disabled)
|
|
555
|
+
this.handleCheck(option, path);
|
|
556
|
+
} })), h("span", { class: "hb-cascader__menu-item-label" }, option.label), this.loadingKeys.has(option.value) ? (h("span", { class: "hb-cascader__menu-item-loading", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", class: "hb-cascader__menu-item-loading-svg" }, h("path", { d: "M12 5V2L8 6l4 4V7a5 5 0 1 1-5 5H5a7 7 0 1 0 7-7z" })))) : showArrow ? (h("span", { class: "hb-cascader__menu-item-arrow", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M9 6l6 6-6 6" })))) : null));
|
|
397
557
|
})));
|
|
398
558
|
}
|
|
399
559
|
static get is() { return "hb-cascader"; }
|
|
@@ -414,15 +574,21 @@ export class Cascader {
|
|
|
414
574
|
"type": "unknown",
|
|
415
575
|
"mutable": true,
|
|
416
576
|
"complexType": {
|
|
417
|
-
"original": "
|
|
418
|
-
"resolved": "(string | number)[]",
|
|
419
|
-
"references": {
|
|
577
|
+
"original": "ValuePath | ValuePath[]",
|
|
578
|
+
"resolved": "(string | number)[] | ValuePath[]",
|
|
579
|
+
"references": {
|
|
580
|
+
"ValuePath": {
|
|
581
|
+
"location": "local",
|
|
582
|
+
"path": "/Users/vscoderwhy/Desktop/product/web-common/huibo-ui/src/components/Cascader/Cascader.tsx",
|
|
583
|
+
"id": "src/components/Cascader/Cascader.tsx::ValuePath"
|
|
584
|
+
}
|
|
585
|
+
}
|
|
420
586
|
},
|
|
421
587
|
"required": false,
|
|
422
588
|
"optional": true,
|
|
423
589
|
"docs": {
|
|
424
590
|
"tags": [],
|
|
425
|
-
"text": "\u9009\u4E2D\u9879\u7ED1\u5B9A\u503C"
|
|
591
|
+
"text": "\u9009\u4E2D\u9879\u7ED1\u5B9A\u503C\u3002\u5355\u9009\u4E3A\u4E00\u7EF4\u8DEF\u5F84\u6570\u7EC4\uFF08\u5982 ['zhejiang','hangzhou']\uFF09\uFF0C\n\u591A\u9009\uFF08multiple\uFF09\u4E3A\u4E8C\u7EF4\u6570\u7EC4\uFF08\u5982 [['zhejiang','ningbo'], ['jiangsu']]\uFF09\u3002"
|
|
426
592
|
},
|
|
427
593
|
"getter": false,
|
|
428
594
|
"setter": false
|
|
@@ -482,10 +648,7 @@ export class Cascader {
|
|
|
482
648
|
"required": false,
|
|
483
649
|
"optional": false,
|
|
484
650
|
"docs": {
|
|
485
|
-
"tags": [
|
|
486
|
-
"name": "default",
|
|
487
|
-
"text": "false"
|
|
488
|
-
}],
|
|
651
|
+
"tags": [],
|
|
489
652
|
"text": "\u662F\u5426\u7981\u7528"
|
|
490
653
|
},
|
|
491
654
|
"getter": false,
|
|
@@ -525,10 +688,7 @@ export class Cascader {
|
|
|
525
688
|
"required": false,
|
|
526
689
|
"optional": false,
|
|
527
690
|
"docs": {
|
|
528
|
-
"tags": [
|
|
529
|
-
"name": "default",
|
|
530
|
-
"text": "false"
|
|
531
|
-
}],
|
|
691
|
+
"tags": [],
|
|
532
692
|
"text": "\u662F\u5426\u53EF\u6E05\u7A7A"
|
|
533
693
|
},
|
|
534
694
|
"getter": false,
|
|
@@ -548,11 +708,8 @@ export class Cascader {
|
|
|
548
708
|
"required": false,
|
|
549
709
|
"optional": false,
|
|
550
710
|
"docs": {
|
|
551
|
-
"tags": [
|
|
552
|
-
|
|
553
|
-
"text": "true"
|
|
554
|
-
}],
|
|
555
|
-
"text": "\u662F\u5426\u663E\u793A\u5B8C\u6574\u8DEF\u5F84"
|
|
711
|
+
"tags": [],
|
|
712
|
+
"text": "\u662F\u5426\u663E\u793A\u5B8C\u6574\u8DEF\u5F84\uFF08\u5355\u9009\u8F93\u5165\u6846 / \u591A\u9009 tag \u6587\u672C\uFF09"
|
|
556
713
|
},
|
|
557
714
|
"getter": false,
|
|
558
715
|
"setter": false,
|
|
@@ -572,7 +729,7 @@ export class Cascader {
|
|
|
572
729
|
"optional": true,
|
|
573
730
|
"docs": {
|
|
574
731
|
"tags": [],
|
|
575
|
-
"text": "\u8F93\u5165\u6846\
|
|
732
|
+
"text": "\u8F93\u5165\u6846\u539F\u751F\u5C5E\u6027"
|
|
576
733
|
},
|
|
577
734
|
"getter": false,
|
|
578
735
|
"setter": false,
|
|
@@ -591,7 +748,7 @@ export class Cascader {
|
|
|
591
748
|
"optional": true,
|
|
592
749
|
"docs": {
|
|
593
750
|
"tags": [],
|
|
594
|
-
"text": "\u8F93\u5165\u6846\
|
|
751
|
+
"text": "\u8F93\u5165\u6846\u539F\u751F\u5C5E\u6027"
|
|
595
752
|
},
|
|
596
753
|
"getter": false,
|
|
597
754
|
"setter": false,
|
|
@@ -609,11 +766,8 @@ export class Cascader {
|
|
|
609
766
|
"required": false,
|
|
610
767
|
"optional": false,
|
|
611
768
|
"docs": {
|
|
612
|
-
"tags": [
|
|
613
|
-
|
|
614
|
-
"text": "' / '"
|
|
615
|
-
}],
|
|
616
|
-
"text": "\u5206\u9694\u7B26"
|
|
769
|
+
"tags": [],
|
|
770
|
+
"text": "\u8DEF\u5F84\u5206\u9694\u7B26"
|
|
617
771
|
},
|
|
618
772
|
"getter": false,
|
|
619
773
|
"setter": false,
|
|
@@ -632,11 +786,8 @@ export class Cascader {
|
|
|
632
786
|
"required": false,
|
|
633
787
|
"optional": false,
|
|
634
788
|
"docs": {
|
|
635
|
-
"tags": [
|
|
636
|
-
|
|
637
|
-
"text": "true"
|
|
638
|
-
}],
|
|
639
|
-
"text": "\u662F\u5426\u52A8\u6001\u52A0\u8F7D\u5B50\u8282\u70B9"
|
|
789
|
+
"tags": [],
|
|
790
|
+
"text": "modelValue \u662F\u5426\u8F93\u51FA\u5B8C\u6574\u8DEF\u5F84\uFF08\u4FDD\u7559 AntD \u517C\u5BB9\u4F4D\uFF09"
|
|
640
791
|
},
|
|
641
792
|
"getter": false,
|
|
642
793
|
"setter": false,
|
|
@@ -655,11 +806,8 @@ export class Cascader {
|
|
|
655
806
|
"required": false,
|
|
656
807
|
"optional": false,
|
|
657
808
|
"docs": {
|
|
658
|
-
"tags": [
|
|
659
|
-
|
|
660
|
-
"text": "false"
|
|
661
|
-
}],
|
|
662
|
-
"text": "\u662F\u5426\u53EF\u641C\u7D22\uFF08filterable\uFF09\n\u5F00\u542F\u540E\u4E0B\u62C9\u9876\u90E8\u6E32\u67D3\u641C\u7D22\u8F93\u5165\u6846\uFF0C\u8F93\u5165\u65F6\u6309 label\uFF08\u542B\u6240\u6709\u5B50\u7EA7\uFF09\u6241\u5E73\u5316\u8FC7\u6EE4\uFF0C\n\u5339\u914D\u9879\u4EE5\u5B8C\u6574\u8DEF\u5F84\u5C55\u793A\uFF0C\u70B9\u51FB\u5373\u9009\u4E2D\u5176\u5B8C\u6574\u8DEF\u5F84\u3002"
|
|
809
|
+
"tags": [],
|
|
810
|
+
"text": "\u662F\u5426\u53EF\u641C\u7D22\uFF08filterable\uFF09\u3002\u4E0B\u62C9\u9876\u90E8\u6E32\u67D3\u641C\u7D22\u6846\uFF0C\u8F93\u5165\u65F6\u6309 label \u6241\u5E73\u5316\u8FC7\u6EE4\uFF0C\n\u5339\u914D\u9879\u4EE5\u5B8C\u6574\u8DEF\u5F84\u5C55\u793A\uFF0C\u70B9\u51FB\u5373\u9009\u4E2D\uFF08\u5355\u9009\uFF09\u6216 toggle \u52FE\u9009\uFF08\u591A\u9009\uFF09\u3002"
|
|
663
811
|
},
|
|
664
812
|
"getter": false,
|
|
665
813
|
"setter": false,
|
|
@@ -678,11 +826,8 @@ export class Cascader {
|
|
|
678
826
|
"required": false,
|
|
679
827
|
"optional": false,
|
|
680
828
|
"docs": {
|
|
681
|
-
"tags": [
|
|
682
|
-
|
|
683
|
-
"text": "false"
|
|
684
|
-
}],
|
|
685
|
-
"text": "\u662F\u5426\u5F00\u542F\u52A8\u6001\u52A0\u8F7D\uFF08lazy load\uFF09\u3002\u5F00\u542F\u540E\uFF0C\u5C55\u5F00\u542B children=undefined \u7684\u8282\u70B9\u65F6\uFF0C\n\u8C03\u7528 load(node) \u83B7\u53D6\u5176\u5B50\u7EA7\u5E76\u586B\u5145\u8FDB options\uFF0C\u52A0\u8F7D\u4E2D\u663E\u793A loading \u6001\u3002"
|
|
829
|
+
"tags": [],
|
|
830
|
+
"text": "\u662F\u5426\u5F00\u542F\u52A8\u6001\u52A0\u8F7D\uFF08lazy\uFF09\u3002\u5C55\u5F00 children=undefined \u7684\u8282\u70B9\u65F6\u8C03\u7528 load(node) \u586B\u5145\u5B50\u7EA7\u3002"
|
|
686
831
|
},
|
|
687
832
|
"getter": false,
|
|
688
833
|
"setter": false,
|
|
@@ -712,10 +857,69 @@ export class Cascader {
|
|
|
712
857
|
"optional": true,
|
|
713
858
|
"docs": {
|
|
714
859
|
"tags": [],
|
|
715
|
-
"text": "\u52A8\u6001\u52A0\u8F7D\
|
|
860
|
+
"text": "\u52A8\u6001\u52A0\u8F7D\u51FD\u6570\uFF08\u4EC5 lazy=true \u751F\u6548\uFF09"
|
|
716
861
|
},
|
|
717
862
|
"getter": false,
|
|
718
863
|
"setter": false
|
|
864
|
+
},
|
|
865
|
+
"multiple": {
|
|
866
|
+
"type": "boolean",
|
|
867
|
+
"mutable": false,
|
|
868
|
+
"complexType": {
|
|
869
|
+
"original": "boolean",
|
|
870
|
+
"resolved": "boolean",
|
|
871
|
+
"references": {}
|
|
872
|
+
},
|
|
873
|
+
"required": false,
|
|
874
|
+
"optional": false,
|
|
875
|
+
"docs": {
|
|
876
|
+
"tags": [],
|
|
877
|
+
"text": "\u662F\u5426\u5F00\u542F\u591A\u9009\u3002\u5F00\u542F\u540E modelValue \u4E3A\u4E8C\u7EF4\u6570\u7EC4\uFF0C\u6BCF\u6761\u4E3A\u4E00\u4E2A\u9009\u4E2D\u8DEF\u5F84\uFF1B\n\u83DC\u5355\u9879\u524D\u6E32\u67D3 checkbox\uFF0C\u8F93\u5165\u6846\u4EE5 tag \u5217\u8868\u5C55\u793A\u9009\u4E2D\u9879\u3002"
|
|
878
|
+
},
|
|
879
|
+
"getter": false,
|
|
880
|
+
"setter": false,
|
|
881
|
+
"attribute": "multiple",
|
|
882
|
+
"reflect": false,
|
|
883
|
+
"defaultValue": "false"
|
|
884
|
+
},
|
|
885
|
+
"checkStrictly": {
|
|
886
|
+
"type": "boolean",
|
|
887
|
+
"mutable": false,
|
|
888
|
+
"complexType": {
|
|
889
|
+
"original": "boolean",
|
|
890
|
+
"resolved": "boolean",
|
|
891
|
+
"references": {}
|
|
892
|
+
},
|
|
893
|
+
"required": false,
|
|
894
|
+
"optional": false,
|
|
895
|
+
"docs": {
|
|
896
|
+
"tags": [],
|
|
897
|
+
"text": "\u662F\u5426\u4E25\u683C\u7684\u9009\u4E2D\u884C\u4E3A\uFF08\u7236\u5B50\u4E0D\u5173\u8054\uFF09\u3002\n\u5355\u9009\uFF1A\u70B9\u51FB\u4EFB\u610F\u5C42\u7EA7\uFF08\u542B\u975E\u53F6\u5B50\uFF09\u5373\u9009\u4E2D\u8BE5\u8DEF\u5F84\uFF1B\n\u591A\u9009\uFF1A\u52FE\u9009\u72EC\u7ACB\uFF0C\u4E0D\u5411\u4E0B\u8054\u52A8\u9009\u4E2D\u53F6\u5B50\u3001\u53D6\u6D88\u4E5F\u4E0D\u8054\u52A8\u3002"
|
|
898
|
+
},
|
|
899
|
+
"getter": false,
|
|
900
|
+
"setter": false,
|
|
901
|
+
"attribute": "check-strictly",
|
|
902
|
+
"reflect": false,
|
|
903
|
+
"defaultValue": "false"
|
|
904
|
+
},
|
|
905
|
+
"maxTagCount": {
|
|
906
|
+
"type": "number",
|
|
907
|
+
"mutable": false,
|
|
908
|
+
"complexType": {
|
|
909
|
+
"original": "number",
|
|
910
|
+
"resolved": "number",
|
|
911
|
+
"references": {}
|
|
912
|
+
},
|
|
913
|
+
"required": false,
|
|
914
|
+
"optional": true,
|
|
915
|
+
"docs": {
|
|
916
|
+
"tags": [],
|
|
917
|
+
"text": "\u591A\u9009\u65F6\u8F93\u5165\u6846\u6700\u591A\u5C55\u793A\u7684 tag \u6570\u91CF\uFF0C\u8D85\u51FA\u6298\u53E0\u4E3A +N\uFF08\u53EF\u9009\uFF09\u3002"
|
|
918
|
+
},
|
|
919
|
+
"getter": false,
|
|
920
|
+
"setter": false,
|
|
921
|
+
"attribute": "max-tag-count",
|
|
922
|
+
"reflect": false
|
|
719
923
|
}
|
|
720
924
|
};
|
|
721
925
|
}
|
|
@@ -738,12 +942,18 @@ export class Cascader {
|
|
|
738
942
|
"composed": true,
|
|
739
943
|
"docs": {
|
|
740
944
|
"tags": [],
|
|
741
|
-
"text": "\u503C\u6539\u53D8\u4E8B\u4EF6"
|
|
945
|
+
"text": "\u503C\u6539\u53D8\u4E8B\u4EF6\uFF1A\u5355\u9009 emit \u4E00\u7EF4\u8DEF\u5F84\u6216 undefined\uFF1B\u591A\u9009 emit \u4E8C\u7EF4\u6570\u7EC4\uFF08\u53EF\u80FD\u4E3A []\uFF09"
|
|
742
946
|
},
|
|
743
947
|
"complexType": {
|
|
744
|
-
"original": "
|
|
745
|
-
"resolved": "(string | number)[]",
|
|
746
|
-
"references": {
|
|
948
|
+
"original": "ValuePath | ValuePath[] | undefined",
|
|
949
|
+
"resolved": "(string | number)[] | ValuePath[]",
|
|
950
|
+
"references": {
|
|
951
|
+
"ValuePath": {
|
|
952
|
+
"location": "local",
|
|
953
|
+
"path": "/Users/vscoderwhy/Desktop/product/web-common/huibo-ui/src/components/Cascader/Cascader.tsx",
|
|
954
|
+
"id": "src/components/Cascader/Cascader.tsx::ValuePath"
|
|
955
|
+
}
|
|
956
|
+
}
|
|
747
957
|
}
|
|
748
958
|
}, {
|
|
749
959
|
"method": "hbExpandChange",
|
|
@@ -753,12 +963,18 @@ export class Cascader {
|
|
|
753
963
|
"composed": true,
|
|
754
964
|
"docs": {
|
|
755
965
|
"tags": [],
|
|
756
|
-
"text": "\u5C55\u5F00\u8282\u70B9\
|
|
966
|
+
"text": "\u5C55\u5F00\u8282\u70B9\u53D8\u5316\u65F6\u89E6\u53D1"
|
|
757
967
|
},
|
|
758
968
|
"complexType": {
|
|
759
|
-
"original": "
|
|
969
|
+
"original": "ValuePath",
|
|
760
970
|
"resolved": "(string | number)[]",
|
|
761
|
-
"references": {
|
|
971
|
+
"references": {
|
|
972
|
+
"ValuePath": {
|
|
973
|
+
"location": "local",
|
|
974
|
+
"path": "/Users/vscoderwhy/Desktop/product/web-common/huibo-ui/src/components/Cascader/Cascader.tsx",
|
|
975
|
+
"id": "src/components/Cascader/Cascader.tsx::ValuePath"
|
|
976
|
+
}
|
|
977
|
+
}
|
|
762
978
|
}
|
|
763
979
|
}];
|
|
764
980
|
}
|