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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as o, computed as s, openBlock as m, createElementBlock as d, normalizeClass as l, unref as p, renderSlot as i } from "vue";
|
|
2
|
+
import { CHANGE_EVENT as h } from "../../constants/event.js";
|
|
3
|
+
import { useNamespace as u } from "../../hooks/use-namespace/index.js";
|
|
4
|
+
import "@popperjs/core";
|
|
5
|
+
import "lodash";
|
|
6
|
+
import "../../hooks/use-z-index/index.js";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import "@vft/utils";
|
|
9
|
+
import "../../utils/ns-cover.js";
|
|
10
|
+
const c = (
|
|
11
|
+
/* hoist-static*/
|
|
12
|
+
u("check-tag")
|
|
13
|
+
), f = o({
|
|
14
|
+
name: c.b()
|
|
15
|
+
}), z = /* @__PURE__ */ o({
|
|
16
|
+
...f,
|
|
17
|
+
props: {
|
|
18
|
+
checked: { type: Boolean, default: !1 }
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:checked", "change"],
|
|
21
|
+
setup(e, { emit: t }) {
|
|
22
|
+
const n = s(() => [c.b(), c.is("checked", e.checked)]), a = () => {
|
|
23
|
+
t(h, !e.checked), t("update:checked", !e.checked);
|
|
24
|
+
};
|
|
25
|
+
return (r, k) => (m(), d("span", {
|
|
26
|
+
class: l(p(n)),
|
|
27
|
+
onClick: a
|
|
28
|
+
}, [
|
|
29
|
+
i(r.$slots, "default")
|
|
30
|
+
], 2));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
z as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { withInstall as t } from "../../utils/vue/install.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import "@vft/utils";
|
|
4
|
+
import "lodash";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import "../../utils/ns-cover.js";
|
|
7
|
+
import o from "./check-tag.vue2.js";
|
|
8
|
+
const c = t(o);
|
|
9
|
+
export {
|
|
10
|
+
c as VftCheckTag,
|
|
11
|
+
c as default
|
|
12
|
+
};
|
|
@@ -12,8 +12,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
12
12
|
import "@vueuse/core";
|
|
13
13
|
import "@vft/utils";
|
|
14
14
|
import { debugWarn as _ } from "../../utils/error.js";
|
|
15
|
-
import "../../utils/ns-cover.js";
|
|
16
15
|
import { UPDATE_MODEL_EVENT as $, CHANGE_EVENT as be } from "../../constants/event.js";
|
|
16
|
+
import "../../utils/ns-cover.js";
|
|
17
17
|
import he from "./components/alpha-slider.vue2.js";
|
|
18
18
|
import { colorPickerContextKey as ke } from "./contants.js";
|
|
19
19
|
import we from "./components/hue-slider.vue.js";
|
|
@@ -57,6 +57,8 @@ import "../virtual-list/components/fixed-size-grid.js";
|
|
|
57
57
|
import "../virtual-list/components/dynamic-size-grid.js";
|
|
58
58
|
import "../virtual-list/props.js";
|
|
59
59
|
import "../select-v2/index.js";
|
|
60
|
+
import "../select/index.js";
|
|
61
|
+
import "../tree-select/index.js";
|
|
60
62
|
import "../verify-code/index.js";
|
|
61
63
|
import "../table/index.js";
|
|
62
64
|
import "../image-viewer/index.js";
|
|
@@ -68,6 +70,12 @@ import "../row/index.js";
|
|
|
68
70
|
import "../horizontal-menu/index.js";
|
|
69
71
|
import "../time-picker/index.js";
|
|
70
72
|
import "../date-picker/index.js";
|
|
73
|
+
import "../check-tag/index.js";
|
|
74
|
+
import "../tree/index.js";
|
|
75
|
+
import "../skeleton/index.js";
|
|
76
|
+
import "../space/index.js";
|
|
77
|
+
import "../card/index.js";
|
|
78
|
+
import "../popconfirm/index.js";
|
|
71
79
|
import "../md-container/index.js";
|
|
72
80
|
import "../md-comment/index.js";
|
|
73
81
|
import "../md-tabs/index.js";
|
|
@@ -80,7 +88,7 @@ const N = { class: "vft-sub-menu" }, x = (
|
|
|
80
88
|
F("context-menu")
|
|
81
89
|
), R = f({
|
|
82
90
|
name: x.b()
|
|
83
|
-
}),
|
|
91
|
+
}), xo = /* @__PURE__ */ f({
|
|
84
92
|
...R,
|
|
85
93
|
props: {
|
|
86
94
|
axis: null,
|
|
@@ -154,5 +162,5 @@ const N = { class: "vft-sub-menu" }, x = (
|
|
|
154
162
|
}
|
|
155
163
|
});
|
|
156
164
|
export {
|
|
157
|
-
|
|
165
|
+
xo as default
|
|
158
166
|
};
|
|
@@ -12,7 +12,7 @@ const b = ({
|
|
|
12
12
|
e.value = e.value.add(1, "year");
|
|
13
13
|
}, c = () => {
|
|
14
14
|
r.value = r.value.subtract(1, "year");
|
|
15
|
-
}, n = a(() => `${e.value.year()}
|
|
15
|
+
}, n = a(() => `${e.value.year()} 年`), y = a(() => `${r.value.year()} 年`), s = a(() => e.value.year()), d = a(() => r.value.year() === e.value.year() ? e.value.year() + 1 : r.value.year());
|
|
16
16
|
return {
|
|
17
17
|
leftPrevYear: v,
|
|
18
18
|
rightNextYear: l,
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
const o = Symbol()
|
|
1
|
+
const o = Symbol(), t = {
|
|
2
|
+
month1: "1 月",
|
|
3
|
+
month2: "2 月",
|
|
4
|
+
month3: "3 月",
|
|
5
|
+
month4: "4 月",
|
|
6
|
+
month5: "5 月",
|
|
7
|
+
month6: "6 月",
|
|
8
|
+
month7: "7 月",
|
|
9
|
+
month8: "8 月",
|
|
10
|
+
month9: "9 月",
|
|
11
|
+
month10: "10 月",
|
|
12
|
+
month11: "11 月",
|
|
13
|
+
month12: "12 月"
|
|
14
|
+
};
|
|
2
15
|
export {
|
|
3
|
-
o as ROOT_PICKER_INJECTION_KEY
|
|
16
|
+
o as ROOT_PICKER_INJECTION_KEY,
|
|
17
|
+
t as datePickerConfig
|
|
4
18
|
};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { defineComponent as P, ref as f, computed as
|
|
2
|
-
import
|
|
3
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as P, ref as f, computed as j, watch as Y, nextTick as $, openBlock as u, createElementBlock as p, normalizeClass as N, unref as g, createElementVNode as b, Fragment as O, renderList as M, withKeys as I, withModifiers as R, toDisplayString as q } from "vue";
|
|
2
|
+
import x from "dayjs";
|
|
3
|
+
import { useNamespace as G } from "../../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "../../../hooks/use-z-index/index.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
|
-
import { hasClass as
|
|
8
|
+
import { hasClass as H } from "@vft/utils";
|
|
9
9
|
import "../../../utils/ns-cover.js";
|
|
10
10
|
import "../../time-picker/index.js";
|
|
11
11
|
import { castArray as T } from "../utils.js";
|
|
12
|
-
import { basicMonthTableProps as
|
|
12
|
+
import { basicMonthTableProps as J } from "../props/basic-month-table.js";
|
|
13
|
+
import { datePickerConfig as Q } from "../constants.js";
|
|
13
14
|
import { rangeArr as U } from "../../time-picker/utils.js";
|
|
14
|
-
const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" },
|
|
15
|
+
const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe = /* @__PURE__ */ P({
|
|
15
16
|
__name: "basic-month-table",
|
|
16
|
-
props:
|
|
17
|
+
props: J,
|
|
17
18
|
emits: ["changerange", "pick", "select"],
|
|
18
19
|
setup(A, { expose: E, emit: d }) {
|
|
19
20
|
const e = A, B = (a, t, o) => {
|
|
20
|
-
const r =
|
|
21
|
+
const r = x().locale(o).startOf("month").month(t).year(a), n = r.daysInMonth();
|
|
21
22
|
return U(n).map((s) => r.add(s, "day").toDate());
|
|
22
|
-
}, K =
|
|
23
|
+
}, K = G("month-table"), v = f("zh-cn"), w = f(), h = f();
|
|
24
|
+
f(
|
|
23
25
|
e.date.locale("en").localeData().monthsShort().map((a) => a.toLowerCase())
|
|
24
|
-
)
|
|
26
|
+
);
|
|
27
|
+
const V = f([
|
|
25
28
|
[],
|
|
26
29
|
[],
|
|
27
30
|
[]
|
|
28
|
-
]),
|
|
31
|
+
]), S = f(), k = f(), _ = j(() => {
|
|
29
32
|
var o, r;
|
|
30
|
-
const a =
|
|
33
|
+
const a = V.value, t = x().locale(v.value).startOf("month");
|
|
31
34
|
for (let n = 0; n < 3; n++) {
|
|
32
35
|
const s = a[n];
|
|
33
36
|
for (let i = 0; i < 4; i++) {
|
|
@@ -42,25 +45,25 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue
|
|
|
42
45
|
disabled: !1
|
|
43
46
|
});
|
|
44
47
|
c.type = "normal";
|
|
45
|
-
const
|
|
46
|
-
c.inRange = !!(e.minDate && l.isSameOrAfter(e.minDate, "month") && m && l.isSameOrBefore(m, "month")) || !!(e.minDate && l.isSameOrBefore(e.minDate, "month") && m && l.isSameOrAfter(m, "month")), (o = e.minDate) != null && o.isSameOrAfter(m) ? (c.start = !!(m && l.isSame(m, "month")), c.end = e.minDate && l.isSame(e.minDate, "month")) : (c.start = !!(e.minDate && l.isSame(e.minDate, "month")), c.end = !!(m && l.isSame(m, "month"))), t.isSame(l) && (c.type = "today"), c.text =
|
|
48
|
+
const C = n * 4 + i, l = e.date.startOf("year").month(C), m = e.rangeState.endDate || e.maxDate || e.rangeState.selecting && e.minDate || null;
|
|
49
|
+
c.inRange = !!(e.minDate && l.isSameOrAfter(e.minDate, "month") && m && l.isSameOrBefore(m, "month")) || !!(e.minDate && l.isSameOrBefore(e.minDate, "month") && m && l.isSameOrAfter(m, "month")), (o = e.minDate) != null && o.isSameOrAfter(m) ? (c.start = !!(m && l.isSame(m, "month")), c.end = e.minDate && l.isSame(e.minDate, "month")) : (c.start = !!(e.minDate && l.isSame(e.minDate, "month")), c.end = !!(m && l.isSame(m, "month"))), t.isSame(l) && (c.type = "today"), c.text = C, c.disabled = ((r = e.disabledDate) == null ? void 0 : r.call(e, l.toDate())) || !1;
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
return a;
|
|
50
|
-
}),
|
|
53
|
+
}), z = () => {
|
|
51
54
|
var a;
|
|
52
55
|
(a = h.value) == null || a.focus();
|
|
53
|
-
},
|
|
56
|
+
}, F = (a) => {
|
|
54
57
|
const t = {}, o = e.date.year(), r = /* @__PURE__ */ new Date(), n = a.text;
|
|
55
|
-
return t.disabled = e.disabledDate ? B(o, n,
|
|
56
|
-
(s) =>
|
|
58
|
+
return t.disabled = e.disabledDate ? B(o, n, v.value).every(e.disabledDate) : !1, t.current = T(e.parsedValue).findIndex(
|
|
59
|
+
(s) => x.isDayjs(s) && s.year() === o && s.month() === n
|
|
57
60
|
) >= 0, t.today = r.getFullYear() === o && r.getMonth() === n, a.inRange && (t["in-range"] = !0, a.start && (t["start-date"] = !0), a.end && (t["end-date"] = !0)), t;
|
|
58
61
|
}, D = (a) => {
|
|
59
62
|
const t = e.date.year(), o = a.text;
|
|
60
63
|
return T(e.date).findIndex(
|
|
61
64
|
(r) => r.year() === t && r.month() === o
|
|
62
65
|
) >= 0;
|
|
63
|
-
},
|
|
66
|
+
}, L = (a) => {
|
|
64
67
|
var n;
|
|
65
68
|
if (!e.rangeState.selecting)
|
|
66
69
|
return;
|
|
@@ -68,7 +71,7 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue
|
|
|
68
71
|
if (t.tagName === "A" && (t = (n = t.parentNode) == null ? void 0 : n.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD")
|
|
69
72
|
return;
|
|
70
73
|
const o = t.parentNode.rowIndex, r = t.cellIndex;
|
|
71
|
-
|
|
74
|
+
_.value[o][r].disabled || (o !== S.value || r !== k.value) && (S.value = o, k.value = r, d("changerange", {
|
|
72
75
|
selecting: !0,
|
|
73
76
|
endDate: e.date.startOf("year").month(o * 4 + r)
|
|
74
77
|
}));
|
|
@@ -77,39 +80,39 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue
|
|
|
77
80
|
const t = (i = a.target) == null ? void 0 : i.closest(
|
|
78
81
|
"td"
|
|
79
82
|
);
|
|
80
|
-
if ((t == null ? void 0 : t.tagName) !== "TD" ||
|
|
83
|
+
if ((t == null ? void 0 : t.tagName) !== "TD" || H(t, "disabled"))
|
|
81
84
|
return;
|
|
82
85
|
const o = t.cellIndex, n = t.parentNode.rowIndex * 4 + o, s = e.date.startOf("year").month(n);
|
|
83
86
|
e.selectionMode === "range" ? e.rangeState.selecting ? (e.minDate && s >= e.minDate ? d("pick", { minDate: e.minDate, maxDate: s }) : d("pick", { minDate: s, maxDate: e.minDate }), d("select", !1)) : (d("pick", { minDate: s, maxDate: null }), d("select", !0)) : d("pick", n);
|
|
84
87
|
};
|
|
85
|
-
return
|
|
88
|
+
return Y(
|
|
86
89
|
() => e.date,
|
|
87
90
|
async () => {
|
|
88
91
|
var a, t;
|
|
89
|
-
(a =
|
|
92
|
+
(a = w.value) != null && a.contains(document.activeElement) && (await $(), (t = h.value) == null || t.focus());
|
|
90
93
|
}
|
|
91
94
|
), E({
|
|
92
95
|
/**
|
|
93
96
|
* @description focus current cell
|
|
94
97
|
*/
|
|
95
|
-
focus:
|
|
98
|
+
focus: z
|
|
96
99
|
}), (a, t) => (u(), p("table", {
|
|
97
100
|
role: "grid",
|
|
98
101
|
"aria-label": "使用方向鍵與 Enter 鍵以選擇月份",
|
|
99
|
-
class: N(
|
|
102
|
+
class: N(g(K).b()),
|
|
100
103
|
onClick: y,
|
|
101
|
-
onMousemove:
|
|
104
|
+
onMousemove: L
|
|
102
105
|
}, [
|
|
103
|
-
|
|
106
|
+
b("tbody", {
|
|
104
107
|
ref_key: "tbodyRef",
|
|
105
|
-
ref:
|
|
108
|
+
ref: w
|
|
106
109
|
}, [
|
|
107
|
-
(u(!0), p(
|
|
108
|
-
(u(!0), p(
|
|
110
|
+
(u(!0), p(O, null, M(g(_), (o, r) => (u(), p("tr", { key: r }, [
|
|
111
|
+
(u(!0), p(O, null, M(o, (n, s) => (u(), p("td", {
|
|
109
112
|
key: s,
|
|
110
113
|
ref_for: !0,
|
|
111
114
|
ref: (i) => D(n) && (h.value = i),
|
|
112
|
-
class: N(
|
|
115
|
+
class: N(F(n)),
|
|
113
116
|
"aria-selected": `${D(n)}`,
|
|
114
117
|
tabindex: D(n) ? 0 : -1,
|
|
115
118
|
onKeydown: [
|
|
@@ -117,8 +120,8 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue
|
|
|
117
120
|
I(R(y, ["prevent", "stop"]), ["enter"])
|
|
118
121
|
]
|
|
119
122
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
b("div", null, [
|
|
124
|
+
b("span", X, q(g(Q)["month" + (n.text + 1)]), 1)
|
|
122
125
|
])
|
|
123
126
|
], 42, W))), 128))
|
|
124
127
|
]))), 128))
|
|
@@ -127,5 +130,5 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue
|
|
|
127
130
|
}
|
|
128
131
|
});
|
|
129
132
|
export {
|
|
130
|
-
|
|
133
|
+
pe as default
|
|
131
134
|
};
|
|
@@ -23,7 +23,6 @@ const P = ["aria-selected", "tabindex", "onKeydown"], $ = { class: "cell" }, q =
|
|
|
23
23
|
var e;
|
|
24
24
|
(e = i.value) == null || e.focus();
|
|
25
25
|
}, I = (e) => {
|
|
26
|
-
console.log(e, "---");
|
|
27
26
|
const t = {}, r = D().locale(b.value);
|
|
28
27
|
return t.disabled = n.disabledDate ? E(e, b.value).every(n.disabledDate) : !1, t.current = C(n.parsedValue).findIndex((a) => a.year() === e) >= 0, t.today = r.year() === e, t;
|
|
29
28
|
}, f = (e) => e === s.value && n.date.year() < s.value && n.date.year() > s.value + 9 || C(n.date).findIndex((t) => t.year() === e) >= 0, m = (e) => {
|