vft 0.0.507 → 0.0.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/components/affix/affix.vue2.js +2 -2
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue2.js +1 -1
- package/es/components/avatar/avatar.vue2.js +2 -2
- package/es/components/avatar-stack/avatar-stack.vue2.js +7 -7
- package/es/components/backtop/backtop.vue2.js +1 -1
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +3 -3
- package/es/components/breadcrumb/breadcrumb.vue2.js +2 -2
- package/es/components/button/button-group.vue2.js +2 -2
- package/es/components/button/button.vue2.js +7 -7
- package/es/components/button/use-button.js +3 -3
- package/es/components/card/card.vue2.js +6 -6
- package/es/components/carousel/carousel-item.vue2.js +3 -3
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +203 -202
- package/es/components/cascader-panel/index.vue2.js +1 -1
- package/es/components/cascader-panel/menu.vue2.js +50 -49
- package/es/components/cascader-panel/node.vue2.js +8 -8
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-button.vue2.js +13 -13
- package/es/components/checkbox/checkbox-group.vue2.js +3 -3
- package/es/components/checkbox/checkbox.vue2.js +1 -1
- package/es/components/clamp/clamp.vue2.js +2 -2
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +6 -6
- package/es/components/col/col.vue2.js +2 -2
- package/es/components/collapse/collapse-item.vue2.js +2 -2
- package/es/components/collapse/collapse.vue2.js +2 -2
- package/es/components/collapse-transition/collapse-transition.vue2.js +2 -2
- package/es/components/color-picker/color-picker.vue2.js +134 -133
- package/es/components/color-picker/components/alpha-slider.vue2.js +2 -2
- package/es/components/color-picker/components/hue-slider.vue.js +2 -2
- package/es/components/color-picker/components/predefine.vue.js +3 -3
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +5 -4
- package/es/components/config-provider/constants.d.ts +1 -0
- package/es/components/config-provider/constants.js +3 -2
- package/es/components/config-provider/hooks/use-global-config.js +33 -30
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/config-provider/index.js +6 -5
- package/es/components/container/aside.vue2.js +2 -2
- package/es/components/container/container.vue2.js +2 -2
- package/es/components/container/footer.vue2.js +2 -2
- package/es/components/container/header.vue2.js +2 -2
- package/es/components/container/main.vue2.js +2 -2
- package/es/components/context-menu/context-menu.vue2.js +1 -1
- package/es/components/countdown/countdown.vue2.js +2 -2
- package/es/components/date-picker/composables/use-basic-date-table.js +83 -82
- package/es/components/date-picker/composables/use-month-range-header.js +15 -14
- package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +6 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +40 -39
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +41 -40
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +184 -183
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +12 -12
- package/es/components/date-picker/props/basic-date-table.js +3 -3
- package/es/components/date-picker/props/basic-month-table.js +3 -3
- package/es/components/date-picker/props/basic-year-table.js +3 -3
- package/es/components/date-time-select/date-time-select.vue2.js +39 -36
- package/es/components/descriptions/description.vue2.js +1 -1
- package/es/components/descriptions/descriptions-row.vue2.js +10 -10
- package/es/components/dialog/dialog-content.vue2.js +3 -3
- package/es/components/dialog/dialog.vue2.js +5 -5
- package/es/components/divider/divider.vue2.js +5 -5
- package/es/components/drawer/drawer.vue2.js +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item-impl.vue2.js +3 -3
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue2.js +2 -2
- package/es/components/dropdown/dropdown-menu.vue2.js +2 -2
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +68 -67
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +39 -38
- package/es/components/footer-layout/footer-layout.vue2.js +2 -2
- package/es/components/form/form-item.vue2.js +16 -16
- package/es/components/form/form.vue2.js +2 -2
- package/es/components/full-screen/full-screen.vue2.js +18 -17
- package/es/components/header-layout/header-layout.vue2.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +3 -3
- package/es/components/icon/icon.vue2.js +3 -3
- package/es/components/icon-text/icon-text.vue2.js +1 -1
- package/es/components/iframe-layout/iframe-layout.vue2.js +4 -4
- package/es/components/iframe-layout/iframe-page.vue2.js +2 -2
- package/es/components/image/image.vue2.js +60 -59
- package/es/components/image-viewer/image-viewer.vue2.js +43 -42
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +214 -210
- package/es/components/input/input.vue2.js +2 -2
- package/es/components/input-number/input-number.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/input-tag/input-tag.vue2.js +7 -7
- package/es/components/link/link.vue2.js +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/logo/logo.vue2.js +10 -10
- package/es/components/md-comment/md-comment.vue2.js +2 -2
- package/es/components/md-container/md-container.vue2.js +75 -74
- package/es/components/md-container/toc.js +37 -36
- package/es/components/menu/menu-collapse-transition.vue.js +2 -2
- package/es/components/menu/menu-item-group.vue2.js +7 -7
- package/es/components/menu/menu-item.vue2.js +1 -1
- package/es/components/message/message.vue2.js +3 -3
- package/es/components/message-box/index.d.ts +4 -0
- package/es/components/message-box/index.js +14 -0
- package/es/components/message-box/message-box.vue.d.ts +103 -0
- package/es/components/message-box/message-box.vue.js +4 -0
- package/es/components/message-box/message-box.vue2.js +358 -0
- package/es/components/message-box/method.d.ts +3 -0
- package/es/components/message-box/method.js +101 -0
- package/es/components/message-box/style/css.d.ts +2 -0
- package/es/components/message-box/style/css.js +3 -0
- package/es/components/message-box/style/index.d.ts +2 -0
- package/es/components/message-box/style/index.js +3 -0
- package/es/components/message-box/types.d.ts +202 -0
- package/es/components/message-box/types.js +1 -0
- package/es/components/modal/index.d.ts +1 -0
- package/es/components/modal/modal-footer-action.vue2.js +25 -24
- package/es/components/modal/modal.vue.d.ts +1 -0
- package/es/components/modal/modal.vue2.js +30 -28
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +17 -16
- package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
- package/es/components/notification/notification.vue2.js +1 -1
- package/es/components/overlay/overlay.vue2.js +1 -1
- package/es/components/page-wrapper/page-wrapper.vue2.js +2 -2
- package/es/components/pagination/components/jumper.vue2.js +2 -2
- package/es/components/pagination/components/next.vue2.js +4 -4
- package/es/components/pagination/components/pager.vue2.js +1 -1
- package/es/components/pagination/components/prev.vue2.js +4 -4
- package/es/components/pagination/components/sizes.vue2.js +2 -2
- package/es/components/pagination/components/total.vue2.js +2 -2
- package/es/components/popconfirm/popconfirm.vue2.js +40 -39
- package/es/components/popover/popover.vue2.js +1 -1
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +2 -2
- package/es/components/popper/trigger.vue2.js +4 -4
- package/es/components/progress/progress.vue2.js +1 -1
- package/es/components/progress-i/progress-i.vue2.js +2 -2
- package/es/components/qrcode/qrcode.vue2.js +1 -1
- package/es/components/radio/radio-button.vue2.js +2 -2
- package/es/components/radio/radio-group.vue2.js +3 -3
- package/es/components/radio/radio.vue2.js +2 -2
- package/es/components/rate/rate.vue2.js +6 -6
- package/es/components/router-view-content/router-view-content.vue2.js +7 -7
- package/es/components/roving-focus-group/roving-focus-group.vue2.js +2 -2
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -2
- package/es/components/row/row.vue2.js +2 -2
- package/es/components/scrollbar/bar.vue2.js +2 -2
- package/es/components/scrollbar/scrollbar.vue2.js +7 -7
- package/es/components/scrollbar/thumb.vue2.js +2 -2
- package/es/components/search/search.vue2.js +78 -76
- package/es/components/segmented/segmented.vue2.js +7 -7
- package/es/components/select/group-item.vue.js +2 -2
- package/es/components/select/option-item.vue.js +2 -2
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.js +232 -231
- package/es/components/skeleton/skeleton-item.vue2.js +2 -2
- package/es/components/skeleton/skeleton.vue2.js +8 -8
- package/es/components/slider/button.vue2.js +2 -2
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/space/space.js +1 -1
- package/es/components/statistic/statistic.vue2.js +17 -17
- package/es/components/steps/item.vue2.js +11 -11
- package/es/components/steps/steps.vue2.js +2 -2
- package/es/components/super-form/super-form-action.vue2.js +11 -11
- package/es/components/super-form/super-form-item.vue2.js +5 -4
- package/es/components/super-form/super-form.vue2.js +7 -7
- package/es/components/super-form/use/helper.js +12 -12
- package/es/components/super-form/use/use-form.js +8 -8
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/field.js +34 -33
- package/es/components/table/table.vue2.js +154 -157
- package/es/components/table/use/use-data-source.js +90 -90
- package/es/components/tabs/tab-bar.vue2.js +2 -2
- package/es/components/tabs/tab-pane.vue2.js +6 -6
- package/es/components/teleport/teleport.vue2.js +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +2 -2
- package/es/components/time-picker/common/picker.vue2.js +8 -8
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
- package/es/components/time-select/time-select.vue2.js +3 -3
- package/es/components/timeline/timeline-item.vue2.js +1 -1
- package/es/components/tooltip/content.vue2.js +6 -6
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/trigger.vue2.js +2 -2
- package/es/components/transfer/transfer-panel.vue2.js +59 -58
- package/es/components/transfer/transfer.vue2.js +70 -69
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/tree/tree.vue2.js +60 -59
- package/es/components/upload/index.d.ts +3 -3
- package/es/components/upload/upload-content.vue.d.ts +2 -2
- package/es/components/upload/upload-content.vue2.js +76 -73
- package/es/components/upload/upload-dragger.vue2.js +2 -2
- package/es/components/upload/upload-list.vue2.js +46 -45
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/components/upload/upload.vue2.js +87 -85
- package/es/components/upload/utils.js +29 -29
- package/es/components/verify-code/verify-code.vue2.js +2 -2
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +9 -1
- package/es/hooks/use-id/index.js +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +43 -38
- package/es/locale/index.d.js +1 -0
- package/es/locale/index.d.ts +26 -0
- package/es/locale/index.js +10 -0
- package/es/locale/lang/en.d.ts +183 -0
- package/es/locale/lang/en.js +241 -0
- package/es/locale/lang/zh-cn.d.ts +183 -0
- package/es/locale/lang/zh-cn.js +241 -0
- package/es/locale/lang/zh-tw.d.ts +183 -0
- package/es/locale/lang/zh-tw.js +241 -0
- package/es/locale/use-locale.d.ts +17 -0
- package/es/locale/use-locale.js +56 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/es/utils/helper.js +2 -2
- package/es/utils/ns-cover.js +1 -1
- package/es/utils/vue/vnode.js +4 -4
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +1 -0
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.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-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/index.cjs +1 -0
- package/lib/components/message-box/index.d.ts +4 -0
- package/lib/components/message-box/message-box.vue.cjs +1 -0
- package/lib/components/message-box/message-box.vue.d.ts +103 -0
- package/lib/components/message-box/message-box.vue2.cjs +1 -0
- package/lib/components/message-box/method.cjs +1 -0
- package/lib/components/message-box/method.d.ts +3 -0
- package/lib/components/message-box/style/css.cjs +1 -0
- package/lib/components/message-box/style/css.d.ts +2 -0
- package/lib/components/message-box/style/index.cjs +1 -0
- package/lib/components/message-box/style/index.d.ts +2 -0
- package/lib/components/message-box/types.cjs +1 -0
- package/lib/components/message-box/types.d.ts +202 -0
- package/lib/components/modal/index.d.ts +1 -0
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -0
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/use-form.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +3 -3
- package/lib/components/upload/upload-content.vue.d.ts +2 -2
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/utils.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.cjs +1 -0
- package/lib/locale/index.d.cjs +1 -0
- package/lib/locale/index.d.ts +26 -0
- package/lib/locale/lang/en.cjs +1 -0
- package/lib/locale/lang/en.d.ts +183 -0
- package/lib/locale/lang/zh-cn.cjs +1 -0
- package/lib/locale/lang/zh-cn.d.ts +183 -0
- package/lib/locale/lang/zh-tw.cjs +1 -0
- package/lib/locale/lang/zh-tw.d.ts +183 -0
- package/lib/locale/use-locale.cjs +1 -0
- package/lib/locale/use-locale.d.ts +17 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/super-form.scss +0 -1
- package/theme-style/src/table.scss +4 -0
- package/theme-style/vft-super-form.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -24,6 +24,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
24
24
|
zIndex: {
|
|
25
25
|
type: import("vue").PropType<number>;
|
|
26
26
|
};
|
|
27
|
+
locale: {
|
|
28
|
+
type: import("vue").PropType<any>;
|
|
29
|
+
};
|
|
27
30
|
message: {
|
|
28
31
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
29
32
|
};
|
|
@@ -74,6 +77,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
77
|
zIndex: {
|
|
75
78
|
type: import("vue").PropType<number>;
|
|
76
79
|
};
|
|
80
|
+
locale: {
|
|
81
|
+
type: import("vue").PropType<any>;
|
|
82
|
+
};
|
|
77
83
|
message: {
|
|
78
84
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
79
85
|
};
|
|
@@ -121,6 +127,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
121
127
|
zIndex: {
|
|
122
128
|
type: import("vue").PropType<number>;
|
|
123
129
|
};
|
|
130
|
+
locale: {
|
|
131
|
+
type: import("vue").PropType<any>;
|
|
132
|
+
};
|
|
124
133
|
message: {
|
|
125
134
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
126
135
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import "@vueuse/core";
|
|
2
2
|
import "@vft/utils";
|
|
3
|
-
import { provideGlobalConfig as g, useGlobalComponentSettings as C, useGlobalConfig as
|
|
3
|
+
import { provideGlobalConfig as g, useGlobalComponentSettings as C, useGlobalConfig as x } from "./hooks/use-global-config.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
import { withInstall as o } from "../../utils/vue/install.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
8
8
|
import t from "./config-provider.vue2.js";
|
|
9
|
-
import { configProviderContextKey as b, messageConfig as
|
|
9
|
+
import { configProviderContextKey as d, localeContextKey as b, messageConfig as u } from "./constants.js";
|
|
10
10
|
const l = o(t);
|
|
11
11
|
export {
|
|
12
12
|
l as VftConfigProvider,
|
|
13
|
-
|
|
13
|
+
d as configProviderContextKey,
|
|
14
14
|
l as default,
|
|
15
|
-
|
|
15
|
+
b as localeContextKey,
|
|
16
|
+
u as messageConfig,
|
|
16
17
|
g as provideGlobalConfig,
|
|
17
18
|
C as useGlobalComponentSettings,
|
|
18
|
-
|
|
19
|
+
x as useGlobalConfig
|
|
19
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as o, computed as i,
|
|
1
|
+
import { defineComponent as o, computed as i, openBlock as m, createElementBlock as a, normalizeStyle as n, normalizeClass as l, unref as p, renderSlot as c } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import { addUnit as d } from "../../utils/helper.js";
|
|
@@ -19,7 +19,7 @@ const u = o({
|
|
|
19
19
|
const e = f("aside"), r = i(
|
|
20
20
|
() => t.width ? e.cssVarBlock({ width: d(t.width) }) : {}
|
|
21
21
|
);
|
|
22
|
-
return (s, h) => (
|
|
22
|
+
return (s, h) => (m(), a("aside", {
|
|
23
23
|
class: l(p(e).b()),
|
|
24
24
|
style: n(r.value)
|
|
25
25
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, useSlots as l, computed as m,
|
|
1
|
+
import { defineComponent as a, useSlots as l, computed as m, openBlock as f, createElementBlock as u, normalizeClass as p, unref as i, renderSlot as d } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -20,7 +20,7 @@ const _ = a({
|
|
|
20
20
|
const s = n.type.name;
|
|
21
21
|
return s === "vft-header" || s === "vft-footer";
|
|
22
22
|
}) : !1);
|
|
23
|
-
return (r, n) => (
|
|
23
|
+
return (r, n) => (f(), u("section", {
|
|
24
24
|
class: p([i(o).b(), i(o).is("vertical", c.value)])
|
|
25
25
|
}, [
|
|
26
26
|
d(r.$slots, "default")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as o, computed as s,
|
|
1
|
+
import { defineComponent as o, computed as s, openBlock as i, createElementBlock as n, normalizeStyle as a, normalizeClass as l, unref as p, renderSlot as c } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import { addUnit as f } from "../../utils/helper.js";
|
|
@@ -19,7 +19,7 @@ const h = o({
|
|
|
19
19
|
const e = u("footer"), r = s(
|
|
20
20
|
() => t.height ? e.cssVarBlock({ height: f(t.height) }) : {}
|
|
21
21
|
);
|
|
22
|
-
return (m, d) => (
|
|
22
|
+
return (m, d) => (i(), n("footer", {
|
|
23
23
|
class: l(p(e).b()),
|
|
24
24
|
style: a(r.value)
|
|
25
25
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as r, computed as a,
|
|
1
|
+
import { defineComponent as r, computed as a, openBlock as n, createElementBlock as s, normalizeStyle as i, normalizeClass as l, unref as p, renderSlot as c } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import { addUnit as h } from "../../utils/helper.js";
|
|
@@ -19,7 +19,7 @@ const u = r({
|
|
|
19
19
|
const t = d("header"), o = a(() => e.height ? t.cssVarBlock({
|
|
20
20
|
height: h(e.height)
|
|
21
21
|
}) : {});
|
|
22
|
-
return (m, f) => (
|
|
22
|
+
return (m, f) => (n(), s("header", {
|
|
23
23
|
class: l(p(t).b()),
|
|
24
24
|
style: i(o.value)
|
|
25
25
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as t,
|
|
1
|
+
import { defineComponent as t, openBlock as r, createElementBlock as m, normalizeClass as n, unref as p, renderSlot as s } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -14,7 +14,7 @@ const i = t({
|
|
|
14
14
|
...i,
|
|
15
15
|
setup(c) {
|
|
16
16
|
const e = a("main");
|
|
17
|
-
return (o, f) => (
|
|
17
|
+
return (o, f) => (r(), m("main", {
|
|
18
18
|
ref: "testRef",
|
|
19
19
|
class: n(p(e).b())
|
|
20
20
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, ref as a, computed as k,
|
|
1
|
+
import { defineComponent as p, ref as a, computed as k, openBlock as r, createBlock as c, Transition as C, withCtx as b, withDirectives as g, createElementVNode as d, normalizeClass as z, unref as m, withModifiers as M, normalizeStyle as $, createElementBlock as B, Fragment as E, renderList as S, vShow as F } from "vue";
|
|
2
2
|
import { useTimeoutFn as H, useClickAway as I, useEventListener as f } from "@vft/use";
|
|
3
3
|
import { VftMenuItem as L } from "../menu/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, ref as _, computed as h, onMounted as x, watch as y, onBeforeUnmount as C,
|
|
1
|
+
import { defineComponent as p, ref as _, computed as h, onMounted as x, watch as y, onBeforeUnmount as C, openBlock as E, createBlock as S, unref as A, createSlots as B, renderList as F, withCtx as k, renderSlot as D } from "vue";
|
|
2
2
|
import { VftStatistic as N } from "../statistic/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
@@ -44,7 +44,7 @@ const L = p({
|
|
|
44
44
|
* @description current display value
|
|
45
45
|
*/
|
|
46
46
|
displayValue: w
|
|
47
|
-
}), (t, n) => (
|
|
47
|
+
}), (t, n) => (E(), S(A(N), {
|
|
48
48
|
value: i.value,
|
|
49
49
|
title: t.title,
|
|
50
50
|
prefix: t.prefix,
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
import { ref as k, computed as m, unref as r, watch as
|
|
2
|
-
import
|
|
3
|
-
import { flatten as
|
|
1
|
+
import { ref as k, computed as m, unref as r, watch as Z, nextTick as ee } from "vue";
|
|
2
|
+
import A from "dayjs";
|
|
3
|
+
import { flatten as te, isArray as ae } from "lodash-es";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
6
|
import { castArray as x } from "../../../utils/helper.js";
|
|
7
7
|
import "../../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as se } from "../../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../../hooks/use-z-index/index.js";
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
import E from "../../../locale/use-locale.js";
|
|
13
|
+
import { buildPickerTable as ne } from "../utils.js";
|
|
14
|
+
const N = (a = "") => ["normal", "today"].includes(a), be = (a, f) => {
|
|
15
|
+
const { t: v } = E(), D = k("zh-cn"), y = k(), b = k(), g = k(), w = k(), C = k([[], [], [], [], [], []]);
|
|
15
16
|
let o = !1;
|
|
16
|
-
const c = a.date.$locale().weekStart || 7, S = a.date.locale("zh-cn").localeData().weekdaysShort().map((e) => e.toLowerCase()), O = m(() => c > 3 ? 7 - c : -c),
|
|
17
|
+
const c = a.date.$locale().weekStart || 7, S = a.date.locale("zh-cn").localeData().weekdaysShort().map((e) => e.toLowerCase()), O = m(() => c > 3 ? 7 - c : -c), R = m(() => {
|
|
17
18
|
const e = a.date.startOf("month");
|
|
18
19
|
return e.subtract(e.day() || 7, "day");
|
|
19
|
-
}),
|
|
20
|
+
}), L = m(() => S.concat(S).slice(
|
|
20
21
|
c,
|
|
21
22
|
c + 7
|
|
22
|
-
)),
|
|
23
|
-
const e = a.date.startOf("month"), t = e.day() || 7,
|
|
23
|
+
)), V = m(() => te(r(M)).some((e) => e.isCurrent)), K = m(() => {
|
|
24
|
+
const e = a.date.startOf("month"), t = e.day() || 7, s = e.daysInMonth(), n = e.subtract(1, "month").daysInMonth();
|
|
24
25
|
return {
|
|
25
26
|
startOfMonthDay: t,
|
|
26
|
-
dateCountOfMonth:
|
|
27
|
-
dateCountOfLastMonth:
|
|
27
|
+
dateCountOfMonth: s,
|
|
28
|
+
dateCountOfLastMonth: n
|
|
28
29
|
};
|
|
29
|
-
}),
|
|
30
|
-
const { startOfMonthDay: l, dateCountOfMonth: i, dateCountOfLastMonth: u } = r(
|
|
31
|
-
if (
|
|
30
|
+
}), F = m(() => a.selectionMode === "dates" ? x(a.parsedValue) : []), _ = (e, { count: t, rowIndex: s, columnIndex: n }) => {
|
|
31
|
+
const { startOfMonthDay: l, dateCountOfMonth: i, dateCountOfLastMonth: u } = r(K), h = r(O);
|
|
32
|
+
if (s >= 0 && s <= 1) {
|
|
32
33
|
const d = l + h < 0 ? 7 + l + h : l + h;
|
|
33
|
-
if (
|
|
34
|
+
if (n + s * 7 >= d)
|
|
34
35
|
return e.text = t, !0;
|
|
35
|
-
e.text = u - (d -
|
|
36
|
+
e.text = u - (d - n % 7) + 1 + s * 7, e.type = "prev-month";
|
|
36
37
|
} else
|
|
37
38
|
return t <= i ? e.text = t : (e.text = t - i, e.type = "next-month"), !0;
|
|
38
39
|
return !1;
|
|
39
|
-
},
|
|
40
|
-
const { disabledDate: l, cellClassName: i } = a, u = r(
|
|
41
|
-
return e.selected = u.find((
|
|
42
|
-
},
|
|
40
|
+
}, $ = (e, { columnIndex: t, rowIndex: s }, n) => {
|
|
41
|
+
const { disabledDate: l, cellClassName: i } = a, u = r(F), h = _(e, { count: n, rowIndex: s, columnIndex: t }), d = e.dayjs.toDate();
|
|
42
|
+
return e.selected = u.find((Y) => Y.isSame(e.dayjs, "day")), e.isSelected = !!e.selected, e.isCurrent = W(e), e.disabled = l?.(d), e.customClass = i?.(d), h;
|
|
43
|
+
}, z = (e) => {
|
|
43
44
|
if (a.selectionMode === "week") {
|
|
44
|
-
const [t,
|
|
45
|
-
e[t].inRange =
|
|
45
|
+
const [t, s] = a.showWeekNumber ? [1, 7] : [0, 6], n = j(e[t + 1]);
|
|
46
|
+
e[t].inRange = n, e[t].start = n, e[s].inRange = n, e[s].end = n;
|
|
46
47
|
}
|
|
47
48
|
}, M = m(() => {
|
|
48
|
-
const { minDate: e, maxDate: t, rangeState:
|
|
49
|
+
const { minDate: e, maxDate: t, rangeState: s, showWeekNumber: n } = a, l = r(O), i = r(C), u = "day";
|
|
49
50
|
let h = 1;
|
|
50
|
-
if (
|
|
51
|
+
if (ne({ row: 6, column: 7 }, i, {
|
|
51
52
|
startDate: e,
|
|
52
|
-
columnIndexOffset:
|
|
53
|
-
nextEndDate:
|
|
54
|
-
now:
|
|
53
|
+
columnIndexOffset: n ? 1 : 0,
|
|
54
|
+
nextEndDate: s.endDate || t || s.selecting && e || null,
|
|
55
|
+
now: A().locale(r(D)).startOf(u),
|
|
55
56
|
unit: u,
|
|
56
|
-
relativeDateGetter: (d) => r(
|
|
57
|
+
relativeDateGetter: (d) => r(R).add(d - l, u),
|
|
57
58
|
setCellMetadata: (...d) => {
|
|
58
|
-
|
|
59
|
+
$(...d, h) && (h += 1);
|
|
59
60
|
},
|
|
60
|
-
setRowMetadata:
|
|
61
|
-
}),
|
|
61
|
+
setRowMetadata: z
|
|
62
|
+
}), n)
|
|
62
63
|
for (let d = 0; d < 6; d++)
|
|
63
64
|
i[d][1].dayjs && (i[d][0] = {
|
|
64
65
|
type: "week",
|
|
@@ -66,54 +67,54 @@ const N = (a = "") => ["normal", "today"].includes(a), ye = (a, f) => {
|
|
|
66
67
|
});
|
|
67
68
|
return i;
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
+
Z(
|
|
70
71
|
() => a.date,
|
|
71
72
|
async () => {
|
|
72
|
-
r(y)?.contains(document.activeElement) && (await
|
|
73
|
+
r(y)?.contains(document.activeElement) && (await ee(), await T());
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
return r(
|
|
78
|
-
},
|
|
76
|
+
const T = async () => r(b)?.focus(), W = (e) => a.selectionMode === "date" && N(e.type) && B(e, a.parsedValue), B = (e, t) => t ? A(t).locale(r(D)).isSame(a.date.date(Number(e.text)), "day") : !1, P = (e, t) => {
|
|
77
|
+
const s = e * 7 + (t - (a.showWeekNumber ? 1 : 0)) - r(O);
|
|
78
|
+
return r(R).add(s, "day");
|
|
79
|
+
}, U = (e) => {
|
|
79
80
|
if (!a.rangeState.selecting) return;
|
|
80
81
|
let t = e.target;
|
|
81
82
|
if (t.tagName === "SPAN" && (t = t.parentNode?.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD") return;
|
|
82
|
-
const
|
|
83
|
-
r(M)[
|
|
83
|
+
const s = t.parentNode.rowIndex - 1, n = t.cellIndex;
|
|
84
|
+
r(M)[s][n].disabled || (s !== r(g) || n !== r(w)) && (g.value = s, w.value = n, f("changerange", {
|
|
84
85
|
selecting: !0,
|
|
85
|
-
endDate:
|
|
86
|
+
endDate: P(s, n)
|
|
86
87
|
}));
|
|
87
|
-
},
|
|
88
|
-
o || r(
|
|
89
|
-
},
|
|
88
|
+
}, G = (e) => !r(V) && e?.text === 1 && e.type === "normal" || e.isCurrent, H = (e) => {
|
|
89
|
+
o || r(V) || a.selectionMode !== "date" || I(e, !0);
|
|
90
|
+
}, p = (e) => {
|
|
90
91
|
e.target.closest("td") && (o = !0);
|
|
91
|
-
}, H = (e) => {
|
|
92
|
-
e.target.closest("td") && (o = !1);
|
|
93
92
|
}, q = (e) => {
|
|
94
|
-
|
|
93
|
+
e.target.closest("td") && (o = !1);
|
|
95
94
|
}, J = (e) => {
|
|
96
|
-
|
|
95
|
+
!a.rangeState.selecting || !a.minDate ? (f("pick", { minDate: e, maxDate: null }), f("select", !0)) : (e >= a.minDate ? f("pick", { minDate: a.minDate, maxDate: e }) : f("pick", { minDate: e, maxDate: a.minDate }), f("select", !1));
|
|
96
|
+
}, Q = (e) => {
|
|
97
|
+
const t = e.week(), s = `${e.year()}w${t}`;
|
|
97
98
|
f("pick", {
|
|
98
99
|
year: e.year(),
|
|
99
100
|
week: t,
|
|
100
|
-
value:
|
|
101
|
+
value: s,
|
|
101
102
|
date: e.startOf("week")
|
|
102
103
|
});
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
(
|
|
104
|
+
}, X = (e, t) => {
|
|
105
|
+
const s = t ? x(a.parsedValue).filter(
|
|
106
|
+
(n) => n?.valueOf() !== e.valueOf()
|
|
106
107
|
) : x(a.parsedValue).concat([e]);
|
|
107
|
-
f("pick",
|
|
108
|
-
},
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
111
|
-
const
|
|
108
|
+
f("pick", s);
|
|
109
|
+
}, I = (e, t = !1) => {
|
|
110
|
+
const s = e.target.closest("td");
|
|
111
|
+
if (!s) return;
|
|
112
|
+
const n = s.parentNode.rowIndex - 1, l = s.cellIndex, i = r(M)[n][l];
|
|
112
113
|
if (i.disabled || i.type === "week") return;
|
|
113
|
-
const u =
|
|
114
|
+
const u = P(n, l);
|
|
114
115
|
switch (a.selectionMode) {
|
|
115
116
|
case "range": {
|
|
116
|
-
|
|
117
|
+
J(u);
|
|
117
118
|
break;
|
|
118
119
|
}
|
|
119
120
|
case "date": {
|
|
@@ -121,53 +122,53 @@ const N = (a = "") => ["normal", "today"].includes(a), ye = (a, f) => {
|
|
|
121
122
|
break;
|
|
122
123
|
}
|
|
123
124
|
case "week": {
|
|
124
|
-
|
|
125
|
+
Q(u);
|
|
125
126
|
break;
|
|
126
127
|
}
|
|
127
128
|
case "dates": {
|
|
128
|
-
|
|
129
|
+
X(u, !!i.selected);
|
|
129
130
|
break;
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
},
|
|
133
|
+
}, j = (e) => {
|
|
133
134
|
if (a.selectionMode !== "week") return !1;
|
|
134
135
|
let t = a.date.startOf("day");
|
|
135
|
-
if (e.type === "prev-month" && (t = t.subtract(1, "month")), e.type === "next-month" && (t = t.add(1, "month")), t = t.date(Number.parseInt(e.text, 10)), a.parsedValue && !
|
|
136
|
-
const
|
|
137
|
-
return a.parsedValue.subtract(
|
|
136
|
+
if (e.type === "prev-month" && (t = t.subtract(1, "month")), e.type === "next-month" && (t = t.add(1, "month")), t = t.date(Number.parseInt(e.text, 10)), a.parsedValue && !ae(a.parsedValue)) {
|
|
137
|
+
const s = (a.parsedValue.day() - c + 7) % 7 - 1;
|
|
138
|
+
return a.parsedValue.subtract(s, "day").isSame(t, "day");
|
|
138
139
|
}
|
|
139
140
|
return !1;
|
|
140
141
|
};
|
|
141
142
|
return {
|
|
142
|
-
WEEKS:
|
|
143
|
+
WEEKS: L,
|
|
143
144
|
rows: M,
|
|
144
145
|
tbodyRef: y,
|
|
145
146
|
currentCellRef: b,
|
|
146
147
|
// cellMatchesDate,
|
|
147
148
|
// getDateOfCell,
|
|
148
|
-
focus:
|
|
149
|
+
focus: T,
|
|
149
150
|
isCurrent: W,
|
|
150
|
-
isWeekActive:
|
|
151
|
-
isSelectedCell:
|
|
152
|
-
handlePickDate:
|
|
153
|
-
handleMouseUp:
|
|
154
|
-
handleMouseDown:
|
|
155
|
-
handleMouseMove:
|
|
156
|
-
handleFocus:
|
|
151
|
+
isWeekActive: j,
|
|
152
|
+
isSelectedCell: G,
|
|
153
|
+
handlePickDate: I,
|
|
154
|
+
handleMouseUp: q,
|
|
155
|
+
handleMouseDown: p,
|
|
156
|
+
handleMouseMove: U,
|
|
157
|
+
handleFocus: H
|
|
157
158
|
};
|
|
158
|
-
},
|
|
159
|
+
}, ge = (a, {
|
|
159
160
|
isCurrent: f,
|
|
160
|
-
isWeekActive:
|
|
161
|
+
isWeekActive: v
|
|
161
162
|
}) => {
|
|
162
|
-
const y =
|
|
163
|
+
const { t: D } = E(), y = se("date-table"), b = m(() => [
|
|
163
164
|
y.b(),
|
|
164
165
|
{ "is-week-mode": a.selectionMode === "week" }
|
|
165
|
-
]), g = m(() => "
|
|
166
|
+
]), g = m(() => D("vft.datePicker.dateTableLabel")), w = (o) => {
|
|
166
167
|
const c = [];
|
|
167
168
|
return N(o.type) && !o.disabled ? (c.push("available"), o.type === "today" && c.push("today")) : c.push(o.type), f(o) && c.push("current"), o.inRange && (N(o.type) || a.selectionMode === "week") && (c.push("in-range"), o.start && c.push("start-date"), o.end && c.push("end-date")), o.disabled && c.push("disabled"), o.selected && c.push("selected"), o.customClass && c.push(o.customClass), c.join(" ");
|
|
168
169
|
}, C = (o) => [
|
|
169
170
|
y.e("row"),
|
|
170
|
-
{ current:
|
|
171
|
+
{ current: v(o) }
|
|
171
172
|
];
|
|
172
173
|
return {
|
|
173
174
|
tableKls: b,
|
|
@@ -178,6 +179,6 @@ const N = (a = "") => ["normal", "today"].includes(a), ye = (a, f) => {
|
|
|
178
179
|
};
|
|
179
180
|
};
|
|
180
181
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
be as useBasicDateTable,
|
|
183
|
+
ge as useBasicDateTableDOM
|
|
183
184
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { computed as a } from "vue";
|
|
2
|
-
|
|
2
|
+
import Y from "../../../locale/use-locale.js";
|
|
3
|
+
const p = ({
|
|
3
4
|
unlinkPanels: u,
|
|
4
5
|
leftDate: e,
|
|
5
6
|
rightDate: r
|
|
6
7
|
}) => {
|
|
7
|
-
const v = () => {
|
|
8
|
+
const { t: v } = Y(), o = () => {
|
|
8
9
|
e.value = e.value.subtract(1, "year"), u.value || (r.value = r.value.subtract(1, "year"));
|
|
9
|
-
},
|
|
10
|
+
}, c = () => {
|
|
10
11
|
u.value || (e.value = e.value.add(1, "year")), r.value = r.value.add(1, "year");
|
|
11
|
-
},
|
|
12
|
+
}, l = () => {
|
|
12
13
|
e.value = e.value.add(1, "year");
|
|
13
|
-
},
|
|
14
|
+
}, y = () => {
|
|
14
15
|
r.value = r.value.subtract(1, "year");
|
|
15
|
-
}, n = a(() => `${e.value.year()}
|
|
16
|
+
}, n = a(() => `${e.value.year()} ${v("vft.datePicker.year")}`), s = a(() => `${r.value.year()} ${v("vft.datePicker.year")}`), d = a(() => e.value.year()), t = a(() => r.value.year() === e.value.year() ? e.value.year() + 1 : r.value.year());
|
|
16
17
|
return {
|
|
17
|
-
leftPrevYear:
|
|
18
|
-
rightNextYear:
|
|
19
|
-
leftNextYear:
|
|
20
|
-
rightPrevYear:
|
|
18
|
+
leftPrevYear: o,
|
|
19
|
+
rightNextYear: c,
|
|
20
|
+
leftNextYear: l,
|
|
21
|
+
rightPrevYear: y,
|
|
21
22
|
leftLabel: n,
|
|
22
|
-
rightLabel:
|
|
23
|
-
leftYear:
|
|
24
|
-
rightYear:
|
|
23
|
+
rightLabel: s,
|
|
24
|
+
leftYear: d,
|
|
25
|
+
rightYear: t
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
p as useMonthRangeHeader
|
|
29
30
|
};
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { ref as i, inject as
|
|
1
|
+
import { ref as i, inject as _, computed as o, nextTick as Y } from "vue";
|
|
2
2
|
import "../../time-picker/index.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import j from "../../../locale/use-locale.js";
|
|
4
|
+
import { getValidDateOfYear as x, getValidDateOfMonth as K } from "../utils.js";
|
|
5
|
+
import { PICKER_BASE_INJECTION_KEY as N } from "../../time-picker/constants.js";
|
|
6
|
+
const T = (R, p, c, u) => {
|
|
7
|
+
const { t: L } = j(), l = i("date"), h = i(), s = i("date"), v = i(), $ = _(N), { disabledDate: d } = $.props, m = i("zh-cn"), P = o(() => c.value.year()), C = o(() => c.value.month()), w = o(() => u.value.year()), b = o(() => u.value.month());
|
|
8
|
+
function y(e, a) {
|
|
9
|
+
const n = L("vft.datePicker.year");
|
|
9
10
|
if (e.value === "year") {
|
|
10
11
|
const t = Math.floor(a.value / 10) * 10;
|
|
11
12
|
return n ? `${t} ${n} - ${t + 9} ${n}` : `${t} - ${t + 9}`;
|
|
12
13
|
}
|
|
13
14
|
return `${a.value} ${n}`;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function g(e) {
|
|
16
17
|
e?.focus();
|
|
17
18
|
}
|
|
18
19
|
async function k(e, a) {
|
|
19
20
|
const n = e === "left" ? l : s, t = e === "left" ? h : v;
|
|
20
|
-
n.value = a, await Y(),
|
|
21
|
+
n.value = a, await Y(), g(t.value);
|
|
21
22
|
}
|
|
22
23
|
async function f(e, a, n) {
|
|
23
|
-
const t = a === "left", r = t ? c : u,
|
|
24
|
+
const t = a === "left", r = t ? c : u, E = t ? u : c, B = t ? l : s, I = t ? h : v;
|
|
24
25
|
if (e === "year") {
|
|
25
|
-
const
|
|
26
|
-
r.value =
|
|
26
|
+
const O = r.value.year(n);
|
|
27
|
+
r.value = x(O, m.value, d);
|
|
27
28
|
}
|
|
28
|
-
e === "month" && (r.value =
|
|
29
|
+
e === "month" && (r.value = K(
|
|
29
30
|
r.value,
|
|
30
31
|
r.value.year(),
|
|
31
32
|
n,
|
|
32
33
|
m.value,
|
|
33
34
|
d
|
|
34
|
-
)), R.unlinkPanels || (
|
|
35
|
+
)), R.unlinkPanels || (E.value = a === "left" ? r.value.add(1, "month") : r.value.subtract(1, "month")), B.value = e === "year" ? "month" : "date", await Y(), g(I.value), V(e);
|
|
35
36
|
}
|
|
36
37
|
function V(e) {
|
|
37
|
-
|
|
38
|
+
p(
|
|
38
39
|
"panel-change",
|
|
39
40
|
[c.value.toDate(), u.value.toDate()],
|
|
40
41
|
e
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function M(e, a, n) {
|
|
44
45
|
const t = n ? "add" : "subtract";
|
|
45
46
|
return e === "year" ? a[t](10, "year") : a[t](1, "year");
|
|
46
47
|
}
|
|
@@ -49,13 +50,13 @@ const D = (R, $, c, u) => {
|
|
|
49
50
|
rightCurrentView: s,
|
|
50
51
|
leftCurrentViewRef: h,
|
|
51
52
|
rightCurrentViewRef: v,
|
|
52
|
-
leftYear:
|
|
53
|
-
rightYear:
|
|
53
|
+
leftYear: P,
|
|
54
|
+
rightYear: w,
|
|
54
55
|
leftMonth: C,
|
|
55
|
-
rightMonth:
|
|
56
|
-
leftYearLabel: o(() =>
|
|
56
|
+
rightMonth: b,
|
|
57
|
+
leftYearLabel: o(() => y(l, P)),
|
|
57
58
|
rightYearLabel: o(
|
|
58
|
-
() =>
|
|
59
|
+
() => y(s, w)
|
|
59
60
|
),
|
|
60
61
|
showLeftPicker: (e) => k("left", e),
|
|
61
62
|
showRightPicker: (e) => k("right", e),
|
|
@@ -64,9 +65,9 @@ const D = (R, $, c, u) => {
|
|
|
64
65
|
handleLeftMonthPick: (e) => f("month", "left", e),
|
|
65
66
|
handleRightMonthPick: (e) => f("month", "right", e),
|
|
66
67
|
handlePanelChange: V,
|
|
67
|
-
adjustDateByView:
|
|
68
|
+
adjustDateByView: M
|
|
68
69
|
};
|
|
69
70
|
};
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
T as usePanelDateRange
|
|
72
73
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, onBeforeUnmount as L,
|
|
1
|
+
import { defineComponent as K, onBeforeUnmount as L, openBlock as s, createElementBlock as o, unref as e, withModifiers as $, normalizeClass as n, createElementVNode as M, createCommentVNode as z, Fragment as u, renderList as d, toDisplayString as A, createVNode as H } from "vue";
|
|
2
2
|
import { basicDateTableEmits as O, basicDateTableProps as j } from "../props/basic-date-table.js";
|
|
3
3
|
import { useBasicDateTable as q, useBasicDateTableDOM as G } from "../composables/use-basic-date-table.js";
|
|
4
4
|
import I from "./basic-cell-render.js";
|
|
@@ -33,7 +33,7 @@ const J = ["aria-label"], Q = ["aria-label"], X = ["aria-current", "aria-selecte
|
|
|
33
33
|
* @description focus on current cell
|
|
34
34
|
*/
|
|
35
35
|
focus: R
|
|
36
|
-
}), (W, r) => (
|
|
36
|
+
}), (W, r) => (s(), o("table", {
|
|
37
37
|
"aria-label": e(F),
|
|
38
38
|
class: n(e(P)),
|
|
39
39
|
cellspacing: "0",
|
|
@@ -56,22 +56,22 @@ const J = ["aria-label"], Q = ["aria-label"], X = ["aria-current", "aria-selecte
|
|
|
56
56
|
ref: x
|
|
57
57
|
}, [
|
|
58
58
|
M("tr", null, [
|
|
59
|
-
W.showWeekNumber ? (
|
|
59
|
+
W.showWeekNumber ? (s(), o("th", {
|
|
60
60
|
key: 0,
|
|
61
61
|
scope: "col",
|
|
62
62
|
class: n(e(V))
|
|
63
63
|
}, null, 2)) : z("", !0),
|
|
64
|
-
(
|
|
64
|
+
(s(!0), o(u, null, d(e(B), (t, a) => (s(), o("th", {
|
|
65
65
|
key: a,
|
|
66
66
|
"aria-label": t,
|
|
67
67
|
scope: "col"
|
|
68
68
|
}, A(t), 9, Q))), 128))
|
|
69
69
|
]),
|
|
70
|
-
(
|
|
70
|
+
(s(!0), o(u, null, d(e(w), (t, a) => (s(), o("tr", {
|
|
71
71
|
key: a,
|
|
72
72
|
class: n(e(U)(t[1]))
|
|
73
73
|
}, [
|
|
74
|
-
(
|
|
74
|
+
(s(!0), o(u, null, d(t, (l, _) => (s(), o("td", {
|
|
75
75
|
key: `${a}.${_}`,
|
|
76
76
|
ref_for: !0,
|
|
77
77
|
ref: (i) => !e(D) && e(b)(l) && (N.value = i),
|