naive-ui 2.34.4 → 2.36.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/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/index.js +47537 -44859
- package/dist/index.prod.js +2 -2
- package/es/_internal/clear/src/Clear.d.ts +1 -1
- package/es/_internal/clear/src/Clear.js +2 -0
- package/es/_internal/close/src/Close.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/es/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/es/_internal/icon/src/Icon.d.ts +1 -1
- package/es/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/es/_internal/icons/Add.d.ts +1 -1
- package/es/_internal/icons/ArrowBack.d.ts +1 -1
- package/es/_internal/icons/ArrowDown.d.ts +1 -1
- package/es/_internal/icons/ArrowUp.d.ts +1 -1
- package/es/_internal/icons/Attach.d.ts +1 -1
- package/es/_internal/icons/Backward.d.ts +1 -1
- package/es/_internal/icons/Cancel.d.ts +1 -1
- package/es/_internal/icons/Checkmark.d.ts +1 -1
- package/es/_internal/icons/ChevronDown.d.ts +1 -1
- package/es/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/es/_internal/icons/ChevronLeft.d.ts +1 -1
- package/es/_internal/icons/ChevronRight.d.ts +1 -1
- package/es/_internal/icons/Clear.d.ts +1 -1
- package/es/_internal/icons/Close.d.ts +1 -1
- package/es/_internal/icons/Date.d.ts +1 -1
- package/es/_internal/icons/Download.d.ts +1 -1
- package/es/_internal/icons/Empty.d.ts +1 -1
- package/es/_internal/icons/Error.d.ts +1 -1
- package/es/_internal/icons/Eye.d.ts +1 -1
- package/es/_internal/icons/EyeOff.d.ts +1 -1
- package/es/_internal/icons/FastBackward.d.ts +1 -1
- package/es/_internal/icons/FastForward.d.ts +1 -1
- package/es/_internal/icons/File.d.ts +1 -1
- package/es/_internal/icons/Filter.d.ts +1 -1
- package/es/_internal/icons/Forward.d.ts +1 -1
- package/es/_internal/icons/Info.d.ts +1 -1
- package/es/_internal/icons/More.d.ts +1 -1
- package/es/_internal/icons/Photo.d.ts +1 -1
- package/es/_internal/icons/Remove.d.ts +1 -1
- package/es/_internal/icons/ResizeSmall.d.ts +1 -1
- package/es/_internal/icons/Retry.d.ts +1 -1
- package/es/_internal/icons/RotateClockwise.d.ts +1 -1
- package/es/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/es/_internal/icons/Search.d.ts +1 -1
- package/es/_internal/icons/Success.d.ts +1 -1
- package/es/_internal/icons/Switcher.d.ts +1 -1
- package/es/_internal/icons/Time.d.ts +1 -1
- package/es/_internal/icons/To.d.ts +1 -1
- package/es/_internal/icons/Trash.d.ts +1 -1
- package/es/_internal/icons/Warning.d.ts +1 -1
- package/es/_internal/icons/ZoomIn.d.ts +1 -1
- package/es/_internal/icons/ZoomOut.d.ts +1 -1
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/loading/src/Loading.d.ts +1 -1
- package/es/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/es/_internal/select-menu/src/SelectMenu.js +2 -1
- package/es/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/es/_internal/selection/src/Selection.d.ts +5 -2
- package/es/_internal/selection/src/Selection.js +17 -7
- package/es/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/es/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/es/_internal/suffix/src/Suffix.d.ts +1 -1
- package/es/_internal/wave/src/Wave.d.ts +1 -1
- package/es/_mixins/use-config.d.ts +2 -1
- package/es/_mixins/use-config.js +10 -5
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_mixins/use-style.d.ts +1 -1
- package/es/_mixins/use-style.js +1 -1
- package/es/_styles/common/_common.js +1 -1
- package/es/_styles/common/light.js +2 -2
- package/es/_utils/composable/use-collection.d.ts +1 -1
- package/es/_utils/composable/use-collection.js +2 -0
- package/es/_utils/css/color-to-class.js +1 -1
- package/es/_utils/cssr/index.d.ts +1 -1
- package/es/_utils/vue/wrapper.d.ts +1 -1
- package/es/affix/src/Affix.d.ts +4 -4
- package/es/affix/src/Affix.js +4 -2
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/alert/src/Alert.js +7 -1
- package/es/alert/src/styles/index.cssr.js +4 -0
- package/es/anchor/src/AnchorAdapter.d.ts +2 -2
- package/es/anchor/src/BaseAnchor.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.js +3 -1
- package/es/anchor/src/Link.d.ts +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +3 -3
- package/es/auto-complete/src/interface.d.ts +2 -1
- package/es/avatar/src/Avatar.d.ts +2 -2
- package/es/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/es/back-top/src/BackTop.d.ts +2 -2
- package/es/badge/src/Badge.d.ts +2 -2
- package/es/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/es/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/es/button/src/Button.d.ts +3 -3
- package/es/button/src/Button.js +2 -2
- package/es/button-group/src/ButtonGroup.d.ts +2 -2
- package/es/calendar/src/Calendar.d.ts +2 -2
- package/es/card/src/Card.d.ts +23 -7
- package/es/card/src/Card.js +12 -5
- package/es/carousel/src/Carousel.d.ts +7 -7
- package/es/carousel/src/Carousel.js +8 -3
- package/es/carousel/src/CarouselArrow.d.ts +2 -2
- package/es/carousel/src/CarouselContext.js +3 -1
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/carousel/src/CarouselDots.js +7 -1
- package/es/carousel/src/CarouselItem.d.ts +2 -2
- package/es/cascader/src/Cascader.d.ts +3 -2
- package/es/cascader/src/CascaderMenu.d.ts +1 -1
- package/es/cascader/src/CascaderOption.d.ts +1 -1
- package/es/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/es/checkbox/src/Checkbox.d.ts +8 -8
- package/es/checkbox/src/Checkbox.js +10 -3
- package/es/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/es/checkbox/src/styles/index.cssr.js +9 -11
- package/es/code/src/Code.d.ts +2 -2
- package/es/collapse/src/Collapse.d.ts +2 -2
- package/es/collapse/src/CollapseItem.d.ts +2 -2
- package/es/collapse/src/CollapseItemContent.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/es/color-picker/src/AlphaSlider.d.ts +1 -1
- package/es/color-picker/src/ColorInput.d.ts +1 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +2 -2
- package/es/color-picker/src/ColorPicker.js +6 -2
- package/es/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/es/color-picker/src/ColorPickerSwatches.js +9 -4
- package/es/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/es/color-picker/src/ColorPreview.d.ts +1 -1
- package/es/color-picker/src/HueSlider.d.ts +1 -1
- package/es/color-picker/src/Pallete.d.ts +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +3 -0
- package/es/config-provider/src/ConfigProvider.d.ts +21 -8
- package/es/config-provider/src/ConfigProvider.js +4 -2
- package/es/config-provider/src/config.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +5 -1
- package/es/countdown/src/Countdown.d.ts +1 -1
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/DataTable.d.ts +5 -5
- package/es/data-table/src/DataTable.js +2 -7
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/es/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/es/data-table/src/MainTable.d.ts +1 -1
- package/es/data-table/src/MainTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +5 -6
- package/es/data-table/src/TableParts/Body.js +22 -15
- package/es/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/es/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.js +5 -1
- package/es/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/es/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/es/data-table/src/TableParts/Header.d.ts +1 -3
- package/es/data-table/src/TableParts/Header.js +6 -12
- package/es/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/es/data-table/src/interface.d.ts +3 -5
- package/es/data-table/src/styles/index.cssr.js +2 -0
- package/es/data-table/src/use-scroll.d.ts +1 -2
- package/es/data-table/src/use-scroll.js +21 -13
- package/es/date-picker/src/DatePicker.d.ts +2 -2
- package/es/date-picker/src/panel/date.d.ts +4 -4
- package/es/date-picker/src/panel/date.js +3 -1
- package/es/date-picker/src/panel/daterange.d.ts +4 -4
- package/es/date-picker/src/panel/daterange.js +10 -2
- package/es/date-picker/src/panel/datetime.d.ts +4 -4
- package/es/date-picker/src/panel/datetime.js +3 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/es/date-picker/src/panel/datetimerange.js +16 -4
- package/es/date-picker/src/panel/month.d.ts +4 -4
- package/es/date-picker/src/panel/month.js +4 -1
- package/es/date-picker/src/panel/monthrange.d.ts +4 -4
- package/es/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/es/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-calendar.js +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/es/date-picker/src/styles/index.cssr.js +1 -0
- package/es/date-picker/src/utils.js +1 -6
- package/es/date-picker/styles/_common.js +1 -1
- package/es/descriptions/src/Descriptions.d.ts +8 -2
- package/es/descriptions/src/Descriptions.js +28 -8
- package/es/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/es/descriptions/src/DescriptionsItem.js +2 -0
- package/es/dialog/src/Dialog.d.ts +2 -2
- package/es/dialog/src/Dialog.js +6 -2
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -4
- package/es/dialog/src/DialogProvider.js +3 -1
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/discrete/src/InjectionExtractor.d.ts +1 -1
- package/es/divider/src/Divider.d.ts +2 -2
- package/es/drawer/src/Drawer.d.ts +15 -2
- package/es/drawer/src/Drawer.js +2 -2
- package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/es/drawer/src/DrawerBodyWrapper.js +25 -1
- package/es/drawer/src/DrawerContent.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +20 -2
- package/es/dropdown/src/Dropdown.js +1 -1
- package/es/dropdown/src/DropdownDivider.d.ts +1 -1
- package/es/dropdown/src/DropdownGroup.d.ts +1 -1
- package/es/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.js +4 -1
- package/es/dropdown/src/DropdownOption.d.ts +6 -5
- package/es/dropdown/src/DropdownOption.js +2 -4
- package/es/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/es/dynamic-input/src/DynamicInput.js +21 -9
- package/es/dynamic-input/src/InputPreset.d.ts +1 -1
- package/es/dynamic-input/src/PairPreset.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/es/dynamic-tags/src/DynamicTags.js +6 -4
- package/es/element/src/Element.d.ts +2 -2
- package/es/ellipsis/index.d.ts +1 -0
- package/es/ellipsis/index.js +1 -0
- package/es/ellipsis/src/Ellipsis.d.ts +3 -1
- package/es/ellipsis/src/Ellipsis.js +5 -4
- package/es/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/es/ellipsis/src/PerformantEllipsis.js +52 -0
- package/es/empty/src/Empty.d.ts +2 -2
- package/es/equation/index.d.ts +1 -0
- package/es/equation/src/Equation.d.ts +6 -4
- package/es/form/src/Form.d.ts +2 -2
- package/es/form/src/Form.js +3 -1
- package/es/form/src/FormItem.d.ts +3 -3
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemRow.d.ts +1 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/global-style/src/GlobalStyle.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/Grid.d.ts +2 -2
- package/es/grid/src/Grid.js +6 -3
- package/es/grid/src/GridItem.d.ts +1 -1
- package/es/icon/src/Icon.d.ts +2 -2
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/es/image/src/Image.d.ts +8 -2
- package/es/image/src/ImageGroup.d.ts +8 -2
- package/es/image/src/ImageGroup.js +8 -2
- package/es/image/src/ImagePreview.d.ts +8 -3
- package/es/image/src/ImagePreview.js +10 -1
- package/es/image/src/icons.d.ts +1 -0
- package/es/image/src/icons.js +2 -0
- package/es/image/src/interface.d.ts +7 -5
- package/es/image/src/interface.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/input/src/Input.d.ts +19 -9
- package/es/input/src/Input.js +30 -8
- package/es/input/src/InputGroup.d.ts +2 -2
- package/es/input/src/InputGroupLabel.d.ts +2 -2
- package/es/input/src/WordCount.d.ts +1 -1
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +3 -2
- package/es/input-number/src/InputNumber.js +2 -1
- package/es/input-number/src/interface.d.ts +1 -0
- package/es/layout/src/Layout.d.ts +10 -4
- package/es/layout/src/Layout.js +8 -1
- package/es/layout/src/LayoutContent.d.ts +4 -2
- package/es/layout/src/LayoutFooter.d.ts +2 -2
- package/es/layout/src/LayoutHeader.d.ts +2 -2
- package/es/layout/src/LayoutSider.d.ts +11 -2
- package/es/layout/src/LayoutSider.js +12 -3
- package/es/layout/src/ToggleBar.d.ts +1 -1
- package/es/layout/src/ToggleButton.d.ts +1 -1
- package/es/legacy-grid/src/Col.d.ts +1 -1
- package/es/legacy-grid/src/Row.d.ts +2 -2
- package/es/legacy-grid/src/styles/index.cssr.js +2 -3
- package/es/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/es/legacy-transfer/src/Transfer.d.ts +2 -2
- package/es/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/es/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/es/legacy-transfer/src/TransferList.d.ts +1 -1
- package/es/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/es/list/src/List.d.ts +2 -2
- package/es/list/src/ListItem.d.ts +1 -1
- package/es/loading-bar/src/LoadingBar.d.ts +4 -2
- package/es/loading-bar/src/LoadingBar.js +21 -12
- package/es/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/es/loading-bar/src/LoadingBarProvider.js +2 -2
- package/es/locales/common/arDZ.js +1 -0
- package/es/locales/common/deDE.js +1 -0
- package/es/locales/common/enGB.js +1 -0
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.js +1 -0
- package/es/locales/common/eo.js +1 -0
- package/es/locales/common/esAR.js +1 -0
- package/es/locales/common/faIR.js +1 -0
- package/es/locales/common/frFR.js +2 -1
- package/es/locales/common/idID.js +1 -0
- package/es/locales/common/itIT.js +1 -0
- package/es/locales/common/jaJP.js +1 -0
- package/es/locales/common/koKR.js +1 -0
- package/es/locales/common/nbNO.js +1 -0
- package/es/locales/common/nlNL.js +1 -0
- package/es/locales/common/plPL.js +1 -0
- package/es/locales/common/ptBR.js +15 -17
- package/es/locales/common/ruRU.js +1 -0
- package/es/locales/common/skSK.js +1 -0
- package/es/locales/common/svSE.d.ts +3 -0
- package/es/locales/common/svSE.js +121 -0
- package/es/locales/common/thTH.js +1 -0
- package/es/locales/common/trTR.js +1 -0
- package/es/locales/common/ukUA.js +1 -0
- package/es/locales/common/viVN.js +1 -0
- package/es/locales/common/zhCN.js +1 -0
- package/es/locales/common/zhTW.js +18 -17
- package/es/locales/date/svSE.d.ts +3 -0
- package/es/locales/date/svSE.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +11 -11
- package/es/log/src/Log.js +12 -12
- package/es/log/src/LogLine.d.ts +1 -1
- package/es/log/src/LogLoader.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +4 -4
- package/es/mention/src/utils.js +4 -4
- package/es/menu/src/Menu.d.ts +32 -15
- package/es/menu/src/Menu.js +101 -7
- package/es/menu/src/MenuDivider.d.ts +1 -1
- package/es/menu/src/MenuOption.d.ts +1 -1
- package/es/menu/src/MenuOptionContent.d.ts +4 -1
- package/es/menu/src/MenuOptionContent.js +7 -2
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/Submenu.d.ts +24 -13
- package/es/menu/src/Submenu.js +9 -8
- package/es/menu/src/context.d.ts +2 -2
- package/es/menu/src/interface.d.ts +1 -0
- package/es/menu/src/styles/index.cssr.js +8 -4
- package/es/menu/src/use-menu-child.js +5 -5
- package/es/message/src/Message.d.ts +2 -2
- package/es/message/src/MessageEnvironment.d.ts +1 -1
- package/es/message/src/MessageProvider.d.ts +9 -6
- package/es/message/src/MessageProvider.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +12 -4
- package/es/modal/src/Modal.d.ts +18 -6
- package/es/modal/src/presetProps.d.ts +5 -1
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationContainer.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.js +1 -1
- package/es/notification/src/NotificationProvider.d.ts +5 -2
- package/es/notification/src/NotificationProvider.js +2 -2
- package/es/number-animation/src/NumberAnimation.d.ts +1 -1
- package/es/page-header/src/PageHeader.d.ts +2 -2
- package/es/pagination/src/Pagination.d.ts +2 -2
- package/es/pagination/src/Pagination.js +3 -1
- package/es/popconfirm/src/Popconfirm.d.ts +22 -3
- package/es/popconfirm/src/Popconfirm.js +13 -5
- package/es/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/es/popover/src/Popover.d.ts +25 -1
- package/es/popover/src/Popover.js +10 -4
- package/es/popover/src/PopoverBody.d.ts +23 -2
- package/es/popover/src/PopoverBody.js +26 -10
- package/es/popover/src/interface.d.ts +4 -1
- package/es/popselect/src/Popselect.d.ts +19 -1
- package/es/popselect/src/Popselect.js +2 -1
- package/es/popselect/src/PopselectPanel.d.ts +2 -2
- package/es/popselect/src/PopselectPanel.js +1 -0
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/Line.d.ts +1 -1
- package/es/progress/src/Line.js +1 -3
- package/es/progress/src/MultipleCircle.d.ts +1 -1
- package/es/progress/src/Progress.d.ts +3 -3
- package/es/qr-code/index.d.ts +2 -0
- package/es/qr-code/index.js +1 -0
- package/es/qr-code/src/QrCode.d.ts +154 -0
- package/es/qr-code/src/QrCode.js +146 -0
- package/es/qr-code/src/qrcodegen.d.ts +94 -0
- package/es/qr-code/src/qrcodegen.js +948 -0
- package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/es/qr-code/src/styles/index.cssr.js +8 -0
- package/es/qr-code/styles/dark.d.ts +3 -0
- package/es/qr-code/styles/dark.js +11 -0
- package/es/qr-code/styles/index.d.ts +3 -0
- package/es/qr-code/styles/index.js +2 -0
- package/es/qr-code/styles/light.d.ts +9 -0
- package/es/qr-code/styles/light.js +12 -0
- package/es/radio/src/Radio.d.ts +173 -34
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.d.ts +3 -3
- package/es/radio/src/RadioButton.js +3 -3
- package/es/radio/src/RadioGroup.d.ts +3 -2
- package/es/radio/src/RadioGroup.js +2 -1
- package/es/radio/src/styles/radio-group.cssr.js +1 -0
- package/es/radio/src/use-radio.d.ts +3 -3
- package/es/radio/src/use-radio.js +1 -1
- package/es/rate/src/Rate.d.ts +2 -2
- package/es/result/src/Result.d.ts +3 -3
- package/es/scrollbar/src/Scrollbar.d.ts +1 -1
- package/es/scrollbar/src/Scrollbar.js +2 -0
- package/es/select/src/Select.d.ts +7 -4
- package/es/select/src/Select.js +17 -3
- package/es/select/src/interface.d.ts +2 -0
- package/es/skeleton/src/Skeleton.d.ts +2 -2
- package/es/skeleton/src/Skeleton.js +4 -7
- package/es/slider/src/Slider.d.ts +8 -2
- package/es/slider/src/Slider.js +19 -4
- package/es/slider/src/utils.d.ts +2 -2
- package/es/slider/src/utils.js +6 -4
- package/es/space/src/Space.d.ts +5 -2
- package/es/space/src/Space.js +3 -3
- package/es/spin/src/Spin.d.ts +13 -4
- package/es/spin/src/Spin.js +26 -7
- package/es/split/index.d.ts +2 -0
- package/es/split/index.js +1 -0
- package/es/split/src/Split.d.ts +135 -0
- package/es/split/src/Split.js +145 -0
- package/es/split/src/styles/index.cssr.d.ts +2 -0
- package/es/split/src/styles/index.cssr.js +25 -0
- package/es/split/styles/dark.d.ts +3 -0
- package/es/split/styles/dark.js +6 -0
- package/es/split/styles/index.d.ts +3 -0
- package/es/split/styles/index.js +2 -0
- package/es/split/styles/light.d.ts +9 -0
- package/es/split/styles/light.js +13 -0
- package/es/statistic/src/Statistic.d.ts +2 -2
- package/es/steps/src/Step.d.ts +2 -2
- package/es/steps/src/Steps.d.ts +3 -3
- package/es/steps/src/styles/index.cssr.js +1 -0
- package/es/switch/src/Switch.d.ts +2 -2
- package/es/table/src/Table.d.ts +2 -2
- package/es/table/src/Tbody.d.ts +1 -1
- package/es/table/src/Td.d.ts +1 -1
- package/es/table/src/Th.d.ts +1 -1
- package/es/table/src/Thead.d.ts +1 -1
- package/es/table/src/Tr.d.ts +1 -1
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +3 -1
- package/es/tabs/src/TabPane.d.ts +1 -1
- package/es/tabs/src/Tabs.d.ts +13 -13
- package/es/tabs/src/Tabs.js +15 -2
- package/es/tabs/src/styles/index.cssr.js +12 -2
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/es/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/thing/src/Thing.d.ts +7 -1
- package/es/thing/src/Thing.js +13 -4
- package/es/time/src/Time.d.ts +1 -1
- package/es/time/src/Time.js +1 -1
- package/es/time-picker/src/Panel.d.ts +1 -1
- package/es/time-picker/src/PanelCol.d.ts +1 -1
- package/es/time-picker/src/PanelCol.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +2 -2
- package/es/time-picker/src/TimePicker.js +1 -1
- package/es/timeline/src/Timeline.d.ts +1 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +19 -1
- package/es/transfer/src/Transfer.d.ts +8 -2
- package/es/transfer/src/Transfer.js +2 -2
- package/es/transfer/src/TransferFilter.d.ts +1 -1
- package/es/transfer/src/TransferHeader.d.ts +5 -1
- package/es/transfer/src/TransferHeader.js +6 -2
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/transfer/src/TransferListItem.d.ts +1 -1
- package/es/tree/index.d.ts +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree/src/MotionWrapper.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +59 -5
- package/es/tree/src/Tree.js +32 -19
- package/es/tree/src/TreeNode.d.ts +6 -2
- package/es/tree/src/TreeNode.js +72 -25
- package/es/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/es/tree/src/TreeNodeCheckbox.js +9 -8
- package/es/tree/src/TreeNodeContent.d.ts +1 -1
- package/es/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/es/tree/src/TreeNodeSwitcher.js +12 -6
- package/es/tree/src/interface.d.ts +2 -0
- package/es/tree/src/styles/index.cssr.js +47 -51
- package/es/tree/src/utils.d.ts +1 -0
- package/es/tree/src/utils.js +12 -0
- package/es/tree/styles/light.d.ts +8 -0
- package/es/tree/styles/light.js +6 -2
- package/es/tree-select/src/TreeSelect.d.ts +49 -3
- package/es/tree-select/src/TreeSelect.js +5 -3
- package/es/tree-select/src/interface.d.ts +2 -0
- package/es/tree-select/styles/light.d.ts +4 -0
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/blockquote.d.ts +2 -2
- package/es/typography/src/create-header.d.ts +2 -2
- package/es/typography/src/headers.d.ts +12 -12
- package/es/typography/src/hr.d.ts +2 -2
- package/es/typography/src/li.d.ts +1 -1
- package/es/typography/src/ol.d.ts +2 -2
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/text.d.ts +2 -2
- package/es/typography/src/ul.d.ts +2 -2
- package/es/upload/src/Upload.d.ts +11 -5
- package/es/upload/src/Upload.js +8 -3
- package/es/upload/src/UploadDragger.d.ts +1 -1
- package/es/upload/src/UploadFile.d.ts +2 -2
- package/es/upload/src/UploadFileList.d.ts +1 -1
- package/es/upload/src/UploadFileList.js +3 -2
- package/es/upload/src/UploadProgress.d.ts +1 -1
- package/es/upload/src/UploadTrigger.d.ts +1 -1
- package/es/upload/src/UploadTrigger.js +3 -2
- package/es/upload/src/interface.d.ts +5 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +1 -0
- package/es/virtual-list/src/VirtualList.d.ts +146 -0
- package/es/virtual-list/src/VirtualList.js +102 -0
- package/es/watermark/src/Watermark.d.ts +1 -1
- package/es/watermark/src/Watermark.js +7 -0
- package/lib/_internal/clear/src/Clear.d.ts +1 -1
- package/lib/_internal/clear/src/Clear.js +2 -0
- package/lib/_internal/close/src/Close.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/lib/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/lib/_internal/icon/src/Icon.d.ts +1 -1
- package/lib/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/lib/_internal/icons/Add.d.ts +1 -1
- package/lib/_internal/icons/ArrowBack.d.ts +1 -1
- package/lib/_internal/icons/ArrowDown.d.ts +1 -1
- package/lib/_internal/icons/ArrowUp.d.ts +1 -1
- package/lib/_internal/icons/Attach.d.ts +1 -1
- package/lib/_internal/icons/Backward.d.ts +1 -1
- package/lib/_internal/icons/Cancel.d.ts +1 -1
- package/lib/_internal/icons/Checkmark.d.ts +1 -1
- package/lib/_internal/icons/ChevronDown.d.ts +1 -1
- package/lib/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/lib/_internal/icons/ChevronLeft.d.ts +1 -1
- package/lib/_internal/icons/ChevronRight.d.ts +1 -1
- package/lib/_internal/icons/Clear.d.ts +1 -1
- package/lib/_internal/icons/Close.d.ts +1 -1
- package/lib/_internal/icons/Date.d.ts +1 -1
- package/lib/_internal/icons/Download.d.ts +1 -1
- package/lib/_internal/icons/Empty.d.ts +1 -1
- package/lib/_internal/icons/Error.d.ts +1 -1
- package/lib/_internal/icons/Eye.d.ts +1 -1
- package/lib/_internal/icons/EyeOff.d.ts +1 -1
- package/lib/_internal/icons/FastBackward.d.ts +1 -1
- package/lib/_internal/icons/FastForward.d.ts +1 -1
- package/lib/_internal/icons/File.d.ts +1 -1
- package/lib/_internal/icons/Filter.d.ts +1 -1
- package/lib/_internal/icons/Forward.d.ts +1 -1
- package/lib/_internal/icons/Info.d.ts +1 -1
- package/lib/_internal/icons/More.d.ts +1 -1
- package/lib/_internal/icons/Photo.d.ts +1 -1
- package/lib/_internal/icons/Remove.d.ts +1 -1
- package/lib/_internal/icons/ResizeSmall.d.ts +1 -1
- package/lib/_internal/icons/Retry.d.ts +1 -1
- package/lib/_internal/icons/RotateClockwise.d.ts +1 -1
- package/lib/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/lib/_internal/icons/Search.d.ts +1 -1
- package/lib/_internal/icons/Success.d.ts +1 -1
- package/lib/_internal/icons/Switcher.d.ts +1 -1
- package/lib/_internal/icons/Time.d.ts +1 -1
- package/lib/_internal/icons/To.d.ts +1 -1
- package/lib/_internal/icons/Trash.d.ts +1 -1
- package/lib/_internal/icons/Warning.d.ts +1 -1
- package/lib/_internal/icons/ZoomIn.d.ts +1 -1
- package/lib/_internal/icons/ZoomOut.d.ts +1 -1
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/loading/src/Loading.d.ts +1 -1
- package/lib/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/lib/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/lib/_internal/select-menu/src/SelectMenu.js +2 -1
- package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/lib/_internal/selection/src/Selection.d.ts +5 -2
- package/lib/_internal/selection/src/Selection.js +17 -7
- package/lib/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/lib/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/lib/_internal/suffix/src/Suffix.d.ts +1 -1
- package/lib/_internal/wave/src/Wave.d.ts +1 -1
- package/lib/_mixins/use-config.d.ts +2 -1
- package/lib/_mixins/use-config.js +11 -5
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_mixins/use-style.d.ts +1 -1
- package/lib/_mixins/use-style.js +1 -1
- package/lib/_styles/common/_common.js +1 -1
- package/lib/_styles/common/light.js +2 -2
- package/lib/_utils/composable/use-collection.d.ts +1 -1
- package/lib/_utils/composable/use-collection.js +2 -0
- package/lib/_utils/css/color-to-class.js +1 -1
- package/lib/_utils/cssr/index.d.ts +1 -1
- package/lib/_utils/vue/wrapper.d.ts +1 -1
- package/lib/affix/src/Affix.d.ts +4 -4
- package/lib/affix/src/Affix.js +4 -2
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/alert/src/Alert.js +7 -1
- package/lib/alert/src/styles/index.cssr.js +4 -0
- package/lib/anchor/src/AnchorAdapter.d.ts +2 -2
- package/lib/anchor/src/BaseAnchor.d.ts +1 -1
- package/lib/anchor/src/BaseAnchor.js +3 -1
- package/lib/anchor/src/Link.d.ts +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -3
- package/lib/auto-complete/src/interface.d.ts +2 -1
- package/lib/avatar/src/Avatar.d.ts +2 -2
- package/lib/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/lib/back-top/src/BackTop.d.ts +2 -2
- package/lib/badge/src/Badge.d.ts +2 -2
- package/lib/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/lib/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/lib/button/src/Button.d.ts +3 -3
- package/lib/button/src/Button.js +2 -2
- package/lib/button-group/src/ButtonGroup.d.ts +2 -2
- package/lib/calendar/src/Calendar.d.ts +2 -2
- package/lib/card/src/Card.d.ts +23 -7
- package/lib/card/src/Card.js +12 -5
- package/lib/carousel/src/Carousel.d.ts +7 -7
- package/lib/carousel/src/Carousel.js +8 -3
- package/lib/carousel/src/CarouselArrow.d.ts +2 -2
- package/lib/carousel/src/CarouselContext.js +3 -1
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/carousel/src/CarouselDots.js +7 -1
- package/lib/carousel/src/CarouselItem.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +3 -2
- package/lib/cascader/src/CascaderMenu.d.ts +1 -1
- package/lib/cascader/src/CascaderOption.d.ts +1 -1
- package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/lib/checkbox/src/Checkbox.d.ts +8 -8
- package/lib/checkbox/src/Checkbox.js +9 -2
- package/lib/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/lib/checkbox/src/styles/index.cssr.js +9 -11
- package/lib/code/src/Code.d.ts +2 -2
- package/lib/collapse/src/Collapse.d.ts +2 -2
- package/lib/collapse/src/CollapseItem.d.ts +2 -2
- package/lib/collapse/src/CollapseItemContent.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/lib/color-picker/src/AlphaSlider.d.ts +1 -1
- package/lib/color-picker/src/ColorInput.d.ts +1 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +2 -2
- package/lib/color-picker/src/ColorPicker.js +6 -2
- package/lib/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/lib/color-picker/src/ColorPickerSwatches.js +9 -4
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/lib/color-picker/src/ColorPreview.d.ts +1 -1
- package/lib/color-picker/src/HueSlider.d.ts +1 -1
- package/lib/color-picker/src/Pallete.d.ts +1 -1
- package/lib/components.d.ts +3 -0
- package/lib/components.js +3 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -8
- package/lib/config-provider/src/ConfigProvider.js +4 -2
- package/lib/config-provider/src/config.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +5 -1
- package/lib/countdown/src/Countdown.d.ts +1 -1
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/DataTable.d.ts +5 -5
- package/lib/data-table/src/DataTable.js +1 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/lib/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/lib/data-table/src/MainTable.d.ts +1 -1
- package/lib/data-table/src/MainTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +5 -6
- package/lib/data-table/src/TableParts/Body.js +22 -15
- package/lib/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/lib/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.js +9 -2
- package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/lib/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/lib/data-table/src/TableParts/Header.d.ts +1 -3
- package/lib/data-table/src/TableParts/Header.js +6 -12
- package/lib/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/lib/data-table/src/interface.d.ts +3 -5
- package/lib/data-table/src/styles/index.cssr.js +2 -0
- package/lib/data-table/src/use-scroll.d.ts +1 -2
- package/lib/data-table/src/use-scroll.js +21 -13
- package/lib/date-picker/src/DatePicker.d.ts +2 -2
- package/lib/date-picker/src/panel/date.d.ts +4 -4
- package/lib/date-picker/src/panel/date.js +3 -1
- package/lib/date-picker/src/panel/daterange.d.ts +4 -4
- package/lib/date-picker/src/panel/daterange.js +10 -2
- package/lib/date-picker/src/panel/datetime.d.ts +4 -4
- package/lib/date-picker/src/panel/datetime.js +3 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/lib/date-picker/src/panel/datetimerange.js +16 -4
- package/lib/date-picker/src/panel/month.d.ts +4 -4
- package/lib/date-picker/src/panel/month.js +4 -1
- package/lib/date-picker/src/panel/monthrange.d.ts +4 -4
- package/lib/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/lib/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-calendar.js +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/lib/date-picker/src/styles/index.cssr.js +1 -0
- package/lib/date-picker/src/utils.js +1 -6
- package/lib/date-picker/styles/_common.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +8 -2
- package/lib/descriptions/src/Descriptions.js +28 -8
- package/lib/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/lib/descriptions/src/DescriptionsItem.js +2 -0
- package/lib/dialog/src/Dialog.d.ts +2 -2
- package/lib/dialog/src/Dialog.js +6 -2
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +4 -4
- package/lib/dialog/src/DialogProvider.js +3 -1
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/discrete/src/InjectionExtractor.d.ts +1 -1
- package/lib/divider/src/Divider.d.ts +2 -2
- package/lib/drawer/src/Drawer.d.ts +15 -2
- package/lib/drawer/src/Drawer.js +2 -2
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/lib/drawer/src/DrawerBodyWrapper.js +25 -1
- package/lib/drawer/src/DrawerContent.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +20 -2
- package/lib/dropdown/src/Dropdown.js +1 -1
- package/lib/dropdown/src/DropdownDivider.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroup.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.js +4 -1
- package/lib/dropdown/src/DropdownOption.d.ts +6 -5
- package/lib/dropdown/src/DropdownOption.js +2 -4
- package/lib/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/lib/dynamic-input/src/DynamicInput.js +21 -9
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -1
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/lib/dynamic-tags/src/DynamicTags.js +6 -4
- package/lib/element/src/Element.d.ts +2 -2
- package/lib/ellipsis/index.d.ts +1 -0
- package/lib/ellipsis/index.js +3 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +3 -1
- package/lib/ellipsis/src/Ellipsis.js +5 -2
- package/lib/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/lib/ellipsis/src/PerformantEllipsis.js +81 -0
- package/lib/empty/src/Empty.d.ts +2 -2
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/src/Equation.d.ts +6 -4
- package/lib/form/src/Form.d.ts +2 -2
- package/lib/form/src/Form.js +3 -1
- package/lib/form/src/FormItem.d.ts +3 -3
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemRow.d.ts +1 -1
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/global-style/src/GlobalStyle.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/Grid.d.ts +2 -2
- package/lib/grid/src/Grid.js +6 -3
- package/lib/grid/src/GridItem.d.ts +1 -1
- package/lib/icon/src/Icon.d.ts +2 -2
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/lib/image/src/Image.d.ts +8 -2
- package/lib/image/src/ImageGroup.d.ts +8 -2
- package/lib/image/src/ImageGroup.js +8 -2
- package/lib/image/src/ImagePreview.d.ts +8 -3
- package/lib/image/src/ImagePreview.js +9 -0
- package/lib/image/src/icons.d.ts +1 -0
- package/lib/image/src/icons.js +3 -1
- package/lib/image/src/interface.d.ts +7 -5
- package/lib/image/src/interface.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/input/src/Input.d.ts +19 -9
- package/lib/input/src/Input.js +30 -8
- package/lib/input/src/InputGroup.d.ts +2 -2
- package/lib/input/src/InputGroupLabel.d.ts +2 -2
- package/lib/input/src/WordCount.d.ts +1 -1
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +3 -2
- package/lib/input-number/src/InputNumber.js +2 -1
- package/lib/input-number/src/interface.d.ts +1 -0
- package/lib/layout/src/Layout.d.ts +10 -4
- package/lib/layout/src/Layout.js +8 -1
- package/lib/layout/src/LayoutContent.d.ts +4 -2
- package/lib/layout/src/LayoutFooter.d.ts +2 -2
- package/lib/layout/src/LayoutHeader.d.ts +2 -2
- package/lib/layout/src/LayoutSider.d.ts +11 -2
- package/lib/layout/src/LayoutSider.js +12 -3
- package/lib/layout/src/ToggleBar.d.ts +1 -1
- package/lib/layout/src/ToggleButton.d.ts +1 -1
- package/lib/legacy-grid/src/Col.d.ts +1 -1
- package/lib/legacy-grid/src/Row.d.ts +2 -2
- package/lib/legacy-grid/src/styles/index.cssr.js +2 -3
- package/lib/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/lib/legacy-transfer/src/Transfer.d.ts +2 -2
- package/lib/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferList.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/lib/list/src/List.d.ts +2 -2
- package/lib/list/src/ListItem.d.ts +1 -1
- package/lib/loading-bar/src/LoadingBar.d.ts +4 -2
- package/lib/loading-bar/src/LoadingBar.js +21 -12
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/lib/loading-bar/src/LoadingBarProvider.js +2 -2
- package/lib/locales/common/arDZ.js +1 -0
- package/lib/locales/common/deDE.js +1 -0
- package/lib/locales/common/enGB.js +1 -0
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +1 -0
- package/lib/locales/common/eo.js +1 -0
- package/lib/locales/common/esAR.js +1 -0
- package/lib/locales/common/faIR.js +1 -0
- package/lib/locales/common/frFR.js +2 -1
- package/lib/locales/common/idID.js +1 -0
- package/lib/locales/common/itIT.js +1 -0
- package/lib/locales/common/jaJP.js +1 -0
- package/lib/locales/common/koKR.js +1 -0
- package/lib/locales/common/nbNO.js +1 -0
- package/lib/locales/common/nlNL.js +1 -0
- package/lib/locales/common/plPL.js +1 -0
- package/lib/locales/common/ptBR.js +15 -17
- package/lib/locales/common/ruRU.js +1 -0
- package/lib/locales/common/skSK.js +1 -0
- package/lib/locales/common/svSE.d.ts +3 -0
- package/lib/locales/common/svSE.js +123 -0
- package/lib/locales/common/thTH.js +1 -0
- package/lib/locales/common/trTR.js +1 -0
- package/lib/locales/common/ukUA.js +1 -0
- package/lib/locales/common/viVN.js +1 -0
- package/lib/locales/common/zhCN.js +1 -0
- package/lib/locales/common/zhTW.js +18 -17
- package/lib/locales/date/svSE.d.ts +3 -0
- package/lib/locales/date/svSE.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +6 -1
- package/lib/log/src/Log.d.ts +11 -11
- package/lib/log/src/Log.js +12 -12
- package/lib/log/src/LogLine.d.ts +1 -1
- package/lib/log/src/LogLoader.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +4 -4
- package/lib/mention/src/utils.js +4 -4
- package/lib/menu/src/Menu.d.ts +32 -15
- package/lib/menu/src/Menu.js +101 -7
- package/lib/menu/src/MenuDivider.d.ts +1 -1
- package/lib/menu/src/MenuOption.d.ts +1 -1
- package/lib/menu/src/MenuOptionContent.d.ts +4 -1
- package/lib/menu/src/MenuOptionContent.js +7 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/Submenu.d.ts +24 -13
- package/lib/menu/src/Submenu.js +9 -8
- package/lib/menu/src/context.d.ts +2 -2
- package/lib/menu/src/interface.d.ts +1 -0
- package/lib/menu/src/styles/index.cssr.js +8 -4
- package/lib/menu/src/use-menu-child.js +5 -5
- package/lib/message/src/Message.d.ts +2 -2
- package/lib/message/src/MessageEnvironment.d.ts +1 -1
- package/lib/message/src/MessageProvider.d.ts +9 -6
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +12 -4
- package/lib/modal/src/Modal.d.ts +18 -6
- package/lib/modal/src/presetProps.d.ts +5 -1
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationContainer.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.js +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +5 -2
- package/lib/notification/src/NotificationProvider.js +2 -2
- package/lib/number-animation/src/NumberAnimation.d.ts +1 -1
- package/lib/page-header/src/PageHeader.d.ts +2 -2
- package/lib/pagination/src/Pagination.d.ts +2 -2
- package/lib/pagination/src/Pagination.js +3 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +22 -3
- package/lib/popconfirm/src/Popconfirm.js +13 -5
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/lib/popover/src/Popover.d.ts +25 -1
- package/lib/popover/src/Popover.js +10 -4
- package/lib/popover/src/PopoverBody.d.ts +23 -2
- package/lib/popover/src/PopoverBody.js +26 -10
- package/lib/popover/src/interface.d.ts +4 -1
- package/lib/popselect/src/Popselect.d.ts +19 -1
- package/lib/popselect/src/Popselect.js +2 -1
- package/lib/popselect/src/PopselectPanel.d.ts +2 -2
- package/lib/popselect/src/PopselectPanel.js +1 -0
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/Line.d.ts +1 -1
- package/lib/progress/src/Line.js +1 -3
- package/lib/progress/src/MultipleCircle.d.ts +1 -1
- package/lib/progress/src/Progress.d.ts +3 -3
- package/lib/qr-code/index.d.ts +2 -0
- package/lib/qr-code/index.js +9 -0
- package/lib/qr-code/src/QrCode.d.ts +154 -0
- package/lib/qr-code/src/QrCode.js +152 -0
- package/lib/qr-code/src/qrcodegen.d.ts +94 -0
- package/lib/qr-code/src/qrcodegen.js +949 -0
- package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/lib/qr-code/src/styles/index.cssr.js +13 -0
- package/lib/qr-code/styles/dark.d.ts +3 -0
- package/lib/qr-code/styles/dark.js +13 -0
- package/lib/qr-code/styles/index.d.ts +3 -0
- package/lib/qr-code/styles/index.js +10 -0
- package/lib/qr-code/styles/light.d.ts +9 -0
- package/lib/qr-code/styles/light.js +14 -0
- package/lib/radio/src/Radio.d.ts +173 -34
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/RadioButton.d.ts +3 -3
- package/lib/radio/src/RadioButton.js +2 -2
- package/lib/radio/src/RadioGroup.d.ts +3 -2
- package/lib/radio/src/RadioGroup.js +2 -1
- package/lib/radio/src/styles/radio-group.cssr.js +1 -0
- package/lib/radio/src/use-radio.d.ts +3 -3
- package/lib/radio/src/use-radio.js +2 -2
- package/lib/rate/src/Rate.d.ts +2 -2
- package/lib/result/src/Result.d.ts +3 -3
- package/lib/scrollbar/src/Scrollbar.d.ts +1 -1
- package/lib/scrollbar/src/Scrollbar.js +2 -0
- package/lib/select/src/Select.d.ts +7 -4
- package/lib/select/src/Select.js +17 -3
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/skeleton/src/Skeleton.d.ts +2 -2
- package/lib/skeleton/src/Skeleton.js +3 -6
- package/lib/slider/src/Slider.d.ts +8 -2
- package/lib/slider/src/Slider.js +19 -4
- package/lib/slider/src/utils.d.ts +2 -2
- package/lib/slider/src/utils.js +5 -3
- package/lib/space/src/Space.d.ts +5 -2
- package/lib/space/src/Space.js +3 -3
- package/lib/spin/src/Spin.d.ts +13 -4
- package/lib/spin/src/Spin.js +25 -6
- package/lib/split/index.d.ts +2 -0
- package/lib/split/index.js +9 -0
- package/lib/split/src/Split.d.ts +135 -0
- package/lib/split/src/Split.js +151 -0
- package/lib/split/src/styles/index.cssr.d.ts +2 -0
- package/lib/split/src/styles/index.cssr.js +30 -0
- package/lib/split/styles/dark.d.ts +3 -0
- package/lib/split/styles/dark.js +8 -0
- package/lib/split/styles/index.d.ts +3 -0
- package/lib/split/styles/index.js +10 -0
- package/lib/split/styles/light.d.ts +9 -0
- package/lib/split/styles/light.js +17 -0
- package/lib/statistic/src/Statistic.d.ts +2 -2
- package/lib/steps/src/Step.d.ts +2 -2
- package/lib/steps/src/Steps.d.ts +3 -3
- package/lib/steps/src/styles/index.cssr.js +1 -0
- package/lib/switch/src/Switch.d.ts +2 -2
- package/lib/table/src/Table.d.ts +2 -2
- package/lib/table/src/Tbody.d.ts +1 -1
- package/lib/table/src/Td.d.ts +1 -1
- package/lib/table/src/Th.d.ts +1 -1
- package/lib/table/src/Thead.d.ts +1 -1
- package/lib/table/src/Tr.d.ts +1 -1
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +3 -1
- package/lib/tabs/src/TabPane.d.ts +1 -1
- package/lib/tabs/src/Tabs.d.ts +13 -13
- package/lib/tabs/src/Tabs.js +15 -2
- package/lib/tabs/src/styles/index.cssr.js +12 -2
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/lib/themes/dark.js +56 -52
- package/lib/themes/light.js +56 -52
- package/lib/thing/src/Thing.d.ts +7 -1
- package/lib/thing/src/Thing.js +13 -4
- package/lib/time/src/Time.d.ts +1 -1
- package/lib/time/src/Time.js +1 -1
- package/lib/time-picker/src/Panel.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +2 -2
- package/lib/time-picker/src/TimePicker.js +1 -1
- package/lib/timeline/src/Timeline.d.ts +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +19 -1
- package/lib/transfer/src/Transfer.d.ts +8 -2
- package/lib/transfer/src/Transfer.js +2 -2
- package/lib/transfer/src/TransferFilter.d.ts +1 -1
- package/lib/transfer/src/TransferHeader.d.ts +5 -1
- package/lib/transfer/src/TransferHeader.js +6 -2
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/transfer/src/TransferListItem.d.ts +1 -1
- package/lib/tree/index.d.ts +1 -0
- package/lib/tree/index.js +3 -1
- package/lib/tree/src/MotionWrapper.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +59 -5
- package/lib/tree/src/Tree.js +31 -18
- package/lib/tree/src/TreeNode.d.ts +6 -2
- package/lib/tree/src/TreeNode.js +72 -25
- package/lib/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/lib/tree/src/TreeNodeCheckbox.js +9 -8
- package/lib/tree/src/TreeNodeContent.d.ts +1 -1
- package/lib/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/lib/tree/src/TreeNodeSwitcher.js +12 -6
- package/lib/tree/src/interface.d.ts +2 -0
- package/lib/tree/src/styles/index.cssr.js +47 -51
- package/lib/tree/src/utils.d.ts +1 -0
- package/lib/tree/src/utils.js +15 -1
- package/lib/tree/styles/light.d.ts +8 -0
- package/lib/tree/styles/light.js +6 -2
- package/lib/tree-select/src/TreeSelect.d.ts +49 -3
- package/lib/tree-select/src/TreeSelect.js +5 -3
- package/lib/tree-select/src/interface.d.ts +2 -0
- package/lib/tree-select/styles/light.d.ts +4 -0
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/blockquote.d.ts +2 -2
- package/lib/typography/src/create-header.d.ts +2 -2
- package/lib/typography/src/headers.d.ts +12 -12
- package/lib/typography/src/hr.d.ts +2 -2
- package/lib/typography/src/li.d.ts +1 -1
- package/lib/typography/src/ol.d.ts +2 -2
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/text.d.ts +2 -2
- package/lib/typography/src/ul.d.ts +2 -2
- package/lib/upload/src/Upload.d.ts +11 -5
- package/lib/upload/src/Upload.js +8 -3
- package/lib/upload/src/UploadDragger.d.ts +1 -1
- package/lib/upload/src/UploadFile.d.ts +2 -2
- package/lib/upload/src/UploadFileList.d.ts +1 -1
- package/lib/upload/src/UploadFileList.js +3 -2
- package/lib/upload/src/UploadProgress.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.js +3 -2
- package/lib/upload/src/interface.d.ts +5 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +9 -0
- package/lib/virtual-list/src/VirtualList.d.ts +146 -0
- package/lib/virtual-list/src/VirtualList.js +105 -0
- package/lib/watermark/src/Watermark.d.ts +1 -1
- package/lib/watermark/src/Watermark.js +7 -0
- package/package.json +69 -69
- package/volar.d.ts +5 -0
- package/web-types.json +917 -32
package/es/tree/src/Tree.js
CHANGED
|
@@ -12,7 +12,7 @@ import { h, ref, toRef, computed, defineComponent, provide, watch, nextTick, wat
|
|
|
12
12
|
import { createTreeMate, flatten, createIndexGetter } from 'treemate';
|
|
13
13
|
import { useMergedState } from 'vooks';
|
|
14
14
|
import { VVirtualList } from 'vueuc';
|
|
15
|
-
import { getPadding } from 'seemly';
|
|
15
|
+
import { depx, getPadding, pxfy } from 'seemly';
|
|
16
16
|
import { treeSelectInjectionKey } from '../../tree-select/src/interface';
|
|
17
17
|
import { useConfig, useTheme, useThemeClass, useRtl } from '../../_mixins';
|
|
18
18
|
import { call, createDataKey, resolveSlot, warn, warnOnce } from '../../_utils';
|
|
@@ -26,10 +26,6 @@ import { treeInjectionKey } from './interface';
|
|
|
26
26
|
import MotionWrapper from './MotionWrapper';
|
|
27
27
|
import { defaultAllowDrop } from './dnd';
|
|
28
28
|
import style from './styles/index.cssr';
|
|
29
|
-
// TODO:
|
|
30
|
-
// During expanding, some node are mis-applied with :active style
|
|
31
|
-
// Async dnd has bug
|
|
32
|
-
const ITEM_SIZE = 30; // 24 + 3 + 3
|
|
33
29
|
export function createTreeMateOptions(keyField, childrenField, disabledField, getChildren) {
|
|
34
30
|
const settledGetChildren = getChildren ||
|
|
35
31
|
((node) => {
|
|
@@ -92,7 +88,7 @@ export const treeProps = Object.assign(Object.assign(Object.assign(Object.assign
|
|
|
92
88
|
}, cancelable: {
|
|
93
89
|
type: Boolean,
|
|
94
90
|
default: true
|
|
95
|
-
}, checkable: Boolean, draggable: Boolean, blockNode: Boolean, blockLine: Boolean, disabled: Boolean, checkedKeys: Array, defaultCheckedKeys: {
|
|
91
|
+
}, checkable: Boolean, draggable: Boolean, blockNode: Boolean, blockLine: Boolean, showLine: Boolean, disabled: Boolean, checkedKeys: Array, defaultCheckedKeys: {
|
|
96
92
|
type: Array,
|
|
97
93
|
default: () => []
|
|
98
94
|
}, selectedKeys: Array, defaultSelectedKeys: {
|
|
@@ -104,9 +100,9 @@ export const treeProps = Object.assign(Object.assign(Object.assign(Object.assign
|
|
|
104
100
|
}, onLoad: Function, cascade: Boolean, selectable: {
|
|
105
101
|
type: Boolean,
|
|
106
102
|
default: true
|
|
107
|
-
}, indent: {
|
|
103
|
+
}, scrollbarProps: Object, indent: {
|
|
108
104
|
type: Number,
|
|
109
|
-
default:
|
|
105
|
+
default: 24
|
|
110
106
|
}, allowDrop: {
|
|
111
107
|
type: Function,
|
|
112
108
|
default: defaultAllowDrop
|
|
@@ -254,11 +250,15 @@ export default defineComponent({
|
|
|
254
250
|
};
|
|
255
251
|
if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {
|
|
256
252
|
// if watching defaultExpandedKeys, we use access props.defaultExpandedKeys inside initiator
|
|
257
|
-
watchEffect(() => {
|
|
253
|
+
watchEffect(() => {
|
|
254
|
+
initUncontrolledExpandedKeys(undefined);
|
|
255
|
+
});
|
|
258
256
|
}
|
|
259
257
|
else {
|
|
260
258
|
// We by default watchEffect since if defaultExpandAll is true, we should remain tree expand if data changes
|
|
261
|
-
watchEffect(() => {
|
|
259
|
+
watchEffect(() => {
|
|
260
|
+
initUncontrolledExpandedKeys(props.defaultExpandedKeys);
|
|
261
|
+
});
|
|
262
262
|
}
|
|
263
263
|
const controlledExpandedKeysRef = toRef(props, 'expandedKeys');
|
|
264
264
|
const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);
|
|
@@ -404,6 +404,7 @@ export default defineComponent({
|
|
|
404
404
|
void nextTick(syncScrollbar);
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
|
+
const nodeHeight = depx(themeRef.value.self.nodeHeight);
|
|
407
408
|
const prevVSet = new Set(prevValue);
|
|
408
409
|
let addedKey = null;
|
|
409
410
|
let removedKey = null;
|
|
@@ -429,7 +430,7 @@ export default defineComponent({
|
|
|
429
430
|
}
|
|
430
431
|
const { virtualScroll } = props;
|
|
431
432
|
const viewportHeight = (virtualScroll ? virtualListInstRef.value.listElRef : selfElRef.value).offsetHeight;
|
|
432
|
-
const viewportItemCount = Math.ceil(viewportHeight /
|
|
433
|
+
const viewportItemCount = Math.ceil(viewportHeight / nodeHeight) + 1;
|
|
433
434
|
// play add animation
|
|
434
435
|
let baseExpandedKeys;
|
|
435
436
|
if (addedKey !== null) {
|
|
@@ -458,7 +459,7 @@ export default defineComponent({
|
|
|
458
459
|
__motion: true,
|
|
459
460
|
mode: 'expand',
|
|
460
461
|
height: virtualScroll
|
|
461
|
-
? expandedChildren.length *
|
|
462
|
+
? expandedChildren.length * nodeHeight
|
|
462
463
|
: undefined,
|
|
463
464
|
nodes: virtualScroll
|
|
464
465
|
? expandedChildren.slice(0, viewportItemCount)
|
|
@@ -482,7 +483,7 @@ export default defineComponent({
|
|
|
482
483
|
__motion: true,
|
|
483
484
|
mode: 'collapse',
|
|
484
485
|
height: virtualScroll
|
|
485
|
-
? collapsedChildren.length *
|
|
486
|
+
? collapsedChildren.length * nodeHeight
|
|
486
487
|
: undefined,
|
|
487
488
|
nodes: virtualScroll
|
|
488
489
|
? collapsedChildren.slice(0, viewportItemCount)
|
|
@@ -1122,6 +1123,7 @@ export default defineComponent({
|
|
|
1122
1123
|
droppingOffsetLevelRef,
|
|
1123
1124
|
fNodesRef,
|
|
1124
1125
|
pendingNodeKeyRef,
|
|
1126
|
+
showLineRef: toRef(props, 'showLine'),
|
|
1125
1127
|
disabledFieldRef: toRef(props, 'disabledField'),
|
|
1126
1128
|
internalScrollableRef: toRef(props, 'internalScrollable'),
|
|
1127
1129
|
internalCheckboxFocusableRef: toRef(props, 'internalCheckboxFocusable'),
|
|
@@ -1169,7 +1171,10 @@ export default defineComponent({
|
|
|
1169
1171
|
}
|
|
1170
1172
|
};
|
|
1171
1173
|
const cssVarsRef = computed(() => {
|
|
1172
|
-
const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor } } = themeRef.value;
|
|
1174
|
+
const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor, nodeWrapperPadding, nodeHeight, lineHeight, lineColor } } = themeRef.value;
|
|
1175
|
+
const lineOffsetTop = getPadding(nodeWrapperPadding, 'top');
|
|
1176
|
+
const lineOffsetBottom = getPadding(nodeWrapperPadding, 'bottom');
|
|
1177
|
+
const nodeContentHeight = pxfy(depx(nodeHeight) - depx(lineOffsetTop) - depx(lineOffsetBottom));
|
|
1173
1178
|
return {
|
|
1174
1179
|
'--n-arrow-color': arrowColor,
|
|
1175
1180
|
'--n-loading-color': loadingColor,
|
|
@@ -1181,7 +1186,13 @@ export default defineComponent({
|
|
|
1181
1186
|
'--n-node-color-pressed': nodeColorPressed,
|
|
1182
1187
|
'--n-node-text-color': nodeTextColor,
|
|
1183
1188
|
'--n-node-text-color-disabled': nodeTextColorDisabled,
|
|
1184
|
-
'--n-drop-mark-color': dropMarkColor
|
|
1189
|
+
'--n-drop-mark-color': dropMarkColor,
|
|
1190
|
+
'--n-node-wrapper-padding': nodeWrapperPadding,
|
|
1191
|
+
'--n-line-offset-top': `-${lineOffsetTop}`,
|
|
1192
|
+
'--n-line-offset-bottom': `-${lineOffsetBottom}`,
|
|
1193
|
+
'--n-node-content-height': nodeContentHeight,
|
|
1194
|
+
'--n-line-height': lineHeight,
|
|
1195
|
+
'--n-line-color': lineColor
|
|
1185
1196
|
};
|
|
1186
1197
|
});
|
|
1187
1198
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -1204,7 +1215,7 @@ export default defineComponent({
|
|
|
1204
1215
|
if (!fNodes.length && internalRenderEmpty) {
|
|
1205
1216
|
return internalRenderEmpty();
|
|
1206
1217
|
}
|
|
1207
|
-
const { mergedClsPrefix, blockNode, blockLine, draggable, disabled, internalFocusable, checkable, handleKeydown, rtlEnabled, handleFocusout } = this;
|
|
1218
|
+
const { mergedClsPrefix, blockNode, blockLine, draggable, disabled, internalFocusable, checkable, handleKeydown, rtlEnabled, handleFocusout, scrollbarProps } = this;
|
|
1208
1219
|
const mergedFocusable = internalFocusable && !disabled;
|
|
1209
1220
|
const tabindex = mergedFocusable ? '0' : undefined;
|
|
1210
1221
|
const treeClass = [
|
|
@@ -1220,11 +1231,13 @@ export default defineComponent({
|
|
|
1220
1231
|
if (this.virtualScroll) {
|
|
1221
1232
|
const { mergedTheme, internalScrollablePadding } = this;
|
|
1222
1233
|
const padding = getPadding(internalScrollablePadding || '0');
|
|
1223
|
-
return (h(NxScrollbar, { ref: "scrollbarInstRef", onDragleave: draggable ? this.handleDragLeaveTree : undefined, container: this.getScrollContainer, content: this.getScrollContent, class: treeClass, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, tabindex: tabindex, onKeydown: mergedFocusable ? handleKeydown : undefined, onFocusout: mergedFocusable ? handleFocusout : undefined }, {
|
|
1234
|
+
return (h(NxScrollbar, Object.assign({}, scrollbarProps, { ref: "scrollbarInstRef", onDragleave: draggable ? this.handleDragLeaveTree : undefined, container: this.getScrollContainer, content: this.getScrollContent, class: treeClass, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, tabindex: tabindex, onKeydown: mergedFocusable ? handleKeydown : undefined, onFocusout: mergedFocusable ? handleFocusout : undefined }), {
|
|
1224
1235
|
default: () => {
|
|
1225
1236
|
var _a;
|
|
1226
1237
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1227
|
-
return
|
|
1238
|
+
return !fNodes.length ? (resolveSlot(this.$slots.empty, () => [
|
|
1239
|
+
h(NEmpty, { class: `${mergedClsPrefix}-tree__empty`, theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
|
|
1240
|
+
])) : (h(VVirtualList, { ref: "virtualListInstRef", items: this.fNodes, itemSize: depx(mergedTheme.self.nodeHeight), ignoreItemResize: this.aip, paddingTop: padding.top, paddingBottom: padding.bottom, class: this.themeClass, style: [
|
|
1228
1241
|
this.cssVars,
|
|
1229
1242
|
{
|
|
1230
1243
|
paddingLeft: padding.left,
|
|
@@ -1240,7 +1253,7 @@ export default defineComponent({
|
|
|
1240
1253
|
treeClass.push(this.themeClass);
|
|
1241
1254
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1242
1255
|
if (internalScrollable) {
|
|
1243
|
-
return (h(NxScrollbar, { class: treeClass, tabindex: tabindex, onKeydown: mergedFocusable ? handleKeydown : undefined, onFocusout: mergedFocusable ? handleFocusout : undefined, style: this.cssVars, contentStyle: { padding: this.internalScrollablePadding } }, {
|
|
1256
|
+
return (h(NxScrollbar, Object.assign({}, scrollbarProps, { class: treeClass, tabindex: tabindex, onKeydown: mergedFocusable ? handleKeydown : undefined, onFocusout: mergedFocusable ? handleFocusout : undefined, style: this.cssVars, contentStyle: { padding: this.internalScrollablePadding } }), {
|
|
1244
1257
|
default: () => (h("div", { onDragleave: draggable ? this.handleDragLeaveTree : undefined, ref: "selfElRef" }, this.fNodes.map(createNode)))
|
|
1245
1258
|
}));
|
|
1246
1259
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PropType, type ComponentPublicInstance } from 'vue';
|
|
1
|
+
import { type PropType, type ComponentPublicInstance, type VNode } from 'vue';
|
|
2
2
|
import { type TmNode } from './interface';
|
|
3
3
|
declare const TreeNode: import("vue").DefineComponent<{
|
|
4
4
|
clsPrefix: {
|
|
@@ -34,10 +34,14 @@ declare const TreeNode: import("vue").DefineComponent<{
|
|
|
34
34
|
droppingOffsetLevel: import("vue").Ref<number>;
|
|
35
35
|
indent: import("vue").Ref<number>;
|
|
36
36
|
checkboxPlacement: "left" | "right";
|
|
37
|
+
showLine: import("vue").Ref<boolean>;
|
|
37
38
|
contentInstRef: import("vue").Ref<ComponentPublicInstance | null>;
|
|
38
39
|
contentElRef: {
|
|
39
40
|
value: HTMLElement | null;
|
|
40
41
|
};
|
|
42
|
+
indentNodes: import("vue").ComputedRef<VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}>[]>;
|
|
41
45
|
handleCheck: (checked: boolean) => void;
|
|
42
46
|
handleDrop: (e: DragEvent) => void;
|
|
43
47
|
handleDragStart: (e: DragEvent) => void;
|
|
@@ -57,5 +61,5 @@ declare const TreeNode: import("vue").DefineComponent<{
|
|
|
57
61
|
type: PropType<TmNode>;
|
|
58
62
|
required: true;
|
|
59
63
|
};
|
|
60
|
-
}>>, {}>;
|
|
64
|
+
}>>, {}, {}>;
|
|
61
65
|
export default TreeNode;
|
package/es/tree/src/TreeNode.js
CHANGED
|
@@ -23,7 +23,7 @@ const TreeNode = defineComponent({
|
|
|
23
23
|
setup(props) {
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
25
|
const NTree = inject(treeInjectionKey);
|
|
26
|
-
const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef } = NTree;
|
|
26
|
+
const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef, showLineRef, renderSwitcherIconRef } = NTree;
|
|
27
27
|
const checkboxDisabledRef = useMemo(() => !!props.tmNode.rawNode.checkboxDisabled);
|
|
28
28
|
const nodeIsDisabledRef = useMemo(() => {
|
|
29
29
|
return isNodeDisabled(props.tmNode, disabledFieldRef.value);
|
|
@@ -44,29 +44,40 @@ const TreeNode = defineComponent({
|
|
|
44
44
|
contentElRef.value = contentInstRef.value.$el;
|
|
45
45
|
});
|
|
46
46
|
function handleSwitcherClick() {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
NTree.loadingKeysRef.value.
|
|
47
|
+
const callback = () => {
|
|
48
|
+
const { tmNode } = props;
|
|
49
|
+
if (!tmNode.isLeaf && !tmNode.shallowLoaded) {
|
|
50
|
+
if (!NTree.loadingKeysRef.value.has(tmNode.key)) {
|
|
51
|
+
NTree.loadingKeysRef.value.add(tmNode.key);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const { onLoadRef: { value: onLoad } } = NTree;
|
|
57
|
+
if (onLoad) {
|
|
58
|
+
void onLoad(tmNode.rawNode)
|
|
59
|
+
.then((value) => {
|
|
60
|
+
if (value !== false) {
|
|
61
|
+
NTree.handleSwitcherClick(tmNode);
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.finally(() => {
|
|
65
|
+
NTree.loadingKeysRef.value.delete(tmNode.key);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
51
68
|
}
|
|
52
69
|
else {
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
const { onLoadRef: { value: onLoad } } = NTree;
|
|
56
|
-
if (onLoad) {
|
|
57
|
-
void onLoad(tmNode.rawNode)
|
|
58
|
-
.then((value) => {
|
|
59
|
-
if (value !== false) {
|
|
60
|
-
NTree.handleSwitcherClick(tmNode);
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
.finally(() => {
|
|
64
|
-
NTree.loadingKeysRef.value.delete(tmNode.key);
|
|
65
|
-
});
|
|
70
|
+
NTree.handleSwitcherClick(tmNode);
|
|
66
71
|
}
|
|
72
|
+
};
|
|
73
|
+
if (renderSwitcherIconRef.value) {
|
|
74
|
+
// if renderSwitcherIcon is set, icon dom may be altered before event
|
|
75
|
+
// bubbles to parent dom, so that target check fails. Call it in next
|
|
76
|
+
// event loop so that event bubble phase is finishes.
|
|
77
|
+
setTimeout(callback, 0);
|
|
67
78
|
}
|
|
68
79
|
else {
|
|
69
|
-
|
|
80
|
+
callback();
|
|
70
81
|
}
|
|
71
82
|
}
|
|
72
83
|
const selectableRef = useMemo(() => !nodeIsDisabledRef.value &&
|
|
@@ -86,8 +97,9 @@ const TreeNode = defineComponent({
|
|
|
86
97
|
if (!checkable)
|
|
87
98
|
return false;
|
|
88
99
|
const { value: checkOnClick } = checkOnClickRef;
|
|
100
|
+
const { tmNode } = props;
|
|
89
101
|
if (typeof checkOnClick === 'boolean') {
|
|
90
|
-
return checkOnClick;
|
|
102
|
+
return !tmNode.disabled && checkOnClick;
|
|
91
103
|
}
|
|
92
104
|
return checkOnClick(props.tmNode.rawNode);
|
|
93
105
|
});
|
|
@@ -178,6 +190,33 @@ const TreeNode = defineComponent({
|
|
|
178
190
|
});
|
|
179
191
|
}
|
|
180
192
|
}
|
|
193
|
+
const indentNodes = computed(() => {
|
|
194
|
+
const { clsPrefix } = props;
|
|
195
|
+
const { value: indent } = indentRef;
|
|
196
|
+
if (showLineRef.value) {
|
|
197
|
+
const indentNodes = [];
|
|
198
|
+
let cursor = props.tmNode.parent;
|
|
199
|
+
while (cursor) {
|
|
200
|
+
if (cursor.isLastChild) {
|
|
201
|
+
indentNodes.push(h("div", { class: `${clsPrefix}-tree-node-indent` },
|
|
202
|
+
h("div", { style: { width: `${indent}px` } })));
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
indentNodes.push(h("div", { class: [
|
|
206
|
+
`${clsPrefix}-tree-node-indent`,
|
|
207
|
+
`${clsPrefix}-tree-node-indent--show-line`
|
|
208
|
+
] },
|
|
209
|
+
h("div", { style: { width: `${indent}px` } })));
|
|
210
|
+
}
|
|
211
|
+
cursor = cursor.parent;
|
|
212
|
+
}
|
|
213
|
+
return indentNodes.reverse();
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
return repeat(props.tmNode.level, h("div", { class: `${props.clsPrefix}-tree-node-indent` },
|
|
217
|
+
h("div", { style: { width: `${indent}px` } })));
|
|
218
|
+
}
|
|
219
|
+
});
|
|
181
220
|
return {
|
|
182
221
|
showDropMark: useMemo(() => {
|
|
183
222
|
const { value: draggingNode } = draggingNodeRef;
|
|
@@ -231,8 +270,10 @@ const TreeNode = defineComponent({
|
|
|
231
270
|
droppingOffsetLevel: droppingOffsetLevelRef,
|
|
232
271
|
indent: indentRef,
|
|
233
272
|
checkboxPlacement: checkboxPlacementRef,
|
|
273
|
+
showLine: showLineRef,
|
|
234
274
|
contentInstRef,
|
|
235
275
|
contentElRef,
|
|
276
|
+
indentNodes,
|
|
236
277
|
handleCheck,
|
|
237
278
|
handleDrop,
|
|
238
279
|
handleDragStart,
|
|
@@ -246,7 +287,7 @@ const TreeNode = defineComponent({
|
|
|
246
287
|
};
|
|
247
288
|
},
|
|
248
289
|
render() {
|
|
249
|
-
const { tmNode, clsPrefix, checkable, expandOnClick, selectable, selected, checked, highlight, draggable, blockLine, indent, disabled, pending, internalScrollable, nodeProps, checkboxPlacement } = this;
|
|
290
|
+
const { tmNode, clsPrefix, checkable, expandOnClick, selectable, selected, checked, highlight, draggable, blockLine, indent, indentNodes, disabled, pending, internalScrollable, nodeProps, checkboxPlacement } = this;
|
|
250
291
|
// drag start not inside
|
|
251
292
|
// it need to be append to node itself, not wrapper
|
|
252
293
|
const dragEventHandlers = draggable && !disabled
|
|
@@ -262,7 +303,7 @@ const TreeNode = defineComponent({
|
|
|
262
303
|
// scrolled to, so we need data-key to query the target element.
|
|
263
304
|
const dataKey = internalScrollable ? createDataKey(tmNode.key) : undefined;
|
|
264
305
|
const checkboxOnRight = checkboxPlacement === 'right';
|
|
265
|
-
const checkboxNode = checkable ? (h(NTreeNodeCheckbox, { right: checkboxOnRight, focusable: this.checkboxFocusable, disabled: disabled || this.checkboxDisabled, clsPrefix: clsPrefix, checked: this.checked, indeterminate: this.indeterminate, onCheck: this.handleCheck })) : null;
|
|
306
|
+
const checkboxNode = checkable ? (h(NTreeNodeCheckbox, { indent: indent, right: checkboxOnRight, focusable: this.checkboxFocusable, disabled: disabled || this.checkboxDisabled, clsPrefix: clsPrefix, checked: this.checked, indeterminate: this.indeterminate, onCheck: this.handleCheck })) : null;
|
|
266
307
|
return (h("div", Object.assign({ class: `${clsPrefix}-tree-node-wrapper` }, dragEventHandlers),
|
|
267
308
|
h("div", Object.assign({}, (blockLine ? nodeProps : undefined), { class: [
|
|
268
309
|
`${clsPrefix}-tree-node`,
|
|
@@ -279,9 +320,15 @@ const TreeNode = defineComponent({
|
|
|
279
320
|
], "data-key": dataKey, draggable: draggable && blockLine, onClick: this.handleLineClick, onDragstart: draggable && blockLine && !disabled
|
|
280
321
|
? this.handleDragStart
|
|
281
322
|
: undefined }),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
323
|
+
indentNodes,
|
|
324
|
+
tmNode.isLeaf && this.showLine ? (h("div", { class: [
|
|
325
|
+
`${clsPrefix}-tree-node-indent`,
|
|
326
|
+
`${clsPrefix}-tree-node-indent--show-line`,
|
|
327
|
+
tmNode.isLeaf && `${clsPrefix}-tree-node-indent--is-leaf`,
|
|
328
|
+
tmNode.isLastChild &&
|
|
329
|
+
`${clsPrefix}-tree-node-indent--last-child`
|
|
330
|
+
] },
|
|
331
|
+
h("div", { style: { width: `${indent}px` } }))) : (h(NTreeNodeSwitcher, { clsPrefix: clsPrefix, expanded: this.expanded, selected: selected, loading: this.loading, hide: tmNode.isLeaf, tmNode: this.tmNode, indent: indent, onClick: this.handleSwitcherClick })),
|
|
285
332
|
!checkboxOnRight ? checkboxNode : null,
|
|
286
333
|
h(NTreeNodeContent, { ref: "contentInstRef", clsPrefix: clsPrefix, checked: checked, selected: selected, onClick: this.handleContentClick, nodeProps: blockLine ? undefined : nodeProps, onDragstart: draggable && !blockLine && !disabled
|
|
287
334
|
? this.handleDragStart
|
|
@@ -4,6 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
type: StringConstructor;
|
|
5
5
|
required: true;
|
|
6
6
|
};
|
|
7
|
+
indent: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
7
11
|
right: BooleanConstructor;
|
|
8
12
|
focusable: BooleanConstructor;
|
|
9
13
|
disabled: BooleanConstructor;
|
|
@@ -120,6 +124,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
124
|
};
|
|
121
125
|
self: {
|
|
122
126
|
fontSize: string;
|
|
127
|
+
lineHeight: string;
|
|
128
|
+
nodeHeight: string;
|
|
129
|
+
nodeWrapperPadding: string;
|
|
123
130
|
nodeBorderRadius: string;
|
|
124
131
|
nodeColorHover: string;
|
|
125
132
|
nodeColorPressed: string;
|
|
@@ -129,6 +136,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
129
136
|
nodeTextColorDisabled: string;
|
|
130
137
|
loadingColor: string;
|
|
131
138
|
dropMarkColor: string;
|
|
139
|
+
lineColor: string;
|
|
132
140
|
};
|
|
133
141
|
peers: {
|
|
134
142
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
@@ -202,6 +210,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
202
210
|
type: StringConstructor;
|
|
203
211
|
required: true;
|
|
204
212
|
};
|
|
213
|
+
indent: {
|
|
214
|
+
type: NumberConstructor;
|
|
215
|
+
required: true;
|
|
216
|
+
};
|
|
205
217
|
right: BooleanConstructor;
|
|
206
218
|
focusable: BooleanConstructor;
|
|
207
219
|
disabled: BooleanConstructor;
|
|
@@ -214,5 +226,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
214
226
|
checked: boolean;
|
|
215
227
|
indeterminate: boolean;
|
|
216
228
|
focusable: boolean;
|
|
217
|
-
}>;
|
|
229
|
+
}, {}>;
|
|
218
230
|
export default _default;
|
|
@@ -8,6 +8,10 @@ export default defineComponent({
|
|
|
8
8
|
type: String,
|
|
9
9
|
required: true
|
|
10
10
|
},
|
|
11
|
+
indent: {
|
|
12
|
+
type: Number,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
11
15
|
right: Boolean,
|
|
12
16
|
focusable: Boolean,
|
|
13
17
|
disabled: Boolean,
|
|
@@ -25,12 +29,7 @@ export default defineComponent({
|
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
function handleUpdateValue(value) {
|
|
28
|
-
|
|
29
|
-
doCheck(false);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
doCheck(value);
|
|
33
|
-
}
|
|
32
|
+
doCheck(value);
|
|
34
33
|
}
|
|
35
34
|
return {
|
|
36
35
|
handleUpdateValue,
|
|
@@ -38,11 +37,13 @@ export default defineComponent({
|
|
|
38
37
|
};
|
|
39
38
|
},
|
|
40
39
|
render() {
|
|
41
|
-
const { clsPrefix, mergedTheme, checked, indeterminate, disabled, focusable, handleUpdateValue } = this;
|
|
40
|
+
const { clsPrefix, mergedTheme, checked, indeterminate, disabled, focusable, indent, handleUpdateValue } = this;
|
|
42
41
|
return (h("span", { class: [
|
|
43
42
|
`${clsPrefix}-tree-node-checkbox`,
|
|
44
43
|
this.right && `${clsPrefix}-tree-node-checkbox--right`
|
|
45
|
-
],
|
|
44
|
+
], style: {
|
|
45
|
+
width: `${indent}px`
|
|
46
|
+
}, "data-checkbox": true },
|
|
46
47
|
h(NCheckbox, { focusable: focusable, disabled: disabled, theme: mergedTheme.peers.Checkbox, themeOverrides: mergedTheme.peerOverrides.Checkbox, checked: checked, indeterminate: indeterminate, onUpdateChecked: handleUpdateValue })));
|
|
47
48
|
}
|
|
48
49
|
});
|
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
+
import { type TmNode } from './interface';
|
|
2
3
|
declare const _default: import("vue").DefineComponent<{
|
|
3
4
|
clsPrefix: {
|
|
4
5
|
type: StringConstructor;
|
|
5
6
|
required: true;
|
|
6
7
|
};
|
|
8
|
+
indent: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
7
12
|
expanded: BooleanConstructor;
|
|
8
13
|
selected: BooleanConstructor;
|
|
9
14
|
hide: BooleanConstructor;
|
|
10
15
|
loading: BooleanConstructor;
|
|
11
16
|
onClick: PropType<(e: MouseEvent) => void>;
|
|
17
|
+
tmNode: {
|
|
18
|
+
type: PropType<TmNode>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
12
21
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
22
|
clsPrefix: {
|
|
14
23
|
type: StringConstructor;
|
|
15
24
|
required: true;
|
|
16
25
|
};
|
|
26
|
+
indent: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
17
30
|
expanded: BooleanConstructor;
|
|
18
31
|
selected: BooleanConstructor;
|
|
19
32
|
hide: BooleanConstructor;
|
|
20
33
|
loading: BooleanConstructor;
|
|
21
34
|
onClick: PropType<(e: MouseEvent) => void>;
|
|
35
|
+
tmNode: {
|
|
36
|
+
type: PropType<TmNode>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
22
39
|
}>>, {
|
|
23
40
|
hide: boolean;
|
|
24
41
|
expanded: boolean;
|
|
25
|
-
selected: boolean;
|
|
26
42
|
loading: boolean;
|
|
27
|
-
|
|
43
|
+
selected: boolean;
|
|
44
|
+
}, {}>;
|
|
28
45
|
export default _default;
|
|
@@ -9,22 +9,27 @@ export default defineComponent({
|
|
|
9
9
|
type: String,
|
|
10
10
|
required: true
|
|
11
11
|
},
|
|
12
|
+
indent: { type: Number, required: true },
|
|
12
13
|
expanded: Boolean,
|
|
13
14
|
selected: Boolean,
|
|
14
15
|
hide: Boolean,
|
|
15
16
|
loading: Boolean,
|
|
16
|
-
onClick: Function
|
|
17
|
+
onClick: Function,
|
|
18
|
+
tmNode: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
17
22
|
},
|
|
18
23
|
setup(props) {
|
|
19
24
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
25
|
const { renderSwitcherIconRef } = inject(treeInjectionKey, null);
|
|
21
26
|
return () => {
|
|
22
|
-
const { clsPrefix } = props;
|
|
27
|
+
const { clsPrefix, expanded, hide, indent, onClick } = props;
|
|
23
28
|
return (h("span", { "data-switcher": true, class: [
|
|
24
29
|
`${clsPrefix}-tree-node-switcher`,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
], onClick:
|
|
30
|
+
expanded && `${clsPrefix}-tree-node-switcher--expanded`,
|
|
31
|
+
hide && `${clsPrefix}-tree-node-switcher--hide`
|
|
32
|
+
], style: { width: `${indent}px` }, onClick: onClick },
|
|
28
33
|
h("div", { class: `${clsPrefix}-tree-node-switcher__icon` },
|
|
29
34
|
h(NIconSwitchTransition, null, {
|
|
30
35
|
default: () => {
|
|
@@ -34,7 +39,8 @@ export default defineComponent({
|
|
|
34
39
|
const { value: renderSwitcherIcon } = renderSwitcherIconRef;
|
|
35
40
|
return renderSwitcherIcon ? (renderSwitcherIcon({
|
|
36
41
|
expanded: props.expanded,
|
|
37
|
-
selected: props.selected
|
|
42
|
+
selected: props.selected,
|
|
43
|
+
option: props.tmNode.rawNode
|
|
38
44
|
})) : (h(NBaseIcon, { clsPrefix: clsPrefix, key: "switcher" }, { default: () => h(SwitcherIcon, null) }));
|
|
39
45
|
}
|
|
40
46
|
}))));
|
|
@@ -56,6 +56,7 @@ export interface InternalDropInfo {
|
|
|
56
56
|
export type RenderSwitcherIcon = (props: {
|
|
57
57
|
expanded: boolean;
|
|
58
58
|
selected: boolean;
|
|
59
|
+
option: TreeOption;
|
|
59
60
|
}) => VNodeChild;
|
|
60
61
|
export type CheckOnClick = (option: TreeOption) => boolean;
|
|
61
62
|
export interface TreeInjection {
|
|
@@ -96,6 +97,7 @@ export interface TreeInjection {
|
|
|
96
97
|
internalTreeSelect: boolean;
|
|
97
98
|
checkOnClickRef: Ref<boolean | CheckOnClick>;
|
|
98
99
|
disabledFieldRef: Ref<string>;
|
|
100
|
+
showLineRef: Ref<boolean>;
|
|
99
101
|
handleSwitcherClick: (node: TreeNode<TreeOption>) => void;
|
|
100
102
|
handleSelect: (node: TreeNode<TreeOption>) => void;
|
|
101
103
|
handleCheck: (node: TreeNode<TreeOption>, checked: boolean) => void;
|