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,107 @@
|
|
|
1
|
+
import { defineComponent as J, inject as L, ref as C, computed as m, openBlock as w, createBlock as Q, Transition as W, unref as n, withCtx as X, createElementBlock as Y, normalizeClass as l, createElementVNode as p, createVNode as Z, createCommentVNode as ee } from "vue";
|
|
2
|
+
import f from "dayjs";
|
|
3
|
+
import { EVENT_CODE as te } from "../../../constants/aria.js";
|
|
4
|
+
import { useNamespace as ne } 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 { isUndefined as oe } from "@vft/utils";
|
|
10
|
+
import "../../../utils/ns-cover.js";
|
|
11
|
+
import { panelTimePickerProps as se } from "../props/panel-time-picker.js";
|
|
12
|
+
import { useTimePanel as ae } from "../composables/use-time-panel.js";
|
|
13
|
+
import { useOldValue as re, buildAvailableTimeSlotGetter as le } from "../composables/use-time-picker.js";
|
|
14
|
+
import ie from "./basic-time-spinner.vue2.js";
|
|
15
|
+
const we = /* @__PURE__ */ J({
|
|
16
|
+
__name: "panel-time-pick",
|
|
17
|
+
props: se,
|
|
18
|
+
emits: ["pick", "select-range", "set-picker-option"],
|
|
19
|
+
setup(A, { emit: o }) {
|
|
20
|
+
const s = A, R = L("EP_PICKER_BASE"), {
|
|
21
|
+
arrowControl: T,
|
|
22
|
+
disabledHours: b,
|
|
23
|
+
disabledMinutes: g,
|
|
24
|
+
disabledSeconds: k,
|
|
25
|
+
defaultValue: E
|
|
26
|
+
} = R.props, { getAvailableHours: _, getAvailableMinutes: D, getAvailableSeconds: O } = le(b, g, k), r = ne("time"), u = C("zh-cn"), v = C([0, 2]), P = re(s), y = m(() => oe(s.actualVisible) ? `${r.namespace.value}-zoom-in-top` : ""), i = m(() => s.format.includes("ss")), N = m(() => s.format.includes("A") ? "A" : s.format.includes("a") ? "a" : ""), B = (e) => {
|
|
27
|
+
const t = f(e).locale(u.value), a = d(t);
|
|
28
|
+
return t.isSame(a);
|
|
29
|
+
}, I = () => {
|
|
30
|
+
o("pick", P.value, !1);
|
|
31
|
+
}, x = (e = !1, t = !1) => {
|
|
32
|
+
t || o("pick", s.parsedValue, e);
|
|
33
|
+
}, z = (e) => {
|
|
34
|
+
if (!s.visible)
|
|
35
|
+
return;
|
|
36
|
+
const t = d(e).millisecond(0);
|
|
37
|
+
o("pick", t, !0);
|
|
38
|
+
}, K = (e, t) => {
|
|
39
|
+
o("select-range", e, t), v.value = [e, t];
|
|
40
|
+
}, M = (e) => {
|
|
41
|
+
const t = [0, 3].concat(i.value ? [6] : []), a = ["hours", "minutes"].concat(
|
|
42
|
+
i.value ? ["seconds"] : []
|
|
43
|
+
), c = (t.indexOf(v.value[0]) + e + t.length) % t.length;
|
|
44
|
+
h.start_emitSelectRange(a[c]);
|
|
45
|
+
}, U = (e) => {
|
|
46
|
+
const t = e.code, { left: a, right: V, up: c, down: F } = te;
|
|
47
|
+
if ([a, V].includes(t)) {
|
|
48
|
+
M(t === a ? -1 : 1), e.preventDefault();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if ([c, F].includes(t)) {
|
|
52
|
+
const S = t === c ? -1 : 1;
|
|
53
|
+
h.start_scrollDown(S), e.preventDefault();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}, { timePickerOptions: h, onSetOption: $, getAvailableTime: j } = ae({
|
|
57
|
+
getAvailableHours: _,
|
|
58
|
+
getAvailableMinutes: D,
|
|
59
|
+
getAvailableSeconds: O
|
|
60
|
+
}), d = (e) => j(e, s.datetimeRole || "", !0), H = (e) => e ? f(e, s.format).locale(u.value) : null, G = (e) => e ? e.format(s.format) : null, q = () => f(E).locale(u.value);
|
|
61
|
+
return o("set-picker-option", ["isValidValue", B]), o("set-picker-option", ["formatToString", G]), o("set-picker-option", ["parseUserInput", H]), o("set-picker-option", ["handleKeydownInput", U]), o("set-picker-option", ["getRangeAvailableTime", d]), o("set-picker-option", ["getDefaultValue", q]), (e, t) => (w(), Q(W, { name: n(y) }, {
|
|
62
|
+
default: X(() => [
|
|
63
|
+
e.actualVisible || e.visible ? (w(), Y("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: l(n(r).b("panel"))
|
|
66
|
+
}, [
|
|
67
|
+
p("div", {
|
|
68
|
+
class: l([n(r).be("panel", "content"), { "has-seconds": n(i) }])
|
|
69
|
+
}, [
|
|
70
|
+
Z(ie, {
|
|
71
|
+
ref: "spinner",
|
|
72
|
+
role: e.datetimeRole || "start",
|
|
73
|
+
"arrow-control": n(T),
|
|
74
|
+
"show-seconds": n(i),
|
|
75
|
+
"am-pm-mode": n(N),
|
|
76
|
+
"spinner-date": e.parsedValue,
|
|
77
|
+
"disabled-hours": n(b),
|
|
78
|
+
"disabled-minutes": n(g),
|
|
79
|
+
"disabled-seconds": n(k),
|
|
80
|
+
onChange: z,
|
|
81
|
+
onSetOption: n($),
|
|
82
|
+
onSelectRange: K
|
|
83
|
+
}, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"])
|
|
84
|
+
], 2),
|
|
85
|
+
p("div", {
|
|
86
|
+
class: l(n(r).be("panel", "footer"))
|
|
87
|
+
}, [
|
|
88
|
+
p("button", {
|
|
89
|
+
type: "button",
|
|
90
|
+
class: l([n(r).be("panel", "btn"), "cancel"]),
|
|
91
|
+
onClick: I
|
|
92
|
+
}, " 取消 ", 2),
|
|
93
|
+
p("button", {
|
|
94
|
+
type: "button",
|
|
95
|
+
class: l([n(r).be("panel", "btn"), "confirm"]),
|
|
96
|
+
onClick: t[0] || (t[0] = (a) => x())
|
|
97
|
+
}, " 确认 ", 2)
|
|
98
|
+
], 2)
|
|
99
|
+
], 2)) : ee("", !0)
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 8, ["name"]));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
we as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { defineComponent as de, ref as j, inject as me, computed as h, openBlock as fe, createElementBlock as be, normalizeClass as i, unref as t, createElementVNode as d, createVNode as z, createCommentVNode as ge } from "vue";
|
|
2
|
+
import S from "dayjs";
|
|
3
|
+
import { union as A } from "lodash";
|
|
4
|
+
import { useNamespace as U } from "../../../hooks/use-namespace/index.js";
|
|
5
|
+
import "@popperjs/core";
|
|
6
|
+
import "../../../hooks/use-z-index/index.js";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import { isArray as M } from "@vft/utils";
|
|
9
|
+
import "../../../utils/ns-cover.js";
|
|
10
|
+
import { EVENT_CODE as ve } from "../../../constants/aria.js";
|
|
11
|
+
import { panelTimeRangeProps as he } from "../props/panel-time-range.js";
|
|
12
|
+
import { useTimePanel as ke } from "../composables/use-time-panel.js";
|
|
13
|
+
import { useOldValue as Se, buildAvailableTimeSlotGetter as De } from "../composables/use-time-picker.js";
|
|
14
|
+
import G from "./basic-time-spinner.vue2.js";
|
|
15
|
+
const we = ["disabled"], Be = /* @__PURE__ */ de({
|
|
16
|
+
__name: "panel-time-range",
|
|
17
|
+
props: he,
|
|
18
|
+
emits: ["pick", "select-range", "set-picker-option"],
|
|
19
|
+
setup(q, { emit: c }) {
|
|
20
|
+
const u = q, g = (e, n) => {
|
|
21
|
+
const o = [];
|
|
22
|
+
for (let a = e; a <= n; a++)
|
|
23
|
+
o.push(a);
|
|
24
|
+
return o;
|
|
25
|
+
}, k = j("zh-cn"), s = U("time"), F = U("picker"), J = me("EP_PICKER_BASE"), {
|
|
26
|
+
arrowControl: D,
|
|
27
|
+
disabledHours: O,
|
|
28
|
+
disabledMinutes: E,
|
|
29
|
+
disabledSeconds: P,
|
|
30
|
+
defaultValue: C
|
|
31
|
+
} = J.props, m = h(() => u.parsedValue[0]), f = h(() => u.parsedValue[1]), L = Se(u), Q = () => {
|
|
32
|
+
c("pick", L.value, !1);
|
|
33
|
+
}, b = h(() => u.format.includes("ss")), H = h(() => u.format.includes("A") ? "A" : u.format.includes("a") ? "a" : ""), W = (e = !1) => {
|
|
34
|
+
c("pick", [m.value, f.value], e);
|
|
35
|
+
}, X = (e) => {
|
|
36
|
+
N(e.millisecond(0), f.value);
|
|
37
|
+
}, Y = (e) => {
|
|
38
|
+
N(m.value, e.millisecond(0));
|
|
39
|
+
}, Z = (e) => {
|
|
40
|
+
const n = e.map((a) => S(a).locale(k.value)), o = B(n);
|
|
41
|
+
return n[0].isSame(o[0]) && n[1].isSame(o[1]);
|
|
42
|
+
}, N = (e, n) => {
|
|
43
|
+
c("pick", [e, n], !0);
|
|
44
|
+
}, ee = h(() => m.value > f.value), w = j([0, 2]), ne = (e, n) => {
|
|
45
|
+
c("select-range", e, n, "min"), w.value = [e, n];
|
|
46
|
+
}, y = h(() => b.value ? 11 : 8), te = (e, n) => {
|
|
47
|
+
c("select-range", e, n, "max");
|
|
48
|
+
const o = t(y);
|
|
49
|
+
w.value = [e + o, n + o];
|
|
50
|
+
}, oe = (e) => {
|
|
51
|
+
const n = b.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11], o = ["hours", "minutes"].concat(
|
|
52
|
+
b.value ? ["seconds"] : []
|
|
53
|
+
), r = (n.indexOf(w.value[0]) + e + n.length) % n.length, l = n.length / 2;
|
|
54
|
+
r < l ? x.start_emitSelectRange(o[r]) : x.end_emitSelectRange(o[r - l]);
|
|
55
|
+
}, ae = (e) => {
|
|
56
|
+
const n = e.code, { left: o, right: a, up: r, down: l } = ve;
|
|
57
|
+
if ([o, a].includes(n)) {
|
|
58
|
+
oe(n === o ? -1 : 1), e.preventDefault();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if ([r, l].includes(n)) {
|
|
62
|
+
const p = n === r ? -1 : 1, v = w.value[0] < y.value ? "start" : "end";
|
|
63
|
+
x[`${v}_scrollDown`](p), e.preventDefault();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}, V = (e, n) => {
|
|
67
|
+
const o = O ? O(e) : [], a = e === "start", l = (n || (a ? f.value : m.value)).hour(), p = a ? g(l + 1, 23) : g(0, l - 1);
|
|
68
|
+
return A(o, p);
|
|
69
|
+
}, _ = (e, n, o) => {
|
|
70
|
+
const a = E ? E(e, n) : [], r = n === "start", l = o || (r ? f.value : m.value), p = l.hour();
|
|
71
|
+
if (e !== p)
|
|
72
|
+
return a;
|
|
73
|
+
const v = l.minute(), T = r ? g(v + 1, 59) : g(0, v - 1);
|
|
74
|
+
return A(a, T);
|
|
75
|
+
}, R = (e, n, o, a) => {
|
|
76
|
+
const r = P ? P(e, n, o) : [], l = o === "start", p = a || (l ? f.value : m.value), v = p.hour(), T = p.minute();
|
|
77
|
+
if (e !== v || n !== T)
|
|
78
|
+
return r;
|
|
79
|
+
const K = p.second(), pe = l ? g(K + 1, 59) : g(0, K - 1);
|
|
80
|
+
return A(r, pe);
|
|
81
|
+
}, B = ([e, n]) => [
|
|
82
|
+
I(e, "start", !0, n),
|
|
83
|
+
I(n, "end", !1, e)
|
|
84
|
+
], { getAvailableHours: se, getAvailableMinutes: re, getAvailableSeconds: le } = De(
|
|
85
|
+
V,
|
|
86
|
+
_,
|
|
87
|
+
R
|
|
88
|
+
), {
|
|
89
|
+
timePickerOptions: x,
|
|
90
|
+
getAvailableTime: I,
|
|
91
|
+
onSetOption: $
|
|
92
|
+
} = ke({
|
|
93
|
+
getAvailableHours: se,
|
|
94
|
+
getAvailableMinutes: re,
|
|
95
|
+
getAvailableSeconds: le
|
|
96
|
+
}), ce = (e) => e ? M(e) ? e.map((n) => S(n, u.format).locale(k.value)) : S(e, u.format).locale(k.value) : null, ie = (e) => e ? M(e) ? e.map((n) => n.format(u.format)) : e.format(u.format) : null, ue = () => {
|
|
97
|
+
if (M(C))
|
|
98
|
+
return C.map((n) => S(n).locale(k.value));
|
|
99
|
+
const e = S(C).locale(k.value);
|
|
100
|
+
return [e, e.add(60, "m")];
|
|
101
|
+
};
|
|
102
|
+
return c("set-picker-option", ["formatToString", ie]), c("set-picker-option", ["parseUserInput", ce]), c("set-picker-option", ["isValidValue", Z]), c("set-picker-option", ["handleKeydownInput", ae]), c("set-picker-option", ["getDefaultValue", ue]), c("set-picker-option", ["getRangeAvailableTime", B]), (e, n) => e.actualVisible ? (fe(), be("div", {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: i([t(s).b("range-picker"), t(F).b("panel")])
|
|
105
|
+
}, [
|
|
106
|
+
d("div", {
|
|
107
|
+
class: i(t(s).be("range-picker", "content"))
|
|
108
|
+
}, [
|
|
109
|
+
d("div", {
|
|
110
|
+
class: i(t(s).be("range-picker", "cell"))
|
|
111
|
+
}, [
|
|
112
|
+
d("div", {
|
|
113
|
+
class: i(t(s).be("range-picker", "header"))
|
|
114
|
+
}, " 开始时间 ", 2),
|
|
115
|
+
d("div", {
|
|
116
|
+
class: i([
|
|
117
|
+
t(s).be("range-picker", "body"),
|
|
118
|
+
t(s).be("panel", "content"),
|
|
119
|
+
t(s).is("arrow", t(D)),
|
|
120
|
+
{ "has-seconds": t(b) }
|
|
121
|
+
])
|
|
122
|
+
}, [
|
|
123
|
+
z(G, {
|
|
124
|
+
ref: "minSpinner",
|
|
125
|
+
role: "start",
|
|
126
|
+
"show-seconds": t(b),
|
|
127
|
+
"am-pm-mode": t(H),
|
|
128
|
+
"arrow-control": t(D),
|
|
129
|
+
"spinner-date": t(m),
|
|
130
|
+
"disabled-hours": V,
|
|
131
|
+
"disabled-minutes": _,
|
|
132
|
+
"disabled-seconds": R,
|
|
133
|
+
onChange: X,
|
|
134
|
+
onSetOption: t($),
|
|
135
|
+
onSelectRange: ne
|
|
136
|
+
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
137
|
+
], 2)
|
|
138
|
+
], 2),
|
|
139
|
+
d("div", {
|
|
140
|
+
class: i(t(s).be("range-picker", "cell"))
|
|
141
|
+
}, [
|
|
142
|
+
d("div", {
|
|
143
|
+
class: i(t(s).be("range-picker", "header"))
|
|
144
|
+
}, " 结束时间 ", 2),
|
|
145
|
+
d("div", {
|
|
146
|
+
class: i([
|
|
147
|
+
t(s).be("range-picker", "body"),
|
|
148
|
+
t(s).be("panel", "content"),
|
|
149
|
+
t(s).is("arrow", t(D)),
|
|
150
|
+
{ "has-seconds": t(b) }
|
|
151
|
+
])
|
|
152
|
+
}, [
|
|
153
|
+
z(G, {
|
|
154
|
+
ref: "maxSpinner",
|
|
155
|
+
role: "end",
|
|
156
|
+
"show-seconds": t(b),
|
|
157
|
+
"am-pm-mode": t(H),
|
|
158
|
+
"arrow-control": t(D),
|
|
159
|
+
"spinner-date": t(f),
|
|
160
|
+
"disabled-hours": V,
|
|
161
|
+
"disabled-minutes": _,
|
|
162
|
+
"disabled-seconds": R,
|
|
163
|
+
onChange: Y,
|
|
164
|
+
onSetOption: t($),
|
|
165
|
+
onSelectRange: te
|
|
166
|
+
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
167
|
+
], 2)
|
|
168
|
+
], 2)
|
|
169
|
+
], 2),
|
|
170
|
+
d("div", {
|
|
171
|
+
class: i(t(s).be("panel", "footer"))
|
|
172
|
+
}, [
|
|
173
|
+
d("button", {
|
|
174
|
+
type: "button",
|
|
175
|
+
class: i([t(s).be("panel", "btn"), "cancel"]),
|
|
176
|
+
onClick: n[0] || (n[0] = (o) => Q())
|
|
177
|
+
}, " 取消 ", 2),
|
|
178
|
+
d("button", {
|
|
179
|
+
type: "button",
|
|
180
|
+
class: i([t(s).be("panel", "btn"), "confirm"]),
|
|
181
|
+
disabled: t(ee),
|
|
182
|
+
onClick: n[1] || (n[1] = (o) => W())
|
|
183
|
+
}, " 确认 ", 10, we)
|
|
184
|
+
], 2)
|
|
185
|
+
], 2)) : ge("", !0);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
export {
|
|
189
|
+
Be as default
|
|
190
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as p, ref as s, provide as u, createVNode as m, mergeProps as f } from "vue";
|
|
2
|
+
import d from "dayjs";
|
|
3
|
+
import c from "dayjs/plugin/customParseFormat.js";
|
|
4
|
+
import { DEFAULT_FORMATS_TIME as P } from "./constants.js";
|
|
5
|
+
import _ from "./common/picker.vue2.js";
|
|
6
|
+
import h from "./time-picker-com/panel-time-pick.vue2.js";
|
|
7
|
+
import v from "./time-picker-com/panel-time-range.vue2.js";
|
|
8
|
+
import { timePickerDefaultProps as O } from "./common/props.js";
|
|
9
|
+
d.extend(c);
|
|
10
|
+
const I = /* @__PURE__ */ p({
|
|
11
|
+
name: "ElTimePicker",
|
|
12
|
+
install: null,
|
|
13
|
+
props: {
|
|
14
|
+
...O,
|
|
15
|
+
/**
|
|
16
|
+
* @description whether to pick a time range
|
|
17
|
+
*/
|
|
18
|
+
isRange: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(r, a) {
|
|
25
|
+
const t = s(), [n, l] = r.isRange ? ["timerange", v] : ["time", h], i = (e) => a.emit("update:modelValue", e);
|
|
26
|
+
return u("ElPopperOptions", r.popperOptions), a.expose({
|
|
27
|
+
/**
|
|
28
|
+
* @description focus the Input component
|
|
29
|
+
*/
|
|
30
|
+
focus: (e) => {
|
|
31
|
+
var o;
|
|
32
|
+
(o = t.value) == null || o.handleFocusInput(e);
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* @description blur the Input component
|
|
36
|
+
*/
|
|
37
|
+
blur: (e) => {
|
|
38
|
+
var o;
|
|
39
|
+
(o = t.value) == null || o.handleBlurInput(e);
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* @description open the TimePicker popper
|
|
43
|
+
*/
|
|
44
|
+
handleOpen: () => {
|
|
45
|
+
var e;
|
|
46
|
+
(e = t.value) == null || e.handleOpen();
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* @description close the TimePicker popper
|
|
50
|
+
*/
|
|
51
|
+
handleClose: () => {
|
|
52
|
+
var e;
|
|
53
|
+
(e = t.value) == null || e.handleClose();
|
|
54
|
+
}
|
|
55
|
+
}), () => {
|
|
56
|
+
const e = r.format ?? P;
|
|
57
|
+
return m(_, f(r, {
|
|
58
|
+
ref: t,
|
|
59
|
+
type: n,
|
|
60
|
+
format: e,
|
|
61
|
+
"onUpdate:modelValue": i
|
|
62
|
+
}), {
|
|
63
|
+
default: (o) => m(l, o, null)
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
I as default
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import i from "dayjs";
|
|
2
|
+
import { isArray as o, isEmpty as u } from "@vft/utils";
|
|
3
|
+
import { isDate as c } from "lodash";
|
|
4
|
+
const y = (r, t) => [
|
|
5
|
+
r > 0 ? r - 1 : void 0,
|
|
6
|
+
r,
|
|
7
|
+
r < t ? r + 1 : void 0
|
|
8
|
+
], W = (r) => Array.from(Array.from({ length: r }).keys()), g = (r) => r.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim(), D = (r) => r.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim(), a = function(r, t) {
|
|
9
|
+
const e = c(r), n = c(t);
|
|
10
|
+
return e && n ? r.getTime() === t.getTime() : !e && !n ? r === t : !1;
|
|
11
|
+
}, x = function(r, t) {
|
|
12
|
+
const e = o(r), n = o(t);
|
|
13
|
+
return e && n ? r.length !== t.length ? !1 : r.every((s, f) => a(s, t[f])) : !e && !n ? a(r, t) : !1;
|
|
14
|
+
}, A = function(r, t, e) {
|
|
15
|
+
const n = u(t) || t === "x" ? i(r).locale(e) : i(r, t).locale(e);
|
|
16
|
+
return n.isValid() ? n : void 0;
|
|
17
|
+
}, I = function(r, t, e) {
|
|
18
|
+
return u(t) ? r : t === "x" ? +r : i(r).locale(e).format(t);
|
|
19
|
+
}, T = (r, t) => {
|
|
20
|
+
const e = [], n = t == null ? void 0 : t();
|
|
21
|
+
for (let s = 0; s < r; s++)
|
|
22
|
+
e.push((n == null ? void 0 : n.includes(s)) ?? !1);
|
|
23
|
+
return e;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
y as buildTimeList,
|
|
27
|
+
a as dateEquals,
|
|
28
|
+
g as extractDateFormat,
|
|
29
|
+
D as extractTimeFormat,
|
|
30
|
+
I as formatter,
|
|
31
|
+
T as makeList,
|
|
32
|
+
A as parseDate,
|
|
33
|
+
W as rangeArr,
|
|
34
|
+
x as valueEquals
|
|
35
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "@vft/utils";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { buildProps as t, definePropType as e } from "../../utils/vue/props/runtime.js";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import "../../utils/ns-cover.js";
|
|
6
|
+
import "lodash";
|
|
7
|
+
const a = t({
|
|
8
|
+
format: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "HH:mm"
|
|
11
|
+
},
|
|
12
|
+
modelValue: String,
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
editable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
effect: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "light"
|
|
21
|
+
},
|
|
22
|
+
clearable: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: Object
|
|
28
|
+
},
|
|
29
|
+
placeholder: String,
|
|
30
|
+
start: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "09:00"
|
|
33
|
+
},
|
|
34
|
+
end: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "18:00"
|
|
37
|
+
},
|
|
38
|
+
step: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "00:30"
|
|
41
|
+
},
|
|
42
|
+
minTime: String,
|
|
43
|
+
maxTime: String,
|
|
44
|
+
name: String,
|
|
45
|
+
prefixIcon: {
|
|
46
|
+
type: e([String, Object])
|
|
47
|
+
},
|
|
48
|
+
clearIcon: {
|
|
49
|
+
type: e([String, Object])
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
a as timeSelectProps
|
|
54
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent as v, ref as E, computed as r, openBlock as a, createBlock as i, unref as n, withCtx as p, normalizeClass as S, resolveDynamicComponent as h, createCommentVNode as w, createElementBlock as D, Fragment as H, renderList as N } from "vue";
|
|
2
|
+
import d from "dayjs";
|
|
3
|
+
import O from "dayjs/plugin/customParseFormat.js";
|
|
4
|
+
import b from "../select-v2/index.js";
|
|
5
|
+
import "../form/index.js";
|
|
6
|
+
import { VftIcon as P } from "../icon/index.js";
|
|
7
|
+
import { useNamespace as j } from "../../hooks/use-namespace/index.js";
|
|
8
|
+
import "@popperjs/core";
|
|
9
|
+
import "lodash";
|
|
10
|
+
import "../../hooks/use-z-index/index.js";
|
|
11
|
+
import "@vueuse/core";
|
|
12
|
+
import "@vft/utils";
|
|
13
|
+
import "../../utils/ns-cover.js";
|
|
14
|
+
import { timeSelectProps as L } from "./time-select.js";
|
|
15
|
+
import { parseTime as m, formatTime as s, compareTime as c, nextTime as U } from "./utils.js";
|
|
16
|
+
import { useFormDisabled as q } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
const A = v({
|
|
18
|
+
name: "ElTimeSelect"
|
|
19
|
+
}), ae = /* @__PURE__ */ v({
|
|
20
|
+
...A,
|
|
21
|
+
props: L,
|
|
22
|
+
emits: ["change", "blur", "focus", "update:modelValue"],
|
|
23
|
+
setup(T, { expose: k }) {
|
|
24
|
+
const o = T;
|
|
25
|
+
d.extend(O);
|
|
26
|
+
const { Option: C } = b, V = j("input"), u = E(), y = q(), I = r(() => o.modelValue), g = r(() => {
|
|
27
|
+
const e = m(o.start);
|
|
28
|
+
return e ? s(e) : null;
|
|
29
|
+
}), f = r(() => {
|
|
30
|
+
const e = m(o.end);
|
|
31
|
+
return e ? s(e) : null;
|
|
32
|
+
}), z = r(() => {
|
|
33
|
+
const e = m(o.step);
|
|
34
|
+
return e ? s(e) : null;
|
|
35
|
+
}), B = r(() => {
|
|
36
|
+
const e = m(o.minTime || "");
|
|
37
|
+
return e ? s(e) : null;
|
|
38
|
+
}), F = r(() => {
|
|
39
|
+
const e = m(o.maxTime || "");
|
|
40
|
+
return e ? s(e) : null;
|
|
41
|
+
}), $ = r(() => {
|
|
42
|
+
const e = [];
|
|
43
|
+
if (o.start && o.end && o.step) {
|
|
44
|
+
let t = g.value, l;
|
|
45
|
+
for (; t && f.value && c(t, f.value) <= 0; )
|
|
46
|
+
l = d(t, "HH:mm").format(o.format), e.push({
|
|
47
|
+
value: l,
|
|
48
|
+
disabled: c(t, B.value || "-1:-1") <= 0 || c(t, F.value || "100:100") >= 0
|
|
49
|
+
}), t = U(t, z.value);
|
|
50
|
+
}
|
|
51
|
+
return e;
|
|
52
|
+
});
|
|
53
|
+
return k({
|
|
54
|
+
blur: () => {
|
|
55
|
+
var e, t;
|
|
56
|
+
(t = (e = u.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
57
|
+
},
|
|
58
|
+
focus: () => {
|
|
59
|
+
var e, t;
|
|
60
|
+
(t = (e = u.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
61
|
+
}
|
|
62
|
+
}), (e, t) => (a(), i(n(b), {
|
|
63
|
+
ref_key: "select",
|
|
64
|
+
ref: u,
|
|
65
|
+
"model-value": n(I),
|
|
66
|
+
disabled: n(y),
|
|
67
|
+
clearable: e.clearable,
|
|
68
|
+
"clear-icon": e.clearIcon,
|
|
69
|
+
size: e.size,
|
|
70
|
+
effect: e.effect,
|
|
71
|
+
placeholder: e.placeholder,
|
|
72
|
+
"default-first-option": "",
|
|
73
|
+
filterable: e.editable,
|
|
74
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.$emit("update:modelValue", l)),
|
|
75
|
+
onChange: t[1] || (t[1] = (l) => e.$emit("change", l)),
|
|
76
|
+
onBlur: t[2] || (t[2] = (l) => e.$emit("blur", l)),
|
|
77
|
+
onFocus: t[3] || (t[3] = (l) => e.$emit("focus", l))
|
|
78
|
+
}, {
|
|
79
|
+
prefix: p(() => [
|
|
80
|
+
e.prefixIcon ? (a(), i(n(P), {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: S(n(V).e("prefix-icon"))
|
|
83
|
+
}, {
|
|
84
|
+
default: p(() => [
|
|
85
|
+
(a(), i(h(e.prefixIcon)))
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["class"])) : w("", !0)
|
|
89
|
+
]),
|
|
90
|
+
default: p(() => [
|
|
91
|
+
(a(!0), D(H, null, N(n($), (l) => (a(), i(n(C), {
|
|
92
|
+
key: l.value,
|
|
93
|
+
label: l.value,
|
|
94
|
+
value: l.value,
|
|
95
|
+
disabled: l.disabled
|
|
96
|
+
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable"]));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
ae as default
|
|
104
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const u = (n) => {
|
|
2
|
+
const r = (n || "").split(":");
|
|
3
|
+
if (r.length >= 2) {
|
|
4
|
+
let e = Number.parseInt(r[0], 10);
|
|
5
|
+
const s = Number.parseInt(r[1], 10), t = n.toUpperCase();
|
|
6
|
+
return t.includes("AM") && e === 12 ? e = 0 : t.includes("PM") && e !== 12 && (e += 12), {
|
|
7
|
+
hours: e,
|
|
8
|
+
minutes: s
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}, c = (n, r) => {
|
|
13
|
+
const e = u(n);
|
|
14
|
+
if (!e)
|
|
15
|
+
return -1;
|
|
16
|
+
const s = u(r);
|
|
17
|
+
if (!s)
|
|
18
|
+
return -1;
|
|
19
|
+
const t = e.minutes + e.hours * 60, o = s.minutes + s.hours * 60;
|
|
20
|
+
return t === o ? 0 : t > o ? 1 : -1;
|
|
21
|
+
}, i = (n) => `${n}`.padStart(2, "0"), m = (n) => `${i(n.hours)}:${i(n.minutes)}`, a = (n, r) => {
|
|
22
|
+
const e = u(n);
|
|
23
|
+
if (!e)
|
|
24
|
+
return "";
|
|
25
|
+
const s = u(r);
|
|
26
|
+
if (!s)
|
|
27
|
+
return "";
|
|
28
|
+
const t = {
|
|
29
|
+
hours: e.hours,
|
|
30
|
+
minutes: e.minutes
|
|
31
|
+
};
|
|
32
|
+
return t.minutes += s.minutes, t.hours += s.hours, t.hours += Math.floor(t.minutes / 60), t.minutes = t.minutes % 60, m(t);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
c as compareTime,
|
|
36
|
+
m as formatTime,
|
|
37
|
+
a as nextTime,
|
|
38
|
+
i as padTime,
|
|
39
|
+
u as parseTime
|
|
40
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { withInstall as
|
|
1
|
+
import { withInstall as o } from "../../utils/vue/install.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import t from "./tooltip.vue2.js";
|
|
8
|
+
import { TOOLTIP_INJECTION_KEY as _ } from "./constants.js";
|
|
9
|
+
const s = o(t);
|
|
9
10
|
export {
|
|
11
|
+
_ as TOOLTIP_INJECTION_KEY,
|
|
10
12
|
s as VftTooltip,
|
|
11
13
|
s as default
|
|
12
14
|
};
|