vft 0.0.71 → 0.0.72
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 +56 -40
- package/es/components/aside/style/css.js +2 -0
- package/es/components/aside/style/index.js +2 -0
- package/es/components/back-top/back-top.vue2.js +8 -2
- package/es/components/col/col.vue.js +4 -0
- package/es/components/col/col.vue2.js +60 -0
- package/es/components/col/index.js +12 -0
- package/es/components/col/style/css.js +2 -0
- package/es/components/col/style/index.js +2 -0
- package/es/components/col/types.js +1 -0
- package/es/components/color-picker/utils/color.js +41 -51
- package/es/components/container/aside.vue.js +4 -0
- package/es/components/container/aside.vue2.js +37 -0
- package/es/components/container/container.vue.js +4 -0
- package/es/components/container/container.vue2.js +33 -0
- package/es/components/container/footer.vue.js +4 -0
- package/es/components/container/footer.vue2.js +39 -0
- package/es/components/container/header.vue.js +4 -0
- package/es/components/container/header.vue2.js +39 -0
- package/es/components/container/index.js +25 -0
- package/es/components/container/main.vue.js +4 -0
- package/es/components/container/main.vue2.js +26 -0
- package/es/components/container/style/css.js +6 -0
- package/es/components/container/style/index.js +6 -0
- package/es/components/context-menu/context-menu.vue2.js +20 -14
- package/es/components/date-picker/composables/use-month-range-header.js +29 -0
- package/es/components/date-picker/composables/use-range-picker.js +68 -0
- package/es/components/date-picker/composables/use-shortcut.js +24 -0
- package/es/components/date-picker/constants.js +4 -0
- package/es/components/date-picker/date-picker-com/basic-cell-render.js +37 -0
- package/es/components/date-picker/date-picker-com/basic-date-table.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +206 -0
- package/es/components/date-picker/date-picker-com/basic-month-table.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +131 -0
- package/es/components/date-picker/date-picker-com/basic-year-table.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +85 -0
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +455 -0
- package/es/components/date-picker/date-picker-com/panel-date-range.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +383 -0
- package/es/components/date-picker/date-picker-com/panel-month-range.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +170 -0
- package/es/components/date-picker/date-picker.js +81 -0
- package/es/components/date-picker/date-picker.type.js +1 -0
- package/es/components/date-picker/index.js +14 -0
- package/es/components/date-picker/panel-utils.js +17 -0
- package/es/components/date-picker/props/basic-cell.js +14 -0
- package/es/components/date-picker/props/basic-date-table.js +18 -0
- package/es/components/date-picker/props/basic-month-table.js +14 -0
- package/es/components/date-picker/props/basic-year-table.js +15 -0
- package/es/components/date-picker/props/date-picker.js +18 -0
- package/es/components/date-picker/props/panel-date-pick.js +23 -0
- package/es/components/date-picker/props/panel-date-range.js +14 -0
- package/es/components/date-picker/props/panel-month-range.js +14 -0
- package/es/components/date-picker/props/shared.js +56 -0
- package/es/components/date-picker/style/css.js +2 -0
- package/es/components/date-picker/style/index.js +7 -0
- package/es/components/date-picker/utils.js +49 -0
- package/es/components/date-time-select/date-time-select.vue2.js +70 -62
- package/es/components/date-time-select/style/index.js +6 -0
- package/es/components/footer/style/css.js +2 -0
- package/es/components/footer/style/index.js +2 -0
- package/es/components/footer-layout/footer-layout.vue2.js +105 -35
- package/es/components/header/style/css.js +2 -0
- package/es/components/header/style/index.js +2 -0
- package/es/components/header-layout/header-layout.vue2.js +122 -37
- package/es/components/horizontal-menu/horizontal-menu.vue.js +4 -0
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +115 -0
- package/es/components/horizontal-menu/index.js +12 -0
- package/es/components/horizontal-menu/style/css.js +6 -0
- package/es/components/horizontal-menu/style/index.js +6 -0
- package/es/components/index.js +254 -209
- package/es/components/input/input.vue2.js +184 -178
- package/es/components/link/link.vue2.js +24 -24
- package/es/components/logo/logo.vue2.js +21 -21
- package/es/components/main/style/css.js +2 -0
- package/es/components/main/style/index.js +2 -0
- package/es/components/md-container/md-container.vue2.js +65 -59
- package/es/components/md-container/toc.js +1 -1
- package/es/components/menu/menu-item.vue2.js +89 -62
- package/es/components/menu/menu.vue2.js +100 -106
- package/es/components/menu/sub-menu.vue2.js +83 -76
- package/es/components/menu/utils/menu-item.js +15 -19
- package/es/components/menu/utils/submenu.js +20 -25
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +45 -39
- package/es/components/result/result.vue2.js +8 -2
- package/es/components/row/constants.js +4 -0
- package/es/components/row/index.js +14 -0
- package/es/components/row/row.vue.js +4 -0
- package/es/components/row/row.vue2.js +49 -0
- package/es/components/row/style/css.js +2 -0
- package/es/components/row/style/index.js +2 -0
- package/es/components/row/types.js +1 -0
- package/es/components/search/search.vue2.js +126 -114
- package/es/components/side-menu/side-menu.vue2.js +212 -146
- package/es/components/side-menu/use-drag-line.js +29 -28
- package/es/components/tabs/tab-nav.vue2.js +48 -42
- package/es/components/time-picker/common/picker.vue.js +4 -0
- package/es/components/time-picker/common/picker.vue2.js +438 -0
- package/es/components/time-picker/common/props.js +201 -0
- package/es/components/time-picker/composables/use-time-panel.js +60 -0
- package/es/components/time-picker/composables/use-time-picker.js +40 -0
- package/es/components/time-picker/constants.js +17 -0
- package/es/components/time-picker/index.js +31 -0
- package/es/components/time-picker/props/basic-time-spinner.js +31 -0
- package/es/components/time-picker/props/panel-time-picker.js +17 -0
- package/es/components/time-picker/props/panel-time-range.js +16 -0
- package/es/components/time-picker/props/shared.js +40 -0
- package/es/components/time-picker/style/css.js +2 -0
- package/es/components/time-picker/style/index.js +2 -0
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue.js +4 -0
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +227 -0
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue.js +4 -0
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +107 -0
- package/es/components/time-picker/time-picker-com/panel-time-range.vue.js +4 -0
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +190 -0
- package/es/components/time-picker/time-picker.js +70 -0
- package/es/components/time-picker/types.js +1 -0
- package/es/components/time-picker/utils.js +35 -0
- package/es/components/time-select/style/css.js +2 -0
- package/es/components/time-select/style/index.js +2 -0
- package/es/components/time-select/time-select.js +54 -0
- package/es/components/time-select/time-select.vue.js +4 -0
- package/es/components/time-select/time-select.vue2.js +104 -0
- package/es/components/time-select/utils.js +40 -0
- package/es/components/tooltip/index.js +5 -3
- package/es/index.js +381 -336
- package/es/package.json.js +1 -1
- package/global.d.ts +73 -2
- package/lib/component.cjs +1 -1
- package/lib/components/aside/style/css.cjs +1 -0
- package/lib/components/aside/style/index.cjs +1 -0
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/col/col.vue.cjs +1 -0
- package/lib/components/col/col.vue2.cjs +1 -0
- package/lib/components/col/index.cjs +1 -0
- package/lib/components/col/style/css.cjs +1 -0
- package/lib/components/col/style/index.cjs +1 -0
- package/lib/components/col/types.cjs +1 -0
- package/lib/components/color-picker/utils/color.cjs +1 -1
- package/lib/components/container/aside.vue.cjs +1 -0
- package/lib/components/container/aside.vue2.cjs +1 -0
- package/lib/components/container/container.vue.cjs +1 -0
- package/lib/components/container/container.vue2.cjs +1 -0
- package/lib/components/container/footer.vue.cjs +1 -0
- package/lib/components/container/footer.vue2.cjs +1 -0
- package/lib/components/container/header.vue.cjs +1 -0
- package/lib/components/container/header.vue2.cjs +1 -0
- package/lib/components/container/index.cjs +1 -0
- package/lib/components/container/main.vue.cjs +1 -0
- package/lib/components/container/main.vue2.cjs +1 -0
- package/lib/components/container/style/css.cjs +1 -0
- package/lib/components/container/style/index.cjs +1 -0
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -0
- package/lib/components/date-picker/composables/use-range-picker.cjs +1 -0
- package/lib/components/date-picker/composables/use-shortcut.cjs +1 -0
- package/lib/components/date-picker/constants.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-cell-render.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker.cjs +1 -0
- package/lib/components/date-picker/date-picker.type.cjs +1 -0
- package/lib/components/date-picker/index.cjs +1 -0
- package/lib/components/date-picker/panel-utils.cjs +1 -0
- package/lib/components/date-picker/props/basic-cell.cjs +1 -0
- package/lib/components/date-picker/props/basic-date-table.cjs +1 -0
- package/lib/components/date-picker/props/basic-month-table.cjs +1 -0
- package/lib/components/date-picker/props/basic-year-table.cjs +1 -0
- package/lib/components/date-picker/props/date-picker.cjs +1 -0
- package/lib/components/date-picker/props/panel-date-pick.cjs +1 -0
- package/lib/components/date-picker/props/panel-date-range.cjs +1 -0
- package/lib/components/date-picker/props/panel-month-range.cjs +1 -0
- package/lib/components/date-picker/props/shared.cjs +1 -0
- package/lib/components/date-picker/style/css.cjs +1 -0
- package/lib/components/date-picker/style/index.cjs +1 -0
- package/lib/components/date-picker/utils.cjs +1 -0
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/date-time-select/style/index.cjs +1 -1
- package/lib/components/footer/style/css.cjs +1 -0
- package/lib/components/footer/style/index.cjs +1 -0
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header/style/css.cjs +1 -0
- package/lib/components/header/style/index.cjs +1 -0
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.cjs +1 -0
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -0
- package/lib/components/horizontal-menu/index.cjs +1 -0
- package/lib/components/horizontal-menu/style/css.cjs +1 -0
- package/lib/components/horizontal-menu/style/index.cjs +1 -0
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/main/style/css.cjs +1 -0
- package/lib/components/main/style/index.cjs +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/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/menu/utils/menu-item.cjs +1 -1
- package/lib/components/menu/utils/submenu.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/row/constants.cjs +1 -0
- package/lib/components/row/index.cjs +1 -0
- package/lib/components/row/row.vue.cjs +1 -0
- package/lib/components/row/row.vue2.cjs +1 -0
- package/lib/components/row/style/css.cjs +1 -0
- package/lib/components/row/style/index.cjs +1 -0
- package/lib/components/row/types.cjs +1 -0
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.cjs +1 -0
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -0
- package/lib/components/time-picker/common/props.cjs +1 -0
- package/lib/components/time-picker/composables/use-time-panel.cjs +1 -0
- package/lib/components/time-picker/composables/use-time-picker.cjs +1 -0
- package/lib/components/time-picker/constants.cjs +1 -0
- package/lib/components/time-picker/index.cjs +1 -0
- package/lib/components/time-picker/props/basic-time-spinner.cjs +1 -0
- package/lib/components/time-picker/props/panel-time-picker.cjs +1 -0
- package/lib/components/time-picker/props/panel-time-range.cjs +1 -0
- package/lib/components/time-picker/props/shared.cjs +1 -0
- package/lib/components/time-picker/style/css.cjs +1 -0
- package/lib/components/time-picker/style/index.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue.cjs +1 -0
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -0
- package/lib/components/time-picker/time-picker.cjs +1 -0
- package/lib/components/time-picker/types.cjs +1 -0
- package/lib/components/time-picker/utils.cjs +1 -0
- package/lib/components/time-select/style/css.cjs +1 -0
- package/lib/components/time-select/style/index.cjs +1 -0
- package/lib/components/time-select/time-select.cjs +1 -0
- package/lib/components/time-select/time-select.vue.cjs +1 -0
- package/lib/components/time-select/time-select.vue2.cjs +1 -0
- package/lib/components/time-select/utils.cjs +1 -0
- package/lib/components/tooltip/index.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +7 -7
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/display.css +1 -0
- package/theme-style/index.css +1 -1
- package/theme-style/src/affix.scss +7 -0
- package/theme-style/src/aside.scss +8 -0
- package/theme-style/src/autocomplete.scss +83 -0
- package/theme-style/src/back-top.scss +7 -6
- package/theme-style/src/badge.scss +57 -0
- package/theme-style/src/breadcrumb-item.scss +0 -0
- package/theme-style/src/breadcrumb.scss +61 -0
- package/theme-style/src/calendar.scss +80 -0
- package/theme-style/src/card.scss +38 -0
- package/theme-style/src/carousel-item.scss +50 -0
- package/theme-style/src/carousel.scss +174 -0
- package/theme-style/src/cascader-panel.scss +138 -0
- package/theme-style/src/cascader.scss +216 -0
- package/theme-style/src/check-tag.scss +29 -0
- package/theme-style/src/col.scss +52 -0
- package/theme-style/src/collapse-item.scss +0 -0
- package/theme-style/src/collapse.scss +67 -0
- package/theme-style/src/color-picker.scss +2 -2
- package/theme-style/src/common/popup.scss +47 -0
- package/theme-style/src/common/var.scss +381 -6
- package/theme-style/src/container.scss +14 -0
- package/theme-style/src/date-picker/date-picker.scss +110 -0
- package/theme-style/src/date-picker/date-range-picker.scss +113 -0
- package/theme-style/src/date-picker/date-table.scss +162 -0
- package/theme-style/src/date-picker/month-table.scss +90 -0
- package/theme-style/src/date-picker/picker-panel.scss +131 -0
- package/theme-style/src/date-picker/picker.scss +210 -0
- package/theme-style/src/date-picker/time-picker.scss +90 -0
- package/theme-style/src/date-picker/time-range-picker.scss +33 -0
- package/theme-style/src/date-picker/time-spinner.scss +111 -0
- package/theme-style/src/date-picker/year-table.scss +60 -0
- package/theme-style/src/date-picker.scss +9 -0
- package/theme-style/src/date-time-select.scss +1 -1
- package/theme-style/src/display.scss +12 -0
- package/theme-style/src/drawer.scss +160 -0
- package/theme-style/src/footer-layout.scss +4 -9
- package/theme-style/src/footer.scss +11 -0
- package/theme-style/src/header-layout.scss +26 -15
- package/theme-style/src/header.scss +11 -0
- package/theme-style/src/horizontal-menu.scss +90 -0
- package/theme-style/src/icon.scss +6 -6
- package/theme-style/src/index.scss +123 -76
- package/theme-style/src/infinite-scroll.scss +0 -0
- package/theme-style/src/input-number.scss +175 -0
- package/theme-style/src/input.scss +2 -4
- package/theme-style/src/list-cell.scss +3 -3
- package/theme-style/src/loading.scss +1 -1
- package/theme-style/src/main.scss +10 -0
- package/theme-style/src/md/code.scss +3 -3
- package/theme-style/src/md/demo-block.scss +2 -2
- package/theme-style/src/md/pswp.scss +4 -4
- package/theme-style/src/md/scroll-bar.scss +1 -1
- package/theme-style/src/md/table.scss +3 -3
- package/theme-style/src/md/toc.scss +3 -3
- package/theme-style/src/md-container.scss +6 -8
- package/theme-style/src/menu.scss +43 -17
- package/theme-style/src/message-box.scss +258 -0
- package/theme-style/src/mixins/_col.scss +38 -0
- package/theme-style/src/mixins/mixins.scss +25 -0
- package/theme-style/src/notification.scss +105 -0
- package/theme-style/src/option.scss +36 -0
- package/theme-style/src/pagination.scss +0 -2
- package/theme-style/src/progress.scss +169 -0
- package/theme-style/src/rate.scss +101 -0
- package/theme-style/src/reset.scss +92 -0
- package/theme-style/src/row.scss +31 -0
- package/theme-style/src/search.scss +6 -5
- package/theme-style/src/select-dropdown.scss +2 -2
- package/theme-style/src/side-menu.scss +9 -3
- package/theme-style/src/slider.scss +211 -0
- package/theme-style/src/space.scss +20 -0
- package/theme-style/src/spinner.scss +43 -0
- package/theme-style/src/statistic.scss +35 -0
- package/theme-style/src/step.scss +316 -0
- package/theme-style/src/steps.scss +21 -0
- package/theme-style/src/tabs.scss +2 -2
- package/theme-style/src/time-picker.scss +5 -0
- package/theme-style/src/time-select.scss +37 -0
- package/theme-style/src/timeline-item.scss +85 -0
- package/theme-style/src/timeline.scss +46 -0
- package/theme-style/src/transfer.scss +206 -0
- package/theme-style/src/tree-select.scss +36 -0
- package/theme-style/src/tree.scss +131 -0
- package/theme-style/src/upload.scss +621 -0
- package/theme-style/vft-affix.css +1 -0
- package/theme-style/vft-aside.css +1 -0
- package/theme-style/vft-autocomplete.css +1 -0
- package/theme-style/vft-back-top.css +1 -1
- package/theme-style/vft-badge.css +1 -0
- package/theme-style/vft-breadcrumb-item.css +0 -0
- package/theme-style/vft-breadcrumb.css +1 -0
- package/theme-style/vft-calendar.css +1 -0
- package/theme-style/vft-card.css +1 -0
- package/theme-style/vft-carousel-item.css +1 -0
- package/theme-style/vft-carousel.css +1 -0
- package/theme-style/vft-cascader-panel.css +1 -0
- package/theme-style/vft-cascader.css +1 -0
- package/theme-style/vft-check-tag.css +1 -0
- package/theme-style/vft-col.css +1 -0
- package/theme-style/vft-collapse-item.css +0 -0
- package/theme-style/vft-collapse.css +1 -0
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-container.css +1 -0
- package/theme-style/vft-date-picker.css +1 -0
- package/theme-style/vft-drawer.css +1 -0
- package/theme-style/vft-footer-layout.css +1 -1
- package/theme-style/vft-footer.css +1 -0
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-header.css +1 -0
- package/theme-style/vft-horizontal-menu.css +1 -0
- package/theme-style/vft-infinite-scroll.css +0 -0
- package/theme-style/vft-input-number.css +1 -0
- package/theme-style/vft-main.css +1 -0
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-message-box.css +1 -0
- package/theme-style/vft-notification.css +1 -0
- package/theme-style/vft-option.css +1 -0
- package/theme-style/vft-pagination.css +1 -1
- package/theme-style/vft-progress.css +1 -0
- package/theme-style/vft-rate.css +1 -0
- package/theme-style/vft-reset.css +1 -0
- package/theme-style/vft-row.css +1 -0
- package/theme-style/vft-search.css +1 -1
- package/theme-style/vft-select-dropdown.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-slider.css +1 -0
- package/theme-style/vft-space.css +1 -0
- package/theme-style/vft-spinner.css +1 -0
- package/theme-style/vft-statistic.css +1 -0
- package/theme-style/vft-step.css +1 -0
- package/theme-style/vft-steps.css +1 -0
- package/theme-style/vft-time-picker.css +1 -0
- package/theme-style/vft-time-select.css +1 -0
- package/theme-style/vft-timeline-item.css +1 -0
- package/theme-style/vft-timeline.css +1 -0
- package/theme-style/vft-transfer.css +1 -0
- package/theme-style/vft-tree-select.css +1 -0
- package/theme-style/vft-tree.css +1 -0
- package/theme-style/vft-upload.css +1 -0
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
- package/theme-style/src/md/list.scss +0 -21
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent as P, ref as f, computed as Y, watch as $, nextTick as q, openBlock as u, createElementBlock as p, normalizeClass as N, unref as O, createElementVNode as g, Fragment as C, renderList as M, withKeys as I, withModifiers as R, toDisplayString as G } from "vue";
|
|
2
|
+
import b from "dayjs";
|
|
3
|
+
import { useNamespace as H } 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 { hasClass as J } from "@vft/utils";
|
|
9
|
+
import "../../../utils/ns-cover.js";
|
|
10
|
+
import "../../time-picker/index.js";
|
|
11
|
+
import { castArray as T } from "../utils.js";
|
|
12
|
+
import { basicMonthTableProps as Q } from "../props/basic-month-table.js";
|
|
13
|
+
import { rangeArr as U } from "../../time-picker/utils.js";
|
|
14
|
+
const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, ue = /* @__PURE__ */ P({
|
|
15
|
+
__name: "basic-month-table",
|
|
16
|
+
props: Q,
|
|
17
|
+
emits: ["changerange", "pick", "select"],
|
|
18
|
+
setup(A, { expose: E, emit: d }) {
|
|
19
|
+
const e = A, B = (a, t, o) => {
|
|
20
|
+
const r = b().locale(o).startOf("month").month(t).year(a), n = r.daysInMonth();
|
|
21
|
+
return U(n).map((s) => r.add(s, "day").toDate());
|
|
22
|
+
}, K = H("month-table"), x = f("zh-cn"), v = f(), h = f(), V = f(
|
|
23
|
+
e.date.locale("en").localeData().monthsShort().map((a) => a.toLowerCase())
|
|
24
|
+
), z = f([
|
|
25
|
+
[],
|
|
26
|
+
[],
|
|
27
|
+
[]
|
|
28
|
+
]), w = f(), S = f(), k = Y(() => {
|
|
29
|
+
var o, r;
|
|
30
|
+
const a = z.value, t = b().locale(x.value).startOf("month");
|
|
31
|
+
for (let n = 0; n < 3; n++) {
|
|
32
|
+
const s = a[n];
|
|
33
|
+
for (let i = 0; i < 4; i++) {
|
|
34
|
+
const c = s[i] || (s[i] = {
|
|
35
|
+
row: n,
|
|
36
|
+
column: i,
|
|
37
|
+
type: "normal",
|
|
38
|
+
inRange: !1,
|
|
39
|
+
start: !1,
|
|
40
|
+
end: !1,
|
|
41
|
+
text: -1,
|
|
42
|
+
disabled: !1
|
|
43
|
+
});
|
|
44
|
+
c.type = "normal";
|
|
45
|
+
const _ = n * 4 + i, l = e.date.startOf("year").month(_), m = e.rangeState.endDate || e.maxDate || e.rangeState.selecting && e.minDate || null;
|
|
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 = _, c.disabled = ((r = e.disabledDate) == null ? void 0 : r.call(e, l.toDate())) || !1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return a;
|
|
50
|
+
}), F = () => {
|
|
51
|
+
var a;
|
|
52
|
+
(a = h.value) == null || a.focus();
|
|
53
|
+
}, L = (a) => {
|
|
54
|
+
const t = {}, o = e.date.year(), r = /* @__PURE__ */ new Date(), n = a.text;
|
|
55
|
+
return t.disabled = e.disabledDate ? B(o, n, x.value).every(e.disabledDate) : !1, t.current = T(e.parsedValue).findIndex(
|
|
56
|
+
(s) => b.isDayjs(s) && s.year() === o && s.month() === n
|
|
57
|
+
) >= 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
|
+
}, D = (a) => {
|
|
59
|
+
const t = e.date.year(), o = a.text;
|
|
60
|
+
return T(e.date).findIndex(
|
|
61
|
+
(r) => r.year() === t && r.month() === o
|
|
62
|
+
) >= 0;
|
|
63
|
+
}, j = (a) => {
|
|
64
|
+
var n;
|
|
65
|
+
if (!e.rangeState.selecting)
|
|
66
|
+
return;
|
|
67
|
+
let t = a.target;
|
|
68
|
+
if (t.tagName === "A" && (t = (n = t.parentNode) == null ? void 0 : n.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD")
|
|
69
|
+
return;
|
|
70
|
+
const o = t.parentNode.rowIndex, r = t.cellIndex;
|
|
71
|
+
k.value[o][r].disabled || (o !== w.value || r !== S.value) && (w.value = o, S.value = r, d("changerange", {
|
|
72
|
+
selecting: !0,
|
|
73
|
+
endDate: e.date.startOf("year").month(o * 4 + r)
|
|
74
|
+
}));
|
|
75
|
+
}, y = (a) => {
|
|
76
|
+
var i;
|
|
77
|
+
const t = (i = a.target) == null ? void 0 : i.closest(
|
|
78
|
+
"td"
|
|
79
|
+
);
|
|
80
|
+
if ((t == null ? void 0 : t.tagName) !== "TD" || J(t, "disabled"))
|
|
81
|
+
return;
|
|
82
|
+
const o = t.cellIndex, n = t.parentNode.rowIndex * 4 + o, s = e.date.startOf("year").month(n);
|
|
83
|
+
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
|
+
};
|
|
85
|
+
return $(
|
|
86
|
+
() => e.date,
|
|
87
|
+
async () => {
|
|
88
|
+
var a, t;
|
|
89
|
+
(a = v.value) != null && a.contains(document.activeElement) && (await q(), (t = h.value) == null || t.focus());
|
|
90
|
+
}
|
|
91
|
+
), E({
|
|
92
|
+
/**
|
|
93
|
+
* @description focus current cell
|
|
94
|
+
*/
|
|
95
|
+
focus: F
|
|
96
|
+
}), (a, t) => (u(), p("table", {
|
|
97
|
+
role: "grid",
|
|
98
|
+
"aria-label": "使用方向鍵與 Enter 鍵以選擇月份",
|
|
99
|
+
class: N(O(K).b()),
|
|
100
|
+
onClick: y,
|
|
101
|
+
onMousemove: j
|
|
102
|
+
}, [
|
|
103
|
+
g("tbody", {
|
|
104
|
+
ref_key: "tbodyRef",
|
|
105
|
+
ref: v
|
|
106
|
+
}, [
|
|
107
|
+
(u(!0), p(C, null, M(O(k), (o, r) => (u(), p("tr", { key: r }, [
|
|
108
|
+
(u(!0), p(C, null, M(o, (n, s) => (u(), p("td", {
|
|
109
|
+
key: s,
|
|
110
|
+
ref_for: !0,
|
|
111
|
+
ref: (i) => D(n) && (h.value = i),
|
|
112
|
+
class: N(L(n)),
|
|
113
|
+
"aria-selected": `${D(n)}`,
|
|
114
|
+
tabindex: D(n) ? 0 : -1,
|
|
115
|
+
onKeydown: [
|
|
116
|
+
I(R(y, ["prevent", "stop"]), ["space"]),
|
|
117
|
+
I(R(y, ["prevent", "stop"]), ["enter"])
|
|
118
|
+
]
|
|
119
|
+
}, [
|
|
120
|
+
g("div", null, [
|
|
121
|
+
g("span", X, G("月份" + V.value[n.text]), 1)
|
|
122
|
+
])
|
|
123
|
+
], 42, W))), 128))
|
|
124
|
+
]))), 128))
|
|
125
|
+
], 512)
|
|
126
|
+
], 34));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
ue as default
|
|
131
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent as R, ref as p, computed as S, watch as z, nextTick as A, openBlock as l, createElementBlock as c, normalizeClass as v, unref as d, createElementVNode as u, Fragment as y, renderList as g, withKeys as h, withModifiers as x, toDisplayString as B } from "vue";
|
|
2
|
+
import { castArray as C } from "../utils.js";
|
|
3
|
+
import D from "dayjs";
|
|
4
|
+
import { useNamespace as M } from "../../../hooks/use-namespace/index.js";
|
|
5
|
+
import "@popperjs/core";
|
|
6
|
+
import "lodash";
|
|
7
|
+
import "../../../hooks/use-z-index/index.js";
|
|
8
|
+
import "@vueuse/core";
|
|
9
|
+
import { hasClass as V } from "@vft/utils";
|
|
10
|
+
import "../../../utils/ns-cover.js";
|
|
11
|
+
import "../../time-picker/index.js";
|
|
12
|
+
import { basicYearTableProps as F } from "../props/basic-year-table.js";
|
|
13
|
+
import { rangeArr as L } from "../../time-picker/utils.js";
|
|
14
|
+
const P = ["aria-selected", "tabindex", "onKeydown"], $ = { class: "cell" }, q = { key: 1 }, oe = /* @__PURE__ */ R({
|
|
15
|
+
__name: "basic-year-table",
|
|
16
|
+
props: F,
|
|
17
|
+
emits: ["pick"],
|
|
18
|
+
setup(w, { expose: T, emit: Y }) {
|
|
19
|
+
const n = w, E = (e, t) => {
|
|
20
|
+
const r = D(String(e)).locale(t).startOf("year"), k = r.endOf("year").dayOfYear();
|
|
21
|
+
return L(k).map((o) => r.add(o, "day").toDate());
|
|
22
|
+
}, K = M("year-table"), b = p("zh-cn"), _ = p(), i = p(), s = S(() => Math.floor(n.date.year() / 10) * 10), O = () => {
|
|
23
|
+
var e;
|
|
24
|
+
(e = i.value) == null || e.focus();
|
|
25
|
+
}, I = (e) => {
|
|
26
|
+
console.log(e, "---");
|
|
27
|
+
const t = {}, r = D().locale(b.value);
|
|
28
|
+
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
|
+
}, 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) => {
|
|
30
|
+
const r = e.target.closest("td");
|
|
31
|
+
if (r && r.textContent) {
|
|
32
|
+
if (V(r, "disabled"))
|
|
33
|
+
return;
|
|
34
|
+
const a = r.textContent || r.innerText;
|
|
35
|
+
Y("pick", Number(a));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return z(
|
|
39
|
+
() => n.date,
|
|
40
|
+
async () => {
|
|
41
|
+
var e, t;
|
|
42
|
+
(e = _.value) != null && e.contains(document.activeElement) && (await A(), (t = i.value) == null || t.focus());
|
|
43
|
+
}
|
|
44
|
+
), T({
|
|
45
|
+
/**
|
|
46
|
+
* @description focus on the current cell
|
|
47
|
+
*/
|
|
48
|
+
focus: O
|
|
49
|
+
}), (e, t) => (l(), c("table", {
|
|
50
|
+
role: "grid",
|
|
51
|
+
"aria-label": "使用方向鍵與 Enter 鍵以選擇年份",
|
|
52
|
+
class: v(d(K).b()),
|
|
53
|
+
onClick: m
|
|
54
|
+
}, [
|
|
55
|
+
u("tbody", {
|
|
56
|
+
ref_key: "tbodyRef",
|
|
57
|
+
ref: _
|
|
58
|
+
}, [
|
|
59
|
+
(l(), c(y, null, g(3, (r, a) => u("tr", { key: a }, [
|
|
60
|
+
(l(), c(y, null, g(4, (k, o) => (l(), c(y, {
|
|
61
|
+
key: a + "_" + o
|
|
62
|
+
}, [
|
|
63
|
+
a * 4 + o < 10 ? (l(), c("td", {
|
|
64
|
+
key: 0,
|
|
65
|
+
ref_for: !0,
|
|
66
|
+
ref: (N) => f(d(s) + a * 4 + o) && (i.value = N),
|
|
67
|
+
class: v(["available", I(d(s) + a * 4 + o)]),
|
|
68
|
+
"aria-selected": `${f(d(s) + a * 4 + o)}`,
|
|
69
|
+
tabindex: f(d(s) + a * 4 + o) ? 0 : -1,
|
|
70
|
+
onKeydown: [
|
|
71
|
+
h(x(m, ["prevent", "stop"]), ["space"]),
|
|
72
|
+
h(x(m, ["prevent", "stop"]), ["enter"])
|
|
73
|
+
]
|
|
74
|
+
}, [
|
|
75
|
+
u("span", $, B(d(s) + a * 4 + o), 1)
|
|
76
|
+
], 42, P)) : (l(), c("td", q))
|
|
77
|
+
], 64))), 64))
|
|
78
|
+
])), 64))
|
|
79
|
+
], 512)
|
|
80
|
+
], 2));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
oe as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import { defineComponent as Ge, useAttrs as Qe, useSlots as Xe, ref as D, inject as de, toRef as Ze, computed as m, watch as A, openBlock as C, createElementBlock as I, normalizeClass as r, unref as t, createElementVNode as v, renderSlot as je, Fragment as xe, renderList as ea, toDisplayString as ve, createCommentVNode as K, createVNode as T, withDirectives as P, vShow as N, withKeys as me, createBlock as j, withCtx as pe, createTextVNode as fe, nextTick as x } from "vue";
|
|
2
|
+
import p from "dayjs";
|
|
3
|
+
import { VftButton as he } from "../../button/index.js";
|
|
4
|
+
import { ClickOutside as aa } from "@vft/directives";
|
|
5
|
+
import { useNamespace as ye } from "../../../hooks/use-namespace/index.js";
|
|
6
|
+
import "@popperjs/core";
|
|
7
|
+
import "lodash";
|
|
8
|
+
import "../../../hooks/use-z-index/index.js";
|
|
9
|
+
import "@vueuse/core";
|
|
10
|
+
import { isFunction as ke, isArray as ta } from "@vft/utils";
|
|
11
|
+
import "../../../utils/ns-cover.js";
|
|
12
|
+
import { VftInput as be } from "../../input/index.js";
|
|
13
|
+
import "../../time-picker/index.js";
|
|
14
|
+
import { VftIcon as U } from "../../icon/index.js";
|
|
15
|
+
import { EVENT_CODE as f } from "../../../constants/aria.js";
|
|
16
|
+
import "../../tooltip/index.js";
|
|
17
|
+
import { panelDatePickProps as la } from "../props/panel-date-pick.js";
|
|
18
|
+
import na from "./basic-date-table.vue2.js";
|
|
19
|
+
import oa from "./basic-month-table.vue2.js";
|
|
20
|
+
import ra from "./basic-year-table.vue2.js";
|
|
21
|
+
import { TOOLTIP_INJECTION_KEY as sa } from "../../tooltip/constants.js";
|
|
22
|
+
import { extractTimeFormat as ua, extractDateFormat as ia } from "../../time-picker/utils.js";
|
|
23
|
+
import ca from "../../time-picker/time-picker-com/panel-time-pick.vue2.js";
|
|
24
|
+
const da = ["onClick"], Ka = /* @__PURE__ */ Ge({
|
|
25
|
+
__name: "panel-date-pick",
|
|
26
|
+
props: la,
|
|
27
|
+
emits: ["pick", "set-picker-option", "panel-change"],
|
|
28
|
+
setup(we, { emit: w }) {
|
|
29
|
+
const u = we, ge = (e, a, n) => !0, d = ye("picker-panel"), g = ye("date-picker"), Ve = Qe(), De = Xe(), h = D("zh-cn"), ee = de("EP_PICKER_BASE"), E = de(sa), { shortcuts: ae, disabledDate: k, cellClassName: Ce, defaultTime: L, arrowControl: Te } = ee.props, M = Ze(ee.props, "defaultValue"), O = D(), l = D(p().locale(h.value)), H = D(!1), te = m(() => p(L).locale(h.value));
|
|
30
|
+
m(() => l.value.month());
|
|
31
|
+
const le = m(() => l.value.year()), W = D([]), $ = D(null), F = D(null), J = (e) => W.value.length > 0 ? ge(e, W.value, u.format || "HH:mm:ss") : !0, ne = (e) => L && !ie.value && !H.value ? te.value.year(e.year()).month(e.month()).date(e.date()) : R.value ? e.millisecond(0) : e.startOf("day"), c = (e, ...a) => {
|
|
32
|
+
if (!e)
|
|
33
|
+
w("pick", e, ...a);
|
|
34
|
+
else if (ta(e)) {
|
|
35
|
+
const n = e.map(ne);
|
|
36
|
+
w("pick", n, ...a);
|
|
37
|
+
} else
|
|
38
|
+
w("pick", ne(e), ...a);
|
|
39
|
+
$.value = null, F.value = null, H.value = !1;
|
|
40
|
+
}, Pe = (e, a) => {
|
|
41
|
+
if (i.value === "date") {
|
|
42
|
+
e = e;
|
|
43
|
+
let n = u.parsedValue ? u.parsedValue.year(e.year()).month(e.month()).date(e.date()) : e;
|
|
44
|
+
J(n) || (n = W.value[0][0].year(e.year()).month(e.month()).date(e.date())), l.value = n, c(n, R.value || a);
|
|
45
|
+
} else
|
|
46
|
+
i.value === "week" ? c(e.date) : i.value === "dates" && c(e, !0);
|
|
47
|
+
}, oe = (e) => {
|
|
48
|
+
const a = e ? "add" : "subtract";
|
|
49
|
+
l.value = l.value[a](1, "month"), z("month");
|
|
50
|
+
}, re = (e) => {
|
|
51
|
+
const a = l.value, n = e ? "add" : "subtract";
|
|
52
|
+
l.value = s.value === "year" ? a[n](10, "year") : a[n](1, "year"), z("year");
|
|
53
|
+
}, s = D("date"), $e = m(() => {
|
|
54
|
+
const e = "年";
|
|
55
|
+
if (s.value === "year") {
|
|
56
|
+
const a = Math.floor(le.value / 10) * 10;
|
|
57
|
+
return `${a} ${e} - ${a + 9} ${e}`;
|
|
58
|
+
}
|
|
59
|
+
return `${le.value} ${e}`;
|
|
60
|
+
}), Fe = (e) => {
|
|
61
|
+
const a = ke(e.value) ? e.value() : e.value;
|
|
62
|
+
if (a) {
|
|
63
|
+
c(p(a).locale(h.value));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
e.onClick && e.onClick({
|
|
67
|
+
attrs: Ve,
|
|
68
|
+
slots: De,
|
|
69
|
+
emit: w
|
|
70
|
+
});
|
|
71
|
+
}, i = m(() => {
|
|
72
|
+
const { type: e } = u;
|
|
73
|
+
return ["week", "month", "year", "dates"].includes(e) ? e : "date";
|
|
74
|
+
}), Ie = m(() => i.value === "date" ? s.value : i.value), se = m(() => !!ae.length), Ne = async (e) => {
|
|
75
|
+
l.value = l.value.startOf("month").month(e), i.value === "month" ? c(l.value, !1) : (s.value = "date", ["month", "year", "date", "week"].includes(i.value) && (c(l.value, !0), await x(), _())), z("month");
|
|
76
|
+
}, Me = async (e) => {
|
|
77
|
+
i.value === "year" ? (l.value = l.value.startOf("year").year(e), c(l.value, !1)) : (l.value = l.value.year(e), s.value = "month", ["month", "year", "date", "week"].includes(i.value) && (c(l.value, !0), await x(), _())), z("year");
|
|
78
|
+
}, Y = async (e) => {
|
|
79
|
+
s.value = e, await x(), _();
|
|
80
|
+
}, R = m(
|
|
81
|
+
() => u.type === "datetime" || u.type === "datetimerange"
|
|
82
|
+
), Re = m(() => R.value || i.value === "dates"), Se = () => {
|
|
83
|
+
if (i.value === "dates")
|
|
84
|
+
c(u.parsedValue);
|
|
85
|
+
else {
|
|
86
|
+
let e = u.parsedValue;
|
|
87
|
+
if (!e) {
|
|
88
|
+
const a = p(L).locale(h.value), n = Q();
|
|
89
|
+
e = a.year(n.year()).month(n.month()).date(n.date());
|
|
90
|
+
}
|
|
91
|
+
l.value = e, c(e);
|
|
92
|
+
}
|
|
93
|
+
}, Be = () => {
|
|
94
|
+
const a = p().locale(h.value).toDate();
|
|
95
|
+
H.value = !0, (!k || !k(a)) && J(a) && (l.value = p().locale(h.value), c(l.value));
|
|
96
|
+
}, q = m(() => ua(u.format)), ue = m(() => ia(u.format)), ie = m(() => {
|
|
97
|
+
if (F.value)
|
|
98
|
+
return F.value;
|
|
99
|
+
if (!(!u.parsedValue && !M.value))
|
|
100
|
+
return (u.parsedValue || l.value).format(
|
|
101
|
+
q.value
|
|
102
|
+
);
|
|
103
|
+
}), Ke = m(() => {
|
|
104
|
+
if ($.value)
|
|
105
|
+
return $.value;
|
|
106
|
+
if (!(!u.parsedValue && !M.value))
|
|
107
|
+
return (u.parsedValue || l.value).format(
|
|
108
|
+
ue.value
|
|
109
|
+
);
|
|
110
|
+
}), S = D(!1), Oe = () => {
|
|
111
|
+
S.value = !0;
|
|
112
|
+
}, Ye = () => {
|
|
113
|
+
S.value = !1;
|
|
114
|
+
}, G = (e) => ({
|
|
115
|
+
hour: e.hour(),
|
|
116
|
+
minute: e.minute(),
|
|
117
|
+
second: e.second(),
|
|
118
|
+
year: e.year(),
|
|
119
|
+
month: e.month(),
|
|
120
|
+
date: e.date()
|
|
121
|
+
}), _e = (e, a, n) => {
|
|
122
|
+
const { hour: y, minute: b, second: X } = G(e), Z = u.parsedValue ? u.parsedValue.hour(y).minute(b).second(X) : e;
|
|
123
|
+
l.value = Z, c(l.value, !0), n || (S.value = a);
|
|
124
|
+
}, ze = (e) => {
|
|
125
|
+
const a = p(e, q.value).locale(h.value);
|
|
126
|
+
if (a.isValid() && J(a)) {
|
|
127
|
+
const { year: n, month: y, date: b } = G(l.value);
|
|
128
|
+
l.value = a.year(n).month(y).date(b), F.value = null, S.value = !1, c(l.value, !0);
|
|
129
|
+
}
|
|
130
|
+
}, Ae = (e) => {
|
|
131
|
+
const a = p(e, ue.value).locale(h.value);
|
|
132
|
+
if (a.isValid()) {
|
|
133
|
+
if (k && k(a.toDate()))
|
|
134
|
+
return;
|
|
135
|
+
const { hour: n, minute: y, second: b } = G(l.value);
|
|
136
|
+
l.value = a.hour(n).minute(y).second(b), $.value = null, c(l.value, !0);
|
|
137
|
+
}
|
|
138
|
+
}, Ue = (e) => p.isDayjs(e) && e.isValid() && (k ? !k(e.toDate()) : !0), Ee = (e) => i.value === "dates" ? e.map((a) => a.format(u.format)) : e.format(u.format), Le = (e) => p(e, u.format).locale(h.value), Q = () => {
|
|
139
|
+
const e = p(M.value).locale(h.value);
|
|
140
|
+
if (!M.value) {
|
|
141
|
+
const a = te.value;
|
|
142
|
+
return p().hour(a.hour()).minute(a.minute()).second(a.second()).locale(h.value);
|
|
143
|
+
}
|
|
144
|
+
return e;
|
|
145
|
+
}, _ = async () => {
|
|
146
|
+
var e;
|
|
147
|
+
["week", "month", "year", "date"].includes(i.value) && ((e = O.value) == null || e.focus(), i.value === "week" && ce(f.down));
|
|
148
|
+
}, He = (e) => {
|
|
149
|
+
const { code: a } = e;
|
|
150
|
+
[
|
|
151
|
+
f.up,
|
|
152
|
+
f.down,
|
|
153
|
+
f.left,
|
|
154
|
+
f.right,
|
|
155
|
+
f.home,
|
|
156
|
+
f.end,
|
|
157
|
+
f.pageUp,
|
|
158
|
+
f.pageDown
|
|
159
|
+
].includes(a) && (ce(a), e.stopPropagation(), e.preventDefault()), [f.enter, f.space, f.numpadEnter].includes(
|
|
160
|
+
a
|
|
161
|
+
) && $.value === null && F.value === null && (e.preventDefault(), c(l.value, !1));
|
|
162
|
+
}, ce = (e) => {
|
|
163
|
+
const { up: a, down: n, left: y, right: b, home: X, end: Z, pageUp: We, pageDown: Je } = f, qe = {
|
|
164
|
+
year: {
|
|
165
|
+
[a]: -4,
|
|
166
|
+
[n]: 4,
|
|
167
|
+
[y]: -1,
|
|
168
|
+
[b]: 1,
|
|
169
|
+
offset: (o, V) => o.setFullYear(o.getFullYear() + V)
|
|
170
|
+
},
|
|
171
|
+
month: {
|
|
172
|
+
[a]: -4,
|
|
173
|
+
[n]: 4,
|
|
174
|
+
[y]: -1,
|
|
175
|
+
[b]: 1,
|
|
176
|
+
offset: (o, V) => o.setMonth(o.getMonth() + V)
|
|
177
|
+
},
|
|
178
|
+
week: {
|
|
179
|
+
[a]: -1,
|
|
180
|
+
[n]: 1,
|
|
181
|
+
[y]: -1,
|
|
182
|
+
[b]: 1,
|
|
183
|
+
offset: (o, V) => o.setDate(o.getDate() + V * 7)
|
|
184
|
+
},
|
|
185
|
+
date: {
|
|
186
|
+
[a]: -7,
|
|
187
|
+
[n]: 7,
|
|
188
|
+
[y]: -1,
|
|
189
|
+
[b]: 1,
|
|
190
|
+
[X]: (o) => -o.getDay(),
|
|
191
|
+
[Z]: (o) => -o.getDay() + 6,
|
|
192
|
+
[We]: (o) => -new Date(o.getFullYear(), o.getMonth(), 0).getDate(),
|
|
193
|
+
[Je]: (o) => new Date(o.getFullYear(), o.getMonth() + 1, 0).getDate(),
|
|
194
|
+
offset: (o, V) => o.setDate(o.getDate() + V)
|
|
195
|
+
}
|
|
196
|
+
}, B = l.value.toDate();
|
|
197
|
+
for (; Math.abs(l.value.diff(B, "year", !0)) < 1; ) {
|
|
198
|
+
const o = qe[Ie.value];
|
|
199
|
+
if (!o)
|
|
200
|
+
return;
|
|
201
|
+
if (o.offset(
|
|
202
|
+
B,
|
|
203
|
+
ke(o[e]) ? o[e](B) : o[e] ?? 0
|
|
204
|
+
), k && k(B))
|
|
205
|
+
break;
|
|
206
|
+
const V = p(B).locale(h.value);
|
|
207
|
+
l.value = V, w("pick", V, !0);
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}, z = (e) => {
|
|
211
|
+
w("panel-change", l.value.toDate(), e, s.value);
|
|
212
|
+
};
|
|
213
|
+
return A(
|
|
214
|
+
() => i.value,
|
|
215
|
+
(e) => {
|
|
216
|
+
if (["month", "year"].includes(e)) {
|
|
217
|
+
s.value = e;
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
s.value = "date";
|
|
221
|
+
},
|
|
222
|
+
{ immediate: !0 }
|
|
223
|
+
), A(
|
|
224
|
+
() => s.value,
|
|
225
|
+
() => {
|
|
226
|
+
E == null || E.updatePopper();
|
|
227
|
+
}
|
|
228
|
+
), A(
|
|
229
|
+
() => M.value,
|
|
230
|
+
(e) => {
|
|
231
|
+
e && (l.value = Q());
|
|
232
|
+
},
|
|
233
|
+
{ immediate: !0 }
|
|
234
|
+
), A(
|
|
235
|
+
() => u.parsedValue,
|
|
236
|
+
(e) => {
|
|
237
|
+
if (e) {
|
|
238
|
+
if (i.value === "dates" || Array.isArray(e))
|
|
239
|
+
return;
|
|
240
|
+
l.value = e;
|
|
241
|
+
} else
|
|
242
|
+
l.value = Q();
|
|
243
|
+
},
|
|
244
|
+
{ immediate: !0 }
|
|
245
|
+
), w("set-picker-option", ["isValidValue", Ue]), w("set-picker-option", ["formatToString", Ee]), w("set-picker-option", ["parseUserInput", Le]), w("set-picker-option", ["handleFocusPicker", _]), (e, a) => (C(), I("div", {
|
|
246
|
+
class: r([
|
|
247
|
+
t(d).b(),
|
|
248
|
+
t(g).b(),
|
|
249
|
+
{
|
|
250
|
+
"has-sidebar": e.$slots.sidebar || t(se),
|
|
251
|
+
"has-time": t(R)
|
|
252
|
+
}
|
|
253
|
+
])
|
|
254
|
+
}, [
|
|
255
|
+
v("div", {
|
|
256
|
+
class: r(t(d).e("body-wrapper"))
|
|
257
|
+
}, [
|
|
258
|
+
je(e.$slots, "sidebar", {
|
|
259
|
+
class: r(t(d).e("sidebar"))
|
|
260
|
+
}),
|
|
261
|
+
t(se) ? (C(), I("div", {
|
|
262
|
+
key: 0,
|
|
263
|
+
class: r(t(d).e("sidebar"))
|
|
264
|
+
}, [
|
|
265
|
+
(C(!0), I(xe, null, ea(t(ae), (n, y) => (C(), I("button", {
|
|
266
|
+
key: y,
|
|
267
|
+
type: "button",
|
|
268
|
+
class: r(t(d).e("shortcut")),
|
|
269
|
+
onClick: (b) => Fe(n)
|
|
270
|
+
}, ve(n.text), 11, da))), 128))
|
|
271
|
+
], 2)) : K("", !0),
|
|
272
|
+
v("div", {
|
|
273
|
+
class: r(t(d).e("body"))
|
|
274
|
+
}, [
|
|
275
|
+
t(R) ? (C(), I("div", {
|
|
276
|
+
key: 0,
|
|
277
|
+
class: r(t(g).e("time-header"))
|
|
278
|
+
}, [
|
|
279
|
+
v("span", {
|
|
280
|
+
class: r(t(g).e("editor-wrap"))
|
|
281
|
+
}, [
|
|
282
|
+
T(t(be), {
|
|
283
|
+
placeholder: "選擇日期",
|
|
284
|
+
"model-value": t(Ke),
|
|
285
|
+
size: "small",
|
|
286
|
+
"validate-event": !1,
|
|
287
|
+
onInput: a[0] || (a[0] = (n) => $.value = n),
|
|
288
|
+
onChange: Ae
|
|
289
|
+
}, null, 8, ["model-value"])
|
|
290
|
+
], 2),
|
|
291
|
+
P((C(), I("span", {
|
|
292
|
+
class: r(t(g).e("editor-wrap"))
|
|
293
|
+
}, [
|
|
294
|
+
T(t(be), {
|
|
295
|
+
placeholder: "選擇時間",
|
|
296
|
+
"model-value": t(ie),
|
|
297
|
+
size: "small",
|
|
298
|
+
"validate-event": !1,
|
|
299
|
+
onFocus: Oe,
|
|
300
|
+
onInput: a[1] || (a[1] = (n) => F.value = n),
|
|
301
|
+
onChange: ze
|
|
302
|
+
}, null, 8, ["model-value"]),
|
|
303
|
+
T(t(ca), {
|
|
304
|
+
visible: S.value,
|
|
305
|
+
format: t(q),
|
|
306
|
+
"time-arrow-control": t(Te),
|
|
307
|
+
"parsed-value": l.value,
|
|
308
|
+
onPick: _e
|
|
309
|
+
}, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"])
|
|
310
|
+
], 2)), [
|
|
311
|
+
[t(aa), Ye]
|
|
312
|
+
])
|
|
313
|
+
], 2)) : K("", !0),
|
|
314
|
+
P(v("div", {
|
|
315
|
+
class: r([
|
|
316
|
+
t(g).e("header"),
|
|
317
|
+
(s.value === "year" || s.value === "month") && t(g).e("header--bordered")
|
|
318
|
+
])
|
|
319
|
+
}, [
|
|
320
|
+
v("span", {
|
|
321
|
+
class: r(t(g).e("prev-btn"))
|
|
322
|
+
}, [
|
|
323
|
+
v("button", {
|
|
324
|
+
type: "button",
|
|
325
|
+
class: r(["d-arrow-left", t(d).e("icon-btn")]),
|
|
326
|
+
onClick: a[2] || (a[2] = (n) => re(!1))
|
|
327
|
+
}, [
|
|
328
|
+
T(t(U), { icon: "ico-ep:d-arrow-left" })
|
|
329
|
+
], 2),
|
|
330
|
+
P(v("button", {
|
|
331
|
+
type: "button",
|
|
332
|
+
class: r([t(d).e("icon-btn"), "arrow-left"]),
|
|
333
|
+
onClick: a[3] || (a[3] = (n) => oe(!1))
|
|
334
|
+
}, [
|
|
335
|
+
T(t(U), { icon: "ico-ep:arrow-left" })
|
|
336
|
+
], 2), [
|
|
337
|
+
[N, s.value === "date"]
|
|
338
|
+
])
|
|
339
|
+
], 2),
|
|
340
|
+
v("span", {
|
|
341
|
+
role: "button",
|
|
342
|
+
class: r(t(g).e("header-label")),
|
|
343
|
+
"aria-live": "polite",
|
|
344
|
+
tabindex: "0",
|
|
345
|
+
onKeydown: a[4] || (a[4] = me((n) => Y("year"), ["enter"])),
|
|
346
|
+
onClick: a[5] || (a[5] = (n) => Y("year"))
|
|
347
|
+
}, ve(t($e)), 35),
|
|
348
|
+
P(v("span", {
|
|
349
|
+
role: "button",
|
|
350
|
+
"aria-live": "polite",
|
|
351
|
+
tabindex: "0",
|
|
352
|
+
class: r([
|
|
353
|
+
t(g).e("header-label"),
|
|
354
|
+
{ active: s.value === "month" }
|
|
355
|
+
]),
|
|
356
|
+
onKeydown: a[6] || (a[6] = me((n) => Y("month"), ["enter"])),
|
|
357
|
+
onClick: a[7] || (a[7] = (n) => Y("month"))
|
|
358
|
+
}, "月份Todo", 34), [
|
|
359
|
+
[N, s.value === "date"]
|
|
360
|
+
]),
|
|
361
|
+
v("span", {
|
|
362
|
+
class: r(t(g).e("next-btn"))
|
|
363
|
+
}, [
|
|
364
|
+
P(v("button", {
|
|
365
|
+
type: "button",
|
|
366
|
+
class: r([t(d).e("icon-btn"), "arrow-right"]),
|
|
367
|
+
onClick: a[8] || (a[8] = (n) => oe(!0))
|
|
368
|
+
}, [
|
|
369
|
+
T(t(U), { icon: "ico-ep:arrow-right" })
|
|
370
|
+
], 2), [
|
|
371
|
+
[N, s.value === "date"]
|
|
372
|
+
]),
|
|
373
|
+
v("button", {
|
|
374
|
+
type: "button",
|
|
375
|
+
class: r([t(d).e("icon-btn"), "d-arrow-right"]),
|
|
376
|
+
onClick: a[9] || (a[9] = (n) => re(!0))
|
|
377
|
+
}, [
|
|
378
|
+
T(t(U), { icon: "ico-ep:d-arrow-right" })
|
|
379
|
+
], 2)
|
|
380
|
+
], 2)
|
|
381
|
+
], 2), [
|
|
382
|
+
[N, s.value !== "time"]
|
|
383
|
+
]),
|
|
384
|
+
v("div", {
|
|
385
|
+
class: r(t(d).e("content")),
|
|
386
|
+
onKeydown: He
|
|
387
|
+
}, [
|
|
388
|
+
s.value === "date" ? (C(), j(na, {
|
|
389
|
+
key: 0,
|
|
390
|
+
ref_key: "currentViewRef",
|
|
391
|
+
ref: O,
|
|
392
|
+
"selection-mode": t(i),
|
|
393
|
+
date: l.value,
|
|
394
|
+
"parsed-value": e.parsedValue,
|
|
395
|
+
"disabled-date": t(k),
|
|
396
|
+
"cell-class-name": t(Ce),
|
|
397
|
+
onPick: Pe
|
|
398
|
+
}, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "cell-class-name"])) : K("", !0),
|
|
399
|
+
s.value === "year" ? (C(), j(ra, {
|
|
400
|
+
key: 1,
|
|
401
|
+
ref_key: "currentViewRef",
|
|
402
|
+
ref: O,
|
|
403
|
+
date: l.value,
|
|
404
|
+
"disabled-date": t(k),
|
|
405
|
+
"parsed-value": e.parsedValue,
|
|
406
|
+
onPick: Me
|
|
407
|
+
}, null, 8, ["date", "disabled-date", "parsed-value"])) : K("", !0),
|
|
408
|
+
s.value === "month" ? (C(), j(oa, {
|
|
409
|
+
key: 2,
|
|
410
|
+
ref_key: "currentViewRef",
|
|
411
|
+
ref: O,
|
|
412
|
+
date: l.value,
|
|
413
|
+
"parsed-value": e.parsedValue,
|
|
414
|
+
"disabled-date": t(k),
|
|
415
|
+
onPick: Ne
|
|
416
|
+
}, null, 8, ["date", "parsed-value", "disabled-date"])) : K("", !0)
|
|
417
|
+
], 34)
|
|
418
|
+
], 2)
|
|
419
|
+
], 2),
|
|
420
|
+
P(v("div", {
|
|
421
|
+
class: r(t(d).e("footer"))
|
|
422
|
+
}, [
|
|
423
|
+
P(T(t(he), {
|
|
424
|
+
text: "",
|
|
425
|
+
size: "small",
|
|
426
|
+
class: r(t(d).e("link-btn")),
|
|
427
|
+
onClick: Be
|
|
428
|
+
}, {
|
|
429
|
+
default: pe(() => [
|
|
430
|
+
fe(" 現在 ")
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["class"]), [
|
|
434
|
+
[N, t(i) !== "dates"]
|
|
435
|
+
]),
|
|
436
|
+
T(t(he), {
|
|
437
|
+
plain: "",
|
|
438
|
+
size: "small",
|
|
439
|
+
class: r(t(d).e("link-btn")),
|
|
440
|
+
onClick: Se
|
|
441
|
+
}, {
|
|
442
|
+
default: pe(() => [
|
|
443
|
+
fe(" 確認 ")
|
|
444
|
+
]),
|
|
445
|
+
_: 1
|
|
446
|
+
}, 8, ["class"])
|
|
447
|
+
], 2), [
|
|
448
|
+
[N, t(Re) && s.value === "date"]
|
|
449
|
+
])
|
|
450
|
+
], 2));
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
export {
|
|
454
|
+
Ka as default
|
|
455
|
+
};
|