vft 0.0.73 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/component.js +67 -48
- package/es/components/affix/affix.js +45 -0
- package/es/components/affix/affix.vue.js +4 -0
- package/es/components/affix/affix.vue2.js +83 -0
- package/es/components/affix/index.js +12 -0
- package/es/components/affix/style/css.js +2 -0
- package/es/components/affix/style/index.js +2 -0
- package/es/components/back-top/back-top.vue2.js +10 -2
- package/es/components/button/button.vue2.js +58 -59
- package/es/components/button/use-button.js +26 -20
- package/es/components/card/card.vue.js +4 -0
- package/es/components/card/card.vue2.js +44 -0
- package/es/components/card/index.js +12 -0
- package/es/components/card/instance.js +1 -0
- package/es/components/card/style/css.js +2 -0
- package/es/components/card/style/index.js +2 -0
- package/es/components/check-tag/check-tag.vue.js +4 -0
- package/es/components/check-tag/check-tag.vue2.js +35 -0
- package/es/components/check-tag/index.js +12 -0
- package/es/components/check-tag/style/css.js +2 -0
- package/es/components/check-tag/style/index.js +2 -0
- package/es/components/color-picker/color-picker.vue2.js +1 -1
- package/es/components/context-menu/context-menu.vue2.js +10 -2
- package/es/components/date-picker/composables/use-month-range-header.js +1 -1
- package/es/components/date-picker/constants.js +16 -2
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +37 -34
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +0 -1
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +177 -178
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +328 -336
- package/es/components/date-picker/date-picker.js +18 -18
- package/es/components/date-picker/index.js +5 -4
- package/es/components/date-picker/props/shared.js +1 -1
- package/es/components/date-time-select/date-time-select.vue2.js +59 -59
- package/es/components/dialog/dialog.vue2.js +12 -12
- package/es/components/dialog/hooks/use-dialog.js +4 -4
- package/es/components/dropdown/dropdown-menu.vue2.js +4 -4
- package/es/components/footer-layout/footer-layout.vue2.js +10 -2
- package/es/components/header-layout/header-layout.vue2.js +10 -2
- package/es/components/horizontal-menu/constants.js +4 -0
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +153 -86
- package/es/components/horizontal-menu/index.js +7 -5
- package/es/components/index.js +228 -194
- package/es/components/md-container/md-container.vue2.js +10 -2
- package/es/components/menu/menu-item.vue2.js +58 -58
- package/es/components/menu/menu.vue2.js +72 -68
- package/es/components/menu/sub-menu.vue2.js +139 -117
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -26
- package/es/components/option/style/css.js +2 -0
- package/es/components/option/style/index.js +2 -0
- package/es/components/option-group/style/css.js +2 -0
- package/es/components/option-group/style/index.js +2 -0
- package/es/components/popconfirm/index.js +12 -0
- package/es/components/popconfirm/popconfirm.vue.js +4 -0
- package/es/components/popconfirm/popconfirm.vue2.js +112 -0
- package/es/components/popconfirm/style/css.js +6 -0
- package/es/components/popconfirm/style/index.js +6 -0
- package/es/components/popover/style/index.js +1 -1
- package/es/components/result/result.vue2.js +10 -2
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +1 -1
- package/es/components/search/style/css.js +2 -0
- package/es/components/search/style/index.js +2 -0
- package/es/components/select/index.js +22 -0
- package/es/components/select/option-group.vue.js +25 -0
- package/es/components/select/option-group.vue2.js +53 -0
- package/es/components/select/option.vue.js +27 -0
- package/es/components/select/option.vue2.js +58 -0
- package/es/components/select/options.js +34 -0
- package/es/components/select/select-dropdown.vue.js +15 -0
- package/es/components/select/select-dropdown.vue2.js +32 -0
- package/es/components/select/select.vue.js +327 -0
- package/es/components/select/select.vue2.js +348 -0
- package/es/components/select/style/css.js +8 -0
- package/es/components/select/style/index.js +8 -0
- package/es/components/select/token.js +5 -0
- package/es/components/select/useOption.js +71 -0
- package/es/components/select/useSelect.js +414 -0
- package/es/components/select-v2/select-dropdown.js +1 -1
- package/es/components/select-v2/useSelect.js +269 -269
- package/es/components/side-menu/side-menu.vue2.js +153 -142
- package/es/components/skeleton/index.js +16 -0
- package/es/components/skeleton/skeleton-item.vue.js +4 -0
- package/es/components/skeleton/skeleton-item.vue2.js +31 -0
- package/es/components/skeleton/skeleton.vue.js +4 -0
- package/es/components/skeleton/skeleton.vue2.js +55 -0
- package/es/components/skeleton/style/css.js +3 -0
- package/es/components/skeleton/style/index.js +3 -0
- package/es/components/skeleton-item/style/css.js +2 -0
- package/es/components/skeleton-item/style/index.js +2 -0
- package/es/components/space/index.js +17 -0
- package/es/components/space/item.js +24 -0
- package/es/components/space/space.js +182 -0
- package/es/components/space/style/css.js +2 -0
- package/es/components/space/style/index.js +2 -0
- package/es/components/space/use-space.js +44 -0
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/tabs/tab-nav.vue2.js +30 -22
- package/es/components/tabs/tabs.vue2.js +37 -37
- package/es/components/time-picker/common/picker.vue2.js +241 -257
- package/es/components/time-picker/common/props.js +10 -6
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +1 -1
- package/es/components/time-picker/time-picker.js +10 -10
- package/es/components/time-select/time-select.vue2.js +38 -42
- package/es/components/tooltip/content.vue2.js +1 -1
- package/es/components/tree/index.js +14 -0
- package/es/components/tree/model/node.js +248 -0
- package/es/components/tree/model/tree-store.js +197 -0
- package/es/components/tree/model/useDragNode.js +71 -0
- package/es/components/tree/model/useKeydown.js +81 -0
- package/es/components/tree/model/useNodeExpandEventBroadcast.js +19 -0
- package/es/components/tree/model/util.js +21 -0
- package/es/components/tree/style/css.js +3 -0
- package/es/components/tree/style/index.js +3 -0
- package/es/components/tree/tree-node-content.vue.js +4 -0
- package/es/components/tree/tree-node-content.vue2.js +28 -0
- package/es/components/tree/tree-node.vue.js +98 -0
- package/es/components/tree/tree-node.vue2.js +152 -0
- package/es/components/tree/tree.type.js +1 -0
- package/es/components/tree/tree.vue.js +48 -0
- package/es/components/tree/tree.vue2.js +268 -0
- package/es/components/tree-select/cache-options.js +32 -0
- package/es/components/tree-select/index.js +9 -0
- package/es/components/tree-select/select.js +38 -0
- package/es/components/tree-select/style/css.js +11 -0
- package/es/components/tree-select/style/index.js +11 -0
- package/es/components/tree-select/tree-select-option.js +21 -0
- package/es/components/tree-select/tree-select.vue.js +4 -0
- package/es/components/tree-select/tree-select.vue2.js +81 -0
- package/es/components/tree-select/tree.js +137 -0
- package/es/components/tree-select/utils.js +45 -0
- package/es/hooks/index.js +25 -21
- package/es/hooks/use-focus/index.js +9 -0
- package/es/hooks/use-throttle-render/index.js +21 -0
- package/es/index.js +408 -368
- package/es/package.json.js +1 -1
- package/es/utils/helper.js +5 -2
- package/es/utils/index.js +48 -46
- package/lib/component.cjs +1 -1
- package/lib/components/affix/affix.cjs +1 -0
- package/lib/components/affix/affix.vue.cjs +1 -0
- package/lib/components/affix/affix.vue2.cjs +1 -0
- package/lib/components/affix/index.cjs +1 -0
- package/lib/components/affix/style/css.cjs +1 -0
- package/lib/components/affix/style/index.cjs +1 -0
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/card/card.vue.cjs +1 -0
- package/lib/components/card/card.vue2.cjs +1 -0
- package/lib/components/card/index.cjs +1 -0
- package/lib/components/card/instance.cjs +1 -0
- package/lib/components/card/style/css.cjs +1 -0
- package/lib/components/card/style/index.cjs +1 -0
- package/lib/components/check-tag/check-tag.vue.cjs +1 -0
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -0
- package/lib/components/check-tag/index.cjs +1 -0
- package/lib/components/check-tag/style/css.cjs +1 -0
- package/lib/components/check-tag/style/index.cjs +1 -0
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/constants.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.cjs +1 -1
- package/lib/components/date-picker/index.cjs +1 -1
- package/lib/components/date-picker/props/shared.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/dialog/hooks/use-dialog.cjs +1 -1
- package/lib/components/dropdown/dropdown-menu.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/constants.cjs +1 -0
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/index.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/option/style/css.cjs +1 -0
- package/lib/components/option/style/index.cjs +1 -0
- package/lib/components/option-group/style/css.cjs +1 -0
- package/lib/components/option-group/style/index.cjs +1 -0
- package/lib/components/popconfirm/index.cjs +1 -0
- package/lib/components/popconfirm/popconfirm.vue.cjs +1 -0
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -0
- package/lib/components/popconfirm/style/css.cjs +1 -0
- package/lib/components/popconfirm/style/index.cjs +1 -0
- package/lib/components/popover/style/index.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/search/style/css.cjs +1 -1
- package/lib/components/search/style/index.cjs +1 -1
- package/lib/components/select/index.cjs +1 -0
- package/lib/components/select/option-group.vue.cjs +1 -0
- package/lib/components/select/option-group.vue2.cjs +1 -0
- package/lib/components/select/option.vue.cjs +1 -0
- package/lib/components/select/option.vue2.cjs +1 -0
- package/lib/components/select/options.cjs +1 -0
- package/lib/components/select/select-dropdown.vue.cjs +1 -0
- package/lib/components/select/select-dropdown.vue2.cjs +1 -0
- package/lib/components/select/select.vue.cjs +1 -0
- package/lib/components/select/select.vue2.cjs +1 -0
- package/lib/components/select/style/css.cjs +1 -0
- package/lib/components/select/style/index.cjs +1 -0
- package/lib/components/select/token.cjs +1 -0
- package/lib/components/select/useOption.cjs +1 -0
- package/lib/components/select/useSelect.cjs +1 -0
- package/lib/components/select-v2/select-dropdown.cjs +1 -1
- package/lib/components/select-v2/useSelect.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/index.cjs +1 -0
- package/lib/components/skeleton/skeleton-item.vue.cjs +1 -0
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -0
- package/lib/components/skeleton/skeleton.vue.cjs +1 -0
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -0
- package/lib/components/skeleton/style/css.cjs +1 -0
- package/lib/components/skeleton/style/index.cjs +1 -0
- package/lib/components/skeleton-item/style/css.cjs +1 -0
- package/lib/components/skeleton-item/style/index.cjs +1 -0
- package/lib/components/space/index.cjs +1 -0
- package/lib/components/space/item.cjs +1 -0
- package/lib/components/space/space.cjs +1 -0
- package/lib/components/space/style/css.cjs +1 -0
- package/lib/components/space/style/index.cjs +1 -0
- package/lib/components/space/use-space.cjs +1 -0
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/common/props.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tree/index.cjs +1 -0
- package/lib/components/tree/model/node.cjs +1 -0
- package/lib/components/tree/model/tree-store.cjs +1 -0
- package/lib/components/tree/model/useDragNode.cjs +1 -0
- package/lib/components/tree/model/useKeydown.cjs +1 -0
- package/lib/components/tree/model/useNodeExpandEventBroadcast.cjs +1 -0
- package/lib/components/tree/model/util.cjs +1 -0
- package/lib/components/tree/style/css.cjs +1 -0
- package/lib/components/tree/style/index.cjs +1 -0
- package/lib/components/tree/tree-node-content.vue.cjs +1 -0
- package/lib/components/tree/tree-node-content.vue2.cjs +1 -0
- package/lib/components/tree/tree-node.vue.cjs +1 -0
- package/lib/components/tree/tree-node.vue2.cjs +1 -0
- package/lib/components/tree/tree.type.cjs +1 -0
- package/lib/components/tree/tree.vue.cjs +1 -0
- package/lib/components/tree/tree.vue2.cjs +1 -0
- package/lib/components/tree-select/cache-options.cjs +1 -0
- package/lib/components/tree-select/index.cjs +1 -0
- package/lib/components/tree-select/select.cjs +1 -0
- package/lib/components/tree-select/style/css.cjs +1 -0
- package/lib/components/tree-select/style/index.cjs +1 -0
- package/lib/components/tree-select/tree-select-option.cjs +1 -0
- package/lib/components/tree-select/tree-select.vue.cjs +1 -0
- package/lib/components/tree-select/tree-select.vue2.cjs +1 -0
- package/lib/components/tree-select/tree.cjs +1 -0
- package/lib/components/tree-select/utils.cjs +1 -0
- package/lib/hooks/index.cjs +1 -1
- package/lib/hooks/use-focus/index.cjs +1 -0
- package/lib/hooks/use-throttle-render/index.cjs +1 -0
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/utils/helper.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/alert.scss +1 -1
- package/theme-style/src/autocomplete.scss +2 -2
- package/theme-style/src/breadcrumb.scss +4 -4
- package/theme-style/src/calendar.scss +2 -2
- package/theme-style/src/card.scss +1 -1
- package/theme-style/src/carousel.scss +1 -1
- package/theme-style/src/cascader.scss +3 -3
- package/theme-style/src/check-tag.scss +3 -3
- package/theme-style/src/checkbox.scss +1 -1
- package/theme-style/src/color-picker.scss +2 -2
- package/theme-style/src/common/var.scss +527 -521
- package/theme-style/src/date-picker/date-picker.scss +1 -1
- package/theme-style/src/date-picker/date-range-picker.scss +2 -2
- package/theme-style/src/date-picker/date-table.scss +1 -1
- package/theme-style/src/date-picker/month-table.scss +2 -2
- package/theme-style/src/date-picker/picker-panel.scss +4 -5
- package/theme-style/src/date-picker/picker.scss +7 -9
- package/theme-style/src/date-picker/time-picker.scss +2 -2
- package/theme-style/src/date-picker/time-spinner.scss +6 -8
- package/theme-style/src/date-picker/year-table.scss +3 -3
- package/theme-style/src/date-time-select.scss +3 -4
- package/theme-style/src/descriptions-item.scss +4 -4
- package/theme-style/src/descriptions.scss +2 -2
- package/theme-style/src/header-layout.scss +1 -1
- package/theme-style/src/horizontal-menu.scss +27 -39
- package/theme-style/src/image-viewer.scss +1 -1
- package/theme-style/src/index.scss +3 -0
- package/theme-style/src/input-number.scss +1 -1
- package/theme-style/src/menu.scss +76 -66
- package/theme-style/src/mixins/_var.scss +2 -2
- package/theme-style/src/mixins/mixins.scss +2 -2
- package/theme-style/src/popconfirm.scss +16 -0
- package/theme-style/src/popper.scss +4 -2
- package/theme-style/src/progress.scss +1 -1
- package/theme-style/src/reset.scss +3 -3
- package/theme-style/src/result.scss +2 -2
- package/theme-style/src/select-dropdown-v2.scss +1 -1
- package/theme-style/src/select-dropdown.scss +1 -1
- package/theme-style/src/select-v2.scss +2 -2
- package/theme-style/src/select.scss +4 -5
- package/theme-style/src/side-menu.scss +0 -1
- package/theme-style/src/skeleton-item.scss +83 -0
- package/theme-style/src/skeleton.scss +44 -0
- package/theme-style/src/step.scss +10 -10
- package/theme-style/src/tabs.scss +15 -155
- package/theme-style/src/timeline-item.scss +2 -2
- package/theme-style/src/transfer.scss +5 -5
- package/theme-style/src/tree.scss +2 -5
- package/theme-style/src/upload.scss +11 -11
- package/theme-style/src/var.scss +1 -1
- package/theme-style/vft-alert.css +1 -1
- package/theme-style/vft-autocomplete.css +1 -1
- package/theme-style/vft-breadcrumb.css +1 -1
- package/theme-style/vft-calendar.css +1 -1
- package/theme-style/vft-card.css +1 -1
- package/theme-style/vft-carousel.css +1 -1
- package/theme-style/vft-cascader.css +1 -1
- package/theme-style/vft-check-tag.css +1 -1
- package/theme-style/vft-checkbox.css +1 -1
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-date-time-select.css +1 -1
- package/theme-style/vft-descriptions-item.css +1 -1
- package/theme-style/vft-descriptions.css +1 -1
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-horizontal-menu.css +1 -1
- package/theme-style/vft-image-viewer.css +1 -1
- package/theme-style/vft-input-number.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-popconfirm.css +1 -0
- package/theme-style/vft-popper.css +1 -1
- package/theme-style/vft-progress.css +1 -1
- package/theme-style/vft-reset.css +1 -1
- package/theme-style/vft-result.css +1 -1
- package/theme-style/vft-select-dropdown-v2.css +1 -1
- package/theme-style/vft-select-dropdown.css +1 -1
- package/theme-style/vft-select-v2.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-skeleton-item.css +1 -0
- package/theme-style/vft-skeleton.css +1 -0
- package/theme-style/vft-step.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/theme-style/vft-timeline-item.css +1 -1
- package/theme-style/vft-transfer.css +1 -1
- package/theme-style/vft-tree.css +1 -1
- package/theme-style/vft-upload.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
|
@@ -2,10 +2,11 @@ import "@vft/utils";
|
|
|
2
2
|
import "vue";
|
|
3
3
|
import { buildProps as t, definePropType as e } from "../../../utils/vue/props/runtime.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
+
import { componentSizes as a } from "../../../constants/size.js";
|
|
5
6
|
import "../../../utils/ns-cover.js";
|
|
6
7
|
import "lodash";
|
|
7
|
-
import { disabledTimeListsProps as
|
|
8
|
-
const
|
|
8
|
+
import { disabledTimeListsProps as r } from "../props/shared.js";
|
|
9
|
+
const f = t({
|
|
9
10
|
/**
|
|
10
11
|
* @description same as `id` in native input
|
|
11
12
|
*/
|
|
@@ -52,7 +53,8 @@ const u = t({
|
|
|
52
53
|
* @description Custom clear icon component
|
|
53
54
|
*/
|
|
54
55
|
clearIcon: {
|
|
55
|
-
type: e([String, Object])
|
|
56
|
+
type: e([String, Object]),
|
|
57
|
+
default: "ico-ep:circle-close"
|
|
56
58
|
},
|
|
57
59
|
/**
|
|
58
60
|
* @description whether the input is editable
|
|
@@ -72,7 +74,9 @@ const u = t({
|
|
|
72
74
|
* @description size of Input
|
|
73
75
|
*/
|
|
74
76
|
size: {
|
|
75
|
-
type:
|
|
77
|
+
type: String,
|
|
78
|
+
values: a,
|
|
79
|
+
required: !1
|
|
76
80
|
},
|
|
77
81
|
/**
|
|
78
82
|
* @description whether TimePicker is read only
|
|
@@ -143,7 +147,7 @@ const u = t({
|
|
|
143
147
|
type: Boolean,
|
|
144
148
|
default: !1
|
|
145
149
|
},
|
|
146
|
-
...
|
|
150
|
+
...r,
|
|
147
151
|
/**
|
|
148
152
|
* @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean
|
|
149
153
|
*/
|
|
@@ -197,5 +201,5 @@ const u = t({
|
|
|
197
201
|
unlinkPanels: Boolean
|
|
198
202
|
});
|
|
199
203
|
export {
|
|
200
|
-
|
|
204
|
+
f as timePickerDefaultProps
|
|
201
205
|
};
|
|
@@ -6,8 +6,8 @@ import "@popperjs/core";
|
|
|
6
6
|
import "../../../hooks/use-z-index/index.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import { isArray as M } from "@vft/utils";
|
|
9
|
-
import "../../../utils/ns-cover.js";
|
|
10
9
|
import { EVENT_CODE as ve } from "../../../constants/aria.js";
|
|
10
|
+
import "../../../utils/ns-cover.js";
|
|
11
11
|
import { panelTimeRangeProps as he } from "../props/panel-time-range.js";
|
|
12
12
|
import { useTimePanel as ke } from "../composables/use-time-panel.js";
|
|
13
13
|
import { useOldValue as Se, buildAvailableTimeSlotGetter as De } from "../composables/use-time-picker.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as p, ref as
|
|
1
|
+
import { defineComponent as p, ref as f, provide as s, createVNode as m, mergeProps as u } from "vue";
|
|
2
2
|
import d from "dayjs";
|
|
3
3
|
import c from "dayjs/plugin/customParseFormat.js";
|
|
4
4
|
import { DEFAULT_FORMATS_TIME as P } from "./constants.js";
|
|
5
5
|
import _ from "./common/picker.vue2.js";
|
|
6
6
|
import h from "./time-picker-com/panel-time-pick.vue2.js";
|
|
7
|
-
import
|
|
8
|
-
import { timePickerDefaultProps as
|
|
7
|
+
import V from "./time-picker-com/panel-time-range.vue2.js";
|
|
8
|
+
import { timePickerDefaultProps as v } from "./common/props.js";
|
|
9
9
|
d.extend(c);
|
|
10
|
-
const
|
|
11
|
-
name: "
|
|
10
|
+
const R = /* @__PURE__ */ p({
|
|
11
|
+
name: "VftTimePicker",
|
|
12
12
|
install: null,
|
|
13
13
|
props: {
|
|
14
|
-
...
|
|
14
|
+
...v,
|
|
15
15
|
/**
|
|
16
16
|
* @description whether to pick a time range
|
|
17
17
|
*/
|
|
@@ -22,8 +22,8 @@ const I = /* @__PURE__ */ p({
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue"],
|
|
24
24
|
setup(r, a) {
|
|
25
|
-
const t =
|
|
26
|
-
return
|
|
25
|
+
const t = f(), [n, l] = r.isRange ? ["timerange", V] : ["time", h], i = (e) => a.emit("update:modelValue", e);
|
|
26
|
+
return s("VftPopperOptions", r.popperOptions), a.expose({
|
|
27
27
|
/**
|
|
28
28
|
* @description focus the Input component
|
|
29
29
|
*/
|
|
@@ -54,7 +54,7 @@ const I = /* @__PURE__ */ p({
|
|
|
54
54
|
}
|
|
55
55
|
}), () => {
|
|
56
56
|
const e = r.format ?? P;
|
|
57
|
-
return m(_,
|
|
57
|
+
return m(_, u(r, {
|
|
58
58
|
ref: t,
|
|
59
59
|
type: n,
|
|
60
60
|
format: e,
|
|
@@ -66,5 +66,5 @@ const I = /* @__PURE__ */ p({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
R as default
|
|
70
70
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, ref as E, computed as r, openBlock as
|
|
1
|
+
import { defineComponent as v, ref as E, computed as r, openBlock as s, createBlock as u, unref as n, withCtx as f, normalizeClass as S, createCommentVNode as h, createElementBlock as w, Fragment as H, renderList as N } from "vue";
|
|
2
2
|
import d from "dayjs";
|
|
3
3
|
import O from "dayjs/plugin/customParseFormat.js";
|
|
4
4
|
import b from "../select-v2/index.js";
|
|
@@ -11,59 +11,59 @@ import "../../hooks/use-z-index/index.js";
|
|
|
11
11
|
import "@vueuse/core";
|
|
12
12
|
import "@vft/utils";
|
|
13
13
|
import "../../utils/ns-cover.js";
|
|
14
|
-
import { timeSelectProps as
|
|
15
|
-
import { parseTime as
|
|
16
|
-
import { useFormDisabled as
|
|
17
|
-
const
|
|
14
|
+
import { timeSelectProps as D } from "./time-select.js";
|
|
15
|
+
import { parseTime as a, formatTime as m, compareTime as p, nextTime as L } from "./utils.js";
|
|
16
|
+
import { useFormDisabled as U } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
const q = v({
|
|
18
18
|
name: "ElTimeSelect"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
21
|
-
props:
|
|
19
|
+
}), ne = /* @__PURE__ */ v({
|
|
20
|
+
...q,
|
|
21
|
+
props: D,
|
|
22
22
|
emits: ["change", "blur", "focus", "update:modelValue"],
|
|
23
23
|
setup(T, { expose: k }) {
|
|
24
24
|
const o = T;
|
|
25
25
|
d.extend(O);
|
|
26
|
-
const { Option:
|
|
27
|
-
const e =
|
|
28
|
-
return e ?
|
|
29
|
-
}),
|
|
30
|
-
const e =
|
|
31
|
-
return e ?
|
|
26
|
+
const { Option: V } = b, C = j("input"), i = E(), I = U(), g = r(() => o.modelValue), y = r(() => {
|
|
27
|
+
const e = a(o.start);
|
|
28
|
+
return e ? m(e) : null;
|
|
29
|
+
}), c = r(() => {
|
|
30
|
+
const e = a(o.end);
|
|
31
|
+
return e ? m(e) : null;
|
|
32
32
|
}), z = r(() => {
|
|
33
|
-
const e =
|
|
34
|
-
return e ?
|
|
33
|
+
const e = a(o.step);
|
|
34
|
+
return e ? m(e) : null;
|
|
35
35
|
}), B = r(() => {
|
|
36
|
-
const e =
|
|
37
|
-
return e ?
|
|
36
|
+
const e = a(o.minTime || "");
|
|
37
|
+
return e ? m(e) : null;
|
|
38
38
|
}), F = r(() => {
|
|
39
|
-
const e =
|
|
40
|
-
return e ?
|
|
39
|
+
const e = a(o.maxTime || "");
|
|
40
|
+
return e ? m(e) : null;
|
|
41
41
|
}), $ = r(() => {
|
|
42
42
|
const e = [];
|
|
43
43
|
if (o.start && o.end && o.step) {
|
|
44
|
-
let t =
|
|
45
|
-
for (; t &&
|
|
44
|
+
let t = y.value, l;
|
|
45
|
+
for (; t && c.value && p(t, c.value) <= 0; )
|
|
46
46
|
l = d(t, "HH:mm").format(o.format), e.push({
|
|
47
47
|
value: l,
|
|
48
|
-
disabled:
|
|
49
|
-
}), t =
|
|
48
|
+
disabled: p(t, B.value || "-1:-1") <= 0 || p(t, F.value || "100:100") >= 0
|
|
49
|
+
}), t = L(t, z.value);
|
|
50
50
|
}
|
|
51
51
|
return e;
|
|
52
52
|
});
|
|
53
53
|
return k({
|
|
54
54
|
blur: () => {
|
|
55
55
|
var e, t;
|
|
56
|
-
(t = (e =
|
|
56
|
+
(t = (e = i.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
57
57
|
},
|
|
58
58
|
focus: () => {
|
|
59
59
|
var e, t;
|
|
60
|
-
(t = (e =
|
|
60
|
+
(t = (e = i.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
61
61
|
}
|
|
62
|
-
}), (e, t) => (
|
|
62
|
+
}), (e, t) => (s(), u(n(b), {
|
|
63
63
|
ref_key: "select",
|
|
64
|
-
ref:
|
|
65
|
-
"model-value": n(
|
|
66
|
-
disabled: n(
|
|
64
|
+
ref: i,
|
|
65
|
+
"model-value": n(g),
|
|
66
|
+
disabled: n(I),
|
|
67
67
|
clearable: e.clearable,
|
|
68
68
|
"clear-icon": e.clearIcon,
|
|
69
69
|
size: e.size,
|
|
@@ -76,19 +76,15 @@ const A = v({
|
|
|
76
76
|
onBlur: t[2] || (t[2] = (l) => e.$emit("blur", l)),
|
|
77
77
|
onFocus: t[3] || (t[3] = (l) => e.$emit("focus", l))
|
|
78
78
|
}, {
|
|
79
|
-
prefix:
|
|
80
|
-
e.prefixIcon ? (
|
|
79
|
+
prefix: f(() => [
|
|
80
|
+
e.prefixIcon ? (s(), u(n(P), {
|
|
81
81
|
key: 0,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(a(), i(h(e.prefixIcon)))
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["class"])) : w("", !0)
|
|
82
|
+
icon: e.prefixIcon,
|
|
83
|
+
class: S(n(C).e("prefix-icon"))
|
|
84
|
+
}, null, 8, ["icon", "class"])) : h("", !0)
|
|
89
85
|
]),
|
|
90
|
-
default:
|
|
91
|
-
(
|
|
86
|
+
default: f(() => [
|
|
87
|
+
(s(!0), w(H, null, N(n($), (l) => (s(), u(n(V), {
|
|
92
88
|
key: l.value,
|
|
93
89
|
label: l.value,
|
|
94
90
|
value: l.value,
|
|
@@ -100,5 +96,5 @@ const A = v({
|
|
|
100
96
|
}
|
|
101
97
|
});
|
|
102
98
|
export {
|
|
103
|
-
|
|
99
|
+
ne as default
|
|
104
100
|
};
|
|
@@ -62,7 +62,7 @@ const ae = E({
|
|
|
62
62
|
onHide: S,
|
|
63
63
|
onBeforeShow: f,
|
|
64
64
|
onBeforeHide: d
|
|
65
|
-
} = U(ne, void 0), L = o(() => e.transition
|
|
65
|
+
} = U(ne, void 0), L = o(() => e.transition ?? `${w.namespace.value}-fade-in-linear`), I = o(() => process.env.NODE_ENV === "test" ? !0 : e.persistent);
|
|
66
66
|
W(() => {
|
|
67
67
|
c.value = !0;
|
|
68
68
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import e from "./tree.vue.js";
|
|
2
|
+
import { dragEventsKey as s, useDragNodeHandler as d } from "./model/useDragNode.js";
|
|
3
|
+
import { getChildState as l } from "./model/node.js";
|
|
4
|
+
e.install = (t) => {
|
|
5
|
+
t.component(e.name, e);
|
|
6
|
+
};
|
|
7
|
+
const r = e, a = r;
|
|
8
|
+
export {
|
|
9
|
+
a as VftTree,
|
|
10
|
+
r as default,
|
|
11
|
+
s as dragEventsKey,
|
|
12
|
+
l as getChildState,
|
|
13
|
+
d as useDragNodeHandler
|
|
14
|
+
};
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { reactive as v } from "vue";
|
|
2
|
+
import { hasOwn as D } from "@vft/utils";
|
|
3
|
+
import { markNodeData as C, NODE_KEY as y } from "./util.js";
|
|
4
|
+
const N = (r) => {
|
|
5
|
+
let e = !0, t = !0, s = !0;
|
|
6
|
+
for (let i = 0, a = r.length; i < a; i++) {
|
|
7
|
+
const h = r[i];
|
|
8
|
+
(h.checked !== !0 || h.indeterminate) && (e = !1, h.disabled || (s = !1)), (h.checked !== !1 || h.indeterminate) && (t = !1);
|
|
9
|
+
}
|
|
10
|
+
return { all: e, none: t, allWithoutDisable: s, half: !e && !t };
|
|
11
|
+
}, o = function(r) {
|
|
12
|
+
if (r.childNodes.length === 0 || r.loading)
|
|
13
|
+
return;
|
|
14
|
+
const { all: e, none: t, half: s } = N(r.childNodes);
|
|
15
|
+
e ? (r.checked = !0, r.indeterminate = !1) : s ? (r.checked = !1, r.indeterminate = !0) : t && (r.checked = !1, r.indeterminate = !1);
|
|
16
|
+
const i = r.parent;
|
|
17
|
+
!i || i.level === 0 || r.store.checkStrictly || o(i);
|
|
18
|
+
}, l = function(r, e) {
|
|
19
|
+
const t = r.store.props, s = r.data || {}, i = t[e];
|
|
20
|
+
if (typeof i == "function")
|
|
21
|
+
return i(s, r);
|
|
22
|
+
if (typeof i == "string")
|
|
23
|
+
return s[i];
|
|
24
|
+
if (typeof i > "u") {
|
|
25
|
+
const a = s[e];
|
|
26
|
+
return a === void 0 ? "" : a;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
let L = 0;
|
|
30
|
+
class f {
|
|
31
|
+
constructor(e) {
|
|
32
|
+
this.id = L++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
|
|
33
|
+
for (const t in e)
|
|
34
|
+
D(e, t) && (this[t] = e[t]);
|
|
35
|
+
this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
|
|
36
|
+
}
|
|
37
|
+
initialize() {
|
|
38
|
+
const e = this.store;
|
|
39
|
+
if (!e)
|
|
40
|
+
throw new Error("[Node]store is required!");
|
|
41
|
+
e.registerNode(this);
|
|
42
|
+
const t = e.props;
|
|
43
|
+
if (t && typeof t.isLeaf < "u") {
|
|
44
|
+
const a = l(this, "isLeaf");
|
|
45
|
+
typeof a == "boolean" && (this.isLeafByUser = a);
|
|
46
|
+
}
|
|
47
|
+
if (e.lazy !== !0 && this.data ? (this.setData(this.data), e.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && e.lazy && e.defaultExpandAll && this.expand(), Array.isArray(this.data) || C(this, this.data), !this.data)
|
|
48
|
+
return;
|
|
49
|
+
const s = e.defaultExpandedKeys, i = e.key;
|
|
50
|
+
i && s && s.includes(this.key) && this.expand(null, e.autoExpandParent), i && e.currentNodeKey !== void 0 && this.key === e.currentNodeKey && (e.currentNode = this, e.currentNode.isCurrent = !0), e.lazy && e._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
|
|
51
|
+
}
|
|
52
|
+
setData(e) {
|
|
53
|
+
Array.isArray(e) || C(this, e), this.data = e, this.childNodes = [];
|
|
54
|
+
let t;
|
|
55
|
+
this.level === 0 && Array.isArray(this.data) ? t = this.data : t = l(this, "children") || [];
|
|
56
|
+
for (let s = 0, i = t.length; s < i; s++)
|
|
57
|
+
this.insertChild({ data: t[s] });
|
|
58
|
+
}
|
|
59
|
+
get label() {
|
|
60
|
+
return l(this, "label");
|
|
61
|
+
}
|
|
62
|
+
get key() {
|
|
63
|
+
const e = this.store.key;
|
|
64
|
+
return this.data ? this.data[e] : null;
|
|
65
|
+
}
|
|
66
|
+
get disabled() {
|
|
67
|
+
return l(this, "disabled");
|
|
68
|
+
}
|
|
69
|
+
get nextSibling() {
|
|
70
|
+
const e = this.parent;
|
|
71
|
+
if (e) {
|
|
72
|
+
const t = e.childNodes.indexOf(this);
|
|
73
|
+
if (t > -1)
|
|
74
|
+
return e.childNodes[t + 1];
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
get previousSibling() {
|
|
79
|
+
const e = this.parent;
|
|
80
|
+
if (e) {
|
|
81
|
+
const t = e.childNodes.indexOf(this);
|
|
82
|
+
if (t > -1)
|
|
83
|
+
return t > 0 ? e.childNodes[t - 1] : null;
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
contains(e, t = !0) {
|
|
88
|
+
return (this.childNodes || []).some(
|
|
89
|
+
(s) => s === e || t && s.contains(e)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
remove() {
|
|
93
|
+
const e = this.parent;
|
|
94
|
+
e && e.removeChild(this);
|
|
95
|
+
}
|
|
96
|
+
insertChild(e, t, s) {
|
|
97
|
+
if (!e)
|
|
98
|
+
throw new Error("InsertChild error: child is required.");
|
|
99
|
+
if (!(e instanceof f)) {
|
|
100
|
+
if (!s) {
|
|
101
|
+
const i = this.getChildren(!0);
|
|
102
|
+
i.includes(e.data) || (typeof t > "u" || t < 0 ? i.push(e.data) : i.splice(t, 0, e.data));
|
|
103
|
+
}
|
|
104
|
+
Object.assign(e, {
|
|
105
|
+
parent: this,
|
|
106
|
+
store: this.store
|
|
107
|
+
}), e = v(new f(e)), e instanceof f && e.initialize();
|
|
108
|
+
}
|
|
109
|
+
e.level = this.level + 1, typeof t > "u" || t < 0 ? this.childNodes.push(e) : this.childNodes.splice(t, 0, e), this.updateLeafState();
|
|
110
|
+
}
|
|
111
|
+
insertBefore(e, t) {
|
|
112
|
+
let s;
|
|
113
|
+
t && (s = this.childNodes.indexOf(t)), this.insertChild(e, s);
|
|
114
|
+
}
|
|
115
|
+
insertAfter(e, t) {
|
|
116
|
+
let s;
|
|
117
|
+
t && (s = this.childNodes.indexOf(t), s !== -1 && (s += 1)), this.insertChild(e, s);
|
|
118
|
+
}
|
|
119
|
+
removeChild(e) {
|
|
120
|
+
const t = this.getChildren() || [], s = t.indexOf(e.data);
|
|
121
|
+
s > -1 && t.splice(s, 1);
|
|
122
|
+
const i = this.childNodes.indexOf(e);
|
|
123
|
+
i > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(i, 1)), this.updateLeafState();
|
|
124
|
+
}
|
|
125
|
+
removeChildByData(e) {
|
|
126
|
+
let t = null;
|
|
127
|
+
for (let s = 0; s < this.childNodes.length; s++)
|
|
128
|
+
if (this.childNodes[s].data === e) {
|
|
129
|
+
t = this.childNodes[s];
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
t && this.removeChild(t);
|
|
133
|
+
}
|
|
134
|
+
expand(e, t) {
|
|
135
|
+
const s = () => {
|
|
136
|
+
if (t) {
|
|
137
|
+
let i = this.parent;
|
|
138
|
+
for (; i.level > 0; )
|
|
139
|
+
i.expanded = !0, i = i.parent;
|
|
140
|
+
}
|
|
141
|
+
this.expanded = !0, e && e(), this.childNodes.forEach((i) => {
|
|
142
|
+
i.canFocus = !0;
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
this.shouldLoadData() ? this.loadData((i) => {
|
|
146
|
+
Array.isArray(i) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || o(this), s());
|
|
147
|
+
}) : s();
|
|
148
|
+
}
|
|
149
|
+
doCreateChildren(e, t = {}) {
|
|
150
|
+
e.forEach((s) => {
|
|
151
|
+
this.insertChild(
|
|
152
|
+
Object.assign({ data: s }, t),
|
|
153
|
+
void 0,
|
|
154
|
+
!0
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
collapse() {
|
|
159
|
+
this.expanded = !1, this.childNodes.forEach((e) => {
|
|
160
|
+
e.canFocus = !1;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
shouldLoadData() {
|
|
164
|
+
return this.store.lazy === !0 && this.store.load && !this.loaded;
|
|
165
|
+
}
|
|
166
|
+
updateLeafState() {
|
|
167
|
+
if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
|
|
168
|
+
this.isLeaf = this.isLeafByUser;
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const e = this.childNodes;
|
|
172
|
+
if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
|
|
173
|
+
this.isLeaf = !e || e.length === 0;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.isLeaf = !1;
|
|
177
|
+
}
|
|
178
|
+
setChecked(e, t, s, i) {
|
|
179
|
+
if (this.indeterminate = e === "half", this.checked = e === !0, this.store.checkStrictly)
|
|
180
|
+
return;
|
|
181
|
+
if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
|
|
182
|
+
const { all: h, allWithoutDisable: n } = N(this.childNodes);
|
|
183
|
+
!this.isLeaf && !h && n && (this.checked = !1, e = !1);
|
|
184
|
+
const c = () => {
|
|
185
|
+
if (t) {
|
|
186
|
+
const d = this.childNodes;
|
|
187
|
+
for (let u = 0, x = d.length; u < x; u++) {
|
|
188
|
+
const p = d[u];
|
|
189
|
+
i = i || e !== !1;
|
|
190
|
+
const m = p.disabled ? p.checked : i;
|
|
191
|
+
p.setChecked(m, t, !0, i);
|
|
192
|
+
}
|
|
193
|
+
const { half: k, all: g } = N(d);
|
|
194
|
+
g || (this.checked = g, this.indeterminate = k);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
if (this.shouldLoadData()) {
|
|
198
|
+
this.loadData(
|
|
199
|
+
() => {
|
|
200
|
+
c(), o(this);
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
checked: e !== !1
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
return;
|
|
207
|
+
} else
|
|
208
|
+
c();
|
|
209
|
+
}
|
|
210
|
+
const a = this.parent;
|
|
211
|
+
!a || a.level === 0 || s || o(a);
|
|
212
|
+
}
|
|
213
|
+
getChildren(e = !1) {
|
|
214
|
+
if (this.level === 0)
|
|
215
|
+
return this.data;
|
|
216
|
+
const t = this.data;
|
|
217
|
+
if (!t)
|
|
218
|
+
return null;
|
|
219
|
+
const s = this.store.props;
|
|
220
|
+
let i = "children";
|
|
221
|
+
return s && (i = s.children || "children"), t[i] === void 0 && (t[i] = null), e && !t[i] && (t[i] = []), t[i];
|
|
222
|
+
}
|
|
223
|
+
updateChildren() {
|
|
224
|
+
const e = this.getChildren() || [], t = this.childNodes.map((a) => a.data), s = {}, i = [];
|
|
225
|
+
e.forEach((a, h) => {
|
|
226
|
+
const n = a[y];
|
|
227
|
+
!!n && t.findIndex((d) => d[y] === n) >= 0 ? s[n] = { index: h, data: a } : i.push({ index: h, data: a });
|
|
228
|
+
}), this.store.lazy || t.forEach((a) => {
|
|
229
|
+
s[a[y]] || this.removeChildByData(a);
|
|
230
|
+
}), i.forEach(({ index: a, data: h }) => {
|
|
231
|
+
this.insertChild({ data: h }, a);
|
|
232
|
+
}), this.updateLeafState();
|
|
233
|
+
}
|
|
234
|
+
loadData(e, t = {}) {
|
|
235
|
+
if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(t).length)) {
|
|
236
|
+
this.loading = !0;
|
|
237
|
+
const s = (i) => {
|
|
238
|
+
this.childNodes = [], this.doCreateChildren(i, t), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, i);
|
|
239
|
+
};
|
|
240
|
+
this.store.load(this, s);
|
|
241
|
+
} else
|
|
242
|
+
e && e.call(this);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
export {
|
|
246
|
+
f as default,
|
|
247
|
+
N as getChildState
|
|
248
|
+
};
|