vft 0.0.509 → 0.0.513
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.vue.d.ts +2 -2
- package/es/components/autocomplete/autocomplete.vue2.js +1 -1
- package/es/components/autocomplete/index.d.ts +6 -6
- 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/index.d.ts +9 -9
- 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/cascader/cascader.vue2.js +202 -203
- package/es/components/cascader-panel/index.vue2.js +1 -1
- package/es/components/cascader-panel/menu.vue2.js +49 -50
- 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 +18 -19
- 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 +133 -134
- 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 +0 -2
- package/es/components/config-provider/config-provider.vue2.js +4 -5
- package/es/components/config-provider/constants.d.ts +0 -1
- package/es/components/config-provider/constants.js +2 -3
- package/es/components/config-provider/hooks/use-global-config.js +30 -33
- package/es/components/config-provider/index.d.ts +0 -9
- package/es/components/config-provider/index.js +5 -6
- 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.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +123 -124
- package/es/components/date-picker/composables/use-month-range-header.js +14 -15
- package/es/components/date-picker/composables/use-panel-date-range.js +23 -24
- 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 +39 -40
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +40 -41
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +178 -179
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +224 -225
- 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 +36 -39
- 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.vue2.js +3 -3
- 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.vue2.js +66 -67
- package/es/components/empty/empty.vue2.js +36 -37
- 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 +17 -18
- 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 +59 -60
- package/es/components/image-viewer/image-viewer.vue2.js +44 -45
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +213 -211
- package/es/components/input/input.vue2.js +6 -6
- package/es/components/input-number/input-number.vue2.js +4 -4
- 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 +74 -75
- package/es/components/md-container/toc.js +36 -37
- 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 +100 -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/modal/index.d.ts +1 -0
- package/es/components/modal/modal-footer-action.vue2.js +24 -25
- 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 +16 -17
- package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +53 -54
- 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 +28 -29
- 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 +20 -21
- package/es/components/pagination/components/total.vue2.js +10 -11
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popconfirm/popconfirm.vue2.js +39 -40
- 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 +50 -51
- package/es/components/segmented/segmented.vue2.js +7 -7
- package/es/components/select/group-item.vue.js +2 -2
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/option-item.vue.js +2 -2
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/select/useSelect.js +231 -232
- 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 +47 -48
- package/es/components/super-form/super-form-item.vue2.js +204 -206
- package/es/components/super-form/super-form.vue2.js +7 -7
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +63 -63
- 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 +111 -130
- package/es/components/table/table.vue2.js +128 -133
- package/es/components/table/use/use-columns.js +26 -29
- package/es/components/table/use/use-data-source.js +59 -60
- 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 +65 -66
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +133 -134
- 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 +58 -59
- package/es/components/transfer/transfer.vue2.js +69 -70
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/tree/tree.vue2.js +59 -60
- package/es/components/upload/upload-content.vue2.js +47 -48
- package/es/components/upload/upload-dragger.vue2.js +2 -2
- package/es/components/upload/upload-list.vue2.js +45 -46
- package/es/components/upload/upload.vue2.js +98 -99
- package/es/components/verify-code/verify-code.vue2.js +2 -2
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/hooks/use-id/index.js +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +0 -1
- package/es/index.js +39 -42
- 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 +3 -3
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- 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 +0 -2
- 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 +0 -1
- 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 +0 -9
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +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.vue2.cjs +1 -1
- 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/input/input.vue2.cjs +1 -1
- 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.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/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/super-form/super-form-action.vue2.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/helper.d.ts +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-columns.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/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/message-box.scss +2 -2
- package/theme-style/src/table.scss +6 -0
- package/theme-style/vft-message-box.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
- package/es/locale/index.d.ts +0 -26
- package/es/locale/index.js +0 -10
- package/es/locale/lang/en.d.ts +0 -183
- package/es/locale/lang/en.js +0 -241
- package/es/locale/lang/zh-cn.d.ts +0 -183
- package/es/locale/lang/zh-cn.js +0 -241
- package/es/locale/lang/zh-tw.d.ts +0 -183
- package/es/locale/lang/zh-tw.js +0 -241
- package/es/locale/use-locale.d.ts +0 -17
- package/es/locale/use-locale.js +0 -56
- package/lib/locale/index.cjs +0 -1
- package/lib/locale/index.d.ts +0 -26
- package/lib/locale/lang/en.cjs +0 -1
- package/lib/locale/lang/en.d.ts +0 -183
- package/lib/locale/lang/zh-cn.cjs +0 -1
- package/lib/locale/lang/zh-cn.d.ts +0 -183
- package/lib/locale/lang/zh-tw.cjs +0 -1
- package/lib/locale/lang/zh-tw.d.ts +0 -183
- package/lib/locale/use-locale.cjs +0 -1
- package/lib/locale/use-locale.d.ts +0 -17
- /package/es/{locale/index.d.js → components/message-box/types.js} +0 -0
- /package/lib/{locale/index.d.cjs → components/message-box/types.cjs} +0 -0
|
@@ -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),
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as P, ref as d, computed as F, watch as L, nextTick as Y, openBlock as f, createElementBlock as u, normalizeClass as k, unref as N, createElementVNode as $, Fragment as M, renderList as C, withKeys as O, withModifiers as _, createVNode as q } from "vue";
|
|
2
|
+
import b from "dayjs";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import { hasClass as T } from "@vft/utils";
|
|
5
5
|
import { castArray as p } from "../../../utils/helper.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as G } 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
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
const Z = ["aria-label"], ee = ["aria-selected", "tabindex", "onKeydown"], ye = /* @__PURE__ */ K({
|
|
12
|
+
import { basicMonthTableProps as H } from "../props/basic-month-table.js";
|
|
13
|
+
import { datesInMonth as J, getValidDateOfMonth as Q } from "../utils.js";
|
|
14
|
+
import U from "./basic-cell-render.js";
|
|
15
|
+
const W = ["aria-selected", "tabindex", "onKeydown"], ue = /* @__PURE__ */ P({
|
|
17
16
|
__name: "basic-month-table",
|
|
18
|
-
props:
|
|
17
|
+
props: H,
|
|
19
18
|
emits: ["changerange", "pick", "select"],
|
|
20
19
|
setup(V, { expose: I, emit: R }) {
|
|
21
|
-
const e = V, c = R,
|
|
20
|
+
const e = V, c = R, E = G("month-table"), h = d("zh-cn"), w = d(), D = d(), A = d(
|
|
22
21
|
e.date.locale("zh-cn").localeData().monthsShort().map((r) => r.toLowerCase())
|
|
23
|
-
),
|
|
22
|
+
), B = d([
|
|
24
23
|
[],
|
|
25
24
|
[],
|
|
26
25
|
[]
|
|
27
|
-
]),
|
|
28
|
-
const r =
|
|
26
|
+
]), x = d(), v = d(), S = F(() => {
|
|
27
|
+
const r = B.value, t = b().locale(h.value).startOf("month");
|
|
29
28
|
for (let a = 0; a < 3; a++) {
|
|
30
29
|
const s = r[a];
|
|
31
30
|
for (let n = 0; n < 4; n++) {
|
|
@@ -45,26 +44,26 @@ const Z = ["aria-label"], ee = ["aria-selected", "tabindex", "onKeydown"], ye =
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
return r;
|
|
48
|
-
}),
|
|
47
|
+
}), j = () => {
|
|
49
48
|
D.value?.focus();
|
|
50
|
-
},
|
|
49
|
+
}, z = (r) => {
|
|
51
50
|
const t = {}, a = e.date.year(), s = /* @__PURE__ */ new Date(), n = r.text;
|
|
52
|
-
return t.disabled = e.disabledDate ?
|
|
51
|
+
return t.disabled = e.disabledDate ? J(e.date, a, n, h.value).every(
|
|
53
52
|
e.disabledDate
|
|
54
53
|
) : !1, t.current = p(e.parsedValue).findIndex(
|
|
55
|
-
(o) =>
|
|
54
|
+
(o) => b.isDayjs(o) && o.year() === a && o.month() === n
|
|
56
55
|
) >= 0, t.today = s.getFullYear() === a && s.getMonth() === n, r.inRange && (t["in-range"] = !0, r.start && (t["start-date"] = !0), r.end && (t["end-date"] = !0)), t;
|
|
57
56
|
}, y = (r) => {
|
|
58
57
|
const t = e.date.year(), a = r.text;
|
|
59
58
|
return p(e.date).findIndex(
|
|
60
59
|
(s) => s.year() === t && s.month() === a
|
|
61
60
|
) >= 0;
|
|
62
|
-
},
|
|
61
|
+
}, K = (r) => {
|
|
63
62
|
if (!e.rangeState.selecting) return;
|
|
64
63
|
let t = r.target;
|
|
65
64
|
if (t.tagName === "SPAN" && (t = t.parentNode?.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD") return;
|
|
66
65
|
const a = t.parentNode.rowIndex, s = t.cellIndex;
|
|
67
|
-
|
|
66
|
+
S.value[a][s].disabled || (a !== x.value || s !== v.value) && (x.value = a, v.value = s, c("changerange", {
|
|
68
67
|
selecting: !0,
|
|
69
68
|
endDate: e.date.startOf("year").month(a * 4 + s)
|
|
70
69
|
}));
|
|
@@ -79,7 +78,7 @@ const Z = ["aria-label"], ee = ["aria-selected", "tabindex", "onKeydown"], ye =
|
|
|
79
78
|
c("pick", p(e.parsedValue), !1);
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
|
-
const m =
|
|
81
|
+
const m = Q(
|
|
83
82
|
e.date,
|
|
84
83
|
e.date.year(),
|
|
85
84
|
n,
|
|
@@ -91,56 +90,56 @@ const Z = ["aria-label"], ee = ["aria-selected", "tabindex", "onKeydown"], ye =
|
|
|
91
90
|
// This allows remove same months from different years #20019
|
|
92
91
|
l?.year() !== m.year() || l?.month() !== m.month()
|
|
93
92
|
)
|
|
94
|
-
) : p(e.parsedValue).concat([
|
|
93
|
+
) : p(e.parsedValue).concat([b(m)]);
|
|
95
94
|
c("pick", i);
|
|
96
95
|
} else e.selectionMode === "range" ? e.rangeState.selecting ? (e.minDate && o >= e.minDate ? c("pick", { minDate: e.minDate, maxDate: o }) : c("pick", { minDate: o, maxDate: e.minDate }), c("select", !1)) : (c("pick", { minDate: o, maxDate: null }), c("select", !0)) : c("pick", n);
|
|
97
96
|
};
|
|
98
|
-
return
|
|
97
|
+
return L(
|
|
99
98
|
() => e.date,
|
|
100
99
|
async () => {
|
|
101
|
-
|
|
100
|
+
w.value?.contains(document.activeElement) && (await Y(), D.value?.focus());
|
|
102
101
|
}
|
|
103
102
|
), I({
|
|
104
103
|
/**
|
|
105
104
|
* @description focus current cell
|
|
106
105
|
*/
|
|
107
|
-
focus:
|
|
108
|
-
}), (r, t) => (
|
|
106
|
+
focus: j
|
|
107
|
+
}), (r, t) => (f(), u("table", {
|
|
109
108
|
role: "grid",
|
|
110
|
-
"aria-label":
|
|
111
|
-
class: N(
|
|
109
|
+
"aria-label": "使用方向键与 Enter 键可选择月份",
|
|
110
|
+
class: k(N(E).b()),
|
|
112
111
|
onClick: g,
|
|
113
|
-
onMousemove:
|
|
112
|
+
onMousemove: K
|
|
114
113
|
}, [
|
|
115
|
-
|
|
114
|
+
$("tbody", {
|
|
116
115
|
ref_key: "tbodyRef",
|
|
117
|
-
ref:
|
|
116
|
+
ref: w
|
|
118
117
|
}, [
|
|
119
|
-
(
|
|
120
|
-
(
|
|
118
|
+
(f(!0), u(M, null, C(S.value, (a, s) => (f(), u("tr", { key: s }, [
|
|
119
|
+
(f(!0), u(M, null, C(a, (n, o) => (f(), u("td", {
|
|
121
120
|
key: o,
|
|
122
121
|
ref_for: !0,
|
|
123
122
|
ref: (m) => y(n) && (D.value = m),
|
|
124
|
-
class:
|
|
123
|
+
class: k(z(n)),
|
|
125
124
|
"aria-selected": `${y(n)}`,
|
|
126
125
|
tabindex: y(n) ? 0 : -1,
|
|
127
126
|
onKeydown: [
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
O(_(g, ["prevent", "stop"]), ["space"]),
|
|
128
|
+
O(_(g, ["prevent", "stop"]), ["enter"])
|
|
130
129
|
]
|
|
131
130
|
}, [
|
|
132
|
-
|
|
131
|
+
q(N(U), {
|
|
133
132
|
cell: {
|
|
134
133
|
...n,
|
|
135
|
-
renderText:
|
|
134
|
+
renderText: A.value[n.text]
|
|
136
135
|
}
|
|
137
136
|
}, null, 8, ["cell"])
|
|
138
|
-
], 42,
|
|
137
|
+
], 42, W))), 128))
|
|
139
138
|
]))), 128))
|
|
140
139
|
], 512)
|
|
141
|
-
],
|
|
140
|
+
], 34));
|
|
142
141
|
}
|
|
143
142
|
});
|
|
144
143
|
export {
|
|
145
|
-
|
|
144
|
+
ue as default
|
|
146
145
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { defineComponent as F, ref as m, computed as O, watch as
|
|
1
|
+
import { defineComponent as F, ref as m, computed as O, watch as L, nextTick as q, openBlock as u, createElementBlock as y, normalizeClass as C, unref as _, createElementVNode as G, Fragment as R, renderList as V, withKeys as Y, withModifiers as I, createVNode as H } from "vue";
|
|
2
2
|
import f from "dayjs";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import { hasClass as M } from "@vft/utils";
|
|
5
5
|
import { castArray as p } from "../../../utils/helper.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as J } 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 { useLocale as U } from "../../../locale/use-locale.js";
|
|
13
12
|
import "../../time-picker/index.js";
|
|
14
|
-
import { basicYearTableProps as
|
|
15
|
-
import { getValidDateOfYear as
|
|
16
|
-
import
|
|
17
|
-
import { rangeArr as
|
|
18
|
-
const
|
|
13
|
+
import { basicYearTableProps as Q } from "../props/basic-year-table.js";
|
|
14
|
+
import { getValidDateOfYear as U } from "../utils.js";
|
|
15
|
+
import W from "./basic-cell-render.js";
|
|
16
|
+
import { rangeArr as X } from "../../time-picker/utils.js";
|
|
17
|
+
const Z = ["aria-selected", "aria-label", "tabindex", "onKeydown"], be = /* @__PURE__ */ F({
|
|
19
18
|
__name: "basic-year-table",
|
|
20
|
-
props:
|
|
19
|
+
props: Q,
|
|
21
20
|
emits: ["changerange", "pick", "select"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
21
|
+
setup(E, { expose: T, emit: A }) {
|
|
22
|
+
const e = E, c = A, N = (s, t) => {
|
|
24
23
|
const a = f(String(s)).locale(t).startOf("year"), r = a.endOf("year").dayOfYear();
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
const s =
|
|
24
|
+
return X(r).map((n) => a.add(n, "day").toDate());
|
|
25
|
+
}, B = J("year-table"), D = m("zh-cn"), w = m(), b = m(), g = O(() => Math.floor(e.date.year() / 10) * 10), K = m([[], [], []]), k = m(), S = m(), h = O(() => {
|
|
26
|
+
const s = K.value, t = f().locale(D.value).startOf("year");
|
|
28
27
|
for (let a = 0; a < 3; a++) {
|
|
29
28
|
const o = s[a];
|
|
30
29
|
for (let r = 0; r < 4 && !(a * 4 + r >= 10); r++) {
|
|
@@ -39,18 +38,18 @@ const te = ["aria-label"], ae = ["aria-selected", "aria-label", "tabindex", "onK
|
|
|
39
38
|
text: -1,
|
|
40
39
|
disabled: !1
|
|
41
40
|
}), n.type = "normal";
|
|
42
|
-
const d = a * 4 + r + g.value,
|
|
43
|
-
n.inRange = !!(e.minDate &&
|
|
44
|
-
const $ =
|
|
41
|
+
const d = a * 4 + r + g.value, i = f().year(d), l = e.rangeState.endDate || e.maxDate || e.rangeState.selecting && e.minDate || null;
|
|
42
|
+
n.inRange = !!(e.minDate && i.isSameOrAfter(e.minDate, "year") && l && i.isSameOrBefore(l, "year")) || !!(e.minDate && i.isSameOrBefore(e.minDate, "year") && l && i.isSameOrAfter(l, "year")), e.minDate?.isSameOrAfter(l) ? (n.start = !!(l && i.isSame(l, "year")), n.end = !!(e.minDate && i.isSame(e.minDate, "year"))) : (n.start = !!(e.minDate && i.isSame(e.minDate, "year")), n.end = !!(l && i.isSame(l, "year"))), t.isSame(i) && (n.type = "today"), n.text = d;
|
|
43
|
+
const $ = i.toDate();
|
|
45
44
|
n.disabled = e.disabledDate && e.disabledDate($) || !1, o[r] = n;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
return s;
|
|
49
|
-
}),
|
|
48
|
+
}), j = () => {
|
|
50
49
|
b.value?.focus();
|
|
51
|
-
},
|
|
50
|
+
}, z = (s) => {
|
|
52
51
|
const t = {}, a = f().locale(D.value), o = s.text;
|
|
53
|
-
return t.disabled = e.disabledDate ?
|
|
52
|
+
return t.disabled = e.disabledDate ? N(o, D.value).every(e.disabledDate) : !1, t.today = a.year() === o, t.current = p(e.parsedValue).findIndex((r) => r.year() === o) >= 0, s.inRange && (t["in-range"] = !0, s.start && (t["start-date"] = !0), s.end && (t["end-date"] = !0)), t;
|
|
54
53
|
}, v = (s) => {
|
|
55
54
|
const t = s.text;
|
|
56
55
|
return p(e.date).findIndex((a) => a.year() === t) >= 0;
|
|
@@ -67,53 +66,53 @@ const te = ["aria-label"], ae = ["aria-selected", "aria-label", "tabindex", "onK
|
|
|
67
66
|
c("pick", p(e.parsedValue), !1);
|
|
68
67
|
return;
|
|
69
68
|
}
|
|
70
|
-
const d =
|
|
69
|
+
const d = U(
|
|
71
70
|
n.startOf("year"),
|
|
72
71
|
D.value,
|
|
73
72
|
e.disabledDate
|
|
74
|
-
),
|
|
75
|
-
c("pick",
|
|
73
|
+
), i = M(t, "current") ? p(e.parsedValue).filter((l) => l?.year() !== r) : p(e.parsedValue).concat([d]);
|
|
74
|
+
c("pick", i);
|
|
76
75
|
} else
|
|
77
76
|
c("pick", r);
|
|
78
|
-
},
|
|
77
|
+
}, P = (s) => {
|
|
79
78
|
if (!e.rangeState.selecting) return;
|
|
80
79
|
const t = s.target?.closest(
|
|
81
80
|
"td"
|
|
82
81
|
);
|
|
83
82
|
if (!t) return;
|
|
84
83
|
const a = t.parentNode.rowIndex, o = t.cellIndex;
|
|
85
|
-
|
|
84
|
+
h.value[a][o].disabled || (a !== k.value || o !== S.value) && (k.value = a, S.value = o, c("changerange", {
|
|
86
85
|
selecting: !0,
|
|
87
86
|
endDate: f().year(g.value).add(a * 4 + o, "year")
|
|
88
87
|
}));
|
|
89
88
|
};
|
|
90
|
-
return
|
|
89
|
+
return L(
|
|
91
90
|
() => e.date,
|
|
92
91
|
async () => {
|
|
93
|
-
w.value?.contains(document.activeElement) && (await
|
|
92
|
+
w.value?.contains(document.activeElement) && (await q(), b.value?.focus());
|
|
94
93
|
}
|
|
95
|
-
),
|
|
94
|
+
), T({
|
|
96
95
|
/**
|
|
97
96
|
* @description focus on the current cell
|
|
98
97
|
*/
|
|
99
|
-
focus:
|
|
100
|
-
}), (s, t) => (
|
|
98
|
+
focus: j
|
|
99
|
+
}), (s, t) => (u(), y("table", {
|
|
101
100
|
role: "grid",
|
|
102
|
-
"aria-label":
|
|
103
|
-
class: C(
|
|
101
|
+
"aria-label": "使用方向键与 Enter 键以选择年份",
|
|
102
|
+
class: C(_(B).b()),
|
|
104
103
|
onClick: x,
|
|
105
|
-
onMousemove:
|
|
104
|
+
onMousemove: P
|
|
106
105
|
}, [
|
|
107
|
-
|
|
106
|
+
G("tbody", {
|
|
108
107
|
ref_key: "tbodyRef",
|
|
109
108
|
ref: w
|
|
110
109
|
}, [
|
|
111
|
-
(
|
|
112
|
-
(
|
|
110
|
+
(u(!0), y(R, null, V(h.value, (a, o) => (u(), y("tr", { key: o }, [
|
|
111
|
+
(u(!0), y(R, null, V(a, (r, n) => (u(), y("td", {
|
|
113
112
|
key: `${o}_${n}`,
|
|
114
113
|
ref_for: !0,
|
|
115
114
|
ref: (d) => v(r) && (b.value = d),
|
|
116
|
-
class: C(["available",
|
|
115
|
+
class: C(["available", z(r)]),
|
|
117
116
|
"aria-selected": v(r),
|
|
118
117
|
"aria-label": String(r.text),
|
|
119
118
|
tabindex: v(r) ? 0 : -1,
|
|
@@ -122,13 +121,13 @@ const te = ["aria-label"], ae = ["aria-selected", "aria-label", "tabindex", "onK
|
|
|
122
121
|
Y(I(x, ["prevent", "stop"]), ["enter"])
|
|
123
122
|
]
|
|
124
123
|
}, [
|
|
125
|
-
|
|
126
|
-
], 42,
|
|
124
|
+
H(_(W), { cell: r }, null, 8, ["cell"])
|
|
125
|
+
], 42, Z))), 128))
|
|
127
126
|
]))), 128))
|
|
128
127
|
], 512)
|
|
129
|
-
],
|
|
128
|
+
], 34));
|
|
130
129
|
}
|
|
131
130
|
});
|
|
132
131
|
export {
|
|
133
|
-
|
|
132
|
+
be as default
|
|
134
133
|
};
|