zartui 3.0.6 → 3.0.8
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/es/button/Button.d.ts +3 -0
- package/es/button/Button.mjs +2 -0
- package/es/button/index.d.ts +2 -0
- package/es/calendar/Calendar.d.ts +23 -33
- package/es/calendar/Calendar.mjs +124 -31
- package/es/calendar/CalendarDay.mjs +1 -1
- package/es/calendar/CalendarHeader.d.ts +15 -1
- package/es/calendar/CalendarHeader.mjs +106 -4
- package/es/calendar/CalendarMonth.d.ts +23 -24
- package/es/calendar/CalendarMonth.mjs +49 -8
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +15 -22
- package/es/calendar/types.d.ts +3 -1
- package/es/calendar/utils.d.ts +4 -1
- package/es/calendar/utils.mjs +23 -3
- package/es/cascader/Cascader.mjs +1 -3
- package/es/cascader/index.css +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checker.d.ts +2 -2
- package/es/checkbox/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.mjs +3 -1
- package/es/date-time-picker/DateTimePicker.d.ts +1 -1
- package/es/date-time-picker/DateTimePicker.mjs +9 -3
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/es/date-time-picker/index.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +4 -0
- package/es/dialog/Dialog.mjs +24 -9
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +3 -0
- package/es/dialog/types.d.ts +1 -0
- package/es/divider/index.css +1 -1
- package/es/dropdown-item/DropdownItem.mjs +7 -4
- package/es/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/dropdown-menu/types.d.ts +1 -0
- package/es/empty/Images.mjs +9 -9
- package/es/empty/index.css +1 -1
- package/es/field/Field.d.ts +3 -0
- package/es/field/Field.mjs +2 -1
- package/es/field/index.d.ts +2 -0
- package/es/hierarchy-select/Breadcrumb.d.ts +43 -0
- package/es/hierarchy-select/Breadcrumb.mjs +56 -0
- package/es/hierarchy-select/HierarchySelect.d.ts +104 -0
- package/es/hierarchy-select/HierarchySelect.mjs +221 -0
- package/es/hierarchy-select/index.css +1 -0
- package/es/hierarchy-select/index.d.ts +79 -0
- package/es/hierarchy-select/index.mjs +8 -0
- package/es/hierarchy-select/style/index.d.ts +1 -0
- package/es/hierarchy-select/style/index.mjs +8 -0
- package/es/hierarchy-select/svg/SubIcon.d.ts +1 -0
- package/es/hierarchy-select/svg/SubIcon.mjs +33 -0
- package/es/hierarchy-select/types.d.ts +7 -0
- package/es/hierarchy-select/types.mjs +0 -0
- package/es/icon/config.mjs +4 -1
- package/es/icon/index.css +1 -1
- package/es/image-preview/ImagePreview.mjs +1 -1
- package/es/index-anchor/IndexAnchor.d.ts +11 -0
- package/es/index-anchor/IndexAnchor.mjs +88 -0
- package/es/index-anchor/index.css +1 -0
- package/es/index-anchor/index.d.ts +14 -0
- package/es/index-anchor/index.mjs +10 -0
- package/es/index-anchor/style/index.d.ts +1 -0
- package/es/index-anchor/style/index.mjs +3 -0
- package/es/index-anchor/types.d.ts +11 -0
- package/es/index-anchor/types.mjs +0 -0
- package/es/index-bar/IndexBar.d.ts +64 -0
- package/es/index-bar/IndexBar.mjs +275 -0
- package/es/index-bar/index.css +1 -0
- package/es/index-bar/index.d.ts +50 -0
- package/es/index-bar/index.mjs +10 -0
- package/es/index-bar/style/index.d.ts +1 -0
- package/es/index-bar/style/index.mjs +2 -0
- package/es/index-bar/types.d.ts +16 -0
- package/es/index-bar/types.mjs +0 -0
- package/es/index.d.ts +8 -1
- package/es/index.mjs +22 -1
- package/es/lazyload/vue-lazyload/index.mjs +5 -0
- package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
- package/es/lazyload/vue-lazyload/listener.mjs +45 -0
- package/es/list/List.mjs +2 -4
- package/es/list/index.css +1 -1
- package/es/locale/lang/en-US.d.ts +7 -23
- package/es/locale/lang/en-US.mjs +7 -23
- package/es/locale/lang/zh-CN.d.ts +7 -23
- package/es/locale/lang/zh-CN.mjs +7 -23
- package/es/media-picker/MediaPicker.mjs +20 -0
- package/es/media-picker/image/PickFileIcon.mjs +1 -1
- package/es/media-picker/image/PickPhotoIcon.mjs +1 -1
- package/es/media-picker/image/TakeAudioIcon.mjs +1 -1
- package/es/media-picker/image/TakePhotoIcon.mjs +1 -1
- package/es/media-picker/image/TakeVideoIcon.mjs +1 -1
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/util/media-util.mjs +3 -0
- package/es/media-picker/watermark/image-processor.mjs +10 -6
- package/es/media-picker/watermark/resize-options.mjs +1 -0
- package/es/media-picker/watermark/watermark.mjs +4 -0
- package/es/multiple-picker/MultiplePicker.d.ts +4 -4
- package/es/multiple-picker/MultiplePicker.mjs +3 -3
- package/es/multiple-picker/MultiplePickerOptions.d.ts +4 -4
- package/es/multiple-picker/MultiplePickerOptions.mjs +3 -3
- package/es/multiple-picker/index.d.ts +3 -3
- package/es/notice-bar/index.css +1 -1
- package/es/overlay/index.d.ts +1 -1
- package/es/picker/Picker.mjs +7 -4
- package/es/picker/PickerToolbar.mjs +1 -0
- package/es/popover/Popover.d.ts +13 -0
- package/es/popover/Popover.mjs +99 -4
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +9 -0
- package/es/popup/Popup.mjs +1 -0
- package/es/popup/index.css +1 -1
- package/es/popup/shared.mjs +12 -0
- package/es/radio/Radio.d.ts +1 -1
- package/es/radio/index.d.ts +1 -1
- package/es/rate/index.css +1 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/Search.mjs +1 -0
- package/es/search/index.d.ts +1 -1
- package/es/signature/Signature.mjs +13 -10
- package/es/signature/index.css +1 -1
- package/es/step/Step.mjs +10 -6
- package/es/step/index.css +1 -1
- package/es/stepper/Stepper.mjs +2 -0
- package/es/stepper/index.css +1 -1
- package/es/steps/index.css +1 -1
- package/es/sticky/Sticky.mjs +2 -0
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/swipe/Swipe.d.ts +3 -1
- package/es/swipe/Swipe.mjs +19 -2
- package/es/swipe/index.d.ts +3 -1
- package/es/swipe-cell/SwipeCell.d.ts +44 -0
- package/es/swipe-cell/SwipeCell.mjs +163 -0
- package/es/swipe-cell/index.css +1 -0
- package/es/swipe-cell/index.d.ts +39 -0
- package/es/swipe-cell/index.mjs +10 -0
- package/es/swipe-cell/style/index.d.ts +1 -0
- package/es/swipe-cell/style/index.mjs +2 -0
- package/es/swipe-cell/types.d.ts +9 -0
- package/es/swipe-cell/types.mjs +0 -0
- package/es/switch/index.css +1 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/table/Table.d.ts +118 -0
- package/es/table/Table.mjs +209 -0
- package/es/table/index.css +1 -0
- package/es/table/index.d.ts +77 -0
- package/es/table/index.mjs +10 -0
- package/es/table/style/index.d.ts +1 -0
- package/es/table/style/index.mjs +4 -0
- package/es/table/types.d.ts +5 -0
- package/es/table/types.mjs +8 -0
- package/es/tabs/Tabs.mjs +2 -0
- package/es/tabs/index.css +1 -1
- package/es/tag/Tag.d.ts +21 -1
- package/es/tag/Tag.mjs +63 -10
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +15 -1
- package/es/tag/style/index.mjs +1 -0
- package/es/text-ellipsis/TextEllipsis.d.ts +76 -0
- package/es/text-ellipsis/TextEllipsis.mjs +118 -0
- package/es/text-ellipsis/index.css +1 -0
- package/es/text-ellipsis/index.d.ts +60 -0
- package/es/text-ellipsis/index.mjs +10 -0
- package/es/text-ellipsis/style/index.d.ts +1 -0
- package/es/text-ellipsis/style/index.mjs +2 -0
- package/es/text-ellipsis/types.d.ts +3 -0
- package/es/text-ellipsis/types.mjs +0 -0
- package/es/timeline/Timeline.d.ts +113 -0
- package/es/timeline/Timeline.mjs +162 -0
- package/es/timeline/index.css +1 -0
- package/es/timeline/index.d.ts +75 -0
- package/es/timeline/index.mjs +10 -0
- package/es/timeline/style/index.d.ts +1 -0
- package/es/timeline/style/index.mjs +4 -0
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/UploaderPreviewItem.d.ts +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/es/uploader/utils.mjs +1 -1
- package/es/utils/dom.d.ts +1 -0
- package/es/utils/dom.mjs +11 -0
- package/lib/action-sheet/index.js +4 -0
- package/lib/avatar/Avatar.js +4 -0
- package/lib/avatar/index.js +4 -0
- package/lib/badge/index.js +4 -0
- package/lib/button/Button.d.ts +3 -0
- package/lib/button/Button.js +2 -0
- package/lib/button/index.d.ts +2 -0
- package/lib/button/index.js +4 -0
- package/lib/calendar/Calendar.d.ts +23 -33
- package/lib/calendar/Calendar.js +127 -30
- package/lib/calendar/CalendarDay.js +1 -1
- package/lib/calendar/CalendarHeader.d.ts +15 -1
- package/lib/calendar/CalendarHeader.js +106 -4
- package/lib/calendar/CalendarMonth.d.ts +23 -24
- package/lib/calendar/CalendarMonth.js +52 -7
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +15 -22
- package/lib/calendar/index.js +4 -0
- package/lib/calendar/types.d.ts +3 -1
- package/lib/calendar/utils.d.ts +4 -1
- package/lib/calendar/utils.js +23 -3
- package/lib/cascader/Cascader.js +5 -3
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.js +4 -0
- package/lib/cell/index.js +4 -0
- package/lib/cell-group/index.js +4 -0
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checkbox.js +4 -0
- package/lib/checkbox/Checker.d.ts +2 -2
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +4 -0
- package/lib/checkbox-group/index.js +4 -0
- package/lib/col/index.js +4 -0
- package/lib/collapse/index.js +4 -0
- package/lib/collapse-item/CollapseItem.js +7 -1
- package/lib/collapse-item/index.js +4 -0
- package/lib/config-provider/index.js +4 -0
- package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
- package/lib/date-time-picker/DateTimePicker.js +13 -3
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/lib/date-time-picker/DateTimePickerWrapper.js +4 -0
- package/lib/date-time-picker/index.d.ts +1 -1
- package/lib/date-time-picker/index.js +4 -0
- package/lib/dialog/Dialog.d.ts +4 -0
- package/lib/dialog/Dialog.js +24 -9
- package/lib/dialog/function-call.js +4 -0
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +3 -0
- package/lib/dialog/index.js +4 -0
- package/lib/dialog/types.d.ts +1 -0
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.js +4 -0
- package/lib/dropdown-item/DropdownItem.js +6 -3
- package/lib/dropdown-item/index.js +4 -0
- package/lib/dropdown-menu/DropdownMenu.js +6 -2
- package/lib/dropdown-menu/index.js +4 -0
- package/lib/dropdown-menu/types.d.ts +1 -0
- package/lib/empty/Images.js +9 -9
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.js +4 -0
- package/lib/field/Field.d.ts +3 -0
- package/lib/field/Field.js +2 -1
- package/lib/field/index.d.ts +2 -0
- package/lib/field/index.js +4 -0
- package/lib/form/index.js +4 -0
- package/lib/grid/index.js +4 -0
- package/lib/grid-item/index.js +4 -0
- package/lib/hierarchy-select/Breadcrumb.d.ts +43 -0
- package/lib/hierarchy-select/Breadcrumb.js +85 -0
- package/lib/hierarchy-select/HierarchySelect.d.ts +104 -0
- package/lib/hierarchy-select/HierarchySelect.js +250 -0
- package/lib/hierarchy-select/index.css +1 -0
- package/lib/hierarchy-select/index.d.ts +79 -0
- package/lib/hierarchy-select/index.js +37 -0
- package/lib/hierarchy-select/style/index.d.ts +1 -0
- package/lib/hierarchy-select/style/index.js +8 -0
- package/lib/hierarchy-select/svg/SubIcon.d.ts +1 -0
- package/lib/hierarchy-select/svg/SubIcon.js +52 -0
- package/lib/hierarchy-select/types.d.ts +7 -0
- package/lib/hierarchy-select/types.js +15 -0
- package/lib/icon/config.js +4 -1
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.js +4 -0
- package/lib/image/index.js +4 -0
- package/lib/image-preview/ImagePreview.js +5 -1
- package/lib/image-preview/function-call.js +4 -0
- package/lib/image-preview/index.js +4 -0
- package/lib/index-anchor/IndexAnchor.d.ts +11 -0
- package/lib/index-anchor/IndexAnchor.js +107 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.d.ts +14 -0
- package/lib/index-anchor/index.js +39 -0
- package/lib/index-anchor/style/index.d.ts +1 -0
- package/lib/index-anchor/style/index.js +3 -0
- package/lib/index-anchor/types.d.ts +11 -0
- package/lib/index-anchor/types.js +15 -0
- package/lib/index-bar/IndexBar.d.ts +64 -0
- package/lib/index-bar/IndexBar.js +294 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.d.ts +50 -0
- package/lib/index-bar/index.js +39 -0
- package/lib/index-bar/style/index.d.ts +1 -0
- package/lib/index-bar/style/index.js +2 -0
- package/lib/index-bar/types.d.ts +16 -0
- package/lib/index-bar/types.js +15 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +8 -1
- package/lib/index.js +22 -1
- package/lib/lazyload/vue-lazyload/index.js +9 -0
- package/lib/lazyload/vue-lazyload/lazy.js +85 -0
- package/lib/lazyload/vue-lazyload/listener.js +45 -0
- package/lib/list/List.js +2 -4
- package/lib/list/index.css +1 -1
- package/lib/list/index.js +4 -0
- package/lib/loading/index.js +4 -0
- package/lib/locale/index.js +4 -0
- package/lib/locale/lang/en-US.d.ts +7 -23
- package/lib/locale/lang/en-US.js +7 -23
- package/lib/locale/lang/zh-CN.d.ts +7 -23
- package/lib/locale/lang/zh-CN.js +7 -23
- package/lib/media-picker/MediaPicker.js +24 -0
- package/lib/media-picker/image/PickFileIcon.js +1 -1
- package/lib/media-picker/image/PickPhotoIcon.js +1 -1
- package/lib/media-picker/image/TakeAudioIcon.js +1 -1
- package/lib/media-picker/image/TakePhotoIcon.js +1 -1
- package/lib/media-picker/image/TakeVideoIcon.js +1 -1
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.js +4 -0
- package/lib/media-picker/util/media-util.js +3 -0
- package/lib/media-picker/watermark/image-processor.js +10 -6
- package/lib/media-picker/watermark/resize-options.js +1 -0
- package/lib/media-picker/watermark/watermark.js +4 -0
- package/lib/media-player/MediaPlayer.js +4 -0
- package/lib/media-player/index.js +4 -0
- package/lib/multiple-picker/MultiplePicker.d.ts +4 -4
- package/lib/multiple-picker/MultiplePicker.js +7 -3
- package/lib/multiple-picker/MultiplePickerOptions.d.ts +4 -4
- package/lib/multiple-picker/MultiplePickerOptions.js +3 -3
- package/lib/multiple-picker/index.d.ts +3 -3
- package/lib/multiple-picker/index.js +4 -0
- package/lib/nav-bar/index.js +4 -0
- package/lib/notice-bar/NoticeBar.js +4 -0
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.js +4 -0
- package/lib/notify/function-call.js +4 -0
- package/lib/notify/index.js +4 -0
- package/lib/number-keyboard/NumberKeyboard.js +4 -0
- package/lib/number-keyboard/NumberKeyboardKey.js +4 -0
- package/lib/number-keyboard/index.js +4 -0
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/index.js +4 -0
- package/lib/password-input/index.js +4 -0
- package/lib/picker/Picker.js +10 -3
- package/lib/picker/PickerToolbar.js +1 -0
- package/lib/picker/index.js +4 -0
- package/lib/popover/Popover.d.ts +13 -0
- package/lib/popover/Popover.js +98 -3
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +9 -0
- package/lib/popover/index.js +4 -0
- package/lib/popup/Popup.js +1 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +4 -0
- package/lib/popup/shared.js +12 -0
- package/lib/pull-refresh/index.js +4 -0
- package/lib/radio/Radio.d.ts +1 -1
- package/lib/radio/Radio.js +4 -0
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/index.js +4 -0
- package/lib/radio-group/index.js +4 -0
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.js +4 -0
- package/lib/row/index.js +4 -0
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/Search.js +1 -0
- package/lib/search/index.d.ts +1 -1
- package/lib/search/index.js +4 -0
- package/lib/signature/Signature.js +16 -9
- package/lib/signature/index.css +1 -1
- package/lib/signature/index.js +4 -0
- package/lib/skeleton/index.js +4 -0
- package/lib/step/Step.js +10 -6
- package/lib/step/index.css +1 -1
- package/lib/step/index.js +4 -0
- package/lib/stepper/Stepper.js +6 -0
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.js +4 -0
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.js +4 -0
- package/lib/sticky/Sticky.js +2 -0
- package/lib/sticky/index.js +4 -0
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/swipe/Swipe.d.ts +3 -1
- package/lib/swipe/Swipe.js +19 -2
- package/lib/swipe/index.d.ts +3 -1
- package/lib/swipe/index.js +4 -0
- package/lib/swipe-cell/SwipeCell.d.ts +44 -0
- package/lib/swipe-cell/SwipeCell.js +182 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.d.ts +39 -0
- package/lib/swipe-cell/index.js +39 -0
- package/lib/swipe-cell/style/index.d.ts +1 -0
- package/lib/swipe-cell/style/index.js +2 -0
- package/lib/swipe-cell/types.d.ts +9 -0
- package/lib/swipe-cell/types.js +15 -0
- package/lib/swipe-item/index.js +4 -0
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.js +4 -0
- package/lib/tab/index.js +4 -0
- package/lib/tabbar/index.js +4 -0
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.js +4 -0
- package/lib/table/Table.d.ts +118 -0
- package/lib/table/Table.js +228 -0
- package/lib/table/index.css +1 -0
- package/lib/table/index.d.ts +77 -0
- package/lib/table/index.js +39 -0
- package/lib/table/style/index.d.ts +1 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/types.d.ts +5 -0
- package/lib/table/types.js +27 -0
- package/lib/tabs/Tabs.js +6 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +4 -0
- package/lib/tag/Tag.d.ts +21 -1
- package/lib/tag/Tag.js +73 -10
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +15 -1
- package/lib/tag/index.js +4 -0
- package/lib/tag/style/index.js +1 -0
- package/lib/text-ellipsis/TextEllipsis.d.ts +76 -0
- package/lib/text-ellipsis/TextEllipsis.js +137 -0
- package/lib/text-ellipsis/index.css +1 -0
- package/lib/text-ellipsis/index.d.ts +60 -0
- package/lib/text-ellipsis/index.js +39 -0
- package/lib/text-ellipsis/style/index.d.ts +1 -0
- package/lib/text-ellipsis/style/index.js +2 -0
- package/lib/text-ellipsis/types.d.ts +3 -0
- package/lib/text-ellipsis/types.js +15 -0
- package/lib/time-picker/TimePicker.js +4 -0
- package/lib/time-picker/TimePickerColumn.js +4 -0
- package/lib/time-picker/index.js +4 -0
- package/lib/timeline/Timeline.d.ts +113 -0
- package/lib/timeline/Timeline.js +191 -0
- package/lib/timeline/index.css +1 -0
- package/lib/timeline/index.d.ts +75 -0
- package/lib/timeline/index.js +39 -0
- package/lib/timeline/style/index.d.ts +1 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/toast/function-call.js +4 -0
- package/lib/toast/index.js +4 -0
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/Uploader.js +4 -0
- package/lib/uploader/UploaderPreviewItem.d.ts +1 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/uploader/index.js +4 -0
- package/lib/uploader/utils.js +1 -1
- package/lib/utils/create.js +4 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/dom.js +11 -0
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +3054 -1076
- package/lib/zartui.es.js +3102 -1124
- package/lib/zartui.js +3817 -1303
- package/lib/zartui.min.js +1 -1
- package/package.json +18 -17
|
@@ -7,7 +7,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: NumberConstructor;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
yearPreEnable: BooleanConstructor;
|
|
11
|
+
monthPreEnable: BooleanConstructor;
|
|
12
|
+
yearNextEnable: BooleanConstructor;
|
|
13
|
+
monthNextEnable: BooleanConstructor;
|
|
14
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickSubtitle" | "clickPreIcon" | "clickNextIcon")[], "clickSubtitle" | "clickPreIcon" | "clickNextIcon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
15
|
title: StringConstructor;
|
|
12
16
|
subtitle: StringConstructor;
|
|
13
17
|
showTitle: BooleanConstructor;
|
|
@@ -16,11 +20,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
20
|
type: NumberConstructor;
|
|
17
21
|
default: number;
|
|
18
22
|
};
|
|
23
|
+
yearPreEnable: BooleanConstructor;
|
|
24
|
+
monthPreEnable: BooleanConstructor;
|
|
25
|
+
yearNextEnable: BooleanConstructor;
|
|
26
|
+
monthNextEnable: BooleanConstructor;
|
|
19
27
|
}>> & {
|
|
20
28
|
onClickSubtitle?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
onClickPreIcon?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
onClickNextIcon?: ((...args: any[]) => any) | undefined;
|
|
21
31
|
}, {
|
|
22
32
|
showTitle: boolean;
|
|
23
33
|
showSubtitle: boolean;
|
|
24
34
|
firstDayOfWeek: number;
|
|
35
|
+
yearPreEnable: boolean;
|
|
36
|
+
monthPreEnable: boolean;
|
|
37
|
+
yearNextEnable: boolean;
|
|
38
|
+
monthNextEnable: boolean;
|
|
25
39
|
}>;
|
|
26
40
|
export default _default;
|
|
@@ -32,9 +32,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
32
32
|
subtitle: String,
|
|
33
33
|
showTitle: Boolean,
|
|
34
34
|
showSubtitle: Boolean,
|
|
35
|
-
firstDayOfWeek: (0, import_utils.makeNumberProp)(1)
|
|
35
|
+
firstDayOfWeek: (0, import_utils.makeNumberProp)(1),
|
|
36
|
+
yearPreEnable: Boolean,
|
|
37
|
+
monthPreEnable: Boolean,
|
|
38
|
+
yearNextEnable: Boolean,
|
|
39
|
+
monthNextEnable: Boolean
|
|
36
40
|
},
|
|
37
|
-
emits: ["clickSubtitle"],
|
|
41
|
+
emits: ["clickSubtitle", "clickPreIcon", "clickNextIcon"],
|
|
38
42
|
setup(props, {
|
|
39
43
|
slots,
|
|
40
44
|
emit
|
|
@@ -49,13 +53,111 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
55
|
const onClickSubtitle = (event) => emit("clickSubtitle", event);
|
|
56
|
+
const onClickPreIcon = (isMonth, isYear) => () => {
|
|
57
|
+
if (isMonth && !props.monthPreEnable || isYear && !props.yearPreEnable) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
emit("clickPreIcon", isMonth, isYear);
|
|
61
|
+
};
|
|
62
|
+
const onClickNextIcon = (isMonth, isYear) => () => {
|
|
63
|
+
if (isMonth && !props.monthNextEnable || isYear && !props.yearNextEnable) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
emit("clickNextIcon", isMonth, isYear);
|
|
67
|
+
};
|
|
68
|
+
const fastForwardImg = () => (0, import_vue.createVNode)("svg", {
|
|
69
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
70
|
+
"width": "16px",
|
|
71
|
+
"height": "16px",
|
|
72
|
+
"viewBox": "0 0 16 16",
|
|
73
|
+
"version": "1.1"
|
|
74
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
75
|
+
"stroke": "none",
|
|
76
|
+
"stroke-width": "1",
|
|
77
|
+
"fill": "none",
|
|
78
|
+
"fill-rule": "evenodd"
|
|
79
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
80
|
+
"transform": "translate(-32.000000, -320.000000)",
|
|
81
|
+
"fill": "#0091FA",
|
|
82
|
+
"fill-rule": "nonzero"
|
|
83
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
84
|
+
"transform": "translate(0.000000, 70.000000)"
|
|
85
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
86
|
+
"transform": "translate(0.000000, 236.000000)"
|
|
87
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
88
|
+
"transform": "translate(32.000000, 12.000000)"
|
|
89
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
90
|
+
"transform": "translate(8.000000, 10.000000) scale(-1, 1) translate(-8.000000, -10.000000) translate(0.000000, 2.000000)"
|
|
91
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
92
|
+
"transform": "translate(0.500000, 2.000000)"
|
|
93
|
+
}, [(0, import_vue.createVNode)("path", {
|
|
94
|
+
"d": "M6.79659726,4.25543258 L3.35183004,7.88886609 C3.14952477,8.10225141 2.77635057,8.13960837 2.51832213,7.9723052 C2.48075622,7.94794782 2.4468797,7.91993249 2.41742642,7.88886609 L-1.02734079,4.25543258 C-1.22964607,4.04204726 -1.18447352,3.73343826 -0.926445085,3.56613509 C-0.821927664,3.49836699 -0.69295109,3.46153846 -0.560138985,3.46153846 L6.32939545,3.46153846 C6.65727667,3.46153846 6.92307692,3.68135095 6.92307692,3.95250339 C6.92307692,4.06233684 6.87854337,4.16899837 6.79659726,4.25543258 Z",
|
|
95
|
+
"opacity": "0.3",
|
|
96
|
+
"transform": "translate(2.884615, 5.769231) rotate(-90.000000) translate(-2.884615, -5.769231) "
|
|
97
|
+
}, null), (0, import_vue.createVNode)("path", {
|
|
98
|
+
"d": "M12.5116225,3.49853348 L7.59052644,8.94868375 C7.3015189,9.26876173 6.7684129,9.32479717 6.39980085,9.07384242 C6.34613526,9.03730635 6.29774023,8.99528335 6.25566412,8.94868375 L1.3345681,3.49853348 C1.04556056,3.1784555 1.11009277,2.715542 1.47870482,2.46458724 C1.62801542,2.3629351 1.81226767,2.30769231 2.00199925,2.30769231 L11.8441913,2.30769231 C12.3125931,2.30769231 12.6923077,2.63741103 12.6923077,3.0441397 C12.6923077,3.20888987 12.6286883,3.36888217 12.5116225,3.49853348 Z",
|
|
99
|
+
"opacity": "0.8",
|
|
100
|
+
"transform": "translate(6.923077, 5.769231) rotate(-90.000000) translate(-6.923077, -5.769231) "
|
|
101
|
+
}, null), (0, import_vue.createVNode)("path", {
|
|
102
|
+
"d": "M17.1270071,3.49853348 L12.2059111,8.94868375 C11.9169035,9.26876173 11.3837975,9.32479717 11.0151855,9.07384242 C10.9615199,9.03730635 10.9131248,8.99528335 10.8710487,8.94868375 L5.94995271,3.49853348 C5.66094518,3.1784555 5.72547739,2.715542 6.09408944,2.46458724 C6.24340004,2.3629351 6.42765229,2.30769231 6.61738387,2.30769231 L16.4595759,2.30769231 C16.9279777,2.30769231 17.3076923,2.63741103 17.3076923,3.0441397 C17.3076923,3.20888987 17.2440729,3.36888217 17.1270071,3.49853348 Z",
|
|
103
|
+
"opacity": "0.8",
|
|
104
|
+
"transform": "translate(11.538462, 5.769231) rotate(-90.000000) translate(-11.538462, -5.769231) "
|
|
105
|
+
}, null)])])])])])])])]);
|
|
106
|
+
const slowForward = () => (0, import_vue.createVNode)("svg", {
|
|
107
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
108
|
+
"width": "16px",
|
|
109
|
+
"height": "16px",
|
|
110
|
+
"viewBox": "0 0 16 16",
|
|
111
|
+
"version": "1.1"
|
|
112
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
113
|
+
"stroke": "none",
|
|
114
|
+
"stroke-width": "1",
|
|
115
|
+
"fill": "none",
|
|
116
|
+
"fill-rule": "evenodd"
|
|
117
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
118
|
+
"transform": "translate(-80.000000, -320.000000)",
|
|
119
|
+
"fill": "#0091FA",
|
|
120
|
+
"fill-rule": "nonzero"
|
|
121
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
122
|
+
"transform": "translate(0.000000, 70.000000)"
|
|
123
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
124
|
+
"transform": "translate(0.000000, 236.000000)"
|
|
125
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
126
|
+
"transform": "translate(32.000000, 12.000000)"
|
|
127
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
128
|
+
"transform": "translate(56.000000, 10.000000) scale(-1, 1) translate(-56.000000, -10.000000) translate(48.000000, 2.000000)"
|
|
129
|
+
}, [(0, import_vue.createVNode)("g", {
|
|
130
|
+
"transform": "translate(3.000000, 2.000000)"
|
|
131
|
+
}, [(0, import_vue.createVNode)("path", {
|
|
132
|
+
"d": "M7.06846115,4.42564988 L3.48590324,8.20442073 C3.27550576,8.42634147 2.88740459,8.46519271 2.61905502,8.29119741 C2.57998647,8.26586573 2.54475489,8.23672979 2.51412348,8.20442073 L-1.06843443,4.42564988 C-1.27883191,4.20372915 -1.23185246,3.88277579 -0.963502888,3.70878049 C-0.854804771,3.63830167 -0.720669133,3.6 -0.582544544,3.6 L6.58257127,3.6 C6.92356774,3.6 7.2,3.82860498 7.2,4.11060352 C7.2,4.22483031 7.1536851,4.3357583 7.06846115,4.42564988 Z",
|
|
133
|
+
"opacity": "0.3",
|
|
134
|
+
"transform": "translate(3.000000, 6.000000) rotate(-90.000000) translate(-3.000000, -6.000000) "
|
|
135
|
+
}, null), (0, import_vue.createVNode)("path", {
|
|
136
|
+
"d": "M13.0120874,3.63847482 L7.89414749,9.3066311 C7.59357966,9.6395122 7.03914942,9.69778906 6.65579288,9.43679611 C6.59998067,9.3987986 6.54964984,9.35509469 6.50589069,9.3066311 L1.38795082,3.63847482 C1.08738299,3.30559372 1.15449649,2.82416368 1.53785302,2.56317073 C1.69313604,2.4574525 1.88475838,2.4 2.08207922,2.4 L12.317959,2.4 C12.8050968,2.4 13.2,2.74290748 13.2,3.16590528 C13.2,3.33724547 13.1338359,3.50363746 13.0120874,3.63847482 Z",
|
|
137
|
+
"opacity": "0.8",
|
|
138
|
+
"transform": "translate(7.200000, 6.000000) rotate(-90.000000) translate(-7.200000, -6.000000) "
|
|
139
|
+
}, null)])])])])])])])]);
|
|
52
140
|
const renderSubtitle = () => {
|
|
53
141
|
if (props.showSubtitle) {
|
|
54
142
|
const title = slots.subtitle ? slots.subtitle() : props.subtitle;
|
|
55
143
|
return (0, import_vue.createVNode)("div", {
|
|
56
|
-
"class": (0, import_utils2.bem)("header-subtitle")
|
|
144
|
+
"class": (0, import_utils2.bem)("header-subtitle")
|
|
145
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
146
|
+
"class": (0, import_utils2.bem)("header-subtitle", ["opt", props.yearPreEnable ? "enable" : "unenable"]),
|
|
147
|
+
"onClick": onClickPreIcon(false, true)
|
|
148
|
+
}, [fastForwardImg()]), (0, import_vue.createVNode)("div", {
|
|
149
|
+
"class": (0, import_utils2.bem)("header-subtitle", ["opt", props.monthPreEnable ? "enable" : "unenable"]),
|
|
150
|
+
"onClick": onClickPreIcon(true, false)
|
|
151
|
+
}, [slowForward()]), (0, import_vue.createVNode)("label", {
|
|
152
|
+
"class": (0, import_utils2.bem)("header-subtitle-text"),
|
|
57
153
|
"onClick": onClickSubtitle
|
|
58
|
-
}, [title])
|
|
154
|
+
}, [title]), (0, import_vue.createVNode)("div", {
|
|
155
|
+
"class": (0, import_utils2.bem)("header-subtitle", ["opt", "right", [props.monthNextEnable ? "enable" : "unenable"]]),
|
|
156
|
+
"onClick": onClickNextIcon(true, false)
|
|
157
|
+
}, [slowForward()]), (0, import_vue.createVNode)("div", {
|
|
158
|
+
"class": (0, import_utils2.bem)("header-subtitle", ["opt", "right", [props.yearNextEnable ? "enable" : "unenable"]]),
|
|
159
|
+
"onClick": onClickNextIcon(false, true)
|
|
160
|
+
}, [fastForwardImg()])]);
|
|
59
161
|
}
|
|
60
162
|
};
|
|
61
163
|
const renderWeekDays = () => {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { CalendarType, CalendarDayItem } from './types';
|
|
3
|
+
import { CalendarShowType } from './types';
|
|
3
4
|
declare const calendarMonthProps: {
|
|
4
5
|
date: {
|
|
5
6
|
type: DateConstructor;
|
|
6
7
|
required: true;
|
|
7
8
|
};
|
|
9
|
+
showType: {
|
|
10
|
+
type: PropType<CalendarShowType>;
|
|
11
|
+
default: CalendarShowType;
|
|
12
|
+
};
|
|
8
13
|
type: PropType<CalendarType>;
|
|
9
14
|
color: StringConstructor;
|
|
10
|
-
minDate:
|
|
11
|
-
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
maxDate: {
|
|
15
|
-
type: DateConstructor;
|
|
16
|
-
required: true;
|
|
17
|
-
};
|
|
15
|
+
minDate: DateConstructor;
|
|
16
|
+
maxDate: DateConstructor;
|
|
18
17
|
showMark: BooleanConstructor;
|
|
19
18
|
rowHeight: (NumberConstructor | StringConstructor)[];
|
|
20
19
|
formatter: PropType<(item: CalendarDayItem) => CalendarDayItem>;
|
|
@@ -24,6 +23,7 @@ declare const calendarMonthProps: {
|
|
|
24
23
|
showSubtitle: BooleanConstructor;
|
|
25
24
|
showMonthTitle: BooleanConstructor;
|
|
26
25
|
firstDayOfWeek: NumberConstructor;
|
|
26
|
+
disabledDate: PropType<(date: Date) => boolean>;
|
|
27
27
|
};
|
|
28
28
|
export declare type CalendarMonthProps = ExtractPropTypes<typeof calendarMonthProps>;
|
|
29
29
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -31,16 +31,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
type: DateConstructor;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
|
+
showType: {
|
|
35
|
+
type: PropType<CalendarShowType>;
|
|
36
|
+
default: CalendarShowType;
|
|
37
|
+
};
|
|
34
38
|
type: PropType<CalendarType>;
|
|
35
39
|
color: StringConstructor;
|
|
36
|
-
minDate:
|
|
37
|
-
|
|
38
|
-
required: true;
|
|
39
|
-
};
|
|
40
|
-
maxDate: {
|
|
41
|
-
type: DateConstructor;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
40
|
+
minDate: DateConstructor;
|
|
41
|
+
maxDate: DateConstructor;
|
|
44
42
|
showMark: BooleanConstructor;
|
|
45
43
|
rowHeight: (NumberConstructor | StringConstructor)[];
|
|
46
44
|
formatter: PropType<(item: CalendarDayItem) => CalendarDayItem>;
|
|
@@ -50,21 +48,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
48
|
showSubtitle: BooleanConstructor;
|
|
51
49
|
showMonthTitle: BooleanConstructor;
|
|
52
50
|
firstDayOfWeek: NumberConstructor;
|
|
51
|
+
disabledDate: PropType<(date: Date) => boolean>;
|
|
53
52
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
54
53
|
date: {
|
|
55
54
|
type: DateConstructor;
|
|
56
55
|
required: true;
|
|
57
56
|
};
|
|
57
|
+
showType: {
|
|
58
|
+
type: PropType<CalendarShowType>;
|
|
59
|
+
default: CalendarShowType;
|
|
60
|
+
};
|
|
58
61
|
type: PropType<CalendarType>;
|
|
59
62
|
color: StringConstructor;
|
|
60
|
-
minDate:
|
|
61
|
-
|
|
62
|
-
required: true;
|
|
63
|
-
};
|
|
64
|
-
maxDate: {
|
|
65
|
-
type: DateConstructor;
|
|
66
|
-
required: true;
|
|
67
|
-
};
|
|
63
|
+
minDate: DateConstructor;
|
|
64
|
+
maxDate: DateConstructor;
|
|
68
65
|
showMark: BooleanConstructor;
|
|
69
66
|
rowHeight: (NumberConstructor | StringConstructor)[];
|
|
70
67
|
formatter: PropType<(item: CalendarDayItem) => CalendarDayItem>;
|
|
@@ -74,10 +71,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
71
|
showSubtitle: BooleanConstructor;
|
|
75
72
|
showMonthTitle: BooleanConstructor;
|
|
76
73
|
firstDayOfWeek: NumberConstructor;
|
|
74
|
+
disabledDate: PropType<(date: Date) => boolean>;
|
|
77
75
|
}>> & {
|
|
78
76
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
79
77
|
}, {
|
|
80
78
|
lazyRender: boolean;
|
|
79
|
+
showType: CalendarShowType;
|
|
81
80
|
showMark: boolean;
|
|
82
81
|
allowSameDay: boolean;
|
|
83
82
|
showSubtitle: boolean;
|
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -37,10 +41,11 @@ var import_CalendarDay = __toESM(require("./CalendarDay"));
|
|
|
37
41
|
const [name] = (0, import_utils.createNamespace)("calendar-month");
|
|
38
42
|
const calendarMonthProps = {
|
|
39
43
|
date: (0, import_utils.makeRequiredProp)(Date),
|
|
44
|
+
showType: (0, import_utils.makeStringProp)("inline"),
|
|
40
45
|
type: String,
|
|
41
46
|
color: String,
|
|
42
|
-
minDate:
|
|
43
|
-
maxDate:
|
|
47
|
+
minDate: Date,
|
|
48
|
+
maxDate: Date,
|
|
44
49
|
showMark: Boolean,
|
|
45
50
|
rowHeight: import_utils.numericProp,
|
|
46
51
|
formatter: Function,
|
|
@@ -49,7 +54,8 @@ const calendarMonthProps = {
|
|
|
49
54
|
allowSameDay: Boolean,
|
|
50
55
|
showSubtitle: Boolean,
|
|
51
56
|
showMonthTitle: Boolean,
|
|
52
|
-
firstDayOfWeek: Number
|
|
57
|
+
firstDayOfWeek: Number,
|
|
58
|
+
disabledDate: Function
|
|
53
59
|
};
|
|
54
60
|
var stdin_default = (0, import_vue2.defineComponent)({
|
|
55
61
|
name,
|
|
@@ -76,6 +82,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
76
82
|
const totalDay = (0, import_vue2.computed)(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
|
|
77
83
|
const shouldRender = (0, import_vue2.computed)(() => visible.value || !props.lazyRender);
|
|
78
84
|
const getTitle = () => title.value;
|
|
85
|
+
const getDate = () => props.date;
|
|
79
86
|
const getMultipleDayType = (day) => {
|
|
80
87
|
const isSelected = (date) => props.currentDate.some((item) => (0, import_utils2.compareDay)(item, date) === 0);
|
|
81
88
|
if (isSelected(day)) {
|
|
@@ -120,18 +127,22 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
120
127
|
}
|
|
121
128
|
return "";
|
|
122
129
|
};
|
|
123
|
-
const getDayType = (day) => {
|
|
130
|
+
const getDayType = (day, defaultType) => {
|
|
124
131
|
const {
|
|
125
132
|
type,
|
|
126
133
|
minDate,
|
|
127
134
|
maxDate,
|
|
128
|
-
currentDate
|
|
135
|
+
currentDate,
|
|
136
|
+
disabledDate
|
|
129
137
|
} = props;
|
|
130
|
-
if ((0, import_utils2.compareDay)(day, minDate) < 0 || (0, import_utils2.compareDay)(day, maxDate) > 0) {
|
|
138
|
+
if (minDate && (0, import_utils2.compareDay)(day, minDate) < 0 || maxDate && (0, import_utils2.compareDay)(day, maxDate) > 0 || disabledDate && disabledDate(day)) {
|
|
131
139
|
return "disabled";
|
|
132
140
|
}
|
|
133
141
|
if (currentDate === null) {
|
|
134
|
-
return "";
|
|
142
|
+
return defaultType || "";
|
|
143
|
+
}
|
|
144
|
+
if (defaultType) {
|
|
145
|
+
return defaultType;
|
|
135
146
|
}
|
|
136
147
|
if (Array.isArray(currentDate)) {
|
|
137
148
|
if (type === "multiple") {
|
|
@@ -172,6 +183,22 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
172
183
|
const days2 = [];
|
|
173
184
|
const year = props.date.getFullYear();
|
|
174
185
|
const month = props.date.getMonth();
|
|
186
|
+
if (props.showType && props.showType === "inline") {
|
|
187
|
+
for (let day = offset.value - 1; day >= 0; day--) {
|
|
188
|
+
const date = new Date(year, month, -day);
|
|
189
|
+
const type = getDayType(date, "preview");
|
|
190
|
+
let config = {
|
|
191
|
+
date,
|
|
192
|
+
type,
|
|
193
|
+
text: date.getDate(),
|
|
194
|
+
bottomInfo: getBottomInfo(type)
|
|
195
|
+
};
|
|
196
|
+
if (props.formatter) {
|
|
197
|
+
config = props.formatter(config);
|
|
198
|
+
}
|
|
199
|
+
days2.push(config);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
175
202
|
for (let day = 1; day <= totalDay.value; day++) {
|
|
176
203
|
const date = new Date(year, month, day);
|
|
177
204
|
const type = getDayType(date);
|
|
@@ -186,6 +213,23 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
186
213
|
}
|
|
187
214
|
days2.push(config);
|
|
188
215
|
}
|
|
216
|
+
if (props.showType && props.showType === "inline" && days2 && days2.length < 42) {
|
|
217
|
+
const nextMonthsLength = days2.length;
|
|
218
|
+
for (let day = 1; day <= 42 - nextMonthsLength; day++) {
|
|
219
|
+
const date = new Date(year, month + 1, day);
|
|
220
|
+
const type = getDayType(date, "preview");
|
|
221
|
+
let config = {
|
|
222
|
+
date,
|
|
223
|
+
type,
|
|
224
|
+
text: date.getDate(),
|
|
225
|
+
bottomInfo: getBottomInfo(type)
|
|
226
|
+
};
|
|
227
|
+
if (props.formatter) {
|
|
228
|
+
config = props.formatter(config);
|
|
229
|
+
}
|
|
230
|
+
days2.push(config);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
189
233
|
return days2;
|
|
190
234
|
});
|
|
191
235
|
const disabledDays = (0, import_vue2.computed)(() => days.value.filter((day) => day.type === "disabled"));
|
|
@@ -213,6 +257,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
213
257
|
}, [(shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
|
214
258
|
(0, import_use_expose.useExpose)({
|
|
215
259
|
getTitle,
|
|
260
|
+
getDate,
|
|
216
261
|
getHeight: () => height.value,
|
|
217
262
|
setVisible,
|
|
218
263
|
scrollToDate,
|
package/lib/calendar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-calendar-background: var(--zt-background-2);--zt-calendar-popup-height: 80%;--zt-calendar-body-box-shadow: inset 0 4px 8px 0 var(--zt-gray-a1);--zt-calendar-header-title-height: 44px;--zt-calendar-header-title-font-size: var(--zt-font-size-md);--zt-calendar-header-subtitle-font-size: var(--zt-font-size-md);--zt-calendar-weekdays-height: 30px;--zt-calendar-weekdays-font-size: var(--zt-font-size-sm);--zt-calendar-weekdays-font-color: var(----zt-gray-default);--zt-calendar-weekdays-background: var(--zt-calendar-background);--zt-calendar-month-title-font-size: var(--zt-font-size-md);--zt-calendar-month-mark-color: rgba(242, 243, 245, .8);--zt-calendar-month-mark-font-size: 160px;--zt-calendar-day-height: 14.285vw;--zt-calendar-day-height-half: 7.143vw;--zt-calendar-day-font-size: var(--zt-font-size-lg);--zt-calendar-day-margin-bottom: 4px;--zt-calendar-range-edge-color: var(--zt-white);--zt-calendar-range-edge-background: var(--zt-primary-color);--zt-calendar-range-middle-color: var(--zt-primary-color);--zt-calendar-range-middle-background-opacity: .1;--zt-calendar-selected-day-size: var(--zt-calendar-day-height);--zt-calendar-selected-day-color: var(--zt-white);--zt-calendar-info-font-size: var(--zt-font-size-xs);--zt-calendar-info-line-height: var(--zt-line-height-xs);--zt-calendar-selected-day-background: var(--zt-primary-color);--zt-calendar-day-disabled-color: var(--zt-
|
|
1
|
+
:root{--zt-calendar-background: var(--zt-background-2);--zt-calendar-popup-height: 80%;--zt-calendar-body-box-shadow: inset 0 4px 8px 0 var(--zt-gray-a1);--zt-calendar-header-title-height: 44px;--zt-calendar-header-title-font-size: var(--zt-font-size-md);--zt-calendar-header-subtitle-font-size: var(--zt-font-size-md);--zt-calendar-weekdays-height: 30px;--zt-calendar-weekdays-font-size: var(--zt-font-size-sm);--zt-calendar-weekdays-font-color: var(----zt-gray-default);--zt-calendar-weekdays-background: var(--zt-calendar-background);--zt-calendar-month-title-font-size: var(--zt-font-size-md);--zt-calendar-month-mark-color: rgba(242, 243, 245, .8);--zt-calendar-month-mark-font-size: 160px;--zt-calendar-day-height: 14.285vw;--zt-calendar-day-height-half: 7.143vw;--zt-calendar-day-font-size: var(--zt-font-size-lg);--zt-calendar-day-margin-bottom: 4px;--zt-calendar-range-edge-color: var(--zt-white);--zt-calendar-range-edge-background: var(--zt-primary-color);--zt-calendar-range-middle-color: var(--zt-primary-color);--zt-calendar-range-middle-background-opacity: .1;--zt-calendar-selected-day-size: var(--zt-calendar-day-height);--zt-calendar-selected-day-color: var(--zt-white);--zt-calendar-info-font-size: var(--zt-font-size-xs);--zt-calendar-info-line-height: var(--zt-line-height-xs);--zt-calendar-selected-day-background: var(--zt-primary-color);--zt-calendar-day-disabled-color: var(--zt-gray-a2);--zt-calendar-confirm-button-height: 36px;--zt-calendar-confirm-button-margin: 7px 0;--zt-calendar-header-title-color: var(--zt-gray-a4)}.zt-calendar{display:flex;flex-direction:column;height:100%;background:var(--zt-calendar-background);color:var(--zt-text-color)}.zt-calendar__popup.zt-popup--top,.zt-calendar__popup.zt-popup--bottom{height:var(--zt-calendar-popup-height)}.zt-calendar__popup.zt-popup--left,.zt-calendar__popup.zt-popup--right{height:100%}.zt-calendar__header{flex-shrink:0}.zt-calendar__month-title,.zt-calendar__header-title,.zt-calendar__header-subtitle{display:flex;padding:0 16px;color:var(--zt-text-color);height:var(--zt-calendar-header-title-height);line-height:var(--zt-calendar-header-title-height);text-align:center;align-items:center;justify-content:center}.zt-calendar__month-title--opt,.zt-calendar__header-title--opt,.zt-calendar__header-subtitle--opt{width:32px;height:32px;line-height:32px;border-radius:50%;padding:0;margin:0 8px}.zt-calendar__month-title--right,.zt-calendar__header-title--right,.zt-calendar__header-subtitle--right{transform:rotate(180deg)}.zt-calendar__month-title--unenable,.zt-calendar__header-title--unenable,.zt-calendar__header-subtitle--unenable{opacity:.2}.zt-calendar__month-title--enable,.zt-calendar__header-title--enable,.zt-calendar__header-subtitle--enable{opacity:1}.zt-calendar__month-title--enable:active,.zt-calendar__header-title--enable:active,.zt-calendar__header-subtitle--enable:active{border-radius:50%;background-color:var(--zt-gray-a1);opacity:.6}.zt-calendar__month-title-text,.zt-calendar__header-title-text,.zt-calendar__header-subtitle-text{flex-grow:1}.zt-calendar__header-title{font-size:var(--zt-calendar-header-title-font-size);color:var(--zt-calendar-header-title-color);position:relative;display:flex;justify-content:center;align-items:center}.zt-calendar__header-title:after{top:var(--zt-calendar-header-title-height);content:"";position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-calendar__header-subtitle{font-size:var(--zt-calendar-header-subtitle-font-size)}.zt-calendar__month-title{font-size:var(--zt-calendar-month-title-font-size)}.zt-calendar__weekdays{display:flex;background-color:rgba(0,0,0,.02)}.zt-calendar__weekday{flex:1;font-size:var(--zt-calendar-weekdays-font-size);line-height:var(--zt-calendar-weekdays-height);font-weight:var(--zt-font-bold);text-align:center;background:var(--zt-calendar-weekdays-background);color:var(--zt-calendar-weekdays-font-color)}.zt-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;background-color:var(--zt-calendar-background);box-shadow:var(--zt-calendar-body-box-shadow)}.zt-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.zt-calendar__day,.zt-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.zt-calendar__day{position:relative;width:14.285%;height:var(--zt-calendar-day-height);margin-bottom:var(--zt-calendar-day-margin-bottom);font-size:var(--zt-calendar-day-font-size);cursor:pointer;outline:none}.zt-calendar__day--end,.zt-calendar__day--start,.zt-calendar__day--start-end,.zt-calendar__day--multiple-middle,.zt-calendar__day--multiple-selected{color:var(--zt-calendar-range-edge-color);background:var(--zt-calendar-range-edge-background);box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__day--start{border-radius:var(--zt-calendar-day-height-half) 0 0 var(--zt-calendar-day-height-half);border-right:none}.zt-calendar__day--end{border-radius:0 var(--zt-calendar-day-height-half) var(--zt-calendar-day-height-half) 0;border-left:none}.zt-calendar__day--start-end,.zt-calendar__day--multiple-selected{border-radius:var(--zt-calendar-day-height-half)}.zt-calendar__day--middle{color:var(--zt-calendar-range-middle-color)}.zt-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--zt-calendar-range-middle-background-opacity);content:""}.zt-calendar__day--disabled,.zt-calendar__day--preview{color:var(--zt-calendar-day-disabled-color);cursor:default}.zt-calendar__selected-day{font-weight:var(--zt-font-bold);width:var(--zt-calendar-selected-day-size);height:var(--zt-calendar-selected-day-size);color:var(--zt-calendar-selected-day-color);background:var(--zt-calendar-selected-day-background);border-radius:calc(var(--zt-calendar-selected-day-size) / 2);box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__footer{flex-shrink:0;display:flex;padding:8px 16px;border-top:1px solid rgba(45,75,115,.1)}.zt-calendar__footer--unfit{padding-bottom:0}.zt-theme-dark{--zt-calendar-header-title-color: var(--zt-gray-a6);--zt-calendar-range-middle-color: none;--zt-calendar-weekdays-font-color: rgba(255, 255, 255, .8);--zt-calendar-weekdays-background: rgba(255, 255, 255, .04);--zt-calendar-month-mark-color: rgba(100, 101, 102, .2);--zt-calendar-day-disabled-color: rgba(255, 255, 255, .3)}
|
package/lib/calendar/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const Calendar: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
2
|
show: BooleanConstructor;
|
|
3
|
+
showType: {
|
|
4
|
+
type: import("vue").PropType<import("./types").CalendarShowType>;
|
|
5
|
+
default: import("./types").CalendarShowType;
|
|
6
|
+
};
|
|
3
7
|
type: {
|
|
4
8
|
type: import("vue").PropType<import("./types").CalendarType>;
|
|
5
9
|
default: import("./types").CalendarType;
|
|
@@ -71,23 +75,20 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
71
75
|
type: BooleanConstructor;
|
|
72
76
|
default: true;
|
|
73
77
|
};
|
|
74
|
-
minDate:
|
|
75
|
-
|
|
76
|
-
validator: (val: unknown) => val is Date;
|
|
77
|
-
default: () => Date;
|
|
78
|
-
};
|
|
79
|
-
maxDate: {
|
|
80
|
-
type: DateConstructor;
|
|
81
|
-
validator: (val: unknown) => val is Date;
|
|
82
|
-
default: () => Date;
|
|
83
|
-
};
|
|
78
|
+
minDate: DateConstructor;
|
|
79
|
+
maxDate: DateConstructor;
|
|
84
80
|
firstDayOfWeek: {
|
|
85
81
|
type: (NumberConstructor | StringConstructor)[];
|
|
86
82
|
default: number;
|
|
87
83
|
validator: (val: number) => boolean;
|
|
88
84
|
};
|
|
85
|
+
disabledDate: import("vue").PropType<(date: Date) => boolean>;
|
|
89
86
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show" | "cancel" | "clickSubtitle" | "confirm" | "unselect" | "monthShow" | "overRange")[], "select" | "update:show" | "cancel" | "clickSubtitle" | "confirm" | "unselect" | "monthShow" | "overRange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
87
|
show: BooleanConstructor;
|
|
88
|
+
showType: {
|
|
89
|
+
type: import("vue").PropType<import("./types").CalendarShowType>;
|
|
90
|
+
default: import("./types").CalendarShowType;
|
|
91
|
+
};
|
|
91
92
|
type: {
|
|
92
93
|
type: import("vue").PropType<import("./types").CalendarType>;
|
|
93
94
|
default: import("./types").CalendarType;
|
|
@@ -159,21 +160,14 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
159
160
|
type: BooleanConstructor;
|
|
160
161
|
default: true;
|
|
161
162
|
};
|
|
162
|
-
minDate:
|
|
163
|
-
|
|
164
|
-
validator: (val: unknown) => val is Date;
|
|
165
|
-
default: () => Date;
|
|
166
|
-
};
|
|
167
|
-
maxDate: {
|
|
168
|
-
type: DateConstructor;
|
|
169
|
-
validator: (val: unknown) => val is Date;
|
|
170
|
-
default: () => Date;
|
|
171
|
-
};
|
|
163
|
+
minDate: DateConstructor;
|
|
164
|
+
maxDate: DateConstructor;
|
|
172
165
|
firstDayOfWeek: {
|
|
173
166
|
type: (NumberConstructor | StringConstructor)[];
|
|
174
167
|
default: number;
|
|
175
168
|
validator: (val: number) => boolean;
|
|
176
169
|
};
|
|
170
|
+
disabledDate: import("vue").PropType<(date: Date) => boolean>;
|
|
177
171
|
}>> & {
|
|
178
172
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
179
173
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
@@ -195,6 +189,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
195
189
|
safeAreaInsetTop: boolean;
|
|
196
190
|
safeAreaInsetBottom: boolean;
|
|
197
191
|
popup: boolean;
|
|
192
|
+
showType: import("./types").CalendarShowType;
|
|
198
193
|
maxRange: string | number;
|
|
199
194
|
showMark: boolean;
|
|
200
195
|
showTitle: boolean;
|
|
@@ -202,8 +197,6 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
202
197
|
allowSameDay: boolean;
|
|
203
198
|
showSubtitle: boolean;
|
|
204
199
|
showRangePrompt: boolean;
|
|
205
|
-
minDate: Date;
|
|
206
|
-
maxDate: Date;
|
|
207
200
|
firstDayOfWeek: string | number;
|
|
208
201
|
}>>;
|
|
209
202
|
export default Calendar;
|
package/lib/calendar/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/lib/calendar/types.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { ComponentPublicInstance, ComputedRef, Ref } from 'vue';
|
|
|
2
2
|
import type { Numeric } from '../utils';
|
|
3
3
|
import type { CalendarProps } from './Calendar';
|
|
4
4
|
import type { CalendarMonthProps } from './CalendarMonth';
|
|
5
|
+
export declare type CalendarShowType = 'inline' | 'scroll';
|
|
5
6
|
export declare type CalendarType = 'single' | 'range' | 'multiple';
|
|
6
|
-
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder';
|
|
7
|
+
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder' | 'preview';
|
|
7
8
|
export declare type CalendarDayItem = {
|
|
8
9
|
date?: Date;
|
|
9
10
|
text?: Numeric;
|
|
@@ -21,6 +22,7 @@ export declare type CalendarInstance = ComponentPublicInstance<CalendarProps, Ca
|
|
|
21
22
|
export declare type CalendarMonthInstance = ComponentPublicInstance<CalendarMonthProps, {
|
|
22
23
|
showed?: boolean;
|
|
23
24
|
getTitle: () => string;
|
|
25
|
+
getDate: () => Date;
|
|
24
26
|
getHeight: () => number;
|
|
25
27
|
setVisible: (value?: boolean | undefined) => void;
|
|
26
28
|
scrollToDate: (body: Element, targetDate: Date) => void;
|
package/lib/calendar/utils.d.ts
CHANGED
|
@@ -5,8 +5,11 @@ export declare function compareMonth(date1: Date, date2: Date): 0 | 1 | -1;
|
|
|
5
5
|
export declare function compareDay(day1: Date, day2: Date): 0 | 1 | -1;
|
|
6
6
|
export declare const cloneDate: (date: Date) => Date;
|
|
7
7
|
export declare const cloneDates: (dates: Date | Date[]) => Date | Date[];
|
|
8
|
-
export declare function getDayByOffset(date: Date, offset: number): Date;
|
|
8
|
+
export declare function getDayByOffset(date: Date, offset: number, isMonth?: boolean, isYear?: boolean): Date;
|
|
9
9
|
export declare const getPrevDay: (date: Date) => Date;
|
|
10
10
|
export declare const getNextDay: (date: Date) => Date;
|
|
11
11
|
export declare const getToday: () => Date;
|
|
12
|
+
export declare const getPrevDate: (date: Date, isMonth: boolean, isYear: boolean) => Date;
|
|
13
|
+
export declare const getNextDate: (date: Date, isMonth: boolean, isYear: boolean) => Date;
|
|
12
14
|
export declare function calcDateNum(date: [Date, Date]): number;
|
|
15
|
+
export declare function getFirstDate(date: Date): Date;
|
package/lib/calendar/utils.js
CHANGED
|
@@ -25,7 +25,10 @@ __export(stdin_exports, {
|
|
|
25
25
|
compareMonth: () => compareMonth,
|
|
26
26
|
formatMonthTitle: () => formatMonthTitle,
|
|
27
27
|
getDayByOffset: () => getDayByOffset,
|
|
28
|
+
getFirstDate: () => getFirstDate,
|
|
29
|
+
getNextDate: () => getNextDate,
|
|
28
30
|
getNextDay: () => getNextDay,
|
|
31
|
+
getPrevDate: () => getPrevDate,
|
|
29
32
|
getPrevDay: () => getPrevDay,
|
|
30
33
|
getToday: () => getToday,
|
|
31
34
|
name: () => name,
|
|
@@ -33,8 +36,9 @@ __export(stdin_exports, {
|
|
|
33
36
|
});
|
|
34
37
|
module.exports = __toCommonJS(stdin_exports);
|
|
35
38
|
var import_utils = require("../utils");
|
|
39
|
+
const monthsOfYear = 12;
|
|
36
40
|
const [name, bem, t] = (0, import_utils.createNamespace)("calendar");
|
|
37
|
-
const formatMonthTitle = (date) => t("
|
|
41
|
+
const formatMonthTitle = (date) => t("ztCalendar.monthTitle", date.getFullYear(), date.getMonth() + 1);
|
|
38
42
|
function compareMonth(date1, date2) {
|
|
39
43
|
const year1 = date1.getFullYear();
|
|
40
44
|
const year2 = date2.getFullYear();
|
|
@@ -56,9 +60,20 @@ function compareDay(day1, day2) {
|
|
|
56
60
|
}
|
|
57
61
|
const cloneDate = (date) => new Date(date);
|
|
58
62
|
const cloneDates = (dates) => Array.isArray(dates) ? dates.map(cloneDate) : cloneDate(dates);
|
|
59
|
-
function getDayByOffset(date, offset) {
|
|
63
|
+
function getDayByOffset(date, offset, isMonth, isYear) {
|
|
60
64
|
const cloned = cloneDate(date);
|
|
61
|
-
|
|
65
|
+
if (isYear) {
|
|
66
|
+
cloned.setFullYear(cloned.getFullYear() + offset);
|
|
67
|
+
} else if (isMonth) {
|
|
68
|
+
cloned.setMonth(cloned.getMonth() + offset);
|
|
69
|
+
const multiplier = cloned.getFullYear() - date.getFullYear();
|
|
70
|
+
const setLastDate = date.getMonth() + offset !== cloned.getMonth() + multiplier * monthsOfYear;
|
|
71
|
+
if (setLastDate) {
|
|
72
|
+
cloned.setDate(0);
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
cloned.setDate(cloned.getDate() + offset);
|
|
76
|
+
}
|
|
62
77
|
return cloned;
|
|
63
78
|
}
|
|
64
79
|
const getPrevDay = (date) => getDayByOffset(date, -1);
|
|
@@ -68,8 +83,13 @@ const getToday = () => {
|
|
|
68
83
|
today.setHours(0, 0, 0, 0);
|
|
69
84
|
return today;
|
|
70
85
|
};
|
|
86
|
+
const getPrevDate = (date, isMonth, isYear) => getDayByOffset(date, -1, isMonth, isYear);
|
|
87
|
+
const getNextDate = (date, isMonth, isYear) => getDayByOffset(date, 1, isMonth, isYear);
|
|
71
88
|
function calcDateNum(date) {
|
|
72
89
|
const day1 = date[0].getTime();
|
|
73
90
|
const day2 = date[1].getTime();
|
|
74
91
|
return (day2 - day1) / (1e3 * 60 * 60 * 24) + 1;
|
|
75
92
|
}
|
|
93
|
+
function getFirstDate(date) {
|
|
94
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
95
|
+
}
|
package/lib/cascader/Cascader.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -217,7 +221,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
217
221
|
options,
|
|
218
222
|
selected
|
|
219
223
|
} = tab;
|
|
220
|
-
const placeholder = props.placeholder || t("
|
|
224
|
+
const placeholder = props.placeholder || t("ztCascader.select");
|
|
221
225
|
const title = selected ? selected[textKey] : placeholder;
|
|
222
226
|
return (0, import_vue.createVNode)(import_tab.Tab, {
|
|
223
227
|
"title": title,
|
|
@@ -248,8 +252,6 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
248
252
|
});
|
|
249
253
|
const renderMenu = () => (0, import_vue.createVNode)(import_Button.default, {
|
|
250
254
|
"class": bem("cancel"),
|
|
251
|
-
"background-color": "rgba(45, 75, 115, 0.04)",
|
|
252
|
-
"color": "#2D4B73",
|
|
253
255
|
"onClick": onCancel
|
|
254
256
|
}, {
|
|
255
257
|
default: () => [(0, import_vue.createTextVNode)("\u53D6\u6D88")]
|